Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scene.remove not work #72

Open
elineeen opened this issue Jun 18, 2021 · 0 comments
Open

scene.remove not work #72

elineeen opened this issue Jun 18, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@elineeen
Copy link

i'm writing another demo with troisjs recently with three.sprite(not using trois sprite component because the sprite is not supported while coding this demo lol) & scene and i find out that $refs.sceneInstance.remove doesnt work. i've checked the sprites' parent is the scene's reference and $refs.sceneInstance.scene.remove doesn't work as well(but .add() api works fine ,curious)
`
//so this part of code do not work
// debugger;
// activatedNodeInstanceList.forEach(node=>{
// this.$refs.sceneInstance.remove(node);
// })

    debugger;
    //directly use removeFromParent api works fine
    activatedNodeInstanceList.forEach(node=>{
      node.removeFromParent();
    })

`
trois version:0.3.2 three:0.129.0
original src code file
besides i see the doc installation is still using ^0.127 which is not support the removeFromParent api , but i check the trois Object3D sourcecode to find out it has already supported removeFromParent api :P

@klevron klevron added the enhancement New feature or request label Jun 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants