@automovie/viewer 0.0.0 → 0.1.0

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 (48) hide show
  1. package/README.md +1 -1
  2. package/lib/AutoMoviePlayer.d.ts +2 -2
  3. package/lib/AutoMoviePlayer.js.map +1 -1
  4. package/lib/applyPose.d.ts +2 -2
  5. package/lib/applyPose.js.map +1 -1
  6. package/lib/index.d.ts +1 -0
  7. package/lib/index.js +1 -0
  8. package/lib/index.js.map +1 -1
  9. package/lib/raster/AutoMovieRasterLighting.d.ts +43 -0
  10. package/lib/raster/AutoMovieRasterLighting.js +179 -0
  11. package/lib/raster/AutoMovieRasterLighting.js.map +1 -0
  12. package/lib/raster/AutoMovieRasterSheet.d.ts +68 -0
  13. package/lib/raster/AutoMovieRasterSheet.js +141 -0
  14. package/lib/raster/AutoMovieRasterSheet.js.map +1 -0
  15. package/lib/raster/AutoMovieRasterTarget.d.ts +87 -0
  16. package/lib/raster/AutoMovieRasterTarget.js +227 -0
  17. package/lib/raster/AutoMovieRasterTarget.js.map +1 -0
  18. package/lib/raster/IAutoMovieSceneRaster.d.ts +52 -0
  19. package/lib/raster/IAutoMovieSceneRaster.js +2 -0
  20. package/lib/raster/IAutoMovieSceneRaster.js.map +1 -0
  21. package/lib/raster/IRasterizeAutoMovieSceneProps.d.ts +28 -0
  22. package/lib/raster/IRasterizeAutoMovieSceneProps.js +2 -0
  23. package/lib/raster/IRasterizeAutoMovieSceneProps.js.map +1 -0
  24. package/lib/raster/encodeAutoMovieRasterPng.d.ts +17 -0
  25. package/lib/raster/encodeAutoMovieRasterPng.js +71 -0
  26. package/lib/raster/encodeAutoMovieRasterPng.js.map +1 -0
  27. package/lib/raster/index.d.ts +8 -0
  28. package/lib/raster/index.js +9 -0
  29. package/lib/raster/index.js.map +1 -0
  30. package/lib/raster/rasterizeAutoMovieScene.d.ts +33 -0
  31. package/lib/raster/rasterizeAutoMovieScene.js +409 -0
  32. package/lib/raster/rasterizeAutoMovieScene.js.map +1 -0
  33. package/lib/raster/stampAutoMovieRasterLabel.d.ts +19 -0
  34. package/lib/raster/stampAutoMovieRasterLabel.js +88 -0
  35. package/lib/raster/stampAutoMovieRasterLabel.js.map +1 -0
  36. package/package.json +3 -3
  37. package/src/AutoMoviePlayer.ts +1 -1
  38. package/src/applyPose.ts +1 -1
  39. package/src/index.ts +1 -0
  40. package/src/raster/AutoMovieRasterLighting.ts +221 -0
  41. package/src/raster/AutoMovieRasterSheet.ts +175 -0
  42. package/src/raster/AutoMovieRasterTarget.ts +282 -0
  43. package/src/raster/IAutoMovieSceneRaster.ts +62 -0
  44. package/src/raster/IRasterizeAutoMovieSceneProps.ts +34 -0
  45. package/src/raster/encodeAutoMovieRasterPng.ts +77 -0
  46. package/src/raster/index.ts +8 -0
  47. package/src/raster/rasterizeAutoMovieScene.ts +594 -0
  48. package/src/raster/stampAutoMovieRasterLabel.ts +120 -0
package/README.md CHANGED
@@ -44,7 +44,7 @@ Everything is exported from the package root.
44
44
  - Passes and transitions: `applyRenderMode`, `applyAutoMovieSemanticMask`, `renderAutoMovieFilmFrame`.
45
45
  - Mount and capture: `mountViewer`, `captureViewerSnapshot`.
46
46
 
47
- Formations, effects, fluids, soft bodies, section planes and the metric capture helpers are exported the same way. Units and the owner of each returned object are in the JSDoc. A CPU rasterizer for Node ships with a generated production, under `src/executable/viewer/node/raster`.
47
+ Formations, effects, fluids, soft bodies, section planes and the metric capture helpers are exported the same way. Units and the owner of each returned object are in the JSDoc. `rasterizeAutoMovieScene` draws a scene on the CPU for Node captures, with `AutoMovieRasterSheet` contact sheets and `encodeAutoMovieRasterPng`.
48
48
 
49
49
  ## Ownership
50
50
 
@@ -1,5 +1,5 @@
1
- import { IAutoMovieJointAxes, IAutoMovieRestFrame } from "@automovie/engine";
2
- import { AutoMovieHumanoidBone, IAutoMovieExpression, IAutoMovieMotion, IAutoMovieSkeleton } from "@automovie/interface";
1
+ import { IAutoMovieRestFrame } from "@automovie/engine";
2
+ import { AutoMovieHumanoidBone, IAutoMovieExpression, type IAutoMovieJointAxes, IAutoMovieMotion, IAutoMovieSkeleton } from "@automovie/interface";
3
3
  import type { IAutoMovieModelObject } from "./IAutoMovieModelObject.js";
4
4
  import type { IAutoMovieSpringConfig } from "./IAutoMovieSpringConfig.js";
5
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"AutoMoviePlayer.js","sourceRoot":"","sources":["../src/AutoMoviePlayer.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,SAAS,EACT,YAAY,EACZ,aAAa,EACb,YAAY,GACb,MAAM,mBAAmB,CAAC;AAa3B,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAgB3C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,OAAO,eAAe;IAUP,MAAM;IACN,QAAQ;IACjB,MAAM;IACG,SAAS;IAQT,UAAU;IAEV,MAAM;IAON,UAAU;IA7BrB,UAAU,GAAkC,IAAI,CAAC;IACxC,OAAO,GAA6C,IAAI,GAAG,EAGzE,CAAC;IACI,WAAW,GAAkB,IAAI,CAAC;IAClC,iBAAiB,GAAkB,IAAI,CAAC;IAEhD,YACmB,MAA6B,EAC7B,QAA4B,EACrC,MAAwB,EACf,SAEhB;IACD;;;;OAIG;IACc,UAAU,GAAY,KAAK;IAC5C,uEAAuE;IACtD,MAA+B;IAChD;;;;;OAKG;IACc,UAEhB;sBAtBgB,MAAM;wBACN,QAAQ;sBACjB,MAAM;yBACG,SAAS;0BAQT,UAAU;sBAEV,MAAM;0BAON,UAAU;IAG1B,CAAC;IAEJ;;;;;;;;;;OAUG;IACI,SAAS,CAAC,MAAwB;QACvC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;;;;;;OAWG;IACI,MAAM,CAAC,OAAe;QAC3B,MAAM,YAAY,GAChB,IAAI,CAAC,iBAAiB,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IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CACnD,CAAC;QACF,0EAA0E;QAC1E,sEAAsE;QACtE,6BAA6B;QAC7B,MAAM,OAAO,GAA+B,IAAI,GAAG,CACjD,IAAI,CAAC,MAAM,CAAC,GAAG,CACb,CAAC,CAAsB,EAAyB,EAAE,CAAC,CAAC,CAAC,IAAI,CAC1D,CACF,CAAC;QACF,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;YAC9B,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;gBAAE,SAAS;YAC3D,MAAM,OAAO,GAAwB,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAC7D,IACE,OAAO,CAAC,OAAO,KAAK,IAAI;gBACxB,OAAO,CAAC,SAAS,KAAK,IAAI;gBAC1B,OAAO,CAAC,KAAK,KAAK,IAAI;gBAEtB,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzB,CAAC;QACD,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IAC9D,CAAC;IAED,8DAA8D;IAC9D,IAAW,cAAc;QACvB,OAAO,IAAI,CAAC,UAAU,EAAE,UAAU,IAAI,IAAI,CAAC;IAC7C,CAAC;CACF"}
@@ -1,5 +1,5 @@
1
- import { IAutoMovieJointAxes, IAutoMovieRestFrame } from "@automovie/engine";
2
- import { AutoMovieHumanoidBone, IAutoMoviePose, IAutoMovieSkeleton } from "@automovie/interface";
1
+ import { IAutoMovieRestFrame } from "@automovie/engine";
2
+ import { AutoMovieHumanoidBone, type IAutoMovieJointAxes, IAutoMoviePose, IAutoMovieSkeleton } from "@automovie/interface";
3
3
  import type { IAutoMovieModelObject } from "./IAutoMovieModelObject.js";
