@combos-fun/plugin-transition 0.0.7 → 0.0.9
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/agent-skill.md +8 -20
- package/package.json +8 -4
package/agent-skill.md
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
# `@combos-fun/plugin-transition` — Agent notes
|
|
2
2
|
|
|
3
|
-
Data-driven tween / property animation. Tweens any numeric Component
|
|
4
|
-
property via dot-path (e.g. `positionX`, `rotationY`, `alpha`). No
|
|
5
|
-
rendering dependency — works with both 2D and 3D pipelines.
|
|
3
|
+
Data-driven tween / property animation. Tweens any numeric Component property via dot-path (e.g. `positionX`, `rotationY`, `alpha`). No rendering dependency — works with both 2D and 3D pipelines.
|
|
6
4
|
|
|
7
5
|
## When to read
|
|
8
6
|
|
|
9
|
-
Read for any tween / motion / value animation: button bounce, fade-in /
|
|
10
|
-
out, easing curves on transforms, scripted dialog motion.
|
|
7
|
+
Read for any tween / motion / value animation: button bounce, fade-in / out, easing curves on transforms, scripted dialog motion.
|
|
11
8
|
|
|
12
9
|
## Public API
|
|
13
10
|
|
|
@@ -15,9 +12,7 @@ out, easing curves on transforms, scripted dialog motion.
|
|
|
15
12
|
import { Transition, TransitionSystem } from '@combos-fun/plugin-transition';
|
|
16
13
|
```
|
|
17
14
|
|
|
18
|
-
`componentName = 'Transition'`,
|
|
19
|
-
**`systemName = 'transition'` (lowercase)** — use the class reference with
|
|
20
|
-
`game.getSystem(TransitionSystem)`, not the string.
|
|
15
|
+
`componentName = 'Transition'`, **`systemName = 'transition'` (lowercase)** — use the class reference with `game.getSystem(TransitionSystem)`, not the string.
|
|
21
16
|
|
|
22
17
|
### Init params
|
|
23
18
|
|
|
@@ -33,30 +28,23 @@ interface AnimationStruct {
|
|
|
33
28
|
}
|
|
34
29
|
```
|
|
35
30
|
|
|
36
|
-
`values` is a keyframe list. `time` is the timestamp on the timeline,
|
|
37
|
-
`value` is the target value, `tween` selects easing for the segment ending
|
|
38
|
-
at this keyframe.
|
|
31
|
+
`values` is a keyframe list. `time` is the timestamp on the timeline, `value` is the target value, `tween` selects easing for the segment ending at this keyframe.
|
|
39
32
|
|
|
40
33
|
### Methods
|
|
41
34
|
|
|
42
|
-
`play(name?, iteration?)` — play a named animation; pass `name` undefined
|
|
43
|
-
to play all. `stop(name?)` — stop one or all.
|
|
35
|
+
`play(name?, iteration?)` — play a named animation; pass `name` undefined to play all. `stop(name?)` — stop one or all.
|
|
44
36
|
|
|
45
37
|
### Events
|
|
46
38
|
|
|
47
|
-
`'finish'` is emitted with the animation name when iteration count is
|
|
48
|
-
reached.
|
|
39
|
+
`'finish'` is emitted with the animation name when iteration count is reached.
|
|
49
40
|
|
|
50
41
|
### Easing names
|
|
51
42
|
|
|
52
|
-
`linear`, `ease-in`, `ease-out`, `ease-in-out`, `bounce-in`,
|
|
53
|
-
`bounce-out`, `bounce-in-out`, `none`.
|
|
43
|
+
`linear`, `ease-in`, `ease-out`, `ease-in-out`, `bounce-in`, `bounce-out`, `bounce-in-out`, `none`.
|
|
54
44
|
|
|
55
45
|
## Required setup
|
|
56
46
|
|
|
57
|
-
`TransitionSystem` is a stub — the heavy lifting happens inside the
|
|
58
|
-
`Transition` component's `update()`. You still need to register it so the
|
|
59
|
-
engine routes lifecycle hooks correctly.
|
|
47
|
+
`TransitionSystem` is a stub — the heavy lifting happens inside the `Transition` component's `update()`. You still need to register it so the engine routes lifecycle hooks correctly.
|
|
60
48
|
|
|
61
49
|
```ts
|
|
62
50
|
new Game({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@combos-fun/plugin-transition",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.9",
|
|
4
|
+
"description": "Data-driven tween / property animation",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/plugin-transition.esm.js",
|
|
7
7
|
"bundle": "CombosFun.plugin.transition",
|
|
@@ -27,13 +27,17 @@
|
|
|
27
27
|
"types": "dist/plugin-transition.d.ts",
|
|
28
28
|
"keywords": [
|
|
29
29
|
"combos-fun",
|
|
30
|
-
"
|
|
30
|
+
"tween",
|
|
31
|
+
"animation",
|
|
32
|
+
"easing",
|
|
33
|
+
"transition",
|
|
34
|
+
"property"
|
|
31
35
|
],
|
|
32
36
|
"author": "sun668 <q947692259@gmail.com>",
|
|
33
37
|
"dependencies": {
|
|
34
38
|
"@tweenjs/tween.js": "^25.0.0",
|
|
35
39
|
"sprite-timeline": "^1.10.2",
|
|
36
|
-
"@combos-fun/engine": "0.0.
|
|
40
|
+
"@combos-fun/engine": "0.0.9"
|
|
37
41
|
},
|
|
38
42
|
"scripts": {
|
|
39
43
|
"build": "node ../../scripts/build-package.mjs"
|