使用spine-player版本是4.2.59
我的代码是这样写的:
new SpinePlayer(spineContainer.value, {
jsonUrl: '/src/assets/spine/kln_cj.json',
atlasUrl: '/src/assets/spine/kln_cj.atlas',
alpha: true,
backgroundColor: '#00000000',
premultipliedAlpha: false,
showLoading: false,
showControls: false,
viewport: {
x: -300,
y: 0,
width: 600,
height: 400,
padLeft: '5%',
padRight: '5%',
padTop: '5%',
padBottom: '5%'
},
success: function(player) {
player.play() // 开始播放动画
}
})