GithubHelp home page GithubHelp logo

import ForceGraphVR in js module gives multiple instances of Three.js imported and A-frame <script>in head warnings about 3d-force-graph-vr HOT 2 CLOSED

vasturiano avatar vasturiano commented on July 22, 2024
import ForceGraphVR in js module gives multiple instances of Three.js imported and A-frame

Comments (2)

vasturiano avatar vasturiano commented on July 22, 2024

@micrology thanks for reaching out.

All but one of these warnings are currently inevitable and shouldn't cause any ill side effects besides the message in the console. Let's see:

core:schema:warn Unknown property `model` for component/system `generic-tracked-controller-controls`.

This is a "feature" of Aframe's laser controls, which this component makes use of to handle controller interactions. You'll see it in every piece of code that uses those controls and it's probably just a mismatch in the Aframe source code. Slightly annoying but should be harmless.

WARNING: Multiple instances of Three.js being imported.

This has to do with the fact that Aframe itself packs a whole custom version of ThreeJS inside it. And ThreeJS has an internal check to inform you that there are multiple instances of it imported to the apps dependency tree. It's also unavoidable due to the way it's setup, but as mentioned should be only an informational message.

A-Frame:warn Put the A-Frame <script> tag in the <head> of the HTML *before* the scene to ensure everything for A-Frame is properly registered before they are used from HTML. 

This is the one that can be prevented. You simply need to move the script tag from <body> to <head>, as it is in the example:

<head>
<style> body { margin: 0; } </style>
<script src="//unpkg.com/3d-force-graph-vr"></script>

All other messages should be informational only, added by deeper dependencies of this module, mainly Aframe and ThreeJS.

from 3d-force-graph-vr.

micrology avatar micrology commented on July 22, 2024

Thank you @vasturiano - that is all very reassuring - and thanks also for the hint about moving the script tag.

from 3d-force-graph-vr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.