@galacean/effects-core 2.3.0-alpha.2 → 2.3.0-beta.0

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.
@@ -1,5 +1,5 @@
1
1
  import { Downloader } from './downloader';
2
- import type { SceneLoadOptions } from './scene';
2
+ import type { ImageLike, SceneLoadOptions } from './scene';
3
3
  import { Scene } from './scene';
4
4
  import type { Disposable } from './utils';
5
5
  import type { Renderer } from './render';
@@ -53,13 +53,13 @@ export declare class AssetManager implements Disposable {
53
53
  loadScene(url: Scene.LoadType, renderer?: Renderer, options?: {
54
54
  env: string;
55
55
  }): Promise<Scene>;
56
+ getAssets(): Record<string, ImageLike>;
56
57
  private precompile;
57
58
  private processJSON;
58
59
  private processBins;
59
60
  private processFontURL;
60
61
  private processImages;
61
62
  private processPluginAssets;
62
- private prepareAssets;
63
63
  private processTextures;
64
64
  private loadJSON;
65
65
  private loadBins;
@@ -0,0 +1,24 @@
1
+ import type { Disposable } from './utils';
2
+ import type { Engine } from './engine';
3
+ import type { ImageLike } from './scene';
4
+ import { Scene } from './scene';
5
+ /**
6
+ *
7
+ */
8
+ export declare class AssetService implements Disposable {
9
+ private readonly engine;
10
+ private readonly builtinObjects;
11
+ /**
12
+ *
13
+ * @param engine
14
+ */
15
+ constructor(engine: Engine);
16
+ initializeTexture(scene: Scene): void;
17
+ prepareAssets(scene: Scene, assets: Record<string, ImageLike>): void;
18
+ createShaderVariant(): void;
19
+ private destroyBuiltinObjects;
20
+ /**
21
+ *
22
+ */
23
+ dispose(): void;
24
+ }
package/dist/camera.d.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import { Vector3 } from '@galacean/effects-math/es/core/vector3';
2
- import { Quaternion } from '@galacean/effects-math/es/core/quaternion';
2
+ import type { Quaternion } from '@galacean/effects-math/es/core/quaternion';
3
3
  import { Matrix4 } from '@galacean/effects-math/es/core/matrix4';
4
- import { Euler } from '@galacean/effects-math/es/core/euler';
4
+ import type { Euler } from '@galacean/effects-math/es/core/euler';
5
5
  import * as spec from '@galacean/effects-specification';
6
+ import { Transform } from './transform';
6
7
  interface CameraOptionsBase {
7
8
  /**
8
9
  * 相机近平面
@@ -72,6 +73,7 @@ export declare class Camera {
72
73
  private inverseViewMatrix;
73
74
  private inverseProjectionMatrix;
74
75
  private inverseViewProjectionMatrix;
76
+ private transform;
75
77
  private dirty;
76
78
  /**
77
79
  *
@@ -110,17 +112,31 @@ export declare class Camera {
110
112
  set clipMode(clipMode: spec.CameraClipMode | undefined);
111
113
  get clipMode(): spec.CameraClipMode | undefined;
112
114
  /**
113
- * 设置相机的位置
115
+ * 设置相机的本地位置
114
116
  * @param value
115
117
  */
116
118
  set position(value: Vector3);
119
+ /**
120
+ * 获取相机的本地位置
121
+ */
117
122
  get position(): Vector3;
123
+ /**
124
+ * 获取相机的世界位置
125
+ * @since 2.3.0
126
+ */
127
+ get worldPosition(): Vector3;
118
128
  /**
119
129
  * 设置相机的旋转角度
120
130
  * @param value
121
131
  */
122
132
  set rotation(value: Euler);
123
133
  get rotation(): Euler;
134
+ /**
135
+ * 设置相机变换
136
+ * @since 2.3.0
137
+ * @param transform
138
+ */
139
+ setTransform(transform: Transform): void;
124
140
  setViewportMatrix(matrix: Matrix4): void;
125
141
  getViewportMatrix(): Matrix4;
126
142
  /**
@@ -187,6 +203,5 @@ export declare class Camera {
187
203
  * 更新相机相关的矩阵,获取矩阵前会自动调用
188
204
  */
189
205
  updateMatrix(): void;
190
- private setRotationByQuat;
191
206
  }
192
207
  export {};
@@ -27,8 +27,9 @@ export declare class CompositionComponent extends Behaviour {
27
27
  onStart(): void;
28
28
  setReusable(value: boolean): void;
29
29
  getReusable(): boolean;
30
+ pause(): void;
31
+ resume(): void;
30
32
  onUpdate(dt: number): void;
31
- createContent(): void;
32
33
  onEnable(): void;
33
34
  onDisable(): void;
34
35
  onDestroy(): void;
@@ -91,8 +91,8 @@ export interface PolygonAttribute extends ShapeAttribute {
91
91
  * @since 2.1.0
92
92
  */
93
93
  export declare class ShapeComponent extends MeshComponent {
94
- private isStroke;
95
- private isFill;
94
+ private hasStroke;
95
+ private hasFill;
96
96
  private shapeDirty;
97
97
  private graphicsPath;
98
98
  private curveValues;
@@ -1,7 +1,6 @@
1
1
  import * as spec from '@galacean/effects-specification';
2
2
  import type { SceneBindingData } from './comp-vfx-item';
3
3
  import type { Engine } from './engine';
4
- import type { PluginSystem } from './plugin-system';
5
4
  import type { Scene, SceneRenderLevel } from './scene';
6
5
  import type { Texture } from './texture';
7
6
  import type { Disposable } from './utils';
@@ -20,18 +19,13 @@ export interface ContentOptions {
20
19
  * 合成资源管理
21
20
  */
22
21
  export declare class CompositionSourceManager implements Disposable {
23
- composition?: spec.CompositionData;
22
+ engine: Engine;
24
23
  sourceContent?: spec.CompositionData;
25
- refCompositionProps: Map<string, spec.CompositionData>;
26
24
  renderLevel?: SceneRenderLevel;
27
- pluginSystem?: PluginSystem;
28
- totalTime: number;
29
25
  imgUsage: Record<string, number>;
30
26
  textures: Texture[];
31
27
  jsonScene?: spec.JSONScene;
32
28
  mask: number;
33
- engine: Engine;
34
- private refCompositions;
35
29
  constructor(scene: Scene, engine: Engine);
36
30
  private getContent;
37
31
  private assembleItems;
@@ -209,10 +209,6 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
209
209
  * 预合成数组
210
210
  */
211
211
  readonly refContent: VFXItem[];
212
- /**
213
- * 预合成的合成属性,在 content 中会被其元素属性覆盖
214
- */
215
- readonly refCompositionProps: Map<string, spec.CompositionData>;
216
212
  /**
217
213
  * 合成的相机对象
218
214
  */
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export * from './asset';
4
4
  export * from './binary-asset';
5
5
  export * from './asset-loader';
6
6
  export * from './asset-manager';
7
+ export * from './asset-service';
7
8
  export * from './camera';
8
9
  export * from './canvas-pool';
9
10
  export * from './comp-vfx-item';