nodeMaterialBuildStateSharedData.d.ts 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. import type { NodeMaterialConnectionPoint } from "./nodeMaterialBlockConnectionPoint";
  2. import type { NodeMaterialBlock } from "./nodeMaterialBlock";
  3. import type { InputBlock } from "./Blocks/Input/inputBlock";
  4. import type { Scene } from "../../scene";
  5. import type { Immutable } from "../../types";
  6. import type { NodeMaterial, NodeMaterialTextureBlocks } from "./nodeMaterial";
  7. /**
  8. * Class used to store shared data between 2 NodeMaterialBuildState
  9. */
  10. export declare class NodeMaterialBuildStateSharedData {
  11. /**
  12. * The node material we are currently building
  13. */
  14. nodeMaterial: NodeMaterial;
  15. /**
  16. * Gets the list of emitted varyings
  17. */
  18. temps: string[];
  19. /**
  20. * Gets the list of emitted varyings
  21. */
  22. varyings: string[];
  23. /**
  24. * Gets the varying declaration string
  25. */
  26. varyingDeclaration: string;
  27. /**
  28. * List of the fragment output nodes
  29. */
  30. fragmentOutputNodes: Immutable<Array<NodeMaterialBlock>>;
  31. /**
  32. * Input blocks
  33. */
  34. inputBlocks: InputBlock[];
  35. /**
  36. * Input blocks
  37. */
  38. textureBlocks: NodeMaterialTextureBlocks[];
  39. /**
  40. * Bindable blocks (Blocks that need to set data to the effect)
  41. */
  42. bindableBlocks: NodeMaterialBlock[];
  43. /**
  44. * Bindable blocks (Blocks that need to set data to the effect) that will always be called (by bindForSubMesh), contrary to bindableBlocks that won't be called if _mustRebind() returns false
  45. */
  46. forcedBindableBlocks: NodeMaterialBlock[];
  47. /**
  48. * List of blocks that can provide a compilation fallback
  49. */
  50. blocksWithFallbacks: NodeMaterialBlock[];
  51. /**
  52. * List of blocks that can provide a define update
  53. */
  54. blocksWithDefines: NodeMaterialBlock[];
  55. /**
  56. * List of blocks that can provide a repeatable content
  57. */
  58. repeatableContentBlocks: NodeMaterialBlock[];
  59. /**
  60. * List of blocks that can provide a dynamic list of uniforms
  61. */
  62. dynamicUniformBlocks: NodeMaterialBlock[];
  63. /**
  64. * List of blocks that can block the isReady function for the material
  65. */
  66. blockingBlocks: NodeMaterialBlock[];
  67. /**
  68. * Gets the list of animated inputs
  69. */
  70. animatedInputs: InputBlock[];
  71. /**
  72. * Build Id used to avoid multiple recompilations
  73. */
  74. buildId: number;
  75. /** List of emitted variables */
  76. variableNames: {
  77. [key: string]: number;
  78. };
  79. /** List of emitted defines */
  80. defineNames: {
  81. [key: string]: number;
  82. };
  83. /** Should emit comments? */
  84. emitComments: boolean;
  85. /** Emit build activity */
  86. verbose: boolean;
  87. /** Gets or sets the hosting scene */
  88. scene: Scene;
  89. /**
  90. * Gets the compilation hints emitted at compilation time
  91. */
  92. hints: {
  93. needWorldViewMatrix: boolean;
  94. needWorldViewProjectionMatrix: boolean;
  95. needAlphaBlending: boolean;
  96. needAlphaTesting: boolean;
  97. };
  98. /**
  99. * List of compilation checks
  100. */
  101. checks: {
  102. emitVertex: boolean;
  103. emitFragment: boolean;
  104. notConnectedNonOptionalInputs: NodeMaterialConnectionPoint[];
  105. };
  106. /**
  107. * Is vertex program allowed to be empty?
  108. */
  109. allowEmptyVertexProgram: boolean;
  110. /** Creates a new shared data */
  111. constructor();
  112. /**
  113. * Emits console errors and exceptions if there is a failing check
  114. */
  115. emitErrors(): void;
  116. }