Skip to content

mixin with gltf-model using url path does not load #5273

@kfarr

Description

@kfarr

Description:

  • A-Frame Version: 1.4.1
  • Platform / Device: Chrome Desktop
  • Reproducible Code Snippet or URL:

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.

      <a-assets>
        <a-mixin id="fire-truck-rig" gltf-model="url(https://assets.3dstreet.app/sets/vehicles-rig/gltf-exports/draco/fire-truck-pumper-rig.glb)"></a-mixin>
      </a-assets>
      <a-entity position="0 0 -9" mixin="fire-truck-rig"></a-entity>

generates console error of:

three.module.js:42746 Uncaught (in promise) TypeError: e.lastIndexOf is not a function
    at nd.extractUrlBase (three.module.js:42746:21)
    at pm.GLTFLoader.load (GLTFLoader.js:174:31)
    at gltf-model.js:44:19
e

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

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