- DebugProvider explicitly lists children as a prop (@bjornstar)
- Prefer PropsWithChildren over FC (@bjornstar)
- Prefer function declarations over const (@bjornstar)
- [
hooks
] All hooks are now generic, they accept any Object3D and return refs of whatever type was passed in (@bjornstar) - Update @types/react to v18 (@bjornstar)
- Add scaleOverride (@bjornstar)
- Now calls
connect
beforeinit
in a useEffect (instead of useLayoutEffect) - Update
@pmndrs/cannon-worker-api
to v2.1.0
- Removed the Suspense wrapper around Physics, you will need to provide your own suspense boundary from now on
react
is now apeerDependency
and requires v18 or higherthree.js
is now apeerDependency
and requires r139 or higher@react-three/fiber
is now apeerDependency
and requires v8 or higher@pmndrs/cannon-worker-api
is now adependency
cannon-es
is now adependency
cannon-es-debugger
is now adependency
- Updated many
devDependencies
- Access the physics context with the
usePhysicsContext
hook, which immediately gives you a clear error message when trying to access physics components or hooks outside of a Physics provider (@bjornstar) - Renamed
context
tophysicsContext
(@bjornstar) - Added a
useDebugContext
hook for consistency (@bjornstar) - [
Provider.tsx
] Renamed tophysics-provider.tsx
(@bjornstar) - [
Debug.tsx
] Renamed todebug-provider.tsx
(Still exported as Debug & DebugProps) (@bjornstar) - [
physics-provider.tsx
] One useState call that contains the whole context (@bjornstar) - [
physics-provider.tsx
] bodies is not a ref, no need to access current (@bjornstar) - [
setup.ts
] Removed, split into more appropriately named modules (@bjornstar) - [
worker.d.ts
] Removed, belongs in cannon-worker-api (@bjornstar) - [
package.json
] Use dependencies rather than peerDependencies (@bjornstar) - [
.eslintrc.json
] Clean up (@bjornstar) - [
.eslintrc.json
] Disallow non-null assertions (@bjornstar)
- Bump @pmndrs/cannon-worker-api to v1.0.1 (@bjornstar)
- Use newly isolated @pmndrs/cannon-worker-api (@isaac-mason)
- Removed useUpdateWorldPropsEffect (@bjornstar)
- [
package.json
] Added homepage property to go directly to the package (@bjornstar) - [
rollup.config.js
] Specify targetPlatform: 'browser' (@bjornstar) - [
tsconfig.json
] Alphabetize contents (@bjornstar)
- [
dependencies
] Updatedthree
&@types/three
fromr135
tor137
(@bjornstar) - [
examples/dependencies
] Updated@react-three/drei
fromv8.3.1
tov8.11.1
(@bjornstar) - [
examples/dependencies
] Updated@react-three/drei
fromv8.3.1
tov8.11.1
(@bjornstar) - [
examples/dependencies
] Updatedthree
&@types/three
fromr135
tor137
(@bjornstar) - [
examples/dependencies
] Updatedthree-stdlib
from2.6.1
tov2.8.8
(@bjornstar) - [
esmaples/dependencies
] Removedpostprocessing
, it was unused (@bjornstar) - [
examples
] Updated GLTF types (@bjornstar)
- Created CannonWorkerAPI (@isaac-mason)
- Converted worker to typescript (@bjornstar)
- [
examples/RaycastVehicle
] Use a single keyup/keydown event handler (@bjornstar)
- [ESLint] Disallow enums (@bjornstar)
- Add missing worker 'setMaterial' op handler (@isaac-mason)
- Add isPaused property (@grndctrl & @bjornstar)
- BREAKING: step renamed to stepSize (default: 1 / 60)
- NEW: maxSubSteps (default: 10)
- NEW: isPaused (fixes Pause Simulation #212)
- NEW: Paused demo
- timeSinceLastCall not tracked in worker
- prefer FC to PropsWithChildren
- REMOVED: type DefaultContactMaterial
- [
createMaterialFactory
] Do not use logical assignment operator (@bjornstar) - [
eslint
] Disallow logical assignment and nullish coalescing operators (@bjornstar)
- [
hooks
] AdduseContactMaterial
(@Glavin001) - [
examples
] AddFriction
example (@Glavin001) - [
examples
] Add title to links (@Glavin001)
- [
constraintOptns
] AddmaxMultiplier
(@Glavin001)
- [Hooks] Destructure and set defaults intead of using
??
(@bjornstar) - [
useRaycastVehicle
] Use correct ordering for arguments (@bjornstar) - [
examples/RaycastVehicle
] Reset restores the vehicle to it's initial angularVelocity, position, & rotation (@bjornstar)
- Upgrade cannon-es-debugger to 1.0.0 (@marcofugaro)
- [
Debug
] Improve implementation (@bjornstar) - [
examples/RaycastVehicle
] Press?
to debug (@bjornstar)
- Fix RaycastVehicle example (@marcofugaro)
- Add AtomicName & VectorName to the README (@bjornstar)
- Update vite to v2.7.3, change vite.config.js to vite.config.ts (@bjornstar)
- [examples] add missing peer dependency: react-is (@bjornstar)
- Update all dependencies, fix example routes for react-router-dom v6 (@bjornstar)
- [Types] Use
PropsWithChildren
from React instead ofchildren: ReactNode
(@bjornstar) - [README.md] Update default Physics prop values (@bjornstar)
- export * from
'./setup'
there are a lot of useful types in here (@bjornstar) - Build using jsx runtime instead of React runtime for a slightly smaller bundle (@bjornstar)
- [CHANGELOG.md] Add details for v3.1.1 & v3.1.2 (@bjornstar)
- Update default gravity value from
-10
to-9.81
(@alexandernanberg) - [devDependencies] Update to latest versions (@bjornstar)
- [CHANGELOG.md] Start writing a changelog (@bjornstar)
- [README.md] Replace
boxBufferGeometry
withboxGeometry
andplaneBufferGeometry
withplaneGeometry
(@drcmda) - [examples/devDependencies] Update to latest version (@bjornstar)
- Fix an bug where multiple rotations shared an array (@bjornstar)
- Add quaternion API, convert from quaternion to rotation correctly (@bjornstar)
- useSphere args must be an array (@bjornstar)
- [Typescript] Add types for world messages (like setGravity) (@bjornstar)
- Prefer CannonEvent over global Event type name (@bjornstar)
- [TypeScript] Improve set and subscribe API (@bjornstar)
- Rebuild package (@stockHuman)
- Fix useRaycastVehicle, getUUID was receiving unintended index values (@bjornstar)
- [README.md] Update demos to point to cannon.pmnd.rs (@bjornstar)
- [Examples] Convert Kinematic Cube to TypeScript (#262) (@bjornstar)
- [Examples] Convert Heightmap to TypeScript (#264) (@bjornstar)
- [Examples] Convert SphereDebug to TypeScript (#261) (@bjornstar)
- [Examples] Convert Hinge Motor to TypeScript (#263) (@bjornstar)
- [Examples] Convert Cube Heap to TypeScript (#265) (@bjornstar)
- [Examples] Convert Convex Polyhedron to TypeScript (#266) (@bjornstar)
- [Examples] Convert Compound Body to TypeScript (#268) (@bjornstar)
- [Examples] Convert Constraints to TypeScript (#267) (@bjornstar)
- [Examples] Convert Raycast Vehicle to TypeScript (#270) (@bjornstar)
- [Examples] Convert Chain to TypeScript (#269) (@bjornstar)
- [Examples] Convert Raycast to TypeScript (#271) (@bjornstar)
- [Examples] Convert Ping Pong to TypeScript (@bjornstar)
- [readme.md] Switch build badge from travis to github (@bjornstar)
- Use Ref to allow for forwarded refs (@bjornstar)
- Use React.DependencyList instead of any[] for deps (@bjornstar)
- [CI] Test on node v14 as vercel doesn't support 16 yet (@bjornstar)
- Resolve three ourselves to avoid multiple three instances and failed instanceof checks (@bjornstar)
- Fix return type of subscribe function (@skuteli)
- [types] mutableRefObject should default to null (@bjornstar)
- Start converting examples to typescript (@bjornstar)
- [CI] Try to build the examples (@bjornstar)
- Fix getUUID (@bjornstar)
- Specify all op strings (@bjornstar)
- Remove .travis.yml, update ignores (@bjornstar)
- [Examples] Readme & Usability Improvements (@bjornstar)
- Convert Triggers example to typescript (@bjornstar)
- Convert Trimesh Example to typescript (@bjornstar)
- Rebuild package (@stockHuman)
- Switch from CRA to vite (@bjornstar)
- feat: add applyTorque API to body (@a-type)
- Update readme.md (@kevinmcalear)
- Improve readme (@bjornstar)
- Wrap in canvas (@bjornstar)
- support missing world attributes (@drcmda)
- Add shouldInvalidate to readme code (@aunyks)
- [Examples] CubeHeap, click to change to spheres (@bjornstar)
- Expose WakeUp & Sleep API (stockHuman)
- Remove dead code (@Gusted)
- Setup automated hygiene (@bjornstar)
- Add prepare script (@bjornstar)
- Run CI on the master branch (@bjornstar)
- Don't build examples (@bjornstar)
- Add 'shouldInvalidate' prop to Physics provider component to allow for pausing the simulation (@aunyks)
- Update bug_report.md (@stockHuman)
- Integrate pausing functionality (@stockHuman)
- Set printWidth to 110 (@bjornstar)