Skip to content

Instantly share code, notes, and snippets.

import { ReactNode, useEffect, useMemo, useRef, useState } from "react";
import { Box3, Group, Vector3 } from "three";
import { useFrame } from "@react-three/fiber";
import { useLimiter } from "spacesvr";
import { useBox } from "@react-three/cannon";
type CollidableProps = { enabled?: boolean; children: ReactNode | ReactNode[] };
type ColliderProps = { size: Vector3 };