lecodes-cli 2.2.9 → 2.2.10

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.
Files changed (38) hide show
  1. package/dist/index.js +7470 -14528
  2. package/package.json +8 -8
  3. package/runtime/materials/background.mat +52 -0
  4. package/runtime/sdk-types.json +1 -1
  5. package/runtime/web/VERSION.json +3 -3
  6. package/runtime/web/assets/ar-CHvaraG4.js +1 -0
  7. package/runtime/web/assets/audio-recorder-Bt-Caym7.js +1 -0
  8. package/runtime/web/assets/materials-BzTsWTWO.bin +0 -0
  9. package/runtime/web/assets/speech-DzDPVK_j.js +1 -0
  10. package/runtime/web/player.js +17 -17
  11. package/runtime/web-lite/assets/{index-BttBnvIf.js → index-By07xWGA.js} +1 -1
  12. package/runtime/web-lite/assets/{scene3d-D8LdhX0V.js → scene3d-D5R7Vq3f.js} +58 -58
  13. package/runtime/web-lite/features.json +2 -11
  14. package/runtime/web-lite/lite.js +7 -7
  15. package/runtime/web-lite/plugins/ar/index-CHvaraG4.js +1 -0
  16. package/runtime/web-lite/plugins/audio-recorder/index-Bt-Caym7.js +1 -0
  17. package/runtime/web-lite/plugins/speech/index-DzDPVK_j.js +1 -0
  18. package/runtime/web-lite/plugins.json +3 -0
  19. package/src/commands/app/templates/ios.ts +14 -15
  20. package/src/commands/init/index.ts +195 -195
  21. package/src/commands/render.ts +15 -0
  22. package/src/commands/shared.ts +79 -79
  23. package/src/commands/test.ts +2 -1
  24. package/src/commands/thumbs.ts +185 -185
  25. package/src/compile/screenEntry.ts +123 -123
  26. package/src/declarations/lecodes-headless.d.ts +2 -0
  27. package/src/dev/backendWorker.ts +3 -3
  28. package/src/plugin/contract.ts +29 -12
  29. package/src/plugin/emitKotlin.ts +33 -8
  30. package/src/plugin/emitSdk.ts +23 -9
  31. package/src/plugin/emitSwift.ts +33 -8
  32. package/src/plugin/emitWeb.ts +57 -1
  33. package/src/plugin/generate.ts +22 -1
  34. package/src/plugin/lower.ts +42 -6
  35. package/src/plugin/permissions.ts +52 -0
  36. package/src/project/ignore.ts +164 -164
  37. package/runtime/web/assets/materials-uri4FvPE.bin +0 -0
  38. package/runtime/web-lite/assets/ar-BOdQ-wV4.js +0 -1
package/package.json CHANGED
@@ -1,22 +1,22 @@
1
1
  {
2
2
  "name": "lecodes-cli",
3
- "version": "2.2.9",
3
+ "version": "2.2.10",
4
4
  "dependencies": {
5
5
  "@letary/chisel": "^0.14.0",
6
6
  "jimp": "^1.6.1",
7
- "lecodes-sdk": "2.2.9"
7
+ "lecodes-sdk": "2.2.10"
8
8
  },
9
9
  "devDependencies": {
10
10
  "lecodes-design": "https://storage.yandexcloud.net/le-codes/releases/packages/lecodes-design/lecodes-design-0.11.0.tgz",
11
- "lecodes-headless": "2.2.9",
11
+ "lecodes-headless": "2.2.10",
12
12
  "qrcode-terminal": "^0.12.0",
13
13
  "lecodes-3d-editor": "https://storage.yandexcloud.net/le-codes/releases/packages/lecodes-3d-editor/lecodes-3d-editor-0.9.0.tgz",
14
14
  "lecodes-assets": "0.2.1",
15
15
  "lecodes-creator-nav": "0.19.0",
16
- "lecodes-gl-lite": "2.2.9",
17
- "lecodes-web-frame": "2.2.9",
18
- "lecodes-web-player": "2.2.9",
19
- "lecodes-web-shared": "2.2.9",
16
+ "lecodes-gl-lite": "2.2.10",
17
+ "lecodes-web-frame": "2.2.10",
18
+ "lecodes-web-player": "2.2.10",
19
+ "lecodes-web-shared": "2.2.10",
20
20
  "lecodes-web-lite": "2.0.2",
21
21
  "heic-decode": "^2.1.0",
22
22
  "marcidb-embedded": "^0.15.0",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "peerDependencies": {
26
26
  "lecodes-design": "^0.11.0",
27
- "lecodes-headless": "^2.2.9",
27
+ "lecodes-headless": "^2.2.10",
28
28
  "lecodes-3d-editor": "^0.9.0",
29
29
  "lecodes-assets": "^0.2.1",
30
30
  "heic-decode": "^2.1.0",
@@ -0,0 +1,52 @@
1
+ // The scene background (creator-gl setSceneBackground): a texture behind everything, filling the
2
+ // viewport — the camera image of an AR session, a video. The ENGINE draws it (one device-space quad
3
+ // per scene, channel 0, made on first use) and instances this material itself by name; the runtime
4
+ // registers it from the materials archive.
5
+ //
6
+ // ONE source for every backend. The sampler is EXTERNAL because that is what the frames come as
7
+ // (an ARKit / AVFoundation CVPixelBuffer on Metal, an OES texture on Android); a plain 2D texture
8
+ // fills the slot too (WebGL and desktop GL have no external textures — the fork's lecodes 0020 lets
9
+ // a 2D texture into an external slot, the shader compiler rewrites samplerExternalOES there).
10
+ //
11
+ // `uvRow0` / `uvRow1` are the rows of the affine map from the viewport's normalized coordinates
12
+ // (0,0 top-left) to the texture's (0,0 = its first texel): the crop and rotation of a camera image
13
+ // for the display, computed by the host's framework (ARKit's displayTransform, ARCore's
14
+ // transformCoordinates2d). No depth test, no depth write: the scene draws over it as over a clear.
15
+
16
+ material {
17
+ name : background,
18
+ shadingModel : unlit,
19
+ vertexDomain : device,
20
+ culling : none,
21
+ depthWrite : false,
22
+ depthCulling : false,
23
+ variantFilter : [ skinning, shadowReceiver, vsm, fog, ssr, stereo ],
24
+ parameters : [
25
+ {
26
+ type : samplerExternal,
27
+ name : background
28
+ },
29
+ {
30
+ type : float3,
31
+ name : uvRow0
32
+ },
33
+ {
34
+ type : float3,
35
+ name : uvRow1
36
+ }
37
+ ]
38
+ }
39
+
40
+ fragment {
41
+ void material(inout MaterialInputs material) {
42
+ prepareMaterial(material);
43
+ // the viewport's coordinates with the origin at the TOP-left, as the hosts' frameworks say them
44
+ highp vec2 p = getNormalizedViewportCoord().xy;
45
+ p.y = 1.0 - p.y;
46
+ highp vec2 uv = vec2(dot(materialParams.uvRow0.xy, p) + materialParams.uvRow0.z,
47
+ dot(materialParams.uvRow1.xy, p) + materialParams.uvRow1.z);
48
+ // inverseTonemapSRGB round-trips the View's tonemapper (video.mat's reason): the frame is
49
+ // shown with its own colours, not graded a second time
50
+ material.baseColor = vec4(inverseTonemapSRGB(texture(materialParams_background, uv).rgb), 1.0);
51
+ }
52
+ }