Troubleshooting

Blank Canvas

const device = new WebGLRenderDevice(canvas, { depth: true });

Object Is Black or Unlit

Distorted Aspect Ratio

Update canvas size and camera projection on resize.

if (camera.projection instanceof PerspectiveProjection) {
  camera.projection.aspect = innerWidth / innerHeight;
}

Missing Textures or Models

Shadows Not Visible

Useful full examples: