@galacean/engine-design 0.0.0-experimental-stateMachine.0 → 0.0.0-experimental-1.3-xr.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/engine-design",
3
- "version": "0.0.0-experimental-stateMachine.0",
3
+ "version": "0.0.0-experimental-1.3-xr.0",
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": "0.0.0-experimental-stateMachine.0"
17
+ "@galacean/engine-math": "0.0.0-experimental-1.3-xr.0"
18
18
  },
19
19
  "scripts": {
20
20
  "b:types": "tsc"
@@ -1,10 +1,17 @@
1
- import { IShaderInfo } from "./IShaderInfo";
1
+ import { IShaderProgramSource } from "./IShaderProgramSource";
2
+ import { IShaderContent } from "./shaderContent/IShaderContent";
2
3
  /**
3
4
  * Shader lab interface.
4
5
  */
5
6
  export interface IShaderLab {
6
7
  /**
7
- * parsing shader source code.
8
+ * @internal
9
+ * Parse shader source to get the structure of shader.
8
10
  */
9
- parseShader(shaderSource: string): IShaderInfo;
11
+ _parseShaderContent(shaderSource: string): IShaderContent;
12
+ /**
13
+ * @internal
14
+ * Parse shader pass source code.
15
+ */
16
+ _parseShaderPass(shaderPassSource: string, vertexEntry: string, fragmentEntry: string, macros: any[], backend: number, platformMacros: string[]): IShaderProgramSource;
10
17
  }
@@ -0,0 +1,4 @@
1
+ export interface IShaderProgramSource {
2
+ vertex: string;
3
+ fragment: string;
4
+ }
@@ -1,4 +1,8 @@
1
- export type { IShaderInfo } from "./IShaderInfo";
1
+ export type { IShaderProgramSource as IShaderInfo } from "./IShaderProgramSource";
2
2
  export type { IShaderLab } from "./IShaderLab";
3
- export type { IShaderPassInfo } from "./IShaderPassInfo";
4
- export type { ISubShaderInfo } from "./ISubShaderInfo";
3
+ export type { IShaderContent } from "./shaderContent/IShaderContent";
4
+ export { IStatement } from "./shaderContent/IStatement";
5
+ export { ISubShaderContent } from "./shaderContent/ISubShaderContent";
6
+ export { IShaderPassContent } from "./shaderContent/IShaderPassContent";
7
+ export { IShaderPosition } from "./shaderContent/IShaderPosition";
8
+ export { IRenderStates } from "./shaderContent/IRenderStates";
@@ -0,0 +1,4 @@
1
+ export interface IRenderStates {
2
+ constantMap: Record<number, any>;
3
+ variableMap: Record<number, string>;
4
+ }
@@ -0,0 +1,9 @@
1
+ import { IRenderStates } from "./IRenderStates";
2
+ import { IStatement } from "./IStatement";
3
+ import { ISubShaderContent } from "./ISubShaderContent";
4
+ export interface IShaderContent {
5
+ name: string;
6
+ subShaders: ISubShaderContent[];
7
+ globalContents: IStatement[];
8
+ renderStates: IRenderStates;
9
+ }
@@ -0,0 +1,11 @@
1
+ import { IRenderStates } from "./IRenderStates";
2
+ export interface IShaderPassContent {
3
+ name: string;
4
+ isUsePass: boolean;
5
+ tags?: Record<string, number | string | boolean>;
6
+ renderStates: IRenderStates;
7
+ /** ShaderLab code source. */
8
+ contents: string;
9
+ vertexEntry: string;
10
+ fragmentEntry: string;
11
+ }
@@ -0,0 +1,3 @@
1
+ export interface IShaderPosition {
2
+ index: number;
3
+ }
@@ -0,0 +1,8 @@
1
+ import { IShaderPosition } from "./IShaderPosition";
2
+ export interface IStatement {
3
+ content: string;
4
+ range: {
5
+ start: IShaderPosition;
6
+ end: IShaderPosition;
7
+ };
8
+ }
@@ -0,0 +1,10 @@
1
+ import { IShaderPassContent } from "./IShaderPassContent";
2
+ import { IRenderStates } from "./IRenderStates";
3
+ import { IStatement } from "./IStatement";
4
+ export interface ISubShaderContent {
5
+ name: string;
6
+ passes: IShaderPassContent[];
7
+ globalContents: IStatement[];
8
+ tags?: Record<string, number | string | boolean>;
9
+ renderStates: IRenderStates;
10
+ }