Default to 500K random display points and document track sampling
Browse files- DEPLOYMENT.md +13 -2
- README.md +13 -1
- deployment-manifest.json +7 -7
- viewer/app.js +2 -2
- viewer/index.html +3 -3
- viewer/point-cloud.js +2 -2
- viewer/point-sampling.js +2 -0
DEPLOYMENT.md
CHANGED
|
@@ -130,7 +130,7 @@ file again without GPU inference. Disposal aborts requests and retry waits.
|
|
| 130 |
|
| 131 |
The website-style viewer includes an RGB camera inset, filmstrip timeline,
|
| 132 |
playback speed, camera frustums, fullscreen, and advanced filter panels. The
|
| 133 |
-
render-budget slider defaults to at most
|
| 134 |
uses random indices without replacement to reduce the actual GPU draw count.
|
| 135 |
The existing 40 MB point export cap remains unchanged. Display controls do not
|
| 136 |
modify inference, scene files, or downloads.
|
|
@@ -139,8 +139,19 @@ New geometry chunks and preview PLY files use random sampling without
|
|
| 139 |
replacement with seed 20261114, recorded as `sampling_seed` in `scene.json`.
|
| 140 |
The browser maintains an incrementally shuffled index pool with the same
|
| 141 |
fixed seed; slider changes reuse that pool rather than resampling every frame.
|
| 142 |
-
The default
|
|
|
|
| 143 |
unchanged. Sampling settings are expanded by default in the input card.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 144 |
|
| 145 |
Motion hiding matches the source repository: threshold finite probabilities
|
| 146 |
at 0.5, then dilate by five pixels with an 11×11 square kernel before sampling.
|
|
|
|
| 130 |
|
| 131 |
The website-style viewer includes an RGB camera inset, filmstrip timeline,
|
| 132 |
playback speed, camera frustums, fullscreen, and advanced filter panels. The
|
| 133 |
+
render-budget slider defaults to at most 500,000 exported points, then
|
| 134 |
uses random indices without replacement to reduce the actual GPU draw count.
|
| 135 |
The existing 40 MB point export cap remains unchanged. Display controls do not
|
| 136 |
modify inference, scene files, or downloads.
|
|
|
|
| 139 |
replacement with seed 20261114, recorded as `sampling_seed` in `scene.json`.
|
| 140 |
The browser maintains an incrementally shuffled index pool with the same
|
| 141 |
fixed seed; slider changes reuse that pool rather than resampling every frame.
|
| 142 |
+
The default display budget is 500,000 points; the slider can still select all
|
| 143 |
+
exported points up to the existing two-million-point cap. Export byte caps are
|
| 144 |
unchanged. Sampling settings are expanded by default in the input card.
|
| 145 |
+
Keep `DEFAULT_POINT_BUDGET` in `viewer/point-sampling.js` shared by the point
|
| 146 |
+
cloud and live viewer; the initial HTML slider and readout also show 500K.
|
| 147 |
+
|
| 148 |
+
Track sampling does not follow the geometry budget: `pi4/io.py` exports up to
|
| 149 |
+
1,024 evenly spaced eligible query IDs, with the existing separate 5×5-eroded
|
| 150 |
+
motion mask applied at query/target frames where available. The browser uses
|
| 151 |
+
`randomQueryRanks` with seed 20261111 to select 256 whole trajectories by
|
| 152 |
+
default; the slider changes a nested, stable subset, never independent samples
|
| 153 |
+
at each frame. The default trail duration stays 0.8 seconds. This display-budget
|
| 154 |
+
change does not alter track inference, export sampling, or saved track files.
|
| 155 |
|
| 156 |
Motion hiding matches the source repository: threshold finite probabilities
|
| 157 |
at 0.5, then dilate by five pixels with an 11×11 square kernel before sampling.
|
README.md
CHANGED
|
@@ -54,11 +54,13 @@ fullscreen mode, and collapsible geometry/trajectory filters. Click or drag the
|
|
| 54 |
filmstrip, or click the RGB inset, to smoothly return to the selected predicted
|
| 55 |
camera. Scrubbing pauses playback while dragging and resumes it only if it was
|
| 56 |
already playing. The render-budget slider uses
|
| 57 |
-
random sampling without replacement, defaults to up to **
|
| 58 |
points, and actually reduces the GPU draw count when lowered. The existing
|
| 59 |
40 MB geometry export budget limits the available points; small scenes contain
|
| 60 |
fewer than two million. Visibility/confidence filters can reduce the number
|
| 61 |
shown further. Display changes never alter inference or downloaded results.
|
|
|
|
|
|
|
| 62 |
|
| 63 |
New point-cloud exports and the preview PLY also sample randomly without
|
| 64 |
replacement after their respective validity/confidence filters. A fixed seed
|
|
@@ -67,6 +69,16 @@ budget changes. Newly loaded geometry joins the random pool incrementally,
|
|
| 67 |
without reshuffling the entire scene on each frame. Image-frame sampling and
|
| 68 |
tracking queries are unchanged.
|
| 69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
Dynamic-region hiding uses the native motion probability threshold **0.5**,
|
| 71 |
dilated outward by **5 pixels** with an 11×11 square kernel at the resized
|
| 72 |
image resolution. **Current motion + background** applies this expanded mask
|
|
|
|
| 54 |
filmstrip, or click the RGB inset, to smoothly return to the selected predicted
|
| 55 |
camera. Scrubbing pauses playback while dragging and resumes it only if it was
|
| 56 |
already playing. The render-budget slider uses
|
| 57 |
+
random sampling without replacement, defaults to up to **500,000** exported
|
| 58 |
points, and actually reduces the GPU draw count when lowered. The existing
|
| 59 |
40 MB geometry export budget limits the available points; small scenes contain
|
| 60 |
fewer than two million. Visibility/confidence filters can reduce the number
|
| 61 |
shown further. Display changes never alter inference or downloaded results.
|
| 62 |
+
Raise the slider toward two million for more detail, or lower it for a lighter
|
| 63 |
+
view. Only the default display budget changes; the export keeps its full budget.
|
| 64 |
|
| 65 |
New point-cloud exports and the preview PLY also sample randomly without
|
| 66 |
replacement after their respective validity/confidence filters. A fixed seed
|
|
|
|
| 69 |
without reshuffling the entire scene on each frame. Image-frame sampling and
|
| 70 |
tracking queries are unchanged.
|
| 71 |
|
| 72 |
+
Trajectory sampling is independent of the point-cloud budget. The export keeps
|
| 73 |
+
up to 1,024 finite query tracks, using evenly spaced candidates from the query
|
| 74 |
+
frame's eligible pixels. In viewer exports with motion masks, eligibility uses
|
| 75 |
+
the separate 5×5-eroded motion mask at the query and target frames. The browser
|
| 76 |
+
then uses a fixed random ranking to show up to 256 whole trajectories by
|
| 77 |
+
default, adjustable with **Track count**. The same query IDs are used across
|
| 78 |
+
all frames, and raising the count retains the previous subset. The default
|
| 79 |
+
trail duration is 0.8 seconds; missing or low-confidence observations can
|
| 80 |
+
reduce the visible heads and segments without resampling the trajectory IDs.
|
| 81 |
+
|
| 82 |
Dynamic-region hiding uses the native motion probability threshold **0.5**,
|
| 83 |
dilated outward by **5 pixels** with an 11×11 square kernel at the resized
|
| 84 |
image resolution. **Current motion + background** applies this expanded mask
|
deployment-manifest.json
CHANGED
|
@@ -8,11 +8,11 @@
|
|
| 8 |
"sha256": {
|
| 9 |
".gitattributes": "58b404b060fe65fab922dcfe90a25bd74a8b5682f72d228b36a166d633c97f70",
|
| 10 |
".gitignore": "cf8476943466af0150f939f03666befd77c7c2b511e14f4d5ea32b37093816ca",
|
| 11 |
-
"DEPLOYMENT.md": "
|
| 12 |
"LICENSE": "a27c27dfee488645aa7f6b611083b6e9b151feca14f3e4b603dd1a3076a3deb1",
|
| 13 |
"LICENSE_MODEL": "3fbf2bec464d033c4a71796fe05068f3f6ccc8e8bf04cd283f501b3ff2cde0dc",
|
| 14 |
"NOTICE": "b500aaf92b4f63a554132c039c61fa98a0849a13802cace309b58285d14a8561",
|
| 15 |
-
"README.md": "
|
| 16 |
"app.py": "cf1a38ed19ceecbed959d24df86018415aed2c7be2d17ebe02cdc4370a447ae3",
|
| 17 |
"example-covers.json": "16554860582174d21a75de2719dade1d255329de733a057f5257f2da313d66e8",
|
| 18 |
"examples/README.md": "adb6f6c8e18b4f43e5c8502d7d4e71c4be49c9dfe71f2f4900a90f159bb73aa8",
|
|
@@ -47,16 +47,16 @@
|
|
| 47 |
"requirements.txt": "ec5668859d3aa420aa9a95448920ff6c082053714a3bad2ada851431f2ea3b49",
|
| 48 |
"scripts/build_example_covers.py": "2e2573e0499c4ac07af48f07d03482cc26775052953c37b1cc83108c61aa1792",
|
| 49 |
"space.css": "960ee5eb7e859e9b3cbf35a5161430417801f1ba08cdba847e905eeaf6b1d93b",
|
| 50 |
-
"viewer/app.js": "
|
| 51 |
"viewer/camera-follow.js": "eb7f768c929f5d5933b167a5380cb308c0a5dca7e047cbff1f858025c1021cd5",
|
| 52 |
"viewer/camera-layer.js": "96c625b0769a2ce8b6826556f781e75d536fb1f65f626c61d9752955981361b0",
|
| 53 |
"viewer/controls.js": "1a4f25294e3b2a72c772aeadadfb9d74e1e8772015764cb0a2b49559864a66d6",
|
| 54 |
"viewer/dynamic-tracks.js": "6982dc6273738ea5de807bf125b0f04a7ec4b4272211ac7c472910e0e63cc5d5",
|
| 55 |
"viewer/frame-image-cache.js": "96fd921f861b00472e8fce232d0a1aacd87ee1fdb0282ea6dc4b83f8870193b4",
|
| 56 |
-
"viewer/index.html": "
|
| 57 |
-
"viewer/point-cloud.js": "
|
| 58 |
"viewer/point-picking.js": "de7bddd93d60bdd249c3df7b68e98637102125581487e711c1ad4d2a8090512a",
|
| 59 |
-
"viewer/point-sampling.js": "
|
| 60 |
"viewer/serve.py": "4b4b51392a4ee4c43c3178ca5520bba5627d442aacc070ab4cc8c2f5b7d22644",
|
| 61 |
"viewer/sort-worker.js": "03f9041725a46b388dffc7bda85d952d412510bca30b5687d5556c6ab7605670",
|
| 62 |
"viewer/static-demo-data.js": "ba8ddf67ff151168c6d97310458241faafc2f53a4763abe34739e0ca66b7e865",
|
|
@@ -66,5 +66,5 @@
|
|
| 66 |
"viewer/vendor/three.core.min.js": "61ba0df005b05991361d040d8ff670e1aadfd0ce7aeebd1fdb0725957a8957de",
|
| 67 |
"viewer/vendor/three.module.min.js": "e2b5ee6bccd38fd6d8a2428546b83c5f2426d84b152ef82be8055556e3b40eb6"
|
| 68 |
},
|
| 69 |
-
"updated_at": "2026-11-14T09:
|
| 70 |
}
|
|
|
|
| 8 |
"sha256": {
|
| 9 |
".gitattributes": "58b404b060fe65fab922dcfe90a25bd74a8b5682f72d228b36a166d633c97f70",
|
| 10 |
".gitignore": "cf8476943466af0150f939f03666befd77c7c2b511e14f4d5ea32b37093816ca",
|
| 11 |
+
"DEPLOYMENT.md": "f57a30b31f7e3e2fc3a5ac0f938a8855738fe76b58fbe73932d0a402d40535ae",
|
| 12 |
"LICENSE": "a27c27dfee488645aa7f6b611083b6e9b151feca14f3e4b603dd1a3076a3deb1",
|
| 13 |
"LICENSE_MODEL": "3fbf2bec464d033c4a71796fe05068f3f6ccc8e8bf04cd283f501b3ff2cde0dc",
|
| 14 |
"NOTICE": "b500aaf92b4f63a554132c039c61fa98a0849a13802cace309b58285d14a8561",
|
| 15 |
+
"README.md": "acf7b49badc01153c80790bb760a53cd061240f5a42dbc4e5c89156e38fc803a",
|
| 16 |
"app.py": "cf1a38ed19ceecbed959d24df86018415aed2c7be2d17ebe02cdc4370a447ae3",
|
| 17 |
"example-covers.json": "16554860582174d21a75de2719dade1d255329de733a057f5257f2da313d66e8",
|
| 18 |
"examples/README.md": "adb6f6c8e18b4f43e5c8502d7d4e71c4be49c9dfe71f2f4900a90f159bb73aa8",
|
|
|
|
| 47 |
"requirements.txt": "ec5668859d3aa420aa9a95448920ff6c082053714a3bad2ada851431f2ea3b49",
|
| 48 |
"scripts/build_example_covers.py": "2e2573e0499c4ac07af48f07d03482cc26775052953c37b1cc83108c61aa1792",
|
| 49 |
"space.css": "960ee5eb7e859e9b3cbf35a5161430417801f1ba08cdba847e905eeaf6b1d93b",
|
| 50 |
+
"viewer/app.js": "bfca824a022b09e3d2833dd7bfa6a3947284c5ffd8e65d39583839a8c3db80e7",
|
| 51 |
"viewer/camera-follow.js": "eb7f768c929f5d5933b167a5380cb308c0a5dca7e047cbff1f858025c1021cd5",
|
| 52 |
"viewer/camera-layer.js": "96c625b0769a2ce8b6826556f781e75d536fb1f65f626c61d9752955981361b0",
|
| 53 |
"viewer/controls.js": "1a4f25294e3b2a72c772aeadadfb9d74e1e8772015764cb0a2b49559864a66d6",
|
| 54 |
"viewer/dynamic-tracks.js": "6982dc6273738ea5de807bf125b0f04a7ec4b4272211ac7c472910e0e63cc5d5",
|
| 55 |
"viewer/frame-image-cache.js": "96fd921f861b00472e8fce232d0a1aacd87ee1fdb0282ea6dc4b83f8870193b4",
|
| 56 |
+
"viewer/index.html": "2fc9720edf29638008f5db92350d16e7ca4720e0294fed58a6960ef603e0be10",
|
| 57 |
+
"viewer/point-cloud.js": "9a75bd0b78bdbfb7bfd925422e2b748adaa7e43465a84667e7c7da464deea874",
|
| 58 |
"viewer/point-picking.js": "de7bddd93d60bdd249c3df7b68e98637102125581487e711c1ad4d2a8090512a",
|
| 59 |
+
"viewer/point-sampling.js": "5915c7a7e67afbe9e59082980276accf44f2a3e6e9d9f6da8759bacbb47e4bd6",
|
| 60 |
"viewer/serve.py": "4b4b51392a4ee4c43c3178ca5520bba5627d442aacc070ab4cc8c2f5b7d22644",
|
| 61 |
"viewer/sort-worker.js": "03f9041725a46b388dffc7bda85d952d412510bca30b5687d5556c6ab7605670",
|
| 62 |
"viewer/static-demo-data.js": "ba8ddf67ff151168c6d97310458241faafc2f53a4763abe34739e0ca66b7e865",
|
|
|
|
| 66 |
"viewer/vendor/three.core.min.js": "61ba0df005b05991361d040d8ff670e1aadfd0ce7aeebd1fdb0725957a8957de",
|
| 67 |
"viewer/vendor/three.module.min.js": "e2b5ee6bccd38fd6d8a2428546b83c5f2426d84b152ef82be8055556e3b40eb6"
|
| 68 |
},
|
| 69 |
+
"updated_at": "2026-11-14T09:39:20.934382+00:00"
|
| 70 |
}
|
viewer/app.js
CHANGED
|
@@ -6,7 +6,7 @@ import {dataURL, readJSON} from './static-demo-data.js';
|
|
| 6 |
import {StaticDemoViewer} from './static-demo-viewer.js';
|
| 7 |
import {predictedCameraView, SmoothCameraFollower} from './camera-follow.js';
|
| 8 |
import {CameraLayer} from './camera-layer.js';
|
| 9 |
-
import {linspaceIndices} from './point-sampling.js';
|
| 10 |
import {FrameImageCache} from './frame-image-cache.js';
|
| 11 |
|
| 12 |
const byId = id => document.getElementById(id);
|
|
@@ -360,7 +360,7 @@ async function open() {
|
|
| 360 |
const budgetSlider = byId('point-budget');
|
| 361 |
budgetSlider.max = Math.max(1, capacity);
|
| 362 |
budgetSlider.min = Math.min(50_000, Number(budgetSlider.max));
|
| 363 |
-
budgetSlider.value = Math.min(
|
| 364 |
budgetSlider.disabled = capacity < 2;
|
| 365 |
byId('point-budget-min').textContent = formatPoints(Number(budgetSlider.min));
|
| 366 |
byId('point-budget-max').textContent = formatPoints(Number(budgetSlider.max));
|
|
|
|
| 6 |
import {StaticDemoViewer} from './static-demo-viewer.js';
|
| 7 |
import {predictedCameraView, SmoothCameraFollower} from './camera-follow.js';
|
| 8 |
import {CameraLayer} from './camera-layer.js';
|
| 9 |
+
import {DEFAULT_POINT_BUDGET, linspaceIndices} from './point-sampling.js';
|
| 10 |
import {FrameImageCache} from './frame-image-cache.js';
|
| 11 |
|
| 12 |
const byId = id => document.getElementById(id);
|
|
|
|
| 360 |
const budgetSlider = byId('point-budget');
|
| 361 |
budgetSlider.max = Math.max(1, capacity);
|
| 362 |
budgetSlider.min = Math.min(50_000, Number(budgetSlider.max));
|
| 363 |
+
budgetSlider.value = Math.min(DEFAULT_POINT_BUDGET, Number(budgetSlider.max));
|
| 364 |
budgetSlider.disabled = capacity < 2;
|
| 365 |
byId('point-budget-min').textContent = formatPoints(Number(budgetSlider.min));
|
| 366 |
byId('point-budget-max').textContent = formatPoints(Number(budgetSlider.max));
|
viewer/index.html
CHANGED
|
@@ -43,8 +43,8 @@
|
|
| 43 |
<div class="inspector-heading"><span class="eyebrow">MAKE IT YOUR PERSPECTIVE</span><h2>Scene studio<span>↗</span></h2><p>Real predictions. Your point of view.</p></div>
|
| 44 |
<section class="panel-section">
|
| 45 |
<div class="section-heading"><h3>Render budget</h3><span class="section-tag">RANDOM</span></div>
|
| 46 |
-
<div class="budget-readout"><strong id="point-budget-value">
|
| 47 |
-
<input id="point-budget" aria-label="Maximum rendered points" type="range" min="50000" max="2000000" value="
|
| 48 |
<div class="range-endpoints"><span id="point-budget-min">50K</span><span id="point-budget-max">2M</span></div>
|
| 49 |
<p id="point-budget-note" class="hint">Randomly sampled without replacement from loaded geometry. Lower the limit for a smoother view; predictions and downloads stay unchanged.</p>
|
| 50 |
</section>
|
|
@@ -71,7 +71,7 @@
|
|
| 71 |
<div class="range-field"><label class="field-title" for="track-confidence">Track confidence <output id="track-confidence-value">0.50</output></label><input id="track-confidence" type="range" min="0" max="1" step="0.01" value="0.5" disabled></div>
|
| 72 |
<label class="check"><span>Full trajectories</span><input id="full-trails" type="checkbox" disabled></label>
|
| 73 |
<p id="track-status" class="track-status" role="status"></p><p id="track-empty" class="hint" hidden></p>
|
| 74 |
-
<p id="track-confidence-note" class="hint">Tracking accuracy, independent of geometry confidence. Both segment endpoints must pass.</p><p id="track-note" class="hint">Fixed
|
| 75 |
</div></details>
|
| 76 |
<div class="inspector-footer"><span class="session-dot"></span>DISPLAY ONLY · PREDICTIONS UNCHANGED</div>
|
| 77 |
</aside>
|
|
|
|
| 43 |
<div class="inspector-heading"><span class="eyebrow">MAKE IT YOUR PERSPECTIVE</span><h2>Scene studio<span>↗</span></h2><p>Real predictions. Your point of view.</p></div>
|
| 44 |
<section class="panel-section">
|
| 45 |
<div class="section-heading"><h3>Render budget</h3><span class="section-tag">RANDOM</span></div>
|
| 46 |
+
<div class="budget-readout"><strong id="point-budget-value">500K</strong><span>point limit</span></div>
|
| 47 |
+
<input id="point-budget" aria-label="Maximum rendered points" type="range" min="50000" max="2000000" value="500000" step="1" disabled>
|
| 48 |
<div class="range-endpoints"><span id="point-budget-min">50K</span><span id="point-budget-max">2M</span></div>
|
| 49 |
<p id="point-budget-note" class="hint">Randomly sampled without replacement from loaded geometry. Lower the limit for a smoother view; predictions and downloads stay unchanged.</p>
|
| 50 |
</section>
|
|
|
|
| 71 |
<div class="range-field"><label class="field-title" for="track-confidence">Track confidence <output id="track-confidence-value">0.50</output></label><input id="track-confidence" type="range" min="0" max="1" step="0.01" value="0.5" disabled></div>
|
| 72 |
<label class="check"><span>Full trajectories</span><input id="full-trails" type="checkbox" disabled></label>
|
| 73 |
<p id="track-status" class="track-status" role="status"></p><p id="track-empty" class="hint" hidden></p>
|
| 74 |
+
<p id="track-confidence-note" class="hint">Tracking accuracy, independent of geometry confidence. Both segment endpoints must pass.</p><p id="track-note" class="hint">Fixed random subset of whole trajectories, shared across frames. Missing observations break trails. Full trajectories include future frames.</p>
|
| 75 |
</div></details>
|
| 76 |
<div class="inspector-footer"><span class="session-dot"></span>DISPLAY ONLY · PREDICTIONS UNCHANGED</div>
|
| 77 |
</aside>
|
viewer/point-cloud.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import * as THREE from 'three';
|
| 2 |
-
import {RandomPointSampler} from './point-sampling.js';
|
| 3 |
|
| 4 |
const MOTION_STATIC = 0;
|
| 5 |
const MOTION_NATIVE = 1;
|
|
@@ -79,7 +79,7 @@ export class PointCloud extends THREE.Points {
|
|
| 79 |
this.sort = {worker: null, version: 0, busy: false, timer: null, completed: 0};
|
| 80 |
this.frustumCulled = false;
|
| 81 |
this.count = 0;
|
| 82 |
-
this.pointBudget =
|
| 83 |
this.sampleStorage = new Uint32Array(capacity);
|
| 84 |
this.pointSampler = new RandomPointSampler(capacity);
|
| 85 |
this.sampleIndices = new Uint32Array();
|
|
|
|
| 1 |
import * as THREE from 'three';
|
| 2 |
+
import {DEFAULT_POINT_BUDGET, RandomPointSampler} from './point-sampling.js';
|
| 3 |
|
| 4 |
const MOTION_STATIC = 0;
|
| 5 |
const MOTION_NATIVE = 1;
|
|
|
|
| 79 |
this.sort = {worker: null, version: 0, busy: false, timer: null, completed: 0};
|
| 80 |
this.frustumCulled = false;
|
| 81 |
this.count = 0;
|
| 82 |
+
this.pointBudget = DEFAULT_POINT_BUDGET;
|
| 83 |
this.sampleStorage = new Uint32Array(capacity);
|
| 84 |
this.pointSampler = new RandomPointSampler(capacity);
|
| 85 |
this.sampleIndices = new Uint32Array();
|
viewer/point-sampling.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
|
|
|
|
|
| 1 |
export function linspaceIndices(total, limit) {
|
| 2 |
if (!Number.isSafeInteger(total) || total < 0 || total > 0xffffffff || !Number.isSafeInteger(limit) || limit < 0) throw new Error('Invalid point sampling budget');
|
| 3 |
const count = Math.min(total, limit);
|
|
|
|
| 1 |
+
export const DEFAULT_POINT_BUDGET = 500_000;
|
| 2 |
+
|
| 3 |
export function linspaceIndices(total, limit) {
|
| 4 |
if (!Number.isSafeInteger(total) || total < 0 || total > 0xffffffff || !Number.isSafeInteger(limit) || limit < 0) throw new Error('Invalid point sampling budget');
|
| 5 |
const count = Math.min(total, limit);
|