@galacean/engine-design 1.6.0-alpha.2 → 1.6.0-beta.1

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.6.0-alpha.2",
3
+ "version": "1.6.0-beta.1",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -17,7 +17,7 @@
17
17
  ],
18
18
  "types": "types/index.d.ts",
19
19
  "dependencies": {
20
- "@galacean/engine-math": "1.6.0-alpha.2"
20
+ "@galacean/engine-math": "1.6.0-beta.1"
21
21
  },
22
22
  "scripts": {
23
23
  "b:types": "tsc"
@@ -1,18 +1,22 @@
1
1
  import { IShaderProgramSource } from "./IShaderProgramSource";
2
- import { IShaderContent } from "./shaderContent/IShaderContent";
2
+ import { IShaderSource } from "./shaderSource/IShaderSource";
3
3
  /**
4
4
  * Shader lab interface.
5
5
  */
6
6
  export interface IShaderLab {
7
7
  /**
8
8
  * @internal
9
- * Parse shader source to get the structure of shader.
9
+ * Parse shader source code to get the source structure of shader.
10
10
  */
11
- _parseShaderContent(shaderSource: string): IShaderContent;
11
+ _parseShaderSource(sourceCode: string): IShaderSource;
12
12
  /**
13
13
  * @internal
14
14
  * Parse shader pass source code.
15
15
  * @param basePathForIncludeKey the base path to resolve the relative path of `#include` directive. Must follow the specifications of [URL.origin](https://developer.mozilla.org/en-US/docs/Web/API/URL/origin), like: `shaders://root/`
16
16
  */
17
- _parseShaderPass(shaderPassSource: string, vertexEntry: string, fragmentEntry: string, macros: any[], backend: number, platformMacros: string[], basePathForIncludeKey: string): IShaderProgramSource;
17
+ _parseShaderPass(shaderPassSource: string, vertexEntry: string, fragmentEntry: string, backend: number, basePathForIncludeKey: string): IShaderProgramSource;
18
+ _parseMacros(context: string, macros: Array<{
19
+ name: string;
20
+ value: string;
21
+ }>): string;
18
22
  }
@@ -1,8 +1,8 @@
1
- export type { IShaderProgramSource as IShaderInfo } from "./IShaderProgramSource";
2
1
  export type { IShaderLab } from "./IShaderLab";
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";
2
+ export type { IShaderProgramSource as IShaderInfo } from "./IShaderProgramSource";
3
+ export { IRenderStates } from "./shaderSource/IRenderStates";
4
+ export { IShaderPassSource } from "./shaderSource/IShaderPassSource";
5
+ export { IShaderPosition } from "./shaderSource/IShaderPosition";
6
+ export type { IShaderSource } from "./shaderSource/IShaderSource";
7
+ export { IStatement } from "./shaderSource/IStatement";
8
+ export { ISubShaderSource } from "./shaderSource/ISubShaderSource";
@@ -0,0 +1,5 @@
1
+ import { Color } from "@galacean/engine-math";
2
+ export interface IRenderStates {
3
+ constantMap: Record<number, number | string | boolean | Color>;
4
+ variableMap: Record<number, string>;
5
+ }
@@ -1,6 +1,8 @@
1
1
  import { IRenderStates } from "./IRenderStates";
2
- export interface IShaderPassContent {
2
+ import { IStatement } from "./IStatement";
3
+ export interface IShaderPassSource {
3
4
  name: string;
5
+ pendingContents: IStatement[];
4
6
  isUsePass: boolean;
5
7
  tags?: Record<string, number | string | boolean>;
6
8
  renderStates: IRenderStates;
@@ -0,0 +1,9 @@
1
+ import { IRenderStates } from "./IRenderStates";
2
+ import { IStatement } from "./IStatement";
3
+ import { ISubShaderSource } from "./ISubShaderSource";
4
+ export interface IShaderSource {
5
+ name: string;
6
+ pendingContents: IStatement[];
7
+ subShaders: ISubShaderSource[];
8
+ renderStates: IRenderStates;
9
+ }
@@ -1,10 +1,10 @@
1
- import { IShaderPassContent } from "./IShaderPassContent";
2
1
  import { IRenderStates } from "./IRenderStates";
2
+ import { IShaderPassSource } from "./IShaderPassSource";
3
3
  import { IStatement } from "./IStatement";
4
- export interface ISubShaderContent {
4
+ export interface ISubShaderSource {
5
5
  name: string;
6
- passes: IShaderPassContent[];
7
- globalContents: IStatement[];
6
+ passes: IShaderPassSource[];
7
+ pendingContents: IStatement[];
8
8
  tags?: Record<string, number | string | boolean>;
9
9
  renderStates: IRenderStates;
10
10
  }
@@ -1,4 +0,0 @@
1
- export interface IRenderStates {
2
- constantMap: Record<number, any>;
3
- variableMap: Record<number, string>;
4
- }
@@ -1,9 +0,0 @@
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
- }