1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 04:12:02 +08:00
ThreeJS + VueJS 3 + ViteJS
Go to file
Kevin Levron 26ab54bd66 wip
2020-09-15 14:59:34 +02:00
docs wip 2020-09-15 10:22:55 +02:00
public wip 2020-09-15 14:59:34 +02:00
src wip 2020-09-15 14:59:34 +02:00
.eslintrc.js init 2020-09-14 16:57:11 +02:00
.gitignore move github page folder 2020-09-15 10:12:01 +02:00
index.html remove favicon 2020-09-15 10:15:21 +02:00
package.json wip 2020-09-15 10:07:57 +02:00
README.md wip 2020-09-15 11:30:30 +02:00

VueJS 3 + ViteJS + ThreeJS

I wanted to try to write a lib similar to react-three-fiber but for VueJS.

PoC

I first made a simple Proof of Concept, take a look at Test1.vue :

  <Renderer>
    <PerspectiveCamera :position="{ z: 100 }"></PerspectiveCamera>

    <PhongMaterial name="material1" color="#ff0000"></PhongMaterial>
    <LambertMaterial name="material2" color="#0000ff"></LambertMaterial>

    <Scene>
      <PointLight :position="{ y: 50, z: 50 }"></PointLight>
      <Box ref="box" :size="10" material="material1"></Box>
      <Sphere ref="sphere" :radius="10" :position="{ x: 50 }" material="material2"></Sphere>
    </Scene>
  </Renderer>

Test

git clone https://github.com/troisjs/trois
cd trois
yarn
yarn dev