使用web player渲染时,网格效果未生效,比如:使用mesh的眨眼动画没有效果,请问我是不是忽略了什么配置
spine web player的网格不起效
- Изменено
网络播放器支持 Spine 的所有功能。 您确定您使用的是网络播放器吗? 我怀疑您使用的是不支持网格的书脊画布后端。 请提供重现该问题的代码。
The web player supports all features of Spine. Are you sure you are using the web player? I suspect you are using the spine-canvas backend, which does not support meshes. Please provide code that reproduces the issue.
这是我使用的版本
"@esotericsoftware/spine-core": "^4.2.4",
"@esotericsoftware/spine-player": "^4.2.4",
初始化player
initPlayer(){
return new Promise(async(resolve,reject)=>{
new spine.SpinePlayer('player-container', {
jsonUrl: 'sketch/jj/jj.json',
atlasUrl: 'sketch/jj/jj.atlas',
animation: 'idle',
skin:'',
premultipliedAlpha: true,
alpha: true,
backgroundColor: "#00000000",
// defaultMix:0.3,
viewport: {
debugRender: false,
width: this.width,
height: this.height,
x: -this.width/2,
y: 0,
padLeft: "0%",
padRight: "0%",
padTop: "0%",
padBottom: "0%",
},
showControls: false,
showLoading:false,
success: async(player)=>{
this.player = player;
resolve()
}).catch(err=>{
console.error(err)
})
},
error: (player, reason)=>{
reject(reason);
}
});
})
},
是否需要额外的配置项呢,这个动画在spine-libgdx上可以渲染正常
我测试发现使用官网的原生spine-player.js可以渲染出该动画效果,引入npm包的项目不行
请将您导出的骨架文件(.json、.atlas、.png)发送至contact@esotericsoftware.com 或在此处发布。
Please send your exported skeleton files (.json, .atlas, .png) to contact@esotericsoftware.com or post them here.