feat(assets): publish reusable area packages

This commit is contained in:
que01 committed 2026-08-11 16:07:07 +08:00
1 parent b4a81331e8
commit f385009043
18 files changed
+292 -108

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
"use strict";
function resolveAsset(manifestUrl, manifest, id = "main") {
const asset = manifest.assets.find((candidate) => candidate.id === id);
if (!asset) throw new Error(`Unknown asset '${id}'`);
return new URL(asset.uri, manifestUrl).href;
}
function placement(manifest) {
return { ...manifest.placement, coordinateSystem: manifest.coordinateSystem };
}
module.exports = { resolveAsset, placement };