@league-of-foundry-developers/foundry-vtt-types 0.8.9-9 → 9.245.0

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.
Files changed (295) hide show
  1. package/README.md +44 -27
  2. package/index.d.ts +2 -2
  3. package/package.json +34 -15
  4. package/src/foundry/common/abstract/document.mjs.d.ts +24 -10
  5. package/src/foundry/common/config.mjs/index.d.ts +1 -0
  6. package/src/foundry/common/config.mjs/releaseData.d.ts +98 -0
  7. package/src/foundry/common/constants.mjs.d.ts +403 -213
  8. package/src/foundry/common/data/data.mjs/activeEffectData.d.ts +36 -29
  9. package/src/foundry/common/data/data.mjs/actorData.d.ts +32 -21
  10. package/src/foundry/common/data/data.mjs/adventureData.d.ts +165 -0
  11. package/src/foundry/common/data/data.mjs/ambientLightData.d.ts +45 -124
  12. package/src/foundry/common/data/data.mjs/ambientSoundData.d.ts +49 -77
  13. package/src/foundry/common/data/data.mjs/animationData.d.ts +17 -9
  14. package/src/foundry/common/data/data.mjs/cardData.d.ts +265 -0
  15. package/src/foundry/common/data/data.mjs/cardFaceData.d.ts +66 -0
  16. package/src/foundry/common/data/data.mjs/cardsData.d.ts +238 -0
  17. package/src/foundry/common/data/data.mjs/chatMessageData.d.ts +51 -39
  18. package/src/foundry/common/data/data.mjs/chatSpeakerData.d.ts +18 -11
  19. package/src/foundry/common/data/data.mjs/combatData.d.ts +51 -25
  20. package/src/foundry/common/data/data.mjs/combatantData.d.ts +48 -30
  21. package/src/foundry/common/data/data.mjs/darknessActivation.d.ts +8 -7
  22. package/src/foundry/common/data/data.mjs/drawingData.d.ts +68 -67
  23. package/src/foundry/common/data/data.mjs/effectChangeData.d.ts +21 -25
  24. package/src/foundry/common/data/data.mjs/effectDurationData.d.ts +24 -23
  25. package/src/foundry/common/data/data.mjs/fogExplorationData.d.ts +23 -16
  26. package/src/foundry/common/data/data.mjs/folderData.d.ts +28 -25
  27. package/src/foundry/common/data/data.mjs/index.d.ts +5 -0
  28. package/src/foundry/common/data/data.mjs/itemData.d.ts +26 -18
  29. package/src/foundry/common/data/data.mjs/journalEntryData.d.ts +24 -23
  30. package/src/foundry/common/data/data.mjs/lightData.d.ts +228 -0
  31. package/src/foundry/common/data/data.mjs/macroData.d.ts +52 -35
  32. package/src/foundry/common/data/data.mjs/measuredTemplateData.d.ts +41 -38
  33. package/src/foundry/common/data/data.mjs/noteData.d.ts +47 -37
  34. package/src/foundry/common/data/data.mjs/playlistData.d.ts +55 -26
  35. package/src/foundry/common/data/data.mjs/playlistSoundData.d.ts +32 -16
  36. package/src/foundry/common/data/data.mjs/prototypeTokenData.d.ts +7 -11
  37. package/src/foundry/common/data/data.mjs/rollTableData.d.ts +30 -24
  38. package/src/foundry/common/data/data.mjs/sceneData.d.ts +132 -111
  39. package/src/foundry/common/data/data.mjs/settingData.d.ts +11 -8
  40. package/src/foundry/common/data/data.mjs/tableResultData.d.ts +30 -26
  41. package/src/foundry/common/data/data.mjs/tileData.d.ts +43 -36
  42. package/src/foundry/common/data/data.mjs/tileOcclusion.d.ts +10 -9
  43. package/src/foundry/common/data/data.mjs/tokenBarData.d.ts +6 -3
  44. package/src/foundry/common/data/data.mjs/tokenData.d.ts +105 -157
  45. package/src/foundry/common/data/data.mjs/userData.d.ts +118 -33
  46. package/src/foundry/common/data/data.mjs/videoData.d.ts +9 -8
  47. package/src/foundry/common/data/data.mjs/wallData.d.ts +67 -39
  48. package/src/foundry/common/data/fields.mjs.d.ts +180 -83
  49. package/src/foundry/common/documents.mjs/baseActiveEffect.d.ts +9 -3
  50. package/src/foundry/common/documents.mjs/baseActor.d.ts +17 -45
  51. package/src/foundry/common/documents.mjs/baseAdventure.d.ts +38 -0
  52. package/src/foundry/common/documents.mjs/baseAmbientLight.d.ts +3 -0
  53. package/src/foundry/common/documents.mjs/baseAmbientSound.d.ts +3 -1
  54. package/src/foundry/common/documents.mjs/baseCard.d.ts +62 -0
  55. package/src/foundry/common/documents.mjs/baseCards.d.ts +39 -0
  56. package/src/foundry/common/documents.mjs/baseChatMessage.d.ts +3 -0
  57. package/src/foundry/common/documents.mjs/baseCombat.d.ts +5 -2
  58. package/src/foundry/common/documents.mjs/baseCombatant.d.ts +9 -2
  59. package/src/foundry/common/documents.mjs/baseDrawing.d.ts +11 -1
  60. package/src/foundry/common/documents.mjs/baseFogExploration.d.ts +4 -3
  61. package/src/foundry/common/documents.mjs/baseFolder.d.ts +10 -1
  62. package/src/foundry/common/documents.mjs/baseItem.d.ts +11 -29
  63. package/src/foundry/common/documents.mjs/baseJournalEntry.d.ts +3 -0
  64. package/src/foundry/common/documents.mjs/baseMacro.d.ts +16 -14
  65. package/src/foundry/common/documents.mjs/baseMeasuredTemplate.d.ts +4 -1
  66. package/src/foundry/common/documents.mjs/baseNote.d.ts +2 -2
  67. package/src/foundry/common/documents.mjs/basePlaylist.d.ts +1 -0
  68. package/src/foundry/common/documents.mjs/basePlaylistSound.d.ts +2 -1
  69. package/src/foundry/common/documents.mjs/baseRollTable.d.ts +3 -0
  70. package/src/foundry/common/documents.mjs/baseScene.d.ts +1 -0
  71. package/src/foundry/common/documents.mjs/baseSetting.d.ts +1 -0
  72. package/src/foundry/common/documents.mjs/baseTableResult.d.ts +10 -3
  73. package/src/foundry/common/documents.mjs/baseTile.d.ts +1 -0
  74. package/src/foundry/common/documents.mjs/baseToken.d.ts +3 -0
  75. package/src/foundry/common/documents.mjs/baseUser.d.ts +7 -1
  76. package/src/foundry/common/documents.mjs/baseWall.d.ts +7 -10
  77. package/src/foundry/common/documents.mjs/index.d.ts +3 -0
  78. package/src/foundry/common/module.mjs.d.ts +3 -0
  79. package/src/foundry/common/packages.mjs/moduleData.d.ts +12 -9
  80. package/src/foundry/common/packages.mjs/packageAuthorData.d.ts +24 -24
  81. package/src/foundry/common/packages.mjs/packageCompendiumData.d.ts +27 -21
  82. package/src/foundry/common/packages.mjs/packageData.d.ts +108 -82
  83. package/src/foundry/common/packages.mjs/packageDependencyData.d.ts +18 -11
  84. package/src/foundry/common/packages.mjs/packageLanguageData.d.ts +16 -15
  85. package/src/foundry/common/packages.mjs/systemData.d.ts +21 -20
  86. package/src/foundry/common/packages.mjs/tagPackageAvailability.d.ts +3 -3
  87. package/src/foundry/common/packages.mjs/worldData.d.ts +29 -18
  88. package/src/foundry/common/types.mjs.d.ts +95 -0
  89. package/src/foundry/common/utils/geometry.mjs.d.ts +148 -0
  90. package/src/foundry/common/utils/helpers.mjs.d.ts +64 -39
  91. package/src/foundry/common/utils/module.mjs.d.ts +1 -0
  92. package/src/foundry/common/utils/primitives.mjs.d.ts +106 -16
  93. package/src/foundry/foundry.js/application.d.ts +138 -110
  94. package/src/foundry/foundry.js/applications/basePlaceableHUD.d.ts +2 -2
  95. package/src/foundry/foundry.js/applications/basePlaceableHUDs/drawingHUD.d.ts +2 -2
  96. package/src/foundry/foundry.js/applications/basePlaceableHUDs/tileHUD.d.ts +2 -2
  97. package/src/foundry/foundry.js/applications/basePlaceableHUDs/tokenHUD.d.ts +3 -3
  98. package/src/foundry/foundry.js/applications/cameraViews.d.ts +2 -2
  99. package/src/foundry/foundry.js/applications/chatPopout.d.ts +3 -3
  100. package/src/foundry/foundry.js/applications/compendium.d.ts +2 -2
  101. package/src/foundry/foundry.js/applications/dialog.d.ts +1 -1
  102. package/src/foundry/foundry.js/applications/filePicker.d.ts +2 -2
  103. package/src/foundry/foundry.js/applications/formApplication.d.ts +46 -15
  104. package/src/foundry/foundry.js/applications/formApplications/avConfig.d.ts +1 -1
  105. package/src/foundry/foundry.js/applications/formApplications/combatTrackerConfig.d.ts +2 -2
  106. package/src/foundry/foundry.js/applications/formApplications/defaultTokenConfig.d.ts +1 -1
  107. package/src/foundry/foundry.js/applications/formApplications/documentSheet.d.ts +20 -31
  108. package/src/foundry/foundry.js/applications/formApplications/documentSheets/activeEffectConfig.d.ts +3 -3
  109. package/src/foundry/foundry.js/applications/formApplications/documentSheets/actorSheet.d.ts +2 -2
  110. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientLightConfig.d.ts +104 -0
  111. package/src/foundry/foundry.js/applications/formApplications/documentSheets/ambientSoundConfig.d.ts +5 -5
  112. package/src/foundry/foundry.js/applications/formApplications/documentSheets/combatantConfig.d.ts +3 -3
  113. package/src/foundry/foundry.js/applications/formApplications/documentSheets/folderConfig.d.ts +3 -3
  114. package/src/foundry/foundry.js/applications/formApplications/documentSheets/index.d.ts +1 -0
  115. package/src/foundry/foundry.js/applications/formApplications/documentSheets/itemSheet.d.ts +1 -1
  116. package/src/foundry/foundry.js/applications/formApplications/documentSheets/journalSheet.d.ts +1 -1
  117. package/src/foundry/foundry.js/applications/formApplications/documentSheets/lightConfig.d.ts +5 -79
  118. package/src/foundry/foundry.js/applications/formApplications/documentSheets/macroConfig.d.ts +3 -3
  119. package/src/foundry/foundry.js/applications/formApplications/documentSheets/measuredTemplateConfig.d.ts +4 -4
  120. package/src/foundry/foundry.js/applications/formApplications/documentSheets/noteConfig.d.ts +5 -5
  121. package/src/foundry/foundry.js/applications/formApplications/documentSheets/permissionControl.d.ts +7 -7
  122. package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistConfig.d.ts +4 -4
  123. package/src/foundry/foundry.js/applications/formApplications/documentSheets/playlistSoundConfig.d.ts +3 -3
  124. package/src/foundry/foundry.js/applications/formApplications/documentSheets/rollTableConfig.d.ts +7 -10
  125. package/src/foundry/foundry.js/applications/formApplications/documentSheets/sceneConfig.d.ts +7 -7
  126. package/src/foundry/foundry.js/applications/formApplications/documentSheets/tileConfig.d.ts +3 -3
  127. package/src/foundry/foundry.js/applications/formApplications/documentSheets/userConfig.d.ts +7 -7
  128. package/src/foundry/foundry.js/applications/formApplications/drawingConfig.d.ts +2 -2
  129. package/src/foundry/foundry.js/applications/formApplications/entitySheetConfig.d.ts +3 -3
  130. package/src/foundry/foundry.js/applications/formApplications/gridConfig.d.ts +2 -2
  131. package/src/foundry/foundry.js/applications/formApplications/imagePopout.d.ts +2 -2
  132. package/src/foundry/foundry.js/applications/formApplications/index.d.ts +1 -0
  133. package/src/foundry/foundry.js/applications/formApplications/keybindingsConfig.d.ts +257 -0
  134. package/src/foundry/foundry.js/applications/formApplications/moduleManagement.d.ts +2 -2
  135. package/src/foundry/foundry.js/applications/formApplications/permissionConfig.d.ts +2 -2
  136. package/src/foundry/foundry.js/applications/formApplications/settingsConfig.d.ts +1 -1
  137. package/src/foundry/foundry.js/applications/formApplications/tokenConfig.d.ts +11 -12
  138. package/src/foundry/foundry.js/applications/formApplications/wallConfig.d.ts +9 -9
  139. package/src/foundry/foundry.js/applications/formApplications/worldConfig.d.ts +1 -1
  140. package/src/foundry/foundry.js/applications/frameViewer.d.ts +1 -1
  141. package/src/foundry/foundry.js/applications/headsUpDisplay.d.ts +2 -2
  142. package/src/foundry/foundry.js/applications/hotbar.d.ts +2 -2
  143. package/src/foundry/foundry.js/applications/mainMenu.d.ts +2 -2
  144. package/src/foundry/foundry.js/applications/notifications.d.ts +7 -4
  145. package/src/foundry/foundry.js/applications/pause.d.ts +2 -2
  146. package/src/foundry/foundry.js/applications/playerList.d.ts +2 -2
  147. package/src/foundry/foundry.js/applications/sceneControls.d.ts +2 -2
  148. package/src/foundry/foundry.js/applications/sceneNavigation.d.ts +3 -3
  149. package/src/foundry/foundry.js/applications/sidebar.d.ts +2 -2
  150. package/src/foundry/foundry.js/applications/sidebarTab.d.ts +5 -8
  151. package/src/foundry/foundry.js/applications/sidebarTabs/chatLog.d.ts +8 -7
  152. package/src/foundry/foundry.js/applications/sidebarTabs/combatTracker.d.ts +26 -28
  153. package/src/foundry/foundry.js/applications/sidebarTabs/compendiumDirectory.d.ts +4 -4
  154. package/src/foundry/foundry.js/applications/sidebarTabs/settings.d.ts +2 -2
  155. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/cardsDirectory.d.ts +7 -0
  156. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/index.d.ts +1 -0
  157. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectories/playlistDirectory.d.ts +2 -2
  158. package/src/foundry/foundry.js/applications/sidebarTabs/sidebarDirectory.d.ts +3 -3
  159. package/src/foundry/foundry.js/audioContainer.d.ts +28 -10
  160. package/src/foundry/foundry.js/avSettings.d.ts +7 -7
  161. package/src/foundry/foundry.js/canvas.d.ts +153 -46
  162. package/src/foundry/foundry.js/canvasAnimation.d.ts +31 -8
  163. package/src/foundry/foundry.js/canvasDocumentMixin.d.ts +7 -0
  164. package/src/foundry/foundry.js/clientDocumentMixin.d.ts +47 -92
  165. package/src/foundry/foundry.js/clientDocuments/activeEffect.d.ts +3 -2
  166. package/src/foundry/foundry.js/clientDocuments/actor.d.ts +11 -11
  167. package/src/foundry/foundry.js/clientDocuments/canvasDocuments/ambientSoundDocument.d.ts +1 -6
  168. package/src/foundry/foundry.js/clientDocuments/card.d.ts +134 -0
  169. package/src/foundry/foundry.js/clientDocuments/cards.d.ts +370 -0
  170. package/src/foundry/foundry.js/clientDocuments/chatMessage.d.ts +11 -10
  171. package/src/foundry/foundry.js/clientDocuments/combat.d.ts +46 -48
  172. package/src/foundry/foundry.js/clientDocuments/combatant.d.ts +15 -18
  173. package/src/foundry/foundry.js/clientDocuments/folder.d.ts +15 -11
  174. package/src/foundry/foundry.js/clientDocuments/index.d.ts +2 -0
  175. package/src/foundry/foundry.js/clientDocuments/item.d.ts +3 -4
  176. package/src/foundry/foundry.js/clientDocuments/playlist.d.ts +4 -3
  177. package/src/foundry/foundry.js/clientDocuments/rollTable.d.ts +2 -2
  178. package/src/foundry/foundry.js/clientDocuments/scene.d.ts +30 -23
  179. package/src/foundry/foundry.js/clientKeybindings.d.ts +309 -0
  180. package/src/foundry/foundry.js/clientSettings.d.ts +12 -10
  181. package/src/foundry/foundry.js/collections/documentCollection.d.ts +1 -1
  182. package/src/foundry/foundry.js/collections/documentCollections/compendiumCollection.d.ts +1 -1
  183. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/cardStacks.d.ts +9 -0
  184. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/folders.d.ts +1 -1
  185. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/index.d.ts +1 -0
  186. package/src/foundry/foundry.js/collections/documentCollections/worldCollections/playlists.d.ts +3 -2
  187. package/src/foundry/foundry.js/collisionResult.d.ts +60 -0
  188. package/src/foundry/foundry.js/config.d.ts +487 -907
  189. package/src/foundry/foundry.js/dragDrop.d.ts +27 -34
  190. package/src/foundry/foundry.js/game.d.ts +171 -50
  191. package/src/foundry/foundry.js/gamepadManager.d.ts +41 -0
  192. package/src/foundry/foundry.js/handlebarsHelpers.d.ts +4 -4
  193. package/src/foundry/foundry.js/hooks.d.ts +210 -84
  194. package/src/foundry/foundry.js/imageHelper.d.ts +26 -2
  195. package/src/foundry/foundry.js/keyboardManager.d.ts +165 -213
  196. package/src/foundry/foundry.js/mouseManager.d.ts +18 -0
  197. package/src/foundry/foundry.js/newUserExperience.d.ts +34 -0
  198. package/src/foundry/foundry.js/pixi/containers/cachedContainer.d.ts +8 -0
  199. package/src/foundry/foundry.js/pixi/containers/cachedContainers/index.d.ts +1 -0
  200. package/src/foundry/foundry.js/pixi/containers/cachedContainers/primaryCanvasGroup.d.ts +42 -0
  201. package/src/foundry/foundry.js/pixi/containers/canvasLayers/gridLayer.d.ts +2 -2
  202. package/src/foundry/foundry.js/pixi/containers/canvasLayers/index.d.ts +1 -1
  203. package/src/foundry/foundry.js/pixi/containers/canvasLayers/placeablesLayers/wallsLayer.d.ts +3 -3
  204. package/src/foundry/foundry.js/pixi/containers/canvasLayers/{effectsLayer.d.ts → weatherLayer.d.ts} +7 -7
  205. package/src/foundry/foundry.js/pixi/containers/effectsCanvasGroup.d.ts +29 -0
  206. package/src/foundry/foundry.js/pixi/containers/index.d.ts +3 -0
  207. package/src/foundry/foundry.js/pixi/containers/interfaceCanvasGroup.d.ts +27 -0
  208. package/src/foundry/foundry.js/pixi/containers/placeableObject.d.ts +2 -2
  209. package/src/foundry/foundry.js/pixi/containers/placeableObjects/token.d.ts +3 -3
  210. package/src/foundry/foundry.js/pixi/index.d.ts +3 -0
  211. package/src/foundry/foundry.js/pixi/meshes/index.d.ts +1 -0
  212. package/src/foundry/foundry.js/pixi/meshes/samplerMesh.d.ts +22 -0
  213. package/src/foundry/foundry.js/pixi/points/index.d.ts +1 -0
  214. package/src/foundry/foundry.js/pixi/points/wallEndpoint.d.ts +92 -0
  215. package/src/foundry/foundry.js/pixi/polygons/index.d.ts +2 -1
  216. package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygon.d.ts +98 -0
  217. package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/clockwiseSweepPolygon.d.ts +396 -0
  218. package/src/foundry/foundry.js/pixi/polygons/pointSourcePolygons/index.d.ts +1 -0
  219. package/src/foundry/foundry.js/pixi/rectangles/normalizedRectangle.d.ts +7 -0
  220. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShader.d.ts +11 -37
  221. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShader.d.ts +114 -0
  222. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveBackgroundShader.d.ts +57 -0
  223. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShader.d.ts +47 -0
  224. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/bewitchingWaveColorationShader.d.ts +6 -0
  225. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/chromaColorationShader.d.ts +6 -0
  226. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/emanationColorationShader.d.ts +6 -0
  227. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/energyFieldColorationShader.d.ts +6 -0
  228. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/fairyLightColorationShader.d.ts +6 -0
  229. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/fogColorationShader.d.ts +6 -0
  230. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/ghostLightColorationShader.d.ts +1 -1
  231. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/hexaDomeColorationShader.d.ts +6 -0
  232. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/index.d.ts +5 -0
  233. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/lightDomeColorationShader.d.ts +6 -0
  234. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/pulseColorationShader.d.ts +1 -1
  235. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/radialRainbowColorationShader.d.ts +6 -0
  236. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/sunburstColorationShader.d.ts +1 -1
  237. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/swirlingRainbowColorationShader.d.ts +6 -0
  238. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/torchColorationShader.d.ts +3 -2
  239. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveColorationShaders/vortexColorationShader.d.ts +6 -0
  240. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardColorationShaders → adaptiveLightingShaders/adaptiveColorationShaders}/waveColorationShader.d.ts +1 -1
  241. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShader.d.ts +63 -0
  242. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShaders/bewitchingWaveIlluminationShader.d.ts +6 -0
  243. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/blackHoleIlluminationShader.d.ts +1 -1
  244. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShaders/fairyLightIlluminationShader.d.ts +6 -0
  245. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/ghostLightIlluminationShader.d.ts +1 -1
  246. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/index.d.ts +3 -0
  247. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/pulseIlluminationShader.d.ts +1 -1
  248. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/roilingIlluminationShader.d.ts +1 -1
  249. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/sunburstIlluminationShader.d.ts +1 -2
  250. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/torchIlluminationShader.d.ts +1 -1
  251. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/adaptiveIlluminationShaders/vortexIlluminationShader.d.ts +6 -0
  252. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/{standardIlluminationShaders → adaptiveLightingShaders/adaptiveIlluminationShaders}/waveIlluminationShader.d.ts +1 -1
  253. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/adaptiveLightingShaders/index.d.ts +5 -0
  254. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/baseSamplerShader.d.ts +22 -0
  255. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/index.d.ts +3 -4
  256. package/src/foundry/foundry.js/pixi/texts/preciseText.d.ts +10 -2
  257. package/src/foundry/foundry.js/pixi/transforms/index.d.ts +1 -0
  258. package/src/foundry/foundry.js/pixi/transforms/synchronizedTransform.d.ts +38 -0
  259. package/src/foundry/foundry.js/pointSource.d.ts +59 -328
  260. package/src/foundry/foundry.js/pointSources/index.d.ts +3 -0
  261. package/src/foundry/foundry.js/pointSources/lightSource.d.ts +417 -0
  262. package/src/foundry/foundry.js/pointSources/soundSource.d.ts +46 -0
  263. package/src/foundry/foundry.js/pointSources/visionSource.d.ts +125 -0
  264. package/src/foundry/foundry.js/polygonEdge.d.ts +26 -0
  265. package/src/foundry/foundry.js/polygonVertex.d.ts +89 -0
  266. package/src/foundry/foundry.js/quadtree.d.ts +2 -2
  267. package/src/foundry/foundry.js/quadtreeCulling.d.ts +11 -0
  268. package/src/foundry/foundry.js/ray.d.ts +156 -162
  269. package/src/foundry/foundry.js/rays/index.d.ts +1 -0
  270. package/src/foundry/foundry.js/rays/sightRay.d.ts +34 -0
  271. package/src/foundry/foundry.js/roll.d.ts +51 -65
  272. package/src/foundry/foundry.js/rollTerm.d.ts +7 -4
  273. package/src/foundry/foundry.js/rollTerms/diceTerm.d.ts +4 -22
  274. package/src/foundry/foundry.js/rollTerms/mathTerm.d.ts +3 -0
  275. package/src/foundry/foundry.js/rollTerms/parentheticalTerm.d.ts +3 -0
  276. package/src/foundry/foundry.js/rollTerms/poolTerm.d.ts +3 -5
  277. package/src/foundry/foundry.js/rollTerms/stringTerm.d.ts +4 -1
  278. package/src/foundry/foundry.js/screenCulling.d.ts +19 -0
  279. package/src/foundry/foundry.js/searchFilter.d.ts +37 -33
  280. package/src/foundry/foundry.js/specialEffect.d.ts +1 -1
  281. package/src/foundry/foundry.js/textEditor.d.ts +1 -1
  282. package/src/foundry/foundry.js/textureLoader.d.ts +28 -18
  283. package/src/foundry/foundry.js/textureUtils.d.ts +5 -8
  284. package/src/foundry/foundry.js/videoHelper.d.ts +2 -1
  285. package/src/foundry/index.d.ts +29 -26
  286. package/src/types/utils.d.ts +11 -3
  287. package/src/foundry/foundry.js/pixi/polygons/sourcePolygon.d.ts +0 -25
  288. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShader.d.ts +0 -21
  289. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/chromaColorationShader.d.ts +0 -18
  290. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/emanationColorationShader.d.ts +0 -17
  291. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/energyFieldColorationShader.d.ts +0 -18
  292. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/fogColorationShader.d.ts +0 -17
  293. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/hexaDomeColorationShader.d.ts +0 -17
  294. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardColorationShaders/lightDomeColorationShader.d.ts +0 -17
  295. package/src/foundry/foundry.js/pixi/shaders/abstractBaseShaders/standardIlluminationShader.d.ts +0 -22
