materialDefines.d.ts 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /**
  2. * Manages the defines for the Material
  3. */
  4. export declare class MaterialDefines {
  5. /** @internal */
  6. protected _keys: string[];
  7. private _isDirty;
  8. /** @internal */
  9. _renderId: number;
  10. /** @internal */
  11. _areLightsDirty: boolean;
  12. /** @internal */
  13. _areLightsDisposed: boolean;
  14. /** @internal */
  15. _areAttributesDirty: boolean;
  16. /** @internal */
  17. _areTexturesDirty: boolean;
  18. /** @internal */
  19. _areFresnelDirty: boolean;
  20. /** @internal */
  21. _areMiscDirty: boolean;
  22. /** @internal */
  23. _arePrePassDirty: boolean;
  24. /** @internal */
  25. _areImageProcessingDirty: boolean;
  26. /** @internal */
  27. _normals: boolean;
  28. /** @internal */
  29. _uvs: boolean;
  30. /** @internal */
  31. _needNormals: boolean;
  32. /** @internal */
  33. _needUVs: boolean;
  34. protected _externalProperties?: {
  35. [name: string]: {
  36. type: string;
  37. default: any;
  38. };
  39. };
  40. [id: string]: any;
  41. /**
  42. * Creates a new instance
  43. * @param externalProperties list of external properties to inject into the object
  44. */
  45. constructor(externalProperties?: {
  46. [name: string]: {
  47. type: string;
  48. default: any;
  49. };
  50. });
  51. /**
  52. * Specifies if the material needs to be re-calculated
  53. */
  54. get isDirty(): boolean;
  55. /**
  56. * Marks the material to indicate that it has been re-calculated
  57. */
  58. markAsProcessed(): void;
  59. /**
  60. * Marks the material to indicate that it needs to be re-calculated
  61. */
  62. markAsUnprocessed(): void;
  63. /**
  64. * Marks the material to indicate all of its defines need to be re-calculated
  65. */
  66. markAllAsDirty(): void;
  67. /**
  68. * Marks the material to indicate that image processing needs to be re-calculated
  69. */
  70. markAsImageProcessingDirty(): void;
  71. /**
  72. * Marks the material to indicate the lights need to be re-calculated
  73. * @param disposed Defines whether the light is dirty due to dispose or not
  74. */
  75. markAsLightDirty(disposed?: boolean): void;
  76. /**
  77. * Marks the attribute state as changed
  78. */
  79. markAsAttributesDirty(): void;
  80. /**
  81. * Marks the texture state as changed
  82. */
  83. markAsTexturesDirty(): void;
  84. /**
  85. * Marks the fresnel state as changed
  86. */
  87. markAsFresnelDirty(): void;
  88. /**
  89. * Marks the misc state as changed
  90. */
  91. markAsMiscDirty(): void;
  92. /**
  93. * Marks the prepass state as changed
  94. */
  95. markAsPrePassDirty(): void;
  96. /**
  97. * Rebuilds the material defines
  98. */
  99. rebuild(): void;
  100. /**
  101. * Specifies if two material defines are equal
  102. * @param other - A material define instance to compare to
  103. * @returns - Boolean indicating if the material defines are equal (true) or not (false)
  104. */
  105. isEqual(other: MaterialDefines): boolean;
  106. /**
  107. * Clones this instance's defines to another instance
  108. * @param other - material defines to clone values to
  109. */
  110. cloneTo(other: MaterialDefines): void;
  111. /**
  112. * Resets the material define values
  113. */
  114. reset(): void;
  115. private _setDefaultValue;
  116. /**
  117. * Converts the material define values to a string
  118. * @returns - String of material define information
  119. */
  120. toString(): string;
  121. }