Skip to content

fritx/vue-threejs

 
 

Repository files navigation

vue-threejs

[WIP] Three.js bindings for Vue

Migrated from react-threejs

Demos: react-world, vue-world

import VueThreejs from 'vue-threejs'
Vue.use(VueThreejs)
<template>
  <renderer :size="{ w: 600, h: 400 }">
    <scene>
      <camera :position="{ z: 15 }"></camera>
      <object3d :obj="mesh" :position="{ y: -200 }"></object3d>
      <animation :fn="animate" :speed="3"></animation>
    </scene>
  </renderer>
</template>

Physics

<movement-system>
  <mass-object :rv0="{ x: 2, y: 2 }" :v0="{ x: 10 }"
      :f="{ x: -3, y: -2 }" :m="1">
    <cube texture="cobblestone" :size="1"></cube>
  </mass-object>
  <mass-object :rv0="{ x: 2, z: 2 }" :v0="{ z: 20 }"
      :f="{ y: -1, z: -8 }" :m="1.2">
    <cube texture="diamond" :size="1.2"></cube>
  </mass-object>
</movement-system>

Roadmap

  • Basic components
    • renderer/scene/camera/listener
    • object3d/light/audio/controls/animation
    • mesh/more
  • Watch for props change
    • position/rotation
    • obj/more
  • Animation
    • component/animate/speed/paused/blocked
    • global-control
  • Physical engine
    • movement(a/v/pos/ra/rv/rot)/mass(m/F)
    • gravity(G/r)/collision/oimo
    • circular-motion/centripetal-force
  • Unit test
    • karma/mocha/phantom
    • avoriaz/ava

Study Notes

About

Vue bindings for Three.js

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •