File tree Expand file tree Collapse file tree
Site/src/routes/(legal)/about Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 }: { i: number ; j: number ; onmoved: () => void ; onclicked: () => void } =
1212 $props ()
1313
14- const opacity = new Spring (Math .random () + (- j - i / 2 - 5 ) / 12 )
14+ const opacity = new Spring (0 )
15+ $effect (() => {
16+ opacity .set (Math .random () + (- j - i / 2 - 5 ) / 12 )
17+ })
1518 const clicked = new Map <string , " hovered" | " clicked" >()
1619 const scale = new Spring (0 , {
1720 stiffness: 0.1 ,
3336 </script >
3437
3538<T .Mesh
36- position ={[i , j + $ scale , - i - j ]}
39+ position ={[i , j + scale . current , - i - j ]}
3740 on:pointerenter ={() => {
3841 if (! clickable || clicked .get (` ${i },${j } ` )) return
3942 clicked .set (` ${i },${j } ` , " hovered" )
5659 }}>
5760 <T .BoxGeometry />
5861 <T .MeshStandardMaterial
59- color ={$ colour }
62+ color ={colour . current }
6063 args ={[
6164 {
6265 transparent: true ,
63- opacity: $ opacity
66+ opacity: opacity . current
6467 }
6568 ]} />
6669</T .Mesh >
You can’t perform that action at this time.
0 commit comments