Requires npm 2.x.x
to work on locally due to the use
of local dependencies.
git clone [email protected]:hughsk/workshop-app-shell.git
cd workshop-app-shell
npm install
npm start
The publish process for webgl-workshop is a little more involved. Before
publishing, we reinstall and dedupe all of the dependencies before creating
a tarball with all of the node_modules
already included.
We then publish the tarball instead of the directory, meaning that the installation can finish in a single step. This simplifies installing the workshop when bandwidth is limited. So when publishing, make sure to use the following instead:
make publish
The workshop.tar.gz
file that's generated can also be installed directly
if you have no internet access whatsoever:
make pack
npm install ./workshop.tar.gz
npm run dev
make clean build
In this project, each exercise is treated as an independent package, i.e. a
directory with its own package.json
file, dependencies and so on. You're also
given almost full control with your exercise – it's essentially just a vanilla
route handler. See the exercises
directory for a few existing
examples.
The steps are as follows:
- Create a new directory in
exercises
. The name of this directory is not important. - Place a
package.json
file in there, withmain
pointing toserver.js
and thename
being@exercise/my-exercise-name
. This name will be used across the app to refer to the exercise in question (feel free to change that last part as you wish). - Copy
exercises/bare/server.js
into your new exercise directory. - Add an entry to
exercises.json
, where the key should be the exercise name as it appears on the menu and the value should be the samename
property used in yourpackage.json
. - Run
npm install --save exercises/*
from the project root to update the exercise dependencies.
Next time you run the server you should be good to go!
- Basic WebGL
- Context creation
- clear color
- Scissor
- Shaders
- Shader objects (have student create vert/frag shaders)
- Program objects (have student link shader)
- Binding shaders
- Uniforms
- Constant attributes & attribute locations
- Buffers
- Basic buffer creation
- Attribute pointers
- drawArrays
- Element buffers and drawElements
- First challenge
- Draw a triangle from start to finish
- Textures
- 2D textures
- Mipmaps and filtering
- Wrapping modes
- Multitexturing
- 3D considerations
- Depth buffer
- Viewport and clip coordinates
- Face culling
- Back and front face variables
- Second challenge:
- Draw a 3D textured mesh
- Framebuffer objects
- Render buffers
- Frame buffer basics
- Feedback loop
- Blending
- Stencil buffer
- basic usage
- shadows?
- Advanced buffer tricks
- copyTexImage
- Color mask, depth mask, stencil mask
- depth func
- Reading pixels
- Advanced drawing tricks
- Line width
- Polygon offset
- Extensions
- Vertex array objects
- Float textures
- Instanced arrays
- Multiple draw buffers
- Context loss