@galacean/effects-core 2.0.0-alpha.31 → 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,5 +1,5 @@
1
1
  import type { Matrix3, Matrix4, Quaternion, Vector2, Vector3, Vector4, Color } from '@galacean/effects-math/es/core/index';
2
- import type { GlobalUniforms, Renderer, Shader, ShaderWithSource } from '../render';
2
+ import type { GlobalUniforms, Renderer, Shader, ShaderVariant, ShaderWithSource } from '../render';
3
3
  import type { Texture } from '../texture';
4
4
  import type { DestroyOptions, Disposable } from '../utils';
5
5
  import type { UniformSemantic, UniformValue } from './types';
@@ -56,6 +56,7 @@ export interface MaterialProps {
56
56
  */
57
57
  export declare abstract class Material extends EffectsObject implements Disposable {
58
58
  shader: Shader;
59
+ shaderVariant: ShaderVariant;
59
60
  shaderSource: ShaderWithSource;
60
61
  stringTags: Record<string, string>;
61
62
  readonly uniformSemantics: Record<string, UniformSemantic>;
@@ -358,5 +359,6 @@ export declare abstract class Material extends EffectsObject implements Disposab
358
359
  * @override
359
360
  */
360
361
  initialize(): void;
362
+ createShaderVariant(): void;
361
363
  use(render: Renderer, globalUniforms: GlobalUniforms): void;
362
364
  }
@@ -258,6 +258,7 @@ export declare function findPreviousRenderPass(renderPasses: RenderPass[], rende
258
258
  export declare class GlobalUniforms {
259
259
  floats: Record<string, number>;
260
260
  ints: Record<string, number>;
261
+ vector4s: Record<string, Vector4>;
261
262
  matrices: Record<string, Matrix4>;
262
263
  samplers: string[];
263
264
  uniforms: string[];
@@ -1,4 +1,4 @@
1
- import type { Matrix4 } from '@galacean/effects-math/es/core/index';
1
+ import type { Matrix4, Vector4 } from '@galacean/effects-math/es/core/index';
2
2
  import type { RendererComponent } from '../components/renderer-component';
3
3
  import type { Engine } from '../engine';
4
4
  import type { Material } from '../material';
@@ -20,6 +20,7 @@ export declare class Renderer implements LostHandler, RestoreHandler {
20
20
  constructor();
21
21
  setGlobalFloat(name: string, value: number): void;
22
22
  setGlobalInt(name: string, value: number): void;
23
+ setGlobalVector4(name: string, value: Vector4): void;
23
24
  setGlobalMatrix(name: string, value: Matrix4): void;
24
25
  getFramebuffer(): Framebuffer | null;
25
26
  setFramebuffer(framebuffer: Framebuffer | null): void;
@@ -66,7 +66,6 @@ export declare class VFXItem extends EffectsObject implements Disposable {
66
66
  * 元素 id 唯一
67
67
  */
68
68
  id: string;
69
- oldId: string;
70
69
  /**
71
70
  * 元素创建的数据图层/粒子/模型等
72
71
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/effects-core",
3
- "version": "2.0.0-alpha.31",
3
+ "version": "2.0.0-alpha.32",
4
4
  "description": "Galacean Effects runtime core for the web",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/index.js",