@galacean/effects-specification 1.1.0-alpha.0 → 2.0.0-alpha.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/dist/fallback/index.d.ts +2 -2
- package/dist/fallback/migration.d.ts +7 -3
- package/dist/fallback/utils.d.ts +8 -1
- package/dist/fallback.js +467 -15
- package/dist/fallback.js.map +1 -1
- package/dist/fallback.mjs +465 -16
- package/dist/fallback.mjs.map +1 -1
- package/dist/index.js +64 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +65 -12
- package/dist/index.mjs.map +1 -1
- package/dist/src/binary.d.ts +1 -1
- package/dist/src/components.d.ts +93 -0
- package/dist/src/composition.d.ts +50 -1
- package/dist/src/image.d.ts +4 -9
- package/dist/src/index.d.ts +4 -1
- package/dist/src/item/base-item.d.ts +22 -6
- package/dist/src/item/camera-item.d.ts +1 -1
- package/dist/src/item/composition-item.d.ts +1 -1
- package/dist/src/item/effect-item.d.ts +17 -0
- package/dist/src/item/interact-item.d.ts +11 -1
- package/dist/src/item/model/camera.d.ts +24 -1
- package/dist/src/item/model/light.d.ts +48 -1
- package/dist/src/item/model/material.d.ts +1 -1
- package/dist/src/item/model/mesh.d.ts +28 -1
- package/dist/src/item/model/skybox.d.ts +46 -1
- package/dist/src/item/model/tree.d.ts +22 -0
- package/dist/src/item/null-item.d.ts +49 -1
- package/dist/src/item/particle-item.d.ts +73 -1
- package/dist/src/item/particle-shape.d.ts +1 -1
- package/dist/src/item/sprite-item.d.ts +49 -1
- package/dist/src/item/text-item.d.ts +45 -2
- package/dist/src/scene.d.ts +102 -2
- package/dist/src/text.d.ts +1 -1
- package/dist/src/type.d.ts +6 -2
- package/dist/src/vfx-item-data.d.ts +74 -0
- package/package.json +3 -2
- /package/dist/src/{numberExpression.d.ts → number-expression.d.ts} +0 -0
package/dist/src/type.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FixedVec3Expression, vec2, vec3, GradientColor, ShapePoints, ShapeSplits, FixedNumberExpression } from './
|
|
1
|
+
import type { FixedVec3Expression, vec2, vec3, GradientColor, ShapePoints, ShapeSplits, FixedNumberExpression } from './number-expression';
|
|
2
2
|
/**
|
|
3
3
|
* 播放器版本
|
|
4
4
|
*/
|
|
@@ -539,7 +539,11 @@ export declare enum ItemType {
|
|
|
539
539
|
/**
|
|
540
540
|
* 天空盒元素
|
|
541
541
|
*/
|
|
542
|
-
skybox = "skybox"
|
|
542
|
+
skybox = "skybox",
|
|
543
|
+
/**
|
|
544
|
+
* 特效元素
|
|
545
|
+
*/
|
|
546
|
+
effect = "effect"
|
|
543
547
|
}
|
|
544
548
|
/**
|
|
545
549
|
* 渲染模式
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { ComponentData, EffectsObjectData } from './components';
|
|
2
|
+
import type { ItemEndBehavior, ParentItemEndBehavior, BaseContent, TransformData } from './item/base-item';
|
|
3
|
+
import type { ItemType, RenderLevel } from './type';
|
|
4
|
+
export interface VFXItemData extends EffectsObjectData {
|
|
5
|
+
/**
|
|
6
|
+
* 元素 id
|
|
7
|
+
* 非预合成的元素 id 为 int 类型的数字字符串
|
|
8
|
+
* 预合成元素 id 为 `'{ref元素id}+{合成内id}'` 字符串
|
|
9
|
+
*/
|
|
10
|
+
id: string;
|
|
11
|
+
/**
|
|
12
|
+
* 元素名称
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
/**
|
|
16
|
+
* 元素时常,单位秒
|
|
17
|
+
*/
|
|
18
|
+
duration: number;
|
|
19
|
+
/**
|
|
20
|
+
* 元素类型,string 类型
|
|
21
|
+
* Galacean Effects 内部元素使用 int 数字字符串
|
|
22
|
+
* plugin 模块实现者自由实现命名
|
|
23
|
+
* 2022.12更新: spine: "spine", 陀螺仪: "5"
|
|
24
|
+
*/
|
|
25
|
+
type: ItemType | string;
|
|
26
|
+
/**
|
|
27
|
+
* 父节点ID
|
|
28
|
+
* 如果父节点无法找到,播放将直接报错
|
|
29
|
+
*/
|
|
30
|
+
parentId?: string;
|
|
31
|
+
/**
|
|
32
|
+
* 元素可视状态
|
|
33
|
+
* 如果为 true 或者不存在时,元素可见
|
|
34
|
+
* 仅当为 false 时,元素不被创建
|
|
35
|
+
*/
|
|
36
|
+
visible?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* 元素结束行为
|
|
39
|
+
* @default destroy
|
|
40
|
+
*/
|
|
41
|
+
endBehavior: ItemEndBehavior | ParentItemEndBehavior;
|
|
42
|
+
/**
|
|
43
|
+
* 元素播放延时(单位秒)
|
|
44
|
+
* @default 0
|
|
45
|
+
*/
|
|
46
|
+
delay?: number;
|
|
47
|
+
/**
|
|
48
|
+
* 元素渲染信息属性
|
|
49
|
+
*/
|
|
50
|
+
content: BaseContent;
|
|
51
|
+
/**
|
|
52
|
+
* 元素渲染等级
|
|
53
|
+
*/
|
|
54
|
+
renderLevel?: RenderLevel;
|
|
55
|
+
/**
|
|
56
|
+
* 元素的插件模块名,如果不指定,则和 type 相同
|
|
57
|
+
* 从数组的 plugins 中获取 name
|
|
58
|
+
* 例如:pn:1, plugins:["model@1.0",'spine@1.0']
|
|
59
|
+
* pn 实际为 spine
|
|
60
|
+
*/
|
|
61
|
+
pn?: number;
|
|
62
|
+
/**
|
|
63
|
+
* 元素的插件模块名, 优先级高于 pn
|
|
64
|
+
*/
|
|
65
|
+
pluginName?: string;
|
|
66
|
+
/**
|
|
67
|
+
* 元素的基础位置
|
|
68
|
+
*/
|
|
69
|
+
transform?: TransformData;
|
|
70
|
+
/**
|
|
71
|
+
* 元素的组件数据
|
|
72
|
+
*/
|
|
73
|
+
components: ComponentData[];
|
|
74
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/effects-specification",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.1",
|
|
4
4
|
"description": "Galacean Effects JSON Specification",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -60,7 +60,8 @@
|
|
|
60
60
|
"rollup": "^2.70.1",
|
|
61
61
|
"rollup-plugin-livereload": "^2.0.5",
|
|
62
62
|
"rollup-plugin-serve": "^1.1.0",
|
|
63
|
-
"typescript": "^4.6.2"
|
|
63
|
+
"typescript": "^4.6.2",
|
|
64
|
+
"uuid": "9.0.1"
|
|
64
65
|
},
|
|
65
66
|
"author": "Ant Group CO., Ltd.",
|
|
66
67
|
"license": "MIT",
|
|
File without changes
|