Skip to content

CDN library any basic hello world examples, all fail to load #358

@panamantis

Description

@panamantis

I've tried every version, even non-standalone combinations but I can't get any to load in a basic html world. I don't want node esm etc. Just basic.

Option (1)
<script src="https://cdn.jsdelivr.net/npm/three@0.134.0/build/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/troika-three-text@0.52.4/dist/troika-three-text.umd.min.js"></script>
The above throws:
Uncaught TypeError: Cannot read properties of undefined (reading 'defineWorkerModule')

Option (2):
<script src="https://cdn.jsdelivr.net/npm/three@0.134.0/build/three.min.js"></script>

<!-- Load all Troika dependencies in correct order -->
<script src="https://unpkg.com/troika-worker-utils@0.45.0/dist/troika-worker-utils.umd.js"></script>
<script src="https://unpkg.com/troika-three-utils@0.45.0/dist/troika-three-utils.umd.js"></script>
<script src="https://unpkg.com/troika-three-text@0.45.0/dist/troika-three-text.umd.js"></script>

Maybe it's obvious, but there's not combination that works from what I can tell.

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