paper = () => {
const blue_material = new THREE.MeshLambertMaterial({ color: 0xccccff, side: THREE.DoubleSide });
const green_material = new THREE.MeshLambertMaterial({ color: 0xccffcc, side: THREE.DoubleSide });
group.children = [];
let paper0 = new THREE.PlaneGeometry(cardWidth, cardHeight);
paper0.translate(cardWidth/2, 0, 0);
addToGroup(paper0, blue_material);
let paper1 = new THREE.PlaneGeometry(cardWidth, cardHeight);
paper1.translate(-cardWidth/2, 0, 0);
paper1.rotateY(-foldAngle);
addToGroup(paper1, blue_material);
let pu = popup(0, 0, 0);
let sin = -Math.sin(-foldAngle);
let cos = Math.cos(-foldAngle);
let c2P = new THREE.Vector3(pu.cP.x*cos + pu.cP.z*sin, pu.cP.y, -pu.cP.x*sin + pu.cP.z*cos);
let bPs = intersect3Spheres(pu.aP, pu.distAB, pu.dP, pu.distDB, c2P, pu.distCB);
pu.bP = bPs[0];
let geo1 = new THREE.Geometry();
geo1.vertices.push(
new THREE.Vector3(-pu.dP.x, pu.dP.y, pu.dP.z),
new THREE.Vector3(-pu.aP.x, pu.aP.y, pu.aP.z),
new THREE.Vector3(-pu.bP.x, pu.bP.y, pu.bP.z)
);
geo1.faces.push(
new THREE.Face3(0, 1, 2)
);
addToGroup(geo1, green_material);
let geo2 = new THREE.Geometry();
geo2.vertices.push(
new THREE.Vector3(-pu.bP.x, pu.bP.y, pu.bP.z),
new THREE.Vector3(-pu.aP.x, pu.aP.y, pu.aP.z),
new THREE.Vector3(-c2P.x, c2P.y, c2P.z)
);
geo2.faces.push(
new THREE.Face3(0, 1, 2)
);
addToGroup(geo2, green_material);
}