Alle Beiträge von mic91668

ThreeJs: Troika-3d-text error

troika-three-utils.esm.js?module:143 Uncaught TypeError: Class constructor MeshBasicMaterial cannot be invoked without 'new'
at new DerivedMaterial (troika-three-utils.esm.js?module:143)
at createDerivedMaterial (troika-three-utils.esm.js?module:222)
at createTextDerivedMaterial (textmesh-standalone.esm.js?module:4578)
at TextMesh.get material as material
at Pt (three.min.js:2)
at Pt (three.min.js:2)
at Pt (three.min.js:2)
at Pt (three.min.js:2)
at Pt (three.min.js:2)
at sa.render (three.min.js:2)

Plötzlich kam obige Fehlermeldung in meinem ThreeJS-Programm.

Lösung: Ersetze:

import {TextMesh} from 'https://unpkg.com/troika-3d-text@0.19.0/dist/textmesh-standalone.esm.js?module';

durch:

import {Text} from 'https://unpkg.com/troika-three-text@0.39.2/dist/troika-three-text.esm.js?module';