Spaces:
Running on RTX PRO 6000
Running on RTX PRO 6000
Add Robotiq and Standard Bots native USD viewer
Browse filesHand-push from indexing PR #51; until that PR merges, deploy-space from main can revert this viewer and partner catalog. Preserves existing native USD runtime files.
- docker/hf-space/nginx.conf.template +32 -1
- pipeline/library_media.py +7 -1
- pipeline/partner_viewer.py +229 -0
- services/explorer/dist/build-info.json +5 -5
- services/explorer/dist/index.html +1 -1
- services/explorer/dist/native-usd-runtime.json +1 -0
- services/explorer/dist/static/js/main.9eeeca83.js +0 -0
- services/explorer/dist/static/js/main.9eeeca83.js.LICENSE.txt +39 -0
- services/explorer/dist/static/js/usd-collider-edges.a7b903e8.chunk.js +1 -0
- services/explorer/dist/static/native-usd/1.0.0-rc4/3eb7e2d4525a58fb/LICENSE +16 -0
- services/explorer/dist/static/native-usd/1.0.0-rc4/3eb7e2d4525a58fb/LICENSE-APACHE-2.0.txt +201 -0
- services/explorer/dist/static/native-usd/1.0.0-rc4/3eb7e2d4525a58fb/LICENSE.3rdparty +87 -0
- services/explorer/dist/static/native-usd/1.0.0-rc4/3eb7e2d4525a58fb/THIRD-PARTY-NOTICES.txt +407 -0
- services/explorer/dist/static/native-usd/1.0.0-rc4/3eb7e2d4525a58fb/lightusd_next.js +2 -0
- services/explorer/dist/static/native-usd/1.0.0-rc4/3eb7e2d4525a58fb/lightusd_next.wasm +3 -0
- services/explorer/dist/static/native-usd/1.0.0-rc4/3eb7e2d4525a58fb/worker.js +426 -0
- services/explorer/dist/third-party-notices.txt +0 -0
docker/hf-space/nginx.conf.template
CHANGED
|
@@ -199,7 +199,7 @@ server {
|
|
| 199 |
location = /config.js {
|
| 200 |
default_type application/javascript;
|
| 201 |
add_header Cache-Control "no-cache, must-revalidate" always;
|
| 202 |
-
return 200 '(function(){var c="__CORPUS_NAME__";if(!c||c.indexOf("__")===0){c="usdsearch-dev";}window.__SERVER_MAPPING__={"usdsearch-dev":{"name":c+" (Hugging Face)","apiUrl":"","embedding_config":{"
|
| 203 |
}
|
| 204 |
# index.html must always revalidate (covers the try_files fallback too): a swap or rollback
|
| 205 |
# must not leave a browser holding an index.html that names deleted chunks.
|
|
@@ -285,6 +285,18 @@ server {
|
|
| 285 |
default_type application/json;
|
| 286 |
return 404 '{"detail":"Not Found"}';
|
| 287 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 288 |
# Library media — the Explorer's joints viewer (model.glb + articulation.json), moving-parts and drop-test
|
| 289 |
# clips, per asset of this corpus: static files pipeline/library_media.py fetches at container start from
|
| 290 |
# the artifact bucket (supervisord program library-media). Not there (not fetched yet, or none for
|
|
@@ -309,6 +321,25 @@ server {
|
|
| 309 |
gzip_static on;
|
| 310 |
add_header X-Content-Type-Options nosniff;
|
| 311 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 312 |
location /library_media/ {
|
| 313 |
root /app/hf-space-pipeline/.build; # .build/library_media/: outside .build/restore/, which the index restore empties
|
| 314 |
try_files $uri @slim_not_found;
|
|
|
|
| 199 |
location = /config.js {
|
| 200 |
default_type application/javascript;
|
| 201 |
add_header Cache-Control "no-cache, must-revalidate" always;
|
| 202 |
+
return 200 '(function(){var c="__CORPUS_NAME__";if(!c||c.indexOf("__")===0){c="usdsearch-dev";}var e={"field_name":"siglip2-embedding.embedding","dimension":1536};var f={"download":__DOWNLOAD_ENABLED__,"s3UrlRemap":false,"seedDefaultScope":false,"railFilters":["profiles","simready_metadata_asset_license","category"],"railDefaults":["profiles","simready_metadata_asset_license","category"],"propertyAliases":{"wikidata_qcode":"simready_metadata_qcode"},"propertyFilterCombine":"and","submitContentUrl":"__SUBMIT_CONTENT_URL__"};window.__SERVER_MAPPING__={"usdsearch-dev":{"name":c+" (Hugging Face)","apiUrl":"","embedding_config":e,"features":f},"hf-robotiq":{"name":"Robotiq","apiUrl":"","search_path":"/Robotiq-Official/simready-assets/","embedding_config":e,"features":Object.assign({},f,{"libraryPosters":"stills"}),"origin":{"kind":"hf","label":"Robotiq-Official/simready-assets"}},"hf-standardbots":{"name":"Standard Bots","apiUrl":"","search_path":"/standardbots/","embedding_config":e,"features":Object.assign({},f,{"libraryPosters":"stills"}),"origin":{"kind":"hf","label":"standardbots"}}};window.__DEFAULT_SERVER__="usdsearch-dev";})();';
|
| 203 |
}
|
| 204 |
# index.html must always revalidate (covers the try_files fallback too): a swap or rollback
|
| 205 |
# must not leave a browser holding an index.html that names deleted chunks.
|
|
|
|
| 285 |
default_type application/json;
|
| 286 |
return 404 '{"detail":"Not Found"}';
|
| 287 |
}
|
| 288 |
+
# Six qualified partner robots are installed from one SHA-pinned S3 ZIP by
|
| 289 |
+
# pipeline/partner_viewer.py. Its own viewer uses these root-relative paths;
|
| 290 |
+
# the USD path is narrower than the native-USD release service's route.
|
| 291 |
+
location ^~ /trial/ { root /app/hf-space-pipeline/.build/partner_viewer; index index.html; try_files $uri @slim_not_found; }
|
| 292 |
+
location ^~ /media/ { root /app/hf-space-pipeline/.build/partner_viewer; try_files $uri @slim_not_found; }
|
| 293 |
+
location ^~ /rust/ { root /app/hf-space-pipeline/.build/partner_viewer; try_files $uri @slim_not_found; }
|
| 294 |
+
location ^~ /three/ { root /app/hf-space-pipeline/.build/partner_viewer; try_files $uri @slim_not_found; }
|
| 295 |
+
location ^~ /usd-round2/ { root /app/hf-space-pipeline/.build/partner_viewer; try_files $uri @slim_not_found; }
|
| 296 |
+
location ^~ /usd/usd-central/rust-assets/hf- {
|
| 297 |
+
root /app/hf-space-pipeline/.build/partner_viewer;
|
| 298 |
+
try_files $uri @slim_not_found;
|
| 299 |
+
}
|
| 300 |
# Library media — the Explorer's joints viewer (model.glb + articulation.json), moving-parts and drop-test
|
| 301 |
# clips, per asset of this corpus: static files pipeline/library_media.py fetches at container start from
|
| 302 |
# the artifact bucket (supervisord program library-media). Not there (not fetched yet, or none for
|
|
|
|
| 321 |
gzip_static on;
|
| 322 |
add_header X-Content-Type-Options nosniff;
|
| 323 |
}
|
| 324 |
+
# The three picker entries share one physical corpus and one media archive.
|
| 325 |
+
# Keep partner URLs on the same files so a scoped picker can load their RTX
|
| 326 |
+
# media and native USD catalog without duplicating the archive on disk.
|
| 327 |
+
location = /library_media/hf-robotiq/usd-catalog.json {
|
| 328 |
+
root /app/hf-space-pipeline/.build;
|
| 329 |
+
default_type application/json;
|
| 330 |
+
add_header Cache-Control "no-cache" always;
|
| 331 |
+
}
|
| 332 |
+
location = /library_media/hf-standardbots/usd-catalog.json {
|
| 333 |
+
root /app/hf-space-pipeline/.build;
|
| 334 |
+
default_type application/json;
|
| 335 |
+
add_header Cache-Control "no-cache" always;
|
| 336 |
+
}
|
| 337 |
+
location ^~ /library_media/hf-robotiq/ {
|
| 338 |
+
rewrite ^/library_media/hf-robotiq/(.*)$ /library_media/usdsearch-dev/$1 last;
|
| 339 |
+
}
|
| 340 |
+
location ^~ /library_media/hf-standardbots/ {
|
| 341 |
+
rewrite ^/library_media/hf-standardbots/(.*)$ /library_media/usdsearch-dev/$1 last;
|
| 342 |
+
}
|
| 343 |
location /library_media/ {
|
| 344 |
root /app/hf-space-pipeline/.build; # .build/library_media/: outside .build/restore/, which the index restore empties
|
| 345 |
try_files $uri @slim_not_found;
|
pipeline/library_media.py
CHANGED
|
@@ -266,11 +266,17 @@ def fetch(env: dict[str, str], root: Path = MEDIA_ROOT, store=None) -> int:
|
|
| 266 |
|
| 267 |
|
| 268 |
def main() -> int:
|
|
|
|
| 269 |
try:
|
| 270 |
-
fetch(
|
| 271 |
except (Exception, SystemExit) as exc: # noqa: BLE001 — media are optional: never a failed program, never a retry loop
|
| 272 |
# (SystemExit too: artifact_store raises it when the bucket credentials are missing.)
|
| 273 |
print(f"==> library media: not fetched ({type(exc).__name__}: {str(exc)[:300]}) — none served", file=sys.stderr)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 274 |
return 0
|
| 275 |
|
| 276 |
|
|
|
|
| 266 |
|
| 267 |
|
| 268 |
def main() -> int:
|
| 269 |
+
env = dict(os.environ)
|
| 270 |
try:
|
| 271 |
+
fetch(env)
|
| 272 |
except (Exception, SystemExit) as exc: # noqa: BLE001 — media are optional: never a failed program, never a retry loop
|
| 273 |
# (SystemExit too: artifact_store raises it when the bucket credentials are missing.)
|
| 274 |
print(f"==> library media: not fetched ({type(exc).__name__}: {str(exc)[:300]}) — none served", file=sys.stderr)
|
| 275 |
+
try:
|
| 276 |
+
from .partner_viewer import fetch as fetch_partner_viewer
|
| 277 |
+
fetch_partner_viewer(env)
|
| 278 |
+
except (Exception, SystemExit) as exc: # noqa: BLE001 — this extra site must not stop the Space
|
| 279 |
+
print(f"==> partner viewer: not fetched ({type(exc).__name__}: {str(exc)[:300]})", file=sys.stderr)
|
| 280 |
return 0
|
| 281 |
|
| 282 |
|
pipeline/partner_viewer.py
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Install the six-asset Robotiq/Standard Bots browser viewer from a pinned S3 ZIP.
|
| 2 |
+
|
| 3 |
+
The Space keeps this 214 MB expanded site outside its Git repository. The ZIP
|
| 4 |
+
is uploaded write-once below each Space's pinned restore run in the artifact
|
| 5 |
+
bucket. Its SHA256 is pinned here so a restart installs exactly the approved
|
| 6 |
+
package. Optional Space variables may override the URI or digest.
|
| 7 |
+
"""
|
| 8 |
+
|
| 9 |
+
from __future__ import annotations
|
| 10 |
+
|
| 11 |
+
import hashlib
|
| 12 |
+
import json
|
| 13 |
+
import os
|
| 14 |
+
import re
|
| 15 |
+
import shutil
|
| 16 |
+
import zipfile
|
| 17 |
+
from pathlib import Path, PurePosixPath
|
| 18 |
+
|
| 19 |
+
from .config import BUILD_DIR, Config
|
| 20 |
+
from .library_media import INDEX_KEY, MEDIA_ROOT
|
| 21 |
+
|
| 22 |
+
PREFIX = "robotiq-standardbots-viewer/"
|
| 23 |
+
ROOT = BUILD_DIR / "partner_viewer"
|
| 24 |
+
MAX_FILES = 3000
|
| 25 |
+
MAX_EXPANDED = 300_000_000
|
| 26 |
+
MAX_FILE = 80_000_000
|
| 27 |
+
PACKAGE_NAME = "robotiq-standardbots-viewer.zip"
|
| 28 |
+
PACKAGE_SHA256 = "09facc4123b6b87bf22ad23a3dd6435e3a6c3d07fc625d61ce095557af949b20"
|
| 29 |
+
# The exact base_key values indexed by config/corpus.simready-assets.json.
|
| 30 |
+
# Three of the submitted dataset revisions differ from the media source
|
| 31 |
+
# revision, but their package paths and file hashes were checked identical.
|
| 32 |
+
BASE_KEYS = {
|
| 33 |
+
"Robotiq_2F_85": "hf://huggingface.co/datasets/Robotiq-Official/simready-assets/resolve/e6e8380e394fcf6fec437e8c56559f9aeb8b4a27/Robotiq_2F_85/simready_usd/Robotiq_2F_85.usda",
|
| 34 |
+
"Robotiq_2F_140": "hf://huggingface.co/datasets/Robotiq-Official/simready-assets/resolve/db3922996bee2ab0ba56ebe676c96d7664514c14/Robotiq_2F_140/simready_usd/Robotiq_2F_140.usda",
|
| 35 |
+
"Robotiq_Hand_E": "hf://huggingface.co/datasets/Robotiq-Official/simready-assets/resolve/caebd2848c56ee9db57c0a4bb8ac371924751b6a/Robotiq_Hand_E/simready_usd/Robotiq_Hand_E.usda",
|
| 36 |
+
"standardbots_core": "hf://huggingface.co/datasets/standardbots/simready-core/resolve/456dc1397e969780ec5a40c6c21f3c764d9e3906/standardbots_core/core/standardbots_core.usd",
|
| 37 |
+
"standardbots_spark": "hf://huggingface.co/datasets/standardbots/simready-spark/resolve/a64078b146c8d34f3edbd401fe9fbd8547f15778/standardbots_spark/spark/standardbots_spark.usd",
|
| 38 |
+
"standardbots_thor": "hf://huggingface.co/datasets/standardbots/simready-thor/resolve/36e597c735e486bc77af93ec7e48e3be5541cd2a/standardbots_thor/thor/standardbots_thor.usd",
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
def _sha256(path: Path) -> str:
|
| 43 |
+
digest = hashlib.sha256()
|
| 44 |
+
with path.open("rb") as source:
|
| 45 |
+
for block in iter(lambda: source.read(1 << 20), b""):
|
| 46 |
+
digest.update(block)
|
| 47 |
+
return digest.hexdigest()
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
def unpack(archive: Path, dest: Path) -> int:
|
| 51 |
+
"""Extract only regular files under the known site root and check six assets."""
|
| 52 |
+
with zipfile.ZipFile(archive) as source:
|
| 53 |
+
members = source.infolist()
|
| 54 |
+
if len(members) > MAX_FILES or sum(i.file_size for i in members) > MAX_EXPANDED:
|
| 55 |
+
raise ValueError("partner viewer ZIP exceeds its file or byte budget")
|
| 56 |
+
for item in members:
|
| 57 |
+
path = PurePosixPath(item.filename)
|
| 58 |
+
mode = (item.external_attr >> 16) & 0o170000
|
| 59 |
+
if (not item.filename.startswith(PREFIX) or path.is_absolute()
|
| 60 |
+
or ".." in path.parts or item.file_size > MAX_FILE
|
| 61 |
+
or mode not in (0, 0o040000, 0o100000)):
|
| 62 |
+
raise ValueError(f"unsafe partner viewer member: {item.filename!r}")
|
| 63 |
+
relative = PurePosixPath(*path.parts[1:])
|
| 64 |
+
if not relative.parts or item.is_dir():
|
| 65 |
+
continue
|
| 66 |
+
target = dest.joinpath(*relative.parts)
|
| 67 |
+
target.parent.mkdir(parents=True, exist_ok=True)
|
| 68 |
+
with source.open(item) as contents, target.open("wb") as output:
|
| 69 |
+
shutil.copyfileobj(contents, output, 1 << 20)
|
| 70 |
+
|
| 71 |
+
rows = json.loads((dest / "trial" / "assets.json").read_text())
|
| 72 |
+
if (len(rows) != 6 or {r.get("label") for r in rows} != set(BASE_KEYS)
|
| 73 |
+
or {r.get("index") for r in rows} != {"hf-robotiq", "hf-standardbots"}
|
| 74 |
+
or sum(r.get("index") == "hf-robotiq" for r in rows) != 3):
|
| 75 |
+
raise ValueError("partner viewer asset list is not three Robotiq plus three Standard Bots")
|
| 76 |
+
for row in rows:
|
| 77 |
+
for key in ("rtxThumbnail", "rtx360", "rtxMotion"):
|
| 78 |
+
path = PurePosixPath(row[key])
|
| 79 |
+
if not row[key].startswith("/") or ".." in path.parts or not dest.joinpath(*path.parts[1:]).is_file():
|
| 80 |
+
raise ValueError(f"partner viewer is missing {row.get('id')} {key}")
|
| 81 |
+
model = PurePosixPath(row["nativeBaseline"]["url"])
|
| 82 |
+
if ".." in model.parts or not dest.joinpath(*model.parts[1:]).is_file():
|
| 83 |
+
raise ValueError(f"partner viewer is missing {row.get('id')} USD")
|
| 84 |
+
qualification = json.loads((dest / "qualification.json").read_text())
|
| 85 |
+
if (len(qualification) != 6 or not all(
|
| 86 |
+
q["nativeBrowser"]["passed"] and q["motion"]["passed"]
|
| 87 |
+
and q["motion"]["cutFrames"] == 0 and q["spin"]["frames"] == 72
|
| 88 |
+
for q in qualification)):
|
| 89 |
+
raise ValueError("partner viewer qualification is incomplete")
|
| 90 |
+
return len(rows)
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
def install_media(viewer: Path, media_root: Path = MEDIA_ROOT) -> int:
|
| 94 |
+
"""Add the six RTX renders to the Explorer's manifest and file tree."""
|
| 95 |
+
rows = json.loads((viewer / "trial" / "assets.json").read_text())
|
| 96 |
+
tree = media_root / INDEX_KEY
|
| 97 |
+
tree.mkdir(parents=True, exist_ok=True)
|
| 98 |
+
manifest_path = tree / "manifest.json"
|
| 99 |
+
manifest = json.loads(manifest_path.read_text()) if manifest_path.is_file() else {
|
| 100 |
+
"version": 1, "index": INDEX_KEY, "assets": {},
|
| 101 |
+
}
|
| 102 |
+
if manifest.get("version") != 1 or not isinstance(manifest.get("assets"), dict):
|
| 103 |
+
raise ValueError("base library media manifest is malformed")
|
| 104 |
+
additions = {}
|
| 105 |
+
for row in rows:
|
| 106 |
+
label = row["label"]
|
| 107 |
+
base_key = BASE_KEYS[label]
|
| 108 |
+
folder = PurePosixPath(row["rtxThumbnail"]).parts[2]
|
| 109 |
+
source = viewer / "media" / folder
|
| 110 |
+
if not source.is_dir() or not all((source / f).is_file() for f in (
|
| 111 |
+
"still_tile.jpg", "still_poster.jpg", "spin_card.mp4", "jointsclip_rtx.mp4",
|
| 112 |
+
"jointsclip_rtx_card.mp4", "jointsclip_rtx_poster.webp")):
|
| 113 |
+
raise ValueError(f"incomplete RTX media for {label}")
|
| 114 |
+
spin = json.loads((source / "spin.json").read_text())
|
| 115 |
+
if spin.get("frames") != 72 or spin.get("files", {}).get("pattern") != "spin_{k:03d}.webp":
|
| 116 |
+
raise ValueError(f"invalid spin metadata for {label}")
|
| 117 |
+
if not all((source / f"spin_{k:03d}.webp").is_file() for k in range(72)):
|
| 118 |
+
raise ValueError(f"incomplete 72-frame RTX spin for {label}")
|
| 119 |
+
spin["v"] = _sha256(source / "spin.json")[:12]
|
| 120 |
+
spin["files"]["card"] = "spin_card.mp4"
|
| 121 |
+
clip = json.loads((source / "rtxclip.json").read_text())
|
| 122 |
+
additions[base_key] = {
|
| 123 |
+
"id": folder,
|
| 124 |
+
"still": {"v": _sha256(source / "still.json")[:12],
|
| 125 |
+
"files": {"tile": "still_tile.jpg", "poster": "still_poster.jpg"},
|
| 126 |
+
"meta": json.loads((source / "still.json").read_text())},
|
| 127 |
+
"spin": spin,
|
| 128 |
+
"rtxclip": {"v": _sha256(source / "rtxclip.json")[:12],
|
| 129 |
+
"files": {"textured": "jointsclip_rtx.mp4", "card": "jointsclip_rtx_card.mp4",
|
| 130 |
+
"poster": "jointsclip_rtx_poster.webp"},
|
| 131 |
+
"size": [clip["width"], clip["height"]], "crop": clip.get("crop"), "meta": clip},
|
| 132 |
+
}
|
| 133 |
+
target = tree / folder
|
| 134 |
+
if target.exists():
|
| 135 |
+
shutil.rmtree(target)
|
| 136 |
+
# Both trees sit below BUILD_DIR: hard links avoid a second media copy.
|
| 137 |
+
shutil.copytree(source, target, copy_function=os.link)
|
| 138 |
+
manifest["assets"].update(additions)
|
| 139 |
+
part = manifest_path.with_suffix(".json.part")
|
| 140 |
+
part.write_text(json.dumps(manifest, separators=(",", ":")))
|
| 141 |
+
os.replace(part, manifest_path)
|
| 142 |
+
install_catalogs(viewer, media_root)
|
| 143 |
+
return len(additions)
|
| 144 |
+
|
| 145 |
+
|
| 146 |
+
def install_catalogs(viewer: Path, media_root: Path = MEDIA_ROOT) -> None:
|
| 147 |
+
"""Publish exact-source native USD catalogs for the two Explorer scopes."""
|
| 148 |
+
rows = json.loads((viewer / "trial" / "assets.json").read_text())
|
| 149 |
+
qualifications = {q["assetId"]: q for q in json.loads((viewer / "qualification.json").read_text())}
|
| 150 |
+
grouped = {"hf-robotiq": [], "hf-standardbots": []}
|
| 151 |
+
for row in rows:
|
| 152 |
+
label, index, asset_id = row["label"], row["index"], row["id"]
|
| 153 |
+
q = qualifications[asset_id]
|
| 154 |
+
native = row["nativeBaseline"]
|
| 155 |
+
model = viewer / native["url"].lstrip("/")
|
| 156 |
+
binding = json.loads((model.parent / "binding-audit.json").read_text())
|
| 157 |
+
if (index not in grouped or q["index"] != index or q["label"] != label
|
| 158 |
+
or q["browserUsdSha256"] != native["sha256"]
|
| 159 |
+
or _sha256(model) != native["sha256"] or model.stat().st_size != native["bytes"]
|
| 160 |
+
or not binding["bindings"]
|
| 161 |
+
or not q["nativeBrowser"]["passed"] or q["nativeBrowser"]["meshes"] < 1
|
| 162 |
+
or q["nativeBrowser"]["movableJoints"] < 1 or not q["motion"]["passed"]):
|
| 163 |
+
raise ValueError(f"unqualified partner USD catalog entry: {label}")
|
| 164 |
+
grouped[index].append({
|
| 165 |
+
"id": asset_id, "label": label, "index": index,
|
| 166 |
+
"source": BASE_KEYS[label].replace("hf://", "https://", 1),
|
| 167 |
+
"status": "ready", "nativeBaseline": native,
|
| 168 |
+
"interaction": "articulated",
|
| 169 |
+
"sourceJointCount": q["nativeBrowser"]["movableJoints"],
|
| 170 |
+
"qualification": {"passed": True, "sourceSha256": native["sha256"],
|
| 171 |
+
"interaction": "articulated", "geometry": True,
|
| 172 |
+
"materials": True, "interactionPassed": True},
|
| 173 |
+
})
|
| 174 |
+
for index, entries in grouped.items():
|
| 175 |
+
if len(entries) != 3:
|
| 176 |
+
raise ValueError(f"expected three qualified assets in {index}")
|
| 177 |
+
folder = media_root / index
|
| 178 |
+
folder.mkdir(parents=True, exist_ok=True)
|
| 179 |
+
path = folder / "usd-catalog.json"
|
| 180 |
+
part = path.with_suffix(".json.part")
|
| 181 |
+
part.write_text(json.dumps({"version": 1, "profile": "usd-central-assets-v1",
|
| 182 |
+
"index": index, "examples": entries}, separators=(",", ":")))
|
| 183 |
+
os.replace(part, path)
|
| 184 |
+
|
| 185 |
+
|
| 186 |
+
def fetch(env: dict[str, str], root: Path = ROOT, store=None) -> int:
|
| 187 |
+
corpus = env.get("CORPUS_NAME", "").strip()
|
| 188 |
+
run_id = env.get("RESTORE_RUN_ID", "").strip()
|
| 189 |
+
if corpus != "simready-assets" or not run_id:
|
| 190 |
+
return 0
|
| 191 |
+
if not re.fullmatch(r"[A-Za-z0-9_-]+", run_id):
|
| 192 |
+
raise ValueError("RESTORE_RUN_ID is not a safe pinned run")
|
| 193 |
+
expected = env.get("PARTNER_VIEWER_SHA256", "").strip().lower() or PACKAGE_SHA256
|
| 194 |
+
if len(expected) != 64 or any(c not in "0123456789abcdef" for c in expected):
|
| 195 |
+
raise ValueError("PARTNER_VIEWER_SHA256 must be a lowercase SHA256 digest")
|
| 196 |
+
if store is None:
|
| 197 |
+
from . import artifact_store as store
|
| 198 |
+
cfg = Config(values=dict(env))
|
| 199 |
+
uri = env.get("PARTNER_VIEWER_S3_URI", "").strip() or (
|
| 200 |
+
f"{store.bucket_base(cfg).rstrip('/')}/{corpus}/{run_id}/library-media/partner-viewer/{PACKAGE_NAME}")
|
| 201 |
+
if not uri.startswith(store.bucket_base(cfg).rstrip("/") + "/"):
|
| 202 |
+
raise ValueError("partner viewer URI is outside the configured artifact bucket")
|
| 203 |
+
if ("/library-media/partner-viewer/" not in uri
|
| 204 |
+
or not uri.startswith(
|
| 205 |
+
f"{store.bucket_base(cfg).rstrip('/')}/{corpus}/{run_id}/library-media/partner-viewer/")):
|
| 206 |
+
raise ValueError("partner viewer must belong to the restored simready-assets run's library media")
|
| 207 |
+
root.parent.mkdir(parents=True, exist_ok=True)
|
| 208 |
+
tmp = root.with_name(root.name + ".download")
|
| 209 |
+
shutil.rmtree(tmp, ignore_errors=True)
|
| 210 |
+
try:
|
| 211 |
+
archive = tmp / "viewer.zip"
|
| 212 |
+
archive.parent.mkdir(parents=True)
|
| 213 |
+
if not store.download_file(cfg, uri, archive):
|
| 214 |
+
raise FileNotFoundError(uri)
|
| 215 |
+
actual = _sha256(archive)
|
| 216 |
+
if actual != expected:
|
| 217 |
+
raise ValueError(f"partner viewer SHA256 mismatch: {actual}")
|
| 218 |
+
count = unpack(archive, tmp / "tree")
|
| 219 |
+
old = root.with_name(root.name + ".old")
|
| 220 |
+
shutil.rmtree(old, ignore_errors=True)
|
| 221 |
+
if root.exists():
|
| 222 |
+
root.rename(old)
|
| 223 |
+
(tmp / "tree").rename(root)
|
| 224 |
+
shutil.rmtree(old, ignore_errors=True)
|
| 225 |
+
install_media(root)
|
| 226 |
+
print(f"==> partner viewer: {count} native USD assets from {uri}")
|
| 227 |
+
return count
|
| 228 |
+
finally:
|
| 229 |
+
shutil.rmtree(tmp, ignore_errors=True)
|
services/explorer/dist/build-info.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
{
|
| 2 |
"product": "simready-central-slim-explorer",
|
| 3 |
-
"version": "slim-usd-
|
| 4 |
-
"bundle_id": "main.
|
| 5 |
-
"built_at": "2026-10-
|
| 6 |
"flags": {
|
| 7 |
"public_mode": true,
|
| 8 |
"email_auth": false,
|
|
@@ -35,5 +35,5 @@
|
|
| 35 |
"native_usd": true,
|
| 36 |
"usd_reader": "rust-pilot-v1"
|
| 37 |
},
|
| 38 |
-
"source": "
|
| 39 |
-
}
|
|
|
|
| 1 |
{
|
| 2 |
"product": "simready-central-slim-explorer",
|
| 3 |
+
"version": "slim-partner-usd-efb47b55",
|
| 4 |
+
"bundle_id": "main.9eeeca83.js",
|
| 5 |
+
"built_at": "2026-10-13T17:33:20Z",
|
| 6 |
"flags": {
|
| 7 |
"public_mode": true,
|
| 8 |
"email_auth": false,
|
|
|
|
| 35 |
"native_usd": true,
|
| 36 |
"usd_reader": "rust-pilot-v1"
|
| 37 |
},
|
| 38 |
+
"source": "efb47b55"
|
| 39 |
+
}
|
services/explorer/dist/index.html
CHANGED
|
@@ -1 +1 @@
|
|
| 1 |
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/ds.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="SimReady Central — SimReady asset search"/><meta name="ui-version" content="slim-
|
|
|
|
| 1 |
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/ds.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="SimReady Central — SimReady asset search"/><meta name="ui-version" content="slim-partner-usd-efb47b55"><script src="/config.js"></script><title>SimReady Central</title><script defer="defer" src="/static/js/main.9eeeca83.js"></script><link href="/static/css/main.1d1f5271.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
services/explorer/dist/native-usd-runtime.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version":1,"reader":"lightusd-next","readerVersion":"1.0.0-rc4","worker":"static/native-usd/1.0.0-rc4/3eb7e2d4525a58fb/worker.js","revision":"3eb7e2d4525a58fb","wasmBytes":1672421}
|
services/explorer/dist/static/js/main.9eeeca83.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
services/explorer/dist/static/js/main.9eeeca83.js.LICENSE.txt
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* @license React
|
| 3 |
+
* react-dom.production.min.js
|
| 4 |
+
*
|
| 5 |
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
| 6 |
+
*
|
| 7 |
+
* This source code is licensed under the MIT license found in the
|
| 8 |
+
* LICENSE file in the root directory of this source tree.
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
/**
|
| 12 |
+
* @license React
|
| 13 |
+
* react-jsx-runtime.production.min.js
|
| 14 |
+
*
|
| 15 |
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
| 16 |
+
*
|
| 17 |
+
* This source code is licensed under the MIT license found in the
|
| 18 |
+
* LICENSE file in the root directory of this source tree.
|
| 19 |
+
*/
|
| 20 |
+
|
| 21 |
+
/**
|
| 22 |
+
* @license React
|
| 23 |
+
* react.production.min.js
|
| 24 |
+
*
|
| 25 |
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
| 26 |
+
*
|
| 27 |
+
* This source code is licensed under the MIT license found in the
|
| 28 |
+
* LICENSE file in the root directory of this source tree.
|
| 29 |
+
*/
|
| 30 |
+
|
| 31 |
+
/**
|
| 32 |
+
* @license React
|
| 33 |
+
* scheduler.production.min.js
|
| 34 |
+
*
|
| 35 |
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
| 36 |
+
*
|
| 37 |
+
* This source code is licensed under the MIT license found in the
|
| 38 |
+
* LICENSE file in the root directory of this source tree.
|
| 39 |
+
*/
|
services/explorer/dist/static/js/usd-collider-edges.a7b903e8.chunk.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
(()=>{"use strict";var e={90(e,r,s){var t=s(9435);globalThis.onmessage=e=>{let r,s,{data:{id:o,positions:i,threshold:a}}=e;try{r=new t.LoY,r.setAttribute("position",new t.THS(i,3)),s=new t.TDQ(r,a);const e=s.getAttribute("position").array;globalThis.postMessage({id:o,positions:e},[e.buffer])}catch(l){globalThis.postMessage({id:o,error:l.message||String(l)})}finally{var n,p;null===(n=r)||void 0===n||n.dispose(),null===(p=s)||void 0===p||p.dispose()}}}},r={};function s(t){var o=r[t];if(void 0!==o)return o.exports;var i=r[t]={exports:{}};return e[t](i,i.exports,s),i.exports}s.m=e,s.x=()=>{var e=s.O(void 0,[435],()=>s(90));return e=s.O(e)},(()=>{var e=[];s.O=(r,t,o,i)=>{if(!t){var a=1/0;for(f=0;f<e.length;f++){for(var[t,o,i]=e[f],n=!0,p=0;p<t.length;p++)(!1&i||a>=i)&&Object.keys(s.O).every(e=>s.O[e](t[p]))?t.splice(p--,1):(n=!1,i<a&&(a=i));if(n){e.splice(f--,1);var l=o();void 0!==l&&(r=l)}}return r}i=i||0;for(var f=e.length;f>0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[t,o,i]}})(),s.d=(e,r)=>{for(var t in r)s.o(r,t)&&!s.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce((r,t)=>(s.f[t](e,r),r),[])),s.u=e=>"static/js/"+e+".31dcfdae.chunk.js",s.miniCssF=e=>{},s.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),s.p="/",(()=>{var e={531:1};s.f.i=(r,t)=>{e[r]||importScripts(s.p+s.u(r))};var r=self.webpackChunkdeepsearch_ui=self.webpackChunkdeepsearch_ui||[],t=r.push.bind(r);r.push=r=>{var[o,i,a]=r;for(var n in i)s.o(i,n)&&(s.m[n]=i[n]);for(a&&a(s);o.length;)e[o.pop()]=1;t(r)}})(),(()=>{var e=s.x;s.x=()=>s.e(435).then(e)})();s.x()})();
|
services/explorer/dist/static/native-usd/1.0.0-rc4/3eb7e2d4525a58fb/LICENSE
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Apache 2.0 License
|
| 2 |
+
|
| 3 |
+
Copyright (c) 2020-2023 Syoyo Fujita
|
| 4 |
+
Copyright (c) 2024-Present Light Transport Entertainment Inc.
|
| 5 |
+
|
| 6 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 7 |
+
you may not use this file except in compliance with the License.
|
| 8 |
+
You may obtain a copy of the License at
|
| 9 |
+
|
| 10 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 11 |
+
|
| 12 |
+
Unless required by applicable law or agreed to in writing, software
|
| 13 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 14 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 15 |
+
See the License for the specific language governing permissions and
|
| 16 |
+
limitations under the License.
|
services/explorer/dist/static/native-usd/1.0.0-rc4/3eb7e2d4525a58fb/LICENSE-APACHE-2.0.txt
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Apache License
|
| 2 |
+
Version 2.0, January 2004
|
| 3 |
+
http://www.apache.org/licenses/
|
| 4 |
+
|
| 5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 6 |
+
|
| 7 |
+
1. Definitions.
|
| 8 |
+
|
| 9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 11 |
+
|
| 12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 13 |
+
the copyright owner that is granting the License.
|
| 14 |
+
|
| 15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 16 |
+
other entities that control, are controlled by, or are under common
|
| 17 |
+
control with that entity. For the purposes of this definition,
|
| 18 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 19 |
+
direction or management of such entity, whether by contract or
|
| 20 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 21 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 22 |
+
|
| 23 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 24 |
+
exercising permissions granted by this License.
|
| 25 |
+
|
| 26 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 27 |
+
including but not limited to software source code, documentation
|
| 28 |
+
source, and configuration files.
|
| 29 |
+
|
| 30 |
+
"Object" form shall mean any form resulting from mechanical
|
| 31 |
+
transformation or translation of a Source form, including but
|
| 32 |
+
not limited to compiled object code, generated documentation,
|
| 33 |
+
and conversions to other media types.
|
| 34 |
+
|
| 35 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 36 |
+
Object form, made available under the License, as indicated by a
|
| 37 |
+
copyright notice that is included in or attached to the work
|
| 38 |
+
(an example is provided in the Appendix below).
|
| 39 |
+
|
| 40 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 41 |
+
form, that is based on (or derived from) the Work and for which the
|
| 42 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 43 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 44 |
+
of this License, Derivative Works shall not include works that remain
|
| 45 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 46 |
+
the Work and Derivative Works thereof.
|
| 47 |
+
|
| 48 |
+
"Contribution" shall mean any work of authorship, including
|
| 49 |
+
the original version of the Work and any modifications or additions
|
| 50 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 51 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 52 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 53 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 54 |
+
means any form of electronic, verbal, or written communication sent
|
| 55 |
+
to the Licensor or its representatives, including but not limited to
|
| 56 |
+
communication on electronic mailing lists, source code control systems,
|
| 57 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 58 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 59 |
+
excluding communication that is conspicuously marked or otherwise
|
| 60 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 61 |
+
|
| 62 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 63 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 64 |
+
subsequently incorporated within the Work.
|
| 65 |
+
|
| 66 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 67 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 68 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 69 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 70 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 71 |
+
Work and such Derivative Works in Source or Object form.
|
| 72 |
+
|
| 73 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 74 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 75 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 76 |
+
(except as stated in this section) patent license to make, have made,
|
| 77 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 78 |
+
where such license applies only to those patent claims licensable
|
| 79 |
+
by such Contributor that are necessarily infringed by their
|
| 80 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 81 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 82 |
+
institute patent litigation against any entity (including a
|
| 83 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 84 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 85 |
+
or contributory patent infringement, then any patent licenses
|
| 86 |
+
granted to You under this License for that Work shall terminate
|
| 87 |
+
as of the date such litigation is filed.
|
| 88 |
+
|
| 89 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 90 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 91 |
+
modifications, and in Source or Object form, provided that You
|
| 92 |
+
meet the following conditions:
|
| 93 |
+
|
| 94 |
+
(a) You must give any other recipients of the Work or
|
| 95 |
+
Derivative Works a copy of this License; and
|
| 96 |
+
|
| 97 |
+
(b) You must cause any modified files to carry prominent notices
|
| 98 |
+
stating that You changed the files; and
|
| 99 |
+
|
| 100 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 101 |
+
that You distribute, all copyright, patent, trademark, and
|
| 102 |
+
attribution notices from the Source form of the Work,
|
| 103 |
+
excluding those notices that do not pertain to any part of
|
| 104 |
+
the Derivative Works; and
|
| 105 |
+
|
| 106 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 107 |
+
distribution, then any Derivative Works that You distribute must
|
| 108 |
+
include a readable copy of the attribution notices contained
|
| 109 |
+
within such NOTICE file, excluding those notices that do not
|
| 110 |
+
pertain to any part of the Derivative Works, in at least one
|
| 111 |
+
of the following places: within a NOTICE text file distributed
|
| 112 |
+
as part of the Derivative Works; within the Source form or
|
| 113 |
+
documentation, if provided along with the Derivative Works; or,
|
| 114 |
+
within a display generated by the Derivative Works, if and
|
| 115 |
+
wherever such third-party notices normally appear. The contents
|
| 116 |
+
of the NOTICE file are for informational purposes only and
|
| 117 |
+
do not modify the License. You may add Your own attribution
|
| 118 |
+
notices within Derivative Works that You distribute, alongside
|
| 119 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 120 |
+
that such additional attribution notices cannot be construed
|
| 121 |
+
as modifying the License.
|
| 122 |
+
|
| 123 |
+
You may add Your own copyright statement to Your modifications and
|
| 124 |
+
may provide additional or different license terms and conditions
|
| 125 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 126 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 127 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 128 |
+
the conditions stated in this License.
|
| 129 |
+
|
| 130 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 131 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 132 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 133 |
+
this License, without any additional terms or conditions.
|
| 134 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 135 |
+
the terms of any separate license agreement you may have executed
|
| 136 |
+
with Licensor regarding such Contributions.
|
| 137 |
+
|
| 138 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 139 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 140 |
+
except as required for reasonable and customary use in describing the
|
| 141 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 142 |
+
|
| 143 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 144 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 145 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 146 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 147 |
+
implied, including, without limitation, any warranties or conditions
|
| 148 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 149 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 150 |
+
appropriateness of using or redistributing the Work and assume any
|
| 151 |
+
risks associated with Your exercise of permissions under this License.
|
| 152 |
+
|
| 153 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 154 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 155 |
+
unless required by applicable law (such as deliberate and grossly
|
| 156 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 157 |
+
liable to You for damages, including any direct, indirect, special,
|
| 158 |
+
incidental, or consequential damages of any character arising as a
|
| 159 |
+
result of this License or out of the use or inability to use the
|
| 160 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 161 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 162 |
+
other commercial damages or losses), even if such Contributor
|
| 163 |
+
has been advised of the possibility of such damages.
|
| 164 |
+
|
| 165 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 166 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 167 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 168 |
+
or other liability obligations and/or rights consistent with this
|
| 169 |
+
License. However, in accepting such obligations, You may act only
|
| 170 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 171 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 172 |
+
defend, and hold each Contributor harmless for any liability
|
| 173 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 174 |
+
of your accepting any such warranty or additional liability.
|
| 175 |
+
|
| 176 |
+
END OF TERMS AND CONDITIONS
|
| 177 |
+
|
| 178 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 179 |
+
|
| 180 |
+
To apply the Apache License to your work, attach the following
|
| 181 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 182 |
+
replaced with your own identifying information. (Don't include
|
| 183 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 184 |
+
comment syntax for the file format. We also recommend that a
|
| 185 |
+
file or class name and description of purpose be included on the
|
| 186 |
+
same "printed page" as the copyright notice for easier
|
| 187 |
+
identification within third-party archives.
|
| 188 |
+
|
| 189 |
+
Copyright 2019-2026 Binomial LLC
|
| 190 |
+
|
| 191 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 192 |
+
you may not use this file except in compliance with the License.
|
| 193 |
+
You may obtain a copy of the License at
|
| 194 |
+
|
| 195 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 196 |
+
|
| 197 |
+
Unless required by applicable law or agreed to in writing, software
|
| 198 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 199 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 200 |
+
See the License for the specific language governing permissions and
|
| 201 |
+
limitations under the License.
|
services/explorer/dist/static/native-usd/1.0.0-rc4/3eb7e2d4525a58fb/LICENSE.3rdparty
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Third-Party Notices
|
| 2 |
+
|
| 3 |
+
This file summarizes third-party code and data redistributed in this repository.
|
| 4 |
+
The authoritative license text is the license file or source header referenced
|
| 5 |
+
in each entry.
|
| 6 |
+
|
| 7 |
+
## Core And Runtime Dependencies
|
| 8 |
+
|
| 9 |
+
| Component | License | Location |
|
| 10 |
+
| --- | --- | --- |
|
| 11 |
+
| nonstd optional-lite, expected-lite, span-lite, string-view-lite | Boost Software License 1.0 | `src/nonstd/*.hpp` |
|
| 12 |
+
| LZ4 | BSD 2-Clause | `src/lz4/LICENSE` |
|
| 13 |
+
| miniz | MIT | `src/external/LICENSE.miniz` |
|
| 14 |
+
| Zstandard | BSD-style or GPLv2 | `src/external/zstd.h`, `src/external/zstd.c` |
|
| 15 |
+
| yyjson | MIT | `src/external/yyjson.LICENSE` |
|
| 16 |
+
| pugixml | MIT | `src/external/pugixml.LICENSE` |
|
| 17 |
+
| nlohmann/json | MIT | `src/external/jsonhpp/LICENSE.MIT` |
|
| 18 |
+
| fast_float | Apache 2.0, Boost Software License 1.0, or MIT | `src/external/fast_float/` |
|
| 19 |
+
| Dragonbox | Boost Software License 1.0 or Apache 2.0 with LLVM exception | `src/external/dragonbox/` |
|
| 20 |
+
| Mapbox earcut.hpp | ISC | `src/external/mapbox/earcut/LICENSE` |
|
| 21 |
+
| Mapbox eternal | ISC | `src/external/mapbox/eternal/LICENSE.md` |
|
| 22 |
+
| simple_match | Boost Software License 1.0 | `src/external/simple_match/LICENSE_1_0.txt` |
|
| 23 |
+
| string_id | zlib | `src/external/string_id/LICENSE` |
|
| 24 |
+
| ghc/filesystem | MIT | `src/external/filesystem/LICENSE` |
|
| 25 |
+
| p-ranav/glob | MIT | `src/external/glob/LICENSE` |
|
| 26 |
+
| nanoflann | BSD 2-Clause | `src/external/nanoflann.COPYING` |
|
| 27 |
+
| linalg.h | Unlicense | `src/external/linalg.UNLICENSE` |
|
| 28 |
+
| jeaiii_to_text | MIT | `src/external/jeaiii_to_text.LICENSE` |
|
| 29 |
+
| xxHash | BSD 2-Clause | `src/external/xxhash.LICENSE` |
|
| 30 |
+
| tinycolorio | MIT | `src/external/tinycolorio.LICENSE` |
|
| 31 |
+
| stb_image, stb_image_resize, stb_image_write, stb_truetype | Public domain or MIT | `src/external/stb_*.h` |
|
| 32 |
+
| TinyEXR and included OpenEXR code | BSD-style | `src/external/tinyexr.h` |
|
| 33 |
+
| TinyDNG | MIT | `src/external/tiny_dng_loader.h`, `src/external/tiny_dng_writer.h` |
|
| 34 |
+
| tinyobjloader | MIT | `src/external/tiny_obj_loader.h` |
|
| 35 |
+
| tinygltf | MIT | `src/external/tiny_gltf.h` |
|
| 36 |
+
| pystring | BSD 3-Clause | `src/external/pystring.LICENSE` |
|
| 37 |
+
| fpng | Unlicense | `src/external/fpng.h`, `src/external/fpng.cpp` |
|
| 38 |
+
| Wuffs unsupported snapshot | Apache 2.0 | `src/external/wuffs-unsupported-snapshot.c` |
|
| 39 |
+
| MikkTSpace | zlib | `src/external/mikktspace/LICENSE` |
|
| 40 |
+
| sRGB transform by Project Nayuki | MIT | `src/image-util.cc` |
|
| 41 |
+
| OpenSubdiv | Modified Apache 2.0 | `src/osd/LICENSE.txt` |
|
| 42 |
+
| MaterialX data | Apache 2.0 | `data/materialx/LICENSE` |
|
| 43 |
+
|
| 44 |
+
## Optional Feature Dependencies
|
| 45 |
+
|
| 46 |
+
| Component | License | Location |
|
| 47 |
+
| --- | --- | --- |
|
| 48 |
+
| meshoptimizer | MIT | `src/external/meshoptimizer/LICENSE.md` |
|
| 49 |
+
| OpenFBX | MIT | `src/external/OpenFBX/LICENSE` |
|
| 50 |
+
| ALAC | Apache 2.0 | `src/external/alac/LICENSE` |
|
| 51 |
+
| dr_wav, dr_mp3 | Public domain or MIT-0 | `src/external/dr_wav.h`, `src/external/dr_mp3.h` |
|
| 52 |
+
| ogt_vox | MIT | `src/external/LICENSE.ogt_vox.md` |
|
| 53 |
+
| WebAssembly Micro Runtime (WAMR) | Apache 2.0 | `src/external/wamr/LICENSE` |
|
| 54 |
+
| QuickJS-ng | MIT | `src/external/quickjs-ng/LICENSE` |
|
| 55 |
+
| civetweb | MIT | `src/external/civetweb/LICENSE.md` |
|
| 56 |
+
| Remotery | Apache 2.0 | `src/external/Remotery/Remotery.LICENSE` |
|
| 57 |
+
| libsais | Apache 2.0 | `src/external/libsais/libsais.LICENSE` |
|
| 58 |
+
| nanozlib | Apache 2.0 | `src/external/nanozlib.h` |
|
| 59 |
+
| nanobind | BSD 3-Clause | `src/external/nanobind/LICENSE` |
|
| 60 |
+
| pybind11 | BSD 3-Clause | `src/external/pybind11/LICENSE` |
|
| 61 |
+
| tir image resizer (tinyexr tools) | BSD 3-Clause | `src/external/textools/resize/LICENSE` |
|
| 62 |
+
| texcomp texture compressor (tinyexr tools) | Apache 2.0 | `src/external/textools/texcomp/LICENSE`, `NOTICE.md` |
|
| 63 |
+
| texpipe texture pipeline (tinyexr tools) | Apache 2.0 | `src/external/textools/texpipe/LICENSE` |
|
| 64 |
+
| envmap IBL library (tinyexr tools) | Apache 2.0 | `src/external/textools/envmap/LICENSE` |
|
| 65 |
+
|
| 66 |
+
## Examples, Tools, And Development Assets
|
| 67 |
+
|
| 68 |
+
| Component | License | Location |
|
| 69 |
+
| --- | --- | --- |
|
| 70 |
+
| SDL2-related viewer dependencies | zlib/MIT-style, see bundled notices | `examples/sdlviewer/README.md` |
|
| 71 |
+
| GLFW | zlib/libpng | `examples/common/glfw-3.3.6/LICENSE.md` |
|
| 72 |
+
| Dear ImGui | MIT | `examples/common/imgui/LICENSE.txt` |
|
| 73 |
+
| imnodes | MIT | `examples/common/imnodes/LICENSE.md` |
|
| 74 |
+
| nativefiledialog-extended | zlib | `examples/common/nativefiledialog-extended/LICENSE` |
|
| 75 |
+
| virtualGizmo3D | BSD 2-Clause | `examples/common/virtualGizmo3D/license.txt` |
|
| 76 |
+
| miniaudio | Public domain or MIT-0 | `examples/common/miniaudio.LICENSE` |
|
| 77 |
+
| cuew | Apache 2.0 | `examples/common/cuew/LICENSE` |
|
| 78 |
+
| volk | MIT | `examples/common/volk/LICENSE.md` |
|
| 79 |
+
| Vulkan-Headers | Apache 2.0 | `examples/common/vulkan-headers/include/vulkan/vulkan_core.h` |
|
| 80 |
+
| bvh | MIT | `examples/common/bvh/LICENSE.txt` |
|
| 81 |
+
| Metal-cpp | Apache 2.0 | `examples/common/metalcpp/LICENSE.txt` |
|
| 82 |
+
| Roboto Mono embedded assets | Apache 2.0 | `examples/common/LICENSE.roboto_mono_embed.md` |
|
| 83 |
+
| Vulkan sample camera code by Sascha Willems | MIT | `examples/common/viewport_camera.hh` |
|
| 84 |
+
| Silicon Graphics trackball code | SGI permissive notice | `examples/common/trackball.h`, `examples/common/trackball.cc` |
|
| 85 |
+
| par_shapes | MIT | `examples/common/par_shapes.h` |
|
| 86 |
+
| criterion benchmark helper | MIT | `benchmarks/criterion.LICENSE` |
|
| 87 |
+
| acutest | MIT | `tests/unit/LICENSE.acutest` |
|
services/explorer/dist/static/native-usd/1.0.0-rc4/3eb7e2d4525a58fb/THIRD-PARTY-NOTICES.txt
ADDED
|
@@ -0,0 +1,407 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
LightUSD next WebAssembly runtime — third-party notices
|
| 2 |
+
|
| 3 |
+
Notice sources: LightUSD v1.0.0-rc4 (c9f177148f7dcddde33f4f8d6e82599f151d8803).
|
| 4 |
+
This conservatively retains notices for next-core, tydra-next, the WebAssembly
|
| 5 |
+
binding and related render helpers. Inclusion here does not assert that every
|
| 6 |
+
listed component survives link-time dead-code elimination.
|
| 7 |
+
For dual-licensed components, the permissive option named below is selected.
|
| 8 |
+
The upstream inventory LICENSE.3rdparty is also retained unchanged.
|
| 9 |
+
|
| 10 |
+
================================================================================
|
| 11 |
+
nonstd optional-lite, expected-lite, string-view-lite (Boost Software License)
|
| 12 |
+
|
| 13 |
+
Copyright (c) 2014-2018 Martin Moene (optional-lite)
|
| 14 |
+
Copyright (C) 2016-2020 Martin Moene (expected-lite)
|
| 15 |
+
Copyright 2017-2020 by Martin Moene (string-view-lite)
|
| 16 |
+
|
| 17 |
+
Source headers: src/nonstd/{optional,expected,string_view}.hpp
|
| 18 |
+
|
| 19 |
+
Boost Software License - Version 1.0 - August 17th, 2003
|
| 20 |
+
|
| 21 |
+
Permission is hereby granted, free of charge, to any person or organization
|
| 22 |
+
obtaining a copy of the software and accompanying documentation covered by
|
| 23 |
+
this license (the "Software") to use, reproduce, display, distribute,
|
| 24 |
+
execute, and transmit the Software, and to prepare derivative works of the
|
| 25 |
+
Software, and to permit third-parties to whom the Software is furnished to
|
| 26 |
+
do so, all subject to the following:
|
| 27 |
+
|
| 28 |
+
The copyright notices in the Software and this entire statement, including
|
| 29 |
+
the above license grant, this restriction and the following disclaimer,
|
| 30 |
+
must be included in all copies of the Software, in whole or in part, and
|
| 31 |
+
all derivative works of the Software, unless such copies or derivative
|
| 32 |
+
works are solely in the form of machine-executable object code generated by
|
| 33 |
+
a source language processor.
|
| 34 |
+
|
| 35 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 36 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 37 |
+
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
| 38 |
+
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
| 39 |
+
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
| 40 |
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
| 41 |
+
DEALINGS IN THE SOFTWARE.
|
| 42 |
+
|
| 43 |
+
================================================================================
|
| 44 |
+
LZ4 (BSD-2-Clause)
|
| 45 |
+
Source: https://github.com/lighttransport/LightUSD/blob/c9f177148f7dcddde33f4f8d6e82599f151d8803/src/lz4/LICENSE
|
| 46 |
+
|
| 47 |
+
LZ4 Library
|
| 48 |
+
Copyright (c) 2011-2020, Yann Collet
|
| 49 |
+
All rights reserved.
|
| 50 |
+
|
| 51 |
+
Redistribution and use in source and binary forms, with or without modification,
|
| 52 |
+
are permitted provided that the following conditions are met:
|
| 53 |
+
|
| 54 |
+
* Redistributions of source code must retain the above copyright notice, this
|
| 55 |
+
list of conditions and the following disclaimer.
|
| 56 |
+
|
| 57 |
+
* Redistributions in binary form must reproduce the above copyright notice, this
|
| 58 |
+
list of conditions and the following disclaimer in the documentation and/or
|
| 59 |
+
other materials provided with the distribution.
|
| 60 |
+
|
| 61 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
| 62 |
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
| 63 |
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 64 |
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
| 65 |
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
| 66 |
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
| 67 |
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
| 68 |
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 69 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
| 70 |
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 71 |
+
|
| 72 |
+
================================================================================
|
| 73 |
+
miniz (MIT)
|
| 74 |
+
Source: https://github.com/lighttransport/LightUSD/blob/c9f177148f7dcddde33f4f8d6e82599f151d8803/src/external/LICENSE.miniz
|
| 75 |
+
|
| 76 |
+
Copyright 2013-2014 RAD Game Tools and Valve Software
|
| 77 |
+
Copyright 2010-2014 Rich Geldreich and Tenacious Software LLC
|
| 78 |
+
|
| 79 |
+
All Rights Reserved.
|
| 80 |
+
|
| 81 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 82 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 83 |
+
in the Software without restriction, including without limitation the rights
|
| 84 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 85 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 86 |
+
furnished to do so, subject to the following conditions:
|
| 87 |
+
|
| 88 |
+
The above copyright notice and this permission notice shall be included in
|
| 89 |
+
all copies or substantial portions of the Software.
|
| 90 |
+
|
| 91 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 92 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 93 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 94 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 95 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 96 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
| 97 |
+
THE SOFTWARE.
|
| 98 |
+
|
| 99 |
+
================================================================================
|
| 100 |
+
nlohmann/json (MIT)
|
| 101 |
+
Source: https://github.com/lighttransport/LightUSD/blob/c9f177148f7dcddde33f4f8d6e82599f151d8803/src/external/jsonhpp/LICENSE.MIT
|
| 102 |
+
|
| 103 |
+
MIT License
|
| 104 |
+
|
| 105 |
+
Copyright (c) 2013-2022 Niels Lohmann
|
| 106 |
+
|
| 107 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 108 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 109 |
+
in the Software without restriction, including without limitation the rights
|
| 110 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 111 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 112 |
+
furnished to do so, subject to the following conditions:
|
| 113 |
+
|
| 114 |
+
The above copyright notice and this permission notice shall be included in all
|
| 115 |
+
copies or substantial portions of the Software.
|
| 116 |
+
|
| 117 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 118 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 119 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 120 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 121 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 122 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 123 |
+
SOFTWARE.
|
| 124 |
+
|
| 125 |
+
================================================================================
|
| 126 |
+
fast_float (MIT option)
|
| 127 |
+
Source: https://github.com/lighttransport/LightUSD/blob/c9f177148f7dcddde33f4f8d6e82599f151d8803/src/external/fast_float/LICENSE-MIT
|
| 128 |
+
|
| 129 |
+
MIT License
|
| 130 |
+
|
| 131 |
+
Copyright (c) 2021 The fast_float authors
|
| 132 |
+
|
| 133 |
+
Permission is hereby granted, free of charge, to any
|
| 134 |
+
person obtaining a copy of this software and associated
|
| 135 |
+
documentation files (the "Software"), to deal in the
|
| 136 |
+
Software without restriction, including without
|
| 137 |
+
limitation the rights to use, copy, modify, merge,
|
| 138 |
+
publish, distribute, sublicense, and/or sell copies of
|
| 139 |
+
the Software, and to permit persons to whom the Software
|
| 140 |
+
is furnished to do so, subject to the following
|
| 141 |
+
conditions:
|
| 142 |
+
|
| 143 |
+
The above copyright notice and this permission notice
|
| 144 |
+
shall be included in all copies or substantial portions
|
| 145 |
+
of the Software.
|
| 146 |
+
|
| 147 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
|
| 148 |
+
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
|
| 149 |
+
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
| 150 |
+
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
|
| 151 |
+
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
| 152 |
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
| 153 |
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
| 154 |
+
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
| 155 |
+
DEALINGS IN THE SOFTWARE.
|
| 156 |
+
|
| 157 |
+
================================================================================
|
| 158 |
+
Dragonbox (Boost Software License option)
|
| 159 |
+
Source: https://github.com/lighttransport/LightUSD/blob/c9f177148f7dcddde33f4f8d6e82599f151d8803/src/external/dragonbox/LICENSE-Boost
|
| 160 |
+
|
| 161 |
+
Boost Software License - Version 1.0 - August 17th, 2003
|
| 162 |
+
|
| 163 |
+
Permission is hereby granted, free of charge, to any person or organization
|
| 164 |
+
obtaining a copy of the software and accompanying documentation covered by
|
| 165 |
+
this license (the "Software") to use, reproduce, display, distribute,
|
| 166 |
+
execute, and transmit the Software, and to prepare derivative works of the
|
| 167 |
+
Software, and to permit third-parties to whom the Software is furnished to
|
| 168 |
+
do so, all subject to the following:
|
| 169 |
+
|
| 170 |
+
The copyright notices in the Software and this entire statement, including
|
| 171 |
+
the above license grant, this restriction and the following disclaimer,
|
| 172 |
+
must be included in all copies of the Software, in whole or in part, and
|
| 173 |
+
all derivative works of the Software, unless such copies or derivative
|
| 174 |
+
works are solely in the form of machine-executable object code generated by
|
| 175 |
+
a source language processor.
|
| 176 |
+
|
| 177 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 178 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 179 |
+
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
| 180 |
+
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
| 181 |
+
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
| 182 |
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
| 183 |
+
DEALINGS IN THE SOFTWARE.
|
| 184 |
+
|
| 185 |
+
================================================================================
|
| 186 |
+
Mapbox earcut (ISC)
|
| 187 |
+
Source: https://github.com/lighttransport/LightUSD/blob/c9f177148f7dcddde33f4f8d6e82599f151d8803/src/external/mapbox/earcut/LICENSE
|
| 188 |
+
|
| 189 |
+
ISC License
|
| 190 |
+
|
| 191 |
+
Copyright (c) 2015, Mapbox
|
| 192 |
+
|
| 193 |
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
| 194 |
+
with or without fee is hereby granted, provided that the above copyright notice
|
| 195 |
+
and this permission notice appear in all copies.
|
| 196 |
+
|
| 197 |
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
| 198 |
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
| 199 |
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
| 200 |
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
| 201 |
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
| 202 |
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
| 203 |
+
THIS SOFTWARE.
|
| 204 |
+
|
| 205 |
+
================================================================================
|
| 206 |
+
Mapbox eternal (ISC)
|
| 207 |
+
Source: https://github.com/lighttransport/LightUSD/blob/c9f177148f7dcddde33f4f8d6e82599f151d8803/src/external/mapbox/eternal/LICENSE.md
|
| 208 |
+
|
| 209 |
+
ISC License
|
| 210 |
+
|
| 211 |
+
Copyright (c) 2018, Mapbox
|
| 212 |
+
|
| 213 |
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
| 214 |
+
with or without fee is hereby granted, provided that the above copyright notice
|
| 215 |
+
and this permission notice appear in all copies.
|
| 216 |
+
|
| 217 |
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
| 218 |
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
| 219 |
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
| 220 |
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
| 221 |
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
| 222 |
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
| 223 |
+
THIS SOFTWARE.
|
| 224 |
+
|
| 225 |
+
================================================================================
|
| 226 |
+
ghc/filesystem (MIT)
|
| 227 |
+
Source: https://github.com/lighttransport/LightUSD/blob/c9f177148f7dcddde33f4f8d6e82599f151d8803/src/external/filesystem/LICENSE
|
| 228 |
+
|
| 229 |
+
Copyright (c) 2018, Steffen Schümann <s.schuemann@pobox.com>
|
| 230 |
+
|
| 231 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 232 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 233 |
+
in the Software without restriction, including without limitation the rights
|
| 234 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 235 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 236 |
+
furnished to do so, subject to the following conditions:
|
| 237 |
+
|
| 238 |
+
The above copyright notice and this permission notice shall be included in all
|
| 239 |
+
copies or substantial portions of the Software.
|
| 240 |
+
|
| 241 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 242 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 243 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 244 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 245 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 246 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 247 |
+
SOFTWARE.
|
| 248 |
+
|
| 249 |
+
================================================================================
|
| 250 |
+
linalg (Unlicense)
|
| 251 |
+
Source: https://github.com/lighttransport/LightUSD/blob/c9f177148f7dcddde33f4f8d6e82599f151d8803/src/external/linalg.UNLICENSE
|
| 252 |
+
|
| 253 |
+
This is free and unencumbered software released into the public domain.
|
| 254 |
+
|
| 255 |
+
Anyone is free to copy, modify, publish, use, compile, sell, or
|
| 256 |
+
distribute this software, either in source code form or as a compiled
|
| 257 |
+
binary, for any purpose, commercial or non-commercial, and by any
|
| 258 |
+
means.
|
| 259 |
+
|
| 260 |
+
In jurisdictions that recognize copyright laws, the author or authors
|
| 261 |
+
of this software dedicate any and all copyright interest in the
|
| 262 |
+
software to the public domain. We make this dedication for the benefit
|
| 263 |
+
of the public at large and to the detriment of our heirs and
|
| 264 |
+
successors. We intend this dedication to be an overt act of
|
| 265 |
+
relinquishment in perpetuity of all present and future rights to this
|
| 266 |
+
software under copyright law.
|
| 267 |
+
|
| 268 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
| 269 |
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
| 270 |
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
| 271 |
+
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
| 272 |
+
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
| 273 |
+
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
| 274 |
+
OTHER DEALINGS IN THE SOFTWARE.
|
| 275 |
+
|
| 276 |
+
For more information, please refer to <http://unlicense.org/>
|
| 277 |
+
|
| 278 |
+
================================================================================
|
| 279 |
+
jeaiii_to_text (MIT)
|
| 280 |
+
Source: https://github.com/lighttransport/LightUSD/blob/c9f177148f7dcddde33f4f8d6e82599f151d8803/src/external/jeaiii_to_text.LICENSE
|
| 281 |
+
|
| 282 |
+
MIT License
|
| 283 |
+
|
| 284 |
+
Copyright (c) 2017 James Edward Anhalt III - https://github.com/jeaiii/itoa
|
| 285 |
+
|
| 286 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 287 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 288 |
+
in the Software without restriction, including without limitation the rights
|
| 289 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 290 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 291 |
+
furnished to do so, subject to the following conditions:
|
| 292 |
+
|
| 293 |
+
The above copyright notice and this permission notice shall be included in all
|
| 294 |
+
copies or substantial portions of the Software.
|
| 295 |
+
|
| 296 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 297 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 298 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 299 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 300 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 301 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 302 |
+
SOFTWARE.
|
| 303 |
+
|
| 304 |
+
================================================================================
|
| 305 |
+
xxHash (BSD-2-Clause)
|
| 306 |
+
Source: https://github.com/lighttransport/LightUSD/blob/c9f177148f7dcddde33f4f8d6e82599f151d8803/src/external/xxhash.LICENSE
|
| 307 |
+
|
| 308 |
+
xxHash Library
|
| 309 |
+
Copyright (c) 2012-2021 Yann Collet
|
| 310 |
+
All rights reserved.
|
| 311 |
+
|
| 312 |
+
BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)
|
| 313 |
+
|
| 314 |
+
Redistribution and use in source and binary forms, with or without modification,
|
| 315 |
+
are permitted provided that the following conditions are met:
|
| 316 |
+
|
| 317 |
+
* Redistributions of source code must retain the above copyright notice, this
|
| 318 |
+
list of conditions and the following disclaimer.
|
| 319 |
+
|
| 320 |
+
* Redistributions in binary form must reproduce the above copyright notice, this
|
| 321 |
+
list of conditions and the following disclaimer in the documentation and/or
|
| 322 |
+
other materials provided with the distribution.
|
| 323 |
+
|
| 324 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
| 325 |
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
| 326 |
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
| 327 |
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
| 328 |
+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
| 329 |
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
| 330 |
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
| 331 |
+
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| 332 |
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
| 333 |
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| 334 |
+
|
| 335 |
+
================================================================================
|
| 336 |
+
tinycolorio (MIT)
|
| 337 |
+
Source: https://github.com/lighttransport/LightUSD/blob/c9f177148f7dcddde33f4f8d6e82599f151d8803/src/external/tinycolorio.LICENSE
|
| 338 |
+
|
| 339 |
+
MIT License
|
| 340 |
+
|
| 341 |
+
Copyright (c) 2018 Syoyo Fujita.
|
| 342 |
+
|
| 343 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 344 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 345 |
+
in the Software without restriction, including without limitation the rights
|
| 346 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 347 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 348 |
+
furnished to do so, subject to the following conditions:
|
| 349 |
+
|
| 350 |
+
The above copyright notice and this permission notice shall be included in all
|
| 351 |
+
copies or substantial portions of the Software.
|
| 352 |
+
|
| 353 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 354 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 355 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 356 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 357 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 358 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 359 |
+
SOFTWARE.
|
| 360 |
+
|
| 361 |
+
================================================================================
|
| 362 |
+
MikkTSpace (zlib)
|
| 363 |
+
Source: https://github.com/lighttransport/LightUSD/blob/c9f177148f7dcddde33f4f8d6e82599f151d8803/src/external/mikktspace/LICENSE
|
| 364 |
+
|
| 365 |
+
Copyright (C) 2011 by Morten S. Mikkelsen
|
| 366 |
+
|
| 367 |
+
This software is provided 'as-is', without any express or implied
|
| 368 |
+
warranty. In no event will the authors be held liable for any damages
|
| 369 |
+
arising from the use of this software.
|
| 370 |
+
|
| 371 |
+
Permission is granted to anyone to use this software for any purpose,
|
| 372 |
+
including commercial applications, and to alter it and redistribute it
|
| 373 |
+
freely, subject to the following restrictions:
|
| 374 |
+
|
| 375 |
+
1. The origin of this software must not be misrepresented; you must not
|
| 376 |
+
claim that you wrote the original software. If you use this software
|
| 377 |
+
in a product, an acknowledgment in the product documentation would be
|
| 378 |
+
appreciated but is not required.
|
| 379 |
+
2. Altered source versions must be plainly marked as such, and must not be
|
| 380 |
+
misrepresented as being the original software.
|
| 381 |
+
3. This notice may not be removed or altered from any source distribution.
|
| 382 |
+
|
| 383 |
+
================================================================================
|
| 384 |
+
LightRT (MIT)
|
| 385 |
+
Source: https://github.com/lighttransport/LightUSD/blob/c9f177148f7dcddde33f4f8d6e82599f151d8803/src/external/lightrt/LICENSE
|
| 386 |
+
|
| 387 |
+
MIT License
|
| 388 |
+
|
| 389 |
+
Copyright (c) 2026 Light Transport Entertainment, Inc.
|
| 390 |
+
|
| 391 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 392 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 393 |
+
in the Software without restriction, including without limitation the rights
|
| 394 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 395 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 396 |
+
furnished to do so, subject to the following conditions:
|
| 397 |
+
|
| 398 |
+
The above copyright notice and this permission notice shall be included in all
|
| 399 |
+
copies or substantial portions of the Software.
|
| 400 |
+
|
| 401 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 402 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 403 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 404 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 405 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 406 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 407 |
+
SOFTWARE.
|
services/explorer/dist/static/native-usd/1.0.0-rc4/3eb7e2d4525a58fb/lightusd_next.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
async function Module(moduleArg={}){var moduleRtn;var Module=moduleArg;var ENVIRONMENT_IS_WEB=typeof window=="object";var ENVIRONMENT_IS_WORKER=typeof WorkerGlobalScope!="undefined";var ENVIRONMENT_IS_NODE=typeof process=="object"&&process.versions?.node&&process.type!="renderer";var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){const{createRequire}=await import("module");var require=createRequire(import.meta.url)}var arguments_=[];var thisProgram="./this.program";var quit_=(status,toThrow)=>{throw toThrow};var _scriptName=import.meta.url;var scriptDirectory="";function locateFile(path){if(Module["locateFile"]){return Module["locateFile"](path,scriptDirectory)}return scriptDirectory+path}var readAsync,readBinary;if(ENVIRONMENT_IS_NODE){const isNode=typeof process=="object"&&process.versions?.node&&process.type!="renderer";if(!isNode)throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");var nodeVersion=process.versions.node;var numericVersion=nodeVersion.split(".").slice(0,3);numericVersion=numericVersion[0]*1e4+numericVersion[1]*100+numericVersion[2].split("-")[0]*1;if(numericVersion<16e4){throw new Error("This emscripten-generated code requires node v16.0.0 (detected v"+nodeVersion+")")}var fs=require("fs");if(_scriptName.startsWith("file:")){scriptDirectory=require("path").dirname(require("url").fileURLToPath(_scriptName))+"/"}readBinary=filename=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename);assert(Buffer.isBuffer(ret));return ret};readAsync=async(filename,binary=true)=>{filename=isFileURI(filename)?new URL(filename):filename;var ret=fs.readFileSync(filename,binary?undefined:"utf8");assert(binary?Buffer.isBuffer(ret):typeof ret=="string");return ret};if(process.argv.length>1){thisProgram=process.argv[1].replace(/\\/g,"/")}arguments_=process.argv.slice(2);quit_=(status,toThrow)=>{process.exitCode=status;throw toThrow}}else if(ENVIRONMENT_IS_SHELL){const isNode=typeof process=="object"&&process.versions?.node&&process.type!="renderer";if(isNode||typeof window=="object"||typeof WorkerGlobalScope!="undefined")throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)")}else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){try{scriptDirectory=new URL(".",_scriptName).href}catch{}if(!(typeof window=="object"||typeof WorkerGlobalScope!="undefined"))throw new Error("not compiled for this environment (did you build to HTML and try to run it not on the web, or set ENVIRONMENT to something - like node - and run it someplace else - like on the web?)");{if(ENVIRONMENT_IS_WORKER){readBinary=url=>{var xhr=new XMLHttpRequest;xhr.open("GET",url,false);xhr.responseType="arraybuffer";xhr.send(null);return new Uint8Array(xhr.response)}}readAsync=async url=>{assert(!isFileURI(url),"readAsync does not work with file:// URLs");var response=await fetch(url,{credentials:"same-origin"});if(response.ok){return response.arrayBuffer()}throw new Error(response.status+" : "+response.url)}}}else{throw new Error("environment detection error")}var out=console.log.bind(console);var err=console.error.bind(console);assert(!ENVIRONMENT_IS_SHELL,"shell environment detected but not enabled at build time. Add `shell` to `-sENVIRONMENT` to enable.");var wasmBinary;if(typeof WebAssembly!="object"){err("no native wasm support detected")}var ABORT=false;function assert(condition,text){if(!condition){abort("Assertion failed"+(text?": "+text:""))}}var isFileURI=filename=>filename.startsWith("file://");function writeStackCookie(){var max=_emscripten_stack_get_end();assert((max&3)==0);if(max==0){max+=4}HEAPU32[max>>2]=34821223;HEAPU32[max+4>>2]=2310721022;HEAPU32[0>>2]=1668509029}function checkStackCookie(){if(ABORT)return;var max=_emscripten_stack_get_end();if(max==0){max+=4}var cookie1=HEAPU32[max>>2];var cookie2=HEAPU32[max+4>>2];if(cookie1!=34821223||cookie2!=2310721022){abort(`Stack overflow! Stack cookie has been overwritten at ${ptrToString(max)}, expected hex dwords 0x89BACDFE and 0x2135467, but received ${ptrToString(cookie2)} ${ptrToString(cookie1)}`)}if(HEAPU32[0>>2]!=1668509029){abort("Runtime error: The application has corrupted its heap memory area (address zero)!")}}var runtimeDebug=true;(()=>{var h16=new Int16Array(1);var h8=new Int8Array(h16.buffer);h16[0]=25459;if(h8[0]!==115||h8[1]!==99)throw"Runtime error: expected the system to be little-endian! (Run with -sSUPPORT_BIG_ENDIAN to bypass)"})();function consumedModuleProp(prop){if(!Object.getOwnPropertyDescriptor(Module,prop)){Object.defineProperty(Module,prop,{configurable:true,set(){abort(`Attempt to set \`Module.${prop}\` after it has already been processed. This can happen, for example, when code is injected via '--post-js' rather than '--pre-js'`)}})}}function makeInvalidEarlyAccess(name){return()=>assert(false,`call to '${name}' via reference taken before Wasm module initialization`)}function ignoredModuleProp(prop){if(Object.getOwnPropertyDescriptor(Module,prop)){abort(`\`Module.${prop}\` was supplied but \`${prop}\` not included in INCOMING_MODULE_JS_API`)}}function isExportedByForceFilesystem(name){return name==="FS_createPath"||name==="FS_createDataFile"||name==="FS_createPreloadedFile"||name==="FS_preloadFile"||name==="FS_unlink"||name==="addRunDependency"||name==="FS_createLazyFile"||name==="FS_createDevice"||name==="removeRunDependency"}function missingLibrarySymbol(sym){unexportedRuntimeSymbol(sym)}function unexportedRuntimeSymbol(sym){if(!Object.getOwnPropertyDescriptor(Module,sym)){Object.defineProperty(Module,sym,{configurable:true,get(){var msg=`'${sym}' was not exported. add it to EXPORTED_RUNTIME_METHODS (see the Emscripten FAQ)`;if(isExportedByForceFilesystem(sym)){msg+=". Alternatively, forcing filesystem support (-sFORCE_FILESYSTEM) can export this for you"}abort(msg)}})}}var readyPromiseResolve,readyPromiseReject;var wasmMemory;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;var HEAP64,HEAPU64;var runtimeInitialized=false;function updateMemoryViews(){var b=wasmMemory.buffer;HEAP8=new Int8Array(b);HEAP16=new Int16Array(b);Module["HEAPU8"]=HEAPU8=new Uint8Array(b);HEAPU16=new Uint16Array(b);HEAP32=new Int32Array(b);HEAPU32=new Uint32Array(b);HEAPF32=new Float32Array(b);HEAPF64=new Float64Array(b);HEAP64=new BigInt64Array(b);HEAPU64=new BigUint64Array(b)}assert(typeof Int32Array!="undefined"&&typeof Float64Array!=="undefined"&&Int32Array.prototype.subarray!=undefined&&Int32Array.prototype.set!=undefined,"JS engine does not provide full typed array support");function preRun(){if(Module["preRun"]){if(typeof Module["preRun"]=="function")Module["preRun"]=[Module["preRun"]];while(Module["preRun"].length){addOnPreRun(Module["preRun"].shift())}}consumedModuleProp("preRun");callRuntimeCallbacks(onPreRuns)}function initRuntime(){assert(!runtimeInitialized);runtimeInitialized=true;checkStackCookie();wasmExports["__wasm_call_ctors"]()}function postRun(){checkStackCookie();if(Module["postRun"]){if(typeof Module["postRun"]=="function")Module["postRun"]=[Module["postRun"]];while(Module["postRun"].length){addOnPostRun(Module["postRun"].shift())}}consumedModuleProp("postRun");callRuntimeCallbacks(onPostRuns)}function abort(what){Module["onAbort"]?.(what);what="Aborted("+what+")";err(what);ABORT=true;var e=new WebAssembly.RuntimeError(what);readyPromiseReject?.(e);throw e}var FS={error(){abort("Filesystem support (FS) was not included. The problem is that you are using files from JS, but files were not used from C/C++, so filesystem support was not auto-included. You can force-include filesystem support with -sFORCE_FILESYSTEM")},init(){FS.error()},createDataFile(){FS.error()},createPreloadedFile(){FS.error()},createLazyFile(){FS.error()},open(){FS.error()},mkdev(){FS.error()},registerDevice(){FS.error()},analyzePath(){FS.error()},ErrnoError(){FS.error()}};function createExportWrapper(name,nargs){return(...args)=>{assert(runtimeInitialized,`native function \`${name}\` called before runtime initialization`);var f=wasmExports[name];assert(f,`exported native function \`${name}\` not found`);assert(args.length<=nargs,`native function \`${name}\` called with ${args.length} args but expects ${nargs}`);return f(...args)}}var wasmBinaryFile;function findWasmBinary(){if(Module["locateFile"]){return locateFile("lightusd_next.wasm")}return new URL("lightusd_next.wasm",import.meta.url).href}function getBinarySync(file){if(file==wasmBinaryFile&&wasmBinary){return new Uint8Array(wasmBinary)}if(readBinary){return readBinary(file)}throw"both async and sync fetching of the wasm failed"}async function getWasmBinary(binaryFile){if(!wasmBinary){try{var response=await readAsync(binaryFile);return new Uint8Array(response)}catch{}}return getBinarySync(binaryFile)}async function instantiateArrayBuffer(binaryFile,imports){try{var binary=await getWasmBinary(binaryFile);var instance=await WebAssembly.instantiate(binary,imports);return instance}catch(reason){err(`failed to asynchronously prepare wasm: ${reason}`);if(isFileURI(wasmBinaryFile)){err(`warning: Loading from a file URI (${wasmBinaryFile}) is not supported in most browsers. See https://emscripten.org/docs/getting_started/FAQ.html#how-do-i-run-a-local-webserver-for-testing-why-does-my-program-stall-in-downloading-or-preparing`)}abort(reason)}}async function instantiateAsync(binary,binaryFile,imports){if(!binary&&!ENVIRONMENT_IS_NODE){try{var response=fetch(binaryFile,{credentials:"same-origin"});var instantiationResult=await WebAssembly.instantiateStreaming(response,imports);return instantiationResult}catch(reason){err(`wasm streaming compile failed: ${reason}`);err("falling back to ArrayBuffer instantiation")}}return instantiateArrayBuffer(binaryFile,imports)}function getWasmImports(){return{env:wasmImports,wasi_snapshot_preview1:wasmImports}}async function createWasm(){function receiveInstance(instance,module){wasmExports=instance.exports;wasmMemory=wasmExports["memory"];assert(wasmMemory,"memory not found in wasm exports");updateMemoryViews();wasmTable=wasmExports["__indirect_function_table"];assert(wasmTable,"table not found in wasm exports");assignWasmExports(wasmExports);return wasmExports}var trueModule=Module;function receiveInstantiationResult(result){assert(Module===trueModule,"the Module object should not be replaced during async compilation - perhaps the order of HTML elements is wrong?");trueModule=null;return receiveInstance(result["instance"])}var info=getWasmImports();if(Module["instantiateWasm"]){return new Promise((resolve,reject)=>{try{Module["instantiateWasm"](info,(mod,inst)=>{resolve(receiveInstance(mod,inst))})}catch(e){err(`Module.instantiateWasm callback failed with error: ${e}`);reject(e)}})}wasmBinaryFile??=findWasmBinary();var result=await instantiateAsync(wasmBinary,wasmBinaryFile,info);var exports=receiveInstantiationResult(result);return exports}class ExitStatus{name="ExitStatus";constructor(status){this.message=`Program terminated with exit(${status})`;this.status=status}}var callRuntimeCallbacks=callbacks=>{while(callbacks.length>0){callbacks.shift()(Module)}};var onPostRuns=[];var addOnPostRun=cb=>onPostRuns.push(cb);var onPreRuns=[];var addOnPreRun=cb=>onPreRuns.push(cb);var noExitRuntime=true;var ptrToString=ptr=>{assert(typeof ptr==="number");ptr>>>=0;return"0x"+ptr.toString(16).padStart(8,"0")};var warnOnce=text=>{warnOnce.shown||={};if(!warnOnce.shown[text]){warnOnce.shown[text]=1;if(ENVIRONMENT_IS_NODE)text="warning: "+text;err(text)}};var UTF8Decoder=new TextDecoder;var findStringEnd=(heapOrArray,idx,maxBytesToRead,ignoreNul)=>{var maxIdx=idx+maxBytesToRead;if(ignoreNul)return maxIdx;while(heapOrArray[idx]&&!(idx>=maxIdx))++idx;return idx};var UTF8ToString=(ptr,maxBytesToRead,ignoreNul)=>{assert(typeof ptr=="number",`UTF8ToString expects a number (got ${typeof ptr})`);if(!ptr)return"";var end=findStringEnd(HEAPU8,ptr,maxBytesToRead,ignoreNul);return UTF8Decoder.decode(HEAPU8.subarray(ptr,end))};var ___assert_fail=(condition,filename,line,func)=>abort(`Assertion failed: ${UTF8ToString(condition)}, at: `+[filename?UTF8ToString(filename):"unknown filename",line,func?UTF8ToString(func):"unknown function"]);var SYSCALLS={varargs:undefined,getStr(ptr){var ret=UTF8ToString(ptr);return ret}};function ___syscall_fcntl64(fd,cmd,varargs){SYSCALLS.varargs=varargs;return 0}function ___syscall_ioctl(fd,op,varargs){SYSCALLS.varargs=varargs;return 0}function ___syscall_openat(dirfd,path,flags,varargs){SYSCALLS.varargs=varargs;abort("it should not be possible to operate on streams when !SYSCALLS_REQUIRE_FILESYSTEM")}var __abort_js=()=>abort("native code called abort()");var AsciiToString=ptr=>{var str="";while(1){var ch=HEAPU8[ptr++];if(!ch)return str;str+=String.fromCharCode(ch)}};var awaitingDependencies={};var registeredTypes={};var typeDependencies={};var BindingError=class BindingError extends Error{constructor(message){super(message);this.name="BindingError"}};var throwBindingError=message=>{throw new BindingError(message)};function sharedRegisterType(rawType,registeredInstance,options={}){var name=registeredInstance.name;if(!rawType){throwBindingError(`type "${name}" must have a positive integer typeid pointer`)}if(registeredTypes.hasOwnProperty(rawType)){if(options.ignoreDuplicateRegistrations){return}else{throwBindingError(`Cannot register type '${name}' twice`)}}registeredTypes[rawType]=registeredInstance;delete typeDependencies[rawType];if(awaitingDependencies.hasOwnProperty(rawType)){var callbacks=awaitingDependencies[rawType];delete awaitingDependencies[rawType];callbacks.forEach(cb=>cb())}}function registerType(rawType,registeredInstance,options={}){return sharedRegisterType(rawType,registeredInstance,options)}var integerReadValueFromPointer=(name,width,signed)=>{switch(width){case 1:return signed?pointer=>HEAP8[pointer]:pointer=>HEAPU8[pointer];case 2:return signed?pointer=>HEAP16[pointer>>1]:pointer=>HEAPU16[pointer>>1];case 4:return signed?pointer=>HEAP32[pointer>>2]:pointer=>HEAPU32[pointer>>2];case 8:return signed?pointer=>HEAP64[pointer>>3]:pointer=>HEAPU64[pointer>>3];default:throw new TypeError(`invalid integer width (${width}): ${name}`)}};var embindRepr=v=>{if(v===null){return"null"}var t=typeof v;if(t==="object"||t==="array"||t==="function"){return v.toString()}else{return""+v}};var assertIntegerRange=(typeName,value,minRange,maxRange)=>{if(value<minRange||value>maxRange){throw new TypeError(`Passing a number "${embindRepr(value)}" from JS side to C/C++ side to an argument of type "${typeName}", which is outside the valid range [${minRange}, ${maxRange}]!`)}};var __embind_register_bigint=(primitiveType,name,size,minRange,maxRange)=>{name=AsciiToString(name);const isUnsignedType=minRange===0n;let fromWireType=value=>value;if(isUnsignedType){const bitSize=size*8;fromWireType=value=>BigInt.asUintN(bitSize,value);maxRange=fromWireType(maxRange)}registerType(primitiveType,{name,fromWireType,toWireType:(destructors,value)=>{if(typeof value=="number"){value=BigInt(value)}else if(typeof value!="bigint"){throw new TypeError(`Cannot convert "${embindRepr(value)}" to ${this.name}`)}assertIntegerRange(name,value,minRange,maxRange);return value},readValueFromPointer:integerReadValueFromPointer(name,size,!isUnsignedType),destructorFunction:null})};var __embind_register_bool=(rawType,name,trueValue,falseValue)=>{name=AsciiToString(name);registerType(rawType,{name,fromWireType:function(wt){return!!wt},toWireType:function(destructors,o){return o?trueValue:falseValue},readValueFromPointer:function(pointer){return this.fromWireType(HEAPU8[pointer])},destructorFunction:null})};var shallowCopyInternalPointer=o=>({count:o.count,deleteScheduled:o.deleteScheduled,preservePointerOnDelete:o.preservePointerOnDelete,ptr:o.ptr,ptrType:o.ptrType,smartPtr:o.smartPtr,smartPtrType:o.smartPtrType});var throwInstanceAlreadyDeleted=obj=>{function getInstanceTypeName(handle){return handle.$$.ptrType.registeredClass.name}throwBindingError(getInstanceTypeName(obj)+" instance already deleted")};var finalizationRegistry=false;var detachFinalizer=handle=>{};var runDestructor=$$=>{if($$.smartPtr){$$.smartPtrType.rawDestructor($$.smartPtr)}else{$$.ptrType.registeredClass.rawDestructor($$.ptr)}};var releaseClassHandle=$$=>{$$.count.value-=1;var toDelete=0===$$.count.value;if(toDelete){runDestructor($$)}};var downcastPointer=(ptr,ptrClass,desiredClass)=>{if(ptrClass===desiredClass){return ptr}if(undefined===desiredClass.baseClass){return null}var rv=downcastPointer(ptr,ptrClass,desiredClass.baseClass);if(rv===null){return null}return desiredClass.downcast(rv)};var registeredPointers={};var registeredInstances={};var getBasestPointer=(class_,ptr)=>{if(ptr===undefined){throwBindingError("ptr should not be undefined")}while(class_.baseClass){ptr=class_.upcast(ptr);class_=class_.baseClass}return ptr};var getInheritedInstance=(class_,ptr)=>{ptr=getBasestPointer(class_,ptr);return registeredInstances[ptr]};var InternalError=class InternalError extends Error{constructor(message){super(message);this.name="InternalError"}};var throwInternalError=message=>{throw new InternalError(message)};var makeClassHandle=(prototype,record)=>{if(!record.ptrType||!record.ptr){throwInternalError("makeClassHandle requires ptr and ptrType")}var hasSmartPtrType=!!record.smartPtrType;var hasSmartPtr=!!record.smartPtr;if(hasSmartPtrType!==hasSmartPtr){throwInternalError("Both smartPtrType and smartPtr must be specified")}record.count={value:1};return attachFinalizer(Object.create(prototype,{$$:{value:record,writable:true}}))};function RegisteredPointer_fromWireType(ptr){var rawPointer=this.getPointee(ptr);if(!rawPointer){this.destructor(ptr);return null}var registeredInstance=getInheritedInstance(this.registeredClass,rawPointer);if(undefined!==registeredInstance){if(0===registeredInstance.$$.count.value){registeredInstance.$$.ptr=rawPointer;registeredInstance.$$.smartPtr=ptr;return registeredInstance["clone"]()}else{var rv=registeredInstance["clone"]();this.destructor(ptr);return rv}}function makeDefaultHandle(){if(this.isSmartPointer){return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:rawPointer,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(this.registeredClass.instancePrototype,{ptrType:this,ptr})}}var actualType=this.registeredClass.getActualType(rawPointer);var registeredPointerRecord=registeredPointers[actualType];if(!registeredPointerRecord){return makeDefaultHandle.call(this)}var toType;if(this.isConst){toType=registeredPointerRecord.constPointerType}else{toType=registeredPointerRecord.pointerType}var dp=downcastPointer(rawPointer,this.registeredClass,toType.registeredClass);if(dp===null){return makeDefaultHandle.call(this)}if(this.isSmartPointer){return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp,smartPtrType:this,smartPtr:ptr})}else{return makeClassHandle(toType.registeredClass.instancePrototype,{ptrType:toType,ptr:dp})}}var attachFinalizer=handle=>{if("undefined"===typeof FinalizationRegistry){attachFinalizer=handle=>handle;return handle}finalizationRegistry=new FinalizationRegistry(info=>{console.warn(info.leakWarning);releaseClassHandle(info.$$)});attachFinalizer=handle=>{var $$=handle.$$;var hasSmartPtr=!!$$.smartPtr;if(hasSmartPtr){var info={$$};var cls=$$.ptrType.registeredClass;var err=new Error(`Embind found a leaked C++ instance ${cls.name} <${ptrToString($$.ptr)}>.\n`+"We'll free it automatically in this case, but this functionality is not reliable across various environments.\n"+"Make sure to invoke .delete() manually once you're done with the instance instead.\n"+"Originally allocated");if("captureStackTrace"in Error){Error.captureStackTrace(err,RegisteredPointer_fromWireType)}info.leakWarning=err.stack.replace(/^Error: /,"");finalizationRegistry.register(handle,info,handle)}return handle};detachFinalizer=handle=>finalizationRegistry.unregister(handle);return attachFinalizer(handle)};var deletionQueue=[];var flushPendingDeletes=()=>{while(deletionQueue.length){var obj=deletionQueue.pop();obj.$$.deleteScheduled=false;obj["delete"]()}};var delayFunction;var init_ClassHandle=()=>{let proto=ClassHandle.prototype;Object.assign(proto,{isAliasOf(other){if(!(this instanceof ClassHandle)){return false}if(!(other instanceof ClassHandle)){return false}var leftClass=this.$$.ptrType.registeredClass;var left=this.$$.ptr;other.$$=other.$$;var rightClass=other.$$.ptrType.registeredClass;var right=other.$$.ptr;while(leftClass.baseClass){left=leftClass.upcast(left);leftClass=leftClass.baseClass}while(rightClass.baseClass){right=rightClass.upcast(right);rightClass=rightClass.baseClass}return leftClass===rightClass&&left===right},clone(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.preservePointerOnDelete){this.$$.count.value+=1;return this}else{var clone=attachFinalizer(Object.create(Object.getPrototypeOf(this),{$$:{value:shallowCopyInternalPointer(this.$$)}}));clone.$$.count.value+=1;clone.$$.deleteScheduled=false;return clone}},delete(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}detachFinalizer(this);releaseClassHandle(this.$$);if(!this.$$.preservePointerOnDelete){this.$$.smartPtr=undefined;this.$$.ptr=undefined}},isDeleted(){return!this.$$.ptr},deleteLater(){if(!this.$$.ptr){throwInstanceAlreadyDeleted(this)}if(this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete){throwBindingError("Object already scheduled for deletion")}deletionQueue.push(this);if(deletionQueue.length===1&&delayFunction){delayFunction(flushPendingDeletes)}this.$$.deleteScheduled=true;return this}});const symbolDispose=Symbol.dispose;if(symbolDispose){proto[symbolDispose]=proto["delete"]}};function ClassHandle(){}var createNamedFunction=(name,func)=>Object.defineProperty(func,"name",{value:name});var ensureOverloadTable=(proto,methodName,humanName)=>{if(undefined===proto[methodName].overloadTable){var prevFunc=proto[methodName];proto[methodName]=function(...args){if(!proto[methodName].overloadTable.hasOwnProperty(args.length)){throwBindingError(`Function '${humanName}' called with an invalid number of arguments (${args.length}) - expects one of (${proto[methodName].overloadTable})!`)}return proto[methodName].overloadTable[args.length].apply(this,args)};proto[methodName].overloadTable=[];proto[methodName].overloadTable[prevFunc.argCount]=prevFunc}};var exposePublicSymbol=(name,value,numArguments)=>{if(Module.hasOwnProperty(name)){if(undefined===numArguments||undefined!==Module[name].overloadTable&&undefined!==Module[name].overloadTable[numArguments]){throwBindingError(`Cannot register public name '${name}' twice`)}ensureOverloadTable(Module,name,name);if(Module[name].overloadTable.hasOwnProperty(numArguments)){throwBindingError(`Cannot register multiple overloads of a function with the same number of arguments (${numArguments})!`)}Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}};var char_0=48;var char_9=57;var makeLegalFunctionName=name=>{assert(typeof name==="string");name=name.replace(/[^a-zA-Z0-9_]/g,"$");var f=name.charCodeAt(0);if(f>=char_0&&f<=char_9){return`_${name}`}return name};function RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast){this.name=name;this.constructor=constructor;this.instancePrototype=instancePrototype;this.rawDestructor=rawDestructor;this.baseClass=baseClass;this.getActualType=getActualType;this.upcast=upcast;this.downcast=downcast;this.pureVirtualFunctions=[]}var upcastPointer=(ptr,ptrClass,desiredClass)=>{while(ptrClass!==desiredClass){if(!ptrClass.upcast){throwBindingError(`Expected null or instance of ${desiredClass.name}, got an instance of ${ptrClass.name}`)}ptr=ptrClass.upcast(ptr);ptrClass=ptrClass.baseClass}return ptr};function constNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(`null is not a valid ${this.name}`)}return 0}if(!handle.$$){throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`)}if(!handle.$$.ptr){throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function genericPointerToWireType(destructors,handle){var ptr;if(handle===null){if(this.isReference){throwBindingError(`null is not a valid ${this.name}`)}if(this.isSmartPointer){ptr=this.rawConstructor();if(destructors!==null){destructors.push(this.rawDestructor,ptr)}return ptr}else{return 0}}if(!handle||!handle.$$){throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`)}if(!handle.$$.ptr){throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`)}if(!this.isConst&&handle.$$.ptrType.isConst){throwBindingError(`Cannot convert argument of type ${handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name} to parameter type ${this.name}`)}var handleClass=handle.$$.ptrType.registeredClass;ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);if(this.isSmartPointer){if(undefined===handle.$$.smartPtr){throwBindingError("Passing raw pointer to smart pointer is illegal")}switch(this.sharingPolicy){case 0:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{throwBindingError(`Cannot convert argument of type ${handle.$$.smartPtrType?handle.$$.smartPtrType.name:handle.$$.ptrType.name} to parameter type ${this.name}`)}break;case 1:ptr=handle.$$.smartPtr;break;case 2:if(handle.$$.smartPtrType===this){ptr=handle.$$.smartPtr}else{var clonedHandle=handle["clone"]();ptr=this.rawShare(ptr,Emval.toHandle(()=>clonedHandle["delete"]()));if(destructors!==null){destructors.push(this.rawDestructor,ptr)}}break;default:throwBindingError("Unsupporting sharing policy")}}return ptr}function nonConstNoSmartPtrRawPointerToWireType(destructors,handle){if(handle===null){if(this.isReference){throwBindingError(`null is not a valid ${this.name}`)}return 0}if(!handle.$$){throwBindingError(`Cannot pass "${embindRepr(handle)}" as a ${this.name}`)}if(!handle.$$.ptr){throwBindingError(`Cannot pass deleted object as a pointer of type ${this.name}`)}if(handle.$$.ptrType.isConst){throwBindingError(`Cannot convert argument of type ${handle.$$.ptrType.name} to parameter type ${this.name}`)}var handleClass=handle.$$.ptrType.registeredClass;var ptr=upcastPointer(handle.$$.ptr,handleClass,this.registeredClass);return ptr}function readPointer(pointer){return this.fromWireType(HEAPU32[pointer>>2])}var init_RegisteredPointer=()=>{Object.assign(RegisteredPointer.prototype,{getPointee(ptr){if(this.rawGetPointee){ptr=this.rawGetPointee(ptr)}return ptr},destructor(ptr){this.rawDestructor?.(ptr)},readValueFromPointer:readPointer,fromWireType:RegisteredPointer_fromWireType})};function RegisteredPointer(name,registeredClass,isReference,isConst,isSmartPointer,pointeeType,sharingPolicy,rawGetPointee,rawConstructor,rawShare,rawDestructor){this.name=name;this.registeredClass=registeredClass;this.isReference=isReference;this.isConst=isConst;this.isSmartPointer=isSmartPointer;this.pointeeType=pointeeType;this.sharingPolicy=sharingPolicy;this.rawGetPointee=rawGetPointee;this.rawConstructor=rawConstructor;this.rawShare=rawShare;this.rawDestructor=rawDestructor;if(!isSmartPointer&®isteredClass.baseClass===undefined){if(isConst){this.toWireType=constNoSmartPtrRawPointerToWireType;this.destructorFunction=null}else{this.toWireType=nonConstNoSmartPtrRawPointerToWireType;this.destructorFunction=null}}else{this.toWireType=genericPointerToWireType}}var replacePublicSymbol=(name,value,numArguments)=>{if(!Module.hasOwnProperty(name)){throwInternalError("Replacing nonexistent public symbol")}if(undefined!==Module[name].overloadTable&&undefined!==numArguments){Module[name].overloadTable[numArguments]=value}else{Module[name]=value;Module[name].argCount=numArguments}};var wasmTable;var getWasmTableEntry=funcPtr=>wasmTable.get(funcPtr);var embind__requireFunction=(signature,rawFunction,isAsync=false)=>{assert(!isAsync,"Async bindings are only supported with JSPI.");signature=AsciiToString(signature);function makeDynCaller(){var rtn=getWasmTableEntry(rawFunction);return rtn}var fp=makeDynCaller();if(typeof fp!="function"){throwBindingError(`unknown function pointer with signature ${signature}: ${rawFunction}`)}return fp};class UnboundTypeError extends Error{}var getTypeName=type=>{var ptr=___getTypeName(type);var rv=AsciiToString(ptr);_free(ptr);return rv};var throwUnboundTypeError=(message,types)=>{var unboundTypes=[];var seen={};function visit(type){if(seen[type]){return}if(registeredTypes[type]){return}if(typeDependencies[type]){typeDependencies[type].forEach(visit);return}unboundTypes.push(type);seen[type]=true}types.forEach(visit);throw new UnboundTypeError(`${message}: `+unboundTypes.map(getTypeName).join([", "]))};var whenDependentTypesAreResolved=(myTypes,dependentTypes,getTypeConverters)=>{myTypes.forEach(type=>typeDependencies[type]=dependentTypes);function onComplete(typeConverters){var myTypeConverters=getTypeConverters(typeConverters);if(myTypeConverters.length!==myTypes.length){throwInternalError("Mismatched type converter count")}for(var i=0;i<myTypes.length;++i){registerType(myTypes[i],myTypeConverters[i])}}var typeConverters=new Array(dependentTypes.length);var unregisteredTypes=[];var registered=0;dependentTypes.forEach((dt,i)=>{if(registeredTypes.hasOwnProperty(dt)){typeConverters[i]=registeredTypes[dt]}else{unregisteredTypes.push(dt);if(!awaitingDependencies.hasOwnProperty(dt)){awaitingDependencies[dt]=[]}awaitingDependencies[dt].push(()=>{typeConverters[i]=registeredTypes[dt];++registered;if(registered===unregisteredTypes.length){onComplete(typeConverters)}})}});if(0===unregisteredTypes.length){onComplete(typeConverters)}};var __embind_register_class=(rawType,rawPointerType,rawConstPointerType,baseClassRawType,getActualTypeSignature,getActualType,upcastSignature,upcast,downcastSignature,downcast,name,destructorSignature,rawDestructor)=>{name=AsciiToString(name);getActualType=embind__requireFunction(getActualTypeSignature,getActualType);upcast&&=embind__requireFunction(upcastSignature,upcast);downcast&&=embind__requireFunction(downcastSignature,downcast);rawDestructor=embind__requireFunction(destructorSignature,rawDestructor);var legalFunctionName=makeLegalFunctionName(name);exposePublicSymbol(legalFunctionName,function(){throwUnboundTypeError(`Cannot construct ${name} due to unbound types`,[baseClassRawType])});whenDependentTypesAreResolved([rawType,rawPointerType,rawConstPointerType],baseClassRawType?[baseClassRawType]:[],base=>{base=base[0];var baseClass;var basePrototype;if(baseClassRawType){baseClass=base.registeredClass;basePrototype=baseClass.instancePrototype}else{basePrototype=ClassHandle.prototype}var constructor=createNamedFunction(name,function(...args){if(Object.getPrototypeOf(this)!==instancePrototype){throw new BindingError(`Use 'new' to construct ${name}`)}if(undefined===registeredClass.constructor_body){throw new BindingError(`${name} has no accessible constructor`)}var body=registeredClass.constructor_body[args.length];if(undefined===body){throw new BindingError(`Tried to invoke ctor of ${name} with invalid number of parameters (${args.length}) - expected (${Object.keys(registeredClass.constructor_body).toString()}) parameters instead!`)}return body.apply(this,args)});var instancePrototype=Object.create(basePrototype,{constructor:{value:constructor}});constructor.prototype=instancePrototype;var registeredClass=new RegisteredClass(name,constructor,instancePrototype,rawDestructor,baseClass,getActualType,upcast,downcast);if(registeredClass.baseClass){registeredClass.baseClass.__derivedClasses??=[];registeredClass.baseClass.__derivedClasses.push(registeredClass)}var referenceConverter=new RegisteredPointer(name,registeredClass,true,false,false);var pointerConverter=new RegisteredPointer(name+"*",registeredClass,false,false,false);var constPointerConverter=new RegisteredPointer(name+" const*",registeredClass,false,true,false);registeredPointers[rawType]={pointerType:pointerConverter,constPointerType:constPointerConverter};replacePublicSymbol(legalFunctionName,constructor);return[referenceConverter,pointerConverter,constPointerConverter]})};var heap32VectorToArray=(count,firstElement)=>{var array=[];for(var i=0;i<count;i++){array.push(HEAPU32[firstElement+i*4>>2])}return array};var runDestructors=destructors=>{while(destructors.length){var ptr=destructors.pop();var del=destructors.pop();del(ptr)}};function usesDestructorStack(argTypes){for(var i=1;i<argTypes.length;++i){if(argTypes[i]!==null&&argTypes[i].destructorFunction===undefined){return true}}return false}function checkArgCount(numArgs,minArgs,maxArgs,humanName,throwBindingError){if(numArgs<minArgs||numArgs>maxArgs){var argCountMessage=minArgs==maxArgs?minArgs:`${minArgs} to ${maxArgs}`;throwBindingError(`function ${humanName} called with ${numArgs} arguments, expected ${argCountMessage}`)}}function createJsInvoker(argTypes,isClassMethodFunc,returns,isAsync){var needsDestructorStack=usesDestructorStack(argTypes);var argCount=argTypes.length-2;var argsList=[];var argsListWired=["fn"];if(isClassMethodFunc){argsListWired.push("thisWired")}for(var i=0;i<argCount;++i){argsList.push(`arg${i}`);argsListWired.push(`arg${i}Wired`)}argsList=argsList.join(",");argsListWired=argsListWired.join(",");var invokerFnBody=`return function (${argsList}) {\n`;invokerFnBody+="checkArgCount(arguments.length, minArgs, maxArgs, humanName, throwBindingError);\n";if(needsDestructorStack){invokerFnBody+="var destructors = [];\n"}var dtorStack=needsDestructorStack?"destructors":"null";var args1=["humanName","throwBindingError","invoker","fn","runDestructors","fromRetWire","toClassParamWire"];if(isClassMethodFunc){invokerFnBody+=`var thisWired = toClassParamWire(${dtorStack}, this);\n`}for(var i=0;i<argCount;++i){var argName=`toArg${i}Wire`;invokerFnBody+=`var arg${i}Wired = ${argName}(${dtorStack}, arg${i});\n`;args1.push(argName)}invokerFnBody+=(returns||isAsync?"var rv = ":"")+`invoker(${argsListWired});\n`;if(needsDestructorStack){invokerFnBody+="runDestructors(destructors);\n"}else{for(var i=isClassMethodFunc?1:2;i<argTypes.length;++i){var paramName=i===1?"thisWired":"arg"+(i-2)+"Wired";if(argTypes[i].destructorFunction!==null){invokerFnBody+=`${paramName}_dtor(${paramName});\n`;args1.push(`${paramName}_dtor`)}}}if(returns){invokerFnBody+="var ret = fromRetWire(rv);\n"+"return ret;\n"}else{}invokerFnBody+="}\n";args1.push("checkArgCount","minArgs","maxArgs");invokerFnBody=`if (arguments.length !== ${args1.length}){ throw new Error(humanName + "Expected ${args1.length} closure arguments " + arguments.length + " given."); }\n${invokerFnBody}`;return new Function(args1,invokerFnBody)}function getRequiredArgCount(argTypes){var requiredArgCount=argTypes.length-2;for(var i=argTypes.length-1;i>=2;--i){if(!argTypes[i].optional){break}requiredArgCount--}return requiredArgCount}function craftInvokerFunction(humanName,argTypes,classType,cppInvokerFunc,cppTargetFunc,isAsync){var argCount=argTypes.length;if(argCount<2){throwBindingError("argTypes array size mismatch! Must at least get return value and 'this' types!")}assert(!isAsync,"Async bindings are only supported with JSPI.");var isClassMethodFunc=argTypes[1]!==null&&classType!==null;var needsDestructorStack=usesDestructorStack(argTypes);var returns=!argTypes[0].isVoid;var expectedArgCount=argCount-2;var minArgs=getRequiredArgCount(argTypes);var retType=argTypes[0];var instType=argTypes[1];var closureArgs=[humanName,throwBindingError,cppInvokerFunc,cppTargetFunc,runDestructors,retType.fromWireType.bind(retType),instType?.toWireType.bind(instType)];for(var i=2;i<argCount;++i){var argType=argTypes[i];closureArgs.push(argType.toWireType.bind(argType))}if(!needsDestructorStack){for(var i=isClassMethodFunc?1:2;i<argTypes.length;++i){if(argTypes[i].destructorFunction!==null){closureArgs.push(argTypes[i].destructorFunction)}}}closureArgs.push(checkArgCount,minArgs,expectedArgCount);let invokerFactory=createJsInvoker(argTypes,isClassMethodFunc,returns,isAsync);var invokerFn=invokerFactory(...closureArgs);return createNamedFunction(humanName,invokerFn)}var __embind_register_class_constructor=(rawClassType,argCount,rawArgTypesAddr,invokerSignature,invoker,rawConstructor)=>{assert(argCount>0);var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);invoker=embind__requireFunction(invokerSignature,invoker);whenDependentTypesAreResolved([],[rawClassType],classType=>{classType=classType[0];var humanName=`constructor ${classType.name}`;if(undefined===classType.registeredClass.constructor_body){classType.registeredClass.constructor_body=[]}if(undefined!==classType.registeredClass.constructor_body[argCount-1]){throw new BindingError(`Cannot register multiple constructors with identical number of parameters (${argCount-1}) for class '${classType.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`)}classType.registeredClass.constructor_body[argCount-1]=()=>{throwUnboundTypeError(`Cannot construct ${classType.name} due to unbound types`,rawArgTypes)};whenDependentTypesAreResolved([],rawArgTypes,argTypes=>{argTypes.splice(1,0,null);classType.registeredClass.constructor_body[argCount-1]=craftInvokerFunction(humanName,argTypes,null,invoker,rawConstructor);return[]});return[]})};var getFunctionName=signature=>{signature=signature.trim();const argsIndex=signature.indexOf("(");if(argsIndex===-1)return signature;assert(signature.endsWith(")"),"Parentheses for argument names should match.");return signature.slice(0,argsIndex)};var __embind_register_class_function=(rawClassType,methodName,argCount,rawArgTypesAddr,invokerSignature,rawInvoker,context,isPureVirtual,isAsync,isNonnullReturn)=>{var rawArgTypes=heap32VectorToArray(argCount,rawArgTypesAddr);methodName=AsciiToString(methodName);methodName=getFunctionName(methodName);rawInvoker=embind__requireFunction(invokerSignature,rawInvoker,isAsync);whenDependentTypesAreResolved([],[rawClassType],classType=>{classType=classType[0];var humanName=`${classType.name}.${methodName}`;if(methodName.startsWith("@@")){methodName=Symbol[methodName.substring(2)]}if(isPureVirtual){classType.registeredClass.pureVirtualFunctions.push(methodName)}function unboundTypesHandler(){throwUnboundTypeError(`Cannot call ${humanName} due to unbound types`,rawArgTypes)}var proto=classType.registeredClass.instancePrototype;var method=proto[methodName];if(undefined===method||undefined===method.overloadTable&&method.className!==classType.name&&method.argCount===argCount-2){unboundTypesHandler.argCount=argCount-2;unboundTypesHandler.className=classType.name;proto[methodName]=unboundTypesHandler}else{ensureOverloadTable(proto,methodName,humanName);proto[methodName].overloadTable[argCount-2]=unboundTypesHandler}whenDependentTypesAreResolved([],rawArgTypes,argTypes=>{var memberFunction=craftInvokerFunction(humanName,argTypes,classType,rawInvoker,context,isAsync);if(undefined===proto[methodName].overloadTable){memberFunction.argCount=argCount-2;proto[methodName]=memberFunction}else{proto[methodName].overloadTable[argCount-2]=memberFunction}return[]});return[]})};var emval_freelist=[];var emval_handles=[0,1,,1,null,1,true,1,false,1];var __emval_decref=handle=>{if(handle>9&&0===--emval_handles[handle+1]){assert(emval_handles[handle]!==undefined,`Decref for unallocated handle.`);emval_handles[handle]=undefined;emval_freelist.push(handle)}};var Emval={toValue:handle=>{if(!handle){throwBindingError(`Cannot use deleted val. handle = ${handle}`)}assert(handle===2||emval_handles[handle]!==undefined&&handle%2===0,`invalid handle: ${handle}`);return emval_handles[handle]},toHandle:value=>{switch(value){case undefined:return 2;case null:return 4;case true:return 6;case false:return 8;default:{const handle=emval_freelist.pop()||emval_handles.length;emval_handles[handle]=value;emval_handles[handle+1]=1;return handle}}}};var EmValType={name:"emscripten::val",fromWireType:handle=>{var rv=Emval.toValue(handle);__emval_decref(handle);return rv},toWireType:(destructors,value)=>Emval.toHandle(value),readValueFromPointer:readPointer,destructorFunction:null};var __embind_register_emval=rawType=>registerType(rawType,EmValType);var floatReadValueFromPointer=(name,width)=>{switch(width){case 4:return function(pointer){return this.fromWireType(HEAPF32[pointer>>2])};case 8:return function(pointer){return this.fromWireType(HEAPF64[pointer>>3])};default:throw new TypeError(`invalid float width (${width}): ${name}`)}};var __embind_register_float=(rawType,name,size)=>{name=AsciiToString(name);registerType(rawType,{name,fromWireType:value=>value,toWireType:(destructors,value)=>{if(typeof value!="number"&&typeof value!="boolean"){throw new TypeError(`Cannot convert ${embindRepr(value)} to ${this.name}`)}return value},readValueFromPointer:floatReadValueFromPointer(name,size),destructorFunction:null})};var __embind_register_function=(name,argCount,rawArgTypesAddr,signature,rawInvoker,fn,isAsync,isNonnullReturn)=>{var argTypes=heap32VectorToArray(argCount,rawArgTypesAddr);name=AsciiToString(name);name=getFunctionName(name);rawInvoker=embind__requireFunction(signature,rawInvoker,isAsync);exposePublicSymbol(name,function(){throwUnboundTypeError(`Cannot call ${name} due to unbound types`,argTypes)},argCount-1);whenDependentTypesAreResolved([],argTypes,argTypes=>{var invokerArgsArray=[argTypes[0],null].concat(argTypes.slice(1));replacePublicSymbol(name,craftInvokerFunction(name,invokerArgsArray,null,rawInvoker,fn,isAsync),argCount-1);return[]})};var __embind_register_integer=(primitiveType,name,size,minRange,maxRange)=>{name=AsciiToString(name);const isUnsignedType=minRange===0;let fromWireType=value=>value;if(isUnsignedType){var bitshift=32-8*size;fromWireType=value=>value<<bitshift>>>bitshift;maxRange=fromWireType(maxRange)}registerType(primitiveType,{name,fromWireType,toWireType:(destructors,value)=>{if(typeof value!="number"&&typeof value!="boolean"){throw new TypeError(`Cannot convert "${embindRepr(value)}" to ${name}`)}assertIntegerRange(name,value,minRange,maxRange);return value},readValueFromPointer:integerReadValueFromPointer(name,size,minRange!==0),destructorFunction:null})};var __embind_register_memory_view=(rawType,dataTypeIndex,name)=>{var typeMapping=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array];var TA=typeMapping[dataTypeIndex];function decodeMemoryView(handle){var size=HEAPU32[handle>>2];var data=HEAPU32[handle+4>>2];return new TA(HEAP8.buffer,data,size)}name=AsciiToString(name);registerType(rawType,{name,fromWireType:decodeMemoryView,readValueFromPointer:decodeMemoryView},{ignoreDuplicateRegistrations:true})};var stringToUTF8Array=(str,heap,outIdx,maxBytesToWrite)=>{assert(typeof str==="string",`stringToUTF8Array expects a string (got ${typeof str})`);if(!(maxBytesToWrite>0))return 0;var startIdx=outIdx;var endIdx=outIdx+maxBytesToWrite-1;for(var i=0;i<str.length;++i){var u=str.codePointAt(i);if(u<=127){if(outIdx>=endIdx)break;heap[outIdx++]=u}else if(u<=2047){if(outIdx+1>=endIdx)break;heap[outIdx++]=192|u>>6;heap[outIdx++]=128|u&63}else if(u<=65535){if(outIdx+2>=endIdx)break;heap[outIdx++]=224|u>>12;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63}else{if(outIdx+3>=endIdx)break;if(u>1114111)warnOnce("Invalid Unicode code point "+ptrToString(u)+" encountered when serializing a JS string to a UTF-8 string in wasm memory! (Valid unicode code points should be in range 0-0x10FFFF).");heap[outIdx++]=240|u>>18;heap[outIdx++]=128|u>>12&63;heap[outIdx++]=128|u>>6&63;heap[outIdx++]=128|u&63;i++}}heap[outIdx]=0;return outIdx-startIdx};var stringToUTF8=(str,outPtr,maxBytesToWrite)=>{assert(typeof maxBytesToWrite=="number","stringToUTF8(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");return stringToUTF8Array(str,HEAPU8,outPtr,maxBytesToWrite)};var lengthBytesUTF8=str=>{var len=0;for(var i=0;i<str.length;++i){var c=str.charCodeAt(i);if(c<=127){len++}else if(c<=2047){len+=2}else if(c>=55296&&c<=57343){len+=4;++i}else{len+=3}}return len};var __embind_register_std_string=(rawType,name)=>{name=AsciiToString(name);var stdStringIsUTF8=true;registerType(rawType,{name,fromWireType(value){var length=HEAPU32[value>>2];var payload=value+4;var str;if(stdStringIsUTF8){str=UTF8ToString(payload,length,true)}else{str="";for(var i=0;i<length;++i){str+=String.fromCharCode(HEAPU8[payload+i])}}_free(value);return str},toWireType(destructors,value){if(value instanceof ArrayBuffer){value=new Uint8Array(value)}var length;var valueIsOfTypeString=typeof value=="string";if(!(valueIsOfTypeString||ArrayBuffer.isView(value)&&value.BYTES_PER_ELEMENT==1)){throwBindingError("Cannot pass non-string to std::string")}if(stdStringIsUTF8&&valueIsOfTypeString){length=lengthBytesUTF8(value)}else{length=value.length}var base=_malloc(4+length+1);var ptr=base+4;HEAPU32[base>>2]=length;if(valueIsOfTypeString){if(stdStringIsUTF8){stringToUTF8(value,ptr,length+1)}else{for(var i=0;i<length;++i){var charCode=value.charCodeAt(i);if(charCode>255){_free(base);throwBindingError("String has UTF-16 code units that do not fit in 8 bits")}HEAPU8[ptr+i]=charCode}}}else{HEAPU8.set(value,ptr)}if(destructors!==null){destructors.push(_free,base)}return base},readValueFromPointer:readPointer,destructorFunction(ptr){_free(ptr)}})};var UTF16Decoder=new TextDecoder("utf-16le");var UTF16ToString=(ptr,maxBytesToRead,ignoreNul)=>{assert(ptr%2==0,"Pointer passed to UTF16ToString must be aligned to two bytes!");var idx=ptr>>1;var endIdx=findStringEnd(HEAPU16,idx,maxBytesToRead/2,ignoreNul);return UTF16Decoder.decode(HEAPU16.subarray(idx,endIdx))};var stringToUTF16=(str,outPtr,maxBytesToWrite)=>{assert(outPtr%2==0,"Pointer passed to stringToUTF16 must be aligned to two bytes!");assert(typeof maxBytesToWrite=="number","stringToUTF16(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");maxBytesToWrite??=2147483647;if(maxBytesToWrite<2)return 0;maxBytesToWrite-=2;var startPtr=outPtr;var numCharsToWrite=maxBytesToWrite<str.length*2?maxBytesToWrite/2:str.length;for(var i=0;i<numCharsToWrite;++i){var codeUnit=str.charCodeAt(i);HEAP16[outPtr>>1]=codeUnit;outPtr+=2}HEAP16[outPtr>>1]=0;return outPtr-startPtr};var lengthBytesUTF16=str=>str.length*2;var UTF32ToString=(ptr,maxBytesToRead,ignoreNul)=>{assert(ptr%4==0,"Pointer passed to UTF32ToString must be aligned to four bytes!");var str="";var startIdx=ptr>>2;for(var i=0;!(i>=maxBytesToRead/4);i++){var utf32=HEAPU32[startIdx+i];if(!utf32&&!ignoreNul)break;str+=String.fromCodePoint(utf32)}return str};var stringToUTF32=(str,outPtr,maxBytesToWrite)=>{assert(outPtr%4==0,"Pointer passed to stringToUTF32 must be aligned to four bytes!");assert(typeof maxBytesToWrite=="number","stringToUTF32(str, outPtr, maxBytesToWrite) is missing the third parameter that specifies the length of the output buffer!");maxBytesToWrite??=2147483647;if(maxBytesToWrite<4)return 0;var startPtr=outPtr;var endPtr=startPtr+maxBytesToWrite-4;for(var i=0;i<str.length;++i){var codePoint=str.codePointAt(i);if(codePoint>65535){i++}HEAP32[outPtr>>2]=codePoint;outPtr+=4;if(outPtr+4>endPtr)break}HEAP32[outPtr>>2]=0;return outPtr-startPtr};var lengthBytesUTF32=str=>{var len=0;for(var i=0;i<str.length;++i){var codePoint=str.codePointAt(i);if(codePoint>65535){i++}len+=4}return len};var __embind_register_std_wstring=(rawType,charSize,name)=>{name=AsciiToString(name);var decodeString,encodeString,lengthBytesUTF;if(charSize===2){decodeString=UTF16ToString;encodeString=stringToUTF16;lengthBytesUTF=lengthBytesUTF16}else{assert(charSize===4,"only 2-byte and 4-byte strings are currently supported");decodeString=UTF32ToString;encodeString=stringToUTF32;lengthBytesUTF=lengthBytesUTF32}registerType(rawType,{name,fromWireType:value=>{var length=HEAPU32[value>>2];var str=decodeString(value+4,length*charSize,true);_free(value);return str},toWireType:(destructors,value)=>{if(!(typeof value=="string")){throwBindingError(`Cannot pass non-string to C++ string type ${name}`)}var length=lengthBytesUTF(value);var ptr=_malloc(4+length+charSize);HEAPU32[ptr>>2]=length/charSize;encodeString(value,ptr+4,length+charSize);if(destructors!==null){destructors.push(_free,ptr)}return ptr},readValueFromPointer:readPointer,destructorFunction(ptr){_free(ptr)}})};var __embind_register_void=(rawType,name)=>{name=AsciiToString(name);registerType(rawType,{isVoid:true,name,fromWireType:()=>undefined,toWireType:(destructors,o)=>undefined})};var emval_methodCallers=[];var emval_addMethodCaller=caller=>{var id=emval_methodCallers.length;emval_methodCallers.push(caller);return id};var requireRegisteredType=(rawType,humanName)=>{var impl=registeredTypes[rawType];if(undefined===impl){throwBindingError(`${humanName} has unknown type ${getTypeName(rawType)}`)}return impl};var emval_lookupTypes=(argCount,argTypes)=>{var a=new Array(argCount);for(var i=0;i<argCount;++i){a[i]=requireRegisteredType(HEAPU32[argTypes+i*4>>2],`parameter ${i}`)}return a};var emval_returnValue=(toReturnWire,destructorsRef,handle)=>{var destructors=[];var result=toReturnWire(destructors,handle);if(destructors.length){HEAPU32[destructorsRef>>2]=Emval.toHandle(destructors)}return result};var emval_symbols={};var getStringOrSymbol=address=>{var symbol=emval_symbols[address];if(symbol===undefined){return AsciiToString(address)}return symbol};var __emval_create_invoker=(argCount,argTypesPtr,kind)=>{var GenericWireTypeSize=8;var[retType,...argTypes]=emval_lookupTypes(argCount,argTypesPtr);var toReturnWire=retType.toWireType.bind(retType);var argFromPtr=argTypes.map(type=>type.readValueFromPointer.bind(type));argCount--;var captures={toValue:Emval.toValue};var args=argFromPtr.map((argFromPtr,i)=>{var captureName=`argFromPtr${i}`;captures[captureName]=argFromPtr;return`${captureName}(args${i?"+"+i*GenericWireTypeSize:""})`});var functionBody;switch(kind){case 0:functionBody="toValue(handle)";break;case 2:functionBody="new (toValue(handle))";break;case 3:functionBody="";break;case 1:captures["getStringOrSymbol"]=getStringOrSymbol;functionBody="toValue(handle)[getStringOrSymbol(methodName)]";break}functionBody+=`(${args})`;if(!retType.isVoid){captures["toReturnWire"]=toReturnWire;captures["emval_returnValue"]=emval_returnValue;functionBody=`return emval_returnValue(toReturnWire, destructorsRef, ${functionBody})`}functionBody=`return function (handle, methodName, destructorsRef, args) {\n ${functionBody}\n }`;var invokerFunction=new Function(Object.keys(captures),functionBody)(...Object.values(captures));var functionName=`methodCaller<(${argTypes.map(t=>t.name)}) => ${retType.name}>`;return emval_addMethodCaller(createNamedFunction(functionName,invokerFunction))};var emval_get_global=()=>globalThis;var __emval_get_global=name=>{if(name===0){return Emval.toHandle(emval_get_global())}else{name=getStringOrSymbol(name);return Emval.toHandle(emval_get_global()[name])}};var __emval_get_module_property=name=>{name=getStringOrSymbol(name);return Emval.toHandle(Module[name])};var __emval_get_property=(handle,key)=>{handle=Emval.toValue(handle);key=Emval.toValue(key);return Emval.toHandle(handle[key])};var __emval_incref=handle=>{if(handle>9){emval_handles[handle+1]+=1}};var __emval_invoke=(caller,handle,methodName,destructorsRef,args)=>emval_methodCallers[caller](handle,methodName,destructorsRef,args);var __emval_new_array=()=>Emval.toHandle([]);var __emval_new_cstring=v=>Emval.toHandle(getStringOrSymbol(v));var __emval_new_object=()=>Emval.toHandle({});var __emval_run_destructors=handle=>{var destructors=Emval.toValue(handle);runDestructors(destructors);__emval_decref(handle)};var __emval_set_property=(handle,key,value)=>{handle=Emval.toValue(handle);key=Emval.toValue(key);value=Emval.toValue(value);handle[key]=value};var INT53_MAX=9007199254740992;var INT53_MIN=-9007199254740992;var bigintToI53Checked=num=>num<INT53_MIN||num>INT53_MAX?NaN:Number(num);function __munmap_js(addr,len,prot,flags,fd,offset){offset=bigintToI53Checked(offset)}var __tzset_js=(timezone,daylight,std_name,dst_name)=>{var currentYear=(new Date).getFullYear();var winter=new Date(currentYear,0,1);var summer=new Date(currentYear,6,1);var winterOffset=winter.getTimezoneOffset();var summerOffset=summer.getTimezoneOffset();var stdTimezoneOffset=Math.max(winterOffset,summerOffset);HEAPU32[timezone>>2]=stdTimezoneOffset*60;HEAP32[daylight>>2]=Number(winterOffset!=summerOffset);var extractZone=timezoneOffset=>{var sign=timezoneOffset>=0?"-":"+";var absOffset=Math.abs(timezoneOffset);var hours=String(Math.floor(absOffset/60)).padStart(2,"0");var minutes=String(absOffset%60).padStart(2,"0");return`UTC${sign}${hours}${minutes}`};var winterName=extractZone(winterOffset);var summerName=extractZone(summerOffset);assert(winterName);assert(summerName);assert(lengthBytesUTF8(winterName)<=16,`timezone name truncated to fit in TZNAME_MAX (${winterName})`);assert(lengthBytesUTF8(summerName)<=16,`timezone name truncated to fit in TZNAME_MAX (${summerName})`);if(summerOffset<winterOffset){stringToUTF8(winterName,std_name,17);stringToUTF8(summerName,dst_name,17)}else{stringToUTF8(winterName,dst_name,17);stringToUTF8(summerName,std_name,17)}};var _emscripten_get_now=()=>performance.now();var _emscripten_date_now=()=>Date.now();var nowIsMonotonic=1;var checkWasiClock=clock_id=>clock_id>=0&&clock_id<=3;function _clock_time_get(clk_id,ignored_precision,ptime){ignored_precision=bigintToI53Checked(ignored_precision);if(!checkWasiClock(clk_id)){return 28}var now;if(clk_id===0){now=_emscripten_date_now()}else if(nowIsMonotonic){now=_emscripten_get_now()}else{return 52}var nsec=Math.round(now*1e3*1e3);HEAP64[ptime>>3]=BigInt(nsec);return 0}var getHeapMax=()=>2147483648;var _emscripten_get_heap_max=()=>getHeapMax();var alignMemory=(size,alignment)=>{assert(alignment,"alignment argument is required");return Math.ceil(size/alignment)*alignment};var growMemory=size=>{var oldHeapSize=wasmMemory.buffer.byteLength;var pages=(size-oldHeapSize+65535)/65536|0;try{wasmMemory.grow(pages);updateMemoryViews();return 1}catch(e){err(`growMemory: Attempted to grow heap from ${oldHeapSize} bytes to ${size} bytes, but got error: ${e}`)}};var _emscripten_resize_heap=requestedSize=>{var oldSize=HEAPU8.length;requestedSize>>>=0;assert(requestedSize>oldSize);var maxHeapSize=getHeapMax();if(requestedSize>maxHeapSize){err(`Cannot enlarge memory, requested ${requestedSize} bytes, but the limit is ${maxHeapSize} bytes!`);return false}for(var cutDown=1;cutDown<=4;cutDown*=2){var overGrownHeapSize=oldSize*(1+.1/cutDown);overGrownHeapSize=Math.min(overGrownHeapSize,requestedSize+100663296);var newSize=Math.min(maxHeapSize,alignMemory(Math.max(requestedSize,overGrownHeapSize),65536));var replacement=growMemory(newSize);if(replacement){return true}}err(`Failed to grow the heap from ${oldSize} bytes to ${newSize} bytes, not enough memory!`);return false};var ENV={};var getExecutableName=()=>thisProgram||"./this.program";var getEnvStrings=()=>{if(!getEnvStrings.strings){var lang=(typeof navigator=="object"&&navigator.language||"C").replace("-","_")+".UTF-8";var env={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:lang,_:getExecutableName()};for(var x in ENV){if(ENV[x]===undefined)delete env[x];else env[x]=ENV[x]}var strings=[];for(var x in env){strings.push(`${x}=${env[x]}`)}getEnvStrings.strings=strings}return getEnvStrings.strings};var _environ_get=(__environ,environ_buf)=>{var bufSize=0;var envp=0;for(var string of getEnvStrings()){var ptr=environ_buf+bufSize;HEAPU32[__environ+envp>>2]=ptr;bufSize+=stringToUTF8(string,ptr,Infinity)+1;envp+=4}return 0};var _environ_sizes_get=(penviron_count,penviron_buf_size)=>{var strings=getEnvStrings();HEAPU32[penviron_count>>2]=strings.length;var bufSize=0;for(var string of strings){bufSize+=lengthBytesUTF8(string)+1}HEAPU32[penviron_buf_size>>2]=bufSize;return 0};var _fd_close=fd=>{abort("fd_close called without SYSCALLS_REQUIRE_FILESYSTEM")};var _fd_read=(fd,iov,iovcnt,pnum)=>{abort("fd_read called without SYSCALLS_REQUIRE_FILESYSTEM")};function _fd_seek(fd,offset,whence,newOffset){offset=bigintToI53Checked(offset);return 70}var printCharBuffers=[null,[],[]];var UTF8ArrayToString=(heapOrArray,idx=0,maxBytesToRead,ignoreNul)=>{var endPtr=findStringEnd(heapOrArray,idx,maxBytesToRead,ignoreNul);return UTF8Decoder.decode(heapOrArray.buffer?heapOrArray.subarray(idx,endPtr):new Uint8Array(heapOrArray.slice(idx,endPtr)))};var printChar=(stream,curr)=>{var buffer=printCharBuffers[stream];assert(buffer);if(curr===0||curr===10){(stream===1?out:err)(UTF8ArrayToString(buffer));buffer.length=0}else{buffer.push(curr)}};var flush_NO_FILESYSTEM=()=>{_fflush(0);if(printCharBuffers[1].length)printChar(1,10);if(printCharBuffers[2].length)printChar(2,10)};var _fd_write=(fd,iov,iovcnt,pnum)=>{var num=0;for(var i=0;i<iovcnt;i++){var ptr=HEAPU32[iov>>2];var len=HEAPU32[iov+4>>2];iov+=8;for(var j=0;j<len;j++){printChar(fd,HEAPU8[ptr+j])}num+=len}HEAPU32[pnum>>2]=num;return 0};init_ClassHandle();init_RegisteredPointer();assert(emval_handles.length===5*2);{if(Module["noExitRuntime"])noExitRuntime=Module["noExitRuntime"];if(Module["print"])out=Module["print"];if(Module["printErr"])err=Module["printErr"];if(Module["wasmBinary"])wasmBinary=Module["wasmBinary"];Module["FS_createDataFile"]=FS.createDataFile;Module["FS_createPreloadedFile"]=FS.createPreloadedFile;checkIncomingModuleAPI();if(Module["arguments"])arguments_=Module["arguments"];if(Module["thisProgram"])thisProgram=Module["thisProgram"];assert(typeof Module["memoryInitializerPrefixURL"]=="undefined","Module.memoryInitializerPrefixURL option was removed, use Module.locateFile instead");assert(typeof Module["pthreadMainPrefixURL"]=="undefined","Module.pthreadMainPrefixURL option was removed, use Module.locateFile instead");assert(typeof Module["cdInitializerPrefixURL"]=="undefined","Module.cdInitializerPrefixURL option was removed, use Module.locateFile instead");assert(typeof Module["filePackagePrefixURL"]=="undefined","Module.filePackagePrefixURL option was removed, use Module.locateFile instead");assert(typeof Module["read"]=="undefined","Module.read option was removed");assert(typeof Module["readAsync"]=="undefined","Module.readAsync option was removed (modify readAsync in JS)");assert(typeof Module["readBinary"]=="undefined","Module.readBinary option was removed (modify readBinary in JS)");assert(typeof Module["setWindowTitle"]=="undefined","Module.setWindowTitle option was removed (modify emscripten_set_window_title in JS)");assert(typeof Module["TOTAL_MEMORY"]=="undefined","Module.TOTAL_MEMORY has been renamed Module.INITIAL_MEMORY");assert(typeof Module["ENVIRONMENT"]=="undefined","Module.ENVIRONMENT has been deprecated. To force the environment, use the ENVIRONMENT compile-time option (for example, -sENVIRONMENT=web or -sENVIRONMENT=node)");assert(typeof Module["STACK_SIZE"]=="undefined","STACK_SIZE can no longer be set at runtime. Use -sSTACK_SIZE at link time");assert(typeof Module["wasmMemory"]=="undefined","Use of `wasmMemory` detected. Use -sIMPORTED_MEMORY to define wasmMemory externally");assert(typeof Module["INITIAL_MEMORY"]=="undefined","Detected runtime INITIAL_MEMORY setting. Use -sIMPORTED_MEMORY to define wasmMemory dynamically");if(Module["preInit"]){if(typeof Module["preInit"]=="function")Module["preInit"]=[Module["preInit"]];while(Module["preInit"].length>0){Module["preInit"].shift()()}}consumedModuleProp("preInit")}var missingLibrarySymbols=["writeI53ToI64","writeI53ToI64Clamped","writeI53ToI64Signaling","writeI53ToU64Clamped","writeI53ToU64Signaling","readI53FromI64","readI53FromU64","convertI32PairToI53","convertI32PairToI53Checked","convertU32PairToI53","stackAlloc","getTempRet0","setTempRet0","zeroMemory","exitJS","withStackSave","strError","inetPton4","inetNtop4","inetPton6","inetNtop6","readSockaddr","writeSockaddr","readEmAsmArgs","jstoi_q","autoResumeAudioContext","getDynCaller","dynCall","setWasmTableEntry","handleException","keepRuntimeAlive","runtimeKeepalivePush","runtimeKeepalivePop","callUserCallback","maybeExit","asyncLoad","asmjsMangle","mmapAlloc","HandleAllocator","getNativeTypeSize","getUniqueRunDependency","addRunDependency","removeRunDependency","addOnInit","addOnPostCtor","addOnPreMain","addOnExit","STACK_SIZE","STACK_ALIGN","POINTER_SIZE","ASSERTIONS","ccall","cwrap","convertJsFunctionToWasm","getEmptyTableSlot","updateTableMap","getFunctionAddress","addFunction","removeFunction","intArrayFromString","intArrayToString","stringToAscii","stringToNewUTF8","stringToUTF8OnStack","writeArrayToMemory","registerKeyEventCallback","maybeCStringToJsString","findEventTarget","getBoundingClientRect","fillMouseEventData","registerMouseEventCallback","registerWheelEventCallback","registerUiEventCallback","registerFocusEventCallback","fillDeviceOrientationEventData","registerDeviceOrientationEventCallback","fillDeviceMotionEventData","registerDeviceMotionEventCallback","screenOrientation","fillOrientationChangeEventData","registerOrientationChangeEventCallback","fillFullscreenChangeEventData","registerFullscreenChangeEventCallback","JSEvents_requestFullscreen","JSEvents_resizeCanvasForFullscreen","registerRestoreOldStyle","hideEverythingExceptGivenElement","restoreHiddenElements","setLetterbox","softFullscreenResizeWebGLRenderTarget","doRequestFullscreen","fillPointerlockChangeEventData","registerPointerlockChangeEventCallback","registerPointerlockErrorEventCallback","requestPointerLock","fillVisibilityChangeEventData","registerVisibilityChangeEventCallback","registerTouchEventCallback","fillGamepadEventData","registerGamepadEventCallback","registerBeforeUnloadEventCallback","fillBatteryEventData","registerBatteryEventCallback","setCanvasElementSize","getCanvasElementSize","jsStackTrace","getCallstack","convertPCtoSourceLocation","wasiRightsToMuslOFlags","wasiOFlagsToMuslOFlags","initRandomFill","randomFill","safeSetTimeout","setImmediateWrapped","safeRequestAnimationFrame","clearImmediateWrapped","registerPostMainLoop","registerPreMainLoop","getPromise","makePromise","idsToPromises","makePromiseCallback","ExceptionInfo","findMatchingCatch","Browser_asyncPrepareDataCounter","isLeapYear","ydayFromDate","arraySum","addDays","getSocketFromFD","getSocketAddress","heapObjectForWebGLType","toTypedArrayIndex","webgl_enable_ANGLE_instanced_arrays","webgl_enable_OES_vertex_array_object","webgl_enable_WEBGL_draw_buffers","webgl_enable_WEBGL_multi_draw","webgl_enable_EXT_polygon_offset_clamp","webgl_enable_EXT_clip_control","webgl_enable_WEBGL_polygon_mode","emscriptenWebGLGet","computeUnpackAlignedImageSize","colorChannelsInGlTextureFormat","emscriptenWebGLGetTexPixelData","emscriptenWebGLGetUniform","webglGetUniformLocation","webglPrepareUniformLocationsBeforeFirstUse","webglGetLeftBracePos","emscriptenWebGLGetVertexAttrib","__glGetActiveAttribOrUniform","writeGLArray","registerWebGlEventCallback","runAndAbortIfError","ALLOC_NORMAL","ALLOC_STACK","allocate","writeStringToMemory","writeAsciiToMemory","demangle","stackTrace","getFunctionArgsName","createJsInvokerSignature","PureVirtualError","registerInheritedInstance","unregisterInheritedInstance","getInheritedInstanceCount","getLiveInheritedInstances","enumReadValueFromPointer","setDelayFunction","validateThis","count_emval_handles"];missingLibrarySymbols.forEach(missingLibrarySymbol);var unexportedSymbols=["run","out","err","callMain","abort","wasmMemory","wasmExports","HEAPF32","HEAPF64","HEAP8","HEAP16","HEAPU16","HEAP32","HEAPU32","HEAP64","HEAPU64","writeStackCookie","checkStackCookie","INT53_MAX","INT53_MIN","bigintToI53Checked","stackSave","stackRestore","ptrToString","getHeapMax","growMemory","ENV","ERRNO_CODES","DNS","Protocols","Sockets","timers","warnOnce","readEmAsmArgsArray","getExecutableName","getWasmTableEntry","alignMemory","wasmTable","noExitRuntime","addOnPreRun","addOnPostRun","freeTableIndexes","functionsInTableMap","setValue","getValue","PATH","PATH_FS","UTF8Decoder","UTF8ArrayToString","UTF8ToString","stringToUTF8Array","stringToUTF8","lengthBytesUTF8","AsciiToString","UTF16Decoder","UTF16ToString","stringToUTF16","lengthBytesUTF16","UTF32ToString","stringToUTF32","lengthBytesUTF32","JSEvents","specialHTMLTargets","findCanvasEventTarget","currentFullscreenStrategy","restoreOldWindowedStyle","UNWIND_CACHE","ExitStatus","getEnvStrings","checkWasiClock","flush_NO_FILESYSTEM","emSetImmediate","emClearImmediate_deps","emClearImmediate","promiseMap","uncaughtExceptionCount","exceptionLast","exceptionCaught","Browser","requestFullscreen","requestFullScreen","setCanvasSize","getUserMedia","createContext","getPreloadedImageData__data","wget","MONTH_DAYS_REGULAR","MONTH_DAYS_LEAP","MONTH_DAYS_REGULAR_CUMULATIVE","MONTH_DAYS_LEAP_CUMULATIVE","SYSCALLS","tempFixedLengthArray","miniTempWebGLFloatBuffers","miniTempWebGLIntBuffers","GL","AL","GLUT","EGL","GLEW","IDBStore","SDL","SDL_gfx","allocateUTF8","allocateUTF8OnStack","print","printErr","jstoi_s","InternalError","BindingError","throwInternalError","throwBindingError","registeredTypes","awaitingDependencies","typeDependencies","tupleRegistrations","structRegistrations","sharedRegisterType","whenDependentTypesAreResolved","getTypeName","getFunctionName","heap32VectorToArray","requireRegisteredType","usesDestructorStack","checkArgCount","getRequiredArgCount","createJsInvoker","UnboundTypeError","EmValType","EmValOptionalType","throwUnboundTypeError","ensureOverloadTable","exposePublicSymbol","replacePublicSymbol","createNamedFunction","embindRepr","registeredInstances","getBasestPointer","getInheritedInstance","registeredPointers","registerType","integerReadValueFromPointer","floatReadValueFromPointer","assertIntegerRange","readPointer","runDestructors","craftInvokerFunction","embind__requireFunction","genericPointerToWireType","constNoSmartPtrRawPointerToWireType","nonConstNoSmartPtrRawPointerToWireType","init_RegisteredPointer","RegisteredPointer","RegisteredPointer_fromWireType","runDestructor","releaseClassHandle","finalizationRegistry","detachFinalizer_deps","detachFinalizer","attachFinalizer","makeClassHandle","init_ClassHandle","ClassHandle","throwInstanceAlreadyDeleted","deletionQueue","flushPendingDeletes","delayFunction","RegisteredClass","shallowCopyInternalPointer","downcastPointer","upcastPointer","char_0","char_9","makeLegalFunctionName","emval_freelist","emval_handles","emval_symbols","getStringOrSymbol","Emval","emval_get_global","emval_returnValue","emval_lookupTypes","emval_methodCallers","emval_addMethodCaller"];unexportedSymbols.forEach(unexportedRuntimeSymbol);function checkIncomingModuleAPI(){ignoredModuleProp("fetchSettings")}function reportNextCrateProgress(phase,current,total){if(typeof Module.onNextCrateProgress==="function"){const cur=Number(current);const tot=Number(total);Module.onNextCrateProgress({phase:UTF8ToString(Number(phase)),current:cur,total:tot,percentage:tot>0?cur/tot*100:0})}}var ___getTypeName=makeInvalidEarlyAccess("___getTypeName");var _malloc=makeInvalidEarlyAccess("_malloc");var _free=makeInvalidEarlyAccess("_free");var _fflush=makeInvalidEarlyAccess("_fflush");var _emscripten_stack_get_end=makeInvalidEarlyAccess("_emscripten_stack_get_end");var _emscripten_stack_get_base=makeInvalidEarlyAccess("_emscripten_stack_get_base");var _emscripten_stack_init=makeInvalidEarlyAccess("_emscripten_stack_init");var _emscripten_stack_get_free=makeInvalidEarlyAccess("_emscripten_stack_get_free");var __emscripten_stack_restore=makeInvalidEarlyAccess("__emscripten_stack_restore");var __emscripten_stack_alloc=makeInvalidEarlyAccess("__emscripten_stack_alloc");var _emscripten_stack_get_current=makeInvalidEarlyAccess("_emscripten_stack_get_current");function assignWasmExports(wasmExports){___getTypeName=createExportWrapper("__getTypeName",1);_malloc=createExportWrapper("malloc",1);_free=createExportWrapper("free",1);_fflush=createExportWrapper("fflush",1);_emscripten_stack_get_end=wasmExports["emscripten_stack_get_end"];_emscripten_stack_get_base=wasmExports["emscripten_stack_get_base"];_emscripten_stack_init=wasmExports["emscripten_stack_init"];_emscripten_stack_get_free=wasmExports["emscripten_stack_get_free"];__emscripten_stack_restore=wasmExports["_emscripten_stack_restore"];__emscripten_stack_alloc=wasmExports["_emscripten_stack_alloc"];_emscripten_stack_get_current=wasmExports["emscripten_stack_get_current"]}var wasmImports={__assert_fail:___assert_fail,__syscall_fcntl64:___syscall_fcntl64,__syscall_ioctl:___syscall_ioctl,__syscall_openat:___syscall_openat,_abort_js:__abort_js,_embind_register_bigint:__embind_register_bigint,_embind_register_bool:__embind_register_bool,_embind_register_class:__embind_register_class,_embind_register_class_constructor:__embind_register_class_constructor,_embind_register_class_function:__embind_register_class_function,_embind_register_emval:__embind_register_emval,_embind_register_float:__embind_register_float,_embind_register_function:__embind_register_function,_embind_register_integer:__embind_register_integer,_embind_register_memory_view:__embind_register_memory_view,_embind_register_std_string:__embind_register_std_string,_embind_register_std_wstring:__embind_register_std_wstring,_embind_register_void:__embind_register_void,_emval_create_invoker:__emval_create_invoker,_emval_decref:__emval_decref,_emval_get_global:__emval_get_global,_emval_get_module_property:__emval_get_module_property,_emval_get_property:__emval_get_property,_emval_incref:__emval_incref,_emval_invoke:__emval_invoke,_emval_new_array:__emval_new_array,_emval_new_cstring:__emval_new_cstring,_emval_new_object:__emval_new_object,_emval_run_destructors:__emval_run_destructors,_emval_set_property:__emval_set_property,_munmap_js:__munmap_js,_tzset_js:__tzset_js,clock_time_get:_clock_time_get,emscripten_get_heap_max:_emscripten_get_heap_max,emscripten_get_now:_emscripten_get_now,emscripten_resize_heap:_emscripten_resize_heap,environ_get:_environ_get,environ_sizes_get:_environ_sizes_get,fd_close:_fd_close,fd_read:_fd_read,fd_seek:_fd_seek,fd_write:_fd_write,reportNextCrateProgress};var calledRun;function stackCheckInit(){_emscripten_stack_init();writeStackCookie()}function run(){stackCheckInit();preRun();function doRun(){assert(!calledRun);calledRun=true;Module["calledRun"]=true;if(ABORT)return;initRuntime();readyPromiseResolve?.(Module);Module["onRuntimeInitialized"]?.();consumedModuleProp("onRuntimeInitialized");assert(!Module["_main"],'compiled without a main, but one is present. if you added it from JS, use Module["onRuntimeInitialized"]');postRun()}if(Module["setStatus"]){Module["setStatus"]("Running...");setTimeout(()=>{setTimeout(()=>Module["setStatus"](""),1);doRun()},1)}else{doRun()}checkStackCookie()}var wasmExports;wasmExports=await (createWasm());run();if(runtimeInitialized){moduleRtn=Module}else{moduleRtn=new Promise((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject})}for(const prop of Object.keys(Module)){if(!(prop in moduleArg)){Object.defineProperty(moduleArg,prop,{configurable:true,get(){abort(`Access to module property ('${prop}') is no longer possible via the module constructor argument; Instead, use the result of the module constructor.`)}})}}
|
| 2 |
+
;return moduleRtn}export default Module;
|
services/explorer/dist/static/native-usd/1.0.0-rc4/3eb7e2d4525a58fb/lightusd_next.wasm
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ca039803ad60853411587be4c915f453ac60332ac9c03777716083c805f70940
|
| 3 |
+
size 1672421
|
services/explorer/dist/static/native-usd/1.0.0-rc4/3eb7e2d4525a58fb/worker.js
ADDED
|
@@ -0,0 +1,426 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES.
|
| 2 |
+
// SPDX-License-Identifier: Apache-2.0
|
| 3 |
+
// Copied alongside the pinned WASM module by scripts/copy-native-usd.js. This
|
| 4 |
+
// worker has one asset and one owner; terminating it also cancels a native parse.
|
| 5 |
+
const COPY_TYPES = { points: Float32Array, normals: Float32Array, uv0: Float32Array, indices: Uint32Array };
|
| 6 |
+
const DUPLICATED_GEOMETRY = new Set([
|
| 7 |
+
"points", "normals", "primvars:normals", "primvars:normals:indices",
|
| 8 |
+
"faceVertexCounts", "faceVertexIndices", "extent",
|
| 9 |
+
]);
|
| 10 |
+
|
| 11 |
+
function copyArray(native, descriptor, Type) {
|
| 12 |
+
if (!descriptor || !descriptor.length) return new Type();
|
| 13 |
+
const { ptr, length } = descriptor;
|
| 14 |
+
if (!Number.isInteger(ptr) || !Number.isInteger(length) || ptr < 0 || length < 0
|
| 15 |
+
|| ptr % Type.BYTES_PER_ELEMENT || ptr + length * Type.BYTES_PER_ELEMENT > native.HEAPU8.buffer.byteLength) {
|
| 16 |
+
throw new Error("Invalid USD geometry buffer");
|
| 17 |
+
}
|
| 18 |
+
// getMesh reuses native scratch buffers. Copy before asking for another mesh.
|
| 19 |
+
return new Type(new Type(native.HEAPU8.buffer, ptr, length));
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
function compactPhysics(snapshot) {
|
| 23 |
+
for (const prim of snapshot.prims || []) {
|
| 24 |
+
const collision = prim.apiSchemas?.includes("PhysicsCollisionAPI");
|
| 25 |
+
if (!collision) delete prim.geometry;
|
| 26 |
+
else if (prim.geometry) {
|
| 27 |
+
// Collider fallback uses authored positions/indices and face counts.
|
| 28 |
+
// Its normals/UVs (including indexed normal primvars) duplicate the
|
| 29 |
+
// visual RenderStream attributes and have
|
| 30 |
+
// no physics consumer; retaining them inflates the worker message.
|
| 31 |
+
delete prim.geometry.normals;
|
| 32 |
+
delete prim.geometry.uvs;
|
| 33 |
+
}
|
| 34 |
+
for (const key of Object.keys(prim.properties || {})) {
|
| 35 |
+
if (collision && key === "faceVertexCounts") continue;
|
| 36 |
+
if (DUPLICATED_GEOMETRY.has(key) || key.startsWith("primvars:st")) delete prim.properties[key];
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
return snapshot;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
function guardNativeLayerHeader(canonical) {
|
| 43 |
+
if (typeof canonical !== "string" || !canonical.startsWith("#usda 1.0")) {
|
| 44 |
+
throw new Error("Native USD layer metadata export is unavailable");
|
| 45 |
+
}
|
| 46 |
+
// Layer diff in rc4 omits relocates. Inspect only the native writer's layer
|
| 47 |
+
// header, skipping quoted content/comments/assets and nested field values.
|
| 48 |
+
// Geometry, materials and authored opinions still use the native reader.
|
| 49 |
+
let i = canonical.indexOf("\n") + 1;
|
| 50 |
+
const skipSpace = () => {
|
| 51 |
+
for (;;) {
|
| 52 |
+
while (/\s/.test(canonical[i] || "") && i < canonical.length) i += 1;
|
| 53 |
+
if (canonical[i] !== "#") break;
|
| 54 |
+
while (i < canonical.length && canonical[i] !== "\n") i += 1;
|
| 55 |
+
}
|
| 56 |
+
};
|
| 57 |
+
skipSpace();
|
| 58 |
+
if (canonical[i] !== "(") return;
|
| 59 |
+
let parentheses = 1;
|
| 60 |
+
let braces = 0;
|
| 61 |
+
let brackets = 0;
|
| 62 |
+
i += 1;
|
| 63 |
+
while (i < canonical.length && parentheses) {
|
| 64 |
+
const char = canonical[i];
|
| 65 |
+
if (char === '"' || char === "@" || char === "<") {
|
| 66 |
+
const marker = char === "<" ? ">" : canonical.startsWith(char.repeat(3), i) ? char.repeat(3) : char;
|
| 67 |
+
i += char === "<" ? 1 : marker.length;
|
| 68 |
+
let closed = false;
|
| 69 |
+
while (i < canonical.length) {
|
| 70 |
+
if (canonical[i] === "\\") { i += 2; continue; }
|
| 71 |
+
if (canonical.startsWith(marker, i)) { i += marker.length; closed = true; break; }
|
| 72 |
+
i += 1;
|
| 73 |
+
}
|
| 74 |
+
if (!closed) throw new Error("Native USD layer metadata export is malformed");
|
| 75 |
+
continue;
|
| 76 |
+
}
|
| 77 |
+
if (char === "#") { while (i < canonical.length && canonical[i] !== "\n") i += 1; continue; }
|
| 78 |
+
if (/[A-Za-z_]/.test(char)) {
|
| 79 |
+
const start = i++;
|
| 80 |
+
while (/[A-Za-z_0-9]/.test(canonical[i] || "") && i < canonical.length) i += 1;
|
| 81 |
+
const name = canonical.slice(start, i);
|
| 82 |
+
if (parentheses === 1 && !braces && !brackets && ["relocates", "expressionVariables", "subLayers"].includes(name)) {
|
| 83 |
+
let next = i;
|
| 84 |
+
while (/\s/.test(canonical[next] || "") && next < canonical.length) next += 1;
|
| 85 |
+
if (canonical[next] === "=") throw new Error(`USD qualification does not support authored layer ${name}`);
|
| 86 |
+
}
|
| 87 |
+
continue;
|
| 88 |
+
}
|
| 89 |
+
if (char === "(") parentheses += 1;
|
| 90 |
+
else if (char === ")") parentheses -= 1;
|
| 91 |
+
else if (char === "{") braces += 1;
|
| 92 |
+
else if (char === "}") braces -= 1;
|
| 93 |
+
else if (char === "[") brackets += 1;
|
| 94 |
+
else if (char === "]") brackets -= 1;
|
| 95 |
+
if (braces < 0 || brackets < 0) throw new Error("Native USD layer metadata export is malformed");
|
| 96 |
+
i += 1;
|
| 97 |
+
}
|
| 98 |
+
if (parentheses || braces || brackets) throw new Error("Native USD layer metadata export is malformed");
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
function matchingLayerBaseline(snapshot, shadingProperties = false) {
|
| 102 |
+
if (!Array.isArray(snapshot.prims) || snapshot.prims.length > 50_000) {
|
| 103 |
+
throw new Error("USD authored prim inventory exceeds the qualification object budget");
|
| 104 |
+
}
|
| 105 |
+
// Matching, property-free def specs let native Layer diff distinguish an
|
| 106 |
+
// authored default from a schema fallback. Maps avoid special-name keys and
|
| 107 |
+
// iterated emission avoids depending on the JS recursion limit. Matching
|
| 108 |
+
// specifiers also expose unsupported class/over specs omitted by snapshots.
|
| 109 |
+
const roots = new Map();
|
| 110 |
+
const seen = new Set();
|
| 111 |
+
for (const prim of snapshot.prims) {
|
| 112 |
+
const path = prim.path;
|
| 113 |
+
if (typeof path !== "string" || !path.startsWith("/") || path === "/" || seen.has(path)) {
|
| 114 |
+
throw new Error("USD authored inventory requires unique absolute source prim paths");
|
| 115 |
+
}
|
| 116 |
+
const parts = path.slice(1).split("/");
|
| 117 |
+
if (parts.some(name => !name || name === "." || name === ".." || /["\\\u0000-\u001f\u007f]/.test(name))) {
|
| 118 |
+
throw new Error("USD prim identity cannot be represented safely in the native layer inventory");
|
| 119 |
+
}
|
| 120 |
+
seen.add(path);
|
| 121 |
+
if (typeof prim.type !== "string" || (prim.type && !/^[A-Za-z_][A-Za-z_0-9]*$/.test(prim.type))) {
|
| 122 |
+
throw new Error("USD prim type cannot be represented safely in the native layer inventory");
|
| 123 |
+
}
|
| 124 |
+
let children = roots;
|
| 125 |
+
let current;
|
| 126 |
+
for (const name of parts) {
|
| 127 |
+
if (!children.has(name)) children.set(name, { children: new Map(), type: null });
|
| 128 |
+
current = children.get(name);
|
| 129 |
+
children = current.children;
|
| 130 |
+
}
|
| 131 |
+
current.type = prim.type;
|
| 132 |
+
current.properties = shadingProperties && ["Shader", "Material", "NodeGraph"].includes(prim.type)
|
| 133 |
+
? (prim.authoredProperties || []).filter(name => /^(inputs|outputs):/.test(name))
|
| 134 |
+
: shadingProperties ? unreadableJointLimits(prim) : [];
|
| 135 |
+
if (current.properties.some(name => !/^(inputs|outputs):[A-Za-z_][A-Za-z_0-9:]*$/.test(name)
|
| 136 |
+
&& !["physics:lowerLimit", "physics:upperLimit"].includes(name))) {
|
| 137 |
+
throw new Error("USD shading property identity needs qualification");
|
| 138 |
+
}
|
| 139 |
+
}
|
| 140 |
+
const text = ["#usda 1.0\n"];
|
| 141 |
+
const frames = [{ entries: [...roots], next: 0, close: false }];
|
| 142 |
+
while (frames.length) {
|
| 143 |
+
const frame = frames[frames.length - 1];
|
| 144 |
+
if (frame.next >= frame.entries.length) {
|
| 145 |
+
frames.pop();
|
| 146 |
+
if (frame.close) text.push("}\n");
|
| 147 |
+
continue;
|
| 148 |
+
}
|
| 149 |
+
const [name, prim] = frame.entries[frame.next++];
|
| 150 |
+
if (prim.type == null) throw new Error("USD snapshot omits a required namespace ancestor");
|
| 151 |
+
text.push(`def ${prim.type ? `${prim.type} ` : ""}${JSON.stringify(name)} {\n`);
|
| 152 |
+
for (const property of prim.properties || []) text.push(`float ${property}\n`);
|
| 153 |
+
frames.push({ entries: [...prim.children], next: 0, close: true });
|
| 154 |
+
}
|
| 155 |
+
return new TextEncoder().encode(text.join(""));
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
function authoredLayerInventory(native, bytes, filename, snapshot) {
|
| 159 |
+
if (typeof native.usddiff !== "function") throw new Error("USD runtime lacks native authored-opinion inspection");
|
| 160 |
+
const baseline = matchingLayerBaseline(snapshot);
|
| 161 |
+
// usddiff reparses the original layer. The converter has already been freed,
|
| 162 |
+
// limiting overlap; this extra CPU/native allocation is measured as opinionMs.
|
| 163 |
+
const result = native.usddiff({
|
| 164 |
+
left: { data: baseline, name: "authored-opinion-baseline.usda" },
|
| 165 |
+
right: { data: bytes, name: filename }, format: "json", compareMetadata: true,
|
| 166 |
+
});
|
| 167 |
+
if (!result?.success || result.warn || typeof result.json !== "string") {
|
| 168 |
+
throw new Error(result?.error || result?.warn || "Native USD authored-opinion inspection failed");
|
| 169 |
+
}
|
| 170 |
+
const diff = JSON.parse(result.json);
|
| 171 |
+
if (!diff.property_diffs || !diff.primspec_diffs || !diff.layer_meta_diff) {
|
| 172 |
+
throw new Error("Native USD authored-opinion inspection returned an unsupported format");
|
| 173 |
+
}
|
| 174 |
+
const unsupported = /^meta:(references|payload|inherits|specializes|variants|variantSets|variantSetNames|active|instanceable|instancePrototype|relocates|clips|clipSets)(:|$)/;
|
| 175 |
+
for (const [path, entry] of Object.entries(diff.primspec_diffs)) {
|
| 176 |
+
if (!Array.isArray(entry.added) || !Array.isArray(entry.deleted) || !Array.isArray(entry.modified_details)) {
|
| 177 |
+
throw new Error("Native USD prim metadata inventory returned an unsupported format");
|
| 178 |
+
}
|
| 179 |
+
if (entry.added.length || entry.deleted.length) {
|
| 180 |
+
throw new Error(`USD authored hierarchy is not fully represented by the native snapshot: ${path}`);
|
| 181 |
+
}
|
| 182 |
+
for (const detail of entry.modified_details) {
|
| 183 |
+
if (!Array.isArray(detail.reasons)) throw new Error("Native USD metadata reasons are unavailable");
|
| 184 |
+
const reason = detail.reasons.find(name => name === "specifier" || unsupported.test(name));
|
| 185 |
+
if (reason) throw new Error(`USD qualification does not support ${reason}: ${path}/${detail.name}`);
|
| 186 |
+
}
|
| 187 |
+
}
|
| 188 |
+
const layer = diff.layer_meta_diff;
|
| 189 |
+
if (!Array.isArray(layer.changed) || !Array.isArray(layer.details)) {
|
| 190 |
+
throw new Error("Native USD layer metadata inventory returned an unsupported format");
|
| 191 |
+
}
|
| 192 |
+
if (layer.details.some(detail => ["subLayers", "relocates", "expressionVariables"].includes(detail.name))
|
| 193 |
+
|| layer.changed.some(name => /subLayers|relocates|expressionVariables/.test(name))) {
|
| 194 |
+
throw new Error("USD qualification does not support authored layer composition metadata");
|
| 195 |
+
}
|
| 196 |
+
for (const prim of snapshot.prims) {
|
| 197 |
+
const entry = diff.property_diffs[prim.path];
|
| 198 |
+
if (entry && (!Array.isArray(entry.added) || entry.added.some(name => typeof name !== "string")
|
| 199 |
+
|| !Array.isArray(entry.deleted) || entry.deleted.length || !Array.isArray(entry.modified) || entry.modified.length)) {
|
| 200 |
+
throw new Error(`Native USD authored property inventory is inconsistent: ${prim.path}`);
|
| 201 |
+
}
|
| 202 |
+
prim.authoredProperties = entry?.added || [];
|
| 203 |
+
const names = new Set(prim.authoredProperties);
|
| 204 |
+
for (const name of Object.keys(prim.properties || {})) {
|
| 205 |
+
if (!names.has(name)) delete prim.properties[name];
|
| 206 |
+
}
|
| 207 |
+
if (!names.has("purpose")) delete prim.purpose;
|
| 208 |
+
}
|
| 209 |
+
}
|
| 210 |
+
|
| 211 |
+
function unreadableJointLimits(prim) {
|
| 212 |
+
if (!["PhysicsRevoluteJoint", "PhysicsPrismaticJoint"].includes(prim.type)) return [];
|
| 213 |
+
return ["physics:lowerLimit", "physics:upperLimit"].filter(name =>
|
| 214 |
+
prim.authoredProperties?.includes(name) && Object.prototype.hasOwnProperty.call(prim.properties || {}, name)
|
| 215 |
+
&& prim.properties[name] === null);
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
function declaredInfiniteLimitValues(prim, entry) {
|
| 219 |
+
const names = unreadableJointLimits(prim);
|
| 220 |
+
if (!names.length) return;
|
| 221 |
+
const details = entry?.modified_details;
|
| 222 |
+
if (!Array.isArray(details) || !Array.isArray(entry.modified)) {
|
| 223 |
+
throw new Error(`Native USD joint limit provenance is unavailable: ${prim.path}`);
|
| 224 |
+
}
|
| 225 |
+
const byName = new Map(details.map(detail => [detail.name, detail]));
|
| 226 |
+
if (byName.size !== details.length) throw new Error("Native USD joint limit provenance is ambiguous");
|
| 227 |
+
prim.nativeLimitValues = {};
|
| 228 |
+
for (const name of names) {
|
| 229 |
+
const detail = byName.get(name);
|
| 230 |
+
// rc4 JSON serializes nonfinite floats as null. Recover only a declared,
|
| 231 |
+
// authored float limit whose native Layer diff proves its exact value.
|
| 232 |
+
// No default, unrelated null, NaN, time sample or connection is inferred.
|
| 233 |
+
const match = typeof detail?.right === "string" && /^attr type=float value=(-inf|inf)$/.exec(detail.right);
|
| 234 |
+
if (!entry.modified.includes(name) || detail?.left !== "attr type=float" || !match
|
| 235 |
+
|| !Array.isArray(detail.reasons) || detail.reasons.length !== 1 || detail.reasons[0] !== "value") {
|
| 236 |
+
throw new Error(`Native USD unreadable joint limit needs qualification: ${prim.path}.${name}`);
|
| 237 |
+
}
|
| 238 |
+
prim.nativeLimitValues[name] = match[1];
|
| 239 |
+
}
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
function shadingConnectionInventory(native, bytes, filename, snapshot) {
|
| 243 |
+
const shading = snapshot.prims.filter(prim => ["Shader", "Material", "NodeGraph"].includes(prim.type));
|
| 244 |
+
const limits = snapshot.prims.filter(prim => unreadableJointLimits(prim).length);
|
| 245 |
+
if (!shading.length && !limits.length) return;
|
| 246 |
+
if (shading.reduce((total, prim) => total + prim.authoredProperties.length, 0)
|
| 247 |
+
+ limits.reduce((total, prim) => total + unreadableJointLimits(prim).length, 0) > 100_000) {
|
| 248 |
+
throw new Error("USD shading inventory exceeds the qualification property budget");
|
| 249 |
+
}
|
| 250 |
+
// rc4's physics JSON omits connections and RenderStream drops the selected
|
| 251 |
+
// output component. Comparing declared placeholders exposes the native
|
| 252 |
+
// property's connection list in modified_details; no input USDA is parsed
|
| 253 |
+
// in JavaScript, and the same inventory works for binary USDC layers.
|
| 254 |
+
const result = native.usddiff({
|
| 255 |
+
left: { data: matchingLayerBaseline(snapshot, true), name: "shading-connection-baseline.usda" },
|
| 256 |
+
right: { data: bytes, name: filename }, format: "json", compareMetadata: true,
|
| 257 |
+
});
|
| 258 |
+
if (!result?.success || result.warn || typeof result.json !== "string") {
|
| 259 |
+
throw new Error(result?.error || result?.warn || "Native USD shading inspection failed");
|
| 260 |
+
}
|
| 261 |
+
const diff = JSON.parse(result.json);
|
| 262 |
+
if (!diff.property_diffs) throw new Error("Native USD shading inventory is unavailable");
|
| 263 |
+
for (const prim of limits) declaredInfiniteLimitValues(prim, diff.property_diffs[prim.path]);
|
| 264 |
+
for (const prim of shading) {
|
| 265 |
+
prim.connections = {};
|
| 266 |
+
const names = prim.authoredProperties.filter(name => /^(inputs|outputs):/.test(name));
|
| 267 |
+
const entry = diff.property_diffs[prim.path];
|
| 268 |
+
const details = entry?.modified_details || [];
|
| 269 |
+
if (!Array.isArray(details)) throw new Error("Native USD shading property details are unavailable");
|
| 270 |
+
const byName = new Map(details.map(detail => [detail.name, detail]));
|
| 271 |
+
if (byName.size !== details.length || (entry && (!Array.isArray(entry.modified)
|
| 272 |
+
|| entry.modified.some(name => !byName.has(name))))) {
|
| 273 |
+
throw new Error("Native USD shading connection inventory is incomplete");
|
| 274 |
+
}
|
| 275 |
+
for (const name of names) {
|
| 276 |
+
const detail = byName.get(name);
|
| 277 |
+
if (["inputs:simready:specularFactor", "inputs:simready:specularColorFactor"].includes(name)) {
|
| 278 |
+
// The placeholder is declared float. A changed native type is exposed
|
| 279 |
+
// by Layer diff; keep only these bounded opt-in profile type records.
|
| 280 |
+
prim.nativeMaterialInputTypes ||= {};
|
| 281 |
+
const constant = !detail || (Array.isArray(detail.reasons)
|
| 282 |
+
&& !detail.reasons.some(reason => /timeSamples|colorSpace/i.test(reason))
|
| 283 |
+
&& !/timeSamples|colorSpace/i.test(detail.right));
|
| 284 |
+
prim.nativeMaterialInputTypes[name] = !constant ? null : detail
|
| 285 |
+
? /^attr type=([A-Za-z_][A-Za-z_0-9]*)(?: |$)/.exec(detail.right)?.[1] || null : "float";
|
| 286 |
+
}
|
| 287 |
+
prim.connections[name] = [];
|
| 288 |
+
if (!detail) continue; // Identical float declaration: no connected source.
|
| 289 |
+
if (!Array.isArray(detail.reasons) || typeof detail.right !== "string" || detail.right.length > 16_384) {
|
| 290 |
+
throw new Error("Native USD shading connection detail needs qualification");
|
| 291 |
+
}
|
| 292 |
+
if (!detail.reasons.some(reason => /connection/i.test(reason))) continue;
|
| 293 |
+
const match = /^attr type=[A-Za-z_][A-Za-z_0-9]*(?:\[\])? connections=\[([^\]]*)\](?: |$)/.exec(detail.right);
|
| 294 |
+
if (!match) throw new Error(`Native USD connection serialization needs qualification: ${prim.path}.${name}`);
|
| 295 |
+
if (!match[1]) continue;
|
| 296 |
+
const targets = match[1].split(", ");
|
| 297 |
+
if (targets.length !== 1) throw new Error(`Multiple USD shading connections need qualification: ${prim.path}.${name}`);
|
| 298 |
+
const target = /^<([^<>\[\],\u0000-\u001f\u007f]+)>$/.exec(targets[0]);
|
| 299 |
+
if (!target || !target[1].startsWith("/") || !target[1].includes(".")) {
|
| 300 |
+
throw new Error(`Native USD shading connection path needs qualification: ${prim.path}.${name}`);
|
| 301 |
+
}
|
| 302 |
+
prim.connections[name] = [target[1]];
|
| 303 |
+
}
|
| 304 |
+
}
|
| 305 |
+
}
|
| 306 |
+
|
| 307 |
+
function guardVisibleMeshNormals(snapshot, renderRecords) {
|
| 308 |
+
const index = new Map(snapshot.prims.map(prim => [prim.path, prim]));
|
| 309 |
+
const hidden = new Set(renderRecords.filter(record => record.visible === false).map(record => record.primPath));
|
| 310 |
+
for (const prim of snapshot.prims) {
|
| 311 |
+
if (prim.type !== "Mesh") continue;
|
| 312 |
+
if (!Array.isArray(prim.authoredProperties)) throw new Error("Native USD mesh authored property provenance is unavailable");
|
| 313 |
+
const ancestors = [];
|
| 314 |
+
for (let path = prim.path; path; path = path === "/" ? null : path.slice(0, path.lastIndexOf("/")) || "/") ancestors.push(path);
|
| 315 |
+
const normalPrimvar = ancestors.flatMap(path => index.get(path)?.authoredProperties || [])
|
| 316 |
+
.find(name => name === "primvars:normals" || name === "primvars:normals:indices");
|
| 317 |
+
if (!normalPrimvar) continue;
|
| 318 |
+
let visible = true;
|
| 319 |
+
let purpose = "default";
|
| 320 |
+
// Match the native scene's inherited visibility/purpose classification.
|
| 321 |
+
// CollisionAPI alone does not hide a mesh; default/render colliders draw.
|
| 322 |
+
for (const path of ancestors.reverse()) {
|
| 323 |
+
if (hidden.has(path)) visible = false;
|
| 324 |
+
const ancestor = index.get(path);
|
| 325 |
+
if (!ancestor) continue;
|
| 326 |
+
const names = ancestor.authoredProperties || [];
|
| 327 |
+
const properties = ancestor.properties || {};
|
| 328 |
+
if (names.includes("purpose")) {
|
| 329 |
+
const value = Object.prototype.hasOwnProperty.call(properties, "purpose") ? properties.purpose : ancestor.purpose;
|
| 330 |
+
if (!["default", "render", "guide", "proxy"].includes(value)) throw new Error(`USD mesh purpose needs qualification: ${path}`);
|
| 331 |
+
purpose = value;
|
| 332 |
+
}
|
| 333 |
+
if (names.includes("visibility")) {
|
| 334 |
+
if (!["inherited", "invisible"].includes(properties.visibility)) throw new Error(`USD mesh visibility needs qualification: ${path}`);
|
| 335 |
+
if (properties.visibility === "invisible") visible = false;
|
| 336 |
+
}
|
| 337 |
+
}
|
| 338 |
+
if (visible && ["default", "render"].includes(purpose)) {
|
| 339 |
+
// Pinned rc4 RenderStream reads only builtin Mesh.normals; authored
|
| 340 |
+
// normal primvars would otherwise be silently replaced or ignored.
|
| 341 |
+
throw new Error(`USD viewer does not support authored ${normalPrimvar} on visible meshes; use builtin Mesh.normals until native indexed-normal support is qualified: ${prim.path}`);
|
| 342 |
+
}
|
| 343 |
+
}
|
| 344 |
+
}
|
| 345 |
+
|
| 346 |
+
self.onmessage = async ({ data }) => {
|
| 347 |
+
const { bytes, filename } = data;
|
| 348 |
+
let converter;
|
| 349 |
+
let stream;
|
| 350 |
+
try {
|
| 351 |
+
const started = performance.now();
|
| 352 |
+
const { default: initialize } = await import("./lightusd_next.js");
|
| 353 |
+
const native = await initialize({ locateFile: name => new URL(name, import.meta.url).href });
|
| 354 |
+
if (!native.NextUSDZConverterNative || !native.RenderStream) {
|
| 355 |
+
throw new Error("Installed USD runtime lacks the qualified next APIs");
|
| 356 |
+
}
|
| 357 |
+
const initialized = performance.now();
|
| 358 |
+
self.postMessage({ type: "progress", stage: "physics" });
|
| 359 |
+
const input = new Uint8Array(bytes);
|
| 360 |
+
converter = new native.NextUSDZConverterNative();
|
| 361 |
+
if (!converter.loadFromBinary(input, filename)) throw new Error(converter.error() || "USD stage could not be read");
|
| 362 |
+
const warning = converter.warn?.();
|
| 363 |
+
if (warning) throw new Error(`USD reader reported an unqualified stage: ${warning}`);
|
| 364 |
+
const physics = compactPhysics(JSON.parse(converter.extractPhysicsSceneJSON()));
|
| 365 |
+
const physicsRead = performance.now();
|
| 366 |
+
self.postMessage({ type: "progress", stage: "opinions" });
|
| 367 |
+
guardNativeLayerHeader(converter.exportAsUSDA());
|
| 368 |
+
if (converter.error()) throw new Error(converter.error());
|
| 369 |
+
converter.delete();
|
| 370 |
+
converter = null;
|
| 371 |
+
authoredLayerInventory(native, input, filename, physics);
|
| 372 |
+
shadingConnectionInventory(native, input, filename, physics);
|
| 373 |
+
const opinionsRead = performance.now();
|
| 374 |
+
self.postMessage({ type: "progress", stage: "geometry" });
|
| 375 |
+
stream = new native.RenderStream();
|
| 376 |
+
stream.setMeshMerge(false);
|
| 377 |
+
stream.setFlattenRenderTree(false);
|
| 378 |
+
const result = stream.begin(input);
|
| 379 |
+
if (!result?.success) throw new Error(result?.error || stream.error?.() || "USD render extraction failed");
|
| 380 |
+
// The first delivery profile is rigid polygonal geometry. These features
|
| 381 |
+
// need qualification before their data may be silently reduced to a still.
|
| 382 |
+
for (const key of ["pointsCount", "curvesCount", "skeletonCount", "pointInstancerCount", "pointInstanceDrawCount", "animationCount", "unsupportedRenderableCount"]) {
|
| 383 |
+
if (result[key] > 0) throw new Error(`USD qualification does not support ${key}: ${result[key]}`);
|
| 384 |
+
}
|
| 385 |
+
const metadata = stream.getSceneMetadata();
|
| 386 |
+
if (result.meshCount > 10_000 || result.nodeCount > 50_000) throw new Error("USD scene exceeds the qualification object budget");
|
| 387 |
+
const nodes = Array.from({ length: result.nodeCount || 0 }, (_, i) => stream.getNode(i));
|
| 388 |
+
guardVisibleMeshNormals(physics, nodes);
|
| 389 |
+
const meshes = [];
|
| 390 |
+
const transfer = [];
|
| 391 |
+
let outputBytes = 0;
|
| 392 |
+
for (let i = 0; i < result.meshCount; i += 1) {
|
| 393 |
+
const source = stream.getMesh(i);
|
| 394 |
+
if (!source || source.error) throw new Error(source?.error || `USD mesh ${i} is unavailable`);
|
| 395 |
+
const mesh = { ...source };
|
| 396 |
+
for (const [key, Type] of Object.entries(COPY_TYPES)) {
|
| 397 |
+
outputBytes += (source[key]?.length || 0) * Type.BYTES_PER_ELEMENT;
|
| 398 |
+
if (outputBytes > 128 * 1024 * 1024) throw new Error("USD geometry exceeds the 128 MiB qualification limit");
|
| 399 |
+
mesh[key] = copyArray(native, source[key], Type);
|
| 400 |
+
transfer.push(mesh[key].buffer);
|
| 401 |
+
}
|
| 402 |
+
if (source.jointIndices?.length || source.jointWeights?.length || source.blendShapes?.length) {
|
| 403 |
+
throw new Error(`USD qualification does not support deformation: ${source.primPath}`);
|
| 404 |
+
}
|
| 405 |
+
delete mesh.tangents;
|
| 406 |
+
meshes.push(mesh);
|
| 407 |
+
}
|
| 408 |
+
const parsed = performance.now();
|
| 409 |
+
const metrics = {
|
| 410 |
+
reader: "lightusd-next", readerVersion: "1.0.0-rc4", inputBytes: bytes.byteLength,
|
| 411 |
+
runtimeMs: initialized - started, physicsMs: physicsRead - initialized,
|
| 412 |
+
opinionMs: opinionsRead - physicsRead, geometryMs: parsed - opinionsRead, workerMs: parsed - started,
|
| 413 |
+
wasmHeapBytes: native.HEAPU8.buffer.byteLength, meshCount: meshes.length, nodeCount: nodes.length,
|
| 414 |
+
outputBytes,
|
| 415 |
+
};
|
| 416 |
+
stream.end();
|
| 417 |
+
stream.delete();
|
| 418 |
+
stream = null;
|
| 419 |
+
self.postMessage({ type: "result", result: { physics, metadata, nodes, meshes, metrics } }, transfer);
|
| 420 |
+
} catch (error) {
|
| 421 |
+
self.postMessage({ type: "error", message: error?.message || String(error) });
|
| 422 |
+
} finally {
|
| 423 |
+
try { converter?.delete(); } catch (_) { /* release on failed parse */ }
|
| 424 |
+
try { stream?.end(); stream?.delete(); } catch (_) { /* release on failed extraction */ }
|
| 425 |
+
}
|
| 426 |
+
};
|
services/explorer/dist/third-party-notices.txt
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|