Hubs-Foundation / hubs

Duck-themed multi-user virtual spaces in WebVR. Built with A-Frame.
https://hubsfoundation.org
Mozilla Public License 2.0
2.13k stars 1.42k forks source link

Using the Clip Rect property of the text component crashes the AFrame loader. #6484

Open Exairnous opened 5 months ago

Exairnous commented 5 months ago

Description If you have a text component in a scene with the Clip Rect property filled out it crashes the AFrame loader on scene load.

To Reproduce Steps to reproduce the behavior:

  1. Open a Hubs room using the AFrame loader and the debugLocalScene query string parameter.
  2. Drag and drop this GLB file: ClipRectBug.zip
  3. See that the scene fails to load/crashes and this error is printed to the browser console:
    Uncaught (in promise) TypeError: e.split is not a function
    parse troika-text.js:42
    Aframe 10
        d
        parseProperties
        buildData
        initComponent
        updateProperties
        Component
        n
        value
        value
        value
    gc gltf-model-plus.js:78
    e gltf-model-plus.js:283
    uc hub-2b597d191271c31b14c2.js:1
    s hub-2b597d191271c31b14c2.js:1

Expected behavior The scene should load without crashing.

Hardware

Additional context I stumbled across this bug while working on supporting the Clip Rect property in the Blender add-on, but I was able to reproduce this with a Spoke scene as well.