@galacean/engine-design 1.0.0-beta.14 → 1.0.0-beta.16
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/engine-design",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.16",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"types": "types/index.d.ts",
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@galacean/engine-math": "1.0.0-beta.
|
|
17
|
+
"@galacean/engine-math": "1.0.0-beta.16"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"b:types": "tsc"
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { AstNode } from "./astNode";
|
|
2
|
+
import { IAstInfo, IPositionRange, IShaderAstContent } from "./astNode/types";
|
|
3
|
+
export type DiagnosticSeverity = number;
|
|
4
|
+
/**
|
|
5
|
+
* Shader lab interface
|
|
6
|
+
*/
|
|
7
|
+
export interface IShaderLab {
|
|
8
|
+
/** */
|
|
9
|
+
initialize(): Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* parse galacean shader
|
|
12
|
+
*/
|
|
13
|
+
parseShader(shaderCode: string): IShaderInfo;
|
|
14
|
+
}
|
|
15
|
+
export interface IDiagnostic {
|
|
16
|
+
severity: DiagnosticSeverity;
|
|
17
|
+
message: string;
|
|
18
|
+
/**
|
|
19
|
+
* The token which caused the parser error.
|
|
20
|
+
*/
|
|
21
|
+
token: IPositionRange;
|
|
22
|
+
}
|
|
23
|
+
export interface IShaderMainFunction {
|
|
24
|
+
type: "vert" | "frag";
|
|
25
|
+
functionAst: IAstInfo;
|
|
26
|
+
}
|
|
27
|
+
interface IReference {
|
|
28
|
+
referenced: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface IGlobal extends IReference {
|
|
31
|
+
ast: AstNode;
|
|
32
|
+
name: string;
|
|
33
|
+
}
|
|
34
|
+
export interface IShaderInfo {
|
|
35
|
+
ast: AstNode<IShaderAstContent>;
|
|
36
|
+
name: string;
|
|
37
|
+
subShaders: Array<ISubShader>;
|
|
38
|
+
editorProperties: Record<string, any>;
|
|
39
|
+
diagnostics: Array<IDiagnostic>;
|
|
40
|
+
}
|
|
41
|
+
export interface ISubShader {
|
|
42
|
+
name: string;
|
|
43
|
+
passes: Array<IShaderPass>;
|
|
44
|
+
tags?: Record<string, any>;
|
|
45
|
+
}
|
|
46
|
+
export interface IShaderPass {
|
|
47
|
+
name: string;
|
|
48
|
+
vert: string;
|
|
49
|
+
frag: string;
|
|
50
|
+
tags?: Record<string, any>;
|
|
51
|
+
renderStates: IRenderState;
|
|
52
|
+
}
|
|
53
|
+
export declare type IRenderState = Record<string, any>;
|
|
54
|
+
export {};
|