Plane view keeps its own bindu when the sphere is hidden
This commit is contained in:
1 parent
aad71a110f
commit
c3ae65aea3
1 file changed
+2
-1
+2
-1
@@ -128,7 +128,8 @@ function build(){
|
|||||||
const pOp=showSphere?.35:1;
|
const pOp=showSphere?.35:1;
|
||||||
scene.children.forEach(o=>{if(o!==planeG)o.visible=showSphere});
|
scene.children.forEach(o=>{if(o!==planeG)o.visible=showSphere});
|
||||||
if(!showSphere)bindu2.visible=false;
|
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()};
|
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));}}
|
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;
|
const deg=mode==='stereo'?2*Math.atan(lift)*180/Math.PI:Math.atan(lift)*180/Math.PI;
|
||||||
|
|||||||
Reference in new issue
Block a user