constants.ts 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. /** Defines the cross module used constants to avoid circular dependncies */
  2. export class Constants {
  3. /** Defines that alpha blending is disabled */
  4. public static readonly ALPHA_DISABLE = 0;
  5. /** Defines that alpha blending is SRC ALPHA * SRC + DEST */
  6. public static readonly ALPHA_ADD = 1;
  7. /** Defines that alpha blending is SRC ALPHA * SRC + (1 - SRC ALPHA) * DEST */
  8. public static readonly ALPHA_COMBINE = 2;
  9. /** Defines that alpha blending is DEST - SRC * DEST */
  10. public static readonly ALPHA_SUBTRACT = 3;
  11. /** Defines that alpha blending is SRC * DEST */
  12. public static readonly ALPHA_MULTIPLY = 4;
  13. /** Defines that alpha blending is SRC ALPHA * SRC + (1 - SRC) * DEST */
  14. public static readonly ALPHA_MAXIMIZED = 5;
  15. /** Defines that alpha blending is SRC + DEST */
  16. public static readonly ALPHA_ONEONE = 6;
  17. /** Defines that alpha blending is SRC + (1 - SRC ALPHA) * DEST */
  18. public static readonly ALPHA_PREMULTIPLIED = 7;
  19. /**
  20. * Defines that alpha blending is SRC + (1 - SRC ALPHA) * DEST
  21. * Alpha will be set to (1 - SRC ALPHA) * DEST ALPHA
  22. */
  23. public static readonly ALPHA_PREMULTIPLIED_PORTERDUFF = 8;
  24. /** Defines that alpha blending is CST * SRC + (1 - CST) * DEST */
  25. public static readonly ALPHA_INTERPOLATE = 9;
  26. /**
  27. * Defines that alpha blending is SRC + (1 - SRC) * DEST
  28. * Alpha will be set to SRC ALPHA + (1 - SRC ALPHA) * DEST ALPHA
  29. */
  30. public static readonly ALPHA_SCREENMODE = 10;
  31. /**
  32. * Defines that alpha blending is SRC + DST
  33. * Alpha will be set to SRC ALPHA + DST ALPHA
  34. */
  35. public static readonly ALPHA_ONEONE_ONEONE = 11;
  36. /**
  37. * Defines that alpha blending is SRC * DST ALPHA + DST
  38. * Alpha will be set to 0
  39. */
  40. public static readonly ALPHA_ALPHATOCOLOR = 12;
  41. /**
  42. * Defines that alpha blending is SRC * (1 - DST) + DST * (1 - SRC)
  43. */
  44. public static readonly ALPHA_REVERSEONEMINUS = 13;
  45. /**
  46. * Defines that alpha blending is SRC + DST * (1 - SRC ALPHA)
  47. * Alpha will be set to SRC ALPHA + DST ALPHA * (1 - SRC ALPHA)
  48. */
  49. public static readonly ALPHA_SRC_DSTONEMINUSSRCALPHA = 14;
  50. /**
  51. * Defines that alpha blending is SRC + DST
  52. * Alpha will be set to SRC ALPHA
  53. */
  54. public static readonly ALPHA_ONEONE_ONEZERO = 15;
  55. /**
  56. * Defines that alpha blending is SRC * (1 - DST) + DST * (1 - SRC)
  57. * Alpha will be set to DST ALPHA
  58. */
  59. public static readonly ALPHA_EXCLUSION = 16;
  60. /** Defines that alpha blending equation a SUM */
  61. public static readonly ALPHA_EQUATION_ADD = 0;
  62. /** Defines that alpha blending equation a SUBSTRACTION */
  63. public static readonly ALPHA_EQUATION_SUBSTRACT = 1;
  64. /** Defines that alpha blending equation a REVERSE SUBSTRACTION */
  65. public static readonly ALPHA_EQUATION_REVERSE_SUBTRACT = 2;
  66. /** Defines that alpha blending equation a MAX operation */
  67. public static readonly ALPHA_EQUATION_MAX = 3;
  68. /** Defines that alpha blending equation a MIN operation */
  69. public static readonly ALPHA_EQUATION_MIN = 4;
  70. /**
  71. * Defines that alpha blending equation a DARKEN operation:
  72. * It takes the min of the src and sums the alpha channels.
  73. */
  74. public static readonly ALPHA_EQUATION_DARKEN = 5;
  75. /** Defines that the ressource is not delayed*/
  76. public static readonly DELAYLOADSTATE_NONE = 0;
  77. /** Defines that the ressource was successfully delay loaded */
  78. public static readonly DELAYLOADSTATE_LOADED = 1;
  79. /** Defines that the ressource is currently delay loading */
  80. public static readonly DELAYLOADSTATE_LOADING = 2;
  81. /** Defines that the ressource is delayed and has not started loading */
  82. public static readonly DELAYLOADSTATE_NOTLOADED = 4;
  83. // Depht or Stencil test Constants.
  84. /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn */
  85. public static readonly NEVER = 0x0200;
  86. /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn */
  87. public static readonly ALWAYS = 0x0207;
  88. /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value */
  89. public static readonly LESS = 0x0201;
  90. /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value */
  91. public static readonly EQUAL = 0x0202;
  92. /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value */
  93. public static readonly LEQUAL = 0x0203;
  94. /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value */
  95. public static readonly GREATER = 0x0204;
  96. /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value */
  97. public static readonly GEQUAL = 0x0206;
  98. /** Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value */
  99. public static readonly NOTEQUAL = 0x0205;
  100. // Stencil Actions Constants.
  101. /** Passed to stencilOperation to specify that stencil value must be kept */
  102. public static readonly KEEP = 0x1E00;
  103. /** Passed to stencilOperation to specify that stencil value must be replaced */
  104. public static readonly REPLACE = 0x1E01;
  105. /** Passed to stencilOperation to specify that stencil value must be incremented */
  106. public static readonly INCR = 0x1E02;
  107. /** Passed to stencilOperation to specify that stencil value must be decremented */
  108. public static readonly DECR = 0x1E03;
  109. /** Passed to stencilOperation to specify that stencil value must be inverted */
  110. public static readonly INVERT = 0x150A;
  111. /** Passed to stencilOperation to specify that stencil value must be incremented with wrapping */
  112. public static readonly INCR_WRAP = 0x8507;
  113. /** Passed to stencilOperation to specify that stencil value must be decremented with wrapping */
  114. public static readonly DECR_WRAP = 0x8508;
  115. /** Texture is not repeating outside of 0..1 UVs */
  116. public static readonly TEXTURE_CLAMP_ADDRESSMODE = 0;
  117. /** Texture is repeating outside of 0..1 UVs */
  118. public static readonly TEXTURE_WRAP_ADDRESSMODE = 1;
  119. /** Texture is repeating and mirrored */
  120. public static readonly TEXTURE_MIRROR_ADDRESSMODE = 2;
  121. /** ALPHA */
  122. public static readonly TEXTUREFORMAT_ALPHA = 0;
  123. /** LUMINANCE */
  124. public static readonly TEXTUREFORMAT_LUMINANCE = 1;
  125. /** LUMINANCE_ALPHA */
  126. public static readonly TEXTUREFORMAT_LUMINANCE_ALPHA = 2;
  127. /** RGB */
  128. public static readonly TEXTUREFORMAT_RGB = 4;
  129. /** RGBA */
  130. public static readonly TEXTUREFORMAT_RGBA = 5;
  131. /** RED */
  132. public static readonly TEXTUREFORMAT_RED = 6;
  133. /** RED (2nd reference) */
  134. public static readonly TEXTUREFORMAT_R = 6;
  135. /** RG */
  136. public static readonly TEXTUREFORMAT_RG = 7;
  137. /** RED_INTEGER */
  138. public static readonly TEXTUREFORMAT_RED_INTEGER = 8;
  139. /** RED_INTEGER (2nd reference) */
  140. public static readonly TEXTUREFORMAT_R_INTEGER = 8;
  141. /** RG_INTEGER */
  142. public static readonly TEXTUREFORMAT_RG_INTEGER = 9;
  143. /** RGB_INTEGER */
  144. public static readonly TEXTUREFORMAT_RGB_INTEGER = 10;
  145. /** RGBA_INTEGER */
  146. public static readonly TEXTUREFORMAT_RGBA_INTEGER = 11;
  147. /** UNSIGNED_BYTE */
  148. public static readonly TEXTURETYPE_UNSIGNED_BYTE = 0;
  149. /** UNSIGNED_BYTE (2nd reference) */
  150. public static readonly TEXTURETYPE_UNSIGNED_INT = 0;
  151. /** FLOAT */
  152. public static readonly TEXTURETYPE_FLOAT = 1;
  153. /** HALF_FLOAT */
  154. public static readonly TEXTURETYPE_HALF_FLOAT = 2;
  155. /** BYTE */
  156. public static readonly TEXTURETYPE_BYTE = 3;
  157. /** SHORT */
  158. public static readonly TEXTURETYPE_SHORT = 4;
  159. /** UNSIGNED_SHORT */
  160. public static readonly TEXTURETYPE_UNSIGNED_SHORT = 5;
  161. /** INT */
  162. public static readonly TEXTURETYPE_INT = 6;
  163. /** UNSIGNED_INT */
  164. public static readonly TEXTURETYPE_UNSIGNED_INTEGER = 7;
  165. /** UNSIGNED_SHORT_4_4_4_4 */
  166. public static readonly TEXTURETYPE_UNSIGNED_SHORT_4_4_4_4 = 8;
  167. /** UNSIGNED_SHORT_5_5_5_1 */
  168. public static readonly TEXTURETYPE_UNSIGNED_SHORT_5_5_5_1 = 9;
  169. /** UNSIGNED_SHORT_5_6_5 */
  170. public static readonly TEXTURETYPE_UNSIGNED_SHORT_5_6_5 = 10;
  171. /** UNSIGNED_INT_2_10_10_10_REV */
  172. public static readonly TEXTURETYPE_UNSIGNED_INT_2_10_10_10_REV = 11;
  173. /** UNSIGNED_INT_24_8 */
  174. public static readonly TEXTURETYPE_UNSIGNED_INT_24_8 = 12;
  175. /** UNSIGNED_INT_10F_11F_11F_REV */
  176. public static readonly TEXTURETYPE_UNSIGNED_INT_10F_11F_11F_REV = 13;
  177. /** UNSIGNED_INT_5_9_9_9_REV */
  178. public static readonly TEXTURETYPE_UNSIGNED_INT_5_9_9_9_REV = 14;
  179. /** FLOAT_32_UNSIGNED_INT_24_8_REV */
  180. public static readonly TEXTURETYPE_FLOAT_32_UNSIGNED_INT_24_8_REV = 15;
  181. /** nearest is mag = nearest and min = nearest and no mip */
  182. public static readonly TEXTURE_NEAREST_SAMPLINGMODE = 1;
  183. /** mag = nearest and min = nearest and mip = none */
  184. public static readonly TEXTURE_NEAREST_NEAREST = 1;
  185. /** Bilinear is mag = linear and min = linear and no mip */
  186. public static readonly TEXTURE_BILINEAR_SAMPLINGMODE = 2;
  187. /** mag = linear and min = linear and mip = none */
  188. public static readonly TEXTURE_LINEAR_LINEAR = 2;
  189. /** Trilinear is mag = linear and min = linear and mip = linear */
  190. public static readonly TEXTURE_TRILINEAR_SAMPLINGMODE = 3;
  191. /** Trilinear is mag = linear and min = linear and mip = linear */
  192. public static readonly TEXTURE_LINEAR_LINEAR_MIPLINEAR = 3;
  193. /** mag = nearest and min = nearest and mip = nearest */
  194. public static readonly TEXTURE_NEAREST_NEAREST_MIPNEAREST = 4;
  195. /** mag = nearest and min = linear and mip = nearest */
  196. public static readonly TEXTURE_NEAREST_LINEAR_MIPNEAREST = 5;
  197. /** mag = nearest and min = linear and mip = linear */
  198. public static readonly TEXTURE_NEAREST_LINEAR_MIPLINEAR = 6;
  199. /** mag = nearest and min = linear and mip = none */
  200. public static readonly TEXTURE_NEAREST_LINEAR = 7;
  201. /** nearest is mag = nearest and min = nearest and mip = linear */
  202. public static readonly TEXTURE_NEAREST_NEAREST_MIPLINEAR = 8;
  203. /** mag = linear and min = nearest and mip = nearest */
  204. public static readonly TEXTURE_LINEAR_NEAREST_MIPNEAREST = 9;
  205. /** mag = linear and min = nearest and mip = linear */
  206. public static readonly TEXTURE_LINEAR_NEAREST_MIPLINEAR = 10;
  207. /** Bilinear is mag = linear and min = linear and mip = nearest */
  208. public static readonly TEXTURE_LINEAR_LINEAR_MIPNEAREST = 11;
  209. /** mag = linear and min = nearest and mip = none */
  210. public static readonly TEXTURE_LINEAR_NEAREST = 12;
  211. /** Explicit coordinates mode */
  212. public static readonly TEXTURE_EXPLICIT_MODE = 0;
  213. /** Spherical coordinates mode */
  214. public static readonly TEXTURE_SPHERICAL_MODE = 1;
  215. /** Planar coordinates mode */
  216. public static readonly TEXTURE_PLANAR_MODE = 2;
  217. /** Cubic coordinates mode */
  218. public static readonly TEXTURE_CUBIC_MODE = 3;
  219. /** Projection coordinates mode */
  220. public static readonly TEXTURE_PROJECTION_MODE = 4;
  221. /** Skybox coordinates mode */
  222. public static readonly TEXTURE_SKYBOX_MODE = 5;
  223. /** Inverse Cubic coordinates mode */
  224. public static readonly TEXTURE_INVCUBIC_MODE = 6;
  225. /** Equirectangular coordinates mode */
  226. public static readonly TEXTURE_EQUIRECTANGULAR_MODE = 7;
  227. /** Equirectangular Fixed coordinates mode */
  228. public static readonly TEXTURE_FIXED_EQUIRECTANGULAR_MODE = 8;
  229. /** Equirectangular Fixed Mirrored coordinates mode */
  230. public static readonly TEXTURE_FIXED_EQUIRECTANGULAR_MIRRORED_MODE = 9;
  231. /** Offline (baking) quality for texture filtering */
  232. public static readonly TEXTURE_FILTERING_QUALITY_OFFLINE = 4096;
  233. /** High quality for texture filtering */
  234. public static readonly TEXTURE_FILTERING_QUALITY_HIGH = 64;
  235. /** Medium quality for texture filtering */
  236. public static readonly TEXTURE_FILTERING_QUALITY_MEDIUM = 16;
  237. /** Low quality for texture filtering */
  238. public static readonly TEXTURE_FILTERING_QUALITY_LOW = 8;
  239. // Texture rescaling mode
  240. /** Defines that texture rescaling will use a floor to find the closer power of 2 size */
  241. public static readonly SCALEMODE_FLOOR = 1;
  242. /** Defines that texture rescaling will look for the nearest power of 2 size */
  243. public static readonly SCALEMODE_NEAREST = 2;
  244. /** Defines that texture rescaling will use a ceil to find the closer power of 2 size */
  245. public static readonly SCALEMODE_CEILING = 3;
  246. /**
  247. * The dirty texture flag value
  248. */
  249. public static readonly MATERIAL_TextureDirtyFlag = 1;
  250. /**
  251. * The dirty light flag value
  252. */
  253. public static readonly MATERIAL_LightDirtyFlag = 2;
  254. /**
  255. * The dirty fresnel flag value
  256. */
  257. public static readonly MATERIAL_FresnelDirtyFlag = 4;
  258. /**
  259. * The dirty attribute flag value
  260. */
  261. public static readonly MATERIAL_AttributesDirtyFlag = 8;
  262. /**
  263. * The dirty misc flag value
  264. */
  265. public static readonly MATERIAL_MiscDirtyFlag = 16;
  266. /**
  267. * The dirty prepass flag value
  268. */
  269. public static readonly MATERIAL_PrePassDirtyFlag = 32;
  270. /**
  271. * The all dirty flag value
  272. */
  273. public static readonly MATERIAL_AllDirtyFlag = 63;
  274. /**
  275. * Returns the triangle fill mode
  276. */
  277. public static readonly MATERIAL_TriangleFillMode = 0;
  278. /**
  279. * Returns the wireframe mode
  280. */
  281. public static readonly MATERIAL_WireFrameFillMode = 1;
  282. /**
  283. * Returns the point fill mode
  284. */
  285. public static readonly MATERIAL_PointFillMode = 2;
  286. /**
  287. * Returns the point list draw mode
  288. */
  289. public static readonly MATERIAL_PointListDrawMode = 3;
  290. /**
  291. * Returns the line list draw mode
  292. */
  293. public static readonly MATERIAL_LineListDrawMode = 4;
  294. /**
  295. * Returns the line loop draw mode
  296. */
  297. public static readonly MATERIAL_LineLoopDrawMode = 5;
  298. /**
  299. * Returns the line strip draw mode
  300. */
  301. public static readonly MATERIAL_LineStripDrawMode = 6;
  302. /**
  303. * Returns the triangle strip draw mode
  304. */
  305. public static readonly MATERIAL_TriangleStripDrawMode = 7;
  306. /**
  307. * Returns the triangle fan draw mode
  308. */
  309. public static readonly MATERIAL_TriangleFanDrawMode = 8;
  310. /**
  311. * Stores the clock-wise side orientation
  312. */
  313. public static readonly MATERIAL_ClockWiseSideOrientation = 0;
  314. /**
  315. * Stores the counter clock-wise side orientation
  316. */
  317. public static readonly MATERIAL_CounterClockWiseSideOrientation = 1;
  318. /**
  319. * Nothing
  320. * @see https://doc.babylonjs.com/how_to/how_to_use_actions#triggers
  321. */
  322. public static readonly ACTION_NothingTrigger = 0;
  323. /**
  324. * On pick
  325. * @see https://doc.babylonjs.com/how_to/how_to_use_actions#triggers
  326. */
  327. public static readonly ACTION_OnPickTrigger = 1;
  328. /**
  329. * On left pick
  330. * @see https://doc.babylonjs.com/how_to/how_to_use_actions#triggers
  331. */
  332. public static readonly ACTION_OnLeftPickTrigger = 2;
  333. /**
  334. * On right pick
  335. * @see https://doc.babylonjs.com/how_to/how_to_use_actions#triggers
  336. */
  337. public static readonly ACTION_OnRightPickTrigger = 3;
  338. /**
  339. * On center pick
  340. * @see https://doc.babylonjs.com/how_to/how_to_use_actions#triggers
  341. */
  342. public static readonly ACTION_OnCenterPickTrigger = 4;
  343. /**
  344. * On pick down
  345. * @see https://doc.babylonjs.com/how_to/how_to_use_actions#triggers
  346. */
  347. public static readonly ACTION_OnPickDownTrigger = 5;
  348. /**
  349. * On double pick
  350. * @see https://doc.babylonjs.com/how_to/how_to_use_actions#triggers
  351. */
  352. public static readonly ACTION_OnDoublePickTrigger = 6;
  353. /**
  354. * On pick up
  355. * @see https://doc.babylonjs.com/how_to/how_to_use_actions#triggers
  356. */
  357. public static readonly ACTION_OnPickUpTrigger = 7;
  358. /**
  359. * On pick out.
  360. * This trigger will only be raised if you also declared a OnPickDown
  361. * @see https://doc.babylonjs.com/how_to/how_to_use_actions#triggers
  362. */
  363. public static readonly ACTION_OnPickOutTrigger = 16;
  364. /**
  365. * On long press
  366. * @see https://doc.babylonjs.com/how_to/how_to_use_actions#triggers
  367. */
  368. public static readonly ACTION_OnLongPressTrigger = 8;
  369. /**
  370. * On pointer over
  371. * @see https://doc.babylonjs.com/how_to/how_to_use_actions#triggers
  372. */
  373. public static readonly ACTION_OnPointerOverTrigger = 9;
  374. /**
  375. * On pointer out
  376. * @see https://doc.babylonjs.com/how_to/how_to_use_actions#triggers
  377. */
  378. public static readonly ACTION_OnPointerOutTrigger = 10;
  379. /**
  380. * On every frame
  381. * @see https://doc.babylonjs.com/how_to/how_to_use_actions#triggers
  382. */
  383. public static readonly ACTION_OnEveryFrameTrigger = 11;
  384. /**
  385. * On intersection enter
  386. * @see https://doc.babylonjs.com/how_to/how_to_use_actions#triggers
  387. */
  388. public static readonly ACTION_OnIntersectionEnterTrigger = 12;
  389. /**
  390. * On intersection exit
  391. * @see https://doc.babylonjs.com/how_to/how_to_use_actions#triggers
  392. */
  393. public static readonly ACTION_OnIntersectionExitTrigger = 13;
  394. /**
  395. * On key down
  396. * @see https://doc.babylonjs.com/how_to/how_to_use_actions#triggers
  397. */
  398. public static readonly ACTION_OnKeyDownTrigger = 14;
  399. /**
  400. * On key up
  401. * @see https://doc.babylonjs.com/how_to/how_to_use_actions#triggers
  402. */
  403. public static readonly ACTION_OnKeyUpTrigger = 15;
  404. /**
  405. * Billboard mode will only apply to Y axis
  406. */
  407. public static readonly PARTICLES_BILLBOARDMODE_Y = 2;
  408. /**
  409. * Billboard mode will apply to all axes
  410. */
  411. public static readonly PARTICLES_BILLBOARDMODE_ALL = 7;
  412. /**
  413. * Special billboard mode where the particle will be biilboard to the camera but rotated to align with direction
  414. */
  415. public static readonly PARTICLES_BILLBOARDMODE_STRETCHED = 8;
  416. /** Default culling strategy : this is an exclusion test and it's the more accurate.
  417. * Test order :
  418. * Is the bounding sphere outside the frustum ?
  419. * If not, are the bounding box vertices outside the frustum ?
  420. * It not, then the cullable object is in the frustum.
  421. */
  422. public static readonly MESHES_CULLINGSTRATEGY_STANDARD = 0;
  423. /** Culling strategy : Bounding Sphere Only.
  424. * This is an exclusion test. It's faster than the standard strategy because the bounding box is not tested.
  425. * It's also less accurate than the standard because some not visible objects can still be selected.
  426. * Test : is the bounding sphere outside the frustum ?
  427. * If not, then the cullable object is in the frustum.
  428. */
  429. public static readonly MESHES_CULLINGSTRATEGY_BOUNDINGSPHERE_ONLY = 1;
  430. /** Culling strategy : Optimistic Inclusion.
  431. * This in an inclusion test first, then the standard exclusion test.
  432. * This can be faster when a cullable object is expected to be almost always in the camera frustum.
  433. * This could also be a little slower than the standard test when the tested object center is not the frustum but one of its bounding box vertex is still inside.
  434. * Anyway, it's as accurate as the standard strategy.
  435. * Test :
  436. * Is the cullable object bounding sphere center in the frustum ?
  437. * If not, apply the default culling strategy.
  438. */
  439. public static readonly MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION = 2;
  440. /** Culling strategy : Optimistic Inclusion then Bounding Sphere Only.
  441. * This in an inclusion test first, then the bounding sphere only exclusion test.
  442. * This can be the fastest test when a cullable object is expected to be almost always in the camera frustum.
  443. * This could also be a little slower than the BoundingSphereOnly strategy when the tested object center is not in the frustum but its bounding sphere still intersects it.
  444. * It's less accurate than the standard strategy and as accurate as the BoundingSphereOnly strategy.
  445. * Test :
  446. * Is the cullable object bounding sphere center in the frustum ?
  447. * If not, apply the Bounding Sphere Only strategy. No Bounding Box is tested here.
  448. */
  449. public static readonly MESHES_CULLINGSTRATEGY_OPTIMISTIC_INCLUSION_THEN_BSPHERE_ONLY = 3;
  450. /**
  451. * No logging while loading
  452. */
  453. public static readonly SCENELOADER_NO_LOGGING = 0;
  454. /**
  455. * Minimal logging while loading
  456. */
  457. public static readonly SCENELOADER_MINIMAL_LOGGING = 1;
  458. /**
  459. * Summary logging while loading
  460. */
  461. public static readonly SCENELOADER_SUMMARY_LOGGING = 2;
  462. /**
  463. * Detailled logging while loading
  464. */
  465. public static readonly SCENELOADER_DETAILED_LOGGING = 3;
  466. /**
  467. * Constant used to retrieve the irradiance texture index in the textures array in the prepass
  468. * using getIndex(Constants.PREPASS_IRRADIANCE_TEXTURE_TYPE)
  469. */
  470. public static readonly PREPASS_IRRADIANCE_TEXTURE_TYPE = 0;
  471. /**
  472. * Constant used to retrieve the position texture index in the textures array in the prepass
  473. * using getIndex(Constants.PREPASS_POSITION_TEXTURE_INDEX)
  474. */
  475. public static readonly PREPASS_POSITION_TEXTURE_TYPE = 1;
  476. /**
  477. * Constant used to retrieve the velocity texture index in the textures array in the prepass
  478. * using getIndex(Constants.PREPASS_VELOCITY_TEXTURE_INDEX)
  479. */
  480. public static readonly PREPASS_VELOCITY_TEXTURE_TYPE = 2;
  481. /**
  482. * Constant used to retrieve the reflectivity texture index in the textures array in the prepass
  483. * using the getIndex(Constants.PREPASS_REFLECTIVITY_TEXTURE_TYPE)
  484. */
  485. public static readonly PREPASS_REFLECTIVITY_TEXTURE_TYPE = 3;
  486. /**
  487. * Constant used to retrieve the lit color texture index in the textures array in the prepass
  488. * using the getIndex(Constants.PREPASS_COLOR_TEXTURE_TYPE)
  489. */
  490. public static readonly PREPASS_COLOR_TEXTURE_TYPE = 4;
  491. /**
  492. * Constant used to retrieve depth + normal index in the textures array in the prepass
  493. * using the getIndex(Constants.PREPASS_DEPTHNORMAL_TEXTURE_TYPE)
  494. */
  495. public static readonly PREPASS_DEPTHNORMAL_TEXTURE_TYPE = 5;
  496. /**
  497. * Constant used to retrieve albedo index in the textures array in the prepass
  498. * using the getIndex(Constants.PREPASS_ALBEDO_TEXTURE_TYPE)
  499. */
  500. public static readonly PREPASS_ALBEDO_TEXTURE_TYPE = 6;
  501. }