mirror of
https://github.com/BradNut/svelte-3d
synced 2025-09-08 17:40:17 +00:00
Fix instructions.
This commit is contained in:
parent
c65bd035e0
commit
9e69375ba8
1 changed files with 35 additions and 35 deletions
|
|
@ -7,13 +7,13 @@
|
|||
let count = 1;
|
||||
</script>
|
||||
|
||||
<svelte:window on:click={() => count += 1} />
|
||||
<svelte:window on:click={() => (count += 1)} />
|
||||
|
||||
<div class="instructions">
|
||||
<h2>Click around to add cubes</h2>
|
||||
</div>
|
||||
|
||||
<PE.World gravity={[0, -9.8 ,0]}>
|
||||
<PE.World gravity={[0, -9.8, 0]}>
|
||||
<SC.Canvas antialias shadows>
|
||||
<PE.Body mass={0} rotation={[-Math.PI / 2, 0, 0]}>
|
||||
<PE.Plane />
|
||||
|
|
@ -22,14 +22,14 @@
|
|||
receiveShadow
|
||||
geometry={new THREE.PlaneGeometry(50, 50)}
|
||||
rotation={[-Math.PI / 2, 0, 0]}
|
||||
material={new THREE.MeshStandardMaterial({ color: "grey"})}
|
||||
material={new THREE.MeshStandardMaterial({ color: 'grey' })}
|
||||
/>
|
||||
{#each {length: count } as _}
|
||||
{#each { length: count } as _}
|
||||
<Box />
|
||||
{/each}
|
||||
<SC.DirectionalLight intensity={1} position={[15,15,15]} shadow={{ mapSize: [2048, 2048]}} />
|
||||
<SC.DirectionalLight intensity={1} position={[15, 15, 15]} shadow={{ mapSize: [2048, 2048] }} />
|
||||
<SC.AmbientLight intensity={1} />
|
||||
<SC.PerspectiveCamera position={[ 2, 2, 15 ]} target={[0,0,0]} />
|
||||
<SC.PerspectiveCamera position={[2, 2, 15]} target={[0, 0, 0]} />
|
||||
<SC.OrbitControls />
|
||||
</SC.Canvas>
|
||||
</PE.World>
|
||||
|
|
@ -37,8 +37,8 @@
|
|||
<style>
|
||||
.instructions {
|
||||
position: absolute;
|
||||
top: 5%;
|
||||
left: 40%;
|
||||
top: 10%;
|
||||
left: 5%;
|
||||
z-index: 10;
|
||||
color: white;
|
||||
font-size: 2rem;
|
||||
|
|
|
|||
Loading…
Reference in a new issue