mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 04:12:02 +08:00
wip
This commit is contained in:
parent
440a854417
commit
0f830f1b01
@ -1,15 +1,16 @@
|
|||||||
<template>
|
<template>
|
||||||
<Renderer ref="renderer" :auto-clear="false" :orbit-ctrl="{ enableDamping: true, dampingFactor: 0.05 }" mouse-move="body" :mouse-raycast="true">
|
<Renderer ref="renderer" :auto-clear="false" :orbit-ctrl="{ enableDamping: true, dampingFactor: 0.05 }" mouse-move="body" :mouse-raycast="true">
|
||||||
<Camera :position="{ z: 200 }" />
|
<Camera :position="{ z: 200 }" />
|
||||||
<StandardMaterial id="material" :transparent="true" :opacity="0.9" :metalness="0.8" :roughness="0.5" />
|
|
||||||
<PhongMaterial id="material1" />
|
|
||||||
<Scene>
|
<Scene>
|
||||||
<AmbientLight color="#808080" />
|
<AmbientLight color="#808080" />
|
||||||
<PointLight color="#ff6000" />
|
<PointLight color="#ff6000" />
|
||||||
<PointLight ref="light" color="#0060ff" :intensity="0.5" />
|
<PointLight ref="light" color="#0060ff" :intensity="0.5" />
|
||||||
|
|
||||||
<InstancedMesh ref="imesh" material-id="material" :count="NUM_INSTANCES">
|
<InstancedMesh ref="imesh" material-id="material" :count="NUM_INSTANCES">
|
||||||
<BoxGeometry :width="2" :height="2" :depth="10" />
|
<BoxGeometry :width="2" :height="2" :depth="10" />
|
||||||
|
<StandardMaterial :transparent="true" :opacity="0.9" :metalness="0.8" :roughness="0.5" />
|
||||||
</InstancedMesh>
|
</InstancedMesh>
|
||||||
|
|
||||||
<Text
|
<Text
|
||||||
text="TroisJS"
|
text="TroisJS"
|
||||||
font-src="helvetiker_regular.typeface.json"
|
font-src="helvetiker_regular.typeface.json"
|
||||||
@ -19,7 +20,9 @@
|
|||||||
:height="5"
|
:height="5"
|
||||||
:position="{ x: 0, y: 0, z: 0 }"
|
:position="{ x: 0, y: 0, z: 0 }"
|
||||||
:cast-shadow="true"
|
:cast-shadow="true"
|
||||||
/>
|
>
|
||||||
|
<PhongMaterial />
|
||||||
|
</Text>
|
||||||
</Scene>
|
</Scene>
|
||||||
<EffectComposer>
|
<EffectComposer>
|
||||||
<RenderPass />
|
<RenderPass />
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<Renderer ref="renderer" :orbit-ctrl="{ enableDamping: true, dampingFactor: 0.05 }" :shadow="true">
|
<Renderer ref="renderer" :orbit-ctrl="{ enableDamping: true, dampingFactor: 0.05 }" :shadow="true">
|
||||||
<Camera :position="{ z: 100 }" />
|
<Camera :position="{ z: 100 }" />
|
||||||
<PhongMaterial id="material" color="#ffffff" />
|
|
||||||
<Scene>
|
<Scene>
|
||||||
<SpotLight color="#ffffff" :intensity="0.5" :position="{ y: 150, z: 0 }" :cast-shadow="true" :shadow-map-size="{ width: 1024, height: 1024 }" />
|
<SpotLight color="#ffffff" :intensity="0.5" :position="{ y: 150, z: 0 }" :cast-shadow="true" :shadow-map-size="{ width: 1024, height: 1024 }" />
|
||||||
<SpotLight color="#ff0000" :intensity="0.5" :position="{ y: -150, z: 0 }" :cast-shadow="true" :shadow-map-size="{ width: 1024, height: 1024 }" />
|
<SpotLight color="#ff0000" :intensity="0.5" :position="{ y: -150, z: 0 }" :cast-shadow="true" :shadow-map-size="{ width: 1024, height: 1024 }" />
|
||||||
<InstancedMesh ref="imesh" material-id="material" :count="NUM_INSTANCES" :cast-shadow="true" :receive-shadow="true">
|
<InstancedMesh ref="imesh" material-id="material" :count="NUM_INSTANCES" :cast-shadow="true" :receive-shadow="true">
|
||||||
<SphereGeometry :radius="5" />
|
<SphereGeometry :radius="5" />
|
||||||
|
<PhongMaterial />
|
||||||
</InstancedMesh>
|
</InstancedMesh>
|
||||||
</Scene>
|
</Scene>
|
||||||
<EffectComposer>
|
<EffectComposer>
|
||||||
|
Loading…
Reference in New Issue
Block a user