@omnimedia/omnitool 1.1.0-79 → 1.1.0-80

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/x/tests.html CHANGED
@@ -295,7 +295,7 @@ canvas {
295
295
  }
296
296
  }
297
297
  </style>
298
- <script type=module src="tests.bundle.min.js?v=797f47655812"></script>
298
+ <script type=module src="tests.bundle.min.js?v=d56a855bee8d"></script>
299
299
 
300
300
 
301
301
  <meta name="theme-color" content="#3cff9c">
@@ -1,23 +1,103 @@
1
- export type AnimationValue = "scalar" | "transform";
1
+ import type { Interpolation } from "../types.js";
2
+ export type AnimationType = "scalar" | "transform";
3
+ export type AnimationChannelType = "number";
4
+ export type AnimationUnit = "pixel" | "scale" | "radian" | "ratio";
5
+ export type AnimationChannel = {
6
+ path?: string;
7
+ type: AnimationChannelType;
8
+ default: number;
9
+ unit?: AnimationUnit;
10
+ range?: readonly [min: number, max: number];
11
+ };
2
12
  export type AnimationDefinition = {
3
- value: AnimationValue;
13
+ type: AnimationType;
14
+ defaultTerp: Interpolation;
15
+ channels: readonly AnimationChannel[];
4
16
  };
5
17
  export declare const spatialAnimations: {
6
18
  readonly transform: {
7
- readonly value: "transform";
19
+ readonly type: "transform";
20
+ readonly defaultTerp: "linear";
21
+ readonly channels: readonly [{
22
+ readonly path: "position.x";
23
+ readonly type: "number";
24
+ readonly default: 0;
25
+ readonly unit: "pixel";
26
+ }, {
27
+ readonly path: "position.y";
28
+ readonly type: "number";
29
+ readonly default: 0;
30
+ readonly unit: "pixel";
31
+ }, {
32
+ readonly path: "scale.x";
33
+ readonly type: "number";
34
+ readonly default: 1;
35
+ readonly unit: "scale";
36
+ }, {
37
+ readonly path: "scale.y";
38
+ readonly type: "number";
39
+ readonly default: 1;
40
+ readonly unit: "scale";
41
+ }, {
42
+ readonly path: "rotation";
43
+ readonly type: "number";
44
+ readonly default: 0;
45
+ readonly unit: "radian";
46
+ }];
8
47
  };
9
48
  };
10
49
  export declare const visualAnimations: {
11
50
  readonly opacity: {
12
- readonly value: "scalar";
51
+ readonly type: "scalar";
52
+ readonly defaultTerp: "linear";
53
+ readonly channels: readonly [{
54
+ readonly type: "number";
55
+ readonly default: 1;
56
+ readonly unit: "ratio";
57
+ readonly range: readonly [0, 1];
58
+ }];
13
59
  };
14
60
  };
15
61
  export declare const animations: {
16
62
  readonly opacity: {
17
- readonly value: "scalar";
63
+ readonly type: "scalar";
64
+ readonly defaultTerp: "linear";
65
+ readonly channels: readonly [{
66
+ readonly type: "number";
67
+ readonly default: 1;
68
+ readonly unit: "ratio";
69
+ readonly range: readonly [0, 1];
70
+ }];
18
71
  };
19
72
  readonly transform: {
20
- readonly value: "transform";
73
+ readonly type: "transform";
74
+ readonly defaultTerp: "linear";
75
+ readonly channels: readonly [{
76
+ readonly path: "position.x";
77
+ readonly type: "number";
78
+ readonly default: 0;
79
+ readonly unit: "pixel";
80
+ }, {
81
+ readonly path: "position.y";
82
+ readonly type: "number";
83
+ readonly default: 0;
84
+ readonly unit: "pixel";
85
+ }, {
86
+ readonly path: "scale.x";
87
+ readonly type: "number";
88
+ readonly default: 1;
89
+ readonly unit: "scale";
90
+ }, {
91
+ readonly path: "scale.y";
92
+ readonly type: "number";
93
+ readonly default: 1;
94
+ readonly unit: "scale";
95
+ }, {
96
+ readonly path: "rotation";
97
+ readonly type: "number";
98
+ readonly default: 0;
99
+ readonly unit: "radian";
100
+ }];
21
101
  };
22
102
  };
23
103
  export type SpatialAnimationProperty = keyof typeof spatialAnimations;
@@ -1,8 +1,24 @@
1
1
  export const spatialAnimations = {
2
- transform: { value: "transform" },
2
+ transform: {
3
+ type: "transform",
4
+ defaultTerp: "linear",
5
+ channels: [
6
+ { path: "position.x", type: "number", default: 0, unit: "pixel" },
7
+ { path: "position.y", type: "number", default: 0, unit: "pixel" },
8
+ { path: "scale.x", type: "number", default: 1, unit: "scale" },
9
+ { path: "scale.y", type: "number", default: 1, unit: "scale" },
10
+ { path: "rotation", type: "number", default: 0, unit: "radian" },
11
+ ],
12
+ },
3
13
  };
4
14
  export const visualAnimations = {
5
- opacity: { value: "scalar" },
15
+ opacity: {
16
+ type: "scalar",
17
+ defaultTerp: "linear",
18
+ channels: [
19
+ { type: "number", default: 1, unit: "ratio", range: [0, 1] },
20
+ ],
21
+ },
6
22
  };
7
23
  // const audioAnimations = {}
8
24
  export const animations = {
@@ -1 +1 @@
1
- {"version":3,"file":"animations.js","sourceRoot":"","sources":["../../../s/timeline/parts/animations.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAChC,SAAS,EAAE,EAAC,KAAK,EAAE,WAAW,EAAC;CACwB,CAAA;AAExD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC/B,OAAO,EAAE,EAAC,KAAK,EAAE,QAAQ,EAAC;CAC6B,CAAA;AAExD,6BAA6B;AAE7B,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,GAAG,iBAAiB;IACpB,GAAG,gBAAgB;CACV,CAAA"}
1
+ {"version":3,"file":"animations.js","sourceRoot":"","sources":["../../../s/timeline/parts/animations.ts"],"names":[],"mappings":"AAqBA,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAChC,SAAS,EAAE;QACV,IAAI,EAAE,WAAW;QACjB,WAAW,EAAE,QAAQ;QACrB,QAAQ,EAAE;YACT,EAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAC;YAC/D,EAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAC;YAC/D,EAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAC;YAC5D,EAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,C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