Headless WebGL 1/2 renders of three.js scenes on top of this package, backed by ANGLE (Metal on
macOS). Every script renders synchronously (no requestAnimationFrame, except animation-loop.mjs),
writes out/<name>.png, sanity-checks its own pixels (gl.readPixels + gl.getError()), logs
ok <name> <ms>ms <w>x<h>, and throws (non-zero exit) on failure.
Run everything: node examples/run-all.mjs (or npm run examples). Run one example directly with
node examples/three/<name>.mjs.
textures.mjs and gltf-loader.mjs use small assets committed in assets/ (uv-grid.png,
photo.jpg); regenerate them with node examples/assets/make-assets.mjs.
basic-scene.mjs-- lit cube + sphere over a shadowed floor (MeshStandardMaterial/MeshPhysicalMaterial, PCF shadow maps, MSAA).instancing.mjs-- one draw call rendering 5,832InstancedMeshboxes with per-instance color.textures.mjs--TextureLoader(PNG + JPEG),flipYbehavior, sRGB colorSpace, anisotropy, repeat wrapping + mipmaps, aDataTexture, and aCanvasTexturefed by real WebGL drawing.pbr-environment.mjs--PMREMGenerator+RoomEnvironmentlighting metal / rough / clearcoat / transmissionMeshPhysicalMaterialspheres (exercises float/half-float and cube render targets).postprocessing.mjs--EffectComposer:RenderPass->UnrealBloomPass->OutputPass.render-targets.mjs-- render-to-texture, a 2-attachment MRTShaderMaterialwritinglayout(location=1), aWebGLCubeRenderTargetused as an envMap, and aDepthTexturesampled in a second pass.points-lines.mjs-- vertex-coloredPointswith size attenuation,LineSegments, a fatLine2/LineMaterial, and aSprite.skinning-morph.mjs-- a proceduralSkinnedMesh(bones posed by rotation) combined with a nonzero morph-target bulge, applied together.gltf-loader.mjs--GLTFExporter->GLTFLoader.parse()round trip of a procedural scene, fully in memory.shader-material.mjs--RawShaderMaterial/GLSL3 sampling asampler2DArray(DataArrayTexture) and asampler3D(Data3DTexture), aShaderMaterialusing screen-space derivatives (fwidth), and ACESFilmic tone mapping + sRGB output.webgl1-fallback.mjs-- no three.js: raw WebGL 1 instanced, textured quads (ANGLE_instanced_arrays,OES_vertex_array_object,OES_texture_float) rendered into a 2-attachmentWEBGL_draw_buffersframebuffer, with both attachments read back and composited into one PNG.animation-loop.mjs--AnimationMixerdriven byrenderer.setAnimationLoop()ridinginstallDOM()'srequestAnimationFrame, for 30 frames.