diff --git a/sphere/index.html b/sphere/index.html index 5eb20a5..2dc517c 100644 --- a/sphere/index.html +++ b/sphere/index.html @@ -128,7 +128,8 @@ function build(){ const pOp=showSphere?.35:1; scene.children.forEach(o=>{if(o!==planeG)o.visible=showSphere}); if(!showSphere)bindu2.visible=false; - if(showPlane){tris.forEach(t=>mk(t.pts,t.up?C.up:C.down,pOp,planeG,toPlane));decor.forEach(d=>mk(d,C.fg,pOp*.45,planeG,toPlane)); + if(showPlane){const pb=new THREE.Mesh(new THREE.CircleGeometry(.022,24),new THREE.MeshBasicMaterial({color:C.bindu,side:THREE.DoubleSide}));pb.rotation.x=-Math.PI/2;pb.position.copy(toPlane([0,0])).add(new THREE.Vector3(0,.002,0));planeG.add(pb); + tris.forEach(t=>mk(t.pts,t.up?C.up:C.down,pOp,planeG,toPlane));decor.forEach(d=>mk(d,C.fg,pOp*.45,planeG,toPlane)); if(showInv){const R=6/lift;const clip=(pts,col,op)=>{let run=[];const flush=()=>{if(run.length>1)mk(run,col,op,planeG,toPlane);run=[]};for(const p of pts){if(Math.hypot(p[0],p[1])>R)flush();else run.push(p)}flush()}; trisDense.forEach(t=>clip(t.pts.map(invP),t.up?C.up:C.down,showSphere?pOp*.85:.55));decor.forEach(d=>clip(d.map(invP),C.fg,pOp*.35));}} const deg=mode==='stereo'?2*Math.atan(lift)*180/Math.PI:Math.atan(lift)*180/Math.PI;