diff --git a/src/lib/Box.svelte b/src/lib/Box.svelte index 7fd05bd..5b8b549 100644 --- a/src/lib/Box.svelte +++ b/src/lib/Box.svelte @@ -2,12 +2,20 @@ import * as SC from 'svelte-cubed'; import * as THREE from 'three'; import * as PE from 'svelte-cannon'; + import * as CANNON from 'cannon-es'; - const position = PE.writableVec3(0,5,0); + const position = PE.writableVec3(0, 5, 0); + let rotation = PE.writableVec3(0, 0, 0); + let velocity = new CANNON.Vec3(1, 1, 1); - - + console.log(e)} mass={1} bind:position={$position} bind:rotation={$rotation} {velocity}> + - \ No newline at end of file + \ No newline at end of file diff --git a/src/routes/index.svelte b/src/routes/index.svelte index caea7a4..08e59bb 100644 --- a/src/routes/index.svelte +++ b/src/routes/index.svelte @@ -3,20 +3,29 @@ import * as THREE from 'three'; import * as PE from 'svelte-cannon'; import Box from '$lib/Box.svelte'; + + let count = 1; + count += 1} /> + - + {#each {length: count } as _} + + {/each} + + \ No newline at end of file