-
Notifications
You must be signed in to change notification settings - Fork 203
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
cloning an entity with mixin value will sometimes not apply the mixin correctly to the cloned entity #689
Comments
@3DStreet sponsored me to work on this issue. Thank you! c-frame/sponsorship#3 |
aframevr/aframe#2823 is probably related to this issue. |
Removing the mixin is removing the gltf-model component but you don't see it disappears in the right panel (that's another issue, a forceUpdate is missing on the ComponentsContainer React component for the entityupdate event with component "mixin"), you can select another entity and select the previous entity back to see it. Another issue is the UI is not updating with the mixin name at the top of the right panel and in the left panel when you add or remove a mixin. I see in the DOM that when gltf-model is set with a mixin, that gltf-model (empty) is shown. |
You said that you reproduce the issue sometimes, but not always. I reproduce it every time. Maybe you don't reproduce it when the gltf-model component is really set on the entity, overriding the mixin, even if it's the same url, you can see it in with Chrome inspector, if you see the url, then the gltf-model component is set directly and duplicating the entity will show the model. |
Some other notes: If you use "copy entity HTML to clipboard" button, you get |
@kfarr Looking at aframe-inspector/src/lib/entity.js Lines 157 to 219 in 72fd461
it does all the logic of removing attributes if it's inherited from mixin (so the gltf-model component). I think for the duplicate feature we should really just change the line |
For your single mixin feature, you should just keep your workaround, that's fine. It indeed force it to remove the gltf-model component and create another one. |
This is the second of 2 errors encountered using the duplicate (clone) entity feature (keyboard shortcut
d
)mixin
attribute are copied. See flushtodom() called during inspector session outputs old values (values prior to inspector changes) #688 for a deeper explanation.Workaround:
We encountered this issue in both cases in 3DStreet for some models. We came up with a workaround where we set the mixin value first to '' and then re-set the mixin value to the desired value. This appears to work in all cases that we have tested.
Here are the 2 cases where we use this workaround in 3DStreet:
here is a video of a duplicated entity not showing the mixin value as expected. the UI workaround is to remove the mixin and re-apply the same mixin:
https://github.com/aframevr/aframe-inspector/assets/470477/b7cb3adb-1408-4709-9cd2-3a65b4990ca4
*note that a single mixin concept is unique to 3dstreet, default aframe-inspector uses select multiple
here is the URL to reproduce:
https://mixin-gltf-url-error.glitch.me/
here are instructions to reproduce:
press ctl-alt-i to invoke the inspector, select the mixin firetruck, while the truck entity is selected press
d
, note how the firetruck is not visible in the newly cloned entity.expected behavior:
The text was updated successfully, but these errors were encountered: