1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 04:12:02 +08:00

update readme

This commit is contained in:
Kevin Levron 2020-09-14 17:06:13 +02:00
parent 44d54b2f71
commit b7ae3b84d1

View File

@ -7,16 +7,16 @@ I wanted to try to write a lib similar to [react-three-fiber](https://github.com
I first made a simple *Proof of Concept*, take a look at [Test.vue](/src/components/Test.vue) : I first made a simple *Proof of Concept*, take a look at [Test.vue](/src/components/Test.vue) :
```html ```html
<Renderer ref="renderer" :animate="anim"> <Renderer ref="renderer">
<PerspectiveCamera :position="{ z: 100 }"></PerspectiveCamera> <PerspectiveCamera :position="{ z: 100 }"></PerspectiveCamera>
<PhongMaterial name="mat1" color="#ff0000"></PhongMaterial> <PhongMaterial name="material1" color="#ff0000"></PhongMaterial>
<LambertMaterial name="mat2" color="#0000ff"></LambertMaterial> <LambertMaterial name="material2" color="#0000ff"></LambertMaterial>
<Scene> <Scene>
<PointLight :position="{ x: 0, y: 50, z: 50 }"></PointLight> <PointLight :position="{ x: 0, y: 50, z: 50 }"></PointLight>
<Box ref="box" :size="10" :rotation="{ x: 0.5, y: 0.25 }" material="mat1"></Box> <Box ref="box" :size="10" material="material1"></Box>
<Sphere ref="sphere" :radius="10" :position="{ x: 50 }" material="mat2"></Sphere> <Sphere ref="sphere" :radius="10" :position="{ x: 50 }" material="material2"></Sphere>
</Scene> </Scene>
</Renderer> </Renderer>
``` ```