@zcomponent/core 2.0.0-alpha.2 → 2.0.0-alpha.3
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/lib/animation/layer.js
CHANGED
|
@@ -191,6 +191,11 @@ export class Layer {
|
|
|
191
191
|
break;
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
+
// If this clip is already in the queue (still fading out from a previous
|
|
195
|
+
// switch), remove that old entry before re-adding it, so the same LayerClip
|
|
196
|
+
// is never queued twice. Otherwise, when tick() later cleans up the old
|
|
197
|
+
// entry, it pauses the clip - which is now also the active one - freezing it.
|
|
198
|
+
this._queue = this._queue.filter(entry => entry === this._active || entry.layerClip !== layerClip);
|
|
194
199
|
const entry = this.queue(layerClip, {
|
|
195
200
|
...playOptions,
|
|
196
201
|
fade: playOptions?.fade !== undefined ? playOptions.fade : this._active === undefined || layerClip === undefined ? { time: 0, easing: null } : undefined,
|
|
@@ -187,7 +187,18 @@ export class StreamTrack extends Track {
|
|
|
187
187
|
}
|
|
188
188
|
else {
|
|
189
189
|
const [bt, loopNumber] = resolveClipTimeLoops(t, block.t0, block.s0, block.rate, this.stream?.length?.() ?? Infinity, rate * block.rate < 0, block.t1);
|
|
190
|
-
if (
|
|
190
|
+
if (block.t1 !== undefined && block.t1 === block.t0) {
|
|
191
|
+
// Zero-length (state) block: seek to its start offset and hold. Without
|
|
192
|
+
// this the boundary check below pauses before seeking, so the state
|
|
193
|
+
// never applies (e.g. a "reset" streamed from a sub-component).
|
|
194
|
+
if (this._lastLoopNumber !== loopNumber || lastBlock !== block) {
|
|
195
|
+
this._lastLoopNumber = loopNumber;
|
|
196
|
+
force = true;
|
|
197
|
+
this.stream?.seek(block.s0);
|
|
198
|
+
}
|
|
199
|
+
desiredState = StreamState.Paused;
|
|
200
|
+
}
|
|
201
|
+
else if ((t === block.t1 && rate >= +0) || (t === block.t0 && rate < 0)) {
|
|
191
202
|
desiredState = StreamState.Paused;
|
|
192
203
|
force = true;
|
|
193
204
|
}
|
package/package.json
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
2
|
+
"name": "@zcomponent/core",
|
|
3
|
+
"version": "2.0.0-alpha.3",
|
|
4
|
+
"description": "The core component model and built-in functionality for Mattercraft.",
|
|
5
|
+
"author": "Zappar Limited",
|
|
6
|
+
"license": "Proprietary",
|
|
7
|
+
"main": "index.js",
|
|
8
|
+
"types": "index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"development": "./src/index.ts",
|
|
12
|
+
"types": "./index.d.ts",
|
|
13
|
+
"default": "./index.js"
|
|
14
|
+
},
|
|
15
|
+
"./*": {
|
|
16
|
+
"development": "./src/*.ts",
|
|
17
|
+
"types": "./lib/*.d.ts",
|
|
18
|
+
"default": "./lib/*.js"
|
|
19
|
+
},
|
|
20
|
+
"./lib/*": {
|
|
21
|
+
"development": "./src/*.ts",
|
|
22
|
+
"types": "./lib/*.d.ts",
|
|
23
|
+
"default": "./lib/*.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"type": "module",
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=12.0.0",
|
|
29
|
+
"browsers": "defaults"
|
|
30
|
+
},
|
|
31
|
+
"zexports": [
|
|
32
|
+
"./lib/components/**/*",
|
|
33
|
+
"./lib/behaviors/**/*",
|
|
34
|
+
"./lib/contexts/**/*"
|
|
35
|
+
],
|
|
36
|
+
"directories": {
|
|
37
|
+
"lib": "lib"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"index.js",
|
|
41
|
+
"index.d.ts",
|
|
42
|
+
"lib/**/*",
|
|
43
|
+
"css/**/*",
|
|
44
|
+
"assets/**/*"
|
|
45
|
+
],
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "rm -rf lib && tspc && tsc-alias",
|
|
48
|
+
"watch": "tsc -w",
|
|
49
|
+
"docs": "typedoc --out docs",
|
|
50
|
+
"test": "vitest run",
|
|
51
|
+
"build-animation-tests": "tsc -p ./tsconfig.test.animation.json",
|
|
52
|
+
"predocs": "npm run ctix",
|
|
53
|
+
"ctix": "ctix build"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"ts-patch": "^3.3.0",
|
|
57
|
+
"vitest": "3.1.3"
|
|
58
|
+
},
|
|
59
|
+
"keywords": [],
|
|
60
|
+
"release": {
|
|
61
|
+
"extends": "semantic-release-commit-filter",
|
|
62
|
+
"ci": true,
|
|
63
|
+
"branches": [
|
|
64
|
+
"main",
|
|
65
|
+
{
|
|
66
|
+
"name": "beta",
|
|
67
|
+
"channel": "beta",
|
|
68
|
+
"prerelease": "beta"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "alpha",
|
|
72
|
+
"channel": "alpha",
|
|
73
|
+
"prerelease": "alpha"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"plugins": [
|
|
77
|
+
"@semantic-release/commit-analyzer",
|
|
78
|
+
"@semantic-release/release-notes-generator",
|
|
79
|
+
"@semantic-release/changelog",
|
|
80
|
+
"@semantic-release/npm",
|
|
81
|
+
"@semantic-release/gitlab",
|
|
82
|
+
"@semantic-release/git"
|
|
83
|
+
],
|
|
84
|
+
"tagFormat": "@zcomponent/core@${version}"
|
|
85
|
+
}
|
|
86
86
|
}
|