Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class constructor Loader cannot be invoked without 'new' #25

Open
ingodahn opened this issue Nov 13, 2021 · 2 comments
Open

Class constructor Loader cannot be invoked without 'new' #25

ingodahn opened this issue Nov 13, 2021 · 2 comments

Comments

@ingodahn
Copy link

Calling a Vue component using ForceGraphVR I get the following error:

Uncaught TypeError: Class constructor Loader cannot be invoked without 'new'
    at new THREE.DRACOLoader (3d-force-graph-vr:2)
    at r.init (3d-force-graph-vr:83)
    at r.t.exports.System (3d-force-graph-vr:83)
    at new r (3d-force-graph-vr:83)
    at HTMLElement.value (3d-force-graph-vr:83)
    at HTMLElement.value (3d-force-graph-vr:83)
    at HTMLElement.value (3d-force-graph-vr:83)
    at HTMLElement.value (3d-force-graph-vr:83)
    at g (3d-force-graph-vr:2)
    at o (3d-force-graph-vr:2)

The main.html contains

<script src="https://unpkg.com/3d-force-graph-vr"></script>
  <script src="https://unpkg.com/3d-force-graph"></script> 
  <script src="https://unpkg.com/force-graph"></script>
  <script src="https://unpkg.com/d3-force"></script>
  <script src="https://unpkg.com/three"></script>

Components are loaded in this sequence with vr first. each component is called with its own data object

@vasturiano
Copy link
Owner

@ingodahn I would try with the three script as the first one above all the rest, if indeed you need it in your main html.

If the issue is Vue related I can't be of much help there, but if you can still reproduce it in vanilla JS, could you make an example on codepen.io?

@ingodahn
Copy link
Author

ingodahn commented Nov 14, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants