@babylonjs/lottie-player 8.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/animationConfiguration.d.ts +80 -0
- package/animationConfiguration.d.ts.map +1 -0
- package/animationConfiguration.js +16 -0
- package/animationConfiguration.js.map +1 -0
- package/index.d.ts +4 -0
- package/index.d.ts.map +1 -0
- package/index.js +3 -0
- package/index.js.map +1 -0
- package/license.md +21 -0
- package/localPlayer.d.ts +38 -0
- package/localPlayer.d.ts.map +1 -0
- package/localPlayer.js +100 -0
- package/localPlayer.js.map +1 -0
- package/maths/bezier.d.ts +45 -0
- package/maths/bezier.d.ts.map +1 -0
- package/maths/bezier.js +53 -0
- package/maths/bezier.js.map +1 -0
- package/maths/boundingBox.d.ts +39 -0
- package/maths/boundingBox.d.ts.map +1 -0
- package/maths/boundingBox.js +204 -0
- package/maths/boundingBox.js.map +1 -0
- package/maths/matrix.d.ts +92 -0
- package/maths/matrix.d.ts.map +1 -0
- package/maths/matrix.js +174 -0
- package/maths/matrix.js.map +1 -0
- package/messageTypes.d.ts +88 -0
- package/messageTypes.d.ts.map +1 -0
- package/messageTypes.js +2 -0
- package/messageTypes.js.map +1 -0
- package/nodes/controlNode.d.ts +32 -0
- package/nodes/controlNode.d.ts.map +1 -0
- package/nodes/controlNode.js +38 -0
- package/nodes/controlNode.js.map +1 -0
- package/nodes/node.d.ts +121 -0
- package/nodes/node.d.ts.map +1 -0
- package/nodes/node.js +357 -0
- package/nodes/node.js.map +1 -0
- package/nodes/spriteNode.d.ts +32 -0
- package/nodes/spriteNode.d.ts.map +1 -0
- package/nodes/spriteNode.js +51 -0
- package/nodes/spriteNode.js.map +1 -0
- package/package.json +48 -0
- package/parsing/parsedTypes.d.ts +141 -0
- package/parsing/parsedTypes.d.ts.map +1 -0
- package/parsing/parsedTypes.js +2 -0
- package/parsing/parsedTypes.js.map +1 -0
- package/parsing/parser.d.ts +59 -0
- package/parsing/parser.d.ts.map +1 -0
- package/parsing/parser.js +500 -0
- package/parsing/parser.js.map +1 -0
- package/parsing/rawTypes.d.ts +238 -0
- package/parsing/rawTypes.d.ts.map +1 -0
- package/parsing/rawTypes.js +4 -0
- package/parsing/rawTypes.js.map +1 -0
- package/parsing/spritePacker.d.ts +122 -0
- package/parsing/spritePacker.d.ts.map +1 -0
- package/parsing/spritePacker.js +409 -0
- package/parsing/spritePacker.js.map +1 -0
- package/player.d.ts +42 -0
- package/player.d.ts.map +1 -0
- package/player.js +146 -0
- package/player.js.map +1 -0
- package/readme.md +44 -0
- package/rendering/animationController.d.ts +93 -0
- package/rendering/animationController.d.ts.map +1 -0
- package/rendering/animationController.js +246 -0
- package/rendering/animationController.js.map +1 -0
- package/rendering/renderingManager.d.ts +46 -0
- package/rendering/renderingManager.d.ts.map +1 -0
- package/rendering/renderingManager.js +61 -0
- package/rendering/renderingManager.js.map +1 -0
- package/worker.d.ts +2 -0
- package/worker.d.ts.map +1 -0
- package/worker.js +62 -0
- package/worker.js.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parsedTypes.js","sourceRoot":"","sources":["../../../../dev/lottiePlayer/src/parsing/parsedTypes.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { RawLottieAnimation } from "./rawTypes.js";
|
|
2
|
+
import type { AnimationInfo } from "./parsedTypes.js";
|
|
3
|
+
import type { SpritePacker } from "./spritePacker.js";
|
|
4
|
+
import type { RenderingManager } from "../rendering/renderingManager.js";
|
|
5
|
+
import type { AnimationConfiguration } from "../animationConfiguration.js";
|
|
6
|
+
/**
|
|
7
|
+
* Parses a lottie animation file from a URL and returns the json representation of the file.
|
|
8
|
+
* @param urlToFile The URL to the Lottie animation file.
|
|
9
|
+
* @returns The json representation of the lottie animation.
|
|
10
|
+
*/
|
|
11
|
+
export declare function GetRawAnimationDataAsync(urlToFile: string): Promise<RawLottieAnimation>;
|
|
12
|
+
/**
|
|
13
|
+
* Parses a lottie animation file and converts it into a format that can be rendered by Babylon.js
|
|
14
|
+
* Important: not all lottie features are supported, you can call .debug() after parsing an animation to see what features were not supported.
|
|
15
|
+
*/
|
|
16
|
+
export declare class Parser {
|
|
17
|
+
private _packer;
|
|
18
|
+
private readonly _configuration;
|
|
19
|
+
private readonly _animationInfo;
|
|
20
|
+
private readonly _renderingManager;
|
|
21
|
+
private _rawFonts;
|
|
22
|
+
private _unsupportedFeatures;
|
|
23
|
+
private _rootNodes;
|
|
24
|
+
private _parentNodes;
|
|
25
|
+
/**
|
|
26
|
+
* Get the animation information parsed from the Lottie file.
|
|
27
|
+
*/
|
|
28
|
+
get animationInfo(): AnimationInfo;
|
|
29
|
+
/**
|
|
30
|
+
* Creates a new instance of the Lottie animations parser.
|
|
31
|
+
* @param packer Object that packs the sprites from the animation into a texture atlas.
|
|
32
|
+
* @param animationData The raw lottie animation as a JSON object.
|
|
33
|
+
* @param configuration Configuration options for the animation parser.
|
|
34
|
+
* @param renderingManager Object that manages the rendering of the sprites in the animation.
|
|
35
|
+
*/
|
|
36
|
+
constructor(packer: SpritePacker, animationData: RawLottieAnimation, configuration: AnimationConfiguration, renderingManager: RenderingManager);
|
|
37
|
+
/**
|
|
38
|
+
* Logs to the console all issues that were encountered during parsing the file.
|
|
39
|
+
*/
|
|
40
|
+
debug(): void;
|
|
41
|
+
private _loadFromData;
|
|
42
|
+
private _parseFonts;
|
|
43
|
+
private _reoderLayers;
|
|
44
|
+
private _searchBfs;
|
|
45
|
+
private _visitDfs;
|
|
46
|
+
private _parseLayer;
|
|
47
|
+
private _parseNullLayer;
|
|
48
|
+
private _parseShapeLayer;
|
|
49
|
+
private _parseTextLayer;
|
|
50
|
+
private _parseElements;
|
|
51
|
+
private _parseGroup;
|
|
52
|
+
private _parseShapes;
|
|
53
|
+
private _getTransform;
|
|
54
|
+
private _parseTransform;
|
|
55
|
+
private _fromLottieScalarToBabylonScalar;
|
|
56
|
+
private _fromLottieVector2ToBabylonVector2;
|
|
57
|
+
private _calculateFinalVector;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../../../dev/lottiePlayer/src/parsing/parser.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAGR,kBAAkB,EASrB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,aAAa,EAA+E,MAAM,eAAe,CAAC;AAEhI,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAKnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAItE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AA6BxE;;;;GAIG;AACH,wBAAsB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAG7F;AAED;;;GAGG;AACH,qBAAa,MAAM;IACf,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAyB;IACxD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAgB;IAC/C,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAmB;IAErD,OAAO,CAAC,SAAS,CAAoD;IACrE,OAAO,CAAC,oBAAoB,CAAW;IAEvC,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,YAAY,CAA8C;IAElE;;OAEG;IACH,IAAW,aAAa,IAAI,aAAa,CAExC;IAED;;;;;;OAMG;gBACgB,MAAM,EAAE,YAAY,EAAE,aAAa,EAAE,kBAAkB,EAAE,aAAa,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,gBAAgB;IAarJ;;OAEG;IACI,KAAK;IAOZ,OAAO,CAAC,aAAa;IA+BrB,OAAO,CAAC,WAAW;IAUnB,OAAO,CAAC,aAAa;IAyDrB,OAAO,CAAC,UAAU;IAclB,OAAO,CAAC,SAAS;IAcjB,OAAO,CAAC,WAAW;IAmEnB,OAAO,CAAC,eAAe;IAWvB,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,eAAe;IAmDvB,OAAO,CAAC,cAAc;IA2BtB,OAAO,CAAC,WAAW;IA4BnB,OAAO,CAAC,YAAY;IAwCpB,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,eAAe;IAUvB,OAAO,CAAC,gCAAgC;IAyFxC,OAAO,CAAC,kCAAkC;IA+F1C,OAAO,CAAC,qBAAqB;CA6DhC"}
|
|
@@ -0,0 +1,500 @@
|
|
|
1
|
+
import { ThinSprite } from "@babylonjs/core/Sprites/thinSprite.js";
|
|
2
|
+
import { SpriteNode } from "../nodes/spriteNode.js";
|
|
3
|
+
import { BezierCurve } from "../maths/bezier.js";
|
|
4
|
+
import { Node } from "../nodes/node.js";
|
|
5
|
+
import { ControlNode } from "../nodes/controlNode.js";
|
|
6
|
+
/**
|
|
7
|
+
* Default scale value for the scale property of a Lottie transform.
|
|
8
|
+
*/
|
|
9
|
+
const DefaultScale = { x: 1, y: 1 };
|
|
10
|
+
/**
|
|
11
|
+
* Default position value for the position property of a Lottie transform.
|
|
12
|
+
*/
|
|
13
|
+
const DefaultPosition = { x: 0, y: 0 };
|
|
14
|
+
/**
|
|
15
|
+
* Parses a lottie animation file from a URL and returns the json representation of the file.
|
|
16
|
+
* @param urlToFile The URL to the Lottie animation file.
|
|
17
|
+
* @returns The json representation of the lottie animation.
|
|
18
|
+
*/
|
|
19
|
+
export async function GetRawAnimationDataAsync(urlToFile) {
|
|
20
|
+
const animationData = await (await fetch(urlToFile)).text();
|
|
21
|
+
return JSON.parse(animationData);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Parses a lottie animation file and converts it into a format that can be rendered by Babylon.js
|
|
25
|
+
* Important: not all lottie features are supported, you can call .debug() after parsing an animation to see what features were not supported.
|
|
26
|
+
*/
|
|
27
|
+
export class Parser {
|
|
28
|
+
/**
|
|
29
|
+
* Get the animation information parsed from the Lottie file.
|
|
30
|
+
*/
|
|
31
|
+
get animationInfo() {
|
|
32
|
+
return this._animationInfo;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Creates a new instance of the Lottie animations parser.
|
|
36
|
+
* @param packer Object that packs the sprites from the animation into a texture atlas.
|
|
37
|
+
* @param animationData The raw lottie animation as a JSON object.
|
|
38
|
+
* @param configuration Configuration options for the animation parser.
|
|
39
|
+
* @param renderingManager Object that manages the rendering of the sprites in the animation.
|
|
40
|
+
*/
|
|
41
|
+
constructor(packer, animationData, configuration, renderingManager) {
|
|
42
|
+
this._rawFonts = new Map(); // Map of font names to raw font data
|
|
43
|
+
this._parentNodes = new Map(); // Map of nodes to build the scenegraph from the animation layers
|
|
44
|
+
this._packer = packer;
|
|
45
|
+
this._configuration = configuration;
|
|
46
|
+
this._renderingManager = renderingManager;
|
|
47
|
+
this._unsupportedFeatures = [];
|
|
48
|
+
this._parentNodes = new Map();
|
|
49
|
+
this._rootNodes = [];
|
|
50
|
+
this._animationInfo = this._loadFromData(animationData);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Logs to the console all issues that were encountered during parsing the file.
|
|
54
|
+
*/
|
|
55
|
+
debug() {
|
|
56
|
+
for (let i = 0; i < this._unsupportedFeatures.length; i++) {
|
|
57
|
+
// eslint-disable-next-line no-console
|
|
58
|
+
console.log(this._unsupportedFeatures[i]);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
_loadFromData(rawData) {
|
|
62
|
+
this._unsupportedFeatures.length = 0; // Clear previous errors
|
|
63
|
+
this._parseFonts(rawData);
|
|
64
|
+
// Layers data may come unorderer, we need to short into child-parents but maintaining z-order before parsing
|
|
65
|
+
const orderedLayers = this._reoderLayers(rawData.layers);
|
|
66
|
+
for (let i = 0; i < orderedLayers.length; i++) {
|
|
67
|
+
this._parseLayer(orderedLayers[i]);
|
|
68
|
+
}
|
|
69
|
+
// Update the atlas texture after creating all sprites from the animation
|
|
70
|
+
this._packer.updateAtlasTexture();
|
|
71
|
+
// Reorder the sprites from back to front
|
|
72
|
+
this._renderingManager.ready();
|
|
73
|
+
// Release the canvas to avoid memory leaks
|
|
74
|
+
this._packer.releaseCanvas();
|
|
75
|
+
this._packer = undefined; // Clear the reference to the sprite packer to allow garbage collection
|
|
76
|
+
return {
|
|
77
|
+
startFrame: rawData.ip,
|
|
78
|
+
endFrame: rawData.op,
|
|
79
|
+
frameRate: rawData.fr,
|
|
80
|
+
widthPx: rawData.w,
|
|
81
|
+
heightPx: rawData.h,
|
|
82
|
+
nodes: this._rootNodes,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
_parseFonts(rawData) {
|
|
86
|
+
if (rawData.fonts && rawData.fonts.list) {
|
|
87
|
+
for (const font of rawData.fonts.list) {
|
|
88
|
+
this._rawFonts.set(font.fName, font);
|
|
89
|
+
}
|
|
90
|
+
this._packer.rawFonts = this._rawFonts;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
_reoderLayers(layers) {
|
|
94
|
+
let unusedIndex = Number.MIN_SAFE_INTEGER;
|
|
95
|
+
const layerTrees = [];
|
|
96
|
+
let movedLayers = Number.MAX_VALUE;
|
|
97
|
+
while (movedLayers > 0) {
|
|
98
|
+
movedLayers = 0;
|
|
99
|
+
for (let i = 0; i < layers.length; i++) {
|
|
100
|
+
const layer = layers[i];
|
|
101
|
+
if (layer.ind === undefined) {
|
|
102
|
+
layer.ind = unusedIndex--; // Assign an unused index to the layer if it has no index
|
|
103
|
+
}
|
|
104
|
+
// Layers with no parents are top-level layers, push them to the final layers
|
|
105
|
+
// in the same order they are declared to preserve the z-order
|
|
106
|
+
if (layer.parent === undefined) {
|
|
107
|
+
layerTrees.push({
|
|
108
|
+
layer,
|
|
109
|
+
children: [],
|
|
110
|
+
});
|
|
111
|
+
layers.splice(i, 1);
|
|
112
|
+
i--;
|
|
113
|
+
movedLayers++;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
for (let j = 0; j < layerTrees.length; j++) {
|
|
117
|
+
const parent = this._searchBfs(layerTrees[j], layer.parent);
|
|
118
|
+
if (parent) {
|
|
119
|
+
parent.children.push({
|
|
120
|
+
layer,
|
|
121
|
+
children: [],
|
|
122
|
+
});
|
|
123
|
+
layers.splice(i, 1);
|
|
124
|
+
i--;
|
|
125
|
+
movedLayers++;
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
// Finally, convert the map to an array of layers
|
|
133
|
+
const finalLayersArray = [];
|
|
134
|
+
for (let i = 0; i < layerTrees.length; i++) {
|
|
135
|
+
finalLayersArray.push(...this._visitDfs(layerTrees[i]));
|
|
136
|
+
}
|
|
137
|
+
if (layers.length > 0) {
|
|
138
|
+
finalLayersArray.push(...layers); // Add any remaining layers that were not processed
|
|
139
|
+
}
|
|
140
|
+
return finalLayersArray;
|
|
141
|
+
}
|
|
142
|
+
_searchBfs(tree, index) {
|
|
143
|
+
const queue = [tree];
|
|
144
|
+
while (queue.length > 0) {
|
|
145
|
+
const current = queue.shift();
|
|
146
|
+
if (current.layer.ind === index) {
|
|
147
|
+
return current;
|
|
148
|
+
}
|
|
149
|
+
for (let i = 0; i < current.children.length; i++) {
|
|
150
|
+
queue.push(current.children[i]);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
return undefined;
|
|
154
|
+
}
|
|
155
|
+
_visitDfs(tree) {
|
|
156
|
+
const result = [];
|
|
157
|
+
const visit = (node) => {
|
|
158
|
+
result.push(node.layer);
|
|
159
|
+
for (let i = 0; i < node.children.length; i++) {
|
|
160
|
+
visit(node.children[i]);
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
visit(tree);
|
|
164
|
+
return result;
|
|
165
|
+
}
|
|
166
|
+
_parseLayer(layer) {
|
|
167
|
+
if (layer.hd === true) {
|
|
168
|
+
return; // Ignore hidden layers
|
|
169
|
+
}
|
|
170
|
+
// We only support null, shape and text layers
|
|
171
|
+
if (layer.ty !== 3 && layer.ty !== 4 && layer.ty !== 5) {
|
|
172
|
+
this._unsupportedFeatures.push(`UnsupportedLayerType - Layer Name: ${layer.nm} - Layer Index: ${layer.ind} - Layer Type: ${layer.ty}`);
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
if (layer.ip === undefined || layer.op === undefined || layer.st === undefined) {
|
|
176
|
+
this._unsupportedFeatures.push(`Layer without required values - Layer Name: ${layer.nm}`);
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
let parentNode = undefined;
|
|
180
|
+
if (layer.parent) {
|
|
181
|
+
parentNode = this._parentNodes.get(layer.parent);
|
|
182
|
+
if (parentNode === undefined) {
|
|
183
|
+
this._unsupportedFeatures.push(`Parent node with index ${layer.parent} not found for layer ${layer.nm}`);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
const transform = this._parseTransform(layer.ks);
|
|
187
|
+
const trsNode = new ControlNode(`ControlNode (TRS) - ${layer.nm}`, layer.ip, layer.op, transform.position, transform.rotation, transform.scale, transform.opacity, parentNode);
|
|
188
|
+
let anchorNode = undefined;
|
|
189
|
+
switch (layer.ty) {
|
|
190
|
+
case 3: // Null layer
|
|
191
|
+
anchorNode = this._parseNullLayer(layer, transform, trsNode);
|
|
192
|
+
break;
|
|
193
|
+
case 4: // Shape layer
|
|
194
|
+
anchorNode = this._parseShapeLayer(layer, transform, trsNode);
|
|
195
|
+
break;
|
|
196
|
+
case 5: // Text layer
|
|
197
|
+
anchorNode = this._parseTextLayer(layer, transform, trsNode);
|
|
198
|
+
if (anchorNode === undefined) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
// If no parent, this is a top level node, add it to the root nodes for rendering
|
|
204
|
+
if (layer.parent === undefined) {
|
|
205
|
+
this._rootNodes.push(trsNode);
|
|
206
|
+
}
|
|
207
|
+
if (anchorNode === undefined) {
|
|
208
|
+
this._unsupportedFeatures.push(`Layer ${layer.nm} did not generate an anchor node, this is unexpected and should be investigated.`);
|
|
209
|
+
}
|
|
210
|
+
if (layer.ind !== undefined && anchorNode) {
|
|
211
|
+
this._parentNodes.set(layer.ind, anchorNode);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
_parseNullLayer(layer, transform, parent) {
|
|
215
|
+
return new Node(`Node (Anchor) - ${layer.nm}`, transform.anchorPoint, undefined, // Rotation is not used for anchor point
|
|
216
|
+
undefined, // Scale is not used for anchor point
|
|
217
|
+
undefined, // Opacity is not used for anchor point
|
|
218
|
+
parent);
|
|
219
|
+
}
|
|
220
|
+
_parseShapeLayer(layer, transform, parent) {
|
|
221
|
+
const anchorNode = this._parseNullLayer(layer, transform, parent);
|
|
222
|
+
this._parseElements(layer.shapes, anchorNode);
|
|
223
|
+
return anchorNode;
|
|
224
|
+
}
|
|
225
|
+
_parseTextLayer(layer, transform, parent) {
|
|
226
|
+
// Get the scale and add the sprite to the texture packer
|
|
227
|
+
const currentScale = { x: 1, y: 1 };
|
|
228
|
+
const tempPosition = { x: 1, y: 1 };
|
|
229
|
+
parent.worldMatrix.decompose(currentScale, tempPosition);
|
|
230
|
+
const spriteInfo = this._packer.addLottieText(layer.t, currentScale);
|
|
231
|
+
if (spriteInfo === undefined) {
|
|
232
|
+
return undefined;
|
|
233
|
+
}
|
|
234
|
+
// Build the ThinSprite from the texture packer information
|
|
235
|
+
const sprite = new ThinSprite();
|
|
236
|
+
// Set sprite UV coordinates
|
|
237
|
+
sprite._xOffset = spriteInfo.uOffset;
|
|
238
|
+
sprite._yOffset = spriteInfo.vOffset;
|
|
239
|
+
sprite._xSize = spriteInfo.cellWidth;
|
|
240
|
+
sprite._ySize = spriteInfo.cellHeight;
|
|
241
|
+
// Set sprite dimensions for rendering
|
|
242
|
+
sprite.width = spriteInfo.widthPx;
|
|
243
|
+
sprite.height = spriteInfo.heightPx;
|
|
244
|
+
sprite.invertV = true;
|
|
245
|
+
this._renderingManager.addSprite(sprite);
|
|
246
|
+
const positionProperty = {
|
|
247
|
+
startValue: { x: transform.anchorPoint.startValue.x, y: transform.anchorPoint.startValue.y },
|
|
248
|
+
currentValue: { x: transform.anchorPoint.currentValue.x, y: transform.anchorPoint.currentValue.y },
|
|
249
|
+
currentKeyframeIndex: 0,
|
|
250
|
+
};
|
|
251
|
+
positionProperty.startValue.x += spriteInfo.centerX;
|
|
252
|
+
positionProperty.currentValue.x += spriteInfo.centerX;
|
|
253
|
+
// For text, its Y position is at the baseline, so we need to offset it by half the height of the text upwards
|
|
254
|
+
positionProperty.startValue.y += spriteInfo.centerY;
|
|
255
|
+
positionProperty.currentValue.y += spriteInfo.centerY;
|
|
256
|
+
return new SpriteNode("Sprite", sprite, positionProperty, undefined, // Rotation is not used for sprites final transform
|
|
257
|
+
undefined, // Scale is not used for sprites final transform
|
|
258
|
+
undefined, // Opacity is not used for sprites final transform
|
|
259
|
+
parent);
|
|
260
|
+
}
|
|
261
|
+
_parseElements(elements, parent) {
|
|
262
|
+
if (elements === undefined || elements.length <= 0) {
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
for (let i = 0; i < elements.length; i++) {
|
|
266
|
+
if (elements[i].hd === true) {
|
|
267
|
+
continue; // Ignore hidden shapes
|
|
268
|
+
}
|
|
269
|
+
if (elements[i].ty === "tr") {
|
|
270
|
+
continue; // Transforms are parsed as part of other elements, so we can ignore it
|
|
271
|
+
}
|
|
272
|
+
if (elements[i].ty === "gr") {
|
|
273
|
+
this._parseGroup(elements[i], parent);
|
|
274
|
+
//break;
|
|
275
|
+
}
|
|
276
|
+
else if (elements[i].ty === "sh" || elements[i].ty === "rc") {
|
|
277
|
+
this._parseShapes(elements, parent);
|
|
278
|
+
break; // After parsing the shapes, this array of elements is done
|
|
279
|
+
}
|
|
280
|
+
else {
|
|
281
|
+
this._unsupportedFeatures.push(`Only groups or shapes are supported as children of layers - Name: ${elements[i].nm} Type: ${elements[i].ty}`);
|
|
282
|
+
continue;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
_parseGroup(group, parent) {
|
|
287
|
+
if (group.it === undefined || group.it.length === 0) {
|
|
288
|
+
this._unsupportedFeatures.push(`Unexpected empty group: ${group.nm}`);
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
const transform = this._getTransform(group.it);
|
|
292
|
+
if (transform === undefined) {
|
|
293
|
+
this._unsupportedFeatures.push(`Group ${group.nm} does not have a transform which is not supported`);
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
// Create the nodes on the scenegraph for this group
|
|
297
|
+
const trsNode = new Node(`Node (TRS)- ${group.nm}`, transform.position, transform.rotation, transform.scale, transform.opacity, parent);
|
|
298
|
+
const anchorNode = new Node(`Node (Anchor) - ${group.nm}`, transform.anchorPoint, undefined, // Rotation is not used for anchor point
|
|
299
|
+
undefined, // Scale is not used for anchor point
|
|
300
|
+
undefined, // Opacity is not used for anchor point
|
|
301
|
+
trsNode);
|
|
302
|
+
// Parse the children of the group
|
|
303
|
+
this._parseElements(group.it, anchorNode);
|
|
304
|
+
}
|
|
305
|
+
_parseShapes(elements, parent) {
|
|
306
|
+
// Get the scale and add the sprite to the texture packer
|
|
307
|
+
const currentScale = { x: 1, y: 1 };
|
|
308
|
+
const tempPosition = { x: 1, y: 1 };
|
|
309
|
+
parent.worldMatrix.decompose(currentScale, tempPosition);
|
|
310
|
+
const spriteInfo = this._packer.addLottieShape(elements, currentScale);
|
|
311
|
+
// Build the ThinSprite from the texture packer information
|
|
312
|
+
const sprite = new ThinSprite();
|
|
313
|
+
// Set sprite UV coordinates
|
|
314
|
+
sprite._xOffset = spriteInfo.uOffset;
|
|
315
|
+
sprite._yOffset = spriteInfo.vOffset;
|
|
316
|
+
sprite._xSize = spriteInfo.cellWidth;
|
|
317
|
+
sprite._ySize = spriteInfo.cellHeight;
|
|
318
|
+
// Set sprite dimensions for rendering
|
|
319
|
+
sprite.width = spriteInfo.widthPx;
|
|
320
|
+
sprite.height = spriteInfo.heightPx;
|
|
321
|
+
sprite.invertV = true;
|
|
322
|
+
this._renderingManager.addSprite(sprite);
|
|
323
|
+
const positionProperty = {
|
|
324
|
+
startValue: { x: spriteInfo.centerX || 0, y: -spriteInfo.centerY || 0 },
|
|
325
|
+
currentValue: { x: spriteInfo.centerX || 0, y: -spriteInfo.centerY || 0 },
|
|
326
|
+
currentKeyframeIndex: 0,
|
|
327
|
+
};
|
|
328
|
+
new SpriteNode("Sprite", sprite, positionProperty, undefined, // Rotation is not used for sprites final transform
|
|
329
|
+
undefined, // Scale is not used for sprites final transform
|
|
330
|
+
undefined, // Opacity is not used for sprites final transform
|
|
331
|
+
parent);
|
|
332
|
+
}
|
|
333
|
+
_getTransform(elements) {
|
|
334
|
+
if (!elements || elements.length === 0) {
|
|
335
|
+
return undefined;
|
|
336
|
+
}
|
|
337
|
+
// Lottie format mandates the transform is the last item on a list of elements
|
|
338
|
+
if (elements[elements.length - 1].ty !== "tr") {
|
|
339
|
+
return undefined;
|
|
340
|
+
}
|
|
341
|
+
return this._parseTransform(elements[elements.length - 1]);
|
|
342
|
+
}
|
|
343
|
+
_parseTransform(transform) {
|
|
344
|
+
return {
|
|
345
|
+
opacity: this._fromLottieScalarToBabylonScalar(transform.o, "Opacity", 1),
|
|
346
|
+
rotation: this._fromLottieScalarToBabylonScalar(transform.r, "Rotation", 0),
|
|
347
|
+
scale: this._fromLottieVector2ToBabylonVector2(transform.s, "Scale", DefaultScale),
|
|
348
|
+
position: this._fromLottieVector2ToBabylonVector2(transform.p, "Position", DefaultPosition),
|
|
349
|
+
anchorPoint: this._fromLottieVector2ToBabylonVector2(transform.a, "AnchorPoint", DefaultPosition),
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
_fromLottieScalarToBabylonScalar(property, scalarType, defaultValue) {
|
|
353
|
+
if (!property) {
|
|
354
|
+
return {
|
|
355
|
+
startValue: defaultValue,
|
|
356
|
+
currentValue: defaultValue,
|
|
357
|
+
currentKeyframeIndex: 0,
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
if (property.a === 0) {
|
|
361
|
+
let startValue = property.k;
|
|
362
|
+
if (scalarType === "Opacity") {
|
|
363
|
+
startValue = startValue / 100;
|
|
364
|
+
}
|
|
365
|
+
if (scalarType === "Rotation") {
|
|
366
|
+
startValue = (-1 * (startValue * Math.PI)) / 180; // Lottie uses degrees for rotation, convert to radians
|
|
367
|
+
}
|
|
368
|
+
return {
|
|
369
|
+
startValue: startValue,
|
|
370
|
+
currentValue: startValue,
|
|
371
|
+
currentKeyframeIndex: 0,
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
const keyframes = [];
|
|
375
|
+
const rawKeyFrames = property.k;
|
|
376
|
+
let i = 0;
|
|
377
|
+
for (i = 0; i < rawKeyFrames.length; i++) {
|
|
378
|
+
let easeFunction = undefined;
|
|
379
|
+
if (rawKeyFrames[i].o !== undefined && rawKeyFrames[i].i !== undefined) {
|
|
380
|
+
if (Array.isArray(rawKeyFrames[i].o.x)) {
|
|
381
|
+
// Value is an array
|
|
382
|
+
easeFunction = new BezierCurve(rawKeyFrames[i].o.x[0], rawKeyFrames[i].o.y[0], rawKeyFrames[i].i.x[0], rawKeyFrames[i].i.y[0], this._configuration.easingSteps);
|
|
383
|
+
}
|
|
384
|
+
else {
|
|
385
|
+
// Value is a number
|
|
386
|
+
easeFunction = new BezierCurve(rawKeyFrames[i].o.x, rawKeyFrames[i].o.y, rawKeyFrames[i].i.x, rawKeyFrames[i].i.y, this._configuration.easingSteps);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
let value = rawKeyFrames[i].s[0];
|
|
390
|
+
if (scalarType === "Opacity") {
|
|
391
|
+
value = value / 100;
|
|
392
|
+
}
|
|
393
|
+
if (scalarType === "Rotation") {
|
|
394
|
+
value = (value * Math.PI) / 180; // Lottie uses degrees for rotation, convert to radians
|
|
395
|
+
}
|
|
396
|
+
keyframes.push({
|
|
397
|
+
value: value,
|
|
398
|
+
time: rawKeyFrames[i].t,
|
|
399
|
+
easeFunction: easeFunction, // We assume that the ease function is always defined if we have keyframes
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
let startValue = rawKeyFrames[0].s[0];
|
|
403
|
+
if (scalarType === "Opacity") {
|
|
404
|
+
startValue = startValue / 100;
|
|
405
|
+
}
|
|
406
|
+
if (scalarType === "Rotation") {
|
|
407
|
+
startValue = (-1 * (startValue * Math.PI)) / 180; // Lottie uses degrees for rotation, convert to radians
|
|
408
|
+
}
|
|
409
|
+
return {
|
|
410
|
+
startValue: startValue,
|
|
411
|
+
currentValue: startValue,
|
|
412
|
+
keyframes: keyframes,
|
|
413
|
+
currentKeyframeIndex: 0,
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
_fromLottieVector2ToBabylonVector2(property, vectorType, defaultValue) {
|
|
417
|
+
if (!property) {
|
|
418
|
+
return {
|
|
419
|
+
startValue: defaultValue,
|
|
420
|
+
currentValue: defaultValue,
|
|
421
|
+
currentKeyframeIndex: 0,
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
if (property.l !== undefined && property.l !== 2) {
|
|
425
|
+
this._unsupportedFeatures.push(`Invalid Vector2 Length - Length: ${property.l}`);
|
|
426
|
+
return {
|
|
427
|
+
startValue: defaultValue,
|
|
428
|
+
currentValue: defaultValue,
|
|
429
|
+
currentKeyframeIndex: 0,
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
if (property.a === 0) {
|
|
433
|
+
const values = property.k;
|
|
434
|
+
const value = this._calculateFinalVector(values[0], values[1], vectorType);
|
|
435
|
+
return {
|
|
436
|
+
startValue: value,
|
|
437
|
+
currentValue: value,
|
|
438
|
+
currentKeyframeIndex: 0,
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
const keyframes = [];
|
|
442
|
+
const rawKeyFrames = property.k;
|
|
443
|
+
let i = 0;
|
|
444
|
+
for (i = 0; i < rawKeyFrames.length; i++) {
|
|
445
|
+
let easeFunction1 = undefined;
|
|
446
|
+
if (rawKeyFrames[i].o !== undefined && rawKeyFrames[i].i !== undefined) {
|
|
447
|
+
if (Array.isArray(rawKeyFrames[i].o.x)) {
|
|
448
|
+
// Value is an array
|
|
449
|
+
easeFunction1 = new BezierCurve(rawKeyFrames[i].o.x[0], rawKeyFrames[i].o.y[0], rawKeyFrames[i].i.x[0], rawKeyFrames[i].i.y[0], this._configuration.easingSteps);
|
|
450
|
+
}
|
|
451
|
+
else {
|
|
452
|
+
// Value is a number
|
|
453
|
+
easeFunction1 = new BezierCurve(rawKeyFrames[i].o.x, rawKeyFrames[i].o.y, rawKeyFrames[i].i.x, rawKeyFrames[i].i.y, this._configuration.easingSteps);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
let easeFunction2 = undefined;
|
|
457
|
+
if (rawKeyFrames[i].o !== undefined && rawKeyFrames[i].i !== undefined) {
|
|
458
|
+
if (Array.isArray(rawKeyFrames[i].o.x)) {
|
|
459
|
+
// Value is an array
|
|
460
|
+
easeFunction2 = new BezierCurve(rawKeyFrames[i].o.x[1], rawKeyFrames[i].o.y[1], rawKeyFrames[i].i.x[1], rawKeyFrames[i].i.y[1], this._configuration.easingSteps);
|
|
461
|
+
}
|
|
462
|
+
else {
|
|
463
|
+
// Value is a number
|
|
464
|
+
easeFunction2 = new BezierCurve(rawKeyFrames[i].o.x, rawKeyFrames[i].o.y, rawKeyFrames[i].i.x, rawKeyFrames[i].i.y, this._configuration.easingSteps);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
keyframes.push({
|
|
468
|
+
value: this._calculateFinalVector(rawKeyFrames[i].s[0], rawKeyFrames[i].s[1], vectorType),
|
|
469
|
+
time: rawKeyFrames[i].t,
|
|
470
|
+
easeFunction1: easeFunction1, // We assume that the ease function is always defined if we have keyframes
|
|
471
|
+
easeFunction2: easeFunction2, // We assume that the ease function is always defined if we have keyframes
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
const startValue = this._calculateFinalVector(rawKeyFrames[0].s[0], rawKeyFrames[0].s[1], vectorType);
|
|
475
|
+
return {
|
|
476
|
+
startValue: startValue,
|
|
477
|
+
currentValue: { x: startValue.x, y: startValue.y }, // All vectors are passed by reference, so we need to create a copy to avoid modifying the start value
|
|
478
|
+
keyframes: keyframes,
|
|
479
|
+
currentKeyframeIndex: 0,
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
_calculateFinalVector(x, y, vectorType) {
|
|
483
|
+
const result = { x, y };
|
|
484
|
+
if (vectorType === "Position") {
|
|
485
|
+
// Lottie uses a different coordinate system for position, so we need to invert the Y value
|
|
486
|
+
result.y = -result.y;
|
|
487
|
+
}
|
|
488
|
+
else if (vectorType === "AnchorPoint") {
|
|
489
|
+
// Lottie uses a different coordinate system for anchor point, so we need to invert the X value
|
|
490
|
+
result.x = -result.x;
|
|
491
|
+
}
|
|
492
|
+
else if (vectorType === "Scale") {
|
|
493
|
+
// Lottie uses a different coordinate system for scale, so we need to divide by 100
|
|
494
|
+
result.x = result.x / 100;
|
|
495
|
+
result.y = result.y / 100;
|
|
496
|
+
}
|
|
497
|
+
return result;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
//# sourceMappingURL=parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.js","sourceRoot":"","sources":["../../../../dev/lottiePlayer/src/parsing/parser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,8CAAgC;AAkBrD,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAG9C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAanD;;GAEG;AACH,MAAM,YAAY,GAAiB,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,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