pushMaterial.d.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import type { Nullable } from "../types";
  2. import type { Scene } from "../scene";
  3. import { Matrix } from "../Maths/math.vector";
  4. import type { AbstractMesh } from "../Meshes/abstractMesh";
  5. import type { Mesh } from "../Meshes/mesh";
  6. import { Material } from "../Materials/material";
  7. import type { Effect } from "../Materials/effect";
  8. import type { SubMesh } from "../Meshes/subMesh";
  9. /**
  10. * Base class of materials working in push mode in babylon JS
  11. * @internal
  12. */
  13. export declare class PushMaterial extends Material {
  14. protected _activeEffect?: Effect;
  15. protected _normalMatrix: Matrix;
  16. constructor(name: string, scene?: Scene, storeEffectOnSubMeshes?: boolean);
  17. getEffect(): Effect;
  18. isReady(mesh?: AbstractMesh, useInstances?: boolean): boolean;
  19. protected _isReadyForSubMesh(subMesh: SubMesh): boolean;
  20. /**
  21. * Binds the given world matrix to the active effect
  22. *
  23. * @param world the matrix to bind
  24. */
  25. bindOnlyWorldMatrix(world: Matrix): void;
  26. /**
  27. * Binds the given normal matrix to the active effect
  28. *
  29. * @param normalMatrix the matrix to bind
  30. */
  31. bindOnlyNormalMatrix(normalMatrix: Matrix): void;
  32. bind(world: Matrix, mesh?: Mesh): void;
  33. protected _afterBind(mesh?: Mesh, effect?: Nullable<Effect>, subMesh?: SubMesh): void;
  34. protected _mustRebind(scene: Scene, effect: Effect, subMesh: SubMesh, visibility?: number): boolean;
  35. dispose(forceDisposeEffect?: boolean, forceDisposeTextures?: boolean, notBoundToMesh?: boolean): void;
  36. }