lecodes-cli 2.4.7 → 2.4.9

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/package.json CHANGED
@@ -1,23 +1,23 @@
1
1
  {
2
2
  "name": "lecodes-cli",
3
- "version": "2.4.7",
3
+ "version": "2.4.9",
4
4
  "dependencies": {
5
5
  "@letary/chisel": "^0.15.0",
6
6
  "jimp": "^1.6.1",
7
- "lecodes-sdk": "2.4.7",
7
+ "lecodes-sdk": "2.4.9",
8
8
  "selfsigned": "^2.4.1"
9
9
  },
10
10
  "devDependencies": {
11
11
  "lecodes-design": "https://storage.yandexcloud.net/le-codes/releases/packages/lecodes-design/lecodes-design-0.11.0.tgz",
12
- "lecodes-headless": "2.4.7",
12
+ "lecodes-headless": "2.4.9",
13
13
  "qrcode-terminal": "^0.12.0",
14
14
  "lecodes-3d-editor": "https://storage.yandexcloud.net/le-codes/releases/packages/lecodes-3d-editor/lecodes-3d-editor-0.9.0.tgz",
15
15
  "lecodes-assets": "0.2.1",
16
16
  "lecodes-creator-nav": "0.19.0",
17
- "lecodes-gl-lite": "2.4.7",
18
- "lecodes-web-frame": "2.4.7",
19
- "lecodes-web-player": "2.4.7",
20
- "lecodes-web-shared": "2.4.7",
17
+ "lecodes-gl-lite": "2.4.9",
18
+ "lecodes-web-frame": "2.4.9",
19
+ "lecodes-web-player": "2.4.9",
20
+ "lecodes-web-shared": "2.4.9",
21
21
  "lecodes-web-lite": "2.0.7",
22
22
  "heic-decode": "^2.1.0",
23
23
  "marcidb-embedded": "^0.15.0",
@@ -25,7 +25,7 @@
25
25
  },
26
26
  "peerDependencies": {
27
27
  "lecodes-design": "^0.11.0",
28
- "lecodes-headless": "^2.4.7",
28
+ "lecodes-headless": "^2.4.9",
29
29
  "lecodes-3d-editor": "^0.9.0",
30
30
  "lecodes-assets": "^0.2.1",
31
31
  "heic-decode": "^2.1.0",
@@ -84,6 +84,10 @@ material {
84
84
  // panel looks as bright as the light it gives. 0 = screen-referred as before (emission 1.0 = white at any exposure;
85
85
  // an imported strength of 10 then blooms over the whole ceiling).
86
86
  { type : float, name : emissiveNits, precision : high },
87
+ // 1 = this instance's emissiveNits are ITS OWN (a static Mesh whose Material.lit set `emissiveNits`:
88
+ // Lightmap.meshMaterial carries them over) and the level-wide write (glb.cpp bindOptions) leaves them; 0 = the
89
+ // level's. Unread by the shader
90
+ { type : float, name : emissiveOwn },
87
91
  // set unconditionally by gltfio's AssetLoader (a missing uniform is a PANIC, not a no-op)
88
92
  { type : float, name : normalScale },
89
93
  { type : float, name : aoStrength },
@@ -23,6 +23,28 @@ material {
23
23
  {
24
24
  type : float,
25
25
  name : metallic
26
+ },
27
+ // THE GLOW (Material.lit's `emissive`, linear rgb; HDR values allowed): added on top of the lit colour. The
28
+ // host primes it black (0 = no glow), and the SDK writes it only for a material that glows.
29
+ {
30
+ type : float3,
31
+ name : emissive
32
+ },
33
+ // its luminance: over 0 = cd / m2 of emission 1.0, drawn SCENE-referred (emissive x nits through the camera's
34
+ // exposure: the light the bake gives the room is the brightness it shows); 0 = SCREEN-referred (emission 1.0 =
35
+ // white at any exposure). lightmap.mat draws a baked static's glow by the same rule, so a static Mesh looks
36
+ // the same before and after the bake applies (Lightmap.meshMaterial carries all three over).
37
+ {
38
+ type : float,
39
+ name : emissiveNits,
40
+ precision : high
41
+ },
42
+ // FOR THE BAKE, unread by the shader: 1 = the glow lights the level in a lightmap bake (the default — the
43
+ // host primes it to 1, createMaterialInstance), 0 = decoration, drawn but no emitter. The bake reads it off
44
+ // the Mesh's material instance (creator-gl lightmap_bake.cpp)
45
+ {
46
+ type : float,
47
+ name : emissiveBake
26
48
  }
27
49
  ],
28
50
  requires: [
@@ -39,5 +61,10 @@ fragment {
39
61
 
40
62
  material.roughness = materialParams.roughness;
41
63
  material.metallic = materialParams.metallic;
64
+
65
+ // lightmap.mat's rule exactly; highp, nits x exposure FIRST (a half overflows on emission x nits outdoors)
66
+ highp vec3 glow = materialParams.emissive;
67
+ if (materialParams.emissiveNits > 0.0) glow *= (materialParams.emissiveNits * getExposure());
68
+ material.emissive = vec4(glow, 0.0);
42
69
  }
43
70
  }