ris-framework 0.1.0-dev.6 → 0.1.0-dev.7
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.
- package/CHANGELOG.md +1 -0
- package/LICENSES/Apache-2.0.txt +202 -0
- package/README.md +28 -11
- package/THIRD_PARTY_NOTICES.md +27 -0
- package/dist/TextureFormat.d.ts +2 -0
- package/dist/TextureFormat.d.ts.map +1 -0
- package/dist/VertexFormat.d.ts +14 -0
- package/dist/VertexFormat.d.ts.map +1 -0
- package/dist/_ris-ktx2-node-module-stub-nzBRmiO_.js +10 -0
- package/dist/common/sampler-enums.d.ts +16 -0
- package/dist/common/sampler-enums.d.ts.map +1 -0
- package/dist/common/vertex-step-mode.d.ts +11 -0
- package/dist/common/vertex-step-mode.d.ts.map +1 -0
- package/dist/content/ShaderModuleContent.d.ts +14 -0
- package/dist/content/ShaderModuleContent.d.ts.map +1 -0
- package/dist/core/Framework.d.ts +79 -0
- package/dist/core/Framework.d.ts.map +1 -0
- package/dist/core/FrameworkConfig.d.ts +26 -0
- package/dist/core/FrameworkConfig.d.ts.map +1 -0
- package/dist/core/buffers/buffers-factory-interface.d.ts +2 -0
- package/dist/core/buffers/buffers-factory-interface.d.ts.map +1 -0
- package/dist/core/buffers/vertex-buffer-interface.d.ts +2 -0
- package/dist/core/buffers/vertex-buffer-interface.d.ts.map +1 -0
- package/dist/core/content/ContentManager.d.ts +26 -0
- package/dist/core/content/ContentManager.d.ts.map +1 -0
- package/dist/core/dependency-injection/register-services-interface.d.ts +13 -0
- package/dist/core/dependency-injection/register-services-interface.d.ts.map +1 -0
- package/dist/core/framework-interface.d.ts +2 -0
- package/dist/core/framework-interface.d.ts.map +1 -0
- package/dist/core/input/InputManager.d.ts +27 -0
- package/dist/core/input/InputManager.d.ts.map +1 -0
- package/dist/core/renderer/enums.d.ts +18 -0
- package/dist/core/renderer/enums.d.ts.map +1 -0
- package/dist/core/renderer/renderer-interface.d.ts +77 -0
- package/dist/core/renderer/renderer-interface.d.ts.map +1 -0
- package/dist/core/renderer/rendering-limits.d.ts +16 -0
- package/dist/core/renderer/rendering-limits.d.ts.map +1 -0
- package/dist/core/rendering/AGraphicsDevice.d.ts +69 -0
- package/dist/core/rendering/AGraphicsDevice.d.ts.map +1 -0
- package/dist/core/rendering/ARenderer.d.ts +75 -0
- package/dist/core/rendering/ARenderer.d.ts.map +1 -0
- package/dist/core/rendering/blending/blend-component-descriptor.d.ts +25 -0
- package/dist/core/rendering/blending/blend-component-descriptor.d.ts.map +1 -0
- package/dist/core/rendering/blending/blend-state-descriptor.d.ts +29 -0
- package/dist/core/rendering/blending/blend-state-descriptor.d.ts.map +1 -0
- package/dist/core/rendering/blending/enums.d.ts +40 -0
- package/dist/core/rendering/blending/enums.d.ts.map +1 -0
- package/dist/core/rendering/enums.d.ts +20 -0
- package/dist/core/rendering/enums.d.ts.map +1 -0
- package/dist/core/rendering/primitive/PrimitiveStateDescriptor.d.ts +26 -0
- package/dist/core/rendering/primitive/PrimitiveStateDescriptor.d.ts.map +1 -0
- package/dist/core/rendering/primitive/enums.d.ts +56 -0
- package/dist/core/rendering/primitive/enums.d.ts.map +1 -0
- package/dist/core/rendering/render-pass/render-pass-descriptor.d.ts +2 -0
- package/dist/core/rendering/render-pass/render-pass-descriptor.d.ts.map +1 -0
- package/dist/core/rendering/render-pass/render-pass-interface.d.ts +15 -0
- package/dist/core/rendering/render-pass/render-pass-interface.d.ts.map +1 -0
- package/dist/core/rendering/sampler/sampler-descriptor.d.ts +28 -0
- package/dist/core/rendering/sampler/sampler-descriptor.d.ts.map +1 -0
- package/dist/core/rendering/texture/texture.d.ts +69 -0
- package/dist/core/rendering/texture/texture.d.ts.map +1 -0
- package/dist/core/rendering/vertex-attribute.d.ts +17 -0
- package/dist/core/rendering/vertex-attribute.d.ts.map +1 -0
- package/dist/core/rendering/vertex-buffer-layout.d.ts +23 -0
- package/dist/core/rendering/vertex-buffer-layout.d.ts.map +1 -0
- package/dist/core/shader/shader-loader.d.ts +12 -0
- package/dist/core/shader/shader-loader.d.ts.map +1 -0
- package/dist/core/shader/shader-module-interface.d.ts +2 -0
- package/dist/core/shader/shader-module-interface.d.ts.map +1 -0
- package/dist/core/sprite-batch/SpriteBatch.d.ts +50 -0
- package/dist/core/sprite-batch/SpriteBatch.d.ts.map +1 -0
- package/dist/core/sprite-batch/SpriteBatchDrawable.d.ts +57 -0
- package/dist/core/sprite-batch/SpriteBatchDrawable.d.ts.map +1 -0
- package/dist/core/sprite-batch/SpriteBatchMesh.d.ts +32 -0
- package/dist/core/sprite-batch/SpriteBatchMesh.d.ts.map +1 -0
- package/dist/core/window/window-manager.d.ts +32 -0
- package/dist/core/window/window-manager.d.ts.map +1 -0
- package/dist/geometry/BaseGeometry.d.ts +41 -0
- package/dist/geometry/BaseGeometry.d.ts.map +1 -0
- package/dist/geometry/GeometryBuilder.d.ts +11 -0
- package/dist/geometry/GeometryBuilder.d.ts.map +1 -0
- package/dist/geometry/GeometryFormat.d.ts +34 -0
- package/dist/geometry/GeometryFormat.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4598 -0
- package/dist/libktx-Cjh8w7XG-DhnH9lxr.js +4 -0
- package/dist/webgl/WebGLGraphicsDeviceFeatures.d.ts +31 -0
- package/dist/webgl/WebGLGraphicsDeviceFeatures.d.ts.map +1 -0
- package/dist/webgl/WebGlGpuInfo.d.ts +25 -0
- package/dist/webgl/WebGlGpuInfo.d.ts.map +1 -0
- package/dist/webgl/WebGlGraphicsDevice.d.ts +45 -0
- package/dist/webgl/WebGlGraphicsDevice.d.ts.map +1 -0
- package/dist/webgl/WebGlRenderer.d.ts +18 -0
- package/dist/webgl/WebGlRenderer.d.ts.map +1 -0
- package/dist/webgl/blending/webgl-blend-state.d.ts +33 -0
- package/dist/webgl/blending/webgl-blend-state.d.ts.map +1 -0
- package/dist/webgl/buffers/WebGlBuffersFactory.d.ts +16 -0
- package/dist/webgl/buffers/WebGlBuffersFactory.d.ts.map +1 -0
- package/dist/webgl/buffers/WebGlUniformBuffer.d.ts +34 -0
- package/dist/webgl/buffers/WebGlUniformBuffer.d.ts.map +1 -0
- package/dist/webgl/buffers/WebGlVertexBuffer.d.ts +48 -0
- package/dist/webgl/buffers/WebGlVertexBuffer.d.ts.map +1 -0
- package/dist/webgl/buffers/webgl-index-buffer.d.ts +43 -0
- package/dist/webgl/buffers/webgl-index-buffer.d.ts.map +1 -0
- package/dist/webgl/cast/cast.d.ts +52 -0
- package/dist/webgl/cast/cast.d.ts.map +1 -0
- package/dist/webgl/primitive/WebGlPrimitiveState.d.ts +31 -0
- package/dist/webgl/primitive/WebGlPrimitiveState.d.ts.map +1 -0
- package/dist/webgl/render-pass/WebGlRenderPass.d.ts +34 -0
- package/dist/webgl/render-pass/WebGlRenderPass.d.ts.map +1 -0
- package/dist/webgl/render-pipelines/AWebGlRenderPipeline.d.ts +53 -0
- package/dist/webgl/render-pipelines/AWebGlRenderPipeline.d.ts.map +1 -0
- package/dist/webgl/render-pipelines/WebGlMainRenderTargetRenderPipeline.d.ts +28 -0
- package/dist/webgl/render-pipelines/WebGlMainRenderTargetRenderPipeline.d.ts.map +1 -0
- package/dist/webgl/render-pipelines/WebGlRenderPipelineFactory.d.ts +24 -0
- package/dist/webgl/render-pipelines/WebGlRenderPipelineFactory.d.ts.map +1 -0
- package/dist/webgl/render-pipelines/inspect/WebGlInspectTextureMipsRenderPipeline.d.ts +57 -0
- package/dist/webgl/render-pipelines/inspect/WebGlInspectTextureMipsRenderPipeline.d.ts.map +1 -0
- package/dist/webgl/render-pipelines/material/WebGlUnlitRenderPipeline.d.ts +57 -0
- package/dist/webgl/render-pipelines/material/WebGlUnlitRenderPipeline.d.ts.map +1 -0
- package/dist/webgl/render-pipelines/sprite/WebGlSpriteRenderPipeline.d.ts +40 -0
- package/dist/webgl/render-pipelines/sprite/WebGlSpriteRenderPipeline.d.ts.map +1 -0
- package/dist/webgl/rendering/webgl-vertex-attribute.d.ts +10 -0
- package/dist/webgl/rendering/webgl-vertex-attribute.d.ts.map +1 -0
- package/dist/webgl/rendering/webgl-vertex-buffer-layout.d.ts +27 -0
- package/dist/webgl/rendering/webgl-vertex-buffer-layout.d.ts.map +1 -0
- package/dist/webgl/sampler/webgl-sampler.d.ts +48 -0
- package/dist/webgl/sampler/webgl-sampler.d.ts.map +1 -0
- package/dist/webgl/shader/WebGlShaderModule.d.ts +34 -0
- package/dist/webgl/shader/WebGlShaderModule.d.ts.map +1 -0
- package/dist/webgl/shader/WebGlShaderModuleLoader.d.ts +19 -0
- package/dist/webgl/shader/WebGlShaderModuleLoader.d.ts.map +1 -0
- package/dist/webgl/swap-chain/WebGlSwapChain.d.ts +27 -0
- package/dist/webgl/swap-chain/WebGlSwapChain.d.ts.map +1 -0
- package/dist/webgl/texture/WebGlTexture2D.d.ts +37 -0
- package/dist/webgl/texture/WebGlTexture2D.d.ts.map +1 -0
- package/dist/webgl/texture/WebGlTextureFactory.d.ts +17 -0
- package/dist/webgl/texture/WebGlTextureFactory.d.ts.map +1 -0
- package/dist/webgl/utilities/WebGlBufferUtilities.d.ts +45 -0
- package/dist/webgl/utilities/WebGlBufferUtilities.d.ts.map +1 -0
- package/dist/webgl/utilities/WebGlConverter.d.ts +124 -0
- package/dist/webgl/utilities/WebGlConverter.d.ts.map +1 -0
- package/dist/webgl/utilities/WebGlFrameBufferUtilities.d.ts +54 -0
- package/dist/webgl/utilities/WebGlFrameBufferUtilities.d.ts.map +1 -0
- package/dist/webgl/utilities/WebGlSamplerUtilities.d.ts +23 -0
- package/dist/webgl/utilities/WebGlSamplerUtilities.d.ts.map +1 -0
- package/dist/webgl/utilities/WebGlShaderUtilities.d.ts +28 -0
- package/dist/webgl/utilities/WebGlShaderUtilities.d.ts.map +1 -0
- package/dist/webgl/utilities/WebGlTextureUtilities.d.ts +33 -0
- package/dist/webgl/utilities/WebGlTextureUtilities.d.ts.map +1 -0
- package/dist/webgl/utilities/WebGlUtilities.d.ts +60 -0
- package/dist/webgl/utilities/WebGlUtilities.d.ts.map +1 -0
- package/dist/webgl/utilities/spector-js-utilities.d.ts +9 -0
- package/dist/webgl/utilities/spector-js-utilities.d.ts.map +1 -0
- package/dist/webgl/utilities/webgl-blending-utilities.d.ts +17 -0
- package/dist/webgl/utilities/webgl-blending-utilities.d.ts.map +1 -0
- package/dist/webgl/utilities/webgl-culling-utilities.d.ts +13 -0
- package/dist/webgl/utilities/webgl-culling-utilities.d.ts.map +1 -0
- package/dist/webgl/utilities/webgl-filter-anisotropic-utilities.d.ts +24 -0
- package/dist/webgl/utilities/webgl-filter-anisotropic-utilities.d.ts.map +1 -0
- package/dist/webgl/utilities/webgl-program-utilities.d.ts +14 -0
- package/dist/webgl/utilities/webgl-program-utilities.d.ts.map +1 -0
- package/dist/webgl/utilities/webgl-render-buffer-utilities.d.ts +5 -0
- package/dist/webgl/utilities/webgl-render-buffer-utilities.d.ts.map +1 -0
- package/dist/webgl/utilities/webgl-renderbuffer-utilities.d.ts +17 -0
- package/dist/webgl/utilities/webgl-renderbuffer-utilities.d.ts.map +1 -0
- package/package.json +15 -9
- package/src/glsl-raw.d.ts +4 -0
- package/dist/assets/_ris-ktx2-node-module-stub-DwDS30PT.js +0 -1
- package/dist/assets/cat.jpg +0 -0
- package/dist/assets/index-BmeGit54.css +0 -1
- package/dist/assets/index-qyn4pzGw.js +0 -151
- package/dist/assets/libktx-Cjh8w7XG-Ci1Fm_MH.js +0 -1
- package/dist/assets/test.png +0 -0
- package/dist/index.html +0 -16
- package/dist/vite.svg +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,3 +3,4 @@
|
|
|
3
3
|
## 0.1.0
|
|
4
4
|
|
|
5
5
|
- Initial release setup. `development` publishes a prerelease on the npm `next` tag. `main` publishes this version on `latest`.
|
|
6
|
+
- The package entry is compiled JavaScript and declarations in `dist`. Consumers import `Framework`, `FrameworkConfig`, and `TextureSamplerFilteringPreset` from `ris-framework` without compiling this repository. Built-in shaders and the browser KTX2 loader are included in that JavaScript.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# ris-framework
|
|
2
2
|
|
|
3
|
-
`ris-framework` is a
|
|
3
|
+
`ris-framework` is a browser WebGL2 framework, published as an ES module. Version 0.1.0. An application imports the compiled package. This repository also contains a sample page that runs the framework.
|
|
4
4
|
|
|
5
|
-
Open `index.html`. The module script is `src/main.ts`. That file builds the page, constructs a `Framework`, and starts the frame loop. Shared interfaces and value types (`IFramework`, `Color`, `Rect`, `TextureDescriptor`, and the rest) come from the `ris-framework-api` package. This repository
|
|
5
|
+
Open `index.html`. The module script is `src/main.ts`. That file builds the page, constructs a `Framework`, and starts the frame loop. Shared interfaces and value types (`IFramework`, `Color`, `Rect`, `TextureDescriptor`, and the rest) come from the `ris-framework-api` package. This repository implements them.
|
|
6
6
|
|
|
7
7
|
## Layout
|
|
8
8
|
|
|
@@ -16,7 +16,7 @@ Open `index.html`. The module script is `src/main.ts`. That file builds the page
|
|
|
16
16
|
| `src/content` | Built-in shader modules. GLSL is imported from `shaders/glsl`. |
|
|
17
17
|
| `shaders/glsl` | Vertex and fragment shaders used by those built-in modules. |
|
|
18
18
|
|
|
19
|
-
Runtime dependencies are `ris-framework-api`, `ris-ktx2`, `gl-matrix`, `tsyringe`, and `reflect-metadata`. TypeScript and
|
|
19
|
+
Runtime dependencies are `ris-framework-api`, `ris-ktx2-api`, `gl-matrix`, `tsyringe`, and `reflect-metadata`. The library build also includes the browser portion of `ris-ktx2`, with its Node loader replaced by a stub, so the published entry does not import Node built-ins. TypeScript, Vite, and `ris-ktx2` are dev dependencies. Notices for the bundled KTX loader are in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
|
|
20
20
|
|
|
21
21
|
## Prerequisites
|
|
22
22
|
|
|
@@ -26,13 +26,27 @@ Runtime dependencies are `ris-framework-api`, `ris-ktx2`, `gl-matrix`, `tsyringe
|
|
|
26
26
|
|
|
27
27
|
## Install
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Install the package in an application:
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
npm install ris-framework
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The published entry is compiled JavaScript and TypeScript declarations (`dist/index.js` and `dist/index.d.ts`). Import the public surface by package name:
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
import { Framework, FrameworkConfig, TextureSamplerFilteringPreset } from "ris-framework";
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`Framework`, `FrameworkConfig`, and `TextureSamplerFilteringPreset` are that public surface. Built-in GLSL is compiled into `dist/index.js`, so a consumer does not load this repository's `shaders/` directory at runtime. The same file includes the browser KTX2 loader. A consuming Vite app can import the package and build without adding a Node stub of its own.
|
|
42
|
+
|
|
43
|
+
To work in this repository:
|
|
30
44
|
|
|
31
45
|
```sh
|
|
32
46
|
npm ci
|
|
33
47
|
```
|
|
34
48
|
|
|
35
|
-
|
|
49
|
+
Import `reflect-metadata` before constructing the framework. `src/main.ts` keeps that import first. `Framework` registers itself on a tsyringe child container, and tsyringe expects `reflect-metadata` to be loaded.
|
|
36
50
|
|
|
37
51
|
## Create a framework instance
|
|
38
52
|
|
|
@@ -54,9 +68,7 @@ No config field is required. Each field has a default.
|
|
|
54
68
|
```ts
|
|
55
69
|
import "reflect-metadata";
|
|
56
70
|
|
|
57
|
-
import { Framework } from "
|
|
58
|
-
import { FrameworkConfig } from "./core/FrameworkConfig.ts";
|
|
59
|
-
import { TextureSamplerFilteringPreset } from "./core/rendering/enums.ts";
|
|
71
|
+
import { Framework, FrameworkConfig, TextureSamplerFilteringPreset } from "ris-framework";
|
|
60
72
|
|
|
61
73
|
const config = new FrameworkConfig();
|
|
62
74
|
config.canvas = document.getElementById("game-canvas") as HTMLCanvasElement;
|
|
@@ -65,6 +77,8 @@ config.textureFiltering = TextureSamplerFilteringPreset.BILINEAR;
|
|
|
65
77
|
const framework = new Framework(config);
|
|
66
78
|
```
|
|
67
79
|
|
|
80
|
+
`src/main.ts` constructs the sample the same way, but it imports those three symbols from the source files under `src/` instead of from the package name.
|
|
81
|
+
|
|
68
82
|
`framework.renderingBackend` is `RenderingBackend.WEB_GL`. After `initialize()`, `framework.graphicsDevice` is the renderer's WebGL2 device.
|
|
69
83
|
|
|
70
84
|
## Run, build, and preview
|
|
@@ -73,19 +87,22 @@ const framework = new Framework(config);
|
|
|
73
87
|
npm run dev
|
|
74
88
|
```
|
|
75
89
|
|
|
76
|
-
`dev` runs Vite. The served page is `index.html`.
|
|
90
|
+
`dev` runs Vite. The served page is `index.html`. The sample imports the framework from `src/`.
|
|
77
91
|
|
|
78
92
|
```sh
|
|
79
93
|
npm run build
|
|
80
94
|
```
|
|
81
95
|
|
|
82
|
-
`build`
|
|
96
|
+
`build` typechecks `src`, then writes two outputs:
|
|
97
|
+
|
|
98
|
+
- The library, which is what `npm publish` ships. Vite compiles `src/index.ts` to `dist/index.js` and includes the built-in shader sources in that file. It also bundles `ris-ktx2` after replacing that package's Node loader with the browser stub from `vite.config.ts`. `gl-matrix`, `reflect-metadata`, `ris-framework-api`, `ris-ktx2-api`, and `tsyringe` stay as imports. `tsc` writes `dist/index.d.ts` and the declaration files it references. `package.json` `main`, `module`, `types`, and `exports` point at `dist`.
|
|
99
|
+
- The sample page. `vite build` writes it to `dist-app/`. The sample Vite config replaces `ris-ktx2`'s Node loader with a browser stub so that bundle does not import Node built-ins.
|
|
83
100
|
|
|
84
101
|
```sh
|
|
85
102
|
npm run preview
|
|
86
103
|
```
|
|
87
104
|
|
|
88
|
-
`preview` runs `vite preview` and serves the `dist/` build.
|
|
105
|
+
`preview` runs `vite preview` and serves the `dist-app/` build.
|
|
89
106
|
|
|
90
107
|
```sh
|
|
91
108
|
npm test
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
`ris-framework` is distributed under the MIT License (see `LICENSE`).
|
|
4
|
+
|
|
5
|
+
The published library bundles the browser build of [`ris-ktx2`](https://github.com/luka712/ris-ktx2-ts) so a consuming app does not import that package's Node loader. `ris-ktx2` is MIT licensed. Copyright (c) 2026 Luka Erkapic.
|
|
6
|
+
|
|
7
|
+
That browser build includes the Khronos libktx WebAssembly module (`libktx.js` and the wasm binary embedded in it), produced from [KTX-Software](https://github.com/KhronosGroup/KTX-Software). The Apache License 2.0 text is in `LICENSES/Apache-2.0.txt`.
|
|
8
|
+
|
|
9
|
+
## Khronos KTX-Software / libktx
|
|
10
|
+
|
|
11
|
+
Copyright 2010-2024 The Khronos Group Inc. and contributors.
|
|
12
|
+
|
|
13
|
+
SPDX-License-Identifier: Apache-2.0
|
|
14
|
+
|
|
15
|
+
https://github.com/KhronosGroup/KTX-Software
|
|
16
|
+
|
|
17
|
+
Upstream license overview (v4.3.2): https://github.com/KhronosGroup/KTX-Software/blob/v4.3.2/LICENSE.md
|
|
18
|
+
|
|
19
|
+
KTX-Software bundles other projects, including basis_universal. Those C/C++ sources are not redistributed as source here; they are compiled into the WebAssembly binary that `ris-ktx2` ships and this package bundles.
|
|
20
|
+
|
|
21
|
+
## Basis Universal
|
|
22
|
+
|
|
23
|
+
Copyright Binomial LLC.
|
|
24
|
+
|
|
25
|
+
SPDX-License-Identifier: Apache-2.0
|
|
26
|
+
|
|
27
|
+
https://github.com/BinomialLLC/basis_universal
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextureFormat.d.ts","sourceRoot":"","sources":["../src/TextureFormat.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The vertex format. Used to describe the format of a vertex attribute.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum VertexFormat {
|
|
5
|
+
FLOAT_32 = 0,
|
|
6
|
+
FLOAT_32X2 = 1,
|
|
7
|
+
FLOAT_32X3 = 2,
|
|
8
|
+
FLOAT_32X4 = 3,
|
|
9
|
+
/**
|
|
10
|
+
* The format of a 32-bit float with 16 components. Used for matrix attributes.
|
|
11
|
+
*/
|
|
12
|
+
FLOAT_32X16 = 4
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=VertexFormat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VertexFormat.d.ts","sourceRoot":"","sources":["../src/VertexFormat.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,YAAY;IACtB,QAAQ,IAAI;IAEZ,UAAU,IAAI;IAEd,UAAU,IAAI;IAEd,UAAU,IAAI;IAEd;;OAEG;IACH,WAAW,IAAI;CAChB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
function createKtxModuleNode() {
|
|
2
|
+
throw new Error("ris-ktx2 Node loader is not included in the browser build.");
|
|
3
|
+
}
|
|
4
|
+
function readFileBytes() {
|
|
5
|
+
throw new Error("ris-ktx2 Node file loader is not included in the browser build.");
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
createKtxModuleNode,
|
|
9
|
+
readFileBytes
|
|
10
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The compare function to use when sampling a texture. This is used for depth textures and determines how the sampled depth value is compared to the reference value.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum SamplerCompareFunction {
|
|
5
|
+
/**
|
|
6
|
+
* The sampled depth value is never less than the reference value.
|
|
7
|
+
* This means that the comparison will always fail, and the texture will not contribute to the final image.
|
|
8
|
+
*/
|
|
9
|
+
Never = 0,
|
|
10
|
+
/**
|
|
11
|
+
* The sampled depth value is less than the reference value.
|
|
12
|
+
* This means that the comparison will pass if the sampled depth value is less than the reference value, and the texture will contribute to the final image.
|
|
13
|
+
*/
|
|
14
|
+
LessEqual = 1
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=sampler-enums.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sampler-enums.d.ts","sourceRoot":"","sources":["../../src/common/sampler-enums.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,sBAAsB;IAE9B;;;OAGG;IACH,KAAK,IAAA;IAEL;;;OAGG;IACH,SAAS,IAAA;CAGZ"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum VertexStepMode {
|
|
2
|
+
/**
|
|
3
|
+
* The vertex buffer is stepped through once per vertex. This is the default step mode.
|
|
4
|
+
*/
|
|
5
|
+
Vertex = 0,
|
|
6
|
+
/**
|
|
7
|
+
* The vertex buffer is stepped through once per instance. This is used for instanced rendering.
|
|
8
|
+
*/
|
|
9
|
+
Instance = 1
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=vertex-step-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vertex-step-mode.d.ts","sourceRoot":"","sources":["../../src/common/vertex-step-mode.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IAEtB;;OAEG;IACH,MAAM,IAAI;IAEV;;OAEG;IACH,QAAQ,IAAI;CACf"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The api should look something like this for internal ones.
|
|
3
|
+
* export const ShaderContent = {
|
|
4
|
+
* "example_shader": {
|
|
5
|
+
* "shader": "{combined_shader}", // WebGPU
|
|
6
|
+
* "vertex": "{some_vertex_code}", // WebGL
|
|
7
|
+
* "fragment": "{some_fragment_code}", // WebGL
|
|
8
|
+
* "reflection": "{reflection_object}", // Both
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export declare const ShaderModuleContent: {
|
|
12
|
+
[id: string]: any;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=ShaderModuleContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShaderModuleContent.d.ts","sourceRoot":"","sources":["../../src/content/ShaderModuleContent.ts"],"names":[],"mappings":"AASA;;;;;;;;;GASG;AAGH,eAAO,MAAM,mBAAmB,EAAG;IAAC,CAAC,EAAE,EAAE,MAAM,GAAG,GAAG,CAAA;CAyBpD,CAAA"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { FrameworkConfig } from "./FrameworkConfig.js";
|
|
2
|
+
import { GameTime, type IBufferFactory, type IGeometryBuilder, type IGraphicsDevice, type IImageProcessor, type IInputManager, type IMeshFactory, type ISpriteBatch, type ITextureFactory, type ITimeManager, RenderingBackend } from "ris-framework-api";
|
|
3
|
+
import type { ICameraFactory, IContentManager, IFramework, IImageLoader, IRenderer, IWindowManager } from "ris-framework-api";
|
|
4
|
+
import type { IRenderPipelineFactory } from "ris-framework-api";
|
|
5
|
+
import { type IMaterialFactory } from "ris-framework-api";
|
|
6
|
+
import type { IKtx2Factory } from "ris-ktx2-api";
|
|
7
|
+
export declare class Framework implements IFramework {
|
|
8
|
+
private readonly _onLoadContentListeners;
|
|
9
|
+
private readonly _onInitializeListeners;
|
|
10
|
+
private readonly _onUpdateListeners;
|
|
11
|
+
private readonly _onRenderListeners;
|
|
12
|
+
private readonly _container;
|
|
13
|
+
private readonly _textureFactory;
|
|
14
|
+
private readonly _buffersFactory;
|
|
15
|
+
private readonly _contentManager;
|
|
16
|
+
private readonly _geometryBuilder;
|
|
17
|
+
private readonly _meshFactory;
|
|
18
|
+
/**
|
|
19
|
+
* The constructor for the Framework class.
|
|
20
|
+
* @param options The optional options for them framework.
|
|
21
|
+
*/
|
|
22
|
+
constructor(options?: FrameworkConfig | null);
|
|
23
|
+
/** @inheritDoc */
|
|
24
|
+
readonly imageLoader: IImageLoader;
|
|
25
|
+
renderingBackend: RenderingBackend;
|
|
26
|
+
/** @inheritDoc */
|
|
27
|
+
readonly imageProcessor: IImageProcessor;
|
|
28
|
+
/** @inheritDoc */
|
|
29
|
+
readonly renderer: IRenderer;
|
|
30
|
+
/** @inheritDoc */
|
|
31
|
+
readonly spriteBatch: ISpriteBatch;
|
|
32
|
+
/** @inheritDoc */
|
|
33
|
+
cameraFactory: ICameraFactory;
|
|
34
|
+
/** @inheritDoc */
|
|
35
|
+
ktx2Factory?: IKtx2Factory;
|
|
36
|
+
/** @inheritDoc */
|
|
37
|
+
addOnInitializedListener(event: () => void): void;
|
|
38
|
+
/** @inheritDoc */
|
|
39
|
+
removeOnInitializedListener(event: () => void): void;
|
|
40
|
+
/** @inheritdoc */
|
|
41
|
+
addOnLoadContentListener(event: () => void): void;
|
|
42
|
+
/** @inheritdoc */
|
|
43
|
+
removeOnLoadContentListener(event: () => void): void;
|
|
44
|
+
/** @inheritdoc */
|
|
45
|
+
addOnUpdateListener(event: (gameTime: GameTime) => void): void;
|
|
46
|
+
/** @inheritdoc */
|
|
47
|
+
removeOnUpdateListener(event: (gameTime: GameTime) => void): void;
|
|
48
|
+
/** @inheritdoc */
|
|
49
|
+
addOnRenderListener(event: () => void): void;
|
|
50
|
+
/** @inheritdoc */
|
|
51
|
+
removeOnRenderListener(event: () => void): void;
|
|
52
|
+
/** @inheritdoc */
|
|
53
|
+
get graphicsDevice(): IGraphicsDevice;
|
|
54
|
+
/** @inheritdoc */
|
|
55
|
+
renderPipelineFactory: IRenderPipelineFactory;
|
|
56
|
+
/** @inheritdoc */
|
|
57
|
+
get geometryBuilder(): IGeometryBuilder;
|
|
58
|
+
/** @inheritdoc */
|
|
59
|
+
readonly windowManager: IWindowManager;
|
|
60
|
+
/** @inheritdoc */
|
|
61
|
+
get textureFactory(): ITextureFactory;
|
|
62
|
+
/** @inheritdoc */
|
|
63
|
+
get bufferFactory(): IBufferFactory;
|
|
64
|
+
/** @inheritdoc */
|
|
65
|
+
get content(): IContentManager;
|
|
66
|
+
/** @inheritdoc */
|
|
67
|
+
get meshFactory(): IMeshFactory;
|
|
68
|
+
/** @inheritDoc */
|
|
69
|
+
readonly materialFactory: IMaterialFactory;
|
|
70
|
+
/** @inheritDoc */
|
|
71
|
+
readonly timeManager: ITimeManager;
|
|
72
|
+
/** @inheritDoc */
|
|
73
|
+
readonly input: IInputManager;
|
|
74
|
+
/** @inheritdoc */
|
|
75
|
+
initialize(): void;
|
|
76
|
+
/** @inheritDoc */
|
|
77
|
+
dispose(): void;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=Framework.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Framework.d.ts","sourceRoot":"","sources":["../../src/core/Framework.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { TextureSamplerFilteringPreset } from "./rendering/enums.js";
|
|
2
|
+
import { vec2 } from "gl-matrix";
|
|
3
|
+
import { IFrameworkConfig } from "ris-framework-api";
|
|
4
|
+
/**
|
|
5
|
+
* The options for configuring the Framework.
|
|
6
|
+
*/
|
|
7
|
+
export declare class FrameworkConfig implements IFrameworkConfig {
|
|
8
|
+
constructor();
|
|
9
|
+
/** @inheritDoc */
|
|
10
|
+
useKtx2: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* The HTMLCanvasElement to use for rendering.
|
|
13
|
+
* If null, a new canvas will be created and added to the document body.
|
|
14
|
+
*/
|
|
15
|
+
canvas: HTMLCanvasElement | null;
|
|
16
|
+
/**
|
|
17
|
+
* The size of a back buffer.
|
|
18
|
+
*/
|
|
19
|
+
backBufferSize: vec2;
|
|
20
|
+
/**
|
|
21
|
+
* The texture filtering preset to use for textures created by the framework.
|
|
22
|
+
* By default, it is set to BILINEAR, which provides a good balance between performance and quality.
|
|
23
|
+
*/
|
|
24
|
+
textureFiltering?: TextureSamplerFilteringPreset | undefined;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=FrameworkConfig.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FrameworkConfig.d.ts","sourceRoot":"","sources":["../../src/core/FrameworkConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAC,IAAI,EAAC,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAEnD;;GAEG;AACH,qBAAa,eAAiB,YAAW,gBAAgB;;IAIrD,kBAAkB;IAClB,OAAO,UAAS;IAEhB;;;OAGG;IACH,MAAM,EAAE,iBAAiB,GAAC,IAAI,CAAQ;IAEtC;;OAEG;IACH,cAAc,EAAE,IAAI,CAA4B;IAEhD;;;OAGG;IACH,gBAAgB,CAAC,4CAA0C;CAC9D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buffers-factory-interface.d.ts","sourceRoot":"","sources":["../../../src/core/buffers/buffers-factory-interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vertex-buffer-interface.d.ts","sourceRoot":"","sources":["../../../src/core/buffers/vertex-buffer-interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type IShaderModule, type IContentManager, type IShaderModuleLoader, type ITexture2D, type IFramework, TextureDescriptor, ContentConfig } from "ris-framework-api";
|
|
2
|
+
import type { IKtx2Texture } from "ris-ktx2-api";
|
|
3
|
+
/**
|
|
4
|
+
* The content manager.
|
|
5
|
+
* The content manager is responsible for managing the content modules and loading the content with the given asset file path or identifier.
|
|
6
|
+
*/
|
|
7
|
+
export declare class ContentManager implements IContentManager {
|
|
8
|
+
private readonly _framework;
|
|
9
|
+
readonly shaderModuleLoader: IShaderModuleLoader;
|
|
10
|
+
private readonly _ktx2Factory;
|
|
11
|
+
private readonly _ktx2TextureCache;
|
|
12
|
+
/**
|
|
13
|
+
* The constructor.
|
|
14
|
+
* @param shaderModuleLoader The shader module loader.
|
|
15
|
+
*/
|
|
16
|
+
constructor(_framework: IFramework, shaderModuleLoader: IShaderModuleLoader);
|
|
17
|
+
/** @inheritDoc */
|
|
18
|
+
loadKtx2Async(path: string, contentConfig?: ContentConfig): Promise<IKtx2Texture>;
|
|
19
|
+
/** @inheritDoc */
|
|
20
|
+
loadShaderModule(shaderModuleId: string): IShaderModule;
|
|
21
|
+
/** @inheritDoc */
|
|
22
|
+
loadTexture2DAsync(path: string, textureDescriptor?: TextureDescriptor, contentConfig?: ContentConfig): Promise<ITexture2D>;
|
|
23
|
+
/** @inheritDoc */
|
|
24
|
+
loadTexture2DFromPixels(width: number, height: number, pixels: ArrayBuffer): ITexture2D;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=ContentManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentManager.d.ts","sourceRoot":"","sources":["../../../src/core/content/ContentManager.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,UAAU,EACf,KAAK,UAAU,EAAE,iBAAiB,EAAiB,aAAa,EACnE,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,cAAc,CAAC;AAG/C;;;GAGG;AACH,qBAAa,cAAe,YAAW,eAAe;IAS/B,OAAO,CAAC,QAAQ,CAAC,UAAU;aAA8B,kBAAkB,EAAE,mBAAmB;IAPnH,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAqB;IAClD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAqC;IAEvE;;;OAGG;gBACiC,UAAU,EAAE,UAAU,EAAkB,kBAAkB,EAAE,mBAAmB;IAGnH,kBAAkB;IACL,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;IAc9F,kBAAkB;IACX,gBAAgB,CAAC,cAAc,EAAE,MAAM,GAAG,aAAa;IAI9D,kBAAkB;IACL,kBAAkB,CAAC,IAAI,EAAE,MAAM,EACZ,iBAAiB,CAAC,EAAE,iBAAiB,EACrC,aAAa,CAAC,EAAE,aAAa,GAC1B,OAAO,CAAC,UAAU,CAAC;IA4BtD,kBAAkB;IACX,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,UAAU;CAKjG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DependencyContainer } from "tsyringe";
|
|
2
|
+
export declare const IFrameworkSymbol: unique symbol;
|
|
3
|
+
/**
|
|
4
|
+
* The interface for registering services to the dependency injection container.
|
|
5
|
+
*/
|
|
6
|
+
export interface IRegisterServices {
|
|
7
|
+
/**
|
|
8
|
+
* Register all services to the dependency injection container in this method.
|
|
9
|
+
* @param container The dependency injection container to register services to.
|
|
10
|
+
*/
|
|
11
|
+
register(container: DependencyContainer): void;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=register-services-interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"register-services-interface.d.ts","sourceRoot":"","sources":["../../../src/core/dependency-injection/register-services-interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,eAAO,MAAM,gBAAgB,eAA2B,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAE9B;;;OAGG;IACH,QAAQ,CAAC,SAAS,EAAE,mBAAmB,GAAG,IAAI,CAAC;CAClD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"framework-interface.d.ts","sourceRoot":"","sources":["../../src/core/framework-interface.ts"],"names":[],"mappings":""}
|