@galacean/effects-core 2.0.0-alpha.3 → 2.0.0-alpha.5
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 +30 -22
- package/dist/index.js +720 -250
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +755 -286
- package/dist/index.mjs.map +1 -1
- package/dist/material/material.d.ts +3 -3
- package/dist/plugins/interact/interact-mesh.d.ts +1 -1
- package/dist/plugins/particle/particle-mesh.d.ts +3 -3
- package/dist/plugins/particle/trail-mesh.d.ts +6 -6
- package/dist/render/shader.d.ts +9 -2
- package/package.json +2 -2
|
@@ -320,9 +320,9 @@ export declare abstract class Material extends EffectsObject implements Disposab
|
|
|
320
320
|
*/
|
|
321
321
|
abstract hasUniform(name: string): boolean;
|
|
322
322
|
/******** 预留接口,暂时不用实现 ***********************/
|
|
323
|
-
abstract
|
|
324
|
-
abstract
|
|
325
|
-
abstract
|
|
323
|
+
abstract enableMacro(keyword: string): void;
|
|
324
|
+
abstract disableMacro(keyword: string): void;
|
|
325
|
+
abstract isMacroEnabled(keyword: string): boolean;
|
|
326
326
|
/***************************************************/
|
|
327
327
|
/**
|
|
328
328
|
* Material 的克隆方法(不接入滤镜,本方法可以不做实现)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type * as spec from '@galacean/effects-specification';
|
|
2
|
+
import type { Engine } from '../../engine';
|
|
2
3
|
import type { MeshRendererOptions } from '../../render';
|
|
3
4
|
import { Mesh } from '../../render';
|
|
4
5
|
import type { Transform } from '../../transform';
|
|
5
|
-
import type { Engine } from '../../engine';
|
|
6
6
|
export declare class InteractMesh {
|
|
7
7
|
private readonly transform;
|
|
8
8
|
private readonly engine;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type * as spec from '@galacean/effects-specification';
|
|
2
1
|
import type { Matrix4 } from '@galacean/effects-math/es/core/index';
|
|
3
2
|
import { Vector2, Vector3 } from '@galacean/effects-math/es/core/index';
|
|
3
|
+
import type * as spec from '@galacean/effects-specification';
|
|
4
|
+
import type { Engine } from '../../engine';
|
|
4
5
|
import type { ValueGetter } from '../../math';
|
|
5
|
-
import type {
|
|
6
|
+
import type { GPUCapability, SharedShaderWithSource } from '../../render';
|
|
6
7
|
import { Geometry, Mesh } from '../../render';
|
|
7
8
|
import { Texture } from '../../texture';
|
|
8
9
|
import { Transform } from '../../transform';
|
|
9
|
-
import type { Engine } from '../../engine';
|
|
10
10
|
export type Point = {
|
|
11
11
|
vel: Vector3;
|
|
12
12
|
lifetime: number;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type * as spec from '@galacean/effects-specification';
|
|
2
|
-
import type { vec4, GradientStop } from '@galacean/effects-specification';
|
|
3
|
-
import { Vector3 } from '@galacean/effects-math/es/core/index';
|
|
4
1
|
import type { Matrix4 } from '@galacean/effects-math/es/core/index';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
2
|
+
import { Vector3 } from '@galacean/effects-math/es/core/index';
|
|
3
|
+
import type * as spec from '@galacean/effects-specification';
|
|
4
|
+
import type { GradientStop, vec4 } from '@galacean/effects-specification';
|
|
8
5
|
import type { Engine } from '../../engine';
|
|
9
6
|
import type { ValueGetter } from '../../math';
|
|
7
|
+
import type { GPUCapability, ShaderWithSource } from '../../render';
|
|
8
|
+
import { Geometry, Mesh } from '../../render';
|
|
9
|
+
import { Texture } from '../../texture';
|
|
10
10
|
export type TrailMeshProps = {
|
|
11
11
|
maxTrailCount: number;
|
|
12
12
|
pointCountPerTrail: number;
|
package/dist/render/shader.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ShaderData } from '../asset-loader';
|
|
1
2
|
import { EffectsObject } from '../effects-object';
|
|
2
3
|
import type { Engine } from '../engine';
|
|
3
4
|
export type ShaderMarcos = [key: string, value: string | number | boolean][];
|
|
@@ -78,16 +79,22 @@ export interface SharedShaderWithSource {
|
|
|
78
79
|
cacheId?: string;
|
|
79
80
|
}
|
|
80
81
|
export type ShaderWithSource = InstancedShaderWithSource | SharedShaderWithSource;
|
|
81
|
-
export declare abstract class
|
|
82
|
+
export declare abstract class ShaderVariant extends EffectsObject {
|
|
82
83
|
readonly source: ShaderWithSource;
|
|
84
|
+
shader: Shader;
|
|
83
85
|
constructor(engine: Engine, source: ShaderWithSource);
|
|
84
86
|
}
|
|
87
|
+
export declare class Shader extends EffectsObject {
|
|
88
|
+
shaderData: ShaderData;
|
|
89
|
+
createVariant(macros?: Record<string, number | boolean>): ShaderVariant;
|
|
90
|
+
fromData(data: ShaderData): void;
|
|
91
|
+
}
|
|
85
92
|
export interface ShaderLibrary {
|
|
86
93
|
readonly shaderResults: {
|
|
87
94
|
[cacheId: string]: ShaderCompileResult;
|
|
88
95
|
};
|
|
89
96
|
addShader(shader: ShaderWithSource): void;
|
|
90
|
-
createShader(shaderSource: ShaderWithSource):
|
|
97
|
+
createShader(shaderSource: ShaderWithSource, macros?: ShaderMarcos): ShaderVariant;
|
|
91
98
|
/**
|
|
92
99
|
* @param cacheId
|
|
93
100
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/effects-core",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.5",
|
|
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": "
|
|
45
|
+
"@galacean/effects-specification": "2.0.0-alpha.3",
|
|
46
46
|
"@galacean/effects-math": "1.0.1",
|
|
47
47
|
"uuid": "9.0.1"
|
|
48
48
|
},
|