Skip to content

Moving an entity using appendChild makes the entity disappear as of v0.9.2  #4316

Closed

Description

@ih

Moving an entity using appendChild makes the entity disappear as of v0.9.2

Expected behavior (which worked with v0.9.0 and before) is for the entity to remain visible although perhaps this behavior was not guaranteed and is related to #2425 ?

  • A-Frame Version: 0.9.2
  • Platform / Device: Firefox 70.0.1 on OS X, Macbook Air
  • Reproducible Code Snippet or URL:

Appending after 3 seconds works with v0.9.0
https://glitch.com/~appendchild-9-0

Does not work with v0.9.2
https://glitch.com/~appendchild-9-2

Activity

  1. damned commented on Jul 5, 2020

    @damned

    i am also getting this behaviour i believe in 1.0.4:

    when trying to move an existing visible element child from one parent oldParent to another newParent in the scene, with:

    newParent.appendChild(child)
    

    afterwards, the javascript object exists, but the child entity is invisible.
    as far as i could tell the child's object3D.parent was correctly set to the newParent's object3d after appending.

    i'm also posting other problems around moving elements around scene hierarchy related to transformations to #2425

    • aframe 1.0.4
    • oculus quest v18, standard browser
  2. dmarcos commented on Oct 23, 2020

    @dmarcos
    Member

    We recommend reparenting at the THREE.js level Attaching / reattaching and re initializing components is costly and not always reliable (components have to account for a complex costly scenario that is relatively rare)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions