ris-framework 0.1.0-dev.7 → 0.1.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 (655) hide show
  1. package/CHANGELOG.md +4 -1
  2. package/LICENSE +202 -21
  3. package/NOTICE +2 -0
  4. package/README.md +29 -47
  5. package/THIRD_PARTY_NOTICES.md +1 -1
  6. package/dist/{core/Framework.d.ts → Framework.d.ts} +10 -8
  7. package/dist/Framework.d.ts.map +1 -0
  8. package/dist/api/FrameworkConfiguration.d.ts +23 -0
  9. package/dist/api/FrameworkConfiguration.d.ts.map +1 -0
  10. package/dist/api/IFramework.d.ts +125 -0
  11. package/dist/api/IFramework.d.ts.map +1 -0
  12. package/dist/api/IFrameworkConfiguration.d.ts +25 -0
  13. package/dist/api/IFrameworkConfiguration.d.ts.map +1 -0
  14. package/dist/api/_export.d.ts +27 -0
  15. package/dist/api/_export.d.ts.map +1 -0
  16. package/dist/api/camera/CameraFactory.d.ts +25 -0
  17. package/dist/api/camera/CameraFactory.d.ts.map +1 -0
  18. package/dist/api/camera/ICamera.d.ts +43 -0
  19. package/dist/api/camera/ICamera.d.ts.map +1 -0
  20. package/dist/api/camera/ICameraFactory.d.ts +46 -0
  21. package/dist/api/camera/ICameraFactory.d.ts.map +1 -0
  22. package/dist/api/camera/IOrthographicCamera.d.ts +31 -0
  23. package/dist/api/camera/IOrthographicCamera.d.ts.map +1 -0
  24. package/dist/api/camera/OrbitCamera.d.ts +120 -0
  25. package/dist/api/camera/OrbitCamera.d.ts.map +1 -0
  26. package/dist/api/camera/OrthographicCamera.d.ts +96 -0
  27. package/dist/api/camera/OrthographicCamera.d.ts.map +1 -0
  28. package/dist/api/camera/PerspectiveCamera.d.ts +108 -0
  29. package/dist/api/camera/PerspectiveCamera.d.ts.map +1 -0
  30. package/dist/api/camera/_export.d.ts +8 -0
  31. package/dist/api/camera/_export.d.ts.map +1 -0
  32. package/dist/api/content/ContentConfig.d.ts +11 -0
  33. package/dist/api/content/ContentConfig.d.ts.map +1 -0
  34. package/dist/{core → api}/content/ContentManager.d.ts +3 -2
  35. package/dist/api/content/ContentManager.d.ts.map +1 -0
  36. package/dist/api/content/IContent.d.ts +8 -0
  37. package/dist/api/content/IContent.d.ts.map +1 -0
  38. package/dist/api/content/IContentManager.d.ts +37 -0
  39. package/dist/api/content/IContentManager.d.ts.map +1 -0
  40. package/dist/api/content/IContentModule.d.ts +58 -0
  41. package/dist/api/content/IContentModule.d.ts.map +1 -0
  42. package/dist/api/content/ShaderModuleContent.d.ts.map +1 -0
  43. package/dist/api/content/_export-content.d.ts +5 -0
  44. package/dist/api/content/_export-content.d.ts.map +1 -0
  45. package/dist/api/core/IDisposable.d.ts +10 -0
  46. package/dist/api/core/IDisposable.d.ts.map +1 -0
  47. package/dist/api/core/_export-core.d.ts +2 -0
  48. package/dist/api/core/_export-core.d.ts.map +1 -0
  49. package/dist/api/data/Color.d.ts +119 -0
  50. package/dist/api/data/Color.d.ts.map +1 -0
  51. package/dist/api/data/Rect.d.ts +61 -0
  52. package/dist/api/data/Rect.d.ts.map +1 -0
  53. package/dist/api/data/State.d.ts +11 -0
  54. package/dist/api/data/State.d.ts.map +1 -0
  55. package/dist/api/data/_export.d.ts +4 -0
  56. package/dist/api/data/_export.d.ts.map +1 -0
  57. package/dist/{geometry → api/geometry}/BaseGeometry.d.ts +5 -2
  58. package/dist/api/geometry/BaseGeometry.d.ts.map +1 -0
  59. package/dist/{geometry → api/geometry}/GeometryBuilder.d.ts +1 -1
  60. package/dist/api/geometry/GeometryBuilder.d.ts.map +1 -0
  61. package/dist/api/geometry/GeometryFormat.d.ts +34 -0
  62. package/dist/api/geometry/GeometryFormat.d.ts.map +1 -0
  63. package/dist/api/geometry/IGeometry.d.ts +54 -0
  64. package/dist/api/geometry/IGeometry.d.ts.map +1 -0
  65. package/dist/api/geometry/IGeometryBuilder.d.ts +15 -0
  66. package/dist/api/geometry/IGeometryBuilder.d.ts.map +1 -0
  67. package/dist/api/geometry/VertexFormat.d.ts.map +1 -0
  68. package/dist/api/geometry/_export-geometry.d.ts +5 -0
  69. package/dist/api/geometry/_export-geometry.d.ts.map +1 -0
  70. package/dist/api/image/CpuImageProcessor.d.ts +16 -0
  71. package/dist/api/image/CpuImageProcessor.d.ts.map +1 -0
  72. package/dist/api/image/IImageProcessor.d.ts +26 -0
  73. package/dist/api/image/IImageProcessor.d.ts.map +1 -0
  74. package/dist/api/image/RawImageData.d.ts +34 -0
  75. package/dist/api/image/RawImageData.d.ts.map +1 -0
  76. package/dist/api/image/_export.d.ts +4 -0
  77. package/dist/api/image/_export.d.ts.map +1 -0
  78. package/dist/api/index.d.ts +2 -0
  79. package/dist/api/index.d.ts.map +1 -0
  80. package/dist/api/input/IInputManager.d.ts +53 -0
  81. package/dist/api/input/IInputManager.d.ts.map +1 -0
  82. package/dist/api/input/InputDeviceType.d.ts +18 -0
  83. package/dist/api/input/InputDeviceType.d.ts.map +1 -0
  84. package/dist/api/input/InputManager.d.ts +73 -0
  85. package/dist/api/input/InputManager.d.ts.map +1 -0
  86. package/dist/api/input/Key.d.ts +36 -0
  87. package/dist/api/input/Key.d.ts.map +1 -0
  88. package/dist/api/input/KeyboardState.d.ts +37 -0
  89. package/dist/api/input/KeyboardState.d.ts.map +1 -0
  90. package/dist/api/input/_export.d.ts +14 -0
  91. package/dist/api/input/_export.d.ts.map +1 -0
  92. package/dist/api/input/gamepad/Button.d.ts +22 -0
  93. package/dist/api/input/gamepad/Button.d.ts.map +1 -0
  94. package/dist/api/input/gamepad/GamePadState.d.ts +48 -0
  95. package/dist/api/input/gamepad/GamePadState.d.ts.map +1 -0
  96. package/dist/api/input/gamepad/GamePadThumbSticks.d.ts +17 -0
  97. package/dist/api/input/gamepad/GamePadThumbSticks.d.ts.map +1 -0
  98. package/dist/api/input/mouse/MouseButton.d.ts +10 -0
  99. package/dist/api/input/mouse/MouseButton.d.ts.map +1 -0
  100. package/dist/api/input/mouse/MouseState.d.ts +52 -0
  101. package/dist/api/input/mouse/MouseState.d.ts.map +1 -0
  102. package/dist/api/input/touch/TouchCollection.d.ts +79 -0
  103. package/dist/api/input/touch/TouchCollection.d.ts.map +1 -0
  104. package/dist/api/input/touch/TouchLocation.d.ts +80 -0
  105. package/dist/api/input/touch/TouchLocation.d.ts.map +1 -0
  106. package/dist/api/input/touch/TouchLocationState.d.ts +16 -0
  107. package/dist/api/input/touch/TouchLocationState.d.ts.map +1 -0
  108. package/dist/api/input/touch/TouchPanelCapabilities.d.ts +24 -0
  109. package/dist/api/input/touch/TouchPanelCapabilities.d.ts.map +1 -0
  110. package/dist/api/loaders/IImageLoader.d.ts +20 -0
  111. package/dist/api/loaders/IImageLoader.d.ts.map +1 -0
  112. package/dist/api/loaders/ImageLoader.d.ts +36 -0
  113. package/dist/api/loaders/ImageLoader.d.ts.map +1 -0
  114. package/dist/api/loaders/_export.d.ts +3 -0
  115. package/dist/api/loaders/_export.d.ts.map +1 -0
  116. package/dist/api/material/IMaterial.d.ts +35 -0
  117. package/dist/api/material/IMaterial.d.ts.map +1 -0
  118. package/dist/api/material/IMaterialFactory.d.ts +19 -0
  119. package/dist/api/material/IMaterialFactory.d.ts.map +1 -0
  120. package/dist/api/material/InspectTextureMipsMaterial.d.ts +58 -0
  121. package/dist/api/material/InspectTextureMipsMaterial.d.ts.map +1 -0
  122. package/dist/api/material/MaterialFactory.d.ts +20 -0
  123. package/dist/api/material/MaterialFactory.d.ts.map +1 -0
  124. package/dist/api/material/UnlitMaterial.d.ts +76 -0
  125. package/dist/api/material/UnlitMaterial.d.ts.map +1 -0
  126. package/dist/api/material/_export.d.ts +6 -0
  127. package/dist/api/material/_export.d.ts.map +1 -0
  128. package/dist/api/meshes/IMesh.d.ts +17 -0
  129. package/dist/api/meshes/IMesh.d.ts.map +1 -0
  130. package/dist/api/meshes/IMeshFactory.d.ts +25 -0
  131. package/dist/api/meshes/IMeshFactory.d.ts.map +1 -0
  132. package/dist/api/meshes/Mesh.d.ts +93 -0
  133. package/dist/api/meshes/Mesh.d.ts.map +1 -0
  134. package/dist/api/meshes/MeshFactory.d.ts +23 -0
  135. package/dist/api/meshes/MeshFactory.d.ts.map +1 -0
  136. package/dist/api/meshes/MeshParameters.d.ts +22 -0
  137. package/dist/api/meshes/MeshParameters.d.ts.map +1 -0
  138. package/dist/api/meshes/QuadMesh.d.ts +33 -0
  139. package/dist/api/meshes/QuadMesh.d.ts.map +1 -0
  140. package/dist/api/meshes/_export.d.ts +7 -0
  141. package/dist/api/meshes/_export.d.ts.map +1 -0
  142. package/dist/api/rendering/IGPUInfo.d.ts +35 -0
  143. package/dist/api/rendering/IGPUInfo.d.ts.map +1 -0
  144. package/dist/api/rendering/IGraphicsDevice.d.ts +88 -0
  145. package/dist/api/rendering/IGraphicsDevice.d.ts.map +1 -0
  146. package/dist/api/rendering/IGraphicsDeviceFeatures.d.ts +27 -0
  147. package/dist/api/rendering/IGraphicsDeviceFeatures.d.ts.map +1 -0
  148. package/dist/api/rendering/IRenderer.d.ts +71 -0
  149. package/dist/api/rendering/IRenderer.d.ts.map +1 -0
  150. package/dist/api/rendering/PowerPreference.d.ts +13 -0
  151. package/dist/api/rendering/PowerPreference.d.ts.map +1 -0
  152. package/dist/api/rendering/RenderingBackend.d.ts +18 -0
  153. package/dist/api/rendering/RenderingBackend.d.ts.map +1 -0
  154. package/dist/api/rendering/_export-rendering.d.ts +7 -0
  155. package/dist/api/rendering/_export-rendering.d.ts.map +1 -0
  156. package/dist/api/rendering/blending/IBlendState.d.ts +16 -0
  157. package/dist/api/rendering/blending/IBlendState.d.ts.map +1 -0
  158. package/dist/api/rendering/blending/_export.d.ts +2 -0
  159. package/dist/api/rendering/blending/_export.d.ts.map +1 -0
  160. package/dist/api/rendering/buffers/BufferUsage.d.ts +57 -0
  161. package/dist/api/rendering/buffers/BufferUsage.d.ts.map +1 -0
  162. package/dist/api/rendering/buffers/IBuffer.d.ts +20 -0
  163. package/dist/api/rendering/buffers/IBuffer.d.ts.map +1 -0
  164. package/dist/api/rendering/buffers/IBufferFactory.d.ts +34 -0
  165. package/dist/api/rendering/buffers/IBufferFactory.d.ts.map +1 -0
  166. package/dist/api/rendering/buffers/IIndexBuffer.d.ts +31 -0
  167. package/dist/api/rendering/buffers/IIndexBuffer.d.ts.map +1 -0
  168. package/dist/api/rendering/buffers/IUniformBuffer.d.ts +18 -0
  169. package/dist/api/rendering/buffers/IUniformBuffer.d.ts.map +1 -0
  170. package/dist/api/rendering/buffers/IVertexBuffer.d.ts +26 -0
  171. package/dist/api/rendering/buffers/IVertexBuffer.d.ts.map +1 -0
  172. package/dist/api/rendering/buffers/IVertexBufferLayout.d.ts +23 -0
  173. package/dist/api/rendering/buffers/IVertexBufferLayout.d.ts.map +1 -0
  174. package/dist/api/rendering/buffers/IndexBufferType.d.ts +14 -0
  175. package/dist/api/rendering/buffers/IndexBufferType.d.ts.map +1 -0
  176. package/dist/api/rendering/buffers/VertexAttribute.d.ts +22 -0
  177. package/dist/api/rendering/buffers/VertexAttribute.d.ts.map +1 -0
  178. package/dist/api/rendering/buffers/VertexStepMode.d.ts +14 -0
  179. package/dist/api/rendering/buffers/VertexStepMode.d.ts.map +1 -0
  180. package/dist/api/rendering/buffers/_export-buffers.d.ts +11 -0
  181. package/dist/api/rendering/buffers/_export-buffers.d.ts.map +1 -0
  182. package/dist/{core/renderer → api/rendering}/enums.d.ts.map +1 -1
  183. package/dist/api/rendering/primitive/CullMode.d.ts +18 -0
  184. package/dist/api/rendering/primitive/CullMode.d.ts.map +1 -0
  185. package/dist/api/rendering/primitive/FrontFace.d.ts +14 -0
  186. package/dist/api/rendering/primitive/FrontFace.d.ts.map +1 -0
  187. package/dist/api/rendering/primitive/IPrimitiveState.d.ts +22 -0
  188. package/dist/api/rendering/primitive/IPrimitiveState.d.ts.map +1 -0
  189. package/dist/api/rendering/primitive/PrimitiveStateDescriptor.d.ts +24 -0
  190. package/dist/api/rendering/primitive/PrimitiveStateDescriptor.d.ts.map +1 -0
  191. package/dist/api/rendering/primitive/PrimitiveTopology.d.ts +26 -0
  192. package/dist/api/rendering/primitive/PrimitiveTopology.d.ts.map +1 -0
  193. package/dist/api/rendering/primitive/_export.d.ts +6 -0
  194. package/dist/api/rendering/primitive/_export.d.ts.map +1 -0
  195. package/dist/api/rendering/render-pipelines/IInspectTextureMipsRenderPipeline.d.ts +33 -0
  196. package/dist/api/rendering/render-pipelines/IInspectTextureMipsRenderPipeline.d.ts.map +1 -0
  197. package/dist/api/rendering/render-pipelines/IMainRenderTargetRenderPipeline.d.ts +18 -0
  198. package/dist/api/rendering/render-pipelines/IMainRenderTargetRenderPipeline.d.ts.map +1 -0
  199. package/dist/api/rendering/render-pipelines/IRenderPipeline.d.ts +39 -0
  200. package/dist/api/rendering/render-pipelines/IRenderPipeline.d.ts.map +1 -0
  201. package/dist/api/rendering/render-pipelines/IRenderPipelineFactory.d.ts +42 -0
  202. package/dist/api/rendering/render-pipelines/IRenderPipelineFactory.d.ts.map +1 -0
  203. package/dist/api/rendering/render-pipelines/ISpriteRenderPipeline.d.ts +22 -0
  204. package/dist/api/rendering/render-pipelines/ISpriteRenderPipeline.d.ts.map +1 -0
  205. package/dist/api/rendering/render-pipelines/IUnlitRenderPipeline.d.ts +33 -0
  206. package/dist/api/rendering/render-pipelines/IUnlitRenderPipeline.d.ts.map +1 -0
  207. package/dist/api/rendering/render-pipelines/_export-render-pipelines.d.ts +7 -0
  208. package/dist/api/rendering/render-pipelines/_export-render-pipelines.d.ts.map +1 -0
  209. package/dist/{core/renderer → api/rendering}/renderer-interface.d.ts +11 -7
  210. package/dist/api/rendering/renderer-interface.d.ts.map +1 -0
  211. package/dist/{core/renderer → api/rendering}/rendering-limits.d.ts.map +1 -1
  212. package/dist/api/rendering/renderpass/IRenderPass.d.ts +15 -0
  213. package/dist/api/rendering/renderpass/IRenderPass.d.ts.map +1 -0
  214. package/dist/api/rendering/renderpass/LoadAction.d.ts +33 -0
  215. package/dist/api/rendering/renderpass/LoadAction.d.ts.map +1 -0
  216. package/dist/api/rendering/renderpass/RenderPassColorAttachment.d.ts +53 -0
  217. package/dist/api/rendering/renderpass/RenderPassColorAttachment.d.ts.map +1 -0
  218. package/dist/api/rendering/renderpass/RenderPassDepthStencilAttachment.d.ts +56 -0
  219. package/dist/api/rendering/renderpass/RenderPassDepthStencilAttachment.d.ts.map +1 -0
  220. package/dist/api/rendering/renderpass/RenderPassDescriptor.d.ts +22 -0
  221. package/dist/api/rendering/renderpass/RenderPassDescriptor.d.ts.map +1 -0
  222. package/dist/api/rendering/renderpass/StoreAction.d.ts +24 -0
  223. package/dist/api/rendering/renderpass/StoreAction.d.ts.map +1 -0
  224. package/dist/api/rendering/renderpass/_export.d.ts +7 -0
  225. package/dist/api/rendering/renderpass/_export.d.ts.map +1 -0
  226. package/dist/api/rendering/sampler/ISampler.d.ts +43 -0
  227. package/dist/api/rendering/sampler/ISampler.d.ts.map +1 -0
  228. package/dist/api/rendering/sampler/MipMapSamplerFilter.d.ts +18 -0
  229. package/dist/api/rendering/sampler/MipMapSamplerFilter.d.ts.map +1 -0
  230. package/dist/api/rendering/sampler/SamplerAddressMode.d.ts +24 -0
  231. package/dist/api/rendering/sampler/SamplerAddressMode.d.ts.map +1 -0
  232. package/dist/api/rendering/sampler/SamplerDescriptor.d.ts +40 -0
  233. package/dist/api/rendering/sampler/SamplerDescriptor.d.ts.map +1 -0
  234. package/dist/api/rendering/sampler/SamplerFilter.d.ts +14 -0
  235. package/dist/api/rendering/sampler/SamplerFilter.d.ts.map +1 -0
  236. package/dist/api/rendering/sampler/_export.d.ts +6 -0
  237. package/dist/api/rendering/sampler/_export.d.ts.map +1 -0
  238. package/dist/api/rendering/sampler/sampler-enums.d.ts +15 -0
  239. package/dist/api/rendering/sampler/sampler-enums.d.ts.map +1 -0
  240. package/dist/api/rendering/swapchain/ISwapChain.d.ts +29 -0
  241. package/dist/api/rendering/swapchain/ISwapChain.d.ts.map +1 -0
  242. package/dist/api/rendering/swapchain/SurfacePresentMode.d.ts +23 -0
  243. package/dist/api/rendering/swapchain/SurfacePresentMode.d.ts.map +1 -0
  244. package/dist/api/rendering/swapchain/SwapChainDescriptor.d.ts +20 -0
  245. package/dist/api/rendering/swapchain/SwapChainDescriptor.d.ts.map +1 -0
  246. package/dist/api/rendering/swapchain/_export.d.ts +4 -0
  247. package/dist/api/rendering/swapchain/_export.d.ts.map +1 -0
  248. package/dist/api/rendering/texture/ITexture2D.d.ts +83 -0
  249. package/dist/api/rendering/texture/ITexture2D.d.ts.map +1 -0
  250. package/dist/api/rendering/texture/ITextureFactory.d.ts +42 -0
  251. package/dist/api/rendering/texture/ITextureFactory.d.ts.map +1 -0
  252. package/dist/api/rendering/texture/ITextureView.d.ts +17 -0
  253. package/dist/api/rendering/texture/ITextureView.d.ts.map +1 -0
  254. package/dist/api/rendering/texture/TextureDescriptor.d.ts +42 -0
  255. package/dist/api/rendering/texture/TextureDescriptor.d.ts.map +1 -0
  256. package/dist/api/rendering/texture/TextureFormat.d.ts +54 -0
  257. package/dist/api/rendering/texture/TextureFormat.d.ts.map +1 -0
  258. package/dist/api/rendering/texture/TextureUsage.d.ts +42 -0
  259. package/dist/api/rendering/texture/TextureUsage.d.ts.map +1 -0
  260. package/dist/api/rendering/texture/TextureUtilities.d.ts +54 -0
  261. package/dist/api/rendering/texture/TextureUtilities.d.ts.map +1 -0
  262. package/dist/api/rendering/texture/TextureViewDescriptor.d.ts +22 -0
  263. package/dist/api/rendering/texture/TextureViewDescriptor.d.ts.map +1 -0
  264. package/dist/api/rendering/texture/TextureViewDimension.d.ts +17 -0
  265. package/dist/api/rendering/texture/TextureViewDimension.d.ts.map +1 -0
  266. package/dist/api/rendering/texture/_export-texture.d.ts +10 -0
  267. package/dist/api/rendering/texture/_export-texture.d.ts.map +1 -0
  268. package/dist/api/shader/IShaderModule.d.ts +21 -0
  269. package/dist/api/shader/IShaderModule.d.ts.map +1 -0
  270. package/dist/api/shader/IShaderModuleLoader.d.ts +13 -0
  271. package/dist/api/shader/IShaderModuleLoader.d.ts.map +1 -0
  272. package/dist/api/shader/ShaderStage.d.ts +10 -0
  273. package/dist/api/shader/ShaderStage.d.ts.map +1 -0
  274. package/dist/api/shader/_export-shader.d.ts +4 -0
  275. package/dist/api/shader/_export-shader.d.ts.map +1 -0
  276. package/dist/{core → api}/shader/shader-loader.d.ts +1 -1
  277. package/dist/api/shader/shader-loader.d.ts.map +1 -0
  278. package/dist/api/sprites/ISpriteBatch.d.ts +114 -0
  279. package/dist/api/sprites/ISpriteBatch.d.ts.map +1 -0
  280. package/dist/{core/sprite-batch → api/sprites}/SpriteBatch.d.ts +1 -1
  281. package/dist/api/sprites/SpriteBatch.d.ts.map +1 -0
  282. package/dist/{core/sprite-batch → api/sprites}/SpriteBatchDrawable.d.ts +1 -1
  283. package/dist/api/sprites/SpriteBatchDrawable.d.ts.map +1 -0
  284. package/dist/{core/sprite-batch → api/sprites}/SpriteBatchMesh.d.ts +1 -1
  285. package/dist/api/sprites/SpriteBatchMesh.d.ts.map +1 -0
  286. package/dist/api/sprites/_export_sprites.d.ts +2 -0
  287. package/dist/api/sprites/_export_sprites.d.ts.map +1 -0
  288. package/dist/api/time/GameTime.d.ts +23 -0
  289. package/dist/api/time/GameTime.d.ts.map +1 -0
  290. package/dist/api/time/ITimeManager.d.ts +19 -0
  291. package/dist/api/time/ITimeManager.d.ts.map +1 -0
  292. package/dist/api/time/TimeManager.d.ts +15 -0
  293. package/dist/api/time/TimeManager.d.ts.map +1 -0
  294. package/dist/api/time/_export_time.d.ts +4 -0
  295. package/dist/api/time/_export_time.d.ts.map +1 -0
  296. package/dist/api/utilities/AlignUtilities.d.ts +20 -0
  297. package/dist/api/utilities/AlignUtilities.d.ts.map +1 -0
  298. package/dist/api/utilities/GeometryUtilities.d.ts +13 -0
  299. package/dist/api/utilities/GeometryUtilities.d.ts.map +1 -0
  300. package/dist/api/utilities/MathHelper.d.ts +162 -0
  301. package/dist/api/utilities/MathHelper.d.ts.map +1 -0
  302. package/dist/api/utilities/_export.d.ts +4 -0
  303. package/dist/api/utilities/_export.d.ts.map +1 -0
  304. package/dist/api/window/IWindowManager.d.ts +64 -0
  305. package/dist/api/window/IWindowManager.d.ts.map +1 -0
  306. package/dist/api/window/WindowBounds.d.ts +16 -0
  307. package/dist/api/window/WindowBounds.d.ts.map +1 -0
  308. package/dist/{core/window/window-manager.d.ts → api/window/WindowManager.d.ts} +3 -3
  309. package/dist/api/window/WindowManager.d.ts.map +1 -0
  310. package/dist/api/window/_export.d.ts +3 -0
  311. package/dist/api/window/_export.d.ts.map +1 -0
  312. package/dist/core/rendering/AGraphicsDevice.d.ts +10 -6
  313. package/dist/core/rendering/AGraphicsDevice.d.ts.map +1 -1
  314. package/dist/core/rendering/ARenderer.d.ts +4 -5
  315. package/dist/core/rendering/ARenderer.d.ts.map +1 -1
  316. package/dist/core/rendering/blending/enums.d.ts +5 -2
  317. package/dist/core/rendering/blending/enums.d.ts.map +1 -1
  318. package/dist/core/rendering/sampler/sampler-descriptor.d.ts +1 -1
  319. package/dist/core/rendering/sampler/sampler-descriptor.d.ts.map +1 -1
  320. package/dist/core/rendering/texture/texture.d.ts +1 -1
  321. package/dist/core/rendering/texture/texture.d.ts.map +1 -1
  322. package/dist/core/rendering/vertex-buffer-layout.d.ts +2 -3
  323. package/dist/core/rendering/vertex-buffer-layout.d.ts.map +1 -1
  324. package/dist/index.d.ts +3 -2
  325. package/dist/index.d.ts.map +1 -1
  326. package/dist/index.js +4052 -596
  327. package/dist/webgl/WebGLGraphicsDeviceFeatures.d.ts +1 -1
  328. package/dist/webgl/WebGLGraphicsDeviceFeatures.d.ts.map +1 -1
  329. package/dist/webgl/WebGlGpuInfo.d.ts +1 -1
  330. package/dist/webgl/WebGlGpuInfo.d.ts.map +1 -1
  331. package/dist/webgl/WebGlGraphicsDevice.d.ts +7 -5
  332. package/dist/webgl/WebGlGraphicsDevice.d.ts.map +1 -1
  333. package/dist/webgl/WebGlRenderer.d.ts +3 -3
  334. package/dist/webgl/WebGlRenderer.d.ts.map +1 -1
  335. package/dist/webgl/blending/webgl-blend-state.d.ts +1 -1
  336. package/dist/webgl/blending/webgl-blend-state.d.ts.map +1 -1
  337. package/dist/webgl/buffers/WebGlBuffersFactory.d.ts +1 -1
  338. package/dist/webgl/buffers/WebGlBuffersFactory.d.ts.map +1 -1
  339. package/dist/webgl/buffers/WebGlUniformBuffer.d.ts +1 -1
  340. package/dist/webgl/buffers/WebGlUniformBuffer.d.ts.map +1 -1
  341. package/dist/webgl/buffers/WebGlVertexBuffer.d.ts +6 -6
  342. package/dist/webgl/buffers/WebGlVertexBuffer.d.ts.map +1 -1
  343. package/dist/webgl/buffers/webgl-index-buffer.d.ts +2 -2
  344. package/dist/webgl/buffers/webgl-index-buffer.d.ts.map +1 -1
  345. package/dist/webgl/cast/cast.d.ts +2 -2
  346. package/dist/webgl/cast/cast.d.ts.map +1 -1
  347. package/dist/webgl/primitive/WebGlPrimitiveState.d.ts +1 -3
  348. package/dist/webgl/primitive/WebGlPrimitiveState.d.ts.map +1 -1
  349. package/dist/webgl/render-pass/WebGlRenderPass.d.ts +3 -3
  350. package/dist/webgl/render-pass/WebGlRenderPass.d.ts.map +1 -1
  351. package/dist/webgl/render-pipelines/AWebGlRenderPipeline.d.ts +1 -1
  352. package/dist/webgl/render-pipelines/AWebGlRenderPipeline.d.ts.map +1 -1
  353. package/dist/webgl/render-pipelines/WebGlMainRenderTargetRenderPipeline.d.ts +3 -1
  354. package/dist/webgl/render-pipelines/WebGlMainRenderTargetRenderPipeline.d.ts.map +1 -1
  355. package/dist/webgl/render-pipelines/WebGlRenderPipelineFactory.d.ts +1 -1
  356. package/dist/webgl/render-pipelines/WebGlRenderPipelineFactory.d.ts.map +1 -1
  357. package/dist/webgl/render-pipelines/inspect/WebGlInspectTextureMipsRenderPipeline.d.ts +3 -3
  358. package/dist/webgl/render-pipelines/inspect/WebGlInspectTextureMipsRenderPipeline.d.ts.map +1 -1
  359. package/dist/webgl/render-pipelines/material/WebGlUnlitRenderPipeline.d.ts +2 -2
  360. package/dist/webgl/render-pipelines/material/WebGlUnlitRenderPipeline.d.ts.map +1 -1
  361. package/dist/webgl/render-pipelines/sprite/WebGlSpriteRenderPipeline.d.ts +2 -2
  362. package/dist/webgl/render-pipelines/sprite/WebGlSpriteRenderPipeline.d.ts.map +1 -1
  363. package/dist/webgl/sampler/webgl-sampler.d.ts +1 -1
  364. package/dist/webgl/sampler/webgl-sampler.d.ts.map +1 -1
  365. package/dist/webgl/shader/WebGlShaderModule.d.ts +1 -1
  366. package/dist/webgl/shader/WebGlShaderModule.d.ts.map +1 -1
  367. package/dist/webgl/shader/WebGlShaderModuleLoader.d.ts +1 -1
  368. package/dist/webgl/shader/WebGlShaderModuleLoader.d.ts.map +1 -1
  369. package/dist/webgl/swap-chain/WebGlSwapChain.d.ts +1 -1
  370. package/dist/webgl/swap-chain/WebGlSwapChain.d.ts.map +1 -1
  371. package/dist/webgl/texture/WebGlTexture2D.d.ts +1 -1
  372. package/dist/webgl/texture/WebGlTexture2D.d.ts.map +1 -1
  373. package/dist/webgl/texture/WebGlTextureFactory.d.ts +3 -3
  374. package/dist/webgl/texture/WebGlTextureFactory.d.ts.map +1 -1
  375. package/dist/webgl/utilities/WebGlBufferUtilities.d.ts +1 -1
  376. package/dist/webgl/utilities/WebGlBufferUtilities.d.ts.map +1 -1
  377. package/dist/webgl/utilities/WebGlConverter.d.ts +6 -22
  378. package/dist/webgl/utilities/WebGlConverter.d.ts.map +1 -1
  379. package/dist/webgl/utilities/WebGlFrameBufferUtilities.d.ts +1 -1
  380. package/dist/webgl/utilities/WebGlFrameBufferUtilities.d.ts.map +1 -1
  381. package/dist/webgl/utilities/WebGlSamplerUtilities.d.ts +3 -3
  382. package/dist/webgl/utilities/WebGlSamplerUtilities.d.ts.map +1 -1
  383. package/dist/webgl/utilities/WebGlTextureUtilities.d.ts +5 -5
  384. package/dist/webgl/utilities/WebGlTextureUtilities.d.ts.map +1 -1
  385. package/dist/webgl/utilities/webgl-culling-utilities.d.ts +1 -1
  386. package/dist/webgl/utilities/webgl-culling-utilities.d.ts.map +1 -1
  387. package/dist/webgl/utilities/webgl-filter-anisotropic-utilities.d.ts +1 -1
  388. package/dist/webgl/utilities/webgl-renderbuffer-utilities.d.ts +1 -1
  389. package/dist/webgl/utilities/webgl-renderbuffer-utilities.d.ts.map +1 -1
  390. package/package.json +7 -6
  391. package/shaders/glsl/sprite_fs.glsl +1 -1
  392. package/src/{core/Framework.ts → Framework.ts} +78 -38
  393. package/src/api/FrameworkConfiguration.ts +29 -0
  394. package/src/api/IFramework.ts +153 -0
  395. package/src/api/IFrameworkConfiguration.ts +30 -0
  396. package/src/api/_export.ts +26 -0
  397. package/src/api/camera/CameraFactory.ts +56 -0
  398. package/src/api/camera/ICamera.ts +52 -0
  399. package/src/api/camera/ICameraFactory.ts +69 -0
  400. package/src/api/camera/IOrthographicCamera.ts +38 -0
  401. package/src/api/camera/OrbitCamera.ts +402 -0
  402. package/src/api/camera/OrthographicCamera.ts +257 -0
  403. package/src/api/camera/PerspectiveCamera.ts +206 -0
  404. package/src/api/camera/_export.ts +7 -0
  405. package/src/api/content/ContentConfig.ts +11 -0
  406. package/src/{core → api}/content/ContentManager.ts +4 -3
  407. package/src/api/content/IContent.ts +9 -0
  408. package/src/api/content/IContentManager.ts +41 -0
  409. package/src/api/content/IContentModule.ts +67 -0
  410. package/src/{content → api/content}/ShaderModuleContent.ts +8 -8
  411. package/src/api/content/_export-content.ts +4 -0
  412. package/src/api/core/IDisposable.ts +10 -0
  413. package/src/api/core/_export-core.ts +1 -0
  414. package/src/api/data/Color.ts +228 -0
  415. package/src/api/data/Rect.ts +92 -0
  416. package/src/api/data/State.ts +10 -0
  417. package/src/api/data/_export.ts +3 -0
  418. package/src/{geometry → api/geometry}/BaseGeometry.ts +15 -2
  419. package/src/{geometry → api/geometry}/GeometryBuilder.ts +1 -1
  420. package/src/api/geometry/GeometryFormat.ts +33 -0
  421. package/src/api/geometry/IGeometry.ts +66 -0
  422. package/src/api/geometry/IGeometryBuilder.ts +17 -0
  423. package/src/{VertexFormat.ts → api/geometry/VertexFormat.ts} +3 -7
  424. package/src/api/geometry/_export-geometry.ts +4 -0
  425. package/src/api/image/CpuImageProcessor.ts +125 -0
  426. package/src/api/image/IImageProcessor.ts +28 -0
  427. package/src/api/image/RawImageData.ts +47 -0
  428. package/src/api/image/_export.ts +3 -0
  429. package/src/api/index.ts +1 -0
  430. package/src/api/input/IInputManager.ts +62 -0
  431. package/src/api/input/InputDeviceType.ts +20 -0
  432. package/src/api/input/InputManager.ts +513 -0
  433. package/src/api/input/Key.ts +35 -0
  434. package/src/api/input/KeyboardState.ts +44 -0
  435. package/src/api/input/_export.ts +13 -0
  436. package/src/api/input/gamepad/Button.ts +21 -0
  437. package/src/api/input/gamepad/GamePadState.ts +65 -0
  438. package/src/api/input/gamepad/GamePadThumbSticks.ts +18 -0
  439. package/src/api/input/mouse/MouseButton.ts +9 -0
  440. package/src/api/input/mouse/MouseState.ts +70 -0
  441. package/src/api/input/touch/TouchCollection.ts +164 -0
  442. package/src/api/input/touch/TouchLocation.ts +159 -0
  443. package/src/api/input/touch/TouchLocationState.ts +15 -0
  444. package/src/api/input/touch/TouchPanelCapabilities.ts +31 -0
  445. package/src/api/loaders/IImageLoader.ts +22 -0
  446. package/src/api/loaders/ImageLoader.ts +93 -0
  447. package/src/api/loaders/_export.ts +2 -0
  448. package/src/api/material/IMaterial.ts +41 -0
  449. package/src/api/material/IMaterialFactory.ts +21 -0
  450. package/src/api/material/InspectTextureMipsMaterial.ts +113 -0
  451. package/src/api/material/MaterialFactory.ts +27 -0
  452. package/src/api/material/UnlitMaterial.ts +143 -0
  453. package/src/api/material/_export.ts +5 -0
  454. package/src/api/meshes/IMesh.ts +20 -0
  455. package/src/api/meshes/IMeshFactory.ts +28 -0
  456. package/src/api/meshes/Mesh.ts +256 -0
  457. package/src/api/meshes/MeshFactory.ts +36 -0
  458. package/src/api/meshes/MeshParameters.ts +25 -0
  459. package/src/api/meshes/QuadMesh.ts +104 -0
  460. package/src/api/meshes/_export.ts +6 -0
  461. package/src/api/rendering/IGPUInfo.ts +42 -0
  462. package/src/api/rendering/IGraphicsDevice.ts +103 -0
  463. package/src/api/rendering/IGraphicsDeviceFeatures.ts +32 -0
  464. package/src/api/rendering/IRenderer.ts +84 -0
  465. package/src/api/rendering/PowerPreference.ts +15 -0
  466. package/src/api/rendering/RenderingBackend.ts +20 -0
  467. package/src/api/rendering/_export-rendering.ts +6 -0
  468. package/src/api/rendering/blending/IBlendState.ts +17 -0
  469. package/src/api/rendering/blending/_export.ts +1 -0
  470. package/src/api/rendering/buffers/BufferUsage.ts +56 -0
  471. package/src/api/rendering/buffers/IBuffer.ts +24 -0
  472. package/src/api/rendering/buffers/IBufferFactory.ts +38 -0
  473. package/src/api/rendering/buffers/IIndexBuffer.ts +37 -0
  474. package/src/api/rendering/buffers/IUniformBuffer.ts +21 -0
  475. package/src/api/rendering/buffers/IVertexBuffer.ts +32 -0
  476. package/src/api/rendering/buffers/IVertexBufferLayout.ts +27 -0
  477. package/src/api/rendering/buffers/IndexBufferType.ts +13 -0
  478. package/src/api/rendering/buffers/VertexAttribute.ts +26 -0
  479. package/src/api/rendering/buffers/VertexStepMode.ts +13 -0
  480. package/src/api/rendering/buffers/_export-buffers.ts +11 -0
  481. package/src/api/rendering/primitive/CullMode.ts +17 -0
  482. package/src/api/rendering/primitive/FrontFace.ts +13 -0
  483. package/src/api/rendering/primitive/IPrimitiveState.ts +25 -0
  484. package/src/api/rendering/primitive/PrimitiveStateDescriptor.ts +27 -0
  485. package/src/api/rendering/primitive/PrimitiveTopology.ts +25 -0
  486. package/src/api/rendering/primitive/_export.ts +5 -0
  487. package/src/api/rendering/render-pipelines/IInspectTextureMipsRenderPipeline.ts +38 -0
  488. package/src/api/rendering/render-pipelines/IMainRenderTargetRenderPipeline.ts +21 -0
  489. package/src/api/rendering/render-pipelines/IRenderPipeline.ts +47 -0
  490. package/src/api/rendering/render-pipelines/IRenderPipelineFactory.ts +52 -0
  491. package/src/api/rendering/render-pipelines/ISpriteRenderPipeline.ts +25 -0
  492. package/src/api/rendering/render-pipelines/IUnlitRenderPipeline.ts +38 -0
  493. package/src/api/rendering/render-pipelines/_export-render-pipelines.ts +6 -0
  494. package/src/{core/renderer → api/rendering}/renderer-interface.ts +15 -9
  495. package/src/api/rendering/renderpass/IRenderPass.ts +18 -0
  496. package/src/api/rendering/renderpass/LoadAction.ts +32 -0
  497. package/src/api/rendering/renderpass/RenderPassColorAttachment.ts +61 -0
  498. package/src/api/rendering/renderpass/RenderPassDepthStencilAttachment.ts +76 -0
  499. package/src/api/rendering/renderpass/RenderPassDescriptor.ts +26 -0
  500. package/src/api/rendering/renderpass/StoreAction.ts +23 -0
  501. package/src/api/rendering/renderpass/_export.ts +6 -0
  502. package/src/api/rendering/sampler/ISampler.ts +52 -0
  503. package/src/api/rendering/sampler/MipMapSamplerFilter.ts +17 -0
  504. package/src/api/rendering/sampler/SamplerAddressMode.ts +23 -0
  505. package/src/api/rendering/sampler/SamplerDescriptor.ts +46 -0
  506. package/src/api/rendering/sampler/SamplerFilter.ts +13 -0
  507. package/src/api/rendering/sampler/_export.ts +5 -0
  508. package/src/api/rendering/sampler/sampler-enums.ts +20 -0
  509. package/src/api/rendering/swapchain/ISwapChain.ts +33 -0
  510. package/src/api/rendering/swapchain/SurfacePresentMode.ts +22 -0
  511. package/src/api/rendering/swapchain/SwapChainDescriptor.ts +23 -0
  512. package/src/api/rendering/swapchain/_export.ts +3 -0
  513. package/src/api/rendering/texture/ITexture2D.ts +100 -0
  514. package/src/api/rendering/texture/ITextureFactory.ts +56 -0
  515. package/src/api/rendering/texture/ITextureView.ts +20 -0
  516. package/src/api/rendering/texture/TextureDescriptor.ts +52 -0
  517. package/src/api/rendering/texture/TextureFormat.ts +58 -0
  518. package/src/api/rendering/texture/TextureUsage.ts +41 -0
  519. package/src/api/rendering/texture/TextureUtilities.ts +149 -0
  520. package/src/api/rendering/texture/TextureViewDescriptor.ts +25 -0
  521. package/src/api/rendering/texture/TextureViewDimension.ts +16 -0
  522. package/src/api/rendering/texture/_export-texture.ts +9 -0
  523. package/src/api/shader/IShaderModule.ts +23 -0
  524. package/src/api/shader/IShaderModuleLoader.ts +15 -0
  525. package/src/api/shader/ShaderStage.ts +9 -0
  526. package/src/api/shader/_export-shader.ts +3 -0
  527. package/src/{core → api}/shader/shader-loader.ts +1 -1
  528. package/src/api/sprites/ISpriteBatch.ts +144 -0
  529. package/src/{core/sprite-batch → api/sprites}/SpriteBatch.ts +8 -5
  530. package/src/{core/sprite-batch → api/sprites}/SpriteBatchDrawable.ts +6 -6
  531. package/src/{core/sprite-batch → api/sprites}/SpriteBatchMesh.ts +8 -4
  532. package/src/api/sprites/_export_sprites.ts +1 -0
  533. package/src/api/time/GameTime.ts +30 -0
  534. package/src/api/time/ITimeManager.ts +22 -0
  535. package/src/api/time/TimeManager.ts +33 -0
  536. package/src/api/time/_export_time.ts +3 -0
  537. package/src/api/utilities/AlignUtilities.ts +39 -0
  538. package/src/api/utilities/GeometryUtilities.ts +20 -0
  539. package/src/api/utilities/MathHelper.ts +256 -0
  540. package/src/api/utilities/_export.ts +3 -0
  541. package/src/api/window/IWindowManager.ts +78 -0
  542. package/src/api/window/WindowBounds.ts +17 -0
  543. package/src/{core/window/window-manager.ts → api/window/WindowManager.ts} +2 -2
  544. package/src/api/window/_export.ts +2 -0
  545. package/src/core/rendering/AGraphicsDevice.ts +15 -9
  546. package/src/core/rendering/ARenderer.ts +7 -7
  547. package/src/core/rendering/blending/enums.ts +5 -5
  548. package/src/core/rendering/sampler/sampler-descriptor.ts +1 -1
  549. package/src/core/rendering/texture/texture.ts +4 -3
  550. package/src/core/rendering/vertex-buffer-layout.ts +3 -4
  551. package/src/index.ts +3 -2
  552. package/src/main.ts +5 -10
  553. package/src/webgl/WebGLGraphicsDeviceFeatures.ts +1 -1
  554. package/src/webgl/WebGlGpuInfo.ts +1 -1
  555. package/src/webgl/WebGlGraphicsDevice.ts +19 -15
  556. package/src/webgl/WebGlRenderer.ts +7 -5
  557. package/src/webgl/blending/webgl-blend-state.ts +1 -1
  558. package/src/webgl/buffers/WebGlBuffersFactory.ts +1 -1
  559. package/src/webgl/buffers/WebGlUniformBuffer.ts +1 -1
  560. package/src/webgl/buffers/WebGlVertexBuffer.ts +8 -7
  561. package/src/webgl/buffers/webgl-index-buffer.ts +2 -2
  562. package/src/webgl/cast/cast.ts +2 -2
  563. package/src/webgl/primitive/WebGlPrimitiveState.ts +7 -3
  564. package/src/webgl/render-pass/WebGlRenderPass.ts +17 -8
  565. package/src/webgl/render-pipelines/AWebGlRenderPipeline.ts +1 -1
  566. package/src/webgl/render-pipelines/WebGlMainRenderTargetRenderPipeline.ts +10 -2
  567. package/src/webgl/render-pipelines/WebGlRenderPipelineFactory.ts +1 -1
  568. package/src/webgl/render-pipelines/inspect/WebGlInspectTextureMipsRenderPipeline.ts +3 -3
  569. package/src/webgl/render-pipelines/material/WebGlUnlitRenderPipeline.ts +2 -2
  570. package/src/webgl/render-pipelines/sprite/WebGlSpriteRenderPipeline.ts +2 -2
  571. package/src/webgl/sampler/webgl-sampler.ts +2 -2
  572. package/src/webgl/shader/WebGlShaderModule.ts +2 -2
  573. package/src/webgl/shader/WebGlShaderModuleLoader.ts +1 -1
  574. package/src/webgl/swap-chain/WebGlSwapChain.ts +1 -1
  575. package/src/webgl/texture/WebGlTexture2D.ts +6 -4
  576. package/src/webgl/texture/WebGlTextureFactory.ts +7 -7
  577. package/src/webgl/utilities/WebGlBufferUtilities.ts +1 -1
  578. package/src/webgl/utilities/WebGlConverter.ts +19 -62
  579. package/src/webgl/utilities/WebGlFrameBufferUtilities.ts +1 -1
  580. package/src/webgl/utilities/WebGlSamplerUtilities.ts +4 -4
  581. package/src/webgl/utilities/WebGlTextureUtilities.ts +29 -20
  582. package/src/webgl/utilities/webgl-culling-utilities.ts +1 -1
  583. package/src/webgl/utilities/webgl-filter-anisotropic-utilities.ts +1 -1
  584. package/src/webgl/utilities/webgl-renderbuffer-utilities.ts +1 -1
  585. package/dist/TextureFormat.d.ts +0 -2
  586. package/dist/TextureFormat.d.ts.map +0 -1
  587. package/dist/VertexFormat.d.ts.map +0 -1
  588. package/dist/_ris-ktx2-node-module-stub-nzBRmiO_.js +0 -10
  589. package/dist/common/sampler-enums.d.ts +0 -16
  590. package/dist/common/sampler-enums.d.ts.map +0 -1
  591. package/dist/common/vertex-step-mode.d.ts +0 -11
  592. package/dist/common/vertex-step-mode.d.ts.map +0 -1
  593. package/dist/content/ShaderModuleContent.d.ts.map +0 -1
  594. package/dist/core/Framework.d.ts.map +0 -1
  595. package/dist/core/FrameworkConfig.d.ts +0 -26
  596. package/dist/core/FrameworkConfig.d.ts.map +0 -1
  597. package/dist/core/buffers/buffers-factory-interface.d.ts +0 -2
  598. package/dist/core/buffers/buffers-factory-interface.d.ts.map +0 -1
  599. package/dist/core/buffers/vertex-buffer-interface.d.ts +0 -2
  600. package/dist/core/buffers/vertex-buffer-interface.d.ts.map +0 -1
  601. package/dist/core/content/ContentManager.d.ts.map +0 -1
  602. package/dist/core/dependency-injection/register-services-interface.d.ts +0 -13
  603. package/dist/core/dependency-injection/register-services-interface.d.ts.map +0 -1
  604. package/dist/core/framework-interface.d.ts +0 -2
  605. package/dist/core/framework-interface.d.ts.map +0 -1
  606. package/dist/core/input/InputManager.d.ts +0 -27
  607. package/dist/core/input/InputManager.d.ts.map +0 -1
  608. package/dist/core/renderer/renderer-interface.d.ts.map +0 -1
  609. package/dist/core/rendering/primitive/PrimitiveStateDescriptor.d.ts +0 -26
  610. package/dist/core/rendering/primitive/PrimitiveStateDescriptor.d.ts.map +0 -1
  611. package/dist/core/rendering/primitive/enums.d.ts +0 -56
  612. package/dist/core/rendering/primitive/enums.d.ts.map +0 -1
  613. package/dist/core/rendering/render-pass/render-pass-descriptor.d.ts +0 -2
  614. package/dist/core/rendering/render-pass/render-pass-descriptor.d.ts.map +0 -1
  615. package/dist/core/rendering/render-pass/render-pass-interface.d.ts +0 -15
  616. package/dist/core/rendering/render-pass/render-pass-interface.d.ts.map +0 -1
  617. package/dist/core/rendering/vertex-attribute.d.ts +0 -17
  618. package/dist/core/rendering/vertex-attribute.d.ts.map +0 -1
  619. package/dist/core/shader/shader-loader.d.ts.map +0 -1
  620. package/dist/core/shader/shader-module-interface.d.ts +0 -2
  621. package/dist/core/shader/shader-module-interface.d.ts.map +0 -1
  622. package/dist/core/sprite-batch/SpriteBatch.d.ts.map +0 -1
  623. package/dist/core/sprite-batch/SpriteBatchDrawable.d.ts.map +0 -1
  624. package/dist/core/sprite-batch/SpriteBatchMesh.d.ts.map +0 -1
  625. package/dist/core/window/window-manager.d.ts.map +0 -1
  626. package/dist/geometry/BaseGeometry.d.ts.map +0 -1
  627. package/dist/geometry/GeometryBuilder.d.ts.map +0 -1
  628. package/dist/geometry/GeometryFormat.d.ts +0 -34
  629. package/dist/geometry/GeometryFormat.d.ts.map +0 -1
  630. package/dist/webgl/utilities/webgl-render-buffer-utilities.d.ts +0 -5
  631. package/dist/webgl/utilities/webgl-render-buffer-utilities.d.ts.map +0 -1
  632. package/src/TextureFormat.ts +0 -0
  633. package/src/common/sampler-enums.ts +0 -21
  634. package/src/common/vertex-step-mode.ts +0 -12
  635. package/src/core/FrameworkConfig.ts +0 -31
  636. package/src/core/buffers/buffers-factory-interface.ts +0 -0
  637. package/src/core/buffers/vertex-buffer-interface.ts +0 -0
  638. package/src/core/dependency-injection/register-services-interface.ts +0 -15
  639. package/src/core/framework-interface.ts +0 -0
  640. package/src/core/input/InputManager.ts +0 -115
  641. package/src/core/rendering/primitive/PrimitiveStateDescriptor.ts +0 -32
  642. package/src/core/rendering/primitive/enums.ts +0 -68
  643. package/src/core/rendering/render-pass/render-pass-descriptor.ts +0 -0
  644. package/src/core/rendering/render-pass/render-pass-interface.ts +0 -17
  645. package/src/core/rendering/vertex-attribute.ts +0 -20
  646. package/src/core/shader/shader-module-interface.ts +0 -1
  647. package/src/counter.ts +0 -9
  648. package/src/geometry/GeometryFormat.ts +0 -37
  649. package/src/webgl/utilities/webgl-render-buffer-utilities.ts +0 -23
  650. /package/dist/{content → api/content}/ShaderModuleContent.d.ts +0 -0
  651. /package/dist/{VertexFormat.d.ts → api/geometry/VertexFormat.d.ts} +0 -0
  652. /package/dist/{core/renderer → api/rendering}/enums.d.ts +0 -0
  653. /package/dist/{core/renderer → api/rendering}/rendering-limits.d.ts +0 -0
  654. /package/src/{core/renderer → api/rendering}/enums.ts +0 -0
  655. /package/src/{core/renderer → api/rendering}/rendering-limits.ts +0 -0
