[]Animation创建动画模板问题
请问动画模版支持通过打包后的图集方式创建吗,我通过如下方式创建会抛出异常:
// 动画模版
Laya.Animation.createFrames([{ url: "res/atlas/actor/character/idle.json", type: Laya.Loader.ATLAS }], ActionType.MOVE_STAND);
异常信息如下:
TypeError: url.indexOf is not a function
at Function.URL.formatURL (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/libs/laya.core.js:4418:12)
at Function.Loader.getRes (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/libs/laya.core.js:11178:32)
at Graphics.__proto.loadImage (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/libs/laya.core.js:1808:19)
at Function.Animation.createFrames (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/libs/laya.core.js:16442:8)
at new Character (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/js/actor/Character.js:31:28)
at Node.onCreated (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/js/map/Node.js:113:30)
at Handler.__proto.run (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/libs/laya.core.js:656:27)
at TiledMap.__proto.initMap (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/libs/laya.tiledmap.js:307:27)
at TiledMap.__proto.onTextureComplete (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/libs/laya.tiledmap.js:251:10)
at EventHandler.__proto.runWith (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/libs/laya.core.js:670:60)
// 动画模版
Laya.Animation.createFrames([{ url: "res/atlas/actor/character/idle.json", type: Laya.Loader.ATLAS }], ActionType.MOVE_STAND);
异常信息如下:
TypeError: url.indexOf is not a function
at Function.URL.formatURL (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/libs/laya.core.js:4418:12)
at Function.Loader.getRes (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/libs/laya.core.js:11178:32)
at Graphics.__proto.loadImage (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/libs/laya.core.js:1808:19)
at Function.Animation.createFrames (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/libs/laya.core.js:16442:8)
at new Character (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/js/actor/Character.js:31:28)
at Node.onCreated (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/js/map/Node.js:113:30)
at Handler.__proto.run (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/libs/laya.core.js:656:27)
at TiledMap.__proto.initMap (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/libs/laya.tiledmap.js:307:27)
at TiledMap.__proto.onTextureComplete (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/libs/laya.tiledmap.js:251:10)
at EventHandler.__proto.runWith (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/libs/laya.core.js:670:60)
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
cuixueying
赞同来自: