Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Let’s talk WebGL
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Tomek Kopczuk
March 05, 2018
Programming
28
1
Share
Let’s talk WebGL
Introduction to game development and three.js with Tomek Kopczuk, SwingDev’s CTO
Tomek Kopczuk
March 05, 2018
Other Decks in Programming
See All in Programming
Kubernetesでセルフホストが簡単なNewSQLを求めて / Seeking a NewSQL Database That's Simple to Self-Host on Kubernetes
nnaka2992
0
200
The Monolith Strikes Back: Why AI Agents ❤️ Rails Monoliths
serradura
0
150
モダンOBSプラグイン開発
umireon
0
200
Coding as Prompting Since 2025
ragingwind
0
720
KagglerがMixSeekを触ってみた
morim
0
370
安いハードウェアでVulkan
fadis
1
900
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
530
AI Assistants for YourAngular Solutions @Angular Graz, March 2026
manfredsteyer
PRO
0
150
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
180
Migration to Signals, Signal Forms, Resource API, and NgRx Signal Store @Angular Days 03/2026 Munich
manfredsteyer
PRO
0
230
10年分の技術的負債、完済へ ― Claude Code主導のAI駆動開発でスポーツブルを丸ごとリプレイスした話
takuya_houshima
0
1.1k
AWS re:Invent 2025の少し振り返り + DevOps AgentとBacklogを連携させてみた
satoshi256kbyte
2
150
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
61
43k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
Done Done
chrislema
186
16k
Crafting Experiences
bethany
1
110
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.5k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
330
Transcript
www.swing3d.io Let’s talk WebGL Introduction to game development and three.js
with Tomek Kopczuk, SwingDev’s CTO
Game Development is different • Render loop • Only 16ms
per frame • Soft Real Time System
16ms to rule them all • Actual drawing • Collisions
• Physics • Animations • AI • I/O
So - WebGL • OpenGL ES for <canvas> • Transcends
way beyond 3D!
Programmable Pipeline Vertex Buffer Objects Primitive Processing Vertex Shader Primitive
Assembly Rasterizer Fragment Shader Depth Stencil Color Buffer Blend Dither Frame Buffer API Triangles/Lines/Points Vertices How does stuff get drawn?
How does stuff get drawn? VBO Vertex Shader Rasterization Fragment
Shader
three.js - introduction • After today we’re going to be
able to do this
three.js - introduction • Scene • Camera • Renderer
three.js - cameras and projections • Orthographic • Perspective
Camera Demo
three.js - introduction • Geometry • Material • Object3D •
Light • Mesh
three.js - common geometries • BoxGeometry • CircleGeometry • ConeGeometry
• CylinderGeometry • PlaneGeometry • SphereGeometry
Demo 1 - bootstrap, skybox, ground
three.js - common materials • MeshBasicMaterial • MeshLambertMaterial • MeshPhongMaterial
• MeshPhysicalMaterial • MeshStandardMaterial • MeshToonMaterial • RawShaderMaterial
Demo 2 - cube and materials
three.js - shaders • Vertex shader • Fragment shader Vertex
Shader Uniforms Fragment Shader Frame Buffer Vertex Buffer Objects Varyings Attributes input input input output points to input
three.js - vertex shader uniform mat4 projectionMatrix; uniform mat4 modelViewMatrix;
void main () { gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0); }
three.js - fragment shader void main () { gl_FragColor =
vec4(0.5, 0.5, 0.5, 1.0); }
Demo 3 - cube with a shader
three.js - shaders - useful?
Demo 4 - cube with a dynamic shader
three.js - loading real assets • Group • OBJ Loader
• Texture Loader
Demo 5 - turret
three.js - loading real assets • Geometry • MeshStandardMaterial •
map • normalMap • aoMap • roughnessMap • metalnessMap • envMap • ModelView matrix
three.js - adding user interaction • Asynchronous to the render
loop • Raycasting
Demo 6 - moving turrets
Further reading • https://threejs.org/docs/index.html#manual/introduction/Creating- a-scene • https://threejs.org/examples/ • https://www.khronos.org/webgl/ •
https://www.opengl.org/sdk/tools/ShaderDesigner/
Thank you