@galacean/effects-core 2.1.0-beta.0 → 2.1.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.
@@ -48,8 +48,8 @@ export declare class GraphicsPath {
48
48
  ellipse(x: number, y: number, radiusX: number, radiusY: number, transform?: Matrix4): this;
49
49
  /**
50
50
  * Draws a rectangle shape. This method adds a new rectangle path to the current drawing.
51
- * @param x - The x-coordinate of the top-left corner of the rectangle.
52
- * @param y - The y-coordinate of the top-left corner of the rectangle.
51
+ * @param x - The x-coordinate of the upper-left corner of the rectangle.
52
+ * @param y - The y-coordinate of the upper-left corner of the rectangle.
53
53
  * @param w - The width of the rectangle.
54
54
  * @param h - The height of the rectangle.
55
55
  * @param transform - An optional `Matrix` object to apply a transformation to the rectangle.
@@ -1,6 +1,6 @@
1
1
  import { ShapePrimitive } from './shape-primitive';
2
2
  /**
3
- * The `Rectangle` object is an area defined by its position, as indicated by its top-left corner
3
+ * The `Rectangle` object is an area defined by its position, as indicated by its upper-left corner
4
4
  * point (`x`, `y`) and by its `width` and its `height`.
5
5
  */
6
6
  export declare class Rectangle extends ShapePrimitive {
@@ -46,8 +46,8 @@ export declare class ShapePath {
46
46
  polyStar(pointCount: number, outerRadius: number, innerRadius: number, outerRoundness: number, innerRoundness: number, starType: StarType, transform?: Matrix4): this;
47
47
  /**
48
48
  * Draws a rectangle shape. This method adds a new rectangle path to the current drawing.
49
- * @param x - The x-coordinate of the top-left corner of the rectangle.
50
- * @param y - The y-coordinate of the top-left corner of the rectangle.
49
+ * @param x - The x-coordinate of the upper-left corner of the rectangle.
50
+ * @param y - The y-coordinate of the upper-left corner of the rectangle.
51
51
  * @param w - The width of the rectangle.
52
52
  * @param h - The height of the rectangle.
53
53
  * @param transform - An optional `Matrix` object to apply a transformation to the rectangle.
@@ -3,7 +3,7 @@ import type { Engine } from '../../engine';
3
3
  import type { GeometryDrawMode } from '../../render';
4
4
  import { Geometry } from '../../render';
5
5
  import type { GeometryFromShape } from '../../shape';
6
- import type { Texture } from '../../texture';
6
+ import { type Texture } from '../../texture';
7
7
  import type { PlayableGraph, Playable } from '../cal/playable-graph';
8
8
  import { PlayableAsset } from '../cal/playable-graph';
9
9
  import type { ColorPlayableAssetData } from '../../animation';
@@ -2,6 +2,6 @@ import type { Playable, PlayableGraph } from '../../cal/playable-graph';
2
2
  import { PlayableAsset } from '../../cal/playable-graph';
3
3
  import * as spec from '@galacean/effects-specification';
4
4
  export declare class ColorPropertyPlayableAsset extends PlayableAsset {
5
- curveData: spec.ColorCurveData;
5
+ curveData: spec.ColorCurveValue;
6
6
  createPlayable(graph: PlayableGraph): Playable;
7
7
  }
@@ -1,3 +1,5 @@
1
+ export * from './color-property-playable-asset';
1
2
  export * from './float-property-playable-asset';
2
3
  export * from './sub-composition-playable-asset';
3
4
  export * from './timeline-asset';
5
+ export * from './vector4-property-playable-asset';
@@ -6,8 +6,16 @@ import type { Constructor } from '../../../utils';
6
6
  import { TrackInstance } from '../track-instance';
7
7
  export declare class TimelineAsset extends PlayableAsset {
8
8
  tracks: TrackAsset[];
9
+ private cacheFlattenedTracks;
10
+ get flattenedTracks(): TrackAsset[];
9
11
  createPlayable(graph: PlayableGraph): Playable;
10
12
  createTrack<T extends TrackAsset>(classConstructor: Constructor<T>, parent: TrackAsset, name?: string): T;
13
+ /**
14
+ * Invalidates the asset, called when tracks data changed
15
+ */
16
+ private invalidate;
17
+ private addSubTracksRecursive;
18
+ private sortTracks;
11
19
  fromData(data: spec.TimelineAssetData): void;
12
20
  }
13
21
  export declare class TimelinePlayable extends Playable {
@@ -17,8 +25,6 @@ export declare class TimelinePlayable extends Playable {
17
25
  evaluate(): void;
18
26
  compileTracks(graph: PlayableGraph, tracks: TrackAsset[]): void;
19
27
  private updateTrackAnimatedObject;
20
- private sortTracks;
21
- private addSubTracksRecursive;
22
28
  }
23
29
  export declare class TrackSortWrapper {
24
30
  track: TrackAsset;
@@ -2,6 +2,6 @@ import type { Playable, PlayableGraph } from '../../cal/playable-graph';
2
2
  import { PlayableAsset } from '../../cal/playable-graph';
3
3
  import type * as spec from '@galacean/effects-specification';
4
4
  export declare class Vector4PropertyPlayableAsset extends PlayableAsset {
5
- curveData: spec.Vector4CurveData;
5
+ curveData: spec.Vector4CurveValue;
6
6
  createPlayable(graph: PlayableGraph): Playable;
7
7
  }
@@ -15,6 +15,7 @@ import type { RenderPassClearAction, RenderPassColorAttachmentOptions, RenderPas
15
15
  import { RenderPass } from './render-pass';
16
16
  import type { Renderer } from './renderer';
17
17
  import type { PostProcessVolume, RendererComponent } from '../components';
18
+ import type { Vector3 } from '@galacean/effects-math/es/core/vector3';
18
19
  /**
19
20
  * 渲染数据,保存了当前渲染使用到的数据。
20
21
  */
@@ -194,6 +195,7 @@ export declare class RenderFrame implements Disposable {
194
195
  readonly transparentTexture: Texture;
195
196
  protected destroyed: boolean;
196
197
  protected renderPassInfoMap: WeakMap<RenderPass, RenderPassInfo>;
198
+ private drawObjectPass;
197
199
  constructor(options: RenderFrameOptions);
198
200
  get renderPasses(): RenderPass[];
199
201
  get isDestroyed(): boolean;
@@ -201,13 +203,13 @@ export declare class RenderFrame implements Disposable {
201
203
  * 根据 Mesh 优先级添加到 RenderPass
202
204
  * @param mesh - 要添加的 Mesh 对象
203
205
  */
204
- addMeshToDefaultRenderPass(mesh?: RendererComponent): void;
206
+ addMeshToDefaultRenderPass(mesh: RendererComponent): void;
205
207
  /**
206
208
  * 把 Mesh 从 RenderPass 中移除,
207
209
  * 如果 renderPass 中没有 mesh,此 renderPass 会被删除
208
210
  * @param mesh - 要删除的 Mesh 对象
209
211
  */
210
- removeMeshFromDefaultRenderPass(mesh: Mesh): void;
212
+ removeMeshFromDefaultRenderPass(mesh: RendererComponent): void;
211
213
  /**
212
214
  * 销毁 RenderFrame
213
215
  * @param options - 可以有选择销毁一些对象
@@ -262,6 +264,7 @@ export declare function findPreviousRenderPass(renderPasses: RenderPass[], rende
262
264
  export declare class GlobalUniforms {
263
265
  floats: Record<string, number>;
264
266
  ints: Record<string, number>;
267
+ vector3s: Record<string, Vector3>;
265
268
  vector4s: Record<string, Vector4>;
266
269
  matrices: Record<string, Matrix4>;
267
270
  samplers: string[];
@@ -1,4 +1,4 @@
1
- import type { Matrix4, Vector4 } from '@galacean/effects-math/es/core/index';
1
+ import type { Matrix4, Vector3, Vector4 } from '@galacean/effects-math/es/core/index';
2
2
  import type { RendererComponent } from '../components';
3
3
  import type { Engine } from '../engine';
4
4
  import type { Material } from '../material';
@@ -21,6 +21,7 @@ export declare class Renderer implements LostHandler, RestoreHandler {
21
21
  setGlobalFloat(name: string, value: number): void;
22
22
  setGlobalInt(name: string, value: number): void;
23
23
  setGlobalVector4(name: string, value: Vector4): void;
24
+ setGlobalVector3(name: string, value: Vector3): void;
24
25
  setGlobalMatrix(name: string, value: Matrix4): void;
25
26
  getFramebuffer(): Framebuffer | null;
26
27
  setFramebuffer(framebuffer: Framebuffer | null): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/effects-core",
3
- "version": "2.1.0-beta.0",
3
+ "version": "2.1.0",
4
4
  "description": "Galacean Effects runtime core for the web",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/index.js",
@@ -42,7 +42,7 @@
42
42
  "registry": "https://registry.npmjs.org"
43
43
  },
44
44
  "dependencies": {
45
- "@galacean/effects-specification": "2.1.0-alpha.3",
45
+ "@galacean/effects-specification": "2.1.0",
46
46
  "@galacean/effects-math": "1.1.0",
47
47
  "flatbuffers": "24.3.25",
48
48
  "uuid": "9.0.1",