4
4
  /**
5
5
  * Apply a {@link IAutoMoviePose} to a built model by running the engine's
@@ -1 +1 @@
1
- {"version":3,"file":"applyPose.js","sourceRoot":"","sources":["../src/applyPose.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,yBAAyB,EACzB,WAAW,GACZ,MAAM,mBAAmB,CAAC;AAW3B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,CAAC,MAAM,SAAS,GAMS,CAC7B,MAA6B,EAC7B,IAAoB,EACpB,QAA4B,EAC5B,SAAuE,EACvE,UAAwE,EAC/C,EAAE;IAC3B,MAAM,OAAO,GAA4B,EAAE,CAAC;IAC5C,KAAK,MAAM,CAAC,IAAI,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,CAAC;QACnE,MAAM,IAAI,GAA+B,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QAClE,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YACvB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YACrB,SAAS;QACX,CAAC;QACD,IAAI,CAAC,UAAU,CAAC,GAAG,CACjB,CAAC,CAAC,aAAa,CAAC,CAAC,EACjB,CAAC,CAAC,aAAa,CAAC,CAAC,EACjB,CAAC,CAAC,aAAa,CAAC,CAAC,EACjB,CAAC,CAAC,aAAa,CAAC,CAAC,CAClB,CAAC;IACJ,CAAC;IACD,4EAA4E;IAC5E,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAsB,EAAQ,EAAE;QACtD,MAAM,OAAO,GAEF,oBAAoB,CAAC,MAAM,CAAC,CAAC;QACxC,MAAM,IAAI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ot.js";
137
137
  export * from "./constructAutoMovieOwnedResources.js";
138
138
  export * from "./createViewerDisplayClock.js";
139
139
  export * from "./createViewerDisplayPublication.js";
140
+ export * from "./raster/index.js";
package/lib/index.js CHANGED
@@ -137,4 +137,5 @@ export * from "./IViewerCameraStateSnapshot.js";
137
137
  export * from "./constructAutoMovieOwnedResources.js";
138
138
  export * from "./createViewerDisplayClock.js";
139
139
  export * from "./createViewerDisplayPublication.js";
140
+ export * from "./raster/index.js";
140
141
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,iCAAiC,CAAC;AAChD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qCAAqC,CAAC;AACpD,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAC7F,OAAO,EAAE,mCAAmC,EAAE,MAAM,0CAA0C,CAAC;AAC/F,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC;AACnC,cAAc,0CAA0C,CAAC;AACzD,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wCAAwC,CAAC;AACvD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iCAAiC,CAAC;AAChD,c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C;AAC3D,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,+CAA+C,CAAC;AAC9D,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,sCAAsC,CAAC;AACrD,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AACzF,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAC7F,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uCAAuC,CAAC;AACtD,cAAc,iCAAiC,CAAC;AAChD,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,43 @@
1
+ import * as THREE from "three";
2
+ /**
3
+ * The scene's lights, read once per frame, and the diffuse irradiance they
4
+ * give a surface point: what `rasterizeAutoMovieScene` multiplies by a
5
+ * material's albedo.
6
+ *
7
+ * Ambient, hemisphere, directional, point, spot and rectangular-area lights
8
+ * contribute with three.js's punctual-light conventions: colour times
9
+ * intensity, Lambert cosine, the renderer's distance attenuation and the spot
10
+ * cone falloff; an area light is treated as a point at its position. Shadows,
11
+ * light probes and environment maps are not modelled. A scene with no light
12
+ * gets a camera headlight and an ambient term so its shapes stay readable.
13
+ *
14
+ * @evidence contracts/development/common.md#meaningful-documentation The comment lists every light kind read, the conventions applied, what is not modelled, and the fallback for an unlit scene.
15
+ * @evidence contracts/development/design.md#principled-representation Lights are flattened once into world-space records, so each triangle's shading is a loop over plain numbers instead of a scene traversal.
16
+ * @evidence contracts/development/design.md#minimal-and-owned-surface A constructor and one shading query; light records stay private.
17
+ * @evidence contracts/development/design.md#prohibited-design-shortcuts No light is recognised by name or production; the fallback depends only on the absence of lights.
18
+ */
19
+ export declare class AutoMovieRasterLighting {
20
+ /** World-space light records. */
21
+ private readonly lights;
22
+ /**
23
+ * Read the visible lights under `scene`.
24
+ *
25
+ * @param scene The drawn scene graph, with current world matrices.
26
+ * @param camera The drawing camera, used for the fallback headlight.
27
+ */
28
+ constructor(scene: THREE.Object3D, camera: THREE.Camera);
29
+ /**
30
+ * Diffuse irradiance at a world point with a unit world normal, linear RGB.
31
+ * Dividing by pi and multiplying by albedo gives the reflected colour, as
32
+ * three.js's Lambert BRDF does.
33
+ *
34
+ * @evidence contracts/development/common.md#meaningful-documentation States the inputs' spaces, the output's meaning and how a caller turns it into colour.
35
+ * @evidence contracts/development/implementation.md#principled-implementation Each light kind uses three.js's own formula: cosine for directional, sky/ground mix for hemisphere, cutoff-windowed inverse power decay and smoothstep cone for punctual lights.
36
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure One loop with one branch per light kind.
37
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Back-facing light contributes nothing instead of being mirrored; no light is boosted.
38
+ * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the number of lights.
39
+ * @evidence contracts/development/implementation.md#reuse-equivalent-work Light records were flattened once in the constructor.
40
+ * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Allocates only the returned triple.
41
+ */
42
+ irradiance(point: THREE.Vector3, normal: THREE.Vector3): [number, number, number];
43
+ }
@@ -0,0 +1,179 @@
1
+ import * as THREE from "three";
2
+ /**
3
+ * The scene's lights, read once per frame, and the diffuse irradiance they
4
+ * give a surface point: what `rasterizeAutoMovieScene` multiplies by a
5
+ * material's albedo.
6
+ *
7
+ * Ambient, hemisphere, directional, point, spot and rectangular-area lights
8
+ * contribute with three.js's punctual-light conventions: colour times
9
+ * intensity, Lambert cosine, the renderer's distance attenuation and the spot
10
+ * cone falloff; an area light is treated as a point at its position. Shadows,
11
+ * light probes and environment maps are not modelled. A scene with no light
12
+ * gets a camera headlight and an ambient term so its shapes stay readable.
13
+ *
14
+ * @evidence contracts/development/common.md#meaningful-documentation The comment lists every light kind read, the conventions applied, what is not modelled, and the fallback for an unlit scene.
15
+ * @evidence contracts/development/design.md#principled-representation Lights are flattened once into world-space records, so each triangle's shading is a loop over plain numbers instead of a scene traversal.
16
+ * @evidence contracts/development/design.md#minimal-and-owned-surface A constructor and one shading query; light records stay private.
17
+ * @evidence contracts/development/design.md#prohibited-design-shortcuts No light is recognised by name or production; the fallback depends only on the absence of lights.
18
+ */
19
+ export class AutoMovieRasterLighting {
20
+ /** World-space light records. */
21
+ lights;
22
+ /**
23
+ * Read the visible lights under `scene`.
24
+ *
25
+ * @param scene The drawn scene graph, with current world matrices.
26
+ * @param camera The drawing camera, used for the fallback headlight.
27
+ */
28
+ constructor(scene, camera) {
29
+ this.lights = [];
30
+ scene.traverseVisible((object) => {
31
+ if (!(object instanceof THREE.Light))
32
+ return;
33
+ const color = [
34
+ object.color.r * object.intensity,
35
+ object.color.g * object.intensity,
36
+ object.color.b * object.intensity,
37
+ ];
38
+ const position = new THREE.Vector3().setFromMatrixPosition(object.matrixWorld);
39
+ if (object instanceof THREE.AmbientLight)
40
+ this.lights.push({ kind: "ambient", color });
41
+ else if (object instanceof THREE.HemisphereLight)
42
+ this.lights.push({
43
+ kind: "hemisphere",
44
+ color,
45
+ ground: [
46
+ object.groundColor.r * object.intensity,
47
+ object.groundColor.g * object.intensity,
48
+ object.groundColor.b * object.intensity,
49
+ ],
50
+ direction: position.clone().normalize(),
51
+ });
52
+ else if (object instanceof THREE.DirectionalLight)
53
+ this.lights.push({
54
+ kind: "directional",
55
+ color,
56
+ direction: position
57
+ .clone()
58
+ .sub(new THREE.Vector3().setFromMatrixPosition(object.target.matrixWorld))
59
+ .normalize(),
60
+ });
61
+ else if (object instanceof THREE.SpotLight)
62
+ this.lights.push({
63
+ kind: "point",
64
+ color,
65
+ position,
66
+ distance: object.distance,
67
+ decay: object.decay,
68
+ cone: {
69
+ axis: new THREE.Vector3()
70
+ .setFromMatrixPosition(object.target.matrixWorld)
71
+ .sub(position)
72
+ .normalize(),
73
+ outer: Math.cos(object.angle),
74
+ inner: Math.cos(object.angle * (1 - object.penumbra)),
75
+ },
76
+ });
77
+ else if (object instanceof THREE.PointLight)
78
+ this.lights.push({
79
+ kind: "point",
80
+ color,
81
+ position,
82
+ distance: object.distance,
83
+ decay: object.decay,
84
+ });
85
+ else if (object instanceof THREE.RectAreaLight)
86
+ this.lights.push({
87
+ kind: "point",
88
+ color,
89
+ position,
90
+ distance: 0,
91
+ decay: 2,
92
+ });
93
+ });
94
+ // An unlit scene would draw black; a headlight and ambient term keep its
95
+ // shapes readable, scaled by pi so Lambert albedo comes out at 0.3 + 0.8 cos.
96
+ if (this.lights.length === 0) {
97
+ camera.updateMatrixWorld();
98
+ this.lights.push({
99
+ kind: "ambient",
100
+ color: [0.3 * Math.PI, 0.3 * Math.PI, 0.3 * Math.PI],
101
+ }, {
102
+ kind: "directional",
103
+ color: [0.8 * Math.PI, 0.8 * Math.PI, 0.8 * Math.PI],
104
+ direction: new THREE.Vector3(0.3, 0.5, 1)
105
+ .normalize()
106
+ .transformDirection(camera.matrixWorld),
107
+ });
108
+ }
109
+ }
110
+ /**
111
+ * Diffuse irradiance at a world point with a unit world normal, linear RGB.
112
+ * Dividing by pi and multiplying by albedo gives the reflected colour, as
113
+ * three.js's Lambert BRDF does.
114
+ *
115
+ * @evidence contracts/development/common.md#meaningful-documentation States the inputs' spaces, the output's meaning and how a caller turns it into colour.
116
+ * @evidence contracts/development/implementation.md#principled-implementation Each light kind uses three.js's own formula: cosine for directional, sky/ground mix for hemisphere, cutoff-windowed inverse power decay and smoothstep cone for punctual lights.
117
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure One loop with one branch per light kind.
118
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Back-facing light contributes nothing instead of being mirrored; no light is boosted.
119
+ * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the number of lights.
120
+ * @evidence contracts/development/implementation.md#reuse-equivalent-work Light records were flattened once in the constructor.
121
+ * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Allocates only the returned triple.
122
+ */
123
+ irradiance(point, normal) {
124
+ let r = 0;
125
+ let g = 0;
126
+ let b = 0;
127
+ for (const light of this.lights) {
128
+ let weight = 0;
129
+ if (light.kind === "ambient")
130
+ weight = 1;
131
+ else if (light.kind === "hemisphere") {
132
+ const sky = 0.5 * normal.dot(light.direction) + 0.5;
133
+ r += light.ground[0] + (light.color[0] - light.ground[0]) * sky;
134
+ g += light.ground[1] + (light.color[1] - light.ground[1]) * sky;
135
+ b += light.ground[2] + (light.color[2] - light.ground[2]) * sky;
136
+ continue;
137
+ }
138
+ else if (light.kind === "directional")
139
+ weight = Math.max(0, normal.dot(light.direction));
140
+ else {
141
+ const dx = light.position.x - point.x;
142
+ const dy = light.position.y - point.y;
143
+ const dz = light.position.z - point.z;
144
+ const distance = Math.hypot(dx, dy, dz);
145
+ if (distance === 0)
146
+ continue;
147
+ const cosine = (normal.x * dx + normal.y * dy + normal.z * dz) / distance;
148
+ if (cosine <= 0)
149
+ continue;
150
+ weight = cosine * attenuation(distance, light.distance, light.decay);
151
+ if (light.cone !== undefined) {
152
+ const along = -(light.cone.axis.x * dx +
153
+ light.cone.axis.y * dy +
154
+ light.cone.axis.z * dz) / distance;
155
+ weight *= smoothstep(light.cone.outer, light.cone.inner, along);
156
+ }
157
+ }
158
+ r += light.color[0] * weight;
159
+ g += light.color[1] * weight;
160
+ b += light.color[2] * weight;
161
+ }
162
+ return [r, g, b];
163
+ }
164
+ }
165
+ /** three.js's punctual-light distance attenuation. */
166
+ function attenuation(distance, cutoff, decay) {
167
+ let falloff = 1 / Math.max(Math.pow(distance, decay), 0.01);
168
+ if (cutoff > 0) {
169
+ const ratio = Math.min(1, Math.max(0, 1 - Math.pow(distance / cutoff, 4)));
170
+ falloff *= ratio * ratio;
171
+ }
172
+ return falloff;
173
+ }
174
+ /** Hermite step between two edges, as GLSL's `smoothstep`. */
175
+ function smoothstep(edge0, edge1, x) {
176
+ const t = Math.min(1, Math.max(0, (x - edge0) / (edge1 - edge0)));
177
+ return t * t * (3 - 2 * t);
178
+ }
179
+ //# sourceMappingURL=AutoMovieRasterLighting.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutoMovieRasterLighting.js","sourceRoot":"","sources":["../../src/raster/AutoMovieRasterLighting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAO,uBAAuB;IAClC,iCAAiC;IAChB,MAAM,CAAW;IAElC;;;;;OAKG;IACH,YAAmB,KAAqB,EAAE,MAAoB;QAC5D,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC;QACjB,KAAK,CAAC,eAAe,CAAC,CAAC,MAAsB,EAAQ,EAAE;YACrD,IAAI,CAAC,CAAC,MAAM,YAAY,KAAK,CAAC,KAAK,CAAC;gBAAE,OAAO;YAC7C,MAAM,KAAK,GAA6B;gBACtC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,SAAS;gBACjC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,SAAS;gBACjC,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,SAAS;aAClC,CAAC;YACF,MAAM,QAAQ,GAAkB,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC,qBAAqB,CACvE,MAAM,CAAC,WAAW,CACnB,CAAC;YACF,IAAI,MAAM,YA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 import type { IAutoMovieSceneRaster } from "./IAutoMovieSceneRaster.js";
2
+ /**
3
+ * A contact sheet of Node-drawn frames, filled one frame at a time: each
4
+ * frame is area-averaged into its cell in row-major order and captioned
5
+ * after reduction, so the caption stays legible however small the cell is.
6
+ *
7
+ * Frames are reduced as they arrive, so a sheet never holds more than its own
8
+ * pixels; the finished sheet is an ordinary raster for
9
+ * `encodeAutoMovieRasterPng`.
10
+ *
11
+ * ```ts
12
+ * const sheet = new AutoMovieRasterSheet(20, 5, 180, 320);
13
+ * for (const [seconds, frame] of frames) sheet.add(frame, `${seconds}s`);
14
+ * await writeFile("sheet.png", encodeAutoMovieRasterPng(sheet.finish()));
15
+ * ```
16
+ *
17
+ * @evidence contracts/development/common.md#meaningful-documentation The comment states the fill order, the reduction, when captions are drawn, the memory bound and how the result is encoded.
18
+ * @evidence contracts/development/design.md#principled-representation The sheet is itself an IAutoMovieSceneRaster, so encoding and captioning reuse the frame path unchanged.
19
+ * @evidence contracts/development/design.md#minimal-and-owned-surface A constructor, `add` and `finish`; layout is fixed by the constructor.
20
+ * @evidence contracts/development/design.md#prohibited-design-shortcuts Nothing names a film or capture command; captions are caller text.
21
+ */
22
+ export declare class AutoMovieRasterSheet {
23
+ /** The sheet pixels, opaque RGBA. */
24
+ private readonly sheet;
25
+ /** Cells filled so far. */
26
+ private count;
27
+ /** Number of cells. */
28
+ private readonly capacity;
29
+ /** Cells per row. */
30
+ private readonly columns;
31
+ /** Cell width in pixels. */
32
+ private readonly cellWidth;
33
+ /** Cell height in pixels. */
34
+ private readonly cellHeight;
35
+ /**
36
+ * Allocate an empty sheet.
37
+ *
38
+ * @param capacity Number of cells, a positive integer.
39
+ * @param columns Cells per row, a positive integer.
40
+ * @param cellWidth Cell width in pixels, a positive integer.
41
+ * @param cellHeight Cell height in pixels, a positive integer.
42
+ */
43
+ constructor(capacity: number, columns: number, cellWidth: number, cellHeight: number);
44
+ /**
45
+ * Reduce one frame into the next cell and caption it.
46
+ *
47
+ * @evidence contracts/development/common.md#meaningful-documentation States that the frame fills the next cell and receives the caption.
48
+ * @evidence contracts/development/implementation.md#principled-implementation Each cell pixel averages the source pixels its footprint covers, so thin lines and small figures survive reduction instead of being skipped by point sampling.
49
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure One pass over the cell's pixels, then one caption.
50
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A full sheet throws instead of overwriting a cell.
51
+ * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the source frame's pixel count.
52
+ * @evidence contracts/development/implementation.md#reuse-equivalent-work The caption reuses the frame label stamp on a cell view of the sheet.
53
+ * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The frame is not retained.
54
+ */
55
+ add(frame: IAutoMovieSceneRaster, caption: string): void;
56
+ /**
57
+ * The sheet as filled so far; unfilled cells stay black.
58
+ *
59
+ * @evidence contracts/development/common.md#meaningful-documentation States what the result holds and how unfilled cells look.
60
+ * @evidence contracts/development/implementation.md#principled-implementation Returns the sheet raster itself, which every frame was reduced into.
61
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure A single return.
62
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts An empty sheet throws rather than producing a blank image.
63
+ * @evidence contracts/development/implementation.md#efficient-algorithms Constant time.
64
+ * @evidence contracts/development/implementation.md#reuse-equivalent-work No copy is made.
65
+ * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The caller owns the returned raster; the sheet keeps no other buffer.
66
+ */
67
+ finish(): IAutoMovieSceneRaster;
68
+ }
@@ -0,0 +1,141 @@
1
+ import { stampAutoMovieRasterLabel } from "./stampAutoMovieRasterLabel.js";
2
+ /**
3
+ * A contact sheet of Node-drawn frames, filled one frame at a time: each
4
+ * frame is area-averaged into its cell in row-major order and captioned
5
+ * after reduction, so the caption stays legible however small the cell is.
6
+ *
7
+ * Frames are reduced as they arrive, so a sheet never holds more than its own
8
+ * pixels; the finished sheet is an ordinary raster for
9
+ * `encodeAutoMovieRasterPng`.
10
+ *
11
+ * ```ts
12
+ * const sheet = new AutoMovieRasterSheet(20, 5, 180, 320);
13
+ * for (const [seconds, frame] of frames) sheet.add(frame, `${seconds}s`);
14
+ * await writeFile("sheet.png", encodeAutoMovieRasterPng(sheet.finish()));
15
+ * ```
16
+ *
17
+ * @evidence contracts/development/common.md#meaningful-documentation The comment states the fill order, the reduction, when captions are drawn, the memory bound and how the result is encoded.
18
+ * @evidence contracts/development/design.md#principled-representation The sheet is itself an IAutoMovieSceneRaster, so encoding and captioning reuse the frame path unchanged.
19
+ * @evidence contracts/development/design.md#minimal-and-owned-surface A constructor, `add` and `finish`; layout is fixed by the constructor.
20
+ * @evidence contracts/development/design.md#prohibited-design-shortcuts Nothing names a film or capture command; captions are caller text.
21
+ */
22
+ export class AutoMovieRasterSheet {
23
+ /** The sheet pixels, opaque RGBA. */
24
+ sheet;
25
+ /** Cells filled so far. */
26
+ count;
27
+ /** Number of cells. */
28
+ capacity;
29
+ /** Cells per row. */
30
+ columns;
31
+ /** Cell width in pixels. */
32
+ cellWidth;
33
+ /** Cell height in pixels. */
34
+ cellHeight;
35
+ /**
36
+ * Allocate an empty sheet.
37
+ *
38
+ * @param capacity Number of cells, a positive integer.
39
+ * @param columns Cells per row, a positive integer.
40
+ * @param cellWidth Cell width in pixels, a positive integer.
41
+ * @param cellHeight Cell height in pixels, a positive integer.
42
+ */
43
+ constructor(capacity, columns, cellWidth, cellHeight) {
44
+ this.capacity = capacity;
45
+ this.columns = columns;
46
+ this.cellWidth = cellWidth;
47
+ this.cellHeight = cellHeight;
48
+ if (![capacity, columns, cellWidth, cellHeight].every((value) => Number.isSafeInteger(value) && value > 0))
49
+ throw new Error("Sheet capacity, columns and cell size must be positive integers");
50
+ const used = Math.min(columns, capacity);
51
+ const width = used * cellWidth;
52
+ const height = Math.ceil(capacity / used) * cellHeight;
53
+ if (width * height > 64_000_000)
54
+ throw new Error("Sheet exceeds 64 megapixels");
55
+ this.sheet = {
56
+ width,
57
+ height,
58
+ pixels: new Uint8ClampedArray(width * height * 4),
59
+ statistics: {
60
+ meshes: 0,
61
+ triangles: 0,
62
+ lines: 0,
63
+ points: 0,
64
+ skipped: {},
65
+ untextured: 0,
66
+ approximated: 0,
67
+ },
68
+ };
69
+ for (let offset = 3; offset < this.sheet.pixels.length; offset += 4)
70
+ this.sheet.pixels[offset] = 255;
71
+ this.count = 0;
72
+ }
73
+ /**
74
+ * Reduce one frame into the next cell and caption it.
75
+ *
76
+ * @evidence contracts/development/common.md#meaningful-documentation States that the frame fills the next cell and receives the caption.
77
+ * @evidence contracts/development/implementation.md#principled-implementation Each cell pixel averages the source pixels its footprint covers, so thin lines and small figures survive reduction instead of being skipped by point sampling.
78
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure One pass over the cell's pixels, then one caption.
79
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A full sheet throws instead of overwriting a cell.
80
+ * @evidence contracts/development/implementation.md#efficient-algorithms Linear in the source frame's pixel count.
81
+ * @evidence contracts/development/implementation.md#reuse-equivalent-work The caption reuses the frame label stamp on a cell view of the sheet.
82
+ * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The frame is not retained.
83
+ */
84
+ add(frame, caption) {
85
+ if (this.count >= this.capacity)
86
+ throw new Error("The sheet is full");
87
+ const left = (this.count % this.columns) * this.cellWidth;
88
+ const top = Math.floor(this.count / this.columns) * this.cellHeight;
89
+ const cell = {
90
+ width: this.cellWidth,
91
+ height: this.cellHeight,
92
+ pixels: new Uint8ClampedArray(this.cellWidth * this.cellHeight * 4),
93
+ statistics: this.sheet.statistics,
94
+ };
95
+ for (let y = 0; y < this.cellHeight; y++) {
96
+ const y0 = Math.floor((y * frame.height) / this.cellHeight);
97
+ const y1 = Math.max(y0 + 1, Math.floor(((y + 1) * frame.height) / this.cellHeight));
98
+ for (let x = 0; x < this.cellWidth; x++) {
99
+ const x0 = Math.floor((x * frame.width) / this.cellWidth);
100
+ const x1 = Math.max(x0 + 1, Math.floor(((x + 1) * frame.width) / this.cellWidth));
101
+ let r = 0;
102
+ let g = 0;
103
+ let b = 0;
104
+ for (let sy = y0; sy < y1; sy++)
105
+ for (let sx = x0; sx < x1; sx++) {
106
+ const source = (sy * frame.width + sx) * 4;
107
+ r += frame.pixels[source];
108
+ g += frame.pixels[source + 1];
109
+ b += frame.pixels[source + 2];
110
+ }
111
+ const n = (y1 - y0) * (x1 - x0);
112
+ const target = (y * this.cellWidth + x) * 4;
113
+ cell.pixels[target] = r / n;
114
+ cell.pixels[target + 1] = g / n;
115
+ cell.pixels[target + 2] = b / n;
116
+ cell.pixels[target + 3] = 255;
117
+ }
118
+ }
119
+ stampAutoMovieRasterLabel(cell, caption, Math.max(1, Math.round(this.cellHeight / 90)));
120
+ for (let y = 0; y < this.cellHeight; y++)
121
+ this.sheet.pixels.set(cell.pixels.subarray(y * this.cellWidth * 4, (y + 1) * this.cellWidth * 4), ((top + y) * this.sheet.width + left) * 4);
122
+ this.count++;
123
+ }
124
+ /**
125
+ * The sheet as filled so far; unfilled cells stay black.
126
+ *
127
+ * @evidence contracts/development/common.md#meaningful-documentation States what the result holds and how unfilled cells look.
128
+ * @evidence contracts/development/implementation.md#principled-implementation Returns the sheet raster itself, which every frame was reduced into.
129
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure A single return.
130
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts An empty sheet throws rather than producing a blank image.
131
+ * @evidence contracts/development/implementation.md#efficient-algorithms Constant time.
132
+ * @evidence contracts/development/implementation.md#reuse-equivalent-work No copy is made.
133
+ * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The caller owns the returned raster; the sheet keeps no other buffer.
134
+ */
135
+ finish() {
136
+ if (this.count === 0)
137
+ throw new Error("The sheet has no frames");
138
+ return this.sheet;
139
+ }
140
+ }
141
+ //# sourceMappingURL=AutoMovieRasterSheet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AutoMovieRasterSheet.js","sourceRoot":"","sources":["../../src/raster/AutoMovieRaster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