Commit be66c9a8 authored by wjf's avatar wjf

2.0.30

parent 46806a25
This diff is collapsed.
This diff is collapsed.
...@@ -75,21 +75,26 @@ ...@@ -75,21 +75,26 @@
if (name.indexOf(".svga") >= 0) { if (name.indexOf(".svga") >= 0) {
SvgaParser.loadSvga(src, (v) => { SvgaParser.loadSvga(src, (v) => {
console.log(v) console.log(v)
window.asd= stage.addChild(new FYGE.SvgaAni(v)) window.asd = stage.addChild(new FYGE.SvgaAni(v))
// .position.set( // .position.set(
// (750 - v.videoSize.width) / 2, // (750 - v.videoSize.width) / 2,
// (stage.viewRect.height - v.videoSize.height) / 2, // (stage.viewRect.height - v.videoSize.height) / 2,
// ) // )
window.asd.stop(); // window.asd.stop();
}) }, (e) => { console.log(e) })
} else { } else {
//加载 //加载
FYGE.GlobalLoader.loadJson((s, json) => { FYGE.GlobalLoader.loadJson((s, json) => {
var l = stage.addChild(new FYGE.Lottie(json)) console.log(json)
// l.position.set((750 - json.w) / 2, (stage.viewRect.height - json.h) / 2); try {
l.play(); var l = stage.addChild(new FYGE.Lottie(json))
window.asd=l; // l.position.set((750 - json.w) / 2, (stage.viewRect.height - json.h) / 2);
window.asd.stop(); l.play();
window.asd = l;
// window.asd.stop();
} catch (e) {
console.log(e)
}
}, src) }, src)
} }
} }
...@@ -102,7 +107,7 @@ ...@@ -102,7 +107,7 @@
sssss sssss
},1000) },1000)
</script> --> </script> -->
</body> </body>
</html> </html>
\ No newline at end of file
{ {
"name": "fyge", "name": "fyge",
"version": "2.0.29", "version": "2.0.30",
"description": "canvas渲染引擎", "description": "canvas渲染引擎",
"main": "./build/fyge.min.js", "main": "./build/fyge.min.js",
"types": "./build/types.d.ts", "types": "./build/types.d.ts",
......
...@@ -387,6 +387,12 @@ ...@@ -387,6 +387,12 @@
Lottie文件里的LottieVisibleTrack类的resetValue方法里添加执行this.setValue(0); Lottie文件里的LottieVisibleTrack类的resetValue方法里添加执行this.setValue(0);
Lottie文件里的createLottieTracks方法里实例Sprite时获取纹理的逻辑修改,textures不存在或textures里字段不存在时取全局 Lottie文件里的createLottieTracks方法里实例Sprite时获取纹理的逻辑修改,textures不存在或textures里字段不存在时取全局
2.0.30 Lottie的init方法里遍历tracks加了一段给LottieExpressionTrack的帧率赋值
Lottie文件里增加setValue函数
比如LottieBaseTrack的setValue方法替换成setValue
Lottie新增时间轴LottieExpressionTrack,parseExpression函数,runExpressionNode函数
Lottie文件的createLottieTracks方法里把原先分开属性修改成["o", "r", "p", "s"]数组遍历
大尺寸纹理首次传gpu使用时会掉帧,越大耗时越多。考虑如何处理 大尺寸纹理首次传gpu使用时会掉帧,越大耗时越多。考虑如何处理
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* @name VERSION * @name VERSION
* @type {string} * @type {string}
*/ */
export const VERSION = "2.0.29"; export const VERSION = "2.0.30";
/** /**
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment