mirror of
https://github.com/yeicor-3d/yet-another-cad-viewer.git
synced 2025-12-19 22:24:17 +01:00
fix animation + clipping
This commit is contained in:
@@ -184,10 +184,10 @@ function onModelLoad() {
|
|||||||
if (modelName !== "__helpers") {
|
if (modelName !== "__helpers") {
|
||||||
// The back of the material only writes to the stencil buffer the areas
|
// The back of the material only writes to the stencil buffer the areas
|
||||||
// that should be covered by the plane, but does not render anything
|
// that should be covered by the plane, but does not render anything
|
||||||
let backMaterial = child.material.clone();
|
let backChild = child.clone();
|
||||||
backMaterial.side = BackSide;
|
backChild.material = child.material.clone();
|
||||||
backMaterial.color = new Color(0.25, 0.25, 0.25)
|
backChild.material.side = BackSide;
|
||||||
let backChild = new TMesh(child.geometry, backMaterial);
|
backChild.material.color = new Color(0.25, 0.25, 0.25)
|
||||||
child.userData.backChild = backChild;
|
child.userData.backChild = backChild;
|
||||||
childrenToAdd.push(backChild);
|
childrenToAdd.push(backChild);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user