瓶中沙 2024-01-09 21:29:45 +08:00
commit 03d75fd3ab
1 changed files with 5 additions and 2 deletions

View File

@ -211,7 +211,6 @@ const renderScene = () => {
// console.log('', cameraX, cameraY, cameraZ); // console.log('', cameraX, cameraY, cameraZ);
TWEEN.update(); TWEEN.update();
controls.update(); controls.update();
renderer.clear();
renderer.render(scene, camera); renderer.render(scene, camera);
labelRenderer.render(scene, camera); labelRenderer.render(scene, camera);
}; };
@ -576,7 +575,11 @@ const removexf = () => {
console.log(xfobj.length); console.log(xfobj.length);
xfobj.forEach((o) => { xfobj.forEach((o) => {
// //
o.remove(o.children[o.children.length-1]); let obj = o.children[o.children.length-1];
if(obj && obj.type === 'Sprite') {
o.remove(o.children[o.children.length-1]);
}
}) })
} }
// //