Open chenlhuaf opened 2 years ago
{ "name": "vue-oasis", "version": "0.0.0", "scripts": { "dev": "vite", "build": "vue-tsc --noEmit --skipLibCheck && vite build", "serve": "vite preview" }, "dependencies": { "@oasis-engine-toolkit/controls": "0.8.0-beta.3", "@oasis-engine/baker": "1.3.0-beta.0", "@oasis-engine/lottie": "0.8.0", "@oasis-engine/physics-lite": "0.8.0-beta.3", "@oasis-engine/physics-physx": "0.8.0-beta.3", "@oasis-engine/spine": "0.2.1", "@tweenjs/tween.js": "18.6.4", "dat.gui": "0.7.7", "oasis-engine": "0.8.0-beta.3", "oasis-engine-toolkit": "0.8.0-beta.3", "vue": "^3.2.0" }, "devDependencies": { "@vitejs/plugin-vue": "^2.2.0", "typescript": "^4.1.3", "vite": "^2", "vue-tsc": "^0.29.8" } }
我猜是路由切换的时候,包含 Canvas 的 vue 组件被销毁掉了,最好在切页面之前执行一下 engine.pause()
,如果 Canvas 都销毁了,建议执行 engine.destroy()
,这样可以避免内存泄漏。
建议先升级到最新的 beta 版本 0.8.0-beta.26,我们做了一下销毁的兜底
建议先升级到最新的 beta 版本 0.8.0-beta.26,我们做了一下销毁的兜底
好的,使用这个版本有所改善,但是同场景下,2D文字渲染还有有问题。
@chenlhuaf https://stackblitz.com/ 上创建一个复现项目给我们看下吧
@chenlhuaf https://stackblitz.com/ 上创建一个复现项目给我们看下吧
好的
Describe the bug 使用单页面应用时进行路由跳转后oasis组件报错,reload页面正常
To Reproduce Steps to reproduce the behavior:
使用的版本 0.8.0-beta.3