create-three-blocks-starter 0.4.3 → 0.5.0-alpha.333.gf29db3a0524e
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 +13 -0
- package/dist/artifacts.d.ts +2 -0
- package/dist/artifacts.js +16 -0
- package/dist/compose.js +6 -1
- package/dist/constants.js +1 -1
- package/dist/generate.js +1 -1
- package/package.json +5 -1
- package/template-assets/environment/public/hdr/ninomaru_teien_2k.ktx2 +0 -0
- package/template-assets/shaders/scene/meta.json +72 -72
- package/template-assets/shaders/scene/scene.webgl.ts +712 -87
- package/template-assets/shaders/scene/scene.webgpu.ts +404 -64
- package/template-assets/shaders/scene/timing.json +26 -26
- package/template-assets/shaders/text/meta.json +72 -72
- package/template-assets/shaders/text/text.webgl.ts +2469 -334
- package/template-assets/shaders/text/text.webgpu.ts +1841 -348
- package/template-assets/shaders/text/timing.json +26 -26
- package/template-assets/text/public/fonts/geist.msdf.json +1 -1
- package/template-assets/text/public/fonts/geist.msdf.meta.json +1 -1
- package/template-assets/text/public/fonts/geist.w700.msdf.json +1 -0
- package/template-assets/text/public/fonts/geist.w700.msdf.ktx2 +0 -0
- package/template-assets/text/public/fonts/geist.woff2 +0 -0
- package/template-assets/text/public/fonts/noto-jp.msdf.json +1 -1
- package/template-assets/text/public/fonts/noto-jp.msdf.meta.json +1 -1
- package/templates/core/src/assets.ts +13 -1
- package/templates/core/src/look.ts +3 -0
- package/templates/core/src/main.ts +11 -2
- package/templates/core/src/render.worker.ts +50 -7
- package/templates/core/src/style.css +3 -1
- package/templates/text/index.html +32 -4
- package/templates/text/src/scene.ts +4 -0
- package/templates/text/three-blocks.text.ts +46 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# create-three-blocks-starter
|
|
2
2
|
|
|
3
|
+
## 0.5.0-alpha.333.gf29db3a0524e
|
|
4
|
+
|
|
5
|
+
- Packages: This alpha contains no user-facing changes.
|
|
6
|
+
|
|
7
|
+
- Packages: Built from `f29db3a0524e`.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## 0.5.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- 8e830ad: Packages: Text starters and examples now ripple softly under mouse and touch movement.
|
|
15
|
+
|
|
3
16
|
## 0.4.3
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/artifacts.d.ts
CHANGED
|
@@ -60,4 +60,6 @@ export declare function shaderArtifactState(template: TemplateName): Pick<Loaded
|
|
|
60
60
|
export declare function validateShaderArtifactProject(template: TemplateName, files: ReadonlyMap<string, GeneratedFile>, versions: Pick<CompatibilityVersions, "three" | "threeBlocks">): void;
|
|
61
61
|
export declare function textArtifactFiles(): readonly GeneratedFile[];
|
|
62
62
|
export declare const textArtifactPaths: readonly string[];
|
|
63
|
+
export declare function environmentArtifactFiles(): readonly GeneratedFile[];
|
|
64
|
+
export declare const environmentArtifactPaths: readonly string[];
|
|
63
65
|
export {};
|
package/dist/artifacts.js
CHANGED
|
@@ -10,6 +10,8 @@ const TEXT_FILES = [
|
|
|
10
10
|
"public/fonts/geist.msdf.json",
|
|
11
11
|
"public/fonts/geist.msdf.ktx2",
|
|
12
12
|
"public/fonts/geist.msdf.meta.json",
|
|
13
|
+
"public/fonts/geist.w700.msdf.json",
|
|
14
|
+
"public/fonts/geist.w700.msdf.ktx2",
|
|
13
15
|
"public/fonts/noto-jp.woff2",
|
|
14
16
|
"public/fonts/noto-jp.msdf.json",
|
|
15
17
|
"public/fonts/noto-jp.msdf.ktx2",
|
|
@@ -555,3 +557,17 @@ export function textArtifactFiles() {
|
|
|
555
557
|
return TEXT_FILES.map(textPayload);
|
|
556
558
|
}
|
|
557
559
|
export const textArtifactPaths = TEXT_FILES;
|
|
560
|
+
// Every template ships the GPU-compressed UASTC HDR environment its core
|
|
561
|
+
// render worker prefilters at boot.
|
|
562
|
+
const ENVIRONMENT_FILES = ["public/hdr/ninomaru_teien_2k.ktx2"];
|
|
563
|
+
function environmentPayload(relativePath) {
|
|
564
|
+
return {
|
|
565
|
+
path: relativePath,
|
|
566
|
+
content: readFileSync(new URL(`../template-assets/environment/${relativePath}`, import.meta.url)),
|
|
567
|
+
owner: "generator",
|
|
568
|
+
};
|
|
569
|
+
}
|
|
570
|
+
export function environmentArtifactFiles() {
|
|
571
|
+
return ENVIRONMENT_FILES.map(environmentPayload);
|
|
572
|
+
}
|
|
573
|
+
export const environmentArtifactPaths = ENVIRONMENT_FILES;
|
package/dist/compose.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import { shaderArtifactFiles, shaderArtifactPaths, textArtifactFiles, validateShaderArtifactProject, } from "./artifacts.js";
|
|
2
|
+
import { environmentArtifactFiles, shaderArtifactFiles, shaderArtifactPaths, textArtifactFiles, validateShaderArtifactProject, } from "./artifacts.js";
|
|
3
3
|
import { catalog as defaultCatalog, resolveTemplateName } from "./catalog.js";
|
|
4
4
|
import { GENERATOR_NAME, GENERATOR_VERSION, RESULT_PROTOCOL_VERSION, } from "./constants.js";
|
|
5
5
|
import { layers as defaultLayers } from "./layers.js";
|
|
@@ -323,6 +323,11 @@ export function resolveProject(templateInput, projectName, options = {}) {
|
|
|
323
323
|
shader: artifacts.shader,
|
|
324
324
|
...(artifacts.text === undefined ? {} : { text: artifacts.text }),
|
|
325
325
|
};
|
|
326
|
+
for (const artifactFile of environmentArtifactFiles()) {
|
|
327
|
+
if (files.has(artifactFile.path))
|
|
328
|
+
throw new Error(`Environment artifact collides with generated path "${artifactFile.path}".`);
|
|
329
|
+
files.set(artifactFile.path, artifactFile);
|
|
330
|
+
}
|
|
326
331
|
if (template === "text") {
|
|
327
332
|
for (const artifactFile of textArtifactFiles()) {
|
|
328
333
|
if (files.has(artifactFile.path))
|
package/dist/constants.js
CHANGED
|
@@ -9,7 +9,7 @@ export const GENERATOR_VERSION = (() => {
|
|
|
9
9
|
export const RESULT_PROTOCOL_VERSION = 1;
|
|
10
10
|
export const COMPATIBILITY_VERSIONS = Object.freeze({
|
|
11
11
|
three: '0.185.1',
|
|
12
|
-
threeBlocks: '0.
|
|
12
|
+
threeBlocks: '0.7.0-alpha.333.gf29db3a0524e',
|
|
13
13
|
lenis: '1.3.25',
|
|
14
14
|
statsGl: '4.2.3',
|
|
15
15
|
});
|
package/dist/generate.js
CHANGED
|
@@ -148,7 +148,7 @@ async function writeResultFile(resultFile, result) {
|
|
|
148
148
|
throw error;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
const DEVTOOLS_SPECIFIER = '@three-blocks/devtools
|
|
151
|
+
const DEVTOOLS_SPECIFIER = '@three-blocks/devtools@6.0.0-alpha.333.gf29db3a0524e';
|
|
152
152
|
/**
|
|
153
153
|
* Best-effort devDependency: a project-local `@three-blocks/devtools` makes
|
|
154
154
|
* `three-blocks status`, shader capture, and browser smoke instant, offline,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-three-blocks-starter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0-alpha.333.gf29db3a0524e",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Create a typed, worker-first Three Blocks project",
|
|
@@ -61,5 +61,9 @@
|
|
|
61
61
|
"typescript": "^5.9.3",
|
|
62
62
|
"typescript-eslint": "^8.62.1",
|
|
63
63
|
"vitest": "^4.1.8"
|
|
64
|
+
},
|
|
65
|
+
"threeBlocks": {
|
|
66
|
+
"channel": "alpha",
|
|
67
|
+
"site": "https://preprod.threejs-blocks.com"
|
|
64
68
|
}
|
|
65
69
|
}
|
|
Binary file
|
|
@@ -1,74 +1,74 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
2
|
+
"runtime": {
|
|
3
|
+
"capture": {
|
|
4
|
+
"adapter": "WebGPU adapter",
|
|
5
|
+
"features": [],
|
|
6
|
+
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/149.0.7827.55 Safari/537.36"
|
|
7
|
+
},
|
|
8
|
+
"three": "0.185.1",
|
|
9
|
+
"threeBlocks": "0.7.0-alpha.333.gf29db3a0524e",
|
|
10
|
+
"threeBlocksShaderClosure": "64e2e021698f0bbb6e72c59c6112fa003450b50938cd226626eaaae0886dcb00"
|
|
11
|
+
},
|
|
12
|
+
"scenes": {
|
|
13
|
+
"scene": {
|
|
14
|
+
"artifact": "scene.webgpu.ts",
|
|
15
|
+
"artifactHash": "f23adc42cc9585997a913765e19b7ca0c92e55c6f207efcbafa5740208fe1cca",
|
|
16
|
+
"asset": "three-blocks/shaders/scene.webgpu.json",
|
|
17
|
+
"assetHash": "dac16b5d9e75d1317dac0b243fcc09567f6207aaba4a5b1a480e2b08d295a9f1",
|
|
18
|
+
"backend": "webgpu",
|
|
19
|
+
"bytes": 118489,
|
|
20
|
+
"coverage": {
|
|
21
|
+
"compute": 0,
|
|
22
|
+
"fragment": 9,
|
|
23
|
+
"render": 9,
|
|
24
|
+
"vertex": 9
|
|
25
|
+
},
|
|
26
|
+
"inputs": {
|
|
27
|
+
"src/assets.ts": "39b22a5e9886528d5d55887d76dcdd4a7a9adf73a61e8f5f45ebd85ced972c31",
|
|
28
|
+
"src/look.ts": "dad983fda6e797748ecdbf6bb1c83f0ae0064923f63ebaeaba15fab341934ff1",
|
|
29
|
+
"src/scene.ts": "f5ea470cb0a169221e1fd57bf9623c1c211abb32da5cb7d98bf25740794ada4b"
|
|
30
|
+
},
|
|
31
|
+
"skipped": {
|
|
32
|
+
"compute": 0,
|
|
33
|
+
"render": 0
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"scene.webgl": {
|
|
37
|
+
"artifact": "scene.webgl.ts",
|
|
38
|
+
"artifactHash": "424486b592f07db36e0605e0885803fbf110514350b097de09f4cd2f0b451ec2",
|
|
39
|
+
"asset": "three-blocks/shaders/scene.webgl.json",
|
|
40
|
+
"assetHash": "3b28d9d796e74d46cfec9d1af1f4129bef01442419b048354771a2c4823ddbc1",
|
|
41
|
+
"backend": "webgl",
|
|
42
|
+
"bytes": 157828,
|
|
43
|
+
"coverage": {
|
|
44
|
+
"compute": 0,
|
|
45
|
+
"fragment": 9,
|
|
46
|
+
"render": 9,
|
|
47
|
+
"vertex": 9
|
|
48
|
+
},
|
|
49
|
+
"inputs": {
|
|
50
|
+
"src/assets.ts": "39b22a5e9886528d5d55887d76dcdd4a7a9adf73a61e8f5f45ebd85ced972c31",
|
|
51
|
+
"src/look.ts": "dad983fda6e797748ecdbf6bb1c83f0ae0064923f63ebaeaba15fab341934ff1",
|
|
52
|
+
"src/scene.ts": "f5ea470cb0a169221e1fd57bf9623c1c211abb32da5cb7d98bf25740794ada4b"
|
|
53
|
+
},
|
|
54
|
+
"skipped": {
|
|
55
|
+
"compute": 0,
|
|
56
|
+
"render": 0
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"schemaVersion": 2,
|
|
61
|
+
"tool": {
|
|
62
|
+
"address": 2,
|
|
63
|
+
"compatibilities": {
|
|
64
|
+
"webgl": "three-webgl-r185-v1",
|
|
65
|
+
"webgpu": "three-webgpu-r185-v1"
|
|
66
|
+
},
|
|
67
|
+
"compatibility": "three-webgpu-r185-v1",
|
|
68
|
+
"hydration": 2,
|
|
69
|
+
"name": "@three-blocks/devtools",
|
|
70
|
+
"recipe": 1,
|
|
71
|
+
"transform": 62,
|
|
72
|
+
"version": "6.0.0-alpha.333.gf29db3a0524e"
|
|
73
|
+
}
|
|
74
74
|
}
|