@@ -0,0 +1,396 @@
1
+ import type { ConfiguredObjectClassForName } from '../../../../../types/helperTypes.js';
2
+
3
+ declare global {
4
+ type VertexMap = Map<number, PolygonVertex>;
5
+
6
+ type EdgeSet = Set<PolygonEdge>;
7
+
8
+ interface ClockwiseSweepPolygonConfig extends PointSourcePolygonConfig {
9
+ /** @defaultValue `canvas.dimensions.maxR` */
10
+ radius?: number;
11
+
12
+ /** @defaultValue `360` */
13
+ angle?: number;
14
+
15
+ /** @defaultValue `0` */
16
+ rotation?: number;
17
+
18
+ /**
19
+ * The desired density of padding rays, a number per PI
20
+ * @defaultValue `12`
21
+ */
22
+ density?: number;
23
+
24
+ /**
25
+ * The minimum angle of emission
26
+ * @defaultValue `config.hasLimitedAngle ? Math.normalizeRadians(Math.toRadians(config.rotation + 90 - (config.angle / 2))) : -Math.PI`
27
+ */
28
+ aMin?: number;
29
+
30
+ /**
31
+ * The maximum angle of emission
32
+ * @defaultValue `config.hasLimitedAngle ? config.aMin + Math.toRadians(config.angle) : Math.PI`
33
+ */
34
+ aMax?: number;
35
+
36
+ /**
37
+ * The minimum ray of emission
38
+ * @defaultValue `Ray.fromAngle(origin.x, origin.y, config.aMin, config.radius)`
39
+ */
40
+ rMin?: Ray;
41
+
42
+ /**
43
+ * The maximum ray of emission
44
+ * @defaultValue `config.hasLimitedAngle && Ray.fromAngle(origin.x, origin.y, config.aMax, config.radius)`
45
+ */
46
+ rMax?: Ray;
47
+
48
+ /**
49
+ * Does this polygon have a limited radius?
50
+ * @defaultValue `config.radius > 0`
51
+ */
52
+ hasLimitedRadius?: boolean;
53
+
54
+ /**
55
+ * Does this polygon have a limited angle?
56
+ * @defaultValue `config.angle !== 0`
57
+ */
58
+ hasLimitedAngle?: boolean;
59
+
60
+ /**
61
+ * The squared radius of the polygon, for faster computation later
62
+ * @defaultValue `Math.pow(config.radius, 2)`
63
+ */
64
+ radius2?: number;
65
+
66
+ /**
67
+ * A small epsilon used for avoiding floating point precision issues
68
+ * @defaultValue `0.5 / config.radius`
69
+ */
70
+ radiusE?: number;
71
+ }
72
+
73
+ /**
74
+ * A PointSourcePolygon implementation that uses CCW (counter-clockwise) geometry orientation.
75
+ * Sweep around the origin, accumulating collision points based on the set of active walls.
76
+ * This algorithm was created with valuable contributions from https://github.com/caewok
77
+ */
78
+ class ClockwiseSweepPolygon extends PointSourcePolygon {
79
+ /**
80
+ * The configuration of this polygon.
81
+ */
82
+ config:
83
+ | ClockwiseSweepPolygonConfig
84
+ | ClockwiseSweepPolygon.InitializedConfig
85
+ | ClockwiseSweepPolygon.LimitedAngleConfig;
86
+
87
+ /**
88
+ * A mapping of vertices which define potential collision points
89
+ */
90
+ vertices: VertexMap;
91
+
92
+ /**
93
+ * The set of edges which define potential boundaries of the polygon
94
+ */
95
+ edges: EdgeSet;
96
+
97
+ /**
98
+ * A collection of rays which are fired at vertices
99
+ */
100
+ rays: SightRay[];
101
+
102
+ static benchmark(
103
+ iterations: number,
104
+ ...args: Parameters<typeof ClockwiseSweepPolygon['create']>
105
+ ): ReturnType<typeof foundry.utils.benchmark>;
106
+
107
+ static create(
108
+ origin: Point,
109
+ config: Parameters<ClockwiseSweepPolygon['initialize']>[1]
110
+ ): ReturnType<ClockwiseSweepPolygon['compute']>;
111
+
112
+ /**
113
+ * @override
114
+ * @param origin - The provided polygon origin
115
+ * @param config - The provided configuration object
116
+ */
117
+ initialize(origin: Point, config: ClockwiseSweepPolygon.InitConfig): void;
118
+
119
+ /** @override */
120
+ protected _compute(): void;
121
+
122
+ /**
123
+ * Round vertices of a ray segment
124
+ * @param ray - The provided ray
125
+ * @returns The ray with rounded vertices
126
+ * @internal
127
+ */
128
+ protected _roundRayVertices(ray: Ray): Ray;
129
+
130
+ /**
131
+ * Translate walls and other obstacles into edges which limit visibility
132
+ * @internal
133
+ */
134
+ protected _identifyEdges(): void;
135
+
136
+ /**
137
+ * Get the super-set of walls which could potentially apply to this polygon.
138
+ * @internal
139
+ */
140
+ protected _getWalls(): ConfiguredObjectClassForName<'Wall'>[];
141
+
142
+ /**
143
+ * Restrict the set of candidate edges to those which appear within the limited angle of emission.
144
+ * @internal
145
+ */
146
+ protected _restrictEdgesByAngle(): void;
147
+
148
+ /**
149
+ * Process the candidate edges to further constrain them using a circular radius of effect.
150
+ * @internal
151
+ */
152
+ protected _constrainEdgesByRadius(): void;
153
+
154
+ /**
155
+ * Consolidate all vertices from identified edges and register them as part of the vertex mapping.
156
+ * @internal
157
+ */
158
+ protected _identifyVertices(): void;
159
+
160
+ /**
161
+ * Add additional vertices for intersections between edges.
162
+ * @param wallEdgeMap - A mapping of wall IDs to PolygonEdge instances
163
+ * @internal
164
+ */
165
+ protected _identifyIntersections(wallEdgeMap: Map<string, PolygonEdge>): void;
166
+
167
+ /**
168
+ * Execute the sweep over wall vertices
169
+ * @internal
170
+ */
171
+ protected _executeSweep(): void;
172
+
173
+ /**
174
+ * Determine the initial set of active edges as those which intersect with the initial ray
175
+ * @returns A set of initially active edges
176
+ * @internal
177
+ */
178
+ protected _initializeActiveEdges(): EdgeSet;
179
+
180
+ /**
181
+ * Sort vertices clockwise from the initial ray (due west).
182
+ * @returns The array of sorted vertices
183
+ * @internal
184
+ */
185
+ protected _sortVertices(): PolygonVertex[];
186
+
187
+ /**
188
+ * Test whether a target vertex is behind some closer active edge
189
+ * @param ray - The ray being evaluated
190
+ * (unused)
191
+ * @param vertex - The target vertex
192
+ * @param activeEdges - The set of active edges
193
+ * @returns Is the target vertex behind some closer edge?
194
+ * @internal
195
+ */
196
+ protected _isVertexBehindActiveEdges(
197
+ ray: Ray,
198
+ vertex: PolygonVertex,
199
+ activeEdges: EdgeSet
200
+ ): { isBehind: boolean; wasLimited: boolean };
201
+
202
+ /**
203
+ * Determine the final result of a candidate ray.
204
+ * @param ray - The candidate ray being tested
205
+ * @param vertex - The target vertex
206
+ * @param result - The result being prepared
207
+ * @param activeEdges - The set of active edges
208
+ * @internal
209
+ */
210
+ protected _determineRayResult(ray: Ray, vertex: PolygonVertex, result: CollisionResult, activeEdges: EdgeSet): void;
211
+
212
+ /**
213
+ * Jump to a new closest active edge.
214
+ * In this case, our target vertex will be the primary collision.
215
+ * We may have a secondary collision if other active edges exist or if the vertex is prior to the ray endpoint.
216
+ * @internal
217
+ *
218
+ * @param ray - The ray being emitted
219
+ * @param result - The pending collision result
220
+ * @param activeEdges - The set of currently active edges
221
+ * @param isBinding - Is the target vertex a binding collision point?
222
+ * @param secondaryBefore - Whether to add secondary collision points before ("unshift") or after ("push")
223
+ * (default: `true`)
224
+ */
225
+ protected _beginNewEdge(
226
+ ray: Ray,
227
+ result: CollisionResult,
228
+ activeEdges: EdgeSet,
229
+ isBinding: boolean,
230
+ secondaryBefore?: boolean
231
+ ): void;
232
+
233
+ /**
234
+ * If the target vertex is connected to a currently active edge, we are terminating that edge.
235
+ * We know the target vertex is not behind another edge, so the target is our initial collision.
236
+ * There may be a second collision afterwards if no connected walls continue clockwise.
237
+ * @internal
238
+ *
239
+ * @param ray - The ray being emitted
240
+ * @param result - The pending collision result
241
+ * @param activeEdges - The set of currently active edges
242
+ * @param isBinding - Is the target vertex a binding collision point?
243
+ */
244
+ protected _completeCurrentEdge(ray: Ray, result: CollisionResult, activeEdges: EdgeSet, isBinding: boolean): void;
245
+
246
+ /**
247
+ * Augment a CollisionResult with an additional secondary collision.
248
+ * Require secondary collisions to be a greater distance than the target vertex.
249
+ * @param ray - The ray being evaluated
250
+ * @param result - The collision result
251
+ * @param edges - The subset of active edges which are candidates for collision
252
+ * @internal
253
+ */
254
+ protected _getSecondaryCollisions(ray: Ray, result: CollisionResult, edges: EdgeSet): PolygonVertex[];
255
+
256
+ /**
257
+ * Identify collision points for a required terminal ray.
258
+ * @internal
259
+ *
260
+ * @param ray - The ray being emitted
261
+ * @param result - The pending collision result
262
+ * @param activeEdges - The set of currently active edges
263
+ */
264
+ protected _findRequiredCollision(ray: Ray, result: CollisionResult, activeEdges: EdgeSet): void;
265
+
266
+ /**
267
+ * Identify the collision points between an emitted Ray and a set of active edges.
268
+ * @param ray - The candidate ray to test
269
+ * @param activeEdges - The set of active edges
270
+ * @returns A sorted array of collision points
271
+ * @internal
272
+ */
273
+ protected _getRayCollisions(
274
+ ray: Ray,
275
+ activeEdges: EdgeSet,
276
+ {
277
+ minimumDistance
278
+ }?: {
279
+ /**
280
+ * Require collisions to exceed some minimum distance
281
+ * @defaultValue `0`
282
+ */
283
+ minimumDistance?: number;
284
+ }
285
+ ): PolygonVertex[];
286
+
287
+ /**
288
+ * Update the set of active edges given the result of an emitted ray.
289
+ * @param result - The collision result
290
+ * @param activeEdges - The set of currently active edges
291
+ * @internal
292
+ */
293
+ protected _updateActiveEdges(result: CollisionResult, activeEdges: EdgeSet): void;
294
+
295
+ /**
296
+ * Construct the polygon from ray collision points
297
+ * @internal
298
+ */
299
+ protected _constructPolygonPoints(): void;
300
+
301
+ /**
302
+ * Add additional points to limited-radius polygons to approximate the curvature of a circle
303
+ * @param r0 - The prior ray that collided with some vertex
304
+ * @param r1 - The next ray that collides with some vertex
305
+ * @internal
306
+ */
307
+ protected _getPaddingPoints(r0: Ray, r1: Ray): Point[];
308
+
309
+ /**
310
+ * Test whether a wall should be included in the computed polygon for a given origin and type
311
+ * @param wall - The Wall being considered
312
+ * @param origin - The origin point for the ray or polygon
313
+ * @param type - The type of perception or movement restriction being imposed
314
+ * @returns Should the wall be included?
315
+ *
316
+ */
317
+ static testWallInclusion(
318
+ wall: ConfiguredObjectClassForName<'Wall'>,
319
+ origin: Point,
320
+ type: foundry.CONST.WALL_RESTRICTION_TYPES
321
+ ): boolean;
322
+
323
+ /**
324
+ * Test whether a vertex lies between two boundary rays
325
+ * @param vertex - The target vertex
326
+ * @param rMin - The counter-clockwise bounding ray
327
+ * @param rMax - The clockwise bounding ray
328
+ * @param angle - The angle being tested, in degrees
329
+ * @returns Is the vertex between the two rays?
330
+ */
331
+ static pointBetweenRays(vertex: PolygonVertex, rMin: Ray, rMax: Ray, angle: number): boolean;
332
+
333
+ /** @override */
334
+ visualize(): void;
335
+
336
+ /**
337
+ * Check whether a given ray intersects with walls.
338
+ * @param ray - The Ray being tested
339
+ * @param options - Options which customize how collision is tested
340
+ * @returns Whether any collision occurred if mode is "any"
341
+ * An array of collisions, if mode is "all"
342
+ * The closest collision, if mode is "closest"
343
+ */
344
+ static getRayCollisions<Mode extends 'any' | 'closest' | 'all'>(
345
+ ray: Ray,
346
+ options?: {
347
+ /**
348
+ * Which collision type to check, a value in CONST.WALL_RESTRICTION_TYPES
349
+ * @defaultValue `"move"`
350
+ */
351
+ type?: foundry.CONST.WALL_RESTRICTION_TYPES;
352
+
353
+ /**
354
+ * Which type of collisions are returned: any, closest, all
355
+ * @defaultValue `"all"`
356
+ */
357
+ mode?: Mode;
358
+
359
+ /**
360
+ * Visualize some debugging data to help understand the collision test
361
+ * @defaultValue `false`
362
+ */
363
+ debug?: boolean;
364
+ }
365
+ ): Mode extends 'any' ? boolean : Mode extends 'closest' ? PolygonVertex : PolygonVertex[];
366
+
367
+ /**
368
+ * Visualize the polygon, displaying its computed area, rays, and collision points
369
+ * @internal
370
+ */
371
+ protected static _visualizeCollision(ray: Ray, edges: EdgeSet, collisions: PolygonVertex[]): void;
372
+ }
373
+
374
+ namespace ClockwiseSweepPolygon {
375
+ type InitConfig = Partial<Pick<ClockwiseSweepPolygonConfig, 'radius' | 'angle' | 'rotation' | 'density'>>;
376
+
377
+ interface InitializedConfig extends ClockwiseSweepPolygonConfig {
378
+ hasLimitedRadius: boolean;
379
+ radius: number;
380
+ radius2: number;
381
+ radiusE: number;
382
+ aMin: number;
383
+ aMax: number;
384
+ angle: number;
385
+ rotation: number;
386
+ hasLimitedAngle: boolean;
387
+ density: number;
388
+ rMin: Ray;
389
+ }
390
+
391
+ interface LimitedAngleConfig extends InitializedConfig {
392
+ hasLimitedAngle: true;
393
+ rMax: Ray;
394
+ }
395
+ }
396
+ }
@@ -0,0 +1 @@
1
+ import './clockwiseSweepPolygon';
@@ -4,6 +4,13 @@
4
4
  declare class NormalizedRectangle extends PIXI.Rectangle {
5
5
  constructor(x: number, y: number, width: number, height: number);
6
6
 
7
+ /**
8
+ * Determine whether some other Rectangle intersects with this one.
9
+ * @param other - Some other rectangle against which to compare
10
+ * @returns Do the rectangles intersect?
11
+ */
12
+ intersects(other: PIXI.Rectangle): boolean;
13
+
7
14
  /**
8
15
  * Generate a new rectangle by rotating this one clockwise about its center by a certain number of radians
9
16
  * @param radians - The angle of rotation
@@ -2,6 +2,9 @@
2
2
  * This class defines an interface which all shaders utilize
3
3
  */
4
4
  declare abstract class AbstractBaseShader extends PIXI.Shader {
5
+ /** The current uniforms of the Shader */
6
+ uniforms: AbstractBaseShader.Uniforms;
7
+
5
8
  constructor(program: PIXI.Program, uniforms: AbstractBaseShader.Uniforms);
6
9
 
7
10
  /**
@@ -10,12 +13,16 @@ declare abstract class AbstractBaseShader extends PIXI.Shader {
10
13
  protected _defaults: AbstractBaseShader.Uniforms;
11
14
 
12
15
  /**
13
- * The default vertex shader used by all instances of AbstractBaseShader
16
+ * The raw vertex shader used by this class.
17
+ * A subclass of AbstractBaseShader must implement the vertexShader static field.
18
+ * @defaultValue `""`
19
+ *
20
+ * @remarks This is abstract, subclasses must implement it.
14
21
  */
15
22
  static vertexShader: string;
16
23
 
17
24
  /**
18
- * The fragment shader which renders this source.
25
+ * The raw fragment shader used by this class.
19
26
  * A subclass of AbstractBaseShader must implement the fragmentShader static field.
20
27
  * @defaultValue `""`
21
28
  *
@@ -39,42 +46,9 @@ declare abstract class AbstractBaseShader extends PIXI.Shader {
39
46
 
40
47
  /**
41
48
  * Reset the shader uniforms back to their provided default values
49
+ * @internal
42
50
  */
43
51
  protected reset(): void;
44
-
45
- /**
46
- * A Vec3 pseudo-random generator, based on uv position
47
- */
48
- static PRNG3D: string;
49
-
50
- /**
51
- * A conventional pseudo-random number generator with the "golden" numbers, based on uv position
52
- */
53
- static PRNG: string;
54
-
55
- /**
56
- * A conventional noise generator
57
- */
58
- static NOISE: string;
59
-
60
- /**
61
- * Fractional Brownian Motion for a given number of octaves
62
- * @param octaves - (default: `4`)
63
- * @param amp - (default: `1.0`)
64
- */
65
- static FBM(octaves?: number, amp?: number): string;
66
-
67
- /**
68
- * Fade easing to use with distance in interval [0,1]
69
- * @param amp - (default: `3`)
70
- * @param coef - (default: `0.80`)
71
- */
72
- static FADE(amp?: number, coef?: number): string;
73
-
74
- /**
75
- * Convert a Hue-Saturation-Brightness color to RGB - useful to convert polar coordinates to RGB
76
- */
77
- static HSB2RGB: string;
78
52
  }
79
53
 
80
54
  declare namespace AbstractBaseShader {
@@ -91,5 +65,5 @@ declare namespace AbstractBaseShader {
91
65
  | { x: number; y: number; z: number; w: number }[]
92
66
  | PIXI.Texture;
93
67
 
94
- type Uniforms = Partial<Record<string, AbstractBaseShader.UniformValue>>;
68
+ type Uniforms = Record<string, AbstractBaseShader.UniformValue>;
95
69
  }
@@ -0,0 +1,114 @@
1
+ interface LightingTechnique {
2
+ /** The numeric identifier of the technique */
3
+ id: number;
4
+
5
+ /** The localization string that labels the technique */
6
+ label: string;
7
+
8
+ /** The shader fragment when the technique is used */
9
+ shader: string;
10
+ }
11
+
12
+ /**
13
+ * This class defines an interface which all adaptive lighting shaders extend.
14
+ */
15
+ declare class AdaptiveLightingShader extends AbstractBaseShader {
16
+ /** @override */
17
+ static vertexShader: string;
18
+
19
+ /**
20
+ * Useful constant values computed at compile time
21
+ */
22
+ static CONSTANTS: string;
23
+
24
+ /**
25
+ * The coloration technique shader fragment
26
+ */
27
+ static get ADAPTIVE_COLORATION(): string;
28
+
29
+ /**
30
+ * Fade easing to use with distance in interval [0,1]
31
+ * @param amp - (default: `3`)
32
+ * @param coef - (default: `0.80`)
33
+ */
34
+ static FADE(amp?: number, coef?: number): string;
35
+
36
+ /**
37
+ * Fractional Brownian Motion for a given number of octaves
38
+ * @param octaves - (default: `4`)
39
+ * @param amp - (default: `1.0`)
40
+ */
41
+ static FBM(octaves?: number, amp?: number): string;
42
+
43
+ /**
44
+ * A conventional pseudo-random number generator with the "golden" numbers, based on uv position
45
+ */
46
+ static PRNG: string;
47
+
48
+ /**
49
+ * A Vec3 pseudo-random generator, based on uv position
50
+ */
51
+ static PRNG3D: string;
52
+
53
+ /**
54
+ * A conventional noise generator
55
+ */
56
+ static NOISE: string;
57
+
58
+ /**
59
+ * Convert a Hue-Saturation-Brightness color to RGB - useful to convert polar coordinates to RGB
60
+ */
61
+ static HSB2RGB: string;
62
+
63
+ /**
64
+ * Fast approximate perceived brightness computation
65
+ * Using Digital ITU BT.709 : Exact luminance factors
66
+ */
67
+ static PERCEIVED_BRIGHTNESS: string;
68
+
69
+ /**
70
+ * Switch between an inner and outer color, by comparing distance from center to ratio
71
+ * Apply a strong gradient between the two areas if gradual uniform is set to true
72
+ */
73
+ static SWITCH_COLOR: string;
74
+
75
+ /**
76
+ * Transition between bright and dim colors, if requested
77
+ */
78
+ static TRANSITION: string;
79
+
80
+ /**
81
+ * Constrain light to LOS
82
+ */
83
+ static CONSTRAIN_TO_LOS: string;
84
+
85
+ /**
86
+ * Incorporate falloff if a gradual uniform is requested
87
+ */
88
+ static FALLOFF: string;
89
+
90
+ /**
91
+ * Compute distance from the light center
92
+ */
93
+ static DISTANCE: string;
94
+
95
+ /**
96
+ * A mapping of available coloration techniques
97
+ */
98
+ static COLORATION_TECHNIQUES: AdaptiveLightingShader.ColorationTechniques;
99
+ }
100
+
101
+ declare namespace AdaptiveLightingShader {
102
+ interface ColorationTechniques extends Record<string, LightingTechnique> {
103
+ LEGACY: LightingTechnique;
104
+ LUMINANCE: LightingTechnique;
105
+ INTERNAL_HALO: LightingTechnique;
106
+ EXTERNAL_HALO: LightingTechnique;
107
+ COLOR_BURN: LightingTechnique;
108
+ INTERNAL_BURN: LightingTechnique;
109
+ EXTERNAL_BURN: LightingTechnique;
110
+ LOW_ABSORPTION: LightingTechnique;
111
+ HIGH_ABSORPTION: LightingTechnique;
112
+ INVERT_ABSORPTION: LightingTechnique;
113
+ }
114
+ }
@@ -0,0 +1,57 @@
1
+ /**
2
+ * The default coloration shader used by standard rendering and animations
3
+ * A fragment shader which creates a solid light source.
4
+ */
5
+ declare class AdaptiveBackgroundShader extends AdaptiveLightingShader {
6
+ /**
7
+ * Constrain light to LOS
8
+ */
9
+ static CONSTRAIN_TO_LOS: string;
10
+
11
+ /**
12
+ * Color adjustments : exposure, contrast and shadows
13
+ */
14
+ static ADJUSTMENTS: string;
15
+
16
+ /**
17
+ * Incorporate falloff if a gradual uniform is requested
18
+ */
19
+ static FALLOFF: string;
20
+
21
+ /**
22
+ * Memory allocations for the Adaptive Background Shader
23
+ */
24
+ static SHADER_HEADER: string;
25
+
26
+ /** @override */
27
+ static fragmentShader: string;
28
+
29
+ /**
30
+ * @override
31
+ * @defaultValue
32
+ * ```javascript
33
+ * {
34
+ * shadows: 0.0,
35
+ * contrast: 0.0,
36
+ * exposure: 0.0,
37
+ * saturation: 0.0,
38
+ * alpha: 1.0,
39
+ * ratio: 0.5,
40
+ * time: 0,
41
+ * screenDimensions: [1, 1],
42
+ * uBkgSampler: 0,
43
+ * fovTexture: 0,
44
+ * darkness: false,
45
+ * gradual: false,
46
+ * useFov: true
47
+ * }
48
+ * ```
49
+ */
50
+ static defaultUniforms: AbstractBaseShader.Uniforms;
51
+
52
+ /**
53
+ * Flag whether the background shader is currently required.
54
+ * If key uniforms are at their default values, we don't need to render the background container.
55
+ */
56
+ get isRequired(): boolean;
57
+ }
@@ -0,0 +1,47 @@
1
+ /**
2
+ * The default coloration shader used by standard rendering and animations.
3
+ * A fragment shader which creates a light source.
4
+ */
5
+ declare class AdaptiveColorationShader extends AdaptiveLightingShader {
6
+ /**
7
+ * Incorporate falloff if a falloff uniform is requested
8
+ */
9
+ static FALLOFF: string;
10
+
11
+ /**
12
+ * Color adjustments : exposure, contrast and shadows
13
+ */
14
+ static ADJUSTMENTS: string;
15
+
16
+ /**
17
+ * Memory allocations for the Adaptive Coloration Shader
18
+ */
19
+ static SHADER_HEADER: string;
20
+
21
+ /** @override */
22
+ static fragmentShader: string;
23
+
24
+ /**
25
+ * @override
26
+ * @defaultValue
27
+ * ```javascript
28
+ * {
29
+ * technique: 1,
30
+ * ratio: 0.0,
31
+ * shadows: 0.0,
32
+ * saturation: 0.0,
33
+ * alpha: 1.0,
34
+ * color: [1.0, 1.0, 1.0],
35
+ * time: 0,
36
+ * intensity: 5,
37
+ * darkness: false,
38
+ * screenDimensions: [1, 1],
39
+ * uBkgSampler: 0,
40
+ * fovTexture: 0,
41
+ * gradual: true,
42
+ * useFov: true
43
+ * }
44
+ * ```
45
+ */
46
+ static defaultUniforms: AbstractBaseShader.Uniforms;
47
+ }