@holoscript/core 8.0.12 → 8.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/bin/holo-decision.mjs +133 -0
- package/dist/{GLTFPipeline-L76YTXKA.js → GLTFPipeline-6LS3UDYX.js} +6 -6
- package/dist/{GLTFPipeline-ZWJN7GI6.cjs → GLTFPipeline-VTI6PRRQ.cjs} +10 -10
- package/dist/{HoloCompositionParser-FLBZKFD3.js → HoloCompositionParser-GILABNN3.js} +5 -5
- package/dist/{HoloCompositionParser-3XEC7IJC.cjs → HoloCompositionParser-ZVRYVEA5.cjs} +12 -12
- package/dist/{HoloScriptPlusParser-RNUCHOAJ.cjs → HoloScriptPlusParser-WTPRPRPR.cjs} +8 -8
- package/dist/{HoloScriptPlusParser-55AY4MUF.js → HoloScriptPlusParser-ZP53ECSL.js} +5 -5
- package/dist/{SceneIRCompiler-KWUFHZ4O.cjs → SceneIRCompiler-7KQ5NKAU.cjs} +11 -11
- package/dist/{SceneIRCompiler-63KA3M2F.js → SceneIRCompiler-VX75RB6H.js} +6 -6
- package/dist/{chunk-EM2OGPYE.js → chunk-2GKF7JQ6.js} +3 -3
- package/dist/{chunk-HVX7QQYK.js → chunk-3KHRZTNW.js} +3 -3
- package/dist/{chunk-UTUD6GJI.js → chunk-42Z3SVHQ.js} +3 -3
- package/dist/{chunk-Z4IUBW46.js → chunk-47XZ62KM.js} +112 -55
- package/dist/{chunk-GGR7QUKK.cjs → chunk-4CRMVEON.cjs} +37 -37
- package/dist/{chunk-QBY7LRN2.js → chunk-4NEPHK2K.js} +3 -3
- package/dist/{chunk-65S62L4D.cjs → chunk-5B2AJKA5.cjs} +20 -20
- package/dist/{chunk-PJFTTSKE.js → chunk-5T6BWIB7.js} +4 -4
- package/dist/{chunk-KFVNCW4Q.js → chunk-62OYZT6Q.js} +3 -3
- package/dist/{chunk-3KMANSQJ.cjs → chunk-645EWDZW.cjs} +4 -4
- package/dist/{chunk-BP4KTMLY.js → chunk-6FCNMTL5.js} +4 -4
- package/dist/{chunk-77QI552M.js → chunk-73EDVY5D.js} +3 -3
- package/dist/{chunk-7IDJDMPU.cjs → chunk-7FYSSI3C.cjs} +27 -2
- package/dist/{chunk-WNYXT4TE.cjs → chunk-7ITJP33Q.cjs} +3 -3
- package/dist/chunk-7ZKQ32XK.js +1571 -0
- package/dist/{chunk-P7JEKJTZ.cjs → chunk-B6JHTTMR.cjs} +25 -14
- package/dist/{chunk-FG6PYGIZ.js → chunk-BLCWQ225.js} +4 -4
- package/dist/{chunk-7NPZZZD7.js → chunk-C73GVAYC.js} +16 -9
- package/dist/{chunk-RMOEL2GD.cjs → chunk-CESMPUEZ.cjs} +3794 -1137
- package/dist/{chunk-SQXAZHDG.js → chunk-CHIZSMWD.js} +3 -3
- package/dist/{chunk-G35CAQ7I.cjs → chunk-D44CEFY4.cjs} +5 -5
- package/dist/chunk-ERYKKPHW.cjs +1884 -0
- package/dist/{chunk-TYNRXRHF.js → chunk-EYHPTJ3F.js} +3695 -1045
- package/dist/{chunk-J3UHV5T4.cjs → chunk-FGXJPJ3W.cjs} +4 -4
- package/dist/{chunk-IJU6AS67.cjs → chunk-FHR2AVMA.cjs} +23 -23
- package/dist/{chunk-LMB555QB.cjs → chunk-FOM36K5I.cjs} +18 -18
- package/dist/{chunk-JBYBMBMW.js → chunk-FWKEY4LD.js} +3 -2
- package/dist/{chunk-ZRPALBQB.cjs → chunk-GGH3ZYDB.cjs} +5 -5
- package/dist/{chunk-2BYAUHBO.js → chunk-GI5YYZH6.js} +3 -3
- package/dist/{chunk-VTEXJOSD.cjs → chunk-GYJLP4BO.cjs} +30 -30
- package/dist/{chunk-OC6GV5QH.cjs → chunk-HCONR4J6.cjs} +38 -38
- package/dist/{chunk-B3CWTCK2.js → chunk-IA7FCSRY.js} +27 -2
- package/dist/{chunk-5FYMCVBY.js → chunk-IXFNA5TT.js} +4 -4
- package/dist/{chunk-G6KACNMO.js → chunk-JCVSCKUH.js} +4 -4
- package/dist/{chunk-FHVPN7BN.js → chunk-JQCXLKAU.js} +3 -3
- package/dist/{chunk-F3YT6GUF.cjs → chunk-KLM6QD6D.cjs} +14 -14
- package/dist/{chunk-UGQ3QNV6.js → chunk-KOGPVAP6.js} +24 -8
- package/dist/{chunk-CKV5NYAE.js → chunk-KYJD2UMV.js} +4 -4
- package/dist/{chunk-LB3ZZMKT.cjs → chunk-L4DBUX3N.cjs} +10 -10
- package/dist/{chunk-RXQNRZ5F.js → chunk-LGRKBTPM.js} +3 -3
- package/dist/{chunk-OMNHTCS4.cjs → chunk-LHUDAJQT.cjs} +3 -2
- package/dist/{chunk-PDXX5UI4.cjs → chunk-LQNL3IYV.cjs} +38 -38
- package/dist/{chunk-WWNCM473.js → chunk-M7XR3F53.js} +4 -4
- package/dist/{chunk-IFW5IW4L.cjs → chunk-ML4V5PVU.cjs} +670 -627
- package/dist/{chunk-656IAS7B.cjs → chunk-N7IYRAFG.cjs} +21 -14
- package/dist/chunk-N7MIIDLI.cjs +1605 -0
- package/dist/{chunk-USOUXQYD.js → chunk-NWKARJM2.js} +130 -22
- package/dist/{chunk-VVAAZITA.cjs → chunk-OOP4S3GU.cjs} +5 -5
- package/dist/{chunk-TX6ZBIF4.js → chunk-ORBVCOTC.js} +3 -3
- package/dist/{chunk-RRQIAJLQ.cjs → chunk-OSKGCXAQ.cjs} +5 -5
- package/dist/{chunk-QEDMOGF3.cjs → chunk-P65OIMJT.cjs} +7 -7
- package/dist/{chunk-QM7FJB5W.js → chunk-PSWCJQS4.js} +4 -4
- package/dist/{chunk-7N63JHUN.cjs → chunk-PZ46WRHX.cjs} +8 -8
- package/dist/{chunk-AATYYLYK.js → chunk-Q4J2K7FI.js} +16 -5
- package/dist/chunk-QLPRI3QW.js +1875 -0
- package/dist/{chunk-WTH23ISI.js → chunk-R5VKLUMR.js} +4 -4
- package/dist/{chunk-NQN5LFN4.cjs → chunk-REN3LHO6.cjs} +19 -19
- package/dist/{chunk-JEJ7TT54.js → chunk-RVN7OPCP.js} +4 -4
- package/dist/{chunk-ZK7KX5CD.cjs → chunk-SE2Y5BSL.cjs} +6 -6
- package/dist/{chunk-2X3IPCBK.cjs → chunk-SKVBUGMC.cjs} +7 -7
- package/dist/{chunk-GZPUA2TL.cjs → chunk-SNMQUWIO.cjs} +10 -10
- package/dist/{chunk-OIBRWLPY.cjs → chunk-TKDDIE3T.cjs} +54 -3
- package/dist/{chunk-5H5GFBMG.cjs → chunk-TMNAKNV2.cjs} +112 -55
- package/dist/{chunk-5LVFTGKH.js → chunk-TZQKJOPC.js} +3 -3
- package/dist/{chunk-TSTFYGGX.js → chunk-UKEK2NZJ.js} +3 -3
- package/dist/{chunk-3IUHTGDD.cjs → chunk-VA7THINF.cjs} +38 -38
- package/dist/{chunk-Z557DVYN.js → chunk-VMCR5QVI.js} +4 -4
- package/dist/{chunk-IS7NTKY5.cjs → chunk-VTFLKSJL.cjs} +14 -14
- package/dist/{chunk-VO52AJD5.js → chunk-VXHB6ZHY.js} +4 -4
- package/dist/{chunk-S4O7CFHQ.cjs → chunk-VZI7S7P6.cjs} +7 -7
- package/dist/{chunk-BQJ3YBF3.js → chunk-W4AJMMQR.js} +667 -628
- package/dist/{chunk-2KKOYZYI.cjs → chunk-XZC75AJ4.cjs} +5 -5
- package/dist/{chunk-FWCHPCD4.js → chunk-Y2OCKXVD.js} +4 -4
- package/dist/{chunk-EI5G5JLY.cjs → chunk-YBM34FUJ.cjs} +134 -22
- package/dist/{chunk-DUG3OQAS.js → chunk-YDSNDCV3.js} +3 -3
- package/dist/{chunk-566ZB4LZ.cjs → chunk-YM7UUYR5.cjs} +5 -5
- package/dist/{chunk-BCP4E7MD.cjs → chunk-YMI3ED3B.cjs} +26 -10
- package/dist/{chunk-CP7V3ATL.js → chunk-Z7NUL73U.js} +51 -4
- package/dist/cli/holoscript-runner.cjs +11 -11
- package/dist/cli/holoscript-runner.js +4 -4
- package/dist/compiler/agent-inference.cjs +8 -8
- package/dist/compiler/agent-inference.js +4 -4
- package/dist/compiler/android-xr.cjs +7 -7
- package/dist/compiler/android-xr.js +5 -5
- package/dist/compiler/android.cjs +6 -6
- package/dist/compiler/android.js +4 -4
- package/dist/compiler/context.cjs +6 -6
- package/dist/compiler/context.js +3 -3
- package/dist/compiler/daimon-seed.cjs +9 -9
- package/dist/compiler/daimon-seed.js +4 -4
- package/dist/compiler/domain-block-utils.cjs +165 -165
- package/dist/compiler/domain-block-utils.js +4 -4
- package/dist/compiler/dtdl.cjs +7 -7
- package/dist/compiler/dtdl.js +4 -4
- package/dist/compiler/gltf-pipeline.cjs +8 -8
- package/dist/compiler/gltf-pipeline.js +1 -1
- package/dist/compiler/godot.cjs +6 -6
- package/dist/compiler/godot.js +5 -5
- package/dist/compiler/incremental.cjs +8 -8
- package/dist/compiler/incremental.js +3 -3
- package/dist/compiler/index.cjs +871 -207
- package/dist/compiler/index.d.ts +21 -1
- package/dist/compiler/index.js +696 -60
- package/dist/compiler/ios.cjs +6 -6
- package/dist/compiler/ios.js +4 -4
- package/dist/compiler/llm-provider-capabilities.cjs +6 -6
- package/dist/compiler/llm-provider-capabilities.js +3 -3
- package/dist/compiler/openxr.cjs +6 -6
- package/dist/compiler/openxr.js +5 -5
- package/dist/compiler/sdf.cjs +7 -7
- package/dist/compiler/sdf.js +5 -5
- package/dist/compiler/state.cjs +6 -6
- package/dist/compiler/state.js +4 -4
- package/dist/compiler/trait-composition.cjs +7 -7
- package/dist/compiler/trait-composition.js +3 -3
- package/dist/compiler/unity.cjs +6 -6
- package/dist/compiler/unity.js +5 -5
- package/dist/compiler/unreal.cjs +7 -7
- package/dist/compiler/unreal.js +5 -5
- package/dist/compiler/urdf.cjs +14 -14
- package/dist/compiler/urdf.js +5 -5
- package/dist/compiler/usd-physics.cjs +7 -7
- package/dist/compiler/usd-physics.js +4 -4
- package/dist/compiler/visionos.cjs +6 -6
- package/dist/compiler/visionos.js +5 -5
- package/dist/compiler/vrchat.cjs +7 -7
- package/dist/compiler/vrchat.js +5 -5
- package/dist/compiler/wasm.cjs +10 -10
- package/dist/compiler/wasm.js +5 -5
- package/dist/compiler/webgpu.cjs +6 -6
- package/dist/compiler/webgpu.js +5 -5
- package/dist/constants.cjs +3 -3
- package/dist/constants.js +1 -1
- package/dist/entries/scripting.cjs +6 -6
- package/dist/entries/scripting.js +2 -2
- package/dist/evolution/index.cjs +21 -17
- package/dist/evolution/index.d.ts +9 -0
- package/dist/evolution/index.js +6 -6
- package/dist/index.cjs +930 -703
- package/dist/index.d.ts +70 -5
- package/dist/index.js +192 -109
- package/dist/parser.cjs +19 -19
- package/dist/parser.js +5 -5
- package/dist/reconstruction/index.cjs +127 -38
- package/dist/reconstruction/index.d.ts +159 -0
- package/dist/reconstruction/index.js +11 -2
- package/dist/runtime.d.ts +1 -0
- package/dist/traitDocs/traitDocs.cjs +8 -8
- package/dist/traitDocs/traitDocs.js +2 -2
- package/dist/traits/index.cjs +566 -471
- package/dist/traits/index.js +93 -11
- package/package.json +25 -41
- package/dist/chunk-G3BM3CT4.cjs +0 -639
- package/dist/chunk-KEYG7HGY.js +0 -1062
- package/dist/chunk-QX34ELJ7.js +0 -625
- package/dist/chunk-W2GA3EQB.cjs +0 -1065
|
@@ -4,9 +4,9 @@ var chunkLM2VU56C_cjs = require('./chunk-LM2VU56C.cjs');
|
|
|
4
4
|
var chunkN2ILK7BF_cjs = require('./chunk-N2ILK7BF.cjs');
|
|
5
5
|
|
|
6
6
|
// src/version.ts
|
|
7
|
-
var HOLOSCRIPT_VERSION = "8.0.
|
|
8
|
-
var GIT_COMMIT_SHA = "
|
|
9
|
-
var BUILD_TIMESTAMP = "2026-07-
|
|
7
|
+
var HOLOSCRIPT_VERSION = "8.0.14" ;
|
|
8
|
+
var GIT_COMMIT_SHA = "cac71253a" ;
|
|
9
|
+
var BUILD_TIMESTAMP = "2026-07-12T00:05:58.992Z" ;
|
|
10
10
|
function getVersionString() {
|
|
11
11
|
const sha = `+${GIT_COMMIT_SHA}` ;
|
|
12
12
|
return `${HOLOSCRIPT_VERSION}${sha}`;
|
|
@@ -1813,9 +1813,12 @@ function createPagedKVCache(config) {
|
|
|
1813
1813
|
const freePhysicalPages = Array.from({ length: config.maxResidentPages }, (_, i) => i).reverse();
|
|
1814
1814
|
const appendKernel = config.device ? createPagedKVAppendKernel(config.device) : null;
|
|
1815
1815
|
const lookupKernel = config.device ? createPagedKVLookupKernel(config.device) : null;
|
|
1816
|
+
const residentPageStates = /* @__PURE__ */ new Set();
|
|
1816
1817
|
let disposed = false;
|
|
1817
1818
|
let nextPageId = 0;
|
|
1818
1819
|
let accessClock = 0;
|
|
1820
|
+
let devicePageCount = 0;
|
|
1821
|
+
let hostPageCount = 0;
|
|
1819
1822
|
function assertLive() {
|
|
1820
1823
|
if (disposed) throw new Error("PagedKVCache has been disposed.");
|
|
1821
1824
|
}
|
|
@@ -1850,9 +1853,7 @@ function createPagedKVCache(config) {
|
|
|
1850
1853
|
valuePages.fill(0, offset, end);
|
|
1851
1854
|
}
|
|
1852
1855
|
function residentPages() {
|
|
1853
|
-
return
|
|
1854
|
-
(layer) => Array.from(layer.pages.values()).filter((page) => page.residency === "device")
|
|
1855
|
-
);
|
|
1856
|
+
return Array.from(residentPageStates);
|
|
1856
1857
|
}
|
|
1857
1858
|
function evictPage(page) {
|
|
1858
1859
|
if (page.physicalPage === null) return pageSnapshot(page);
|
|
@@ -1865,6 +1866,9 @@ function createPagedKVCache(config) {
|
|
|
1865
1866
|
page.hostKeys = hostKeys;
|
|
1866
1867
|
page.hostValues = hostValues;
|
|
1867
1868
|
page.residency = "host";
|
|
1869
|
+
residentPageStates.delete(page);
|
|
1870
|
+
devicePageCount -= 1;
|
|
1871
|
+
hostPageCount += 1;
|
|
1868
1872
|
return pageSnapshot(page);
|
|
1869
1873
|
}
|
|
1870
1874
|
function evictOldestInternal(count, protectedPage) {
|
|
@@ -1890,7 +1894,10 @@ function createPagedKVCache(config) {
|
|
|
1890
1894
|
}
|
|
1891
1895
|
const physicalPage = allocatePhysicalPage(page);
|
|
1892
1896
|
page.physicalPage = physicalPage;
|
|
1897
|
+
if (page.residency === "host") hostPageCount -= 1;
|
|
1893
1898
|
page.residency = "device";
|
|
1899
|
+
residentPageStates.add(page);
|
|
1900
|
+
devicePageCount += 1;
|
|
1894
1901
|
page.lastAccess = ++accessClock;
|
|
1895
1902
|
if (page.hostKeys) {
|
|
1896
1903
|
keyPages.set(page.hostKeys, pageOffset(physicalPage));
|
|
@@ -1920,6 +1927,8 @@ function createPagedKVCache(config) {
|
|
|
1920
1927
|
lastAccess: ++accessClock
|
|
1921
1928
|
};
|
|
1922
1929
|
layerState.pages.set(logicalPage, page);
|
|
1930
|
+
residentPageStates.add(page);
|
|
1931
|
+
devicePageCount += 1;
|
|
1923
1932
|
return page;
|
|
1924
1933
|
}
|
|
1925
1934
|
function buildPageTable(layer, logicalPages) {
|
|
@@ -1937,27 +1946,32 @@ function createPagedKVCache(config) {
|
|
|
1937
1946
|
}
|
|
1938
1947
|
return pageTable;
|
|
1939
1948
|
}
|
|
1940
|
-
function
|
|
1941
|
-
const out = new Float32Array(pages);
|
|
1949
|
+
function appendCpuInPlace(pages, touchedPages, vectors, startToken) {
|
|
1942
1950
|
const numVecs = vectors.length / config.hiddenDim;
|
|
1943
1951
|
for (let v = 0; v < numVecs; v += 1) {
|
|
1944
|
-
const
|
|
1945
|
-
const
|
|
1946
|
-
const
|
|
1952
|
+
const token = startToken + v;
|
|
1953
|
+
const logicalPage = Math.floor(token / config.pageSize);
|
|
1954
|
+
const inPage = token % config.pageSize;
|
|
1955
|
+
const physicalPage = touchedPages.get(logicalPage)?.physicalPage;
|
|
1956
|
+
if (physicalPage === void 0 || physicalPage === null) {
|
|
1957
|
+
throw new Error(`PagedKVCache append misses resident logical page ${logicalPage}.`);
|
|
1958
|
+
}
|
|
1947
1959
|
const base = physicalPage * config.pageSize * config.hiddenDim;
|
|
1948
1960
|
for (let d = 0; d < config.hiddenDim; d += 1) {
|
|
1949
|
-
|
|
1961
|
+
pages[base + inPage * config.hiddenDim + d] = vectors[v * config.hiddenDim + d];
|
|
1950
1962
|
}
|
|
1951
1963
|
}
|
|
1952
|
-
return out;
|
|
1953
1964
|
}
|
|
1954
|
-
function
|
|
1965
|
+
function lookupCpuDirect(pages, layerState, tokenCount, startToken) {
|
|
1955
1966
|
const out = new Float32Array(tokenCount * config.hiddenDim);
|
|
1956
1967
|
for (let v = 0; v < tokenCount; v += 1) {
|
|
1957
1968
|
const logicalSlot = startToken + v;
|
|
1958
1969
|
const logicalPage = Math.floor(logicalSlot / config.pageSize);
|
|
1959
1970
|
const inPage = logicalSlot % config.pageSize;
|
|
1960
|
-
const physicalPage =
|
|
1971
|
+
const physicalPage = layerState.pages.get(logicalPage)?.physicalPage;
|
|
1972
|
+
if (physicalPage === void 0 || physicalPage === null) {
|
|
1973
|
+
throw new Error(`PagedKVCache lookup misses resident logical page ${logicalPage}.`);
|
|
1974
|
+
}
|
|
1961
1975
|
const base = physicalPage * config.pageSize * config.hiddenDim;
|
|
1962
1976
|
for (let d = 0; d < config.hiddenDim; d += 1) {
|
|
1963
1977
|
out[v * config.hiddenDim + d] = pages[base + inPage * config.hiddenDim + d];
|
|
@@ -1979,7 +1993,7 @@ function createPagedKVCache(config) {
|
|
|
1979
1993
|
residentPagesForLayer(layer) {
|
|
1980
1994
|
assertLive();
|
|
1981
1995
|
validateLayer(layer);
|
|
1982
|
-
return Array.from(
|
|
1996
|
+
return Array.from(residentPageStates).filter((page) => page.layer === layer).sort((a, b) => a.firstToken - b.firstToken).map((page) => pageSnapshot(page));
|
|
1983
1997
|
},
|
|
1984
1998
|
evictOldest(count) {
|
|
1985
1999
|
assertLive();
|
|
@@ -1990,23 +2004,18 @@ function createPagedKVCache(config) {
|
|
|
1990
2004
|
},
|
|
1991
2005
|
memoryUsage() {
|
|
1992
2006
|
assertLive();
|
|
1993
|
-
let devicePages = 0;
|
|
1994
|
-
let hostPages = 0;
|
|
1995
|
-
for (const layer of layers) {
|
|
1996
|
-
for (const page of layer.pages.values()) {
|
|
1997
|
-
if (page.residency === "device") devicePages += 1;
|
|
1998
|
-
if (page.residency === "host") hostPages += 1;
|
|
1999
|
-
}
|
|
2000
|
-
}
|
|
2001
2007
|
return {
|
|
2002
|
-
device:
|
|
2003
|
-
host:
|
|
2008
|
+
device: devicePageCount * pageBytes * 2,
|
|
2009
|
+
host: hostPageCount * pageBytes * 2
|
|
2004
2010
|
};
|
|
2005
2011
|
},
|
|
2006
2012
|
async dispose() {
|
|
2007
2013
|
disposed = true;
|
|
2008
2014
|
for (const layer of layers) layer.pages.clear();
|
|
2015
|
+
residentPageStates.clear();
|
|
2009
2016
|
freePhysicalPages.length = 0;
|
|
2017
|
+
devicePageCount = 0;
|
|
2018
|
+
hostPageCount = 0;
|
|
2010
2019
|
},
|
|
2011
2020
|
async append(layer, keyVectors, valueVectors = keyVectors, firstToken) {
|
|
2012
2021
|
assertLive();
|
|
@@ -2026,14 +2035,11 @@ function createPagedKVCache(config) {
|
|
|
2026
2035
|
throw new Error(`PagedKVCache append firstToken must be non-negative, got ${startToken}`);
|
|
2027
2036
|
}
|
|
2028
2037
|
const touchedPages = /* @__PURE__ */ new Map();
|
|
2029
|
-
const slotMap = new Uint32Array(tokenCount);
|
|
2030
2038
|
const requiredPages = /* @__PURE__ */ new Set();
|
|
2031
2039
|
for (let i = 0; i < tokenCount; i += 1) {
|
|
2032
2040
|
const token = startToken + i;
|
|
2033
2041
|
const logicalPage = Math.floor(token / config.pageSize);
|
|
2034
|
-
const slot = token % config.pageSize;
|
|
2035
2042
|
requiredPages.add(logicalPage);
|
|
2036
|
-
slotMap[i] = logicalPage << 16 | slot;
|
|
2037
2043
|
}
|
|
2038
2044
|
if (requiredPages.size > config.maxResidentPages) {
|
|
2039
2045
|
throw new Error(
|
|
@@ -2044,8 +2050,15 @@ function createPagedKVCache(config) {
|
|
|
2044
2050
|
const page = allocatePageInternal(layer, logicalPage);
|
|
2045
2051
|
touchedPages.set(logicalPage, page);
|
|
2046
2052
|
}
|
|
2047
|
-
const pageTable = buildPageTable(layer, touchedPages.keys());
|
|
2048
2053
|
if (appendKernel) {
|
|
2054
|
+
const slotMap = new Uint32Array(tokenCount);
|
|
2055
|
+
for (let i = 0; i < tokenCount; i += 1) {
|
|
2056
|
+
const token = startToken + i;
|
|
2057
|
+
const logicalPage = Math.floor(token / config.pageSize);
|
|
2058
|
+
const slot = token % config.pageSize;
|
|
2059
|
+
slotMap[i] = logicalPage << 16 | slot;
|
|
2060
|
+
}
|
|
2061
|
+
const pageTable = buildPageTable(layer, touchedPages.keys());
|
|
2049
2062
|
keyPages.set(
|
|
2050
2063
|
await appendKernel.run(
|
|
2051
2064
|
keyPages,
|
|
@@ -2067,8 +2080,8 @@ function createPagedKVCache(config) {
|
|
|
2067
2080
|
)
|
|
2068
2081
|
);
|
|
2069
2082
|
} else {
|
|
2070
|
-
|
|
2071
|
-
|
|
2083
|
+
appendCpuInPlace(keyPages, touchedPages, keyVectors, startToken);
|
|
2084
|
+
appendCpuInPlace(valuePages, touchedPages, valueVectors, startToken);
|
|
2072
2085
|
}
|
|
2073
2086
|
for (const page of touchedPages.values()) page.lastAccess = ++accessClock;
|
|
2074
2087
|
layers[layer].nextToken = Math.max(layers[layer].nextToken, startToken + tokenCount);
|
|
@@ -2105,8 +2118,8 @@ function createPagedKVCache(config) {
|
|
|
2105
2118
|
for (const logicalPage of requiredPages) {
|
|
2106
2119
|
ensurePageResident(layers[layer].pages.get(logicalPage));
|
|
2107
2120
|
}
|
|
2108
|
-
const pageTable = buildPageTable(layer, requiredPages);
|
|
2109
2121
|
if (lookupKernel) {
|
|
2122
|
+
const pageTable = buildPageTable(layer, requiredPages);
|
|
2110
2123
|
return {
|
|
2111
2124
|
keys: await lookupKernel.run(
|
|
2112
2125
|
keyPages,
|
|
@@ -2127,8 +2140,8 @@ function createPagedKVCache(config) {
|
|
|
2127
2140
|
};
|
|
2128
2141
|
}
|
|
2129
2142
|
return {
|
|
2130
|
-
keys:
|
|
2131
|
-
values:
|
|
2143
|
+
keys: lookupCpuDirect(keyPages, layers[layer], tokenCount, startToken),
|
|
2144
|
+
values: lookupCpuDirect(valuePages, layers[layer], tokenCount, startToken)
|
|
2132
2145
|
};
|
|
2133
2146
|
}
|
|
2134
2147
|
};
|
|
@@ -2206,6 +2219,9 @@ var _HoloMapRuntimeImpl = class _HoloMapRuntimeImpl {
|
|
|
2206
2219
|
*/
|
|
2207
2220
|
this.globalPosSum = [0, 0, 0];
|
|
2208
2221
|
this.globalConfSum = 0;
|
|
2222
|
+
this.globalPrincipalMomentXX = 0;
|
|
2223
|
+
this.globalPrincipalMomentZZ = 0;
|
|
2224
|
+
this.globalPrincipalMomentXZ = 0;
|
|
2209
2225
|
/** Previous frame camera pose (centroid of that frame's points). */
|
|
2210
2226
|
this.prevPose = null;
|
|
2211
2227
|
/** Previous full camera pose, including scan-derived principal-axis rotation. */
|
|
@@ -2457,6 +2473,15 @@ var _HoloMapRuntimeImpl = class _HoloMapRuntimeImpl {
|
|
|
2457
2473
|
const yaw = 0.5 * Math.atan2(2 * xz, xx - zz);
|
|
2458
2474
|
return _HoloMapRuntimeImpl.yawToQuaternion(yaw);
|
|
2459
2475
|
}
|
|
2476
|
+
static estimatePrincipalAxisRotationFromMoments(momentXX, momentZZ, momentXZ, pointCount, centroid) {
|
|
2477
|
+
if (pointCount < 2) return [0, 0, 0, 1];
|
|
2478
|
+
const xx = momentXX - pointCount * centroid[0] * centroid[0];
|
|
2479
|
+
const zz = momentZZ - pointCount * centroid[2] * centroid[2];
|
|
2480
|
+
const xz = momentXZ - pointCount * centroid[0] * centroid[2];
|
|
2481
|
+
if (xx + zz < 1e-12) return [0, 0, 0, 1];
|
|
2482
|
+
const yaw = 0.5 * Math.atan2(2 * xz, xx - zz);
|
|
2483
|
+
return _HoloMapRuntimeImpl.yawToQuaternion(yaw);
|
|
2484
|
+
}
|
|
2460
2485
|
static yawToQuaternion(yaw) {
|
|
2461
2486
|
const half = yaw / 2;
|
|
2462
2487
|
return [0, Math.sin(half), 0, Math.cos(half)];
|
|
@@ -2492,17 +2517,23 @@ var _HoloMapRuntimeImpl = class _HoloMapRuntimeImpl {
|
|
|
2492
2517
|
anchorDescriptor[3] ?? 0
|
|
2493
2518
|
]);
|
|
2494
2519
|
}
|
|
2495
|
-
static cloneTrajectoryKeyframes(keyframes) {
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2520
|
+
static cloneTrajectoryKeyframes(keyframes, maxCount = keyframes.length) {
|
|
2521
|
+
const start = Math.max(0, keyframes.length - Math.max(0, maxCount));
|
|
2522
|
+
const out = [];
|
|
2523
|
+
for (let i = start; i < keyframes.length; i += 1) {
|
|
2524
|
+
const keyframe = keyframes[i];
|
|
2525
|
+
out.push({
|
|
2526
|
+
frameIndex: keyframe.frameIndex,
|
|
2527
|
+
timestampMs: keyframe.timestampMs,
|
|
2528
|
+
pose: {
|
|
2529
|
+
position: [...keyframe.pose.position],
|
|
2530
|
+
rotation: [...keyframe.pose.rotation],
|
|
2531
|
+
confidence: keyframe.pose.confidence
|
|
2532
|
+
},
|
|
2533
|
+
embedding: new Float32Array(keyframe.embedding)
|
|
2534
|
+
});
|
|
2535
|
+
}
|
|
2536
|
+
return out;
|
|
2506
2537
|
}
|
|
2507
2538
|
pushTrajectoryKeyframe(keyframe) {
|
|
2508
2539
|
this.trajectoryKeyframes.push(keyframe);
|
|
@@ -2545,6 +2576,9 @@ var _HoloMapRuntimeImpl = class _HoloMapRuntimeImpl {
|
|
|
2545
2576
|
this.trajectoryKeyframes.length = 0;
|
|
2546
2577
|
this.globalPosSum = [0, 0, 0];
|
|
2547
2578
|
this.globalConfSum = 0;
|
|
2579
|
+
this.globalPrincipalMomentXX = 0;
|
|
2580
|
+
this.globalPrincipalMomentZZ = 0;
|
|
2581
|
+
this.globalPrincipalMomentXZ = 0;
|
|
2548
2582
|
this.lastAcceptedFrameTimestampMs = null;
|
|
2549
2583
|
this.sessionStartMs = performance.now();
|
|
2550
2584
|
this.perfMetrics = {
|
|
@@ -2813,9 +2847,15 @@ var _HoloMapRuntimeImpl = class _HoloMapRuntimeImpl {
|
|
|
2813
2847
|
this.totalPointCount -= evictedPoints;
|
|
2814
2848
|
const ep = evicted.points.positions;
|
|
2815
2849
|
for (let i = 0; i < ep.length; i += 3) {
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2850
|
+
const x = ep[i];
|
|
2851
|
+
const y = ep[i + 1];
|
|
2852
|
+
const z = ep[i + 2];
|
|
2853
|
+
this.globalPosSum[0] -= x;
|
|
2854
|
+
this.globalPosSum[1] -= y;
|
|
2855
|
+
this.globalPosSum[2] -= z;
|
|
2856
|
+
this.globalPrincipalMomentXX -= x * x;
|
|
2857
|
+
this.globalPrincipalMomentZZ -= z * z;
|
|
2858
|
+
this.globalPrincipalMomentXZ -= x * z;
|
|
2819
2859
|
}
|
|
2820
2860
|
const ec = evicted.points.confidence;
|
|
2821
2861
|
for (let i = 0; i < ec.length; i += 1) this.globalConfSum -= ec[i];
|
|
@@ -2900,6 +2940,9 @@ var _HoloMapRuntimeImpl = class _HoloMapRuntimeImpl {
|
|
|
2900
2940
|
let centroidY = 0;
|
|
2901
2941
|
let centroidZ = 0;
|
|
2902
2942
|
let confidenceSum = 0;
|
|
2943
|
+
let framePrincipalMomentXX = 0;
|
|
2944
|
+
let framePrincipalMomentZZ = 0;
|
|
2945
|
+
let framePrincipalMomentXZ = 0;
|
|
2903
2946
|
for (let t = 0; t < numPoints; t += 1) {
|
|
2904
2947
|
const { meanColor, centerUv, texture, latent, rawDepthSignal } = encodedTiles[t];
|
|
2905
2948
|
const [latentX, latentY, latentZ] = latent;
|
|
@@ -2958,6 +3001,9 @@ var _HoloMapRuntimeImpl = class _HoloMapRuntimeImpl {
|
|
|
2958
3001
|
centroidX += px;
|
|
2959
3002
|
centroidY += py;
|
|
2960
3003
|
centroidZ += pz;
|
|
3004
|
+
framePrincipalMomentXX += px * px;
|
|
3005
|
+
framePrincipalMomentZZ += pz * pz;
|
|
3006
|
+
framePrincipalMomentXZ += px * pz;
|
|
2961
3007
|
}
|
|
2962
3008
|
const inv = 1 / Math.max(1, numPoints);
|
|
2963
3009
|
const poseX = centroidX * inv;
|
|
@@ -3039,6 +3085,9 @@ var _HoloMapRuntimeImpl = class _HoloMapRuntimeImpl {
|
|
|
3039
3085
|
this.globalPosSum[1] += centroidY;
|
|
3040
3086
|
this.globalPosSum[2] += centroidZ;
|
|
3041
3087
|
this.globalConfSum += confidenceSum;
|
|
3088
|
+
this.globalPrincipalMomentXX += framePrincipalMomentXX;
|
|
3089
|
+
this.globalPrincipalMomentZZ += framePrincipalMomentZZ;
|
|
3090
|
+
this.globalPrincipalMomentXZ += framePrincipalMomentXZ;
|
|
3042
3091
|
const totalPoints = this.totalPointCount + numPoints;
|
|
3043
3092
|
const ginv = 1 / Math.max(1, totalPoints);
|
|
3044
3093
|
const anchorCenter = [
|
|
@@ -3051,8 +3100,11 @@ var _HoloMapRuntimeImpl = class _HoloMapRuntimeImpl {
|
|
|
3051
3100
|
const extentX = b.max[0] - b.min[0];
|
|
3052
3101
|
const extentY = b.max[1] - b.min[1];
|
|
3053
3102
|
const extentZ = b.max[2] - b.min[2];
|
|
3054
|
-
const anchorRotation = _HoloMapRuntimeImpl.
|
|
3055
|
-
|
|
3103
|
+
const anchorRotation = _HoloMapRuntimeImpl.estimatePrincipalAxisRotationFromMoments(
|
|
3104
|
+
this.globalPrincipalMomentXX,
|
|
3105
|
+
this.globalPrincipalMomentZZ,
|
|
3106
|
+
this.globalPrincipalMomentXZ,
|
|
3107
|
+
totalPoints,
|
|
3056
3108
|
anchorCenter
|
|
3057
3109
|
);
|
|
3058
3110
|
const anchorDescriptor = new Float32Array([extentX, extentY, extentZ, globalMeanConfidence]);
|
|
@@ -3068,7 +3120,8 @@ var _HoloMapRuntimeImpl = class _HoloMapRuntimeImpl {
|
|
|
3068
3120
|
)
|
|
3069
3121
|
});
|
|
3070
3122
|
const trajectoryKeyframes = _HoloMapRuntimeImpl.cloneTrajectoryKeyframes(
|
|
3071
|
-
this.trajectoryKeyframes
|
|
3123
|
+
this.trajectoryKeyframes,
|
|
3124
|
+
_HoloMapRuntimeImpl.TRAJECTORY_STEP_SNAPSHOT_CAP
|
|
3072
3125
|
);
|
|
3073
3126
|
const step = {
|
|
3074
3127
|
frame,
|
|
@@ -3086,7 +3139,7 @@ var _HoloMapRuntimeImpl = class _HoloMapRuntimeImpl {
|
|
|
3086
3139
|
revision: frame.index + 1
|
|
3087
3140
|
},
|
|
3088
3141
|
anchor: {
|
|
3089
|
-
anchorFrameIndex: trajectoryKeyframes[0]?.frameIndex ?? frame.index,
|
|
3142
|
+
anchorFrameIndex: this.trajectoryKeyframes[0]?.frameIndex ?? frame.index,
|
|
3090
3143
|
anchorPose: {
|
|
3091
3144
|
position: anchorCenter,
|
|
3092
3145
|
rotation: anchorRotation,
|
|
@@ -3208,6 +3261,9 @@ var _HoloMapRuntimeImpl = class _HoloMapRuntimeImpl {
|
|
|
3208
3261
|
this.trajectoryKeyframes.length = 0;
|
|
3209
3262
|
this.globalPosSum = [0, 0, 0];
|
|
3210
3263
|
this.globalConfSum = 0;
|
|
3264
|
+
this.globalPrincipalMomentXX = 0;
|
|
3265
|
+
this.globalPrincipalMomentZZ = 0;
|
|
3266
|
+
this.globalPrincipalMomentXZ = 0;
|
|
3211
3267
|
this.boundsValid = false;
|
|
3212
3268
|
this.lastAcceptedFrameTimestampMs = null;
|
|
3213
3269
|
this.perfMetrics = {
|
|
@@ -3223,6 +3279,7 @@ _HoloMapRuntimeImpl.LOOP_CLOSURE_MIN_GAP = 3;
|
|
|
3223
3279
|
_HoloMapRuntimeImpl.LOOP_CLOSURE_RADIUS = 0.05;
|
|
3224
3280
|
_HoloMapRuntimeImpl.POSE_HISTORY_CAP = 512;
|
|
3225
3281
|
_HoloMapRuntimeImpl.TRAJECTORY_KEYFRAME_CAP = 512;
|
|
3282
|
+
_HoloMapRuntimeImpl.TRAJECTORY_STEP_SNAPSHOT_CAP = 64;
|
|
3226
3283
|
/** Maps normalized measured depth [0=near,1=far] to a point Z range matching
|
|
3227
3284
|
* the monocular estimate's spread (±~0.17), so sensor and estimate paths
|
|
3228
3285
|
* produce geometry in the same coordinate scale. */
|
|
@@ -3276,5 +3333,5 @@ exports.selfAttestReconstructionManifest = selfAttestReconstructionManifest;
|
|
|
3276
3333
|
exports.serializeMicroWeights = serializeMicroWeights;
|
|
3277
3334
|
exports.stripAnchoredProvenance = stripAnchoredProvenance;
|
|
3278
3335
|
exports.tryCreateHoloMapEncoderDevice = tryCreateHoloMapEncoderDevice;
|
|
3279
|
-
//# sourceMappingURL=chunk-
|
|
3280
|
-
//# sourceMappingURL=chunk-
|
|
3336
|
+
//# sourceMappingURL=chunk-TMNAKNV2.cjs.map
|
|
3337
|
+
//# sourceMappingURL=chunk-TMNAKNV2.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { init_PerceptualColorPass, applyPerceptualColorPass } from './chunk-UCVZXQ63.js';
|
|
2
|
-
import { init_CompilerBase, init_ANSNamespace, ANSCapabilityPath, escapeStringValue } from './chunk-
|
|
2
|
+
import { init_CompilerBase, init_ANSNamespace, ANSCapabilityPath, escapeStringValue } from './chunk-YDSNDCV3.js';
|
|
3
3
|
import { __esm } from './chunk-W4GABFCR.js';
|
|
4
4
|
|
|
5
5
|
// src/compiler/DomainBlockCompilerMixin.ts
|
|
@@ -4673,5 +4673,5 @@ var init_DomainBlockCompilerMixin = __esm({
|
|
|
4673
4673
|
});
|
|
4674
4674
|
|
|
4675
4675
|
export { DOMAIN_BLOCK_COMPILER_MIXIN_CAPABILITY, architectureToGodot, architectureToR3F, architectureToUSDA, architectureToUnity, architectureToVRChat, audioSourceToAndroidXR, audioSourceToBabylon, audioSourceToGodot, audioSourceToPlayCanvas, audioSourceToR3F, audioSourceToUSD, audioSourceToUnity, audioSourceToUnreal, audioSourceToVisionOS, compileArchitectureBlock, compileAudioSourceBlock, compileDataVizBlock, compileDomainBlocks, compileEducationBlock, compileHealthcareBlock, compileInputBlock, compileIoTBlock, compileLightFieldBlock, compileMaterialBlock, compileMaterialGraphBlock, compileMusicBlock, compileNarrativeBlock, compileNavFieldBlock, compileNavigationBlock, compileParticleBlock, compileParticleFieldBlock, compilePaymentBlock, compilePhysicsBlock, compilePhysicsContractBlock, compilePostProcessingBlock, compileProceduralBlock, compileRenderingBlock, compileRoboticsBlock, compileSimulationBlock, compileWeatherBlock, compileWeb3Block, datavizToGodot, datavizToR3F, datavizToUSDA, datavizToUnity, datavizToUnreal, datavizToVRChat, datavizToWebGPU, educationToGodot, educationToR3F, educationToUSDA, educationToUnity, educationToVRChat, getRequiredCapability, healthcareToGodot, healthcareToR3F, healthcareToUSDA, healthcareToUnity, healthcareToVRChat, init_DomainBlockCompilerMixin, inputToGodot, inputToR3F, inputToUSDA, inputToUnity, inputToVRChat, iotToGodot, iotToR3F, iotToUSDA, iotToUnity, iotToVRChat, isPhysicalMaterial, lightFieldToWGSL, materialGraphToWGSL, materialToAndroidXR, materialToBabylon, materialToGLTF, materialToGodot, materialToPlayCanvas, materialToR3F, materialToSDF, materialToUSD, materialToUnity, materialToUnreal, materialToVRChat, materialToVisionOS, materialToWebGPU, musicToGodot, musicToR3F, musicToUSDA, musicToUnity, musicToVRChat, narrativeToGodot, narrativeToR3F, narrativeToUSDA, narrativeToUnity, narrativeToVRChat, navFieldToWGSL, navigationToGodot, navigationToR3F, navigationToUSDA, navigationToUnity, navigationToVRChat, particleFieldToWGSL, particlesToAndroidXR, particlesToBabylon, particlesToGodot, particlesToPlayCanvas, particlesToR3F, particlesToUSD, particlesToUnity, particlesToUnreal, particlesToVisionOS, paymentToGodot, paymentToR3F, paymentToUSDA, paymentToUnity, paymentToVRChat, physicsContractToWGSL, physicsToAndroidXR, physicsToBabylon, physicsToGodot, physicsToPlayCanvas, physicsToR3F, physicsToSDF, physicsToURDF, physicsToUnity, physicsToUnreal, physicsToVisionOS, postProcessingToBabylon, postProcessingToGodot, postProcessingToR3F, postProcessingToUSD, postProcessingToUnity, postProcessingToUnreal, proceduralToGodot, proceduralToR3F, proceduralToUSDA, proceduralToUnity, proceduralToVRChat, renderingToGodot, renderingToR3F, renderingToUSDA, renderingToUnity, renderingToVRChat, roboticsToGodot, roboticsToR3F, roboticsToUSDA, roboticsToUnity, roboticsToVRChat, simulationToR3F, weatherToAndroidXR, weatherToGodot, weatherToR3F, weatherToUSD, weatherToUnity, weatherToUnreal, web3ToGodot, web3ToR3F, web3ToUSDA, web3ToUnity, web3ToVRChat };
|
|
4676
|
-
//# sourceMappingURL=chunk-
|
|
4677
|
-
//# sourceMappingURL=chunk-
|
|
4676
|
+
//# sourceMappingURL=chunk-TZQKJOPC.js.map
|
|
4677
|
+
//# sourceMappingURL=chunk-TZQKJOPC.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { authorityWeight, ProvenanceSemiring } from './chunk-DQRJ5RJG.js';
|
|
2
|
-
import { init_AgentRBAC, init_CompilerBase, getRBAC, UnauthorizedCompilerAccessError } from './chunk-
|
|
2
|
+
import { init_AgentRBAC, init_CompilerBase, getRBAC, UnauthorizedCompilerAccessError } from './chunk-YDSNDCV3.js';
|
|
3
3
|
|
|
4
4
|
// src/compiler/TraitCompositionCompiler.ts
|
|
5
5
|
init_AgentRBAC();
|
|
@@ -159,5 +159,5 @@ var UnauthorizedTraitCompositionAccessError = class extends UnauthorizedCompiler
|
|
|
159
159
|
};
|
|
160
160
|
|
|
161
161
|
export { CompositionConflictError, MissingComponentError, TraitCompositionCompiler, UnauthorizedTraitCompositionAccessError };
|
|
162
|
-
//# sourceMappingURL=chunk-
|
|
163
|
-
//# sourceMappingURL=chunk-
|
|
162
|
+
//# sourceMappingURL=chunk-UKEK2NZJ.js.map
|
|
163
|
+
//# sourceMappingURL=chunk-UKEK2NZJ.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkP65OIMJT_cjs = require('./chunk-P65OIMJT.cjs');
|
|
4
|
+
var chunkSE2Y5BSL_cjs = require('./chunk-SE2Y5BSL.cjs');
|
|
5
5
|
var chunkZHPMP447_cjs = require('./chunk-ZHPMP447.cjs');
|
|
6
6
|
var ans = require('@holoscript/core-types/ans');
|
|
7
7
|
|
|
@@ -50,11 +50,11 @@ function compileToVRChat(composition, options) {
|
|
|
50
50
|
exports.VRChatCompiler = void 0;
|
|
51
51
|
var init_VRChatCompiler = chunkZHPMP447_cjs.__esm({
|
|
52
52
|
"src/compiler/VRChatCompiler.ts"() {
|
|
53
|
-
|
|
53
|
+
chunkSE2Y5BSL_cjs.init_CompilerBase();
|
|
54
54
|
init_udon_assembly();
|
|
55
55
|
init_udon_extern_manifest();
|
|
56
|
-
|
|
57
|
-
exports.VRChatCompiler = class extends
|
|
56
|
+
chunkP65OIMJT_cjs.init_DomainBlockCompilerMixin();
|
|
57
|
+
exports.VRChatCompiler = class extends chunkSE2Y5BSL_cjs.CompilerBase {
|
|
58
58
|
constructor(options = {}) {
|
|
59
59
|
super();
|
|
60
60
|
this.compilerName = "VRChatCompiler";
|
|
@@ -297,59 +297,59 @@ var init_VRChatCompiler = chunkZHPMP447_cjs.__esm({
|
|
|
297
297
|
this.emit("");
|
|
298
298
|
this.emit("// === v4.2 Domain Blocks (VRChat/Unity) ===");
|
|
299
299
|
let blockIdx = 0;
|
|
300
|
-
const compiled =
|
|
300
|
+
const compiled = chunkP65OIMJT_cjs.compileDomainBlocks(
|
|
301
301
|
domainBlocks,
|
|
302
302
|
{
|
|
303
303
|
material: (block) => {
|
|
304
|
-
const mat =
|
|
305
|
-
return
|
|
304
|
+
const mat = chunkP65OIMJT_cjs.compileMaterialBlock(block);
|
|
305
|
+
return chunkP65OIMJT_cjs.materialToVRChat(mat, `db${blockIdx++}`);
|
|
306
306
|
},
|
|
307
307
|
physics: (block) => {
|
|
308
|
-
const phys =
|
|
309
|
-
return
|
|
308
|
+
const phys = chunkP65OIMJT_cjs.compilePhysicsBlock(block);
|
|
309
|
+
return chunkP65OIMJT_cjs.physicsToUnity(phys, `db${blockIdx++}`);
|
|
310
310
|
},
|
|
311
311
|
vfx: (block) => {
|
|
312
|
-
const ps =
|
|
313
|
-
return
|
|
312
|
+
const ps = chunkP65OIMJT_cjs.compileParticleBlock(block);
|
|
313
|
+
return chunkP65OIMJT_cjs.particlesToUnity(ps, `db${blockIdx++}`);
|
|
314
314
|
},
|
|
315
315
|
postfx: (block) => {
|
|
316
|
-
const pp =
|
|
317
|
-
return
|
|
316
|
+
const pp = chunkP65OIMJT_cjs.compilePostProcessingBlock(block);
|
|
317
|
+
return chunkP65OIMJT_cjs.postProcessingToUnity(pp);
|
|
318
318
|
},
|
|
319
319
|
audio: (block) => {
|
|
320
|
-
const audio =
|
|
321
|
-
return
|
|
320
|
+
const audio = chunkP65OIMJT_cjs.compileAudioSourceBlock(block);
|
|
321
|
+
return chunkP65OIMJT_cjs.audioSourceToUnity(audio, `db${blockIdx++}`);
|
|
322
322
|
},
|
|
323
323
|
weather: (block) => {
|
|
324
|
-
const weather =
|
|
325
|
-
return
|
|
324
|
+
const weather = chunkP65OIMJT_cjs.compileWeatherBlock(block);
|
|
325
|
+
return chunkP65OIMJT_cjs.weatherToUnity(weather);
|
|
326
326
|
},
|
|
327
327
|
narrative: (block) => {
|
|
328
|
-
const narr =
|
|
329
|
-
return
|
|
328
|
+
const narr = chunkP65OIMJT_cjs.compileNarrativeBlock(block);
|
|
329
|
+
return chunkP65OIMJT_cjs.narrativeToVRChat(narr);
|
|
330
330
|
},
|
|
331
331
|
payment: (block) => {
|
|
332
|
-
const pay =
|
|
333
|
-
return
|
|
332
|
+
const pay = chunkP65OIMJT_cjs.compilePaymentBlock(block);
|
|
333
|
+
return chunkP65OIMJT_cjs.paymentToVRChat(pay);
|
|
334
334
|
},
|
|
335
335
|
healthcare: (block) => {
|
|
336
|
-
const h =
|
|
337
|
-
return
|
|
336
|
+
const h = chunkP65OIMJT_cjs.compileHealthcareBlock(block);
|
|
337
|
+
return chunkP65OIMJT_cjs.healthcareToVRChat(h);
|
|
338
338
|
},
|
|
339
339
|
robotics: (block) => {
|
|
340
|
-
const r =
|
|
341
|
-
return
|
|
340
|
+
const r = chunkP65OIMJT_cjs.compileRoboticsBlock(block);
|
|
341
|
+
return chunkP65OIMJT_cjs.roboticsToVRChat(r);
|
|
342
342
|
},
|
|
343
|
-
iot: (block) =>
|
|
344
|
-
dataviz: (block) =>
|
|
345
|
-
education: (block) =>
|
|
346
|
-
music: (block) =>
|
|
347
|
-
architecture: (block) =>
|
|
348
|
-
web3: (block) =>
|
|
349
|
-
procedural: (block) =>
|
|
350
|
-
rendering: (block) =>
|
|
351
|
-
navigation: (block) =>
|
|
352
|
-
input: (block) =>
|
|
343
|
+
iot: (block) => chunkP65OIMJT_cjs.iotToVRChat(chunkP65OIMJT_cjs.compileIoTBlock(block)),
|
|
344
|
+
dataviz: (block) => chunkP65OIMJT_cjs.datavizToVRChat(chunkP65OIMJT_cjs.compileDataVizBlock(block)),
|
|
345
|
+
education: (block) => chunkP65OIMJT_cjs.educationToVRChat(chunkP65OIMJT_cjs.compileEducationBlock(block)),
|
|
346
|
+
music: (block) => chunkP65OIMJT_cjs.musicToVRChat(chunkP65OIMJT_cjs.compileMusicBlock(block)),
|
|
347
|
+
architecture: (block) => chunkP65OIMJT_cjs.architectureToVRChat(chunkP65OIMJT_cjs.compileArchitectureBlock(block)),
|
|
348
|
+
web3: (block) => chunkP65OIMJT_cjs.web3ToVRChat(chunkP65OIMJT_cjs.compileWeb3Block(block)),
|
|
349
|
+
procedural: (block) => chunkP65OIMJT_cjs.proceduralToVRChat(chunkP65OIMJT_cjs.compileProceduralBlock(block)),
|
|
350
|
+
rendering: (block) => chunkP65OIMJT_cjs.renderingToVRChat(chunkP65OIMJT_cjs.compileRenderingBlock(block)),
|
|
351
|
+
navigation: (block) => chunkP65OIMJT_cjs.navigationToVRChat(chunkP65OIMJT_cjs.compileNavigationBlock(block)),
|
|
352
|
+
input: (block) => chunkP65OIMJT_cjs.inputToVRChat(chunkP65OIMJT_cjs.compileInputBlock(block))
|
|
353
353
|
},
|
|
354
354
|
(block) => `// Domain block: ${block.domain}/${block.keyword} "${this.escapeStringValue(block.name, "CSharp")}"`
|
|
355
355
|
);
|
|
@@ -735,5 +735,5 @@ var init_VRChatCompiler = chunkZHPMP447_cjs.__esm({
|
|
|
735
735
|
exports.VRChatCompiler_exports = VRChatCompiler_exports;
|
|
736
736
|
exports.compileToVRChat = compileToVRChat;
|
|
737
737
|
exports.init_VRChatCompiler = init_VRChatCompiler;
|
|
738
|
-
//# sourceMappingURL=chunk-
|
|
739
|
-
//# sourceMappingURL=chunk-
|
|
738
|
+
//# sourceMappingURL=chunk-VA7THINF.cjs.map
|
|
739
|
+
//# sourceMappingURL=chunk-VA7THINF.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { init_PlatformConditionalCompilerMixin, filterCompositionForPlatform } from './chunk-DJNH4HFW.js';
|
|
2
|
-
import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileWeatherBlock, compileAudioSourceBlock, audioSourceToVisionOS, compilePostProcessingBlock, compileParticleBlock, particlesToVisionOS, compilePhysicsBlock, physicsToVisionOS, compileMaterialBlock, materialToVisionOS } from './chunk-
|
|
3
|
-
import { init_CompilerBase, CompilerBase } from './chunk-
|
|
2
|
+
import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileWeatherBlock, compileAudioSourceBlock, audioSourceToVisionOS, compilePostProcessingBlock, compileParticleBlock, particlesToVisionOS, compilePhysicsBlock, physicsToVisionOS, compileMaterialBlock, materialToVisionOS } from './chunk-TZQKJOPC.js';
|
|
3
|
+
import { init_CompilerBase, CompilerBase } from './chunk-YDSNDCV3.js';
|
|
4
4
|
import { __esm, __export } from './chunk-W4GABFCR.js';
|
|
5
5
|
import { ANSCapabilityPath } from '@holoscript/core-types/ans';
|
|
6
6
|
|
|
@@ -2789,5 +2789,5 @@ ${layers}`;
|
|
|
2789
2789
|
});
|
|
2790
2790
|
|
|
2791
2791
|
export { VisionOSCompiler, VisionOSCompiler_exports, generateTraitCode, getTraitMapping, init_VisionOSCompiler, init_VisionOSTraitMap, listAllTraits };
|
|
2792
|
-
//# sourceMappingURL=chunk-
|
|
2793
|
-
//# sourceMappingURL=chunk-
|
|
2792
|
+
//# sourceMappingURL=chunk-VMCR5QVI.js.map
|
|
2793
|
+
//# sourceMappingURL=chunk-VMCR5QVI.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkTZCFKZ6Z_cjs = require('./chunk-TZCFKZ6Z.cjs');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var chunkP65OIMJT_cjs = require('./chunk-P65OIMJT.cjs');
|
|
5
|
+
var chunkSE2Y5BSL_cjs = require('./chunk-SE2Y5BSL.cjs');
|
|
6
6
|
var chunkZHPMP447_cjs = require('./chunk-ZHPMP447.cjs');
|
|
7
7
|
var ans = require('@holoscript/core-types/ans');
|
|
8
8
|
|
|
@@ -14,10 +14,10 @@ chunkZHPMP447_cjs.__export(OpenXRCompiler_exports, {
|
|
|
14
14
|
exports.OpenXRCompiler = void 0;
|
|
15
15
|
var init_OpenXRCompiler = chunkZHPMP447_cjs.__esm({
|
|
16
16
|
"src/compiler/OpenXRCompiler.ts"() {
|
|
17
|
-
|
|
17
|
+
chunkSE2Y5BSL_cjs.init_CompilerBase();
|
|
18
18
|
chunkTZCFKZ6Z_cjs.init_PlatformConditionalCompilerMixin();
|
|
19
|
-
|
|
20
|
-
exports.OpenXRCompiler = class extends
|
|
19
|
+
chunkP65OIMJT_cjs.init_DomainBlockCompilerMixin();
|
|
20
|
+
exports.OpenXRCompiler = class extends chunkSE2Y5BSL_cjs.CompilerBase {
|
|
21
21
|
constructor(options = {}) {
|
|
22
22
|
super();
|
|
23
23
|
this.compilerName = "OpenXRCompiler";
|
|
@@ -136,32 +136,32 @@ var init_OpenXRCompiler = chunkZHPMP447_cjs.__esm({
|
|
|
136
136
|
if (domainBlocks.length > 0) {
|
|
137
137
|
this.emit("");
|
|
138
138
|
this.emit("// === v4.2 Domain Blocks ===");
|
|
139
|
-
const compiled =
|
|
139
|
+
const compiled = chunkP65OIMJT_cjs.compileDomainBlocks(
|
|
140
140
|
// @ts-expect-error During migration
|
|
141
141
|
domainBlocks,
|
|
142
142
|
{
|
|
143
143
|
material: (block) => {
|
|
144
|
-
const m =
|
|
144
|
+
const m = chunkP65OIMJT_cjs.compileMaterialBlock(block);
|
|
145
145
|
return `// Material: "${this.escapeStringValue(m.name, "TypeScript")}" type=${m.type} baseColor=${m.baseColor || "none"} roughness=${m.roughness ?? "default"} metallic=${m.metallic ?? "default"}`;
|
|
146
146
|
},
|
|
147
147
|
physics: (block) => {
|
|
148
|
-
const p =
|
|
148
|
+
const p = chunkP65OIMJT_cjs.compilePhysicsBlock(block);
|
|
149
149
|
return `// Physics: ${p.keyword} "${p.name || ""}" colliders=${p.colliders?.length || 0} rigidbody=${!!p.rigidbody}`;
|
|
150
150
|
},
|
|
151
151
|
vfx: (block) => {
|
|
152
|
-
const ps =
|
|
152
|
+
const ps = chunkP65OIMJT_cjs.compileParticleBlock(block);
|
|
153
153
|
return `// Particles: "${this.escapeStringValue(ps.name, "TypeScript")}" rate=${ps.properties.rate || "default"} modules=${ps.modules.length}`;
|
|
154
154
|
},
|
|
155
155
|
postfx: (block) => {
|
|
156
|
-
const pp =
|
|
156
|
+
const pp = chunkP65OIMJT_cjs.compilePostProcessingBlock(block);
|
|
157
157
|
return `// PostFX: ${pp.keyword} effects=[${pp.effects.map((e) => e.type).join(", ")}]`;
|
|
158
158
|
},
|
|
159
159
|
audio: (block) => {
|
|
160
|
-
const a =
|
|
160
|
+
const a = chunkP65OIMJT_cjs.compileAudioSourceBlock(block);
|
|
161
161
|
return `// Audio: "${this.escapeStringValue(a.name, "TypeScript")}" (${a.keyword}) clip=${a.properties.clip || "none"}`;
|
|
162
162
|
},
|
|
163
163
|
weather: (block) => {
|
|
164
|
-
const w =
|
|
164
|
+
const w = chunkP65OIMJT_cjs.compileWeatherBlock(block);
|
|
165
165
|
return `// Weather: ${w.keyword} layers=[${w.layers.map((l) => l.type).join(", ")}]`;
|
|
166
166
|
}
|
|
167
167
|
},
|
|
@@ -1045,5 +1045,5 @@ var init_OpenXRCompiler = chunkZHPMP447_cjs.__esm({
|
|
|
1045
1045
|
|
|
1046
1046
|
exports.OpenXRCompiler_exports = OpenXRCompiler_exports;
|
|
1047
1047
|
exports.init_OpenXRCompiler = init_OpenXRCompiler;
|
|
1048
|
-
//# sourceMappingURL=chunk-
|
|
1049
|
-
//# sourceMappingURL=chunk-
|
|
1048
|
+
//# sourceMappingURL=chunk-VTFLKSJL.cjs.map
|
|
1049
|
+
//# sourceMappingURL=chunk-VTFLKSJL.cjs.map
|