这个API里没有看到有定点数相关的接口啊
怎么解决的 我也碰到了…
没解决
库要用@dimforge/rapier3d-compat 或@dimforge/rapier2d-compat
然后tsconfig.json要里的compilerOptions,添加"allowSyntheticDefaultImports": true
使用时直接
import RAPIER from ‘@dimforge/rapier2d-compat’;
或
import RAPIER from ‘@dimforge/rapier3d-compat’;
谢谢大佬,有时间我再试试
感谢 安装也能读取到RAPIER 但是调用api就报错了 new RAPIER.World就undefined了. 是wasm的原因?
你是怎么用的~
TA的官方文档有写
要先调用Rapier.init().then(()=>{})
才行以进行其他api调用,init主要就是异步加库wasm
你好,请问打包成微信小游戏报以下错误,WebAssembly.instantiate: first argument must be a string。有办法解决吗?
https://forum.cocos.org/t/topic/152688
这个要去ta 的github项目里,找一下WebAssembly.instantiate 的处理改了再重新打包一个版本来用了
试了吗?为啥我还是不好使
没有,没排期。
你是不是直接调ta库里的东西?按我的import RAPIER from ‘@dimforge/rapier2d-compat’;设置后, 每次都必须是RAPIER.Rigidbody这様, 你不能用import {Rigidbody} from ‘@dimforge/rapier2d-compat’, 这様调会显示Rigidbody undefine