Giter Site home page Giter Site logo

VueGL is not defined about vue-gl HOT 1 CLOSED

eurolife avatar eurolife commented on June 16, 2024
VueGL is not defined

from vue-gl.

Comments (1)

h-ikeda avatar h-ikeda commented on June 16, 2024 1

@eurolife
You do NOT need this line;

Object.keys(VueGL).forEach(name => Vue.component(name, VueGL[name]));

This line tries to register all of VueGL properties as components, but the VueGL object is not defined because you don't load whole exports of 'vue-gl' module.
And Vue.component() method is for global component registration. Commonly it is preferred to use local registration in single file components as it limits the component name context.

You already register the VglRenderer locally in your component, so it should work just after removing the line above.
Remember that you need to add the VglScene and other components to components property when you call these components in template.

https://vuejs.org/v2/guide/components-registration.html
This section may be helpful for you.

from vue-gl.

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.