From c3ae65aea3fc4e45367a66f07f17dc7cea672e7a Mon Sep 17 00:00:00 2001 From: teahubxyz Date: Fri, 23 Oct 2026 20:10:44 +0000 Subject: [PATCH] Plane view keeps its own bindu when the sphere is hidden --- sphere/index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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;