@galacean/effects-core 2.1.0-alpha.12 → 2.1.0-alpha.14

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.
@@ -70,6 +70,16 @@ export declare abstract class Material extends EffectsObject implements Disposab
70
70
  constructor(engine: Engine, props?: MaterialProps);
71
71
  get shader(): Shader;
72
72
  set shader(value: Shader);
73
+ /**
74
+ * 材质的主纹理
75
+ */
76
+ get mainTexture(): Texture;
77
+ set mainTexture(value: Texture);
78
+ /**
79
+ * 材质的主颜色
80
+ */
81
+ get color(): Color;
82
+ set color(value: Color);
73
83
  /******** effects-core 中会调用 引擎必须实现 ***********************/
74
84
  /**
75
85
  * 设置 Material 的颜色融合开关
@@ -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 {
@@ -44,6 +44,16 @@ export declare class ShapePath {
44
44
  */
45
45
  ellipse(x: number, y: number, radiusX: number, radiusY: number, transform?: Matrix4): this;
46
46
  polyStar(pointCount: number, outerRadius: number, innerRadius: number, outerRoundness: number, innerRoundness: number, starType: StarType, transform?: Matrix4): this;
47
+ /**
48
+ * Draws a rectangle shape. This method adds a new rectangle path to the current drawing.
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
+ * @param w - The width of the rectangle.
52
+ * @param h - The height of the rectangle.
53
+ * @param transform - An optional `Matrix` object to apply a transformation to the rectangle.
54
+ * @returns The instance of the current object for chaining.
55
+ */
56
+ rect(x: number, y: number, w: number, h: number, transform?: Matrix4): this;
47
57
  /**
48
58
  * Draws a given shape on the canvas.
49
59
  * This is a generic method that can draw any type of shape specified by the `ShapePrimitive` parameter.
@@ -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';
@@ -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
  */
@@ -262,6 +263,7 @@ export declare function findPreviousRenderPass(renderPasses: RenderPass[], rende
262
263
  export declare class GlobalUniforms {
263
264
  floats: Record<string, number>;
264
265
  ints: Record<string, number>;
266
+ vector3s: Record<string, Vector3>;
265
267
  vector4s: Record<string, Vector4>;
266
268
  matrices: Record<string, Matrix4>;
267
269
  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-alpha.12",
3
+ "version": "2.1.0-alpha.14",
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-alpha.5",
46
46
  "@galacean/effects-math": "1.1.0",
47
47
  "flatbuffers": "24.3.25",
48
48
  "uuid": "9.0.1",