@pmndrs/cannon-worker-api
Web worker API for cannon-es. Primarily used in @react-three/cannon.
An API to use cannon-es in a web worker
Web worker API for cannon-es. Primarily used in @react-three/cannon.
README.md
] Improve links to related packages (@bjornstar)frictionGravity
on WorldProps (@chnicoloso)postMessage
that queues the messages if there is no workerconnect
, we instantiate the worker, add the onmessage handler and flush the messageQueuedisconnect
, removes the onmessage handler (probably unnecessary)init
now takes world
instead of state
three.js
is now a peerDependency
and requires r139 or higherdevDependencies
src/worker
] self.postMessage should be typed to ensure we match API types (@bjornstar)src/worker
] Stop using non-null assertions (@bjornstar)addBodies
] If the body or target does not have a uuid, don't process the event (@bjornstar)addRay
] If the body does not have a uuid, don't process the event (@bjornstar)package.json
] Has one dependency: three
(@bjornstar).eslintrc.json
] Clean up (@bjornstar).eslintrc.json
] Disallow non-null assertions (@bjornstar)