Alex Dixon

Gamedev, graphics, open source. Shuffling bytes and swizzling vectors since 2004...

WebGL Demos

powered by pmtech.

These demos are from my game engine pmtech they are built using WebAssembly and WebGL with the help of emscripten. You can find out more information about the example projects on the pmtech wiki.

For web browsers Chrome, Firefox and Microsoft Edge are all fully supported. Support on Safari is available if you enable the experimental feature “WebGL 2.0” but without “WebGL via Metal”. With “WebGL via Metal” the simpler samples work, but the more complex samples do not, it seems there are issues with texture arrays. Mobile browser support may be more limited.

These samples are currently work in progress with some missing features compared to the native pmtech implementations, the reference images were generated on macOS/Metal.

Controls:

  • [CTRL or CMD + X] - Toggle imgui “dev_ui”.
  • [Alt or Option + Left Mouse Drag] - Rotate camera.
  • [CTRL or CMD + Left Mouse Drag] - Pans camera (macOS).
  • [CTRL or CMD + Middle Mouse Drag] - Pans camera (Windows / Linux).
  • [Mouse Wheel] - Zoom camera.
  • [F] - Focus camera on selected object.
  • [Left Click] - Select items, or grab physics objects.