Skip to content

关于开启Pixi v8中webgpu渲染报错的问题 #7

@KevinZzzGit

Description

@KevinZzzGit

首先,非常感谢你为开源社区贡献了如此优秀的项目以及清晰的开发文档!

我在使用webgl渲染时行为正常,但是使用webgpu渲染时遇到了以下问题:

问题描述

  • 在chrome 132环境下,想要开启PixiJs v8.x中的WebGPU渲染,但是会抛出以下异常

    Uncaught (in promise) TypeError: Cannot read properties of null (reading 'isContextLost')
        at ActionsManager.isContextLost (easy-live2d.js?v=a95c88dd:17504:35)
        at Live2DSprite.initActionsManager (easy-live2d.js?v=a95c88dd:17832:36)
        at async Live2DSprite._onRender (easy-live2d.js?v=a95c88dd:17624:9)
    

复现代码

仅仅在easy-live2d-playground项目中开启了webgpu加速

const app = new PIXI.Application()
await app.init({
    view: canvasRef.value,
    backgroundAlpha: 0, // 如果需要透明,可以设置alpha为0
    preference: "webgpu", 
  });

我对于这一块知识比较薄弱,想知道如何解决它。谢谢~

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions