@galacean/effects-webgl 2.0.0-alpha.30 → 2.0.0-alpha.32

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.
@@ -1,7 +1,6 @@
1
1
  import type { Engine, GlobalUniforms, MaterialDestroyOptions, MaterialProps, MaterialStates, Renderer, Texture, UndefinedAble } from '@galacean/effects-core';
2
2
  import { spec, Material, math } from '@galacean/effects-core';
3
3
  import type { GLPipelineContext } from './gl-pipeline-context';
4
- import type { GLShaderVariant } from './gl-shader';
5
4
  type Color = math.Color;
6
5
  type Vector2 = math.Vector2;
7
6
  type Vector3 = math.Vector3;
@@ -11,7 +10,6 @@ type Matrix4 = math.Matrix4;
11
10
  type Quaternion = math.Quaternion;
12
11
  declare const Vector4: typeof math.Vector4, Matrix4: typeof math.Matrix4;
13
12
  export declare class GLMaterial extends Material {
14
- shaderVariant: GLShaderVariant;
15
13
  private floats;
16
14
  private ints;
17
15
  private vector2s;
@@ -82,6 +80,7 @@ export declare class GLMaterial extends Material {
82
80
  get isDestroyed(): boolean;
83
81
  /**shader和texture的GPU资源初始化。 */
84
82
  initialize(): void;
83
+ createShaderVariant(): void;
85
84
  setupStates(pipelineContext: GLPipelineContext): void;
86
85
  use(renderer: Renderer, globalUniforms?: GlobalUniforms): void;
87
86
  getFloat(name: string): number | null;
@@ -5,6 +5,7 @@ import { GLContextManager } from './gl-context-manager';
5
5
  import { GLPipelineContext } from './gl-pipeline-context';
6
6
  import { GLRendererInternal } from './gl-renderer-internal';
7
7
  type Matrix4 = math.Matrix4;
8
+ type Vector4 = math.Vector4;
8
9
  export declare class GLRenderer extends Renderer implements Disposable {
9
10
  readonly canvas: HTMLCanvasElement | OffscreenCanvas;
10
11
  glRenderer: GLRendererInternal;
@@ -21,6 +22,8 @@ export declare class GLRenderer extends Renderer implements Disposable {
21
22
  renderRenderPass(pass: RenderPass): void;
22
23
  renderMeshes(meshes: RendererComponent[]): void;
23
24
  setGlobalFloat(name: string, value: number): void;
25
+ setGlobalVector4(name: string, value: Vector4): void;
26
+ getGlobalVector4(name: string): Vector4;
24
27
  setGlobalInt(name: string, value: number): void;
25
28
  setGlobalMatrix(name: string, value: Matrix4): void;
26
29
  drawGeometry(geometry: Geometry, material: Material, subMeshIndex?: number): void;
@@ -18,7 +18,7 @@ export declare class GLShaderVariant extends ShaderVariant {
18
18
  uniformLocations: Record<string, WebGLUniformLocation | null>;
19
19
  private samplerChannels;
20
20
  constructor(engine: Engine, source: ShaderWithSource);
21
- initialize(engine: Engine): void;
21
+ initialize(): void;
22
22
  setFloat(name: string, value: number): void;
23
23
  setInt(name: string, value: number): void;
24
24
  setFloats(name: string, value: number[]): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/effects-webgl",
3
- "version": "2.0.0-alpha.30",
3
+ "version": "2.0.0-alpha.32",
4
4
  "description": "Galacean Effects runtime webgl for the web",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "string-hash": "^1.1.3",
42
- "@galacean/effects-core": "2.0.0-alpha.30"
42
+ "@galacean/effects-core": "2.0.0-alpha.32"
43
43
  },
44
44
  "scripts": {
45
45
  "prebuild": "pnpm clean",