Skip to content

TypeError: Class constructor Object3D cannot be invoked without 'new'Β #48

@dataexcess

Description

@dataexcess

Trying to integrate this beautiful package in my project but it is not working.

I get this error:

Text2D.js:24 Uncaught (in promise) TypeError: Class constructor Object3D cannot be invoked without 'new'
    at SpriteText2D2.Text2D2 [as constructor] (Text2D.js:24:28)
    at new SpriteText2D2 (SpriteText2D.js:21:42)
    at Proxy.created (TextSprite.ts:25:5)
    at callWithErrorHandling (runtime-core.esm-bundler.js:157:36)
    at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:166:21)
    at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:176:21)
    at callHook (runtime-core.esm-bundler.js:3590:5)
    at applyOptions (runtime-core.esm-bundler.js:3492:9)
    at finishComponentSetup (runtime-core.esm-bundler.js:7368:9)
    at handleSetupResult (runtime-core.esm-bundler.js:7312:5)

After googling a bit I believe it is because of an inconsistency in three.js versions of the package and the project's code, and the way es6 modules are written.
My version is: "three": "^0.138.3".

Are you planning on updating the three.js dependency in this package? How can I circumvent this issue? Any help much appreciated. Thank you!

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