From 4471105c2a2b47dd55e7a4a08038b97fc2051e6b Mon Sep 17 00:00:00 2001 From: Alaric Baraou Date: Fri, 20 Sep 2024 02:32:58 +0900 Subject: [PATCH 1/3] improve demo experience and upgrade to rapier 0.14.0 --- demo/package.json | 14 +- demo/src/App.tsx | 31 +- .../ActiveCollisionTypesExample.tsx | 2 + .../all-colliders/AllCollidersExample.tsx | 6 +- .../examples/all-shapes/AllShapesExample.tsx | 2 + .../examples/api-usage/ApiUsageExample.tsx | 3 +- .../examples/attractors/AttractorsExample.tsx | 2 + demo/src/examples/car/CarExample.tsx | 2 + demo/src/examples/cluster/ClusterExample.tsx | 2 + .../examples/colliders/CollidersExample.tsx | 2 + .../CollisionEventsExample.tsx | 4 +- .../examples/components/ComponentsExample.tsx | 2 + .../ContactForceEventsExample.tsx | 3 + .../contact-skin/ContactSkinExample.tsx | 2 + demo/src/examples/cradle/CradleExample.tsx | 2 + demo/src/examples/damping/DampingExample.tsx | 3 + .../DynamicTypeChangeExample.tsx | 2 + .../immutable-props/ImmutablePropsExample.tsx | 15 +- .../InstancedMeshesExample.tsx | 2 + .../InstancedMeshesCompoundExample.tsx | 3 + demo/src/examples/joints/JointsExample.tsx | 3 + .../examples/kinematics/KinematicsExample.tsx | 3 +- .../LockedTransformsExample.tsx | 10 +- .../manual-step/ManualStepExamples.tsx | 3 + .../MeshColliderExample.tsx | 3 +- .../performance/PeformanceExample.tsx | 3 + demo/src/examples/plinko/Plinko.tsx | 18 +- demo/src/examples/plinko/ShapesExample.tsx | 16 + .../examples/rope-joint/RopeJointExample.tsx | 3 + demo/src/examples/sensors/SensorsExample.tsx | 3 + .../src/examples/snapshot/SnapshotExample.tsx | 2 + demo/src/examples/spring/SpringExample.tsx | 6 +- .../examples/transforms/TransformsExample.tsx | 3 +- demo/src/hooks/resetOrbitControl.tsx | 32 + .../react-three-rapier-addons/package.json | 4 +- packages/react-three-rapier/CHANGELOG.md | 4 +- packages/react-three-rapier/package.json | 14 +- packages/react-three-rapier/src/types.ts | 2 +- yarn.lock | 1083 +++++++++-------- 39 files changed, 780 insertions(+), 539 deletions(-) create mode 100644 demo/src/hooks/resetOrbitControl.tsx diff --git a/demo/package.json b/demo/package.json index 14d67c24..137c271f 100644 --- a/demo/package.json +++ b/demo/package.json @@ -10,20 +10,20 @@ }, "dependencies": { "@react-three/csg": "1.1.5", - "@react-three/drei": "9.74.14", - "@react-three/fiber": "8.9.1", + "@react-three/drei": "9.112.0", + "@react-three/fiber": "8.17.7", "@react-three/rapier": "1.4.0", "@react-three/rapier-addons": "4.0.1", - "@types/three": "^0.152.1", - "leva": "0.9.34", - "r3f-perf": "6.4.2", + "@types/three": "^0.168.0", + "leva": "0.9.35", + "r3f-perf": "7.2.1", "react": "18.2.0", "react-dom": "18.2.0", "react-router-dom": "6.4.3", - "three": "0.146.0" + "three": "0.168.0" }, "devDependencies": { - "@vitejs/plugin-react": "^4.0.3", + "@vitejs/plugin-react": "^4.3.1", "typescript": "^4.6.3", "vite": "3.0.3" }, diff --git a/demo/src/App.tsx b/demo/src/App.tsx index 25b1cd41..ae3ff1d7 100644 --- a/demo/src/App.tsx +++ b/demo/src/App.tsx @@ -8,6 +8,8 @@ import { Suspense, createContext, useContext, + useEffect, + useRef, useState } from "react"; import { NavLink, NavLinkProps, Route, Routes } from "react-router-dom"; @@ -42,12 +44,17 @@ import { SpringExample } from "./examples/spring/SpringExample"; import { StutteringExample } from "./examples/stuttering/StutteringExample"; import { Transforms } from "./examples/transforms/TransformsExample"; import { ActiveCollisionTypesExample } from "./examples/active-collision-types/ActiveCollisionTypesExample"; +import { OrbitControls as OrbitControlsImpl } from "three-stdlib"; +import { resetOrbitControl } from "./hooks/resetOrbitControl"; -const demoContext = createContext<{ - setDebug?(f: boolean): void; - setPaused?(f: boolean): void; - setCameraEnabled?(f: boolean): void; -}>({}); +type DemoContextType = { + setDebug: (f: boolean) => void; + setPaused: (f: boolean) => void; + setCameraEnabled: (f: boolean) => void; + orbitControlRef: React.RefObject; +}; + +const demoContext = createContext>({}); export const useDemo = () => useContext(demoContext); @@ -123,7 +130,7 @@ const routes: Record = { spring: , "rope-joint": , "active-collision-types": , - "contact-skin": , + "contact-skin": }; export const App = () => { @@ -133,6 +140,9 @@ export const App = () => { const [interpolate, setInterpolate] = useState(true); const [physicsKey, setPhysicsKey] = useState(0); const [cameraEnabled, setCameraEnabled] = useState(true); + const orbitControlRef = useRef(null); + + resetOrbitControl(); const updatePhysicsKey = () => { setPhysicsKey((current) => current + 1); @@ -169,13 +179,18 @@ export const App = () => { /> - + diff --git a/demo/src/examples/active-collision-types/ActiveCollisionTypesExample.tsx b/demo/src/examples/active-collision-types/ActiveCollisionTypesExample.tsx index 8f319cb2..2177254e 100644 --- a/demo/src/examples/active-collision-types/ActiveCollisionTypesExample.tsx +++ b/demo/src/examples/active-collision-types/ActiveCollisionTypesExample.tsx @@ -3,6 +3,7 @@ import { Box, Sphere } from "@react-three/drei"; import { useFrame } from "@react-three/fiber"; import { RapierRigidBody, RigidBody } from "@react-three/rapier"; import { useRef, useState } from "react"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; const activeCollisionTypes = ActiveCollisionTypes.DEFAULT | ActiveCollisionTypes.KINEMATIC_FIXED; @@ -48,6 +49,7 @@ const Wall = () => { }; export const ActiveCollisionTypesExample = () => { + resetOrbitControl(10); return ( diff --git a/demo/src/examples/all-colliders/AllCollidersExample.tsx b/demo/src/examples/all-colliders/AllCollidersExample.tsx index c0496c67..d2d95575 100644 --- a/demo/src/examples/all-colliders/AllCollidersExample.tsx +++ b/demo/src/examples/all-colliders/AllCollidersExample.tsx @@ -19,6 +19,7 @@ import { useSuzanne } from "../all-shapes/AllShapesExample"; import { RoundedBoxGeometry } from "three-stdlib"; import { PlaneGeometry } from "three"; import { useEffect, useRef } from "react"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; const CuteBox = (props: Omit) => ( @@ -64,8 +65,7 @@ const heightFieldGeometry = new PlaneGeometry( ); heightField.forEach((v, index) => { - (heightFieldGeometry.attributes.position.array as number[])[index * 3 + 2] = - v; + heightFieldGeometry.attributes.position.array[index * 3 + 2] = v; }); heightFieldGeometry.scale(1, -1, 1); heightFieldGeometry.rotateX(-Math.PI / 2); @@ -82,6 +82,8 @@ export const AllCollidersExample = () => { console.log("roundCuboidCollider", roundCuboidCollider.current); }, []); + resetOrbitControl(30); + return ( diff --git a/demo/src/examples/all-shapes/AllShapesExample.tsx b/demo/src/examples/all-shapes/AllShapesExample.tsx index 9f20c6c0..3c9da590 100644 --- a/demo/src/examples/all-shapes/AllShapesExample.tsx +++ b/demo/src/examples/all-shapes/AllShapesExample.tsx @@ -12,6 +12,7 @@ import { import { Demo } from "../../App"; import { Mesh } from "three"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; export const useSuzanne = () => { // @ts-ignore @@ -61,6 +62,7 @@ const OffsetTorus = () => { export const AllShapesExample: Demo = () => { const { nodes } = useSuzanne(); + resetOrbitControl(); return ( <> diff --git a/demo/src/examples/api-usage/ApiUsageExample.tsx b/demo/src/examples/api-usage/ApiUsageExample.tsx index aba41bf6..aacba41a 100644 --- a/demo/src/examples/api-usage/ApiUsageExample.tsx +++ b/demo/src/examples/api-usage/ApiUsageExample.tsx @@ -2,10 +2,11 @@ import { Torus } from "@react-three/drei"; import { RigidBody, RapierRigidBody } from "@react-three/rapier"; import { useEffect, useRef } from "react"; import { Demo } from "../../App"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; export const ApiUsage: Demo = () => { const torus = useRef(null); - + resetOrbitControl(); useEffect(() => { if (torus.current) { torus.current.applyTorqueImpulse( diff --git a/demo/src/examples/attractors/AttractorsExample.tsx b/demo/src/examples/attractors/AttractorsExample.tsx index 29a088f0..36e460ff 100644 --- a/demo/src/examples/attractors/AttractorsExample.tsx +++ b/demo/src/examples/attractors/AttractorsExample.tsx @@ -9,11 +9,13 @@ import { RapierRigidBody } from "@react-three/rapier"; import { createRef, useEffect, useRef } from "react"; import { Demo } from "../../App"; import { Attractor } from "@react-three/rapier-addons"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; const BALLS = 100; export const AttractorExample: Demo = () => { const api = useRef(null); + resetOrbitControl(40); return ( diff --git a/demo/src/examples/car/CarExample.tsx b/demo/src/examples/car/CarExample.tsx index 27b7611a..d9f9fd03 100644 --- a/demo/src/examples/car/CarExample.tsx +++ b/demo/src/examples/car/CarExample.tsx @@ -8,6 +8,7 @@ import { } from "@react-three/rapier"; import { createRef, RefObject, useRef } from "react"; import { Demo } from "../../App"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; const WheelJoint = ({ body, @@ -48,6 +49,7 @@ export const Car: Demo = () => { const wheelRefs = useRef( wheelPositions.map(() => createRef()) ); + resetOrbitControl(30); return ( diff --git a/demo/src/examples/cluster/ClusterExample.tsx b/demo/src/examples/cluster/ClusterExample.tsx index 89c28fdc..a18f44d6 100644 --- a/demo/src/examples/cluster/ClusterExample.tsx +++ b/demo/src/examples/cluster/ClusterExample.tsx @@ -8,11 +8,13 @@ import { import { useEffect, useRef } from "react"; import { Color, InstancedMesh } from "three"; import { Demo } from "../../App"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; const BALLS = 1000; export const Cluster: Demo = () => { const api = useRef(null); + resetOrbitControl(); const { isPaused } = useRapier(); diff --git a/demo/src/examples/colliders/CollidersExample.tsx b/demo/src/examples/colliders/CollidersExample.tsx index c8417d69..549ac0ea 100644 --- a/demo/src/examples/colliders/CollidersExample.tsx +++ b/demo/src/examples/colliders/CollidersExample.tsx @@ -9,6 +9,7 @@ import { } from "@react-three/rapier"; import { useEffect, useRef } from "react"; import { Demo } from "../../App"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; const Ball = () => { const ball = useRef(null); @@ -40,6 +41,7 @@ const Ball = () => { export const Colliders: Demo = () => { const cuboid = useRef(null); + resetOrbitControl(30); useEffect(() => { console.log(cuboid.current); diff --git a/demo/src/examples/collision-events/CollisionEventsExample.tsx b/demo/src/examples/collision-events/CollisionEventsExample.tsx index e071b8f9..509ccf68 100644 --- a/demo/src/examples/collision-events/CollisionEventsExample.tsx +++ b/demo/src/examples/collision-events/CollisionEventsExample.tsx @@ -20,6 +20,7 @@ import { } from "react"; import { PlaneGeometry } from "three"; import { useSuzanne } from "../all-shapes/AllShapesExample"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; const Suzanne = ({ color }: { color: string }) => { const { nodes: suzanne } = useSuzanne(); @@ -51,7 +52,7 @@ const heightFieldGeometry = new PlaneGeometry( ); heightField.forEach((v, index) => { - (heightFieldGeometry.attributes.position.array as number[])[index * 3 + 2] = + (heightFieldGeometry.attributes.position.array)[index * 3 + 2] = v; }); heightFieldGeometry.scale(1, -1, 1); @@ -218,6 +219,7 @@ const Explosions = () => { export const CollisionEventsExample = () => { const [explosions, setExplosions] = useState([]); + resetOrbitControl(30); return ( diff --git a/demo/src/examples/components/ComponentsExample.tsx b/demo/src/examples/components/ComponentsExample.tsx index 1003875d..d64f1fb0 100644 --- a/demo/src/examples/components/ComponentsExample.tsx +++ b/demo/src/examples/components/ComponentsExample.tsx @@ -5,6 +5,7 @@ import { RigidBody, TrimeshCollider } from "@react-three/rapier"; import { GroupProps, Object3DNode, useFrame } from "@react-three/fiber"; import { Mesh } from "three"; import { Demo } from "../../App"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; const Map = () => { const { nodes } = useGLTF( @@ -88,6 +89,7 @@ const CompoundShape = () => { }; export const ComponentsExample: Demo = () => { + resetOrbitControl(); return ( diff --git a/demo/src/examples/contact-force-events/ContactForceEventsExample.tsx b/demo/src/examples/contact-force-events/ContactForceEventsExample.tsx index 47a6c0d8..e00c3ebf 100644 --- a/demo/src/examples/contact-force-events/ContactForceEventsExample.tsx +++ b/demo/src/examples/contact-force-events/ContactForceEventsExample.tsx @@ -9,6 +9,7 @@ import { import { useCallback, useRef, useState } from "react"; import { Color } from "three"; import { Demo } from "../../App"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; type BallProps = { onContactForce: RigidBodyProps["onContactForce"] }; const Ball = ({ onContactForce }: BallProps) => { @@ -63,6 +64,8 @@ export const ContactForceEventsExample: Demo = () => { [] ); + resetOrbitControl(10); + // magic number: this is the start force for where the ball drops from // and is used to calculate the color change const startForce = 6500; diff --git a/demo/src/examples/contact-skin/ContactSkinExample.tsx b/demo/src/examples/contact-skin/ContactSkinExample.tsx index ade7b7d5..3426e599 100644 --- a/demo/src/examples/contact-skin/ContactSkinExample.tsx +++ b/demo/src/examples/contact-skin/ContactSkinExample.tsx @@ -1,6 +1,7 @@ import { Box, Sphere } from "@react-three/drei"; import { RapierRigidBody, RigidBody } from "@react-three/rapier"; import { useRef } from "react"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; const Ball = () => { const rb = useRef(null); @@ -25,6 +26,7 @@ const Floor = () => { }; export const ContactSkinExample = () => { + resetOrbitControl(10); return ( diff --git a/demo/src/examples/cradle/CradleExample.tsx b/demo/src/examples/cradle/CradleExample.tsx index 45d24ba4..e888cf79 100644 --- a/demo/src/examples/cradle/CradleExample.tsx +++ b/demo/src/examples/cradle/CradleExample.tsx @@ -9,6 +9,7 @@ import { } from "@react-three/rapier"; import { useRef } from "react"; import { Demo } from "../../App"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; const Rod = (props: RigidBodyOptions) => { const anchor = useRef(null); @@ -44,6 +45,7 @@ const Rod = (props: RigidBodyOptions) => { }; export const CradleExample: Demo = () => { + resetOrbitControl(); return ( diff --git a/demo/src/examples/damping/DampingExample.tsx b/demo/src/examples/damping/DampingExample.tsx index 2e5096bc..58a0f83b 100644 --- a/demo/src/examples/damping/DampingExample.tsx +++ b/demo/src/examples/damping/DampingExample.tsx @@ -2,6 +2,7 @@ import { Box, Sphere, useTexture } from "@react-three/drei"; import { RigidBody } from "@react-three/rapier"; import { RepeatWrapping } from "three"; import { Demo } from "../../App"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; export const Damping: Demo = () => { const floor = useTexture(new URL("./white.png", import.meta.url).toString()); @@ -12,6 +13,8 @@ export const Damping: Demo = () => { const balls = Array.from(Array(10).keys()); + resetOrbitControl(40, [0, 0.25, 0.75]); + return ( <> diff --git a/demo/src/examples/dynamic-type-change/DynamicTypeChangeExample.tsx b/demo/src/examples/dynamic-type-change/DynamicTypeChangeExample.tsx index 98439cfa..a36fe0e1 100644 --- a/demo/src/examples/dynamic-type-change/DynamicTypeChangeExample.tsx +++ b/demo/src/examples/dynamic-type-change/DynamicTypeChangeExample.tsx @@ -4,6 +4,7 @@ import { RapierRigidBody, RigidBody } from "@react-three/rapier"; import { useEffect, useRef, useState } from "react"; import { useDemo } from "../../App"; import { useSuzanne } from "../all-shapes/AllShapesExample"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; export const DynamicTypeChangeExample = () => { const { setCameraEnabled } = useDemo(); @@ -18,6 +19,7 @@ export const DynamicTypeChangeExample = () => { } = useSuzanne(); const { mouse } = useThree(); + resetOrbitControl(30); useEffect(() => { if (dragging) { diff --git a/demo/src/examples/immutable-props/ImmutablePropsExample.tsx b/demo/src/examples/immutable-props/ImmutablePropsExample.tsx index 40b2deae..61367f5c 100644 --- a/demo/src/examples/immutable-props/ImmutablePropsExample.tsx +++ b/demo/src/examples/immutable-props/ImmutablePropsExample.tsx @@ -1,20 +1,15 @@ -import { Box, Sphere, Torus } from "@react-three/drei"; +import { Box } from "@react-three/drei"; import { useFrame } from "@react-three/fiber"; -import { - MeshCollider, - RapierRigidBody, - RigidBody, - euler, - quat -} from "@react-three/rapier"; +import { RapierRigidBody, RigidBody, euler, quat } from "@react-three/rapier"; import { Demo } from "../../App"; -import { useEffect, useRef, useState } from "react"; +import { useRef, useState } from "react"; import { useControls } from "leva"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; export const ImmutablePropsExample: Demo = () => { const [canSleep, setCanSleep] = useState(true); const rb = useRef(null); - + resetOrbitControl(30); useControls({ canSleep: { value: canSleep, diff --git a/demo/src/examples/instanced-meshes/InstancedMeshesExample.tsx b/demo/src/examples/instanced-meshes/InstancedMeshesExample.tsx index 626be9fa..8e5e1ec7 100644 --- a/demo/src/examples/instanced-meshes/InstancedMeshesExample.tsx +++ b/demo/src/examples/instanced-meshes/InstancedMeshesExample.tsx @@ -8,6 +8,7 @@ import { Color, InstancedMesh } from "three"; import { useSuzanne } from "../all-shapes/AllShapesExample"; import { Demo } from "../../App"; import { button, useControls } from "leva"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; const MAX_COUNT = 2000; @@ -26,6 +27,7 @@ export const InstancedMeshes: Demo = () => { const { nodes: { Suzanne } } = useSuzanne(); + resetOrbitControl(30); const api = useRef([]); diff --git a/demo/src/examples/instances-meshes-compound/InstancedMeshesCompoundExample.tsx b/demo/src/examples/instances-meshes-compound/InstancedMeshesCompoundExample.tsx index 2879a7d2..2c1d395d 100644 --- a/demo/src/examples/instances-meshes-compound/InstancedMeshesCompoundExample.tsx +++ b/demo/src/examples/instances-meshes-compound/InstancedMeshesCompoundExample.tsx @@ -8,6 +8,7 @@ import { useEffect, useRef } from "react"; import { useSuzanne } from "../all-shapes/AllShapesExample"; import { Demo } from "../../App"; import { RapierRigidBody } from "@react-three/rapier"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; const COUNT = 300; @@ -16,6 +17,8 @@ export const InstancedMeshesCompound: Demo = () => { nodes: { Suzanne } } = useSuzanne(); + resetOrbitControl(30); + const api = useRef(null); const handleClickInstance = (evt: ThreeEvent) => { diff --git a/demo/src/examples/joints/JointsExample.tsx b/demo/src/examples/joints/JointsExample.tsx index 96478437..acae3809 100644 --- a/demo/src/examples/joints/JointsExample.tsx +++ b/demo/src/examples/joints/JointsExample.tsx @@ -19,6 +19,7 @@ import { useImperativeHandle } from "react"; import { useFrame } from "@react-three/fiber"; import { Demo } from "../../App"; import { Mesh, Quaternion } from "three"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; const ShadowElement = forwardRef((_, ref) => ( @@ -113,6 +114,8 @@ const PrismaticExample = () => { }; export const Joints: Demo = () => { + resetOrbitControl(); + return ( } /> diff --git a/demo/src/examples/kinematics/KinematicsExample.tsx b/demo/src/examples/kinematics/KinematicsExample.tsx index 93decea4..6f7f6b08 100644 --- a/demo/src/examples/kinematics/KinematicsExample.tsx +++ b/demo/src/examples/kinematics/KinematicsExample.tsx @@ -4,6 +4,7 @@ import { RigidBody, RapierRigidBody } from "@react-three/rapier"; import { useEffect, useRef } from "react"; import { Euler, Quaternion } from "three"; import { Demo } from "../../App"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; const Ball = () => { const ball = useRef(null); @@ -32,7 +33,7 @@ const Ball = () => { export const Kinematics: Demo = () => { const torus = useRef(null); const platform = useRef(null); - + resetOrbitControl(30); useFrame(() => { const now = performance.now(); diff --git a/demo/src/examples/locked-transforms/LockedTransformsExample.tsx b/demo/src/examples/locked-transforms/LockedTransformsExample.tsx index 91954413..7e8d0c16 100644 --- a/demo/src/examples/locked-transforms/LockedTransformsExample.tsx +++ b/demo/src/examples/locked-transforms/LockedTransformsExample.tsx @@ -1,11 +1,11 @@ -import { Box, Html, Sphere, Torus } from "@react-three/drei"; -import { useFrame } from "@react-three/fiber"; -import { RigidBody, RapierRigidBody } from "@react-three/rapier"; -import { useControls } from "leva"; -import { useEffect, useRef } from "react"; +import { Html, Torus } from "@react-three/drei"; +import { RigidBody } from "@react-three/rapier"; import { Demo } from "../../App"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; export const LockedTransformsExample: Demo = () => { + resetOrbitControl(30); + return ( { const { setPaused } = useDemo(); @@ -38,6 +39,8 @@ export const ManualStepExample = () => { console.log("after step", steps.current.after); }); + resetOrbitControl(30); + return ( diff --git a/demo/src/examples/mesh-collider-test/MeshColliderExample.tsx b/demo/src/examples/mesh-collider-test/MeshColliderExample.tsx index 2be94ba4..a865ff75 100644 --- a/demo/src/examples/mesh-collider-test/MeshColliderExample.tsx +++ b/demo/src/examples/mesh-collider-test/MeshColliderExample.tsx @@ -1,9 +1,10 @@ import { Box, Sphere, Torus } from "@react-three/drei"; -import { useFrame } from "@react-three/fiber"; import { MeshCollider, RigidBody } from "@react-three/rapier"; import { Demo } from "../../App"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; export const MeshColliderTest: Demo = () => { + resetOrbitControl(30); return ( diff --git a/demo/src/examples/performance/PeformanceExample.tsx b/demo/src/examples/performance/PeformanceExample.tsx index 4bce9144..461c2ad6 100644 --- a/demo/src/examples/performance/PeformanceExample.tsx +++ b/demo/src/examples/performance/PeformanceExample.tsx @@ -6,6 +6,7 @@ import { ReactNode, useEffect, useRef, useState } from "react"; import { Mesh } from "three"; import { GLTF } from "three-stdlib"; import { useSuzanne } from "../all-shapes/AllShapesExample"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; const useBendy = () => { return useGLTF( @@ -111,6 +112,8 @@ const Bendy = (props: GroupProps) => { }; export const PerformanceExample = () => { + resetOrbitControl(15); + return ( diff --git a/demo/src/examples/plinko/Plinko.tsx b/demo/src/examples/plinko/Plinko.tsx index 8933f3c6..bd647347 100644 --- a/demo/src/examples/plinko/Plinko.tsx +++ b/demo/src/examples/plinko/Plinko.tsx @@ -2,12 +2,13 @@ Auto-generated by: https://github.com/pmndrs/gltfjsx */ -import * as THREE from "three"; import { useGLTF } from "@react-three/drei"; import type { GLTF } from "three-stdlib"; -import { useRef } from "react"; +import { useEffect, useRef } from "react"; import { Group, Mesh, MeshPhysicalMaterial, MeshStandardMaterial } from "three"; import { RigidBody } from "@react-three/rapier"; +import { useDemo } from "../../App"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; type GLTFResult = GLTF & { nodes: { @@ -24,21 +25,25 @@ type GLTFResult = GLTF & { export default function Plinko({ ...props }: JSX.IntrinsicElements["group"]) { const group = useRef(null); + const { orbitControlRef } = useDemo(); const { nodes, materials } = useGLTF( // @ts-ignore new URL("../../models/plinko.glb", import.meta.url).toString() ) as unknown as GLTFResult; + resetOrbitControl(); + return ( - + @@ -63,7 +68,8 @@ export default function Plinko({ ...props }: JSX.IntrinsicElements["group"]) { diff --git a/demo/src/examples/plinko/ShapesExample.tsx b/demo/src/examples/plinko/ShapesExample.tsx index f161a7a3..7c99aeee 100644 --- a/demo/src/examples/plinko/ShapesExample.tsx +++ b/demo/src/examples/plinko/ShapesExample.tsx @@ -177,6 +177,22 @@ const Scene: FC = () => { convexMesh: button(() => addItem("convexMesh")) }); + useEffect(() => { + addItem("box"); + setTimeout(() => { + addItem("cylinder"); + }, 1000); + setTimeout(() => { + addItem("ball"); + }, 2000 + Math.random() * 500); + setTimeout(() => { + addItem("convexHull"); + }, 3000 + Math.random() * 500); + setTimeout(() => { + addItem("convexMesh"); + }, 4000 + Math.random() * 500); + }, []); + const addItem = (str: string) => { setItems((curr) => [...curr, str]); }; diff --git a/demo/src/examples/rope-joint/RopeJointExample.tsx b/demo/src/examples/rope-joint/RopeJointExample.tsx index 968a3b05..9ca4f43e 100644 --- a/demo/src/examples/rope-joint/RopeJointExample.tsx +++ b/demo/src/examples/rope-joint/RopeJointExample.tsx @@ -9,6 +9,7 @@ import { import { useRef } from "react"; import { Demo } from "../../App"; import { Vector3 } from "@react-three/fiber"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; const WALL_COLORS = ["#50514F", "#CBD4C2", "#FFFCFF", "#247BA0", "#C3B299"]; @@ -106,6 +107,8 @@ const RopeJoint = ({ }; export const RopeJointExample: Demo = () => { + resetOrbitControl(40, [0, 0.25, 0.75]); + return ( diff --git a/demo/src/examples/sensors/SensorsExample.tsx b/demo/src/examples/sensors/SensorsExample.tsx index 62b725f3..637601b3 100644 --- a/demo/src/examples/sensors/SensorsExample.tsx +++ b/demo/src/examples/sensors/SensorsExample.tsx @@ -8,6 +8,7 @@ import { } from "@react-three/rapier"; import { useEffect, useRef, useState } from "react"; import { MeshPhysicalMaterial } from "three"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; const material = new MeshPhysicalMaterial(); @@ -91,6 +92,8 @@ const Ball = () => { }; export const SensorsExample = () => { + resetOrbitControl(30); + return ( diff --git a/demo/src/examples/snapshot/SnapshotExample.tsx b/demo/src/examples/snapshot/SnapshotExample.tsx index 03bdde3f..2ad1ef04 100644 --- a/demo/src/examples/snapshot/SnapshotExample.tsx +++ b/demo/src/examples/snapshot/SnapshotExample.tsx @@ -6,6 +6,7 @@ import { Demo } from "../../App"; import React, { useRef } from "react"; import { useControls, button } from "leva"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; export const SnapshotExample: Demo = () => { const floor = useTexture( @@ -33,6 +34,7 @@ export const SnapshotExample: Demo = () => { setWorld(rapier.World.restoreSnapshot(worldSnapshot.current)) ) }); + resetOrbitControl(40, [0, 0.25, 0.75]); return ( <> diff --git a/demo/src/examples/spring/SpringExample.tsx b/demo/src/examples/spring/SpringExample.tsx index 29dd1a80..1267571c 100644 --- a/demo/src/examples/spring/SpringExample.tsx +++ b/demo/src/examples/spring/SpringExample.tsx @@ -10,6 +10,8 @@ import { forwardRef, useMemo, useRef } from "react"; import { Demo } from "../../App"; import { useForwardedRef } from "@react-three/rapier/src/hooks/use-forwarded-ref"; import { vectorArrayToVector3 } from "@react-three/rapier/src/utils/utils"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; +import { Vector3 } from "three"; const COLORS_ARR = ["#335C67", "#FFF3B0", "#E09F3E", "#9E2A2B", "#540B0E"]; @@ -42,7 +44,7 @@ const BallSpring = forwardRef( const dampingRatio = props.jointNum / (props.total / 2); const damping = dampingRatio * criticalDamping; - const ballPos = props.position as THREE.Vector3; + const ballPos = props.position as Vector3; if (!ballPos) { throw new Error("BallSpring requires a position prop"); @@ -85,6 +87,8 @@ export const SpringExample: Demo = () => { }); }, []); + resetOrbitControl(8); + return ( <> diff --git a/demo/src/examples/transforms/TransformsExample.tsx b/demo/src/examples/transforms/TransformsExample.tsx index e807579d..f352a0f2 100644 --- a/demo/src/examples/transforms/TransformsExample.tsx +++ b/demo/src/examples/transforms/TransformsExample.tsx @@ -3,10 +3,11 @@ import { RigidBody } from "@react-three/rapier"; import { useRef } from "react"; import { Group } from "three"; import { Demo } from "../../App"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; export const Transforms: Demo = () => { const group = useRef(null); - + resetOrbitControl(); return ( diff --git a/demo/src/hooks/resetOrbitControl.tsx b/demo/src/hooks/resetOrbitControl.tsx new file mode 100644 index 00000000..c615e1b8 --- /dev/null +++ b/demo/src/hooks/resetOrbitControl.tsx @@ -0,0 +1,32 @@ +import { useEffect } from "react"; +import { useDemo } from "../App"; +import { Vector3 } from "three"; + +const directionVector = new Vector3(); + +export const resetOrbitControl = (distance = 20, direction = [0, 0, 1]) => { + const { orbitControlRef } = useDemo(); + + useEffect(() => { + if ( + orbitControlRef?.current === undefined || + orbitControlRef?.current === null + ) + return; + const controls = orbitControlRef.current; + const camera = controls.object; // This is the camera that OrbitControls is controlling + // Get the current look-at target + const target = controls.target; + + // Calculate the direction vector from target to camera + directionVector.fromArray(direction).normalize(); + + // Set the new camera position + camera.position.copy(target).add(directionVector.multiplyScalar(distance)); + + // Update the controls + controls.update(); + }, [distance, direction]); + + return null; +}; diff --git a/packages/react-three-rapier-addons/package.json b/packages/react-three-rapier-addons/package.json index a282adf3..fcb91924 100644 --- a/packages/react-three-rapier-addons/package.json +++ b/packages/react-three-rapier-addons/package.json @@ -15,11 +15,11 @@ "three-stdlib": "2.23.9" }, "devDependencies": { - "@react-three/fiber": "8.9.1", + "@react-three/fiber": "8.17.7", "@react-three/rapier": "^1.3.1", "react": "18.2.0", "react-dom": "18.2.0", - "three": "0.146.0" + "three": "0.168.0" }, "repository": "https://github.com/pmndrs/react-three-rapier/tree/master/packages/react-three-rapier-addons" } diff --git a/packages/react-three-rapier/CHANGELOG.md b/packages/react-three-rapier/CHANGELOG.md index 33e417b4..39eb91c9 100644 --- a/packages/react-three-rapier/CHANGELOG.md +++ b/packages/react-three-rapier/CHANGELOG.md @@ -5,8 +5,8 @@ ### Minor Changes - a155277: feat: bump @dimforge/rapier3d-compat from 0.12.0 to 0.13.1 - - - See the rapier.js changelog for more information: https://github.com/dimforge/rapier.js/blob/master/CHANGELOG.md + + - See the rapier.js changelog for more information: https://github.com/dimforge/rapier.js/blob/master/CHANGELOG.md - Added World prop `lengthUnit` - Renamed World props `allowedLinearError` and `predictionDistance` to `normalizedAllowedLinearError` and `normalizedPredictionDistance`, matching upstream changes - Added `softCcdPrediction` RigidBody prop diff --git a/packages/react-three-rapier/package.json b/packages/react-three-rapier/package.json index b0299e48..2ed13e1f 100644 --- a/packages/react-three-rapier/package.json +++ b/packages/react-three-rapier/package.json @@ -10,17 +10,17 @@ ], "scripts": {}, "devDependencies": { - "@react-three/drei": "9.74.14", - "@react-three/fiber": "8.9.1", - "@react-three/test-renderer": "8.1.5", + "@react-three/drei": "9.112.0", + "@react-three/fiber": "8.17.7", + "@react-three/test-renderer": "8.2.1", "@types/react-dom": "18.0.2", - "@types/three": "^0.152.1", - "@vitejs/plugin-react": "^4.0.3", + "@types/three": "^0.168.0", + "@vitejs/plugin-react": "^4.3.1", "@vitest/ui": "0.32.0", "happy-dom": "9.19.2", "react": "18.2.0", "react-dom": "18.2.0", - "three": "0.146.0", + "three": "0.168.0", "vitest": "0.32.0" }, "peerDependencies": { @@ -29,7 +29,7 @@ "three": ">=0.139.0" }, "dependencies": { - "@dimforge/rapier3d-compat": "0.13.1", + "@dimforge/rapier3d-compat": "0.14.0", "suspend-react": "^0.1.3", "three-stdlib": "2.23.9" }, diff --git a/packages/react-three-rapier/src/types.ts b/packages/react-three-rapier/src/types.ts index eb53db46..57db7cef 100644 --- a/packages/react-three-rapier/src/types.ts +++ b/packages/react-three-rapier/src/types.ts @@ -460,7 +460,7 @@ export interface RigidBodyOptions extends ColliderProps { /** * The default active collision types for all colliders in this rigid body. * Can be customized per-collider. - * + * * Use `ActiveCollisionTypes` to specify which collision types should be active for this collider. * * @see https://rapier.rs/javascript3d/classes/Collider.html#setActiveCollisionTypes diff --git a/yarn.lock b/yarn.lock index 45668acf..03c23ea6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -25,7 +25,7 @@ dependencies: "@babel/highlight" "^7.18.6" -"@babel/code-frame@^7.10.4", "@babel/code-frame@^7.22.13": +"@babel/code-frame@^7.10.4": version "7.22.13" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e" integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w== @@ -33,15 +33,23 @@ "@babel/highlight" "^7.22.13" chalk "^2.4.2" +"@babel/code-frame@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.24.7.tgz#882fd9e09e8ee324e496bd040401c6f046ef4465" + integrity sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA== + dependencies: + "@babel/highlight" "^7.24.7" + picocolors "^1.0.0" + "@babel/compat-data@^7.17.7", "@babel/compat-data@^7.18.8", "@babel/compat-data@^7.19.3": version "7.19.3" resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.3.tgz" integrity sha512-prBHMK4JYYK+wDjJF1q99KK4JLL+egWS4nmNqdlMUgCExMZ+iZW0hGhyC3VEbsPjvaN0TBhW//VIFwBrk8sEiw== -"@babel/compat-data@^7.22.9": - version "7.23.2" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.23.2.tgz#6a12ced93455827037bfb5ed8492820d60fc32cc" - integrity sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ== +"@babel/compat-data@^7.25.2": + version "7.25.4" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.25.4.tgz#7d2a80ce229890edcf4cc259d4d696cb4dae2fcb" + integrity sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ== "@babel/core@^7.17.10", "@babel/core@^7.7.7": version "7.19.3" @@ -64,21 +72,21 @@ json5 "^2.2.1" semver "^6.3.0" -"@babel/core@^7.22.20": - version "7.23.2" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.2.tgz#ed10df0d580fff67c5f3ee70fd22e2e4c90a9f94" - integrity sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ== +"@babel/core@^7.24.5": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.25.2.tgz#ed8eec275118d7613e77a352894cd12ded8eba77" + integrity sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA== dependencies: "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.22.13" - "@babel/generator" "^7.23.0" - "@babel/helper-compilation-targets" "^7.22.15" - "@babel/helper-module-transforms" "^7.23.0" - "@babel/helpers" "^7.23.2" - "@babel/parser" "^7.23.0" - "@babel/template" "^7.22.15" - "@babel/traverse" "^7.23.2" - "@babel/types" "^7.23.0" + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.25.0" + "@babel/helper-compilation-targets" "^7.25.2" + "@babel/helper-module-transforms" "^7.25.2" + "@babel/helpers" "^7.25.0" + "@babel/parser" "^7.25.0" + "@babel/template" "^7.25.0" + "@babel/traverse" "^7.25.2" + "@babel/types" "^7.25.2" convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -94,14 +102,14 @@ "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" -"@babel/generator@^7.23.0": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.23.0.tgz#df5c386e2218be505b34837acbcb874d7a983420" - integrity sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g== +"@babel/generator@^7.25.0", "@babel/generator@^7.25.6": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.25.6.tgz#0df1ad8cb32fe4d2b01d8bf437f153d19342a87c" + integrity sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw== dependencies: - "@babel/types" "^7.23.0" - "@jridgewell/gen-mapping" "^0.3.2" - "@jridgewell/trace-mapping" "^0.3.17" + "@babel/types" "^7.25.6" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" jsesc "^2.5.1" "@babel/helper-annotate-as-pure@^7.18.6": @@ -129,14 +137,14 @@ browserslist "^4.21.3" semver "^6.3.0" -"@babel/helper-compilation-targets@^7.22.15": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz#0698fc44551a26cf29f18d4662d5bf545a6cfc52" - integrity sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw== +"@babel/helper-compilation-targets@^7.25.2": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.2.tgz#e1d9410a90974a3a5a66e84ff55ef62e3c02d06c" + integrity sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw== dependencies: - "@babel/compat-data" "^7.22.9" - "@babel/helper-validator-option" "^7.22.15" - browserslist "^4.21.9" + "@babel/compat-data" "^7.25.2" + "@babel/helper-validator-option" "^7.24.8" + browserslist "^4.23.1" lru-cache "^5.1.1" semver "^6.3.1" @@ -178,11 +186,6 @@ resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz" integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== -"@babel/helper-environment-visitor@^7.22.20": - version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" - integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== - "@babel/helper-explode-assignable-expression@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz" @@ -198,14 +201,6 @@ "@babel/template" "^7.18.10" "@babel/types" "^7.19.0" -"@babel/helper-function-name@^7.23.0": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz#1f9a3cdbd5b2698a670c30d2735f9af95ed52759" - integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== - dependencies: - "@babel/template" "^7.22.15" - "@babel/types" "^7.23.0" - "@babel/helper-hoist-variables@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz" @@ -213,13 +208,6 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-hoist-variables@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" - integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== - dependencies: - "@babel/types" "^7.22.5" - "@babel/helper-member-expression-to-functions@^7.18.9": version "7.18.9" resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz" @@ -234,12 +222,13 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-module-imports@^7.22.15": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz#16146307acdc40cc00c3b2c647713076464bdbf0" - integrity sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w== +"@babel/helper-module-imports@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz#f2f980392de5b84c3328fc71d38bd81bbb83042b" + integrity sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA== dependencies: - "@babel/types" "^7.22.15" + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" "@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.19.0": version "7.19.0" @@ -255,16 +244,15 @@ "@babel/traverse" "^7.19.0" "@babel/types" "^7.19.0" -"@babel/helper-module-transforms@^7.23.0": - version "7.23.0" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz#3ec246457f6c842c0aee62a01f60739906f7047e" - integrity sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw== +"@babel/helper-module-transforms@^7.25.2": + version "7.25.2" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.25.2.tgz#ee713c29768100f2776edf04d4eb23b8d27a66e6" + integrity sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ== dependencies: - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-module-imports" "^7.22.15" - "@babel/helper-simple-access" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/helper-validator-identifier" "^7.22.20" + "@babel/helper-module-imports" "^7.24.7" + "@babel/helper-simple-access" "^7.24.7" + "@babel/helper-validator-identifier" "^7.24.7" + "@babel/traverse" "^7.25.2" "@babel/helper-optimise-call-expression@^7.18.6": version "7.18.6" @@ -278,10 +266,10 @@ resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz" integrity sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw== -"@babel/helper-plugin-utils@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" - integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== +"@babel/helper-plugin-utils@^7.24.7": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz#94ee67e8ec0e5d44ea7baeb51e571bd26af07878" + integrity sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg== "@babel/helper-remap-async-to-generator@^7.18.6", "@babel/helper-remap-async-to-generator@^7.18.9": version "7.18.9" @@ -311,12 +299,13 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-simple-access@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de" - integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== +"@babel/helper-simple-access@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz#bcade8da3aec8ed16b9c4953b74e506b51b5edb3" + integrity sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg== dependencies: - "@babel/types" "^7.22.5" + "@babel/traverse" "^7.24.7" + "@babel/types" "^7.24.7" "@babel/helper-skip-transparent-expression-wrappers@^7.18.9": version "7.18.9" @@ -332,13 +321,6 @@ dependencies: "@babel/types" "^7.18.6" -"@babel/helper-split-export-declaration@^7.22.6": - version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" - integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== - dependencies: - "@babel/types" "^7.22.5" - "@babel/helper-string-parser@^7.18.10": version "7.18.10" resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz" @@ -349,6 +331,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== +"@babel/helper-string-parser@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz#5b3329c9a58803d5df425e5785865881a81ca48d" + integrity sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ== + "@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": version "7.19.1" resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz" @@ -359,15 +346,20 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== +"@babel/helper-validator-identifier@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db" + integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w== + "@babel/helper-validator-option@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz" integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== -"@babel/helper-validator-option@^7.22.15": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz#694c30dfa1d09a6534cdfcafbe56789d36aba040" - integrity sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA== +"@babel/helper-validator-option@^7.24.8": + version "7.24.8" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz#3725cdeea8b480e86d34df15304806a06975e33d" + integrity sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q== "@babel/helper-wrap-function@^7.18.9": version "7.19.0" @@ -388,14 +380,13 @@ "@babel/traverse" "^7.19.0" "@babel/types" "^7.19.0" -"@babel/helpers@^7.23.2": - version "7.23.2" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.2.tgz#2832549a6e37d484286e15ba36a5330483cac767" - integrity sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ== +"@babel/helpers@^7.25.0": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.25.6.tgz#57ee60141829ba2e102f30711ffe3afab357cc60" + integrity sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q== dependencies: - "@babel/template" "^7.22.15" - "@babel/traverse" "^7.23.2" - "@babel/types" "^7.23.0" + "@babel/template" "^7.25.0" + "@babel/types" "^7.25.6" "@babel/highlight@^7.18.6": version "7.18.6" @@ -415,7 +406,17 @@ chalk "^2.4.2" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.20.7", "@babel/parser@^7.22.15", "@babel/parser@^7.23.0": +"@babel/highlight@^7.24.7": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.24.7.tgz#a05ab1df134b286558aae0ed41e6c5f731bf409d" + integrity sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw== + dependencies: + "@babel/helper-validator-identifier" "^7.24.7" + chalk "^2.4.2" + js-tokens "^4.0.0" + picocolors "^1.0.0" + +"@babel/parser@^7.1.0", "@babel/parser@^7.20.7": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.23.0.tgz#da950e622420bf96ca0d0f2909cdddac3acd8719" integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== @@ -425,6 +426,13 @@ resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.19.3.tgz" integrity sha512-pJ9xOlNWHiy9+FuFP09DEAFbAn4JskgRsVcc169w2xRBC3FRGuQEwjeIMMND9L2zc0iEhO/tGv4Zq+km+hxNpQ== +"@babel/parser@^7.25.0", "@babel/parser@^7.25.6": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.6.tgz#85660c5ef388cbbf6e3d2a694ee97a38f18afe2f" + integrity sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q== + dependencies: + "@babel/types" "^7.25.6" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz" @@ -890,19 +898,19 @@ dependencies: "@babel/plugin-transform-react-jsx" "^7.18.6" -"@babel/plugin-transform-react-jsx-self@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.22.5.tgz#ca2fdc11bc20d4d46de01137318b13d04e481d8e" - integrity sha512-nTh2ogNUtxbiSbxaT4Ds6aXnXEipHweN9YRgOX/oNXdf0cCrGn/+2LozFa3lnPV5D90MkjhgckCPBrsoSc1a7g== +"@babel/plugin-transform-react-jsx-self@^7.24.5": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.24.7.tgz#66bff0248ea0b549972e733516ffad577477bdab" + integrity sha512-fOPQYbGSgH0HUp4UJO4sMBFjY6DuWq+2i8rixyUMb3CdGixs/gccURvYOAhajBdKDoGajFr3mUq5rH3phtkGzw== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" -"@babel/plugin-transform-react-jsx-source@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.22.5.tgz#49af1615bfdf6ed9d3e9e43e425e0b2b65d15b6c" - integrity sha512-yIiRO6yobeEIaI0RTbIr8iAK9FcBHLtZq0S89ZPjDLQXBA4xvghaKqI0etp/tF3htTM0sazJKKLz9oEiGRtu7w== +"@babel/plugin-transform-react-jsx-source@^7.24.1": + version "7.24.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.24.7.tgz#1198aab2548ad19582013815c938d3ebd8291ee3" + integrity sha512-J2z+MWzZHVOemyLweMqngXrgGC42jQ//R0KdxqkIz/OrbVIIlhFI3WigZ5fO+nwFvBlncr4MGapd8vTyc7RPNQ== dependencies: - "@babel/helper-plugin-utils" "^7.22.5" + "@babel/helper-plugin-utils" "^7.24.7" "@babel/plugin-transform-react-jsx@^7.18.6": version "7.19.0" @@ -1125,13 +1133,6 @@ dependencies: regenerator-runtime "^0.14.0" -"@babel/runtime@^7.13.10": - version "7.20.1" - resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.1.tgz" - integrity sha512-mrzLkl6U9YLF8qpqI7TB82PESyEGjm/0Ly91jG575eVxMMlb8fYfOXFZIJ8XfLrJZQbm7dlKry2bJmXBUEkdFg== - dependencies: - regenerator-runtime "^0.13.10" - "@babel/runtime@^7.20.1": version "7.23.5" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.5.tgz#11edb98f8aeec529b82b211028177679144242db" @@ -1148,14 +1149,14 @@ "@babel/parser" "^7.18.10" "@babel/types" "^7.18.10" -"@babel/template@^7.22.15": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" - integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== +"@babel/template@^7.25.0": + version "7.25.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.25.0.tgz#e733dc3134b4fede528c15bc95e89cb98c52592a" + integrity sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q== dependencies: - "@babel/code-frame" "^7.22.13" - "@babel/parser" "^7.22.15" - "@babel/types" "^7.22.15" + "@babel/code-frame" "^7.24.7" + "@babel/parser" "^7.25.0" + "@babel/types" "^7.25.0" "@babel/traverse@^7.19.0", "@babel/traverse@^7.19.1", "@babel/traverse@^7.19.3": version "7.19.3" @@ -1173,23 +1174,20 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/traverse@^7.23.2": - version "7.23.2" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8" - integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw== - dependencies: - "@babel/code-frame" "^7.22.13" - "@babel/generator" "^7.23.0" - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-function-name" "^7.23.0" - "@babel/helper-hoist-variables" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/parser" "^7.23.0" - "@babel/types" "^7.23.0" - debug "^4.1.0" +"@babel/traverse@^7.24.7", "@babel/traverse@^7.25.2": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.6.tgz#04fad980e444f182ecf1520504941940a90fea41" + integrity sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ== + dependencies: + "@babel/code-frame" "^7.24.7" + "@babel/generator" "^7.25.6" + "@babel/parser" "^7.25.6" + "@babel/template" "^7.25.0" + "@babel/types" "^7.25.6" + debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.0.0", "@babel/types@^7.20.7", "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0": +"@babel/types@^7.0.0", "@babel/types@^7.20.7": version "7.23.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.23.0.tgz#8c1f020c9df0e737e4e247c0619f58c68458aaeb" integrity sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg== @@ -1207,6 +1205,15 @@ "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" +"@babel/types@^7.24.7", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.6": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.6.tgz#893942ddb858f32ae7a004ec9d3a76b3463ef8e6" + integrity sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw== + dependencies: + "@babel/helper-string-parser" "^7.24.8" + "@babel/helper-validator-identifier" "^7.24.7" + to-fast-properties "^2.0.0" + "@changesets/apply-release-plan@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@changesets/apply-release-plan/-/apply-release-plan-7.0.0.tgz#ce3c3dfc5720550a5d592b54ad2f411f816ec5ff" @@ -1595,10 +1602,10 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@dimforge/rapier3d-compat@0.13.1": - version "0.13.1" - resolved "https://registry.yarnpkg.com/@dimforge/rapier3d-compat/-/rapier3d-compat-0.13.1.tgz#d9da32941de5fcfae55ffb6ac26c38539f57ddf4" - integrity sha512-SsQ/MTH4Vvs8f62g31iVV1VOmzwNwsJl91rVzafi5B2mCrI2OsQ3VyjJOb4/tvS5VNc6OLjIDgfClcOAkW+O2A== +"@dimforge/rapier3d-compat@0.14.0": + version "0.14.0" + resolved "https://registry.yarnpkg.com/@dimforge/rapier3d-compat/-/rapier3d-compat-0.14.0.tgz#c6148f743aa99de320231527c466c1a48ada4c9f" + integrity sha512-/uHrUzS+CRQ+NQrrJCEDUkhwHlNsAAexbNXgbN9sHY+GwR+SFFAFrxRr8Llf5/AJZzqiLANdQIfJ63Cw4gJVqw== "@esbuild/android-arm64@0.17.14": version "0.17.14" @@ -1715,6 +1722,33 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.17.14.tgz#e81fb49de05fed91bf74251c9ca0343f4fc77d31" integrity sha512-gPQmsi2DKTaEgG14hc3CHXHp62k8g6qr0Pas+I4lUxRMugGSATh/Bi8Dgusoz9IQ0IfdrvLpco6kujEIBoaogA== +"@floating-ui/core@^1.6.0": + version "1.6.8" + resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.6.8.tgz#aa43561be075815879305965020f492cdb43da12" + integrity sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA== + dependencies: + "@floating-ui/utils" "^0.2.8" + +"@floating-ui/dom@^1.0.0": + version "1.6.11" + resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.6.11.tgz#8631857838d34ee5712339eb7cbdfb8ad34da723" + integrity sha512-qkMCxSR24v2vGkhYDo/UzxfJN3D4syqSjyuTFz6C7XcpU1pASPRieNI0Kj5VP3/503mOfYiGY891ugBX1GlABQ== + dependencies: + "@floating-ui/core" "^1.6.0" + "@floating-ui/utils" "^0.2.8" + +"@floating-ui/react-dom@^2.0.0": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@floating-ui/react-dom/-/react-dom-2.1.2.tgz#a1349bbf6a0e5cb5ded55d023766f20a4d439a31" + integrity sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A== + dependencies: + "@floating-ui/dom" "^1.0.0" + +"@floating-ui/utils@^0.2.8": + version "0.2.8" + resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.8.tgz#21a907684723bbbaa5f0974cf7730bd797eb8e62" + integrity sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig== + "@jridgewell/gen-mapping@^0.1.0": version "0.1.1" resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz" @@ -1732,6 +1766,15 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" +"@jridgewell/gen-mapping@^0.3.5": + version "0.3.5" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + dependencies: + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.24" + "@jridgewell/resolve-uri@^3.0.3": version "3.1.0" resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz" @@ -1747,6 +1790,11 @@ resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.2.1.tgz#558fb6472ed16a4c850b889530e6b36438c49280" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== + "@jridgewell/source-map@^0.3.2": version "0.3.2" resolved "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz" @@ -1773,10 +1821,10 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@jridgewell/trace-mapping@^0.3.17": - version "0.3.19" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz#f8a3249862f91be48d3127c3cfe992f79b4b8811" - integrity sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw== +"@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz#15f190e98895f3fc23276ee14bc76b675c2e50f0" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== dependencies: "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" @@ -1831,10 +1879,17 @@ globby "^11.0.0" read-yaml-file "^1.1.0" -"@mediapipe/tasks-vision@0.10.2-rc2": - version "0.10.2-rc2" - resolved "https://registry.yarnpkg.com/@mediapipe/tasks-vision/-/tasks-vision-0.10.2-rc2.tgz#e3fa5d84d58b9031a0e975d1e5ef8eb8e4a6fc11" - integrity sha512-b9ar6TEUo8I07n/jXSuKDu5HgzkDah9pe4H8BYpcubhCEahlfDD5ixE+9SQyJM4HXHXdF9nN/wRQT7rEnLz7Gg== +"@mediapipe/tasks-vision@0.10.8": + version "0.10.8" + resolved "https://registry.yarnpkg.com/@mediapipe/tasks-vision/-/tasks-vision-0.10.8.tgz#a78e137018a19933b7a1d0e887d553d4ab833d10" + integrity sha512-Rp7ll8BHrKB3wXaRFKhrltwZl1CiXGdibPxuWXvqGnKTnv8fqa/nvftYNuSbf+pbJWKYCXdBtYTITdAUTGGh0Q== + +"@monogrid/gainmap-js@^3.0.5": + version "3.0.6" + resolved "https://registry.yarnpkg.com/@monogrid/gainmap-js/-/gainmap-js-3.0.6.tgz#21e4a7188ce9845527a480e8c7ac7894323095bc" + integrity sha512-ireqJg7cw0tUn/JePDG8rAL7RyXgUKSDbjYdiygkrnye1WuKGLAWDBwF/ICwCwJ9iZBAF5caU8gSu+c34HLGdQ== + dependencies: + promise-worker-transferable "^1.0.4" "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -1915,209 +1970,164 @@ pirates "^4.0.1" source-map-support "^0.5.16" -"@radix-ui/popper@0.1.0": - version "0.1.0" - resolved "https://registry.npmjs.org/@radix-ui/popper/-/popper-0.1.0.tgz" - integrity sha512-uzYeElL3w7SeNMuQpXiFlBhTT+JyaNMCwDfjKkrzugEcYrf5n52PHqncNdQPUtR42hJh8V9FsqyEDbDxkeNjJQ== - dependencies: - "@babel/runtime" "^7.13.10" - csstype "^3.0.4" - -"@radix-ui/primitive@0.1.0": - version "0.1.0" - resolved "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-0.1.0.tgz" - integrity sha512-tqxZKybwN5Fa3VzZry4G6mXAAb9aAqKmPtnVbZpL0vsBwvOHTBwsjHVPXylocYLwEtBY9SCe665bYnNB515uoA== - dependencies: - "@babel/runtime" "^7.13.10" - -"@radix-ui/react-arrow@0.1.3": - version "0.1.3" - resolved "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-0.1.3.tgz" - integrity sha512-9x1gRYdlUD5OUwY7L+M+4FY/YltDSsrNSj8QXGPbxZxL5ghWXB/4lhyIGccCwk/e8ggfmQYv9SRNmn3LavPo3A== - dependencies: - "@babel/runtime" "^7.13.10" - "@radix-ui/react-primitive" "0.1.3" +"@radix-ui/primitive@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/primitive/-/primitive-1.1.0.tgz#42ef83b3b56dccad5d703ae8c42919a68798bbe2" + integrity sha512-4Z8dn6Upk0qk4P74xBhZ6Hd/w0mPEzOOLxy4xiPXOXqjF7jZS0VAKk7/x/H6FyY2zCkYJqePf1G5KmkmNJ4RBA== -"@radix-ui/react-compose-refs@0.1.0": - version "0.1.0" - resolved "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-0.1.0.tgz" - integrity sha512-eyclbh+b77k+69Dk72q3694OHrn9B3QsoIRx7ywX341U9RK1ThgQjMFZoPtmZNQTksXHLNEiefR8hGVeFyInGg== +"@radix-ui/react-arrow@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-arrow/-/react-arrow-1.1.0.tgz#744f388182d360b86285217e43b6c63633f39e7a" + integrity sha512-FmlW1rCg7hBpEBwFbjHwCW6AmWLQM6g/v0Sn8XbP9NvmSZ2San1FpQeyPtufzOMSIx7Y4dzjlHoifhp+7NkZhw== dependencies: - "@babel/runtime" "^7.13.10" + "@radix-ui/react-primitive" "2.0.0" -"@radix-ui/react-context@0.1.1": - version "0.1.1" - resolved "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-0.1.1.tgz" - integrity sha512-PkyVX1JsLBioeu0jB9WvRpDBBLtLZohVDT3BB5CTSJqActma8S8030P57mWZb4baZifMvN7KKWPAA40UmWKkQg== - dependencies: - "@babel/runtime" "^7.13.10" +"@radix-ui/react-compose-refs@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.0.tgz#656432461fc8283d7b591dcf0d79152fae9ecc74" + integrity sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw== -"@radix-ui/react-icons@^1.0.3": - version "1.1.1" - resolved "https://registry.npmjs.org/@radix-ui/react-icons/-/react-icons-1.1.1.tgz" - integrity sha512-xc3wQC59rsFylVbSusQCrrM+6695ppF730Q6yqzhRdqDcRNWIm2R6ngpzBoSOQMcwnq4p805F+Gr7xo4fmtN1A== +"@radix-ui/react-context@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-context/-/react-context-1.1.0.tgz#6df8d983546cfd1999c8512f3a8ad85a6e7fcee8" + integrity sha512-OKrckBy+sMEgYM/sMmqmErVn0kZqrHPJze+Ql3DzYsDDp0hl0L62nx/2122/Bvps1qz645jlcu2tD9lrRSdf8A== -"@radix-ui/react-id@0.1.4": - version "0.1.4" - resolved "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-0.1.4.tgz" - integrity sha512-/hq5m/D0ZfJWOS7TLF+G0l08KDRs87LBE46JkAvgKkg1fW4jkucx9At9D9vauIPSbdNmww5kXEp566hMlA8eXA== +"@radix-ui/react-dismissable-layer@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.0.tgz#2cd0a49a732372513733754e6032d3fb7988834e" + integrity sha512-/UovfmmXGptwGcBQawLzvn2jOfM0t4z3/uKffoBlj724+n3FvBbZ7M0aaBOmkp6pqFYpO4yx8tSVJjx3Fl2jig== dependencies: - "@babel/runtime" "^7.13.10" - "@radix-ui/react-use-layout-effect" "0.1.0" + "@radix-ui/primitive" "1.1.0" + "@radix-ui/react-compose-refs" "1.1.0" + "@radix-ui/react-primitive" "2.0.0" + "@radix-ui/react-use-callback-ref" "1.1.0" + "@radix-ui/react-use-escape-keydown" "1.1.0" -"@radix-ui/react-popper@0.1.3": - version "0.1.3" - resolved "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-0.1.3.tgz" - integrity sha512-2OV2YaJv7iTZexJY3HJ7B6Fs1A/3JXd3fRGU4JY0guACfGMD1C/jSgds505MKQOTiHE/quI6j3/q8yfzFjJR9g== - dependencies: - "@babel/runtime" "^7.13.10" - "@radix-ui/popper" "0.1.0" - "@radix-ui/react-arrow" "0.1.3" - "@radix-ui/react-compose-refs" "0.1.0" - "@radix-ui/react-context" "0.1.1" - "@radix-ui/react-primitive" "0.1.3" - "@radix-ui/react-use-rect" "0.1.1" - "@radix-ui/react-use-size" "0.1.0" - "@radix-ui/rect" "0.1.1" - -"@radix-ui/react-portal@0.1.3": - version "0.1.3" - resolved "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-0.1.3.tgz" - integrity sha512-DrV+sPYLs0HhmX5/b7yRT6nLM9Nl6FtQe2KUG+46kiCOKQ+0XzNMO5hmeQtyq0mRf/qlC02rFu6OMsWpIqVsJg== - dependencies: - "@babel/runtime" "^7.13.10" - "@radix-ui/react-primitive" "0.1.3" - "@radix-ui/react-use-layout-effect" "0.1.0" +"@radix-ui/react-icons@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-icons/-/react-icons-1.3.0.tgz#c61af8f323d87682c5ca76b856d60c2312dbcb69" + integrity sha512-jQxj/0LKgp+j9BiTXz3O3sgs26RNet2iLWmsPyRz2SIcR4q/4SbazXfnYwbAr+vLYKSfc7qxzyGQA1HLlYiuNw== -"@radix-ui/react-portal@^0.1.3": - version "0.1.4" - resolved "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-0.1.4.tgz" - integrity sha512-MO0wRy2eYRTZ/CyOri9NANCAtAtq89DEtg90gicaTlkCfdqCLEBsLb+/q66BZQTr3xX/Vq01nnVfc/TkCqoqvw== +"@radix-ui/react-id@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-id/-/react-id-1.1.0.tgz#de47339656594ad722eb87f94a6b25f9cffae0ed" + integrity sha512-EJUrI8yYh7WOjNOqpoJaf1jlFIH2LvtgAl+YcFqNCa+4hj64ZXmPkAKOFs/ukjz3byN6bdb/AVUqHkI8/uWWMA== dependencies: - "@babel/runtime" "^7.13.10" - "@radix-ui/react-primitive" "0.1.4" - "@radix-ui/react-use-layout-effect" "0.1.0" + "@radix-ui/react-use-layout-effect" "1.1.0" -"@radix-ui/react-presence@0.1.1": - version "0.1.1" - resolved "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-0.1.1.tgz" - integrity sha512-LsL+NcWDpFUAYCmXeH02o4pgqcSLpwxP84UIjCtpIKrsPe2vLuhcp79KC/jZJeXz+of2lUpMAxpM+eCpxFZtlg== +"@radix-ui/react-popper@1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-popper/-/react-popper-1.2.0.tgz#a3e500193d144fe2d8f5d5e60e393d64111f2a7a" + integrity sha512-ZnRMshKF43aBxVWPWvbj21+7TQCvhuULWJ4gNIKYpRlQt5xGRhLx66tMp8pya2UkGHTSlhpXwmjqltDYHhw7Vg== + dependencies: + "@floating-ui/react-dom" "^2.0.0" + "@radix-ui/react-arrow" "1.1.0" + "@radix-ui/react-compose-refs" "1.1.0" + "@radix-ui/react-context" "1.1.0" + "@radix-ui/react-primitive" "2.0.0" + "@radix-ui/react-use-callback-ref" "1.1.0" + "@radix-ui/react-use-layout-effect" "1.1.0" + "@radix-ui/react-use-rect" "1.1.0" + "@radix-ui/react-use-size" "1.1.0" + "@radix-ui/rect" "1.1.0" + +"@radix-ui/react-portal@1.1.1", "@radix-ui/react-portal@^1.0.2": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@radix-ui/react-portal/-/react-portal-1.1.1.tgz#1957f1eb2e1aedfb4a5475bd6867d67b50b1d15f" + integrity sha512-A3UtLk85UtqhzFqtoC8Q0KvR2GbXF3mtPgACSazajqq6A41mEQgo53iPzY4i6BwDxlIFqWIhiQ2G729n+2aw/g== dependencies: - "@babel/runtime" "^7.13.10" - "@radix-ui/react-compose-refs" "0.1.0" - "@radix-ui/react-use-layout-effect" "0.1.0" + "@radix-ui/react-primitive" "2.0.0" + "@radix-ui/react-use-layout-effect" "1.1.0" -"@radix-ui/react-primitive@0.1.3": - version "0.1.3" - resolved "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.3.tgz" - integrity sha512-fcyADaaAx2jdqEDLsTs6aX50S3L1c9K9CC6XMpJpuXFJCU4n9PGTFDZRtY2gAoXXoRCPIBsklCopSmGb6SsDjQ== +"@radix-ui/react-presence@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-presence/-/react-presence-1.1.0.tgz#227d84d20ca6bfe7da97104b1a8b48a833bfb478" + integrity sha512-Gq6wuRN/asf9H/E/VzdKoUtT8GC9PQc9z40/vEr0VCJ4u5XvvhWIrSsCB6vD2/cH7ugTdSfYq9fLJCcM00acrQ== dependencies: - "@babel/runtime" "^7.13.10" - "@radix-ui/react-slot" "0.1.2" + "@radix-ui/react-compose-refs" "1.1.0" + "@radix-ui/react-use-layout-effect" "1.1.0" -"@radix-ui/react-primitive@0.1.4": - version "0.1.4" - resolved "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-0.1.4.tgz" - integrity sha512-6gSl2IidySupIMJFjYnDIkIWRyQdbu/AHK7rbICPani+LW4b0XdxBXc46og/iZvuwW8pjCS8I2SadIerv84xYA== +"@radix-ui/react-primitive@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-primitive/-/react-primitive-2.0.0.tgz#fe05715faa9203a223ccc0be15dc44b9f9822884" + integrity sha512-ZSpFm0/uHa8zTvKBDjLFWLo8dkr4MBsiDLz0g3gMUwqgLHz9rTaRRGYDgvZPtBJgYCBKXkS9fzmoySgr8CO6Cw== dependencies: - "@babel/runtime" "^7.13.10" - "@radix-ui/react-slot" "0.1.2" + "@radix-ui/react-slot" "1.1.0" -"@radix-ui/react-slot@0.1.2": - version "0.1.2" - resolved "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-0.1.2.tgz" - integrity sha512-ADkqfL+agEzEguU3yS26jfB50hRrwf7U4VTwAOZEmi/g+ITcBWe12yM46ueS/UCIMI9Py+gFUaAdxgxafFvY2Q== - dependencies: - "@babel/runtime" "^7.13.10" - "@radix-ui/react-compose-refs" "0.1.0" - -"@radix-ui/react-tooltip@0.1.6": - version "0.1.6" - resolved "https://registry.npmjs.org/@radix-ui/react-tooltip/-/react-tooltip-0.1.6.tgz" - integrity sha512-0uaRpRmTCQo5yMUkDpv4LEDnaQDoeLXcNNhZonCZdbZBQ7ntvjURIWIigq1/pXZp0UX7oPpFzsXD9jUp8JT0WA== - dependencies: - "@babel/runtime" "^7.13.10" - "@radix-ui/primitive" "0.1.0" - "@radix-ui/react-compose-refs" "0.1.0" - "@radix-ui/react-context" "0.1.1" - "@radix-ui/react-id" "0.1.4" - "@radix-ui/react-popper" "0.1.3" - "@radix-ui/react-portal" "0.1.3" - "@radix-ui/react-presence" "0.1.1" - "@radix-ui/react-primitive" "0.1.3" - "@radix-ui/react-slot" "0.1.2" - "@radix-ui/react-use-controllable-state" "0.1.0" - "@radix-ui/react-use-escape-keydown" "0.1.0" - "@radix-ui/react-use-previous" "0.1.0" - "@radix-ui/react-use-rect" "0.1.1" - "@radix-ui/react-visually-hidden" "0.1.3" - -"@radix-ui/react-use-callback-ref@0.1.0": - version "0.1.0" - resolved "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-0.1.0.tgz" - integrity sha512-Va041McOFFl+aV+sejvl0BS2aeHx86ND9X/rVFmEFQKTXCp6xgUK0NGUAGcgBlIjnJSbMYPGEk1xKSSlVcN2Aw== +"@radix-ui/react-slot@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-slot/-/react-slot-1.1.0.tgz#7c5e48c36ef5496d97b08f1357bb26ed7c714b84" + integrity sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw== dependencies: - "@babel/runtime" "^7.13.10" + "@radix-ui/react-compose-refs" "1.1.0" -"@radix-ui/react-use-controllable-state@0.1.0": - version "0.1.0" - resolved "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-0.1.0.tgz" - integrity sha512-zv7CX/PgsRl46a52Tl45TwqwVJdmqnlQEQhaYMz/yBOD2sx2gCkCFSoF/z9mpnYWmS6DTLNTg5lIps3fV6EnXg== - dependencies: - "@babel/runtime" "^7.13.10" - "@radix-ui/react-use-callback-ref" "0.1.0" +"@radix-ui/react-tooltip@^1.0.5": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@radix-ui/react-tooltip/-/react-tooltip-1.1.2.tgz#c42db2ffd7dcc6ff3d65407c8cb70490288f518d" + integrity sha512-9XRsLwe6Yb9B/tlnYCPVUd/TFS4J7HuOZW345DCeC6vKIxQGMZdx21RK4VoZauPD5frgkXTYVS5y90L+3YBn4w== + dependencies: + "@radix-ui/primitive" "1.1.0" + "@radix-ui/react-compose-refs" "1.1.0" + "@radix-ui/react-context" "1.1.0" + "@radix-ui/react-dismissable-layer" "1.1.0" + "@radix-ui/react-id" "1.1.0" + "@radix-ui/react-popper" "1.2.0" + "@radix-ui/react-portal" "1.1.1" + "@radix-ui/react-presence" "1.1.0" + "@radix-ui/react-primitive" "2.0.0" + "@radix-ui/react-slot" "1.1.0" + "@radix-ui/react-use-controllable-state" "1.1.0" + "@radix-ui/react-visually-hidden" "1.1.0" + +"@radix-ui/react-use-callback-ref@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.0.tgz#bce938ca413675bc937944b0d01ef6f4a6dc5bf1" + integrity sha512-CasTfvsy+frcFkbXtSJ2Zu9JHpN8TYKxkgJGWbjiZhFivxaeW7rMeZt7QELGVLaYVfFMsKHjb7Ak0nMEe+2Vfw== -"@radix-ui/react-use-escape-keydown@0.1.0": - version "0.1.0" - resolved "https://registry.npmjs.org/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-0.1.0.tgz" - integrity sha512-tDLZbTGFmvXaazUXXv8kYbiCcbAE8yKgng9s95d8fCO+Eundv0Jngbn/hKPhDDs4jj9ChwRX5cDDnlaN+ugYYQ== +"@radix-ui/react-use-controllable-state@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.1.0.tgz#1321446857bb786917df54c0d4d084877aab04b0" + integrity sha512-MtfMVJiSr2NjzS0Aa90NPTnvTSg6C/JLCV7ma0W6+OMV78vd8OyRpID+Ng9LxzsPbLeuBnWBA1Nq30AtBIDChw== dependencies: - "@babel/runtime" "^7.13.10" - "@radix-ui/react-use-callback-ref" "0.1.0" + "@radix-ui/react-use-callback-ref" "1.1.0" -"@radix-ui/react-use-layout-effect@0.1.0": - version "0.1.0" - resolved "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-0.1.0.tgz" - integrity sha512-+wdeS51Y+E1q1Wmd+1xSSbesZkpVj4jsg0BojCbopWvgq5iBvixw5vgemscdh58ep98BwUbsFYnrywFhV9yrVg== +"@radix-ui/react-use-escape-keydown@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-escape-keydown/-/react-use-escape-keydown-1.1.0.tgz#31a5b87c3b726504b74e05dac1edce7437b98754" + integrity sha512-L7vwWlR1kTTQ3oh7g1O0CBF3YCyyTj8NmhLR+phShpyA50HCfBFKVJTpshm9PzLiKmehsrQzTYTpX9HvmC9rhw== dependencies: - "@babel/runtime" "^7.13.10" + "@radix-ui/react-use-callback-ref" "1.1.0" -"@radix-ui/react-use-previous@0.1.0": - version "0.1.0" - resolved "https://registry.npmjs.org/@radix-ui/react-use-previous/-/react-use-previous-0.1.0.tgz" - integrity sha512-0fxNc33rYnCzDMPSiSnfS8YklnxQo8WqbAQXPAgIaaA1jRu2qFB916PL4qCIW+avcAAqFD38vWhqDqcVmBharA== - dependencies: - "@babel/runtime" "^7.13.10" +"@radix-ui/react-use-layout-effect@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.0.tgz#3c2c8ce04827b26a39e442ff4888d9212268bd27" + integrity sha512-+FPE0rOdziWSrH9athwI1R0HDVbWlEhd+FR+aSDk4uWGmSJ9Z54sdZVDQPZAinJhJXwfT+qnj969mCsT2gfm5w== -"@radix-ui/react-use-rect@0.1.1": - version "0.1.1" - resolved "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-0.1.1.tgz" - integrity sha512-kHNNXAsP3/PeszEmM/nxBBS9Jbo93sO+xuMTcRfwzXsmxT5gDXQzAiKbZQ0EecCPtJIzqvr7dlaQi/aP1PKYqQ== +"@radix-ui/react-use-rect@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-rect/-/react-use-rect-1.1.0.tgz#13b25b913bd3e3987cc9b073a1a164bb1cf47b88" + integrity sha512-0Fmkebhr6PiseyZlYAOtLS+nb7jLmpqTrJyv61Pe68MKYW6OWdRE2kI70TaYY27u7H0lajqM3hSMMLFq18Z7nQ== dependencies: - "@babel/runtime" "^7.13.10" - "@radix-ui/rect" "0.1.1" + "@radix-ui/rect" "1.1.0" -"@radix-ui/react-use-size@0.1.0": - version "0.1.0" - resolved "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-0.1.0.tgz" - integrity sha512-TcZAsR+BYI46w/RbaSFCRACl+Jh6mDqhu6GS2r0iuJpIVrj8atff7qtTjmMmfGtEDNEjhl7DxN3pr1nTS/oruQ== +"@radix-ui/react-use-size@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-use-size/-/react-use-size-1.1.0.tgz#b4dba7fbd3882ee09e8d2a44a3eed3a7e555246b" + integrity sha512-XW3/vWuIXHa+2Uwcc2ABSfcCledmXhhQPlGbfcRXbiUQI5Icjcg19BGCZVKKInYbvUCut/ufbbLLPFC5cbb1hw== dependencies: - "@babel/runtime" "^7.13.10" + "@radix-ui/react-use-layout-effect" "1.1.0" -"@radix-ui/react-visually-hidden@0.1.3": - version "0.1.3" - resolved "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-0.1.3.tgz" - integrity sha512-dPU6ZR2WQ/W9qv7E1Y8/I8ymqG+8sViU6dQQ6sfr2/8yGr0I4mmI7ywTnqXaE+YS9gHLEZHdQcEqTNESg6YfdQ== +"@radix-ui/react-visually-hidden@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.1.0.tgz#ad47a8572580f7034b3807c8e6740cd41038a5a2" + integrity sha512-N8MDZqtgCgG5S3aV60INAB475osJousYpZ4cTJ2cFbMpdHS5Y6loLTH8LPtkj2QN0x93J30HT/M3qJXM0+lyeQ== dependencies: - "@babel/runtime" "^7.13.10" - "@radix-ui/react-primitive" "0.1.3" + "@radix-ui/react-primitive" "2.0.0" -"@radix-ui/rect@0.1.1": - version "0.1.1" - resolved "https://registry.npmjs.org/@radix-ui/rect/-/rect-0.1.1.tgz" - integrity sha512-g3hnE/UcOg7REdewduRPAK88EPuLZtaq7sA9ouu8S+YEtnyFRI16jgv6GZYe3VMoQLL1T171ebmEPtDjyxWLzw== - dependencies: - "@babel/runtime" "^7.13.10" +"@radix-ui/rect@1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@radix-ui/rect/-/rect-1.1.0.tgz#f817d1d3265ac5415dadc67edab30ae196696438" + integrity sha512-A9+lCBZoaMJlVKcRBz2YByCG+Cp2t6nAnMnNba+XiWxnj6r4JUFqfsgwocMBZU9LPtdxC6wB56ySYpc7LQIoJg== "@react-spring/animated@~9.6.1": version "9.6.1" @@ -2173,51 +2183,57 @@ react-merge-refs "^1.1.0" three-bvh-csg "^0.0.2" -"@react-three/drei@9.74.14": - version "9.74.14" - resolved "https://registry.yarnpkg.com/@react-three/drei/-/drei-9.74.14.tgz#3aa7b70dc6b60bca93c2f1b928385418ea61c6c2" - integrity sha512-XvptoV/orcpS1cbEkK3YBcDcwQbEez8Lp2gwmoZCK7U3p5IyzkHYPb+7yVFlGjtAMf/JEzS3lCC9fpv7z0wtiQ== +"@react-three/drei@9.112.0", "@react-three/drei@^9.103.0": + version "9.112.0" + resolved "https://registry.yarnpkg.com/@react-three/drei/-/drei-9.112.0.tgz#8e99379db792e35da7bf52f83a149b71fdcb3b47" + integrity sha512-te+4tcNiRv3QizD04cg25oX51uUMVG5Y3iUaIX8tKi8aW3j7UM6XCFSKVYNOiT6P+d5h/ruSd5naX7oFvp3QOQ== dependencies: "@babel/runtime" "^7.11.2" - "@mediapipe/tasks-vision" "0.10.2-rc2" + "@mediapipe/tasks-vision" "0.10.8" + "@monogrid/gainmap-js" "^3.0.5" "@react-spring/three" "~9.6.1" "@use-gesture/react" "^10.2.24" camera-controls "^2.4.2" + cross-env "^7.0.3" detect-gpu "^5.0.28" glsl-noise "^0.0.0" - lodash.clamp "^4.0.3" - lodash.omit "^4.5.0" - lodash.pick "^4.4.0" - maath "^0.6.0" + hls.js "1.3.5" + maath "^0.10.7" meshline "^3.1.6" react-composer "^5.0.3" - react-merge-refs "^1.1.0" + stats-gl "^2.0.0" stats.js "^0.17.0" suspend-react "^0.1.3" - three-mesh-bvh "^0.6.0" - three-stdlib "^2.23.9" - troika-three-text "^0.47.2" + three-mesh-bvh "^0.7.0" + three-stdlib "^2.29.9" + troika-three-text "^0.49.0" + tunnel-rat "^0.1.2" utility-types "^3.10.0" - zustand "^3.5.13" + uuid "^9.0.1" + zustand "^3.7.1" -"@react-three/fiber@8.9.1": - version "8.9.1" - resolved "https://registry.npmjs.org/@react-three/fiber/-/fiber-8.9.1.tgz" - integrity sha512-xRMO9RGp0DkxSFu5BmmkjCxJ4r0dEpLobtxXdZwI0h2rZZaCnkPM5zThRN8xaZNbZhzRSVICeNOFaZltr9xFyQ== +"@react-three/fiber@8.17.7": + version "8.17.7" + resolved "https://registry.yarnpkg.com/@react-three/fiber/-/fiber-8.17.7.tgz#c290594e0a8afd445e3c76654c48094641c72292" + integrity sha512-52/TZ0pGdEtjs1bSCePrJe8+5hzYzC8/O4bwx0NXc3GZ3uRCr5Eu+CVsr7BUn2uxd825Zjbup0OXKSDRQ70qiQ== dependencies: "@babel/runtime" "^7.17.8" + "@types/debounce" "^1.2.1" "@types/react-reconciler" "^0.26.7" + "@types/webxr" "*" + base64-js "^1.5.1" + buffer "^6.0.3" + debounce "^1.2.1" its-fine "^1.0.6" react-reconciler "^0.27.0" - react-use-measure "^2.1.1" scheduler "^0.21.0" - suspend-react "^0.0.8" + suspend-react "^0.1.3" zustand "^3.7.1" -"@react-three/test-renderer@8.1.5": - version "8.1.5" - resolved "https://registry.yarnpkg.com/@react-three/test-renderer/-/test-renderer-8.1.5.tgz#83f0237c2438d0f687885b0deb3a3d944f203fe4" - integrity sha512-gGcAPP5irMJiiUe/QoFGUpd7zygD3HJmPz19u8de5vghfApOOaLMOzv0YoQ9bYILZYZDF/VKZsFOGozXSKufMg== +"@react-three/test-renderer@8.2.1": + version "8.2.1" + resolved "https://registry.yarnpkg.com/@react-three/test-renderer/-/test-renderer-8.2.1.tgz#b0fc29634c528b41ddcdf9cac340f4d98043f7e1" + integrity sha512-fxe9RYa05El8YN5YYKuDn9sZhVcB5EfX4VbYn0/0grA47AYIoF3ky/99dg3u7VMJrrTeJ7uRCnD9t6lnqLiCyA== "@remix-run/router@1.0.3": version "1.0.3" @@ -2302,9 +2318,9 @@ resolved "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz" integrity sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw== -"@stitches/react@1.2.8", "@stitches/react@^1.2.6": +"@stitches/react@^1.2.8": version "1.2.8" - resolved "https://registry.npmjs.org/@stitches/react/-/react-1.2.8.tgz" + resolved "https://registry.yarnpkg.com/@stitches/react/-/react-1.2.8.tgz#954f8008be8d9c65c4e58efa0937f32388ce3a38" integrity sha512-9g9dWI4gsSVe8bNLlb+lMkBYsnIKCZTmvqvDG+Avnn69XfmHZKiaMrx7cgTaddq7aTPPmXiTsbFcUy0xgI4+wA== "@szmarczak/http-timer@^1.1.2": @@ -2364,20 +2380,20 @@ resolved "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz" integrity sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ== -"@tweenjs/tween.js@~18.6.4": - version "18.6.4" - resolved "https://registry.yarnpkg.com/@tweenjs/tween.js/-/tween.js-18.6.4.tgz#40a3d0a93647124872dec8e0fd1bd5926695b6ca" - integrity sha512-lB9lMjuqjtuJrx7/kOkqQBtllspPIN+96OvTCeJ2j5FEzinoAXTdAMFnDAQT1KVPRlnYfBrqxtqP66vDM40xxQ== +"@tweenjs/tween.js@~23.1.1", "@tweenjs/tween.js@~23.1.3": + version "23.1.3" + resolved "https://registry.yarnpkg.com/@tweenjs/tween.js/-/tween.js-23.1.3.tgz#eff0245735c04a928bb19c026b58c2a56460539d" + integrity sha512-vJmvvwFxYuGnF2axRtPYocag6Clbb5YS7kLL+SO/TeVFzHqDIWrNKYtcsPMibjDx9O+bu+psAy9NKfWklassUA== "@types/aria-query@^5.0.1": version "5.0.2" resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-5.0.2.tgz#6f1225829d89794fd9f891989c9ce667422d7f64" integrity sha512-PHKZuMN+K5qgKIWhBodXzQslTo5P+K/6LqeKXS6O/4liIDdZqaX5RXrCK++LAw+y/nptN48YmUMFiQHRSWYwtQ== -"@types/babel__core@^7.20.2": - version "7.20.2" - resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.2.tgz#215db4f4a35d710256579784a548907237728756" - integrity sha512-pNpr1T1xLUc2l3xJKuPtsEky3ybxN3m4fJkknfIpTCTfIZCDW57oAg+EfCgIIp2rvCe0Wn++/FfodDS4YXxBwA== +"@types/babel__core@^7.20.5": + version "7.20.5" + resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.20.5.tgz#3df15f27ba85319caa07ba08d0721889bb39c017" + integrity sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA== dependencies: "@babel/parser" "^7.20.7" "@babel/types" "^7.20.7" @@ -2434,6 +2450,11 @@ resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.5.tgz#ae69bcbb1bebb68c4ac0b11e9d8ed04526b3562b" integrity sha512-mEo1sAde+UCE6b2hxn332f1g1E8WfYRu6p5SvTKr2ZKC1f7gFJXk4h5PyGP9Dt6gCaG8y8XhwnXWC6Iy2cmBng== +"@types/debounce@^1.2.1": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@types/debounce/-/debounce-1.2.4.tgz#cb7e85d9ad5ababfac2f27183e8ac8b576b2abb3" + integrity sha512-jBqiORIzKDOToaF63Fm//haOCHuwQuLa2202RK4MozpA6lh93eCBc+/8+wZn5OzjJt3ySdc+74SXWXB55Ewtyw== + "@types/draco3d@^1.4.0": version "1.4.2" resolved "https://registry.yarnpkg.com/@types/draco3d/-/draco3d-1.4.2.tgz#7faccb809db2a5e19b9efb97c5f2eb9d64d527ea" @@ -2572,16 +2593,28 @@ resolved "https://registry.yarnpkg.com/@types/stats.js/-/stats.js-0.17.0.tgz#0ed81d48e03b590c24da85540c1d952077a9fe20" integrity sha512-9w+a7bR8PeB0dCT/HBULU2fMqf6BAzvKbxFboYhmDtDkKPiyXYbjoe2auwsXlEFI7CFNMF1dCv3dFH5Poy9R1w== -"@types/three@^0.152.1": - version "0.152.1" - resolved "https://registry.yarnpkg.com/@types/three/-/three-0.152.1.tgz#6f2ce49f7647c78855bc32544cc3e72145aa65cb" - integrity sha512-PMOCQnx9JRmq+2OUGTPoY9h1hTWD2L7/nmuW/SyNq1Vbq3Lwt3MNdl3wYSa4DvLTGv62NmIXD9jYdAOwohwJyw== +"@types/three@^0.163.0": + version "0.163.0" + resolved "https://registry.yarnpkg.com/@types/three/-/three-0.163.0.tgz#96f5440fcd39452d2c84dfe0c9b7a9cf0247b9e6" + integrity sha512-uIdDhsXRpQiBUkflBS/i1l3JX14fW6Ot9csed60nfbZNXHDTRsnV2xnTVwXcgbvTiboAR4IW+t+lTL5f1rqIqA== dependencies: - "@tweenjs/tween.js" "~18.6.4" + "@tweenjs/tween.js" "~23.1.1" "@types/stats.js" "*" "@types/webxr" "*" - fflate "~0.6.9" - lil-gui "~0.17.0" + fflate "~0.8.2" + meshoptimizer "~0.18.1" + +"@types/three@^0.168.0": + version "0.168.0" + resolved "https://registry.yarnpkg.com/@types/three/-/three-0.168.0.tgz#510420c4bbee7937bbbcdfbc5dc31160771eaef8" + integrity sha512-qAGLGzbaYgkkonOBfwOr+TZpOskPfFjrDAj801WQSVkUz0/D9zwir4vhruJ/CC/GteywzR9pqeVVfs5th/2oKw== + dependencies: + "@tweenjs/tween.js" "~23.1.3" + "@types/stats.js" "*" + "@types/webxr" "*" + "@webgpu/types" "*" + fflate "~0.8.2" + meshoptimizer "~0.18.1" "@types/webxr@*", "@types/webxr@^0.5.2": version "0.5.2" @@ -2612,16 +2645,23 @@ dependencies: "@use-gesture/core" "10.2.21" -"@vitejs/plugin-react@^4.0.3": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-4.1.0.tgz#e4f56f46fd737c5d386bb1f1ade86ba275fe09bd" - integrity sha512-rM0SqazU9iqPUraQ2JlIvReeaxOoRj6n+PzB1C0cBzIbd8qP336nC39/R9yPi3wVcah7E7j/kdU1uCUqMEU4OQ== +"@utsubo/events@^0.1.7": + version "0.1.7" + resolved "https://registry.yarnpkg.com/@utsubo/events/-/events-0.1.7.tgz#d4d7aa6b26de29bdf64da5cb89005534a0651e52" + integrity sha512-WB/GEj/0h27Bz8rJ0+CBtNz5mLT79ne1OjB7PUM4n0qLBqEDwm6yBzZC3j6tasHjlBPJDYZiBVIA1glaMlgZ5g== dependencies: - "@babel/core" "^7.22.20" - "@babel/plugin-transform-react-jsx-self" "^7.22.5" - "@babel/plugin-transform-react-jsx-source" "^7.22.5" - "@types/babel__core" "^7.20.2" - react-refresh "^0.14.0" + eventemitter3 "^4.0.7" + +"@vitejs/plugin-react@^4.3.1": + version "4.3.1" + resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-4.3.1.tgz#d0be6594051ded8957df555ff07a991fb618b48e" + integrity sha512-m/V2syj5CuVnaxcUJOQRel/Wr31FFXRFlnOoq1TVtkCxsY5veGMTEmpWHndrhB2U8ScHtCQB1e+4hWYExQc6Lg== + dependencies: + "@babel/core" "^7.24.5" + "@babel/plugin-transform-react-jsx-self" "^7.24.5" + "@babel/plugin-transform-react-jsx-source" "^7.24.1" + "@types/babel__core" "^7.20.5" + react-refresh "^0.14.2" "@vitest/expect@0.32.0": version "0.32.0" @@ -2680,6 +2720,11 @@ loupe "^2.3.6" pretty-format "^27.5.1" +"@webgpu/types@*": + version "0.1.45" + resolved "https://registry.yarnpkg.com/@webgpu/types/-/types-0.1.45.tgz#a31146be1e36b2c9826c048b3cfafe519cc21945" + integrity sha512-0TBBF/mhakJoK0qUWCZugBnh23x+VwmYA5RLmtNQwvZt1pQ4P2fzIvQUiSe6jxzkBi4GF8R4BejJjro0ZSoSXQ== + JSONStream@^1.0.4: version "1.3.5" resolved "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz" @@ -2917,7 +2962,7 @@ balanced-match@^1.0.0: resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== -base64-js@^1.3.1: +base64-js@^1.3.1, base64-js@^1.5.1: version "1.5.1" resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== @@ -2994,15 +3039,15 @@ browserslist@^4.21.3, browserslist@^4.21.4: node-releases "^2.0.6" update-browserslist-db "^1.0.9" -browserslist@^4.21.9: - version "4.22.1" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.22.1.tgz#ba91958d1a59b87dab6fed8dfbcb3da5e2e9c619" - integrity sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ== +browserslist@^4.23.1: + version "4.23.3" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.23.3.tgz#debb029d3c93ebc97ffbc8d9cbb03403e227c800" + integrity sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA== dependencies: - caniuse-lite "^1.0.30001541" - electron-to-chromium "^1.4.535" - node-releases "^2.0.13" - update-browserslist-db "^1.0.13" + caniuse-lite "^1.0.30001646" + electron-to-chromium "^1.5.4" + node-releases "^2.0.18" + update-browserslist-db "^1.1.0" buffer-from@^1.0.0: version "1.1.2" @@ -3108,10 +3153,10 @@ caniuse-lite@^1.0.30001400: resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001416.tgz" integrity sha512-06wzzdAkCPZO+Qm4e/eNghZBDfVNDsCgw33T27OwBH9unE9S478OYw//Q2L7Npf/zBzs7rjZOszIFQkwQKAEqA== -caniuse-lite@^1.0.30001541: - version "1.0.30001549" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001549.tgz#7d1a3dce7ea78c06ed72c32c2743ea364b3615aa" - integrity sha512-qRp48dPYSCYaP+KurZLhDYdVE+yEyht/3NlmcJgVQ2VMGt6JL36ndQ/7rgspdZsJuxDPFIo/OzBT2+GmIJ53BA== +caniuse-lite@^1.0.30001646: + version "1.0.30001662" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001662.tgz#3574b22dfec54a3f3b6787331da1040fe8e763ec" + integrity sha512-sgMUVwLmGseH8ZIrm1d51UbrhqMCH3jvS7gF/M6byuHOnKyLOBL7W8yz5V02OHwgLGA36o/AFhWzzh4uc5aqTA== chai@^4.3.7: version "4.3.7" @@ -3410,6 +3455,13 @@ create-require@^1.1.0: resolved "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== +cross-env@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-env/-/cross-env-7.0.3.tgz#865264b29677dc015ba8418918965dd232fc54cf" + integrity sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw== + dependencies: + cross-spawn "^7.0.1" + cross-spawn@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz" @@ -3419,7 +3471,7 @@ cross-spawn@^5.1.0: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.3: +cross-spawn@^7.0.1, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -3438,7 +3490,7 @@ css.escape@^1.5.1: resolved "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz" integrity sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg== -csstype@^3.0.2, csstype@^3.0.4: +csstype@^3.0.2: version "3.1.1" resolved "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz" integrity sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw== @@ -3502,6 +3554,13 @@ debug@^4.1.0, debug@^4.1.1, debug@^4.3.4: dependencies: ms "2.1.2" +debug@^4.3.1: + version "4.3.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" + integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== + dependencies: + ms "^2.1.3" + decamelize-keys@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz" @@ -3690,10 +3749,10 @@ electron-to-chromium@^1.4.251: resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.275.tgz" integrity sha512-aJeQQ+Hl9Jyyzv4chBqYJwmVRY46N5i2BEX5Cuyk/5gFCUZ5F3i7Hnba6snZftWla7Gglwc5pIgcd+E7cW+rPg== -electron-to-chromium@^1.4.535: - version "1.4.556" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.556.tgz#97385917eb6ea3ac6a3378cf87bb39ee1db96e76" - integrity sha512-6RPN0hHfzDU8D56E72YkDvnLw5Cj2NMXZGg3UkgyoHxjVhG99KZpsKgBWMmTy0Ei89xwan+rbRsVB9yzATmYzQ== +electron-to-chromium@^1.5.4: + version "1.5.25" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.25.tgz#492ade1cde401332b9b75aa0c55fd5e1550ca66c" + integrity sha512-kMb204zvK3PsSlgvvwzI3wBIcAw15tRkYk+NQdsjdDtcQWTp2RABbMQ9rUBy8KNEOM+/E6ep+XC3AykiWZld4g== elegant-spinner@^1.0.1: version "1.0.1" @@ -3952,6 +4011,11 @@ escalade@^3.1.1: resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== +escalade@^3.1.2: + version "3.2.0" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.2.0.tgz#011a3f69856ba189dffa7dc8fcce99d2a87903e5" + integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== + escape-goat@^2.0.0: version "2.1.1" resolved "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz" @@ -3992,6 +4056,11 @@ esutils@^2.0.2, esutils@^2.0.3: resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== +eventemitter3@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + execa@^5.0.0: version "5.1.1" resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz" @@ -4069,7 +4138,7 @@ fastq@^1.6.0: dependencies: reusify "^1.0.4" -fflate@^0.6.9, fflate@~0.6.9: +fflate@^0.6.9: version "0.6.10" resolved "https://registry.npmjs.org/fflate/-/fflate-0.6.10.tgz" integrity sha512-IQrh3lEPM93wVCEczc9SaAOvkmcoQn/G8Bo1e8ZPlY3X3bnAxWaBdvTdvM1hP62iZp0BXWDy4vTAy4fF0+Dlpg== @@ -4079,6 +4148,11 @@ fflate@^0.7.4: resolved "https://registry.yarnpkg.com/fflate/-/fflate-0.7.4.tgz#61587e5d958fdabb5a9368a302c25363f4f69f50" integrity sha512-5u2V/CDW15QM1XbbgS+0DfPxVB+jUKhWEKuuFuHncbk3tEEqzmoXL+2KyOFuKGqOnmdIy0/davWF1CkuwtibCw== +fflate@~0.8.2: + version "0.8.2" + resolved "https://registry.yarnpkg.com/fflate/-/fflate-0.8.2.tgz#fc8631f5347812ad6028bbe4a2308b2792aa1dea" + integrity sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A== + figures@^1.7.0: version "1.7.0" resolved "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz" @@ -4512,6 +4586,11 @@ has@^1.0.3: dependencies: function-bind "^1.1.1" +hls.js@1.3.5: + version "1.3.5" + resolved "https://registry.yarnpkg.com/hls.js/-/hls.js-1.3.5.tgz#0e8b0799ecf2feb7ba199f5e95f35ba9552e04f4" + integrity sha512-uybAvKS6uDe0MnWNEPnO0krWVr+8m2R0hJ/viql8H3MVK+itq8gGQuIYoFHL3rECkIpNH98Lw8YuuWMKZxp3Ew== + hosted-git-info@^2.1.4: version "2.8.9" resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz" @@ -4577,6 +4656,11 @@ ignore@^5.2.0: resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== +immediate@~3.0.5: + version "3.0.6" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" + integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ== + import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" @@ -5211,14 +5295,14 @@ latest-version@^5.1.0: dependencies: package-json "^6.3.0" -leva@0.9.34: - version "0.9.34" - resolved "https://registry.npmjs.org/leva/-/leva-0.9.34.tgz" - integrity sha512-hQmWAakOCuBXYIenJ7RaNIei5enDwHNNb6Gz5BUU3mZk+ElECdbvNJbmcMfkFAJslJw33MXRabt7OKIzItLLWw== +leva@0.9.35: + version "0.9.35" + resolved "https://registry.yarnpkg.com/leva/-/leva-0.9.35.tgz#0d44c0954ba28434b50636906e389c61dd2cbfd9" + integrity sha512-sp/ZbHGrrzM+eq+wIAc9X7C5qFagNERYkwaulKI/xy0XrDPV67jLUSSqTCFSoSc0Uk96j3oephYoO/6I8mZNuw== dependencies: - "@radix-ui/react-portal" "^0.1.3" - "@radix-ui/react-tooltip" "0.1.6" - "@stitches/react" "1.2.8" + "@radix-ui/react-portal" "^1.0.2" + "@radix-ui/react-tooltip" "^1.0.5" + "@stitches/react" "^1.2.8" "@use-gesture/react" "^10.2.5" colord "^2.9.2" dequal "^2.0.2" @@ -5228,10 +5312,12 @@ leva@0.9.34: v8n "^1.3.3" zustand "^3.6.9" -lil-gui@~0.17.0: - version "0.17.0" - resolved "https://registry.yarnpkg.com/lil-gui/-/lil-gui-0.17.0.tgz#b41ae55d0023fcd9185f7395a218db0f58189663" - integrity sha512-MVBHmgY+uEbmJNApAaPbtvNh1RCAeMnKym82SBjtp5rODTYKWtM+MXHCifLe2H2Ti1HuBGBtK/5SyG4ShQ3pUQ== +lie@^3.0.2: + version "3.3.0" + resolved "https://registry.yarnpkg.com/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a" + integrity sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ== + dependencies: + immediate "~3.0.5" lines-and-columns@^1.1.6: version "1.2.4" @@ -5321,11 +5407,6 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" -lodash.clamp@^4.0.3: - version "4.0.3" - resolved "https://registry.npmjs.org/lodash.clamp/-/lodash.clamp-4.0.3.tgz" - integrity sha512-HvzRFWjtcguTW7yd8NJBshuNaCa8aqNFtnswdT7f/cMd/1YKy5Zzoq4W/Oxvnx9l7aeY258uSdDfM793+eLsVg== - lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz" @@ -5336,16 +5417,6 @@ lodash.isequal@^4.5.0: resolved "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz" integrity sha512-pDo3lu8Jhfjqls6GkMgpahsF9kCyayhgykjyLMNFTKWrpVdAQtYyB4muAMWozBB4ig/dtWAmsMxLEI8wuz+DYQ== -lodash.omit@^4.5.0: - version "4.5.0" - resolved "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz" - integrity sha512-XeqSp49hNGmlkj2EJlfrQFIzQ6lXdNro9sddtQzcJY8QaoC2GO0DT7xaIokHeyM+mIT0mPMlPvkYzg2xCuHdZg== - -lodash.pick@^4.4.0: - version "4.4.0" - resolved "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz" - integrity sha512-hXt6Ul/5yWjfklSGvLQl8vM//l3FtyHZeuelpzK6mm99pNvN9yTDruNZPEJZD1oWrqo+izBmB7oUfWgcCX7s4Q== - lodash.startcase@^4.4.0: version "4.4.0" resolved "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz" @@ -5448,10 +5519,10 @@ lz-string@^1.5.0: resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941" integrity sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ== -maath@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/maath/-/maath-0.6.0.tgz#7841d0fb95bbb37d19b08b7c5458ef70190950d2" - integrity sha512-dSb2xQuP7vDnaYqfoKzlApeRcR2xtN8/f7WV/TMAkBC8552TwTLtOO0JTcSygkYMjNDPoo6V01jTw/aPi4JrMw== +maath@^0.10.7: + version "0.10.8" + resolved "https://registry.yarnpkg.com/maath/-/maath-0.10.8.tgz#cf647544430141bf6982da6e878abb6c4b804e24" + integrity sha512-tRvbDF0Pgqz+9XUa4jjfgAQ8/aPKmQdWXilFu2tMy4GWj4NOsx99HlULO4IeREfbO3a0sA145DZYyvXPkybm0g== magic-string@^0.25.7: version "0.25.9" @@ -5584,6 +5655,11 @@ meshline@^3.1.6: resolved "https://registry.yarnpkg.com/meshline/-/meshline-3.1.6.tgz#eee67d9b0fd9841652cc1dc2d3833093ae8e68ca" integrity sha512-8JZJOdaL5oz3PI/upG8JvP/5FfzYUOhrkJ8np/WKvXzl0/PZ2V9pqTvCIjSKv+w9ccg2xb+yyBhXAwt6ier3ug== +meshoptimizer@~0.18.1: + version "0.18.1" + resolved "https://registry.yarnpkg.com/meshoptimizer/-/meshoptimizer-0.18.1.tgz#cdb90907f30a7b5b1190facd3b7ee6b7087797d8" + integrity sha512-ZhoIoL7TNV4s5B6+rx5mC//fw8/POGyNxS/DZyCJeiZ12ScLfVwRE/GfsxwiTkMYYD5DmK2/JXnEVXqL4rF+Sw== + micromatch@^4.0.2, micromatch@^4.0.4: version "4.0.5" resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz" @@ -5688,7 +5764,7 @@ ms@2.1.2: resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@^2.1.2: +ms@^2.1.2, ms@^2.1.3: version "2.1.3" resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -5715,10 +5791,10 @@ new-github-release-url@^1.0.0: dependencies: type-fest "^0.4.1" -node-releases@^2.0.13: - version "2.0.13" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d" - integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== +node-releases@^2.0.18: + version "2.0.18" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.18.tgz#f010e8d35e2fe8d6b2944f03f70213ecedc4ca3f" + integrity sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g== node-releases@^2.0.6: version "2.0.6" @@ -6160,6 +6236,11 @@ picocolors@^1.0.0: resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== +picocolors@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.1.0.tgz#5358b76a78cde483ba5cef6a9dc9671440b27d59" + integrity sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw== + picomatch@^2.2.2, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" @@ -6250,6 +6331,14 @@ pretty-format@^27.0.2, pretty-format@^27.5.1: ansi-styles "^5.0.0" react-is "^17.0.1" +promise-worker-transferable@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/promise-worker-transferable/-/promise-worker-transferable-1.0.4.tgz#2c72861ba053e5ae42b487b4a83b1ed3ae3786e8" + integrity sha512-bN+0ehEnrXfxV2ZQvU2PetO0n4gqBD4ulq3MI1WOPLgr7/Mg9yRQkX5+0v1vagr74ZTsl7XtzlaYDo2EuCeYJw== + dependencies: + is-promise "^2.1.0" + lie "^3.0.2" + prop-types@^15.6.0, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz" @@ -6304,14 +6393,16 @@ quick-lru@^5.1.1: resolved "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz" integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== -r3f-perf@6.4.2: - version "6.4.2" - resolved "https://registry.npmjs.org/r3f-perf/-/r3f-perf-6.4.2.tgz" - integrity sha512-DUsNOZhEiqpnyceVD/oCB65nwzS/jN43AAEQWxAt/ijZWKuQLa8Hi/uDHGCdUfZ/mfFVFRmvuPsFJrZZPV6aEg== +r3f-perf@7.2.1: + version "7.2.1" + resolved "https://registry.yarnpkg.com/r3f-perf/-/r3f-perf-7.2.1.tgz#2eedfe07983ea3531bc49e37a2346d937a51dbe7" + integrity sha512-asMr55SqotdT7qtd4gCHGdISGUOL5D3W62LnSm/9lkDIaC/eYg0oh8Vdu3LuyT19tS/O6x1nbPZ11UGdrDJKkA== dependencies: - "@radix-ui/react-icons" "^1.0.3" - "@stitches/react" "^1.2.6" - zustand "^3.7.1" + "@radix-ui/react-icons" "^1.3.0" + "@react-three/drei" "^9.103.0" + "@stitches/react" "^1.2.8" + "@utsubo/events" "^0.1.7" + zustand "~4.5.2" rc@1.2.8, rc@^1.2.8: version "1.2.8" @@ -6375,10 +6466,10 @@ react-reconciler@^0.27.0: loose-envify "^1.1.0" scheduler "^0.21.0" -react-refresh@^0.14.0: - version "0.14.0" - resolved "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz" - integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ== +react-refresh@^0.14.2: + version "0.14.2" + resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.2.tgz#3833da01ce32da470f1f936b9d477da5c7028bf9" + integrity sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA== react-router-dom@6.4.3: version "6.4.3" @@ -6395,13 +6486,6 @@ react-router@6.4.3: dependencies: "@remix-run/router" "1.0.3" -react-use-measure@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/react-use-measure/-/react-use-measure-2.1.1.tgz" - integrity sha512-nocZhN26cproIiIduswYpV5y5lQpSQS1y/4KuvUCjSKmw7ZWIS/+g3aFnX3WdBkyuGUtTLif3UTqnLLhbDoQig== - dependencies: - debounce "^1.2.1" - react@18.2.0: version "18.2.0" resolved "https://registry.npmjs.org/react/-/react-18.2.0.tgz" @@ -6467,11 +6551,6 @@ regenerate@^1.4.2: resolved "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== -regenerator-runtime@^0.13.10: - version "0.13.10" - resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.10.tgz" - integrity sha512-KepLsg4dU12hryUO7bp/axHAKvwGOCV0sGloQtpagJ12ai+ojVDqkeGSiRX1zlq+kjIMZ1t7gpze+26QqtdGqw== - regenerator-runtime@^0.13.4: version "0.13.9" resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz" @@ -6974,6 +7053,13 @@ stackback@0.0.2: resolved "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz" integrity sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw== +stats-gl@^2.0.0: + version "2.2.8" + resolved "https://registry.yarnpkg.com/stats-gl/-/stats-gl-2.2.8.tgz#72566abc8e4a66e91c26b7d9abf659d032379d68" + integrity sha512-94G5nZvduDmzxBS7K0lYnynYwreZpkknD8g5dZmU6mpwIhy3caCrjAm11Qm1cbyx7mqix7Fp00RkbsonzKWnoQ== + dependencies: + "@types/three" "^0.163.0" + stats.js@^0.17.0: version "0.17.0" resolved "https://registry.npmjs.org/stats.js/-/stats.js-0.17.0.tgz" @@ -7143,11 +7229,6 @@ supports-preserve-symlinks-flag@^1.0.0: resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== -suspend-react@^0.0.8: - version "0.0.8" - resolved "https://registry.npmjs.org/suspend-react/-/suspend-react-0.0.8.tgz" - integrity sha512-ZC3r8Hu1y0dIThzsGw0RLZplnX9yXwfItcvaIzJc2VQVi8TGyGDlu92syMB5ulybfvGLHAI5Ghzlk23UBPF8xg== - suspend-react@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/suspend-react/-/suspend-react-0.1.3.tgz#a52f49d21cfae9a2fb70bd0c68413d3f9d90768e" @@ -7196,12 +7277,12 @@ three-bvh-csg@^0.0.2: resolved "https://registry.npmjs.org/three-bvh-csg/-/three-bvh-csg-0.0.2.tgz" integrity sha512-5T1BP1iRjvrG0YIt6G5GwQNgTGHKHrDfRajG10qIVrfjk2QXcwu6rfmSOm+TW7IZQbTcpiBp1/wePyiaYmdlIw== -three-mesh-bvh@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/three-mesh-bvh/-/three-mesh-bvh-0.6.0.tgz#15523c335383df658dc60063a783fdd52d045dc5" - integrity sha512-4/oXeqVMLuN9/P0M3L5ezIVrFiXQXKvjVTErkiSYMjSaPoWfNPAwqulSgLf4bIUPn8/Lq3rmIJwxbCuD8qDobA== +three-mesh-bvh@^0.7.0: + version "0.7.8" + resolved "https://registry.yarnpkg.com/three-mesh-bvh/-/three-mesh-bvh-0.7.8.tgz#83156e4d3945734db076de1c94809331481b3fdd" + integrity sha512-BGEZTOIC14U0XIRw3tO4jY7IjP7n7v24nv9JXS1CyeVRWOCkcOMhRnmENUjuV39gktAw4Ofhr0OvIAiTspQrrw== -three-stdlib@2.23.9, three-stdlib@^2.23.9: +three-stdlib@2.23.9: version "2.23.9" resolved "https://registry.yarnpkg.com/three-stdlib/-/three-stdlib-2.23.9.tgz#09c74fc6acced3d124e4f9d695156136c587a355" integrity sha512-fYBClVGQptD7UZcoRZGNlR3sKcUW37hVPoEW1v68E4XuiwD0Ml/VqDUJ0yEMVE2DlooDvqgqv/rIcHC/B4N5pg== @@ -7218,10 +7299,22 @@ three-stdlib@2.23.9, three-stdlib@^2.23.9: potpack "^1.0.1" zstddec "^0.0.2" -three@0.146.0: - version "0.146.0" - resolved "https://registry.npmjs.org/three/-/three-0.146.0.tgz" - integrity sha512-1lvNfLezN6OJ9NaFAhfX4sm5e9YCzHtaRgZ1+B4C+Hv6TibRMsuBAM5/wVKzxjpYIlMymvgsHEFrrigEfXnb2A== +three-stdlib@^2.29.9: + version "2.33.0" + resolved "https://registry.yarnpkg.com/three-stdlib/-/three-stdlib-2.33.0.tgz#f26e1d769da8a6f417d143d6a571137a0414b951" + integrity sha512-V/uycBuqQOP/3Z+FBtpMdj2Ds5PyfJ3VDfMzktEmG4niOIzv7q1y5uMSbMcng0+057m1l0N147FQxsodQo9zBg== + dependencies: + "@types/draco3d" "^1.4.0" + "@types/offscreencanvas" "^2019.6.4" + "@types/webxr" "^0.5.2" + draco3d "^1.4.1" + fflate "^0.6.9" + potpack "^1.0.1" + +three@0.168.0: + version "0.168.0" + resolved "https://registry.yarnpkg.com/three/-/three-0.168.0.tgz#3e33101d91e3e9716f5c610ea9a7b3b8423c242d" + integrity sha512-6m6jXtDwMJEK/GGMbAOTSAmxNdzKvvBzgd7q8bE/7Tr6m7PaBh5kKLrN7faWtlglXbzj7sVba48Idwx+NRsZXw== through2@^4.0.0: version "4.0.2" @@ -7299,25 +7392,25 @@ trim-newlines@^3.0.0: resolved "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz" integrity sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw== -troika-three-text@^0.47.2: - version "0.47.2" - resolved "https://registry.yarnpkg.com/troika-three-text/-/troika-three-text-0.47.2.tgz#fdf89059c010563bb829262b20c41f69ca79b712" - integrity sha512-qylT0F+U7xGs+/PEf3ujBdJMYWbn0Qci0kLqI5BJG2kW1wdg4T1XSxneypnF05DxFqJhEzuaOR9S2SjiyknMng== +troika-three-text@^0.49.0: + version "0.49.1" + resolved "https://registry.yarnpkg.com/troika-three-text/-/troika-three-text-0.49.1.tgz#1aaa75337e507ea4120103fb69a5e4687fff97dd" + integrity sha512-lXGWxgjJP9kw4i4Wh+0k0Q/7cRfS6iOME4knKht/KozPu9GcFA9NnNpRvehIhrUawq9B0ZRw+0oiFHgRO+4Wig== dependencies: bidi-js "^1.0.2" - troika-three-utils "^0.47.2" - troika-worker-utils "^0.47.2" + troika-three-utils "^0.49.0" + troika-worker-utils "^0.49.0" webgl-sdf-generator "1.1.1" -troika-three-utils@^0.47.2: - version "0.47.2" - resolved "https://registry.yarnpkg.com/troika-three-utils/-/troika-three-utils-0.47.2.tgz#af49ca694245dce631963d5fefe4e8e1b8af9044" - integrity sha512-/28plhCxfKtH7MSxEGx8e3b/OXU5A0xlwl+Sbdp0H8FXUHKZDoksduEKmjQayXYtxAyuUiCRunYIv/8Vi7aiyg== +troika-three-utils@^0.49.0: + version "0.49.0" + resolved "https://registry.yarnpkg.com/troika-three-utils/-/troika-three-utils-0.49.0.tgz#3fbdbf8783740ce3c1f7acac642e7e957ea4f090" + integrity sha512-umitFL4cT+Fm/uONmaQEq4oZlyRHWwVClaS6ZrdcueRvwc2w+cpNQ47LlJKJswpqtMFWbEhOLy0TekmcPZOdYA== -troika-worker-utils@^0.47.2: - version "0.47.2" - resolved "https://registry.yarnpkg.com/troika-worker-utils/-/troika-worker-utils-0.47.2.tgz#e7c5de5f37d56c072b13fa8112bb844e048ff46c" - integrity sha512-mzss4MeyzUkYBppn4x5cdAqrhBHFEuVmMMgLMTyFV23x6GvQMyo+/R5E5Lsbrt7WSt5RfvewjcwD1DChRTA9lA== +troika-worker-utils@^0.49.0: + version "0.49.0" + resolved "https://registry.yarnpkg.com/troika-worker-utils/-/troika-worker-utils-0.49.0.tgz#e5e200a09d2e0e4eb9fe818a83effa912e2ec4b4" + integrity sha512-1xZHoJrG0HFfCvT/iyN41DvI/nRykiBtHqFkGaGgJwq5iXfIZFBiPPEHFpPpgyKM3Oo5ITHXP5wM2TNQszYdVg== ts-node@^10.8.1: version "10.9.1" @@ -7361,6 +7454,13 @@ tty-table@^4.1.5: wcwidth "^1.0.1" yargs "^17.1.1" +tunnel-rat@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/tunnel-rat/-/tunnel-rat-0.1.2.tgz#1717efbc474ea2d8aa05a91622457a6e201c0aeb" + integrity sha512-lR5VHmkPhzdhrM092lI2nACsLO4QubF0/yoOhzX7c+wIpbN1GjHNzCc91QlpxBi+cnx8vVJ+Ur6vL5cEoQPFpQ== + dependencies: + zustand "^4.3.2" + type-detect@^4.0.0, type-detect@^4.0.5: version "4.0.8" resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" @@ -7483,14 +7583,6 @@ universalify@^2.0.0: resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== -update-browserslist-db@^1.0.13: - version "1.0.13" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz#3c5e4f5c083661bd38ef64b6328c26ed6c8248c4" - integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== - dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" - update-browserslist-db@^1.0.9: version "1.0.10" resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz" @@ -7499,6 +7591,14 @@ update-browserslist-db@^1.0.9: escalade "^3.1.1" picocolors "^1.0.0" +update-browserslist-db@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz#7ca61c0d8650766090728046e416a8cde682859e" + integrity sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ== + dependencies: + escalade "^3.1.2" + picocolors "^1.0.1" + update-notifier@^5.0.1: version "5.1.0" resolved "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz" @@ -7533,6 +7633,11 @@ url-parse-lax@^3.0.0: dependencies: prepend-http "^2.0.0" +use-sync-external-store@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz#c3b6390f3a30eba13200d2302dcdf1e7b57b2ef9" + integrity sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw== + util-deprecate@^1.0.1: version "1.0.2" resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" @@ -7543,6 +7648,11 @@ utility-types@^3.10.0: resolved "https://registry.npmjs.org/utility-types/-/utility-types-3.10.0.tgz" integrity sha512-O11mqxmi7wMKCo6HKFt5AhO4BwY3VV68YU07tgxfz8zJTIxr4BpsezN49Ffwy9j3ZpwwJp4fkRwjRzq3uWE6Rg== +uuid@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" + integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== + v8-compile-cache-lib@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz" @@ -7912,7 +8022,14 @@ zstddec@^0.0.2: resolved "https://registry.npmjs.org/zstddec/-/zstddec-0.0.2.tgz" integrity sha512-DCo0oxvcvOTGP/f5FA6tz2Z6wF+FIcEApSTu0zV5sQgn9hoT5lZ9YRAKUraxt9oP7l4e8TnNdi8IZTCX6WCkwA== -zustand@^3.5.13, zustand@^3.6.9, zustand@^3.7.1: +zustand@^3.6.9, zustand@^3.7.1: version "3.7.2" resolved "https://registry.npmjs.org/zustand/-/zustand-3.7.2.tgz" integrity sha512-PIJDIZKtokhof+9+60cpockVOq05sJzHCriyvaLBmEJixseQ1a5Kdov6fWZfWOu5SK9c+FhH1jU0tntLxRJYMA== + +zustand@^4.3.2, zustand@~4.5.2: + version "4.5.5" + resolved "https://registry.yarnpkg.com/zustand/-/zustand-4.5.5.tgz#f8c713041543715ec81a2adda0610e1dc82d4ad1" + integrity sha512-+0PALYNJNgK6hldkgDq2vLrw5f6g/jCInz52n9RTpropGgeAf/ioFUCdtsjCqu4gNhW9D01rUQBROoRjdzyn2Q== + dependencies: + use-sync-external-store "1.2.2" From cf5160efa9a2985b44f8bb2fce9ed9b4cc36dd29 Mon Sep 17 00:00:00 2001 From: Alaric Baraou Date: Sat, 21 Sep 2024 02:11:36 +0900 Subject: [PATCH 2/3] add a kinematic character controller example --- demo/src/App.tsx | 2 + .../KinematicCharacterController.tsx | 265 ++++++++++++++++++ .../KinematicCharacterControllerExample.tsx | 160 +++++++++++ 3 files changed, 427 insertions(+) create mode 100644 demo/src/examples/kinematic-character-controller/KinematicCharacterController.tsx create mode 100644 demo/src/examples/kinematic-character-controller/KinematicCharacterControllerExample.tsx diff --git a/demo/src/App.tsx b/demo/src/App.tsx index ae3ff1d7..7bcb25a1 100644 --- a/demo/src/App.tsx +++ b/demo/src/App.tsx @@ -46,6 +46,7 @@ import { Transforms } from "./examples/transforms/TransformsExample"; import { ActiveCollisionTypesExample } from "./examples/active-collision-types/ActiveCollisionTypesExample"; import { OrbitControls as OrbitControlsImpl } from "three-stdlib"; import { resetOrbitControl } from "./hooks/resetOrbitControl"; +import { KinematicCharacterControllerExample } from "./examples/kinematic-character-controller/KinematicCharacterControllerExample"; type DemoContextType = { setDebug: (f: boolean) => void; @@ -111,6 +112,7 @@ const routes: Record = { car: , "api-usage": , kinematics: , + kinematicCharacterController: , "mesh-collider-test": , colliders: , "instanced-meshes": , diff --git a/demo/src/examples/kinematic-character-controller/KinematicCharacterController.tsx b/demo/src/examples/kinematic-character-controller/KinematicCharacterController.tsx new file mode 100644 index 00000000..e7c8878e --- /dev/null +++ b/demo/src/examples/kinematic-character-controller/KinematicCharacterController.tsx @@ -0,0 +1,265 @@ +import { Box, Capsule, Cone, useKeyboardControls } from "@react-three/drei"; +import { useFrame } from "@react-three/fiber"; +import { + BallCollider, + CapsuleCollider, + CuboidCollider, + interactionGroups, + RigidBody, + useRapier +} from "@react-three/rapier"; +import { useCallback, useEffect, useMemo, useRef, useState } from "react"; +import { Quaternion, Vector3 } from "three"; + +const CAMERA_OFFSET = new Vector3(0, 3, -10); + +export const KinematicCharacterController = ({ + gravity = 9.81, + height = 0.5, + radius = 0.25, + rotationForce = Math.PI / 3, + jumpForce = 0.3, + moveForce = 5, + damping = 0.5, + maxSlopeClimbAngle = 45, + minSlopeSlideAngle = 30, + slideEnabled = true, + enableAutostepOnDynamic = true, + autostepMaxHeight = 0.5, + autostepMinWidth = 0.2, + distanceSnapToGround = 0.5, + applyImpulsesToDynamicBodies = true, + characterMass = 1, + characterControllerOffset = 0.01, + kinematicMode = "position" +}) => { + const refCollider = useRef(); + const rigidBodyRef = useRef(null); + const isGroundedRef = useRef(false); + const refCharacterModel = useRef(null); + const canJumpRef = useRef(false); + // const currentYRotation = useRef(0) + const allIntersections = useRef(new Map()).current; + const currentPos = useRef(new Vector3(0, 10, 0)).current; + const startingPos = useRef(new Vector3(0, 10, 0)).current; + const nextTranslation = useRef(new Vector3(0, 0, 0)).current; + const computedMovement = useRef(new Vector3(0, 0, 0)).current; + const velocityWorld = useRef(new Vector3(0, 0, 0)).current; + const velocityLocal = useRef(new Vector3(0, 0, 0)).current; + const invQuaternion = useRef(new Quaternion()).current; + const [characterController, setCharacterController] = useState(); + const { world, rapier, colliderStates, colliderEvents } = useRapier(); + + const [, getKeyboardControls] = useKeyboardControls(); + + useEffect(() => { + if (!world || !rapier) return; + + const characterController = world.createCharacterController( + characterControllerOffset + ); + + characterController.setSlideEnabled(slideEnabled); // Allow sliding down hill + characterController.setMaxSlopeClimbAngle(maxSlopeClimbAngle); // Don’t allow climbing slopes larger than 45 degrees. + characterController.setMinSlopeSlideAngle(minSlopeSlideAngle); // Automatically slide down on slopes smaller than 30 degrees. + characterController.enableAutostep( + autostepMaxHeight, + autostepMinWidth, + enableAutostepOnDynamic + ); // (maxHeight, minWidth, includeDynamicBodies) Stair behavior + characterController.enableSnapToGround(distanceSnapToGround); // (distance) Set ground snap behavior + characterController.setApplyImpulsesToDynamicBodies( + applyImpulsesToDynamicBodies + ); // Add push behavior + characterController.setCharacterMass(characterMass); // (mass) Set character mass + + setCharacterController(characterController); + + return () => { + world.removeCharacterController(characterController); + }; + }, [world, rapier]); + + useFrame(({ camera }, delta) => { + if (!characterController || !refCollider.current || !rigidBodyRef.current) + return; + + isGroundedRef.current = characterController.computedGrounded(); + const { left, right, forward, back, jump } = getKeyboardControls(); + + if (kinematicMode === "position") { + if (isGroundedRef.current) { + // velocityWorld.y = 0 + } else { + velocityWorld.y -= (delta * gravity) / 9.81; + } + + if (left || right) { + if (left && !right) { + refCharacterModel.current.rotateY(rotationForce * delta); + } else if (right && !left) { + refCharacterModel.current.rotateY(-rotationForce * delta); + } + } + + invQuaternion.copy(refCharacterModel.current.quaternion).invert(); + velocityLocal.copy(velocityWorld).applyQuaternion(invQuaternion); + + if (forward || back) { + if (forward && !back) { + velocityLocal.z += moveForce * delta; + } else if (back && !forward) { + velocityLocal.z -= moveForce * delta; + } + } + + velocityLocal.x *= damping; + velocityLocal.z *= damping; + + invQuaternion.copy(refCharacterModel.current.quaternion).invert(); + velocityWorld + .copy(velocityLocal) + .applyQuaternion(refCharacterModel.current.quaternion); + + if (jump && canJumpRef.current) { + velocityWorld.y = jumpForce; + } + + characterController.computeColliderMovement( + refCollider.current, + velocityWorld, + rapier.QueryFilterFlags.EXCLUDE_SENSORS + ); + nextTranslation.copy(rigidBodyRef.current.translation()); + computedMovement.copy(characterController.computedMovement()); + // console.log('computedMovement',computedMovement.toArray().join(','),velocityWorld.toArray().join(',')) + nextTranslation.add(computedMovement); + velocityWorld.copy(computedMovement); + rigidBodyRef.current.setNextKinematicTranslation(nextTranslation); + } else { + velocityWorld.copy(rigidBodyRef.current.linvel()); + velocityWorld.multiplyScalar(world.timestep); + + //velocity + if (isGroundedRef.current) { + // velocityWorld.y = 0 + } else { + velocityWorld.y -= (delta * gravity) / 9.81; + } + + if (left || right) { + if (left && !right) { + refCharacterModel.current.rotateY(rotationForce * delta); + } else if (right && !left) { + refCharacterModel.current.rotateY(-rotationForce * delta); + } + } + + invQuaternion.copy(refCharacterModel.current.quaternion).invert(); + velocityLocal.copy(velocityWorld).applyQuaternion(invQuaternion); + + if (forward || back) { + if (forward && !back) { + velocityLocal.z += moveForce * delta; + } else if (back && !forward) { + velocityLocal.z -= moveForce * delta; + } + } + + velocityLocal.x *= damping; + velocityLocal.z *= damping; + + invQuaternion.copy(refCharacterModel.current.quaternion).invert(); + velocityWorld + .copy(velocityLocal) + .applyQuaternion(refCharacterModel.current.quaternion); + + if (jump && canJumpRef.current) { + velocityWorld.y = jumpForce; + } + + characterController.computeColliderMovement( + refCollider.current, + velocityWorld, + rapier.QueryFilterFlags.EXCLUDE_SENSORS + ); + computedMovement.copy(characterController.computedMovement()); + velocityWorld.copy(computedMovement); + velocityWorld.divideScalar(world.timestep); + rigidBodyRef.current.setLinvel(velocityWorld); + } + + currentPos.copy(rigidBodyRef.current.translation()); + camera.position + .copy(CAMERA_OFFSET) + .applyQuaternion(refCharacterModel.current.quaternion) + .add(currentPos); + camera.lookAt(currentPos); + }); + + const handleFloorSensorEnter = useCallback((e) => { + allIntersections.set(e.other.collider.handle, true); + console.log("allIntersections", allIntersections.size); + canJumpRef.current = allIntersections.size > 0; + }, []); + + const handleFloorSensorExit = useCallback((e) => { + allIntersections.delete(e.other.collider.handle); + console.log("allIntersections", allIntersections.size); + canJumpRef.current = allIntersections.size > 0; + }, []); + + return ( + <> + + {/* add model character here */} + {/* capsule is a placeholer */} + + + + + + + + {/* { + console.log(true); + }} + onIntersectionExit={() => console.log(false)} + /> */} + + ); +}; diff --git a/demo/src/examples/kinematic-character-controller/KinematicCharacterControllerExample.tsx b/demo/src/examples/kinematic-character-controller/KinematicCharacterControllerExample.tsx new file mode 100644 index 00000000..14a77541 --- /dev/null +++ b/demo/src/examples/kinematic-character-controller/KinematicCharacterControllerExample.tsx @@ -0,0 +1,160 @@ +import { Box, KeyboardControls, Sphere, Text, Torus } from "@react-three/drei"; +import { useFrame } from "@react-three/fiber"; +import { RigidBody, RapierRigidBody } from "@react-three/rapier"; +import { Suspense, useEffect, useMemo, useRef } from "react"; +import { Euler, Quaternion, RGB_PVRTC_2BPPV1_Format } from "three"; +import { Demo } from "../../App"; +import { resetOrbitControl } from "../../hooks/resetOrbitControl"; +import { degToRad } from "three/src/math/MathUtils"; +import { KinematicCharacterController } from "./KinematicCharacterController"; + +const Floor = () => { + return ( + + + + + + ); +}; + +const Stairs = ({ + steps = 10, + stepHeight = 0.2, + stepWidth = 0.2, + position, + ...props +}) => { + const stairs = useMemo(() => { + const stairElements = []; + for (let i = 0; i < steps; i++) { + stairElements.push( + + + + ); + } + return stairElements; + }, [steps, stepHeight, stepWidth]); + + return ( + <> + + + + {`stepWidth:${stepWidth} +stepHeight:${stepHeight} + `} + + + + {stairs} + + + + ); +}; + +const Slope = ({ angle, ...props }) => { + return ( + <> + + + {angle + "deg"} + + + + + + + + + ); +}; + +const Ball = ({ x }) => { + const rb = useRef(null); + + const restartBall = () => { + rb.current?.setTranslation({ x: x, y: 7, z: -10 }, true); + rb.current?.setLinvel({ x: 0, y: 0, z: 5 }, true); + }; + + useFrame(() => { + if (rb.current) { + const translation = rb.current.translation(); + if (translation.z > 20 || translation.y < -4) { + restartBall(); + } + } + }); + + useEffect(() => { + restartBall(); + }); + + return ( + + + + ); +}; + +export const KinematicCharacterControllerExample: Demo = () => { + resetOrbitControl(30); + + const keyboardMap = useMemo( + () => [ + { name: "forward", keys: ["ArrowUp", "KeyW"] }, + { name: "back", keys: ["ArrowDown", "KeyS"] }, + { name: "left", keys: ["ArrowLeft", "KeyA"] }, + { name: "right", keys: ["ArrowRight", "KeyD"] }, + { name: "jump", keys: ["Space"] } + ], + [] + ); + + const DynamicBalls = useMemo(() => { + return Array.from({ length: 10 }, (_, i) => { + return ; + }); + }, []); + + return ( + <> + + + + + + + + + + + + + + {DynamicBalls} + + + + + + ); +}; From eb40c31e7bdcf1bb90ad9f71a7bdffeb5f59ce4b Mon Sep 17 00:00:00 2001 From: Alaric Baraou Date: Sat, 21 Sep 2024 06:33:51 +0900 Subject: [PATCH 3/3] add rotation support --- .../KinematicCharacterController.tsx | 58 ++++++++++--------- .../KinematicCharacterControllerExample.tsx | 2 +- 2 files changed, 32 insertions(+), 28 deletions(-) diff --git a/demo/src/examples/kinematic-character-controller/KinematicCharacterController.tsx b/demo/src/examples/kinematic-character-controller/KinematicCharacterController.tsx index e7c8878e..1fef55e4 100644 --- a/demo/src/examples/kinematic-character-controller/KinematicCharacterController.tsx +++ b/demo/src/examples/kinematic-character-controller/KinematicCharacterController.tsx @@ -9,7 +9,7 @@ import { useRapier } from "@react-three/rapier"; import { useCallback, useEffect, useMemo, useRef, useState } from "react"; -import { Quaternion, Vector3 } from "three"; +import { Object3D, Quaternion, Vector3 } from "three"; const CAMERA_OFFSET = new Vector3(0, 3, -10); @@ -31,12 +31,13 @@ export const KinematicCharacterController = ({ applyImpulsesToDynamicBodies = true, characterMass = 1, characterControllerOffset = 0.01, - kinematicMode = "position" + kinematicMode = "position", + colliderType = "capsule" }) => { const refCollider = useRef(); const rigidBodyRef = useRef(null); const isGroundedRef = useRef(false); - const refCharacterModel = useRef(null); + const refObject3D = useRef(new Object3D());// todo replace by simple quaternion const canJumpRef = useRef(false); // const currentYRotation = useRef(0) const allIntersections = useRef(new Map()).current; @@ -96,13 +97,13 @@ export const KinematicCharacterController = ({ if (left || right) { if (left && !right) { - refCharacterModel.current.rotateY(rotationForce * delta); + refObject3D.current.rotateY(rotationForce * delta); } else if (right && !left) { - refCharacterModel.current.rotateY(-rotationForce * delta); + refObject3D.current.rotateY(-rotationForce * delta); } } - invQuaternion.copy(refCharacterModel.current.quaternion).invert(); + invQuaternion.copy(refObject3D.current.quaternion).invert(); velocityLocal.copy(velocityWorld).applyQuaternion(invQuaternion); if (forward || back) { @@ -116,15 +117,17 @@ export const KinematicCharacterController = ({ velocityLocal.x *= damping; velocityLocal.z *= damping; - invQuaternion.copy(refCharacterModel.current.quaternion).invert(); + invQuaternion.copy(refObject3D.current.quaternion).invert(); velocityWorld .copy(velocityLocal) - .applyQuaternion(refCharacterModel.current.quaternion); + .applyQuaternion(refObject3D.current.quaternion); if (jump && canJumpRef.current) { velocityWorld.y = jumpForce; } + // refCollider.current.setRotation(refObject3D.current.quaternion) + characterController.computeColliderMovement( refCollider.current, velocityWorld, @@ -136,6 +139,7 @@ export const KinematicCharacterController = ({ nextTranslation.add(computedMovement); velocityWorld.copy(computedMovement); rigidBodyRef.current.setNextKinematicTranslation(nextTranslation); + rigidBodyRef.current.setRotation(refObject3D.current.quaternion) } else { velocityWorld.copy(rigidBodyRef.current.linvel()); velocityWorld.multiplyScalar(world.timestep); @@ -149,13 +153,13 @@ export const KinematicCharacterController = ({ if (left || right) { if (left && !right) { - refCharacterModel.current.rotateY(rotationForce * delta); + refObject3D.current.rotateY(rotationForce * delta); } else if (right && !left) { - refCharacterModel.current.rotateY(-rotationForce * delta); + refObject3D.current.rotateY(-rotationForce * delta); } } - invQuaternion.copy(refCharacterModel.current.quaternion).invert(); + invQuaternion.copy(refObject3D.current.quaternion).invert(); velocityLocal.copy(velocityWorld).applyQuaternion(invQuaternion); if (forward || back) { @@ -169,10 +173,10 @@ export const KinematicCharacterController = ({ velocityLocal.x *= damping; velocityLocal.z *= damping; - invQuaternion.copy(refCharacterModel.current.quaternion).invert(); + invQuaternion.copy(refObject3D.current.quaternion).invert(); velocityWorld .copy(velocityLocal) - .applyQuaternion(refCharacterModel.current.quaternion); + .applyQuaternion(refObject3D.current.quaternion); if (jump && canJumpRef.current) { velocityWorld.y = jumpForce; @@ -187,12 +191,13 @@ export const KinematicCharacterController = ({ velocityWorld.copy(computedMovement); velocityWorld.divideScalar(world.timestep); rigidBodyRef.current.setLinvel(velocityWorld); + rigidBodyRef.current.setRotation(refObject3D.current.quaternion) } currentPos.copy(rigidBodyRef.current.translation()); camera.position .copy(CAMERA_OFFSET) - .applyQuaternion(refCharacterModel.current.quaternion) + .applyQuaternion(refObject3D.current.quaternion) .add(currentPos); camera.lookAt(currentPos); }); @@ -227,15 +232,24 @@ export const KinematicCharacterController = ({ ccd={true} > {/* add model character here */} - {/* capsule is a placeholer */} - + {/* capsule and cuboid act as a placeholer */} + { + colliderType === 'cuboid' ? <> + + + : <> + - + + + } + + {/* */} - - {/* { - console.log(true); - }} - onIntersectionExit={() => console.log(false)} - /> */} ); }; diff --git a/demo/src/examples/kinematic-character-controller/KinematicCharacterControllerExample.tsx b/demo/src/examples/kinematic-character-controller/KinematicCharacterControllerExample.tsx index 14a77541..88d6d776 100644 --- a/demo/src/examples/kinematic-character-controller/KinematicCharacterControllerExample.tsx +++ b/demo/src/examples/kinematic-character-controller/KinematicCharacterControllerExample.tsx @@ -149,7 +149,7 @@ export const KinematicCharacterControllerExample: Demo = () => {