improvement: use the corret methods for updating svelte state

This commit is contained in:
Youwen Wu 2024-03-02 11:58:39 -08:00
parent afc6dc01d0
commit 479b572e3b

View file

@ -122,10 +122,10 @@
onMount(() => {}) onMount(() => {})
</script> </script>
<T.PerspectiveCamera makeDefault position={[12, 10, 12]}> <T.PerspectiveCamera makeDefault position={[8, 4, 8]}>
<CameraControls <CameraControls
on:create={({ ref }) => { on:create={({ ref }) => {
$cameraControls = ref cameraControls.set(ref)
}} }}
autoRotateSpeed={3} autoRotateSpeed={3}
/> />
@ -139,7 +139,7 @@
position.y={0} position.y={0}
on:create={({ ref }) => { on:create={({ ref }) => {
// @ts-expect-error // @ts-expect-error
$mesh = ref mesh.set(ref)
}} }}
/> />