@ludicon/spark.js 0.0.1 → 0.0.2
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/LICENSE +31 -21
- package/README.md +3 -3
- package/dist/index.esm.js +3 -1
- package/dist/spark_astc_rgb-ylbf30mQ.js +0 -0
- package/dist/spark_astc_rgba-C4NuyfHw.js +0 -0
- package/dist/spark_bc1_rgb-CRQwJRCp.js +0 -0
- package/dist/spark_bc3_rgba-CyRcvC8t.js +0 -0
- package/dist/spark_bc4_r-BSB9VB_w.js +0 -0
- package/dist/spark_bc5_rg-NX_OBH9I.js +0 -0
- package/dist/spark_bc7_rgb-CYdL55pE.js +0 -0
- package/dist/spark_bc7_rgba-BFgOyqos.js +0 -0
- package/dist/spark_eac_r-BFwH430b.js +0 -0
- package/dist/spark_eac_rg--Gm5Gzmk.js +0 -0
- package/dist/spark_etc2_rgb-CWjBHhHQ.js +0 -0
- package/dist/spark_etc2_rgba-BRX5DwNI.js +0 -0
- package/dist/utils-BybjJ-PV.js +0 -0
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -1,21 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
|
|
2
|
+
This repository contains both open-source and proprietary components.
|
|
3
|
+
|
|
4
|
+
The use of the *Spark* shaders is covered under the spark.js EULA:
|
|
5
|
+
|
|
6
|
+
https://ludicon.com/sparkjs/eula.html
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
The JavaScript code is released under MIT license:
|
|
10
|
+
|
|
11
|
+
MIT License
|
|
12
|
+
|
|
13
|
+
Copyright (c) 2025 Ludicon LLC
|
|
14
|
+
|
|
15
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
16
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
17
|
+
in the Software without restriction, including without limitation the rights
|
|
18
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
19
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
20
|
+
furnished to do so, subject to the following conditions:
|
|
21
|
+
|
|
22
|
+
The above copyright notice and this permission notice shall be included in all
|
|
23
|
+
copies or substantial portions of the Software.
|
|
24
|
+
|
|
25
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
26
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
27
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
28
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
29
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
30
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
31
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# spark.js⚡️
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@ludicon/spark.js) [](https://www.npmjs.com/package/@ludicon/spark.js) [](https://developer.mozilla.org/en-US/docs/Web/API/WebGPU_API)
|
|
4
4
|
|
|
5
5
|
Real-time texture compression library for the Web.
|
|
6
6
|
|
|
@@ -72,7 +72,7 @@ And visit `https://localhost:5174/examples/basic.html`.
|
|
|
72
72
|
|
|
73
73
|
### `encodeTexture(source, options)`
|
|
74
74
|
|
|
75
|
-
Load an image and
|
|
75
|
+
Load an image and encode it to a compressed GPU texture.
|
|
76
76
|
|
|
77
77
|
#### Parameters
|
|
78
78
|
|
|
@@ -93,7 +93,7 @@ Load an image and transcode it to a compressed GPU texture.
|
|
|
93
93
|
Whether to encode the image using an as sRGB format. This also affects mipmap generation. The `srgb` mode can also be inferred from the `format`. Default: `false`.
|
|
94
94
|
|
|
95
95
|
- **`normal`** (`boolean`)
|
|
96
|
-
Whether to interpret the image as a normal map. This affects automatic format selection favoring the use of `"bc5"` and `"
|
|
96
|
+
Whether to interpret the image as a normal map. This affects automatic format selection favoring the use of `"bc5"` and `"eac-rg"` formats. Default: `false`.
|
|
97
97
|
|
|
98
98
|
- **`flipY`** (`boolean`)
|
|
99
99
|
Whether to vertically flip the image before encoding. Default: `false`.
|
package/dist/index.esm.js
CHANGED
|
@@ -810,7 +810,9 @@ class Spark {
|
|
|
810
810
|
await this.#loadUtilPipelines();
|
|
811
811
|
for (const format of this.#supportedFormats) {
|
|
812
812
|
if (!this.#pipelines[format]) {
|
|
813
|
-
|
|
813
|
+
this.#loadPipeline(format).catch((err) => {
|
|
814
|
+
console.error(`Failed to preload pipeline for format ${format}:`, err);
|
|
815
|
+
});
|
|
814
816
|
}
|
|
815
817
|
}
|
|
816
818
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/utils-BybjJ-PV.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ludicon/spark.js",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Real-Time GPU Texture Codecs for the Web",
|
|
5
5
|
"main": "dist/index.esm.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"spark"
|
|
48
48
|
],
|
|
49
49
|
"author": "Ignacio Castano <castano@ludicon.com> (https://ludicon.com/)",
|
|
50
|
-
"license": "
|
|
50
|
+
"license": "See LICENSE",
|
|
51
51
|
"repository": {
|
|
52
52
|
"type": "git",
|
|
53
53
|
"url": "git+https://github.com/ludicon/spark.js.git"
|