@@ -0,0 +1,47 @@
1
+ import type { IDisposable } from "../core/IDisposable.ts";
2
+
3
+ /**
4
+ * The image data.
5
+ */
6
+ export class RawImageData implements IDisposable {
7
+
8
+ /**
9
+ * The image data per mip level.
10
+ */
11
+ private _data?: Array<number[] | HTMLImageElement | ArrayBufferView>;
12
+
13
+ /**
14
+ * The constructor.
15
+ * @param data The data.
16
+ * @param baseWidth The image width.
17
+ * @param baseHeight The image height.
18
+ * @param channels The number of channels in the image.
19
+ */
20
+ public constructor(data: Array<number[] | HTMLImageElement | ArrayBufferView>,
21
+ public readonly baseWidth: number,
22
+ public readonly baseHeight: number,
23
+ public readonly channels: number) {
24
+
25
+ this._data = data;
26
+ this.numLevels = data.length;
27
+ }
28
+
29
+ /**
30
+ * The number of mip levels.
31
+ */
32
+ public readonly numLevels : number;
33
+
34
+ /**
35
+ * Gets the image data for a specific mip level.
36
+ * @param mipLevel - The mip level.
37
+ * @returns The data.
38
+ */
39
+ public getData(mipLevel: number): number[] | HTMLImageElement | ArrayBufferView {
40
+ return this._data![mipLevel];
41
+ }
42
+
43
+ /** @inheritDoc */
44
+ public dispose(): void {
45
+ this._data = undefined;
46
+ }
47
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./RawImageData.ts"
2
+ export * from "./IImageProcessor.ts";
3
+ export * from "./CpuImageProcessor.ts"
@@ -0,0 +1 @@
1
+ export * from "./_export.ts";
@@ -0,0 +1,62 @@
1
+ import {KeyboardState} from "./KeyboardState.ts";
2
+ import {MouseState} from "./mouse/MouseState.ts";
3
+ import {GamePadState} from "./gamepad/GamePadState.ts";
4
+ import {TouchCollection} from "./touch/TouchCollection.ts";
5
+ import {TouchPanelCapabilities} from "./touch/TouchPanelCapabilities.ts";
6
+
7
+ /**
8
+ * The input manager.
9
+ */
10
+ export interface IInputManager {
11
+
12
+ /**
13
+ * Gets or sets the thumbstick dead zone.
14
+ * The dead zone is a range of values near the center of the thumbstick that are ignored.
15
+ * By default, it is 0.2.
16
+ */
17
+ thumbstickDeadZone: number;
18
+
19
+ /**
20
+ * Gets the keyboard state. Can be used to query pressed keys.
21
+ * @returns The keyboard state.
22
+ */
23
+ getKeyboardState(): KeyboardState;
24
+
25
+ /**
26
+ * Gets the mouse state. Can be used to query pressed buttons and the cursor position.
27
+ * @returns The mouse state.
28
+ */
29
+ getMouseState(): MouseState;
30
+
31
+ /**
32
+ * Gets the gamepad state. Can be used to query pressed buttons.
33
+ * @param gamePadIndex - The index of a gamepad. By default, it is 0 for first.
34
+ * @returns The gamepad state.
35
+ */
36
+ getGamePadState(gamePadIndex: number): GamePadState;
37
+
38
+ /**
39
+ * Gets the touch locations for the current frame.
40
+ */
41
+ getTouchCollection(): TouchCollection;
42
+
43
+ /**
44
+ * Gets the capabilities of the touch panel.
45
+ */
46
+ getTouchCapabilities(): TouchPanelCapabilities;
47
+
48
+ /**
49
+ * Initialize the input manager.
50
+ */
51
+ initialize(): void;
52
+
53
+ /**
54
+ * Update the input manager.
55
+ */
56
+ update(): void;
57
+
58
+ /**
59
+ * Call this after update. Usually at the end of update loop in order to clear.
60
+ */
61
+ afterUpdate(): void;
62
+ }
@@ -0,0 +1,20 @@
1
+
2
+ /** The type of input device. */
3
+ export enum InputDeviceType {
4
+
5
+ /** No input. */
6
+ NONE = 0,
7
+ /** Keyboard */
8
+ KEYBOARD = 1 << 0,
9
+ /** Mouse */
10
+ MOUSE = 1 << 1,
11
+ /** Gamepad */
12
+ GAMEPAD = 1 << 2,
13
+ /** Touchpad */
14
+ TOUCHPAD = 1 << 3,
15
+ /** Pen */
16
+ PEN = 1 << 4,
17
+
18
+ /** Every input device */
19
+ ALL = 0xFF_FF_FF_FF,
20
+ }
@@ -0,0 +1,513 @@
1
+ import {
2
+ GamePadState,
3
+ type IFramework,
4
+ type IInputManager,
5
+ KeyboardState,
6
+ MouseButton,
7
+ MouseState,
8
+ TouchCollection,
9
+ TouchLocationState,
10
+ TouchPanelCapabilities,
11
+ } from "../index.ts";
12
+ import {vec2} from "gl-matrix";
13
+
14
+ /**
15
+ * One finger.
16
+ * Allocated with the pool and reset when the finger is gone.
17
+ */
18
+ class TouchContact {
19
+
20
+ public id = 0;
21
+ public inUse = false;
22
+ public state = TouchLocationState.INVALID;
23
+ public x = 0;
24
+ public y = 0;
25
+ public pressure = 0;
26
+ public hasPrevious = false;
27
+ /** Previous was captured for this frame. Later events must not overwrite it. */
28
+ public hasFramePrevious = false;
29
+ public prevState = TouchLocationState.INVALID;
30
+ public prevX = 0;
31
+ public prevY = 0;
32
+ public prevPressure = 0;
33
+ /** Pressed and released before the press was published. The press is shown first. */
34
+ public sameFrameReleased = false;
35
+
36
+ public releaseSlot(): void {
37
+ this.inUse = false;
38
+ this.state = TouchLocationState.INVALID;
39
+ this.hasPrevious = false;
40
+ this.hasFramePrevious = false;
41
+ this.sameFrameReleased = false;
42
+ this.pressure = 0;
43
+ }
44
+ }
45
+
46
+ export class InputManager implements IInputManager {
47
+
48
+ private readonly _mouseButtonMap: { [key: number]: MouseButton } = {
49
+ 0: MouseButton.LEFT,
50
+ 1: MouseButton.MIDDLE,
51
+ 2: MouseButton.RIGHT,
52
+ }
53
+
54
+ private readonly _mouseState: MouseState;
55
+ private readonly _mousePosition = vec2.create();
56
+ private readonly _previousMousePosition = vec2.create();
57
+ private readonly _mouseDelta = vec2.create();
58
+ private readonly _scrollWheelPosition = vec2.create();
59
+ private readonly _mouseButtonDown: { [key: number]: boolean } = {};
60
+ private readonly _mouseButtonReleased: { [key: number]: boolean } = {};
61
+
62
+ private readonly _touchCollection: TouchCollection;
63
+ private readonly _touchCapabilities: TouchPanelCapabilities;
64
+ private readonly _contacts: TouchContact[];
65
+ private _touchListening = false;
66
+ /** Set in update, consumed in afterUpdate. Ageing before a publish would hide the press. */
67
+ private _touchPublished = false;
68
+
69
+ private static readonly _PHASE_BEGIN = 0;
70
+ private static readonly _PHASE_MOVE = 1;
71
+ private static readonly _PHASE_END = 2;
72
+ private static readonly _PHASE_CANCEL = 3;
73
+ private static readonly _touchListenerOptions: AddEventListenerOptions = {passive: false};
74
+
75
+ /**
76
+ * The constructor.
77
+ * @param _framework The framework. Its window manager canvas receives the input listeners in initialize().
78
+ */
79
+ public constructor(private readonly _framework: IFramework) {
80
+
81
+ this._mouseState = new MouseState(
82
+ this._mouseButtonDown, this._mouseButtonReleased,
83
+ this._mousePosition, this._mouseDelta, this._scrollWheelPosition
84
+ );
85
+
86
+ const capacity = TouchCollection.MAX_TOUCH_COUNT;
87
+ const contacts = new Array<TouchContact>(capacity);
88
+ for (let i = 0; i < capacity; i++) {
89
+ contacts[i] = new TouchContact();
90
+ }
91
+ this._contacts = contacts;
92
+ this._touchCollection = new TouchCollection(capacity);
93
+ this._touchCapabilities = this._createTouchCapabilities();
94
+ }
95
+
96
+
97
+ thumbstickDeadZone = 0.2;
98
+
99
+
100
+ getGamePadState(_gamePadIndex: number): GamePadState {
101
+ return new GamePadState(false, {}, {}, vec2.create(), vec2.create());
102
+ }
103
+
104
+ getKeyboardState(): KeyboardState {
105
+ return new KeyboardState({}, {});
106
+ }
107
+
108
+ /** @inheritDoc */
109
+ public getMouseState(): MouseState {
110
+ return this._mouseState;
111
+ }
112
+
113
+ /** @inheritDoc */
114
+ public getTouchCollection(): TouchCollection {
115
+ return this._touchCollection;
116
+ }
117
+
118
+ /** @inheritDoc */
119
+ public getTouchCapabilities(): TouchPanelCapabilities {
120
+ return this._touchCapabilities;
121
+ }
122
+
123
+ /** @inheritDoc */
124
+ public initialize(): void {
125
+
126
+ const canvas = this._framework.windowManager.canvas;
127
+ this._handleMouseEvents(canvas);
128
+ this._handleTouchEvents(canvas);
129
+ }
130
+
131
+ private _handleMouseEvents(canvas: HTMLCanvasElement) {
132
+
133
+ canvas.addEventListener("mousemove", (e: MouseEvent) => {
134
+ this._mousePosition[0] = e.clientX;
135
+ this._mousePosition[1] = e.clientY;
136
+ });
137
+
138
+ canvas.addEventListener("mousedown", (e: MouseEvent) => {
139
+ const idx = e.button;
140
+ const btn = this._mouseButtonMap[idx] ?? MouseButton.NONE;
141
+ this._mouseButtonDown[btn] = true;
142
+ })
143
+
144
+ canvas.addEventListener("mouseup", (e: MouseEvent) => {
145
+ const idx = e.button;
146
+ const btn = this._mouseButtonMap[idx] ?? MouseButton.NONE;
147
+ this._mouseButtonDown[btn] = false;
148
+ this._mouseButtonReleased[btn] = true;
149
+ });
150
+
151
+ canvas.addEventListener("wheel", (e: WheelEvent) => {
152
+
153
+ let x = 0;
154
+ let y = 0;
155
+ if (e.deltaX > 0) {
156
+ x = 1;
157
+ } else if (e.deltaX < 0) {
158
+ x = -1;
159
+ }
160
+
161
+ if (e.deltaY > 0) {
162
+ y = 1;
163
+ } else if (e.deltaY < 0) {
164
+ y = -1;
165
+ }
166
+
167
+ vec2.set(this._scrollWheelPosition, x, y);
168
+
169
+ e.preventDefault();
170
+ })
171
+ }
172
+
173
+ private _handleTouchEvents(canvas: HTMLCanvasElement): void {
174
+ if (this._touchListening) {
175
+ return;
176
+ }
177
+ this._touchListening = true;
178
+
179
+ // Pan and pinch-zoom start on this canvas only. The rest of the page is left alone.
180
+ canvas.style.touchAction = "none";
181
+
182
+ const options = InputManager._touchListenerOptions;
183
+ canvas.addEventListener("touchstart", this._onTouchStart, options);
184
+ canvas.addEventListener("touchmove", this._onTouchMove, options);
185
+ canvas.addEventListener("touchend", this._onTouchEnd, options);
186
+ canvas.addEventListener("touchcancel", this._onTouchCancel, options);
187
+ }
188
+
189
+ private readonly _onTouchStart = (event: TouchEvent): void => {
190
+ this._readTouches(event, InputManager._PHASE_BEGIN);
191
+ this._blockBrowserTouchGesture(event);
192
+ };
193
+
194
+ private readonly _onTouchMove = (event: TouchEvent): void => {
195
+ this._readTouches(event, InputManager._PHASE_MOVE);
196
+ this._blockBrowserTouchGesture(event);
197
+ };
198
+
199
+ private readonly _onTouchEnd = (event: TouchEvent): void => {
200
+ this._readTouches(event, InputManager._PHASE_END);
201
+ };
202
+
203
+ private readonly _onTouchCancel = (event: TouchEvent): void => {
204
+ this._readTouches(event, InputManager._PHASE_CANCEL);
205
+ };
206
+
207
+ private _blockBrowserTouchGesture(event: TouchEvent): void {
208
+ if (event.cancelable) {
209
+ event.preventDefault();
210
+ }
211
+ }
212
+
213
+ private _readTouches(event: TouchEvent, phase: number): void {
214
+ const changed = event.changedTouches;
215
+ const length = changed.length;
216
+ for (let i = 0; i < length; i++) {
217
+ const touch = changed.item(i);
218
+ if (touch === null) {
219
+ continue;
220
+ }
221
+ if (phase === InputManager._PHASE_BEGIN) {
222
+ this._beginTouch(touch);
223
+ } else if (phase === InputManager._PHASE_MOVE) {
224
+ this._moveTouch(touch);
225
+ } else if (phase === InputManager._PHASE_CANCEL) {
226
+ this._cancelTouch(touch);
227
+ } else {
228
+ this._endTouch(touch);
229
+ }
230
+ }
231
+
232
+ this._noteTouchDevice(event);
233
+ }
234
+
235
+ private _beginTouch(touch: Touch): void {
236
+ if (this._findContact(touch.identifier) !== undefined) {
237
+ return;
238
+ }
239
+
240
+ const contact = this._acquireContact(touch.identifier);
241
+ if (contact === undefined) {
242
+ return;
243
+ }
244
+
245
+ contact.state = TouchLocationState.PRESSED;
246
+ contact.x = touch.clientX;
247
+ contact.y = touch.clientY;
248
+ contact.pressure = this._readPressure(touch);
249
+ contact.hasPrevious = false;
250
+ contact.hasFramePrevious = false;
251
+ contact.sameFrameReleased = false;
252
+ }
253
+
254
+ private _moveTouch(touch: Touch): void {
255
+ const contact = this._findContact(touch.identifier);
256
+ if (contact === undefined || this._isTerminal(contact)) {
257
+ return;
258
+ }
259
+
260
+ const x = touch.clientX;
261
+ const y = touch.clientY;
262
+ if (!contact.hasFramePrevious && (x !== contact.x || y !== contact.y)) {
263
+ this._rememberCurrentAsPrevious(contact);
264
+ }
265
+ contact.x = x;
266
+ contact.y = y;
267
+ contact.pressure = this._readPressure(touch);
268
+ }
269
+
270
+ private _endTouch(touch: Touch): void {
271
+ const contact = this._findContact(touch.identifier);
272
+ if (contact === undefined || this._isTerminal(contact)) {
273
+ return;
274
+ }
275
+
276
+ // A press that also ends before update stays pressed for that read, then ages to released.
277
+ const pressedThisFrame = contact.state === TouchLocationState.PRESSED;
278
+ if (!contact.hasFramePrevious) {
279
+ this._rememberCurrentAsPrevious(contact);
280
+ }
281
+ contact.x = touch.clientX;
282
+ contact.y = touch.clientY;
283
+ // touchend usually reports force 0. Keep the last real reading.
284
+ const pressure = this._readPressure(touch);
285
+ if (pressure > 0) {
286
+ contact.pressure = pressure;
287
+ }
288
+ if (pressedThisFrame) {
289
+ contact.sameFrameReleased = true;
290
+ return;
291
+ }
292
+ contact.state = TouchLocationState.RELEASED;
293
+ }
294
+
295
+ private _cancelTouch(touch: Touch): void {
296
+ const contact = this._findContact(touch.identifier);
297
+ if (contact === undefined || contact.state === TouchLocationState.CANCELLED) {
298
+ return;
299
+ }
300
+
301
+ // A system cancel is not a finger lift, including when the press has not been published yet.
302
+ if (!contact.hasFramePrevious) {
303
+ this._rememberCurrentAsPrevious(contact);
304
+ }
305
+ contact.x = touch.clientX;
306
+ contact.y = touch.clientY;
307
+ const pressure = this._readPressure(touch);
308
+ if (pressure > 0) {
309
+ contact.pressure = pressure;
310
+ }
311
+ contact.sameFrameReleased = false;
312
+ contact.state = TouchLocationState.CANCELLED;
313
+ }
314
+
315
+ private _isTerminal(contact: TouchContact): boolean {
316
+ return contact.state === TouchLocationState.RELEASED
317
+ || contact.state === TouchLocationState.CANCELLED;
318
+ }
319
+
320
+ private _rememberCurrentAsPrevious(contact: TouchContact): void {
321
+ contact.prevState = contact.state;
322
+ contact.prevX = contact.x;
323
+ contact.prevY = contact.y;
324
+ contact.prevPressure = contact.pressure;
325
+ contact.hasPrevious = true;
326
+ contact.hasFramePrevious = true;
327
+ }
328
+
329
+ private _findContact(id: number): TouchContact | undefined {
330
+ const contacts = this._contacts;
331
+ const length = contacts.length;
332
+ for (let i = 0; i < length; i++) {
333
+ const contact = contacts[i];
334
+ if (contact.inUse && contact.id === id) {
335
+ return contact;
336
+ }
337
+ }
338
+ return undefined;
339
+ }
340
+
341
+ private _acquireContact(id: number): TouchContact | undefined {
342
+ const contacts = this._contacts;
343
+ const length = contacts.length;
344
+ for (let i = 0; i < length; i++) {
345
+ const contact = contacts[i];
346
+ if (!contact.inUse) {
347
+ contact.inUse = true;
348
+ contact.id = id;
349
+ return contact;
350
+ }
351
+ }
352
+ return undefined;
353
+ }
354
+
355
+ private _readPressure(touch: Touch): number {
356
+ const force = touch.force;
357
+ if (!(force > 0)) {
358
+ return 0;
359
+ }
360
+ if (force > 1) {
361
+ return 1;
362
+ }
363
+ return force;
364
+ }
365
+
366
+ private _createTouchCapabilities(): TouchPanelCapabilities {
367
+ const reported = navigator.maxTouchPoints;
368
+ const maximumTouchCount = reported > 0 ? reported : 0;
369
+ const hasPressure = maximumTouchCount > 0
370
+ && typeof Touch !== "undefined"
371
+ && "force" in Touch.prototype;
372
+ return new TouchPanelCapabilities(maximumTouchCount > 0, maximumTouchCount, hasPressure);
373
+ }
374
+
375
+ /**
376
+ * A touch event means a device is connected, even when maxTouchPoints is 0.
377
+ * Writes into the existing capabilities instance.
378
+ */
379
+ private _noteTouchDevice(event: TouchEvent): void {
380
+ const changed = event.changedTouches;
381
+ const liveCount = event.touches.length;
382
+ if (changed.length === 0 && liveCount === 0) {
383
+ return;
384
+ }
385
+
386
+ const capabilities = this._touchCapabilities;
387
+ let maximumTouchCount = capabilities.maximumTouchCount;
388
+ if (liveCount > maximumTouchCount) {
389
+ maximumTouchCount = liveCount;
390
+ }
391
+ if (maximumTouchCount < 1 && changed.length > maximumTouchCount) {
392
+ maximumTouchCount = changed.length;
393
+ }
394
+
395
+ let hasPressure = capabilities.hasPressure;
396
+ if (!hasPressure) {
397
+ const length = changed.length;
398
+ for (let i = 0; i < length; i++) {
399
+ const touch = changed.item(i);
400
+ if (touch !== null && touch.force > 0) {
401
+ hasPressure = true;
402
+ break;
403
+ }
404
+ }
405
+ }
406
+
407
+ if (capabilities.isConnected
408
+ && capabilities.maximumTouchCount === maximumTouchCount
409
+ && capabilities.hasPressure === hasPressure) {
410
+ return;
411
+ }
412
+
413
+ capabilities.set(true, maximumTouchCount, hasPressure);
414
+ }
415
+
416
+ private _publishTouches(): void {
417
+ const collection = this._touchCollection;
418
+ collection.clear();
419
+
420
+ const contacts = this._contacts;
421
+ const length = contacts.length;
422
+ for (let i = 0; i < length; i++) {
423
+ const contact = contacts[i];
424
+ if (!contact.inUse || contact.state === TouchLocationState.INVALID) {
425
+ continue;
426
+ }
427
+
428
+ if (contact.hasPrevious) {
429
+ collection.tryAdd(
430
+ contact.id,
431
+ contact.state,
432
+ contact.x,
433
+ contact.y,
434
+ contact.pressure,
435
+ contact.prevState,
436
+ contact.prevX,
437
+ contact.prevY,
438
+ contact.prevPressure
439
+ );
440
+ } else {
441
+ collection.tryAdd(
442
+ contact.id,
443
+ contact.state,
444
+ contact.x,
445
+ contact.y,
446
+ contact.pressure
447
+ );
448
+ }
449
+ }
450
+ }
451
+
452
+ /**
453
+ * Pressed becomes moved, and a same-frame release becomes released, after the frame has read them.
454
+ * Released and cancelled contacts leave the pool so the next publish does not report them again.
455
+ */
456
+ private _ageTouches(): void {
457
+ const contacts = this._contacts;
458
+ const length = contacts.length;
459
+ for (let i = 0; i < length; i++) {
460
+ const contact = contacts[i];
461
+ if (!contact.inUse) {
462
+ continue;
463
+ }
464
+
465
+ if (contact.state === TouchLocationState.RELEASED
466
+ || contact.state === TouchLocationState.CANCELLED) {
467
+ contact.releaseSlot();
468
+ continue;
469
+ }
470
+
471
+ contact.prevState = contact.state;
472
+ contact.prevX = contact.x;
473
+ contact.prevY = contact.y;
474
+ contact.prevPressure = contact.pressure;
475
+ contact.hasPrevious = true;
476
+ contact.hasFramePrevious = true;
477
+
478
+ if (contact.state === TouchLocationState.PRESSED) {
479
+ contact.state = contact.sameFrameReleased
480
+ ? TouchLocationState.RELEASED
481
+ : TouchLocationState.MOVED;
482
+ }
483
+ contact.sameFrameReleased = false;
484
+ }
485
+ }
486
+
487
+ /** @inheritDoc */
488
+ public update(): void {
489
+ vec2.sub(this._mouseDelta, this._mousePosition, this._previousMousePosition);
490
+ vec2.copy(this._previousMousePosition, this._mousePosition);
491
+ this._publishTouches();
492
+ this._touchPublished = true;
493
+ }
494
+
495
+ /** @inheritDoc */
496
+ public afterUpdate(): void {
497
+ vec2.set(this._scrollWheelPosition, 0, 0);
498
+
499
+ // Released is a one-frame state. Without this reset, isButtonReleased stays true forever.
500
+ const released = this._mouseButtonReleased;
501
+ for (const button in released) {
502
+ released[button] = false;
503
+ }
504
+
505
+ if (!this._touchPublished) {
506
+ return;
507
+ }
508
+ this._ageTouches();
509
+ this._touchPublished = false;
510
+ }
511
+
512
+
513
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * The keys on the keyboard.
3
+ */
4
+ export enum Key {
5
+ NONE = 0,
6
+ A = 1,
7
+ D = 2,
8
+ S = 3,
9
+ W = 4,
10
+ L = 5,
11
+ LEFTARROW = 6,
12
+ RIGHTARROW = 7,
13
+ UPARROW = 8,
14
+ DOWNARROW = 9,
15
+ NUMPAD0 = 10,
16
+ NUMPAD1 = 11,
17
+ NUMPAD2 = 12,
18
+ NUMPAD3 = 13,
19
+ NUMPAD4 = 14,
20
+ NUMPAD5 = 15,
21
+ NUMPAD6 = 16,
22
+ NUMPAD7 = 17,
23
+ NUMPAD8 = 18,
24
+ NUMPAD9 = 19,
25
+ SPACE = 20,
26
+ CONTROLLEFT = 21,
27
+ CONTROLRIGHT = 22,
28
+ SHIFTLEFT = 23,
29
+ SHIFTRIGHT = 24,
30
+ NUMPADSUBTRACT = 25,
31
+ NUMPADADD = 26,
32
+ MINUS = 27,
33
+ EQUAL = 28,
34
+ DELETE = 29
35
+ }