stackwith.me — instancing reference excerpts Source snapshot: 2026-10-28 These are excerpts from the local source used to prepare this edition. They describe code, not a successful browser test or the state of a live service. Line numbers refer to the original file. Full-file SHA-256 identifies that version. File: src/assets/js/lab-ice.js SHA-256: 4d27ceba0c7cd6ea78769efc97d65ff14838710ec3d04374f0ad7e39ff8b93f9 Lines 191–224 191 own(chamberLight.shadow); 192 193 const dummy=new THREE.Object3D(); 194 const batches=[]; 195 let iceTriangles=0; 196 for(let variant=0;variantp.family===variant); 198 const geometry=sculpt(variant,divisions,variant{seeds[i]=p.seed;}); 204 geometry.setAttribute("aSeed",new THREE.InstancedBufferAttribute(seeds,1)); 205 geometry.setAttribute("aEnergy",new THREE.InstancedBufferAttribute(energy,1).setUsage(THREE.DynamicDrawUsage)); 206 iceTriangles+=geometry.index.count/3*members.length; 207 group.add(mesh);batches.push({mesh,members,energy}); 208 } 209 210 const debrisCount=phone?3:5; 211 const debrisGeometry=sculpt(7,phone?8:14); 212 const debris=new THREE.InstancedMesh(debrisGeometry,material,debrisCount); 213 const debrisSeeds=new Float32Array(debrisCount); 214 for(let i=0;i