-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
mixin with gltf-model using url path does not load #5273
Comments
I think that when the mixin caches the properties it parses the url as |
a possible workaround. Add the model as a-asset-item instead of inline URL. |
yea, it works like this:
|
Thanks @gftruj and @dmarcos yes you can use Also @gftruj your first comment appears to be correct that for whatever reason the gltf-model attribute value is being parsed as a multi attribute instead of a single attribute string, therefore it is treating the ":" symbol in the URL as a separator between property name / value. Here is the workaround that worked for me and accomplishes the objective of waiting to load the fire truck until it's referenced (removing the
https://glitch.com/edit/#!/mixin-gltf-url-error-fix?path=index.html%3A6%3A8 This workaround works great for me. Not sure how common this request is for others or if it's worth the effort to fix the behavior here, so ok if you want to close the ticket. |
It's a bug, we have to fix it. PRs very welcome. I was just offering a temporary workaround. |
Yes makes sense to fix. I dug in a bit to look and my guess so far is this is where the value is being cached, so the issue might be related to this call? it is doing naive string based chunking on compare to the asset parser which would be used instead without a mixin: aframe/src/core/propertyTypes.js Line 73 in 7050d7b
it is testing for url(...) syntax potential other related functions: aframe/src/utils/styleParser.js Line 88 in 7050d7b
|
Could be. I would put a breakpoint there and check |
Should be fix on master. Can you verify on master build? Thanks |
Description:
When defining a gltf-model using url scheme as a mixin, the model does not load. However when using the same syntax without a mixin, the file loads.
generates console error of:
Whereas this same syntax without using a mixin works as expected:
<a-entity gltf-model="url(https://assets.3dstreet.app/sets/vehicles-rig/gltf-exports/draco/fire-truck-pumper-rig.glb)"></a-entity>
reproducible here: https://mixin-gltf-url-error.glitch.me/
source: https://glitch.com/edit/#!/mixin-gltf-url-error
The text was updated successfully, but these errors were encountered: