@galacean/effects-core 2.0.0-alpha.0 → 2.0.0-alpha.2
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/asset-loader.d.ts +13 -4
- package/dist/asset-manager.d.ts +8 -5
- package/dist/asset-migrations.d.ts +5 -0
- package/dist/components/effect-component.d.ts +1 -1
- package/dist/composition.d.ts +4 -4
- package/dist/index.js +1311 -1235
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1312 -1235
- package/dist/index.mjs.map +1 -1
- package/dist/math/utils.d.ts +0 -5
- package/dist/plugins/cal/calculate-item.d.ts +1 -1
- package/dist/scene.d.ts +2 -2
- package/dist/serialization-helper.d.ts +1 -0
- package/dist/ticker.d.ts +5 -0
- package/dist/transform.d.ts +3 -3
- package/dist/vfx-item.d.ts +1 -0
- package/package.json +1 -1
package/dist/asset-loader.d.ts
CHANGED
|
@@ -73,10 +73,19 @@ export interface MaterialData extends EffectsObjectData {
|
|
|
73
73
|
matrixArrays?: Record<string, number[]>;
|
|
74
74
|
}
|
|
75
75
|
export interface GeometryData extends EffectsObjectData {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
vertexData: VertexData;
|
|
77
|
+
indexFormat: number;
|
|
78
|
+
indexOffset: number;
|
|
79
|
+
buffer: string;
|
|
80
|
+
}
|
|
81
|
+
export interface VertexData {
|
|
82
|
+
vertexCount: number;
|
|
83
|
+
channels: VertexChannel[];
|
|
84
|
+
}
|
|
85
|
+
export interface VertexChannel {
|
|
86
|
+
offset: number;
|
|
87
|
+
format: number;
|
|
88
|
+
dimension: number;
|
|
80
89
|
}
|
|
81
90
|
export interface ShaderData extends EffectsObjectData {
|
|
82
91
|
vertex: string;
|
package/dist/asset-manager.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { JSONValue } from './downloader';
|
|
1
|
+
import * as spec from '@galacean/effects-specification';
|
|
3
2
|
import { Downloader } from './downloader';
|
|
4
3
|
import type { Scene } from './scene';
|
|
5
4
|
import type { Disposable } from './utils';
|
|
@@ -74,9 +73,9 @@ export interface SceneLoadOptions {
|
|
|
74
73
|
speed?: number;
|
|
75
74
|
}
|
|
76
75
|
/**
|
|
77
|
-
*
|
|
76
|
+
* 接受用于加载的数据类型
|
|
78
77
|
*/
|
|
79
|
-
export type SceneType = string |
|
|
78
|
+
export type SceneType = string | Scene | Record<string, unknown>;
|
|
80
79
|
export type SceneWithOptionsType = {
|
|
81
80
|
scene: SceneType;
|
|
82
81
|
options: SceneLoadOptions;
|
|
@@ -118,6 +117,10 @@ export declare class AssetManager implements Disposable {
|
|
|
118
117
|
*/
|
|
119
118
|
constructor(options?: SceneLoadOptions, downloader?: Downloader);
|
|
120
119
|
updateOptions(options?: SceneLoadOptions): void;
|
|
120
|
+
/**
|
|
121
|
+
* 根据用户传入的参数修改场景数据
|
|
122
|
+
*/
|
|
123
|
+
private updateSceneData;
|
|
121
124
|
/**
|
|
122
125
|
* 场景创建,通过 json 创建出场景对象,并进行提前编译等工作
|
|
123
126
|
* @param url - json 的 URL 链接或者 json 对象
|
|
@@ -125,7 +128,7 @@ export declare class AssetManager implements Disposable {
|
|
|
125
128
|
* @param options - 扩展参数
|
|
126
129
|
* @returns
|
|
127
130
|
*/
|
|
128
|
-
loadScene(url:
|
|
131
|
+
loadScene(url: SceneType, renderer?: Renderer, options?: {
|
|
129
132
|
env: string;
|
|
130
133
|
}): Promise<Scene>;
|
|
131
134
|
private precompile;
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
+
import * as spec from '@galacean/effects-specification';
|
|
1
2
|
import type { Scene } from './scene';
|
|
2
3
|
export declare function version3Migration(scene: Record<string, any>): Scene;
|
|
4
|
+
/**
|
|
5
|
+
* 提取并转换 JSON 数据中的 anchor 值
|
|
6
|
+
*/
|
|
7
|
+
export declare function convertAnchor(anchor?: spec.vec2, particleOrigin?: spec.ParticleOrigin): spec.vec2;
|
|
@@ -4,7 +4,7 @@ import type { Engine } from '../engine';
|
|
|
4
4
|
import type { Material, MaterialDestroyOptions } from '../material';
|
|
5
5
|
import type { BoundingBoxTriangle, HitTestTriangleParams } from '../plugins';
|
|
6
6
|
import type { MeshDestroyOptions, Renderer } from '../render';
|
|
7
|
-
import { Geometry } from '../render';
|
|
7
|
+
import type { Geometry } from '../render';
|
|
8
8
|
import { DestroyOptions } from '../utils';
|
|
9
9
|
import { RendererComponent } from './renderer-component';
|
|
10
10
|
/**
|
package/dist/composition.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import * as spec from '@galacean/effects-specification';
|
|
|
3
3
|
import { Camera } from './camera';
|
|
4
4
|
import { CompositionComponent } from './comp-vfx-item';
|
|
5
5
|
import type { CompositionSourceManager } from './composition-source-manager';
|
|
6
|
-
import type { JSONValue } from './downloader';
|
|
7
6
|
import type { PluginSystem } from './plugin-system';
|
|
8
7
|
import type { EventSystem, Region } from './plugins';
|
|
9
8
|
import type { MeshRendererOptions, Renderer } from './render';
|
|
@@ -14,6 +13,7 @@ import { Transform } from './transform';
|
|
|
14
13
|
import type { Disposable, LostHandler } from './utils';
|
|
15
14
|
import type { VFXItemContent, VFXItemProps } from './vfx-item';
|
|
16
15
|
import { VFXItem } from './vfx-item';
|
|
16
|
+
import type { SceneType } from './asset-manager';
|
|
17
17
|
export interface CompositionStatistic {
|
|
18
18
|
loadTime: number;
|
|
19
19
|
loadStart: number;
|
|
@@ -23,7 +23,7 @@ export interface MessageItem {
|
|
|
23
23
|
id: string;
|
|
24
24
|
name: string;
|
|
25
25
|
phrase: number;
|
|
26
|
-
compositionId:
|
|
26
|
+
compositionId: string;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
*
|
|
@@ -99,7 +99,7 @@ export declare class Composition implements Disposable, LostHandler {
|
|
|
99
99
|
/**
|
|
100
100
|
* 合成id
|
|
101
101
|
*/
|
|
102
|
-
readonly id:
|
|
102
|
+
readonly id: string;
|
|
103
103
|
/**
|
|
104
104
|
* 画布宽度
|
|
105
105
|
*/
|
|
@@ -139,7 +139,7 @@ export declare class Composition implements Disposable, LostHandler {
|
|
|
139
139
|
/**
|
|
140
140
|
* 合成对应的 url 或者 JSON
|
|
141
141
|
*/
|
|
142
|
-
readonly url:
|
|
142
|
+
readonly url: SceneType;
|
|
143
143
|
/**
|
|
144
144
|
* 合成根元素
|
|
145
145
|
*/
|