@galacean/effects-core 2.1.0-alpha.12 → 2.1.0-alpha.13
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/index.js +496 -47
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +497 -48
- package/dist/index.mjs.map +1 -1
- package/dist/material/material.d.ts +10 -0
- package/dist/plugins/shape/graphics-path.d.ts +2 -2
- package/dist/plugins/shape/rectangle.d.ts +1 -1
- package/dist/plugins/shape/shape-path.d.ts +10 -0
- package/dist/plugins/timeline/playable-assets/color-property-playable-asset.d.ts +1 -1
- package/dist/plugins/timeline/playable-assets/index.d.ts +2 -0
- package/dist/plugins/timeline/playable-assets/vector4-property-playable-asset.d.ts +1 -1
- package/dist/render/render-frame.d.ts +2 -0
- package/dist/render/renderer.d.ts +2 -1
- package/package.json +2 -2
|
@@ -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
|
|
52
|
-
* @param y - The y-coordinate of the
|
|
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
|
|
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.
|
|
@@ -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.
|
|
5
|
+
curveData: spec.ColorCurveValue;
|
|
6
6
|
createPlayable(graph: PlayableGraph): Playable;
|
|
7
7
|
}
|
|
@@ -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.
|
|
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.
|
|
3
|
+
"version": "2.1.0-alpha.13",
|
|
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.
|
|
45
|
+
"@galacean/effects-specification": "2.1.0-alpha.4",
|
|
46
46
|
"@galacean/effects-math": "1.1.0",
|
|
47
47
|
"flatbuffers": "24.3.25",
|
|
48
48
|
"uuid": "9.0.1",
|