@driftengine/capture 4.7.2 → 4.7.4

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/decimate.js CHANGED
@@ -123,7 +123,7 @@ export function decimate(mesh, budget, options = {}) {
123
123
  for (const vertex of neighbours)
124
124
  pushEdge(keep, vertex);
125
125
  }
126
- return rebuild(position, normalsFrom(position, faces, faceAlive, faceCount), faces, faceAlive, faceCount, mesh);
126
+ return rebuild(position, normalsFrom(position, faces, faceAlive, faceCount), faces, faceAlive, faceCount);
127
127
  }
128
128
  /** A face's plane, unit normal first, or false where the triangle has no area to have one. */
129
129
  function planeOf(position, faces, face, out) {
@@ -332,7 +332,7 @@ function normalsFrom(position, faces, faceAlive, faceCount) {
332
332
  return normals;
333
333
  }
334
334
  /** The live faces and the vertices they still use, renumbered from nothing. */
335
- function rebuild(position, normals, faces, faceAlive, faceCount, source) {
335
+ function rebuild(position, normals, faces, faceAlive, faceCount) {
336
336
  const renumbered = new Map();
337
337
  const positions = [];
338
338
  const outNormals = [];
package/dist/delight.js CHANGED
@@ -134,7 +134,7 @@ export function delight(views, mesh, options, out) {
134
134
  */
135
135
  const excess = spread[vertex];
136
136
  out.roughness[vertex] = Math.min(1, Math.max(0.05, 1 - Math.min(1, excess * 4)));
137
- out.confidence[vertex] = confidenceAt(seen[vertex], minimumViews, excess, views.length);
137
+ out.confidence[vertex] = confidenceAt(seen[vertex], minimumViews, excess);
138
138
  }
139
139
  }
140
140
  /**
@@ -333,7 +333,7 @@ function adjacency(mesh, vertices) {
333
333
  * them alone is enough to make the answer wrong: too few views to reject anything, a surface whose
334
334
  * views disagree wildly — glass, a mirror, water — and a surface nobody saw at all.
335
335
  */
336
- function confidenceAt(seen, minimumViews, excess, views) {
336
+ function confidenceAt(seen, minimumViews, excess) {
337
337
  if (seen === 0)
338
338
  return 0;
339
339
  if (seen < minimumViews)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@driftengine/capture",
3
- "version": "4.7.2",
3
+ "version": "4.7.4",
4
4
  "description": "A video to a playable scene, on the player's device: the models it runs and the stages that use them",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -27,12 +27,12 @@
27
27
  ],
28
28
  "sideEffects": false,
29
29
  "peerDependencies": {
30
- "@driftengine/core": "4.7.2",
31
- "@driftengine/drft": "4.7.2",
32
- "@driftengine/nav": "4.7.2",
33
- "@driftengine/physics": "4.7.2",
34
- "@driftengine/splats": "4.7.2",
35
- "@driftengine/texture": "4.7.2"
30
+ "@driftengine/core": "4.7.4",
31
+ "@driftengine/drft": "4.7.4",
32
+ "@driftengine/nav": "4.7.4",
33
+ "@driftengine/physics": "4.7.4",
34
+ "@driftengine/splats": "4.7.4",
35
+ "@driftengine/texture": "4.7.4"
36
36
  },
37
37
  "author": "Drift Technologies",
38
38
  "repository": {
package/src/decimate.ts CHANGED
@@ -158,7 +158,6 @@ export function decimate(mesh: MeshData, budget: number, options: DecimateOption
158
158
  faces,
159
159
  faceAlive,
160
160
  faceCount,
161
- mesh,
162
161
  );
163
162
  }
164
163
 
@@ -405,7 +404,6 @@ function rebuild(
405
404
  faces: Int32Array,
406
405
  faceAlive: Uint8Array,
407
406
  faceCount: number,
408
- source: MeshData,
409
407
  ): MeshData {
410
408
  const renumbered = new Map<number, number>();
411
409
  const positions: number[] = [];
package/src/delight.ts CHANGED
@@ -189,12 +189,7 @@ export function delight(
189
189
  */
190
190
  const excess = spread[vertex] as number;
191
191
  out.roughness[vertex] = Math.min(1, Math.max(0.05, 1 - Math.min(1, excess * 4)));
192
- out.confidence[vertex] = confidenceAt(
193
- seen[vertex] as number,
194
- minimumViews,
195
- excess,
196
- views.length,
197
- );
192
+ out.confidence[vertex] = confidenceAt(seen[vertex] as number, minimumViews, excess);
198
193
  }
199
194
  }
200
195
 
@@ -411,7 +406,7 @@ function adjacency(mesh: MeshData, vertices: number): number[][] {
411
406
  * them alone is enough to make the answer wrong: too few views to reject anything, a surface whose
412
407
  * views disagree wildly — glass, a mirror, water — and a surface nobody saw at all.
413
408
  */
414
- function confidenceAt(seen: number, minimumViews: number, excess: number, views: number): number {
409
+ function confidenceAt(seen: number, minimumViews: number, excess: number): number {
415
410
  if (seen === 0) return 0;
416
411
  if (seen < minimumViews) return 0.1;
417
412
  /*