lecodes-cli 0.20.1 → 0.20.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/dist/index.js +4 -4
- package/package.json +7 -7
- package/runtime/materials/particles-quad.mat +17 -9
- package/runtime/materials/particles.mat +17 -9
- package/runtime/web/assets/{createViewerLite-C_bkKXLg.js → createViewerLite-Ct_PZdof.js} +9 -9
- package/runtime/web/assets/{index-BTB5KV9x.js → index-BMt7AnC5.js} +1 -1
- package/runtime/web/embed.js +2 -2
package/dist/index.js
CHANGED
|
@@ -52,7 +52,7 @@ var package_default;
|
|
|
52
52
|
var init_package = __esm(() => {
|
|
53
53
|
package_default = {
|
|
54
54
|
name: "lecodes-cli",
|
|
55
|
-
version: "0.20.
|
|
55
|
+
version: "0.20.2",
|
|
56
56
|
dependencies: {
|
|
57
57
|
"@letary/chisel": "^0.10.0",
|
|
58
58
|
jimp: "^1.6.1",
|
|
@@ -69,7 +69,7 @@ var init_package = __esm(() => {
|
|
|
69
69
|
},
|
|
70
70
|
peerDependencies: {
|
|
71
71
|
"lecodes-design": "^0.9.0",
|
|
72
|
-
"lecodes-renderer": "^0.20.
|
|
72
|
+
"lecodes-renderer": "^0.20.2",
|
|
73
73
|
"lecodes-3d-editor": "^0.7.0",
|
|
74
74
|
"lecodes-assets": "^0.2.1"
|
|
75
75
|
},
|
|
@@ -214446,7 +214446,7 @@ var init_browserAuth = __esm(() => {
|
|
|
214446
214446
|
init_util();
|
|
214447
214447
|
});
|
|
214448
214448
|
|
|
214449
|
-
// ../../node_modules/.bun/lecodes-design@0.9.0+
|
|
214449
|
+
// ../../node_modules/.bun/lecodes-design@0.9.0+02a965cc85c9e554/node_modules/lecodes-design/src/core/concept.ts
|
|
214450
214450
|
var SPEC_TEMPLATE = `# Concept
|
|
214451
214451
|
|
|
214452
214452
|
The narrative half of this design. \`meta.json\` + the canvas hold the *visual/flow* half (screens,
|
|
@@ -214482,7 +214482,7 @@ Behaviour that isn't visible in a single screen — validation, permissions, not
|
|
|
214482
214482
|
cases — and the decisions you've made and why, so they aren't re-litigated later.
|
|
214483
214483
|
`;
|
|
214484
214484
|
|
|
214485
|
-
// ../../node_modules/.bun/lecodes-design@0.9.0+
|
|
214485
|
+
// ../../node_modules/.bun/lecodes-design@0.9.0+02a965cc85c9e554/node_modules/lecodes-design/src/templates.ts
|
|
214486
214486
|
var SPEC_MD, META_JSON = `{
|
|
214487
214487
|
"screens": {
|
|
214488
214488
|
"home": { "pos": [0, 0], "desc": "Example screen — replace me", "role": "list" }
|
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lecodes-cli",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.2",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@letary/chisel": "^0.10.0",
|
|
6
6
|
"jimp": "^1.6.1",
|
|
7
|
-
"lecodes-sdk": "
|
|
7
|
+
"lecodes-sdk": "0.20.2"
|
|
8
8
|
},
|
|
9
9
|
"devDependencies": {
|
|
10
10
|
"lecodes-design": "^0.9.0",
|
|
11
|
-
"lecodes-renderer": "
|
|
11
|
+
"lecodes-renderer": "0.20.2",
|
|
12
12
|
"qrcode-terminal": "^0.12.0",
|
|
13
13
|
"lecodes-3d-editor": "^0.7.0",
|
|
14
|
-
"lecodes-assets": "
|
|
15
|
-
"lecodes-creator-nav": "
|
|
16
|
-
"lecodes-viewer-lite": "
|
|
14
|
+
"lecodes-assets": "0.2.1",
|
|
15
|
+
"lecodes-creator-nav": "0.19.0",
|
|
16
|
+
"lecodes-viewer-lite": "0.20.2"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"lecodes-design": "^0.9.0",
|
|
20
|
-
"lecodes-renderer": "^0.20.
|
|
20
|
+
"lecodes-renderer": "^0.20.2",
|
|
21
21
|
"lecodes-3d-editor": "^0.7.0",
|
|
22
22
|
"lecodes-assets": "^0.2.1"
|
|
23
23
|
},
|
|
@@ -146,10 +146,16 @@ fragment {
|
|
|
146
146
|
|
|
147
147
|
// Soft particles (depthFade > 0, metres): fade the sprite out where it cuts into the scene
|
|
148
148
|
// geometry behind it. sampler0_structure is Filament's depth ("structure") buffer — bound
|
|
149
|
-
// to the colour pass by patch 0017 while creator-gl sees a drawn system with depthFade > 0
|
|
150
|
-
//
|
|
151
|
-
//
|
|
152
|
-
//
|
|
149
|
+
// to the colour pass by patch 0017 while creator-gl sees a drawn system with depthFade > 0.
|
|
150
|
+
// With the structure pass OFF (setDepthEffects(false) = the LOW graphics tier, or a scene
|
|
151
|
+
// nothing asked it for) filament binds a 1x1 dummy that reads 1.0 — in reversed-Z that is
|
|
152
|
+
// the NEAR plane, i.e. "the scene is in front of every sprite", so the fade would take the
|
|
153
|
+
// whole system to alpha 0 and it would VANISH instead of turning hard. Real geometry never
|
|
154
|
+
// reaches 1.0 (the buffer clears to 0 = far, and the near plane is clipped away), so
|
|
155
|
+
// `sceneDepth < 1.0` is the "this depth buffer is real" test.
|
|
156
|
+
// The fragment is reprojected to render-target uv the way Filament's own SSR does
|
|
157
|
+
// (surface_light_indirect.fs), and both depths are linearized with the SSR linearizeDepth
|
|
158
|
+
// formula (reversed-Z, far at infinity).
|
|
153
159
|
// (not in the depth/shadow/picking variants: their per-view layout has no structure sampler)
|
|
154
160
|
#if !defined(VARIANT_DEPTH)
|
|
155
161
|
if (materialParams.depthFade > 0.0) {
|
|
@@ -157,11 +163,13 @@ fragment {
|
|
|
157
163
|
highp vec4 clip = getClipFromWorldMatrix() * vec4(wp, 1.0);
|
|
158
164
|
highp vec2 suv = clip.xy * (0.5 / clip.w) + 0.5;
|
|
159
165
|
highp float sceneDepth = textureLod(sampler0_structure, uvToRenderTargetUV(suv), 0.0).r;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
166
|
+
if (sceneDepth < 1.0) {
|
|
167
|
+
highp mat4 p = getViewFromClipMatrix();
|
|
168
|
+
highp float sceneZ = (sceneDepth * p[2].z + p[3].z) / max(sceneDepth * p[2].w + p[3].w, 1.0 / 16777216.0);
|
|
169
|
+
highp float fragZ = (getViewFromWorldMatrix() * vec4(wp, 1.0)).z;
|
|
170
|
+
// both are view-space z (negative ahead): fragZ - sceneZ = how far the scene is behind
|
|
171
|
+
alpha *= saturate((fragZ - sceneZ) / materialParams.depthFade);
|
|
172
|
+
}
|
|
165
173
|
}
|
|
166
174
|
#endif
|
|
167
175
|
float3 rgb = tex.rgb * tint.rgb * (1.0 + materialParams.emissive) + em * materialParams.emissiveColor;
|
|
@@ -96,10 +96,16 @@ fragment {
|
|
|
96
96
|
|
|
97
97
|
// Soft particles (depthFade > 0, metres): fade the sprite out where it cuts into the scene
|
|
98
98
|
// geometry behind it. sampler0_structure is Filament's depth ("structure") buffer — bound
|
|
99
|
-
// to the colour pass by patch 0017 while creator-gl sees a drawn system with depthFade > 0
|
|
100
|
-
//
|
|
101
|
-
//
|
|
102
|
-
//
|
|
99
|
+
// to the colour pass by patch 0017 while creator-gl sees a drawn system with depthFade > 0.
|
|
100
|
+
// With the structure pass OFF (setDepthEffects(false) = the LOW graphics tier, or a scene
|
|
101
|
+
// nothing asked it for) filament binds a 1x1 dummy that reads 1.0 — in reversed-Z that is
|
|
102
|
+
// the NEAR plane, i.e. "the scene is in front of every sprite", so the fade would take the
|
|
103
|
+
// whole system to alpha 0 and it would VANISH instead of turning hard. Real geometry never
|
|
104
|
+
// reaches 1.0 (the buffer clears to 0 = far, and the near plane is clipped away), so
|
|
105
|
+
// `sceneDepth < 1.0` is the "this depth buffer is real" test.
|
|
106
|
+
// The fragment is reprojected to render-target uv the way Filament's own SSR does
|
|
107
|
+
// (surface_light_indirect.fs), and both depths are linearized with the SSR linearizeDepth
|
|
108
|
+
// formula (reversed-Z, far at infinity).
|
|
103
109
|
// (not in the depth/shadow/picking variants: their per-view layout has no structure sampler)
|
|
104
110
|
#if !defined(VARIANT_DEPTH)
|
|
105
111
|
if (materialParams.depthFade > 0.0) {
|
|
@@ -107,11 +113,13 @@ fragment {
|
|
|
107
113
|
highp vec4 clip = getClipFromWorldMatrix() * vec4(wp, 1.0);
|
|
108
114
|
highp vec2 suv = clip.xy * (0.5 / clip.w) + 0.5;
|
|
109
115
|
highp float sceneDepth = textureLod(sampler0_structure, uvToRenderTargetUV(suv), 0.0).r;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
116
|
+
if (sceneDepth < 1.0) {
|
|
117
|
+
highp mat4 p = getViewFromClipMatrix();
|
|
118
|
+
highp float sceneZ = (sceneDepth * p[2].z + p[3].z) / max(sceneDepth * p[2].w + p[3].w, 1.0 / 16777216.0);
|
|
119
|
+
highp float fragZ = (getViewFromWorldMatrix() * vec4(wp, 1.0)).z;
|
|
120
|
+
// both are view-space z (negative ahead): fragZ - sceneZ = how far the scene is behind
|
|
121
|
+
alpha *= saturate((fragZ - sceneZ) / materialParams.depthFade);
|
|
122
|
+
}
|
|
115
123
|
}
|
|
116
124
|
#endif
|
|
117
125
|
float3 rgb = tex.rgb * tint.rgb * (1.0 + materialParams.emissive);
|