data endpoint for entity 90008 (aka. a website)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: y is the up axis not z

dusk 17d02823 6343d52d

+3 -3
+3 -3
src/components/pet.svelte
··· 151 151 152 152 const shake = (event: DeviceMotionEvent) => { 153 153 const accel = event.acceleration; 154 - if (accel === null || accel.x === null || accel.y === null || accel.z === null) return; 155 - if (Math.abs(accel.x) + Math.abs(accel.z) < 40.0) return; 154 + if (accel === null || accel.x === null || accel.y === null) return; 155 + if (Math.abs(accel.x) + Math.abs(accel.y) < 40.0) return; 156 156 velocityX += accel.x * 4.0; 157 - velocityY += accel.z * 3.0; 157 + velocityY += accel.y * 3.0; 158 158 }; 159 159 160 160 self.ondevicemotion = shake;