Giter Site home page Giter Site logo

vue-gl / vue-gl Goto Github PK

View Code? Open in Web Editor NEW
674.0 674.0 77.0 18 MB

Vue.js components rendering 3D WebGL graphics reactively with three.js

Home Page: https://vue-gl.github.io/

License: MIT License

JavaScript 56.33% Vue 43.67%
3d 3d-graphics custom element elements graphics html tag tags three three-js threejs vue vue-components vue2 vuejs vuejs2 web webgl

vue-gl's Introduction

VueGL

Vue.js components rendering 3D WebGL graphics reactively with three.js.

NPM
Financial Contributors on Open Collective

Usage

<!-- Load scripts -->
<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/three"></script>
<script src="https://unpkg.com/vue-gl"></script>

<!-- Define canvas and objects -->
<vgl-renderer id="my-canvas">
  <template #scene>
    <vgl-scene>
      <vgl-mesh>
        <template #geometry>
          <vgl-sphere-geometry></vgl-sphere-geometry>
        </template>
        <template #material>
          <vgl-mesh-basic-material></vgl-mesh-basic-material>
        </template>
      </vgl-mesh>
    </vgl-scene>
  </template>
  <template #camera>
    <vgl-perspective-camera position="spherical" :position-radius="5"></vgl-perspective-camera>
  </template>
</vgl-renderer>

<!-- Register components and start vue -->
<script>
  new Vue({ el: "#my-canvas", components: VueGL });
</script>

See the documentation for more information.

Available components

Components reference shows a list of available core components. Example components reference also introduces additional components you can use immediately.

The list of components not implemented yet can be found at this project.

Contribution

Are you interested in enhance this product? We're really glad and thanks a lot!
See Contributing guidelines to get started.

Code Contributors

This project exists thanks to all the people who contribute. [Contribute].

Financial Contributors

Become a financial contributor and help us sustain our community. [Contribute]

Individuals

Organizations

Support this project with your organization. Your logo will show up here with a link to your website. [Contribute]

License

FOSSA Status

vue-gl's People

Contributors

bfanger avatar cfneuhaus avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar fossabot avatar github-actions[bot] avatar gollum999 avatar greenkeeper[bot] avatar h-ikeda avatar monkeywithacupcake avatar unreal avatar wtduck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue-gl's Issues

Require name for objects tracked in vgl-namespace?

First of all, thank you for your work on this! I am excited to build something with vue-gl shortly and hoping to contribute.

I am not sure if this is a legitimate issue, but I was confused when my scene stopped working as soon as I added a name to my camera. It turns out that the vgl-renderer gets the camera from vgl-namespace via it's optional camera prop. The name prop on cameras is also optional.

This ends up working ok by default since the lookup finds the camera by looking up the 'undefined' key in vglNamespace.cameras, but it can be problematic. For example, if I create two unnamed cameras within a vgl-renderer, the last one overwrites the first within the vgl-namespace.

Maybe this is intentional, but I wonder if it would be better to require the name property on objects that get stored in vgl-namespace by name (e.g. scenes, cameras, geometries, etc.)

.obj + .mtl

Hi. Is there any way to implement .obj + .mtl?

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

Once you have installed CI on this repository, you’ll need to re-trigger Greenkeeper’s initial Pull Request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organiszation’s settings page, under Installed GitHub Apps.

How to access Three objects, like scene?

Hello, I want to use it for example with Three.js Inspector in chrome, where I need to attach scene to window for it to work. I've tried $refs, but it returns vue component with no scene object to be found inside :). Any tips?

Custom object

Hello. In your Getting Started example, how would you go about creating a custom component with it's own parameters and use that between the vgl-scene-tags, eg <custom-grid></custom-grid>? For example if I would like to create my own grid component, or just an Object that can be reused.

OrbitControls

Thanks for a really good and extendable repository. I have a question. I have created a custom GridSystem that extends the VglObject3D. It works as expected. Now I would like to add OrbitControls. How would you do it? So far I have created a new vue component that import THREE.OrbitControls. But how would you instantiate the OrbitControls component with a camera attached?

Not really an issue - Finally a real project that fuse Vue & ThreeJS

Well done here and congrats.

I was waiting a project like this since years!

I post here because the project lack of Discourse Forum / Telegram channel.

I'm a lot busy currently but will definitely make some PR to help include more components.
Awaiting especially VglLod as procedural content is so cool and nicely integrated in Three.Js.

Thanks again and long life to this active project!

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.