@holoscript/core 8.0.6 → 8.0.7
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 +34 -34
- package/bin/holoscript.cjs +1 -1
- package/dist/GLTFPipeline-3EJLL3TS.cjs +38 -0
- package/dist/GLTFPipeline-3OWJV2VK.js +17 -0
- package/dist/{HoloScriptPlusParser-A2W7OCN2.cjs → HoloScriptPlusParser-ADWRY5OS.cjs} +15 -15
- package/dist/{HoloScriptPlusParser-7FBIFUFC.js → HoloScriptPlusParser-JLJDXHSC.js} +4 -4
- package/dist/HoloScriptPlusParser-QCGFPWIL.cjs +27 -0
- package/dist/{HoloScriptPlusParser-F2Z56FJR.js → HoloScriptPlusParser-WENAFEFV.js} +5 -5
- package/dist/HoloScriptRuntime-GGRVEU4T.cjs +19 -0
- package/dist/HoloScriptRuntime-GJK6VJPH.js +10 -0
- package/dist/{USDZExporter-3FWJ25JI.cjs → USDZExporter-AUHZODOF.cjs} +15 -4
- package/dist/{USDZExporter-D2HQLQYK.js → USDZExporter-GXB4AUSG.js} +15 -4
- package/dist/{chunk-2GQHTXOK.js → chunk-22Q5A6RV.js} +3 -3
- package/dist/{chunk-XHZCF3AS.cjs → chunk-2BZHWUSR.cjs} +27 -15
- package/dist/{chunk-XJAN7CZG.cjs → chunk-2GCNOI2U.cjs} +2 -2
- package/dist/{chunk-DBPGNHFS.js → chunk-2OWDB4FB.js} +13 -25
- package/dist/{chunk-N75IH2HY.js → chunk-2Y3V22SG.js} +5 -14
- package/dist/{chunk-MXFUTKCO.js → chunk-33YHE7HX.js} +3 -7
- package/dist/{chunk-RCZHLCX2.js → chunk-3GWWJT7L.js} +4 -4
- package/dist/{chunk-EK7L4DW7.js → chunk-3NGDZZR4.js} +4 -4
- package/dist/{chunk-WRLUBRKS.cjs → chunk-3SKLAUDD.cjs} +2 -2
- package/dist/{chunk-KKFZ3B6J.cjs → chunk-3VBO3IYQ.cjs} +2 -2
- package/dist/{chunk-YF2I3MV3.js → chunk-47RUFYKR.js} +2 -2
- package/dist/{chunk-VHAONJBY.js → chunk-4JGRWHZJ.js} +7 -5
- package/dist/{chunk-2J5WZLF5.cjs → chunk-4W5G5QVL.cjs} +26 -26
- package/dist/{chunk-GQHQOPXZ.cjs → chunk-4YNYPHH3.cjs} +186 -17
- package/dist/{chunk-H5PUZHJV.cjs → chunk-56VOWURB.cjs} +61 -40
- package/dist/{chunk-DQRQZB33.cjs → chunk-5A4TCHOC.cjs} +3 -3
- package/dist/{chunk-M56JSP4A.js → chunk-5EDVCNRT.js} +2 -2
- package/dist/{chunk-YU5RJQPE.js → chunk-5ET6L4NS.js} +3 -3
- package/dist/{chunk-A3GFOZAF.cjs → chunk-63ZGNR2T.cjs} +43 -39
- package/dist/{chunk-NG77ATEW.cjs → chunk-6PRZIHGL.cjs} +6 -6
- package/dist/{chunk-OXGPGQXN.cjs → chunk-7DMMMBCY.cjs} +7 -7
- package/dist/{chunk-FHP6LXJS.js → chunk-7E7GCQCK.js} +2 -2
- package/dist/{chunk-P4AIF7OQ.js → chunk-7VMGP2FW.js} +44 -28
- package/dist/{chunk-7MVLEZB2.js → chunk-7X5PNIQJ.js} +3 -3
- package/dist/{chunk-X7QB5PL5.cjs → chunk-7ZHYEITD.cjs} +11 -11
- package/dist/{chunk-KPJL34Y7.cjs → chunk-ACVWFGBI.cjs} +2 -2
- package/dist/{chunk-QWSB553J.cjs → chunk-AWB7QYY6.cjs} +6 -6
- package/dist/{chunk-VATGR4EM.js → chunk-B4EKV6HQ.js} +61 -40
- package/dist/{chunk-HBEN5TQR.js → chunk-BRNUPDHJ.js} +5 -5
- package/dist/{chunk-F63LYRVE.js → chunk-BTKZGHAV.js} +23 -11
- package/dist/{chunk-YTR32ZEB.cjs → chunk-C4GSLCHE.cjs} +300 -125
- package/dist/{chunk-CXS3DUKD.js → chunk-C7ZBSV2Q.js} +3 -3
- package/dist/{chunk-WOH6LKYT.cjs → chunk-CCPSNT6B.cjs} +12 -7
- package/dist/{chunk-NW5G5FBQ.js → chunk-DD2JQ7TS.js} +4 -3
- package/dist/{chunk-JD7CIZ33.js → chunk-DUCB6LGL.js} +8 -10
- package/dist/{chunk-D63CGNJU.js → chunk-DY72BMU5.js} +3 -3
- package/dist/{chunk-AIA52I7T.cjs → chunk-EBS32AJI.cjs} +6 -4
- package/dist/{chunk-DCE3LDO3.cjs → chunk-EDPYCLRC.cjs} +52 -62
- package/dist/{chunk-NDUX553L.js → chunk-F2G6CWFT.js} +240 -65
- package/dist/{chunk-X7LYK5TX.cjs → chunk-F5LKJ6F5.cjs} +43 -31
- package/dist/{chunk-LAUFLPB6.js → chunk-FGMDMJM7.js} +10 -5
- package/dist/{chunk-P52PPB5R.js → chunk-FHQFPYV4.js} +4 -4
- package/dist/{chunk-YIMN575O.js → chunk-FNHJRI32.js} +8 -5
- package/dist/{chunk-EXUP2BUM.cjs → chunk-FT6TDR2O.cjs} +27 -27
- package/dist/{chunk-BRQJKJGT.cjs → chunk-FWVYAMNW.cjs} +4 -4
- package/dist/{chunk-PGANYCAG.cjs → chunk-G25QVBA5.cjs} +4 -3
- package/dist/{chunk-5BLWXOIP.cjs → chunk-G6PNEASF.cjs} +13 -13
- package/dist/{chunk-2BSMSUCE.js → chunk-GASCWJK5.js} +2 -2
- package/dist/{chunk-2VL6SJ33.cjs → chunk-GH6C2QGW.cjs} +12 -21
- package/dist/{chunk-JEB5UU3E.js → chunk-GSOUNWEL.js} +35 -27
- package/dist/{chunk-QPOQ7VPI.js → chunk-GTA4Q3A3.js} +2 -2
- package/dist/{chunk-JIYN45TV.cjs → chunk-GVFJ6T4S.cjs} +3 -7
- package/dist/{chunk-IVY74O6C.js → chunk-GVOKJNUN.js} +50 -11
- package/dist/{chunk-GZG4KA4E.js → chunk-GW3LKD5C.js} +6 -4
- package/dist/{chunk-IBXT6UP3.cjs → chunk-HFSVMKM3.cjs} +14 -14
- package/dist/{chunk-E767PVC6.cjs → chunk-HLFDZ35S.cjs} +5 -5
- package/dist/{chunk-ZXZ2AL2J.cjs → chunk-I76GIKN7.cjs} +20 -16
- package/dist/{chunk-4FDL7JLJ.cjs → chunk-KAIVDEIG.cjs} +145 -60
- package/dist/{chunk-X4EBCG4K.js → chunk-KCPHASCO.js} +18 -6
- package/dist/{chunk-T5J7ZKP3.cjs → chunk-KOUAQL2B.cjs} +16 -13
- package/dist/{chunk-GMP623FG.cjs → chunk-KQU64CIX.cjs} +2 -2
- package/dist/{chunk-4DO425P5.js → chunk-L5U4W6JC.js} +4 -4
- package/dist/{chunk-HBLKLLG5.cjs → chunk-LMJ5EBV7.cjs} +10 -10
- package/dist/{chunk-QWAR3GY6.cjs → chunk-LODTHGST.cjs} +8 -8
- package/dist/{chunk-TFUMBR7G.cjs → chunk-LPS5AMQD.cjs} +8 -8
- package/dist/{chunk-ISG3TQ2O.js → chunk-LWUOUCYL.js} +9 -5
- package/dist/{chunk-6CTRH7HT.cjs → chunk-LYJJI7ZK.cjs} +12 -14
- package/dist/{chunk-GTU2Z2WW.cjs → chunk-M7K4LE66.cjs} +5 -14
- package/dist/{chunk-URG2SJLK.js → chunk-MDR235RZ.js} +3 -7
- package/dist/{chunk-ULXWSPCK.js → chunk-MSYSQ2AJ.js} +101 -16
- package/dist/{chunk-TCBJMNXS.cjs → chunk-NGBXXZLL.cjs} +50 -62
- package/dist/{chunk-RXU4PQKA.js → chunk-NHJLP37F.js} +6 -6
- package/dist/{chunk-NTGBEMYL.cjs → chunk-NHYRRAGI.cjs} +5 -5
- package/dist/{chunk-YG3OAHJZ.cjs → chunk-O3MGZDCT.cjs} +89 -52
- package/dist/{chunk-GIOYPNTH.js → chunk-OABEO6HH.js} +185 -16
- package/dist/{chunk-N5YOAFNA.cjs → chunk-OS533P33.cjs} +37 -29
- package/dist/{chunk-IIUFMUTV.js → chunk-PABONWKI.js} +24 -11
- package/dist/{chunk-5BQIJG3O.js → chunk-PXNZ6TME.js} +47 -57
- package/dist/{chunk-KDZRD6EI.js → chunk-Q2Q34NF3.js} +63 -26
- package/dist/{chunk-IS4AEGLU.js → chunk-QBWNJXNR.js} +10 -6
- package/dist/{chunk-5IHG2LGT.js → chunk-QFU53KRH.js} +4 -4
- package/dist/{chunk-NTJZJ5IP.cjs → chunk-QGMUTVVH.cjs} +17 -17
- package/dist/{chunk-MYY4PMWX.cjs → chunk-RUVBFAF7.cjs} +50 -11
- package/dist/{chunk-E64LOLJU.js → chunk-S762UEV5.js} +5 -5
- package/dist/{chunk-3SBVODUP.cjs → chunk-SH5PPVK7.cjs} +61 -45
- package/dist/{chunk-LY4DMQOW.cjs → chunk-SKZPC5AG.cjs} +5 -5
- package/dist/{chunk-TJHVSBP2.js → chunk-SLHLXUMO.js} +10 -4
- package/dist/{chunk-S6OVFUXD.js → chunk-SSSN7VAM.js} +3 -3
- package/dist/{chunk-K5UGRXKR.js → chunk-SXOSDZD6.js} +6 -6
- package/dist/{chunk-J32ZJZJH.js → chunk-SYTRBGDS.js} +2 -2
- package/dist/{chunk-CIWWXYHZ.cjs → chunk-T6W3Z3SH.cjs} +2 -2
- package/dist/{chunk-U36W76U7.js → chunk-TEVX443G.js} +44 -51
- package/dist/{chunk-6DOKCECB.cjs → chunk-TQ377OLB.cjs} +23 -21
- package/dist/{chunk-YAPPQYJH.cjs → chunk-TRCGG42I.cjs} +195 -152
- package/dist/{chunk-H652NHX5.js → chunk-TVANHNJ7.js} +30 -23
- package/dist/{chunk-EKBKLK7P.js → chunk-UDE4OZMR.js} +3 -3
- package/dist/{chunk-3OIZJNVT.cjs → chunk-UGXHYIWT.cjs} +5 -5
- package/dist/{chunk-44GM3P4G.cjs → chunk-ULMSSHCJ.cjs} +21 -21
- package/dist/{chunk-3B5NVDHJ.cjs → chunk-UOL6Y5TD.cjs} +18 -18
- package/dist/{chunk-5S7RKFGR.cjs → chunk-UVFI7XIR.cjs} +10 -4
- package/dist/{chunk-5TIZXMED.cjs → chunk-V7AKE5VT.cjs} +10 -10
- package/dist/{chunk-3B7AY37W.js → chunk-VEPGBETF.js} +6 -6
- package/dist/{chunk-BKCK3IU6.js → chunk-VF257YKO.js} +4 -4
- package/dist/{chunk-4N4SXXWF.js → chunk-VSACG2AR.js} +3 -3
- package/dist/{chunk-ZDSYWBIE.cjs → chunk-VW5CRJBE.cjs} +3 -7
- package/dist/{chunk-PVWNU4QT.cjs → chunk-WFKVS2K4.cjs} +64 -26
- package/dist/{chunk-TDCJ7YPA.js → chunk-WXQ57LAO.js} +3 -3
- package/dist/{chunk-NE5CZ2NC.cjs → chunk-X27QRG4C.cjs} +38 -38
- package/dist/{chunk-TVHSPJ4N.cjs → chunk-X2AVEAZM.cjs} +30 -23
- package/dist/{chunk-C34AJIJO.js → chunk-XQ5MWMP2.js} +4 -4
- package/dist/{chunk-TFWYKOOB.cjs → chunk-XW6IXEQH.cjs} +26 -13
- package/dist/{chunk-YIVFJNYV.js → chunk-Y3ZFVUUU.js} +2 -2
- package/dist/{chunk-TJIMBJ6L.cjs → chunk-Y57W2CT5.cjs} +2 -2
- package/dist/{chunk-BFROVZOF.cjs → chunk-YCM6QQRT.cjs} +46 -53
- package/dist/{chunk-MBOOR7X4.js → chunk-YFVQWSNJ.js} +3 -3
- package/dist/{chunk-ISM4NX6N.js → chunk-YFWRJW4B.js} +2 -2
- package/dist/{chunk-6OTFG3EB.js → chunk-YN6IETRZ.js} +179 -136
- package/dist/{chunk-NPDNFPTU.js → chunk-YRRAUB35.js} +4 -4
- package/dist/{chunk-GCYR3D2K.js → chunk-Z6PMDS4G.js} +61 -23
- package/dist/{chunk-DPZXVDGM.js → chunk-ZA34AN3R.js} +8 -17
- package/dist/{chunk-EKYL4PE3.cjs → chunk-ZLF4YF3U.cjs} +2 -2
- package/dist/{chunk-VFKXK4GR.cjs → chunk-ZPZAVHXL.cjs} +20 -20
- package/dist/cli/holoscript-runner.cjs +39 -22
- package/dist/cli/holoscript-runner.js +32 -15
- package/dist/compiler/GasOptimizationAnalyzer.d.ts +73 -0
- package/dist/compiler/NFTMarketplaceCompiler.d.ts +23 -0
- package/dist/compiler/agent-inference.cjs +7 -7
- package/dist/compiler/agent-inference.js +3 -3
- package/dist/compiler/android-xr.cjs +8 -8
- package/dist/compiler/android-xr.js +6 -6
- package/dist/compiler/android.cjs +6 -6
- package/dist/compiler/android.js +4 -4
- package/dist/compiler/ar.cjs +6 -6
- package/dist/compiler/ar.js +4 -4
- package/dist/compiler/babylon.cjs +8 -8
- package/dist/compiler/babylon.js +7 -7
- package/dist/compiler/business-quest.cjs +9 -9
- package/dist/compiler/business-quest.js +1 -1
- package/dist/compiler/context.cjs +6 -6
- package/dist/compiler/context.js +3 -3
- package/dist/compiler/domain-block-utils.cjs +153 -153
- 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 +347 -362
- package/dist/compiler/index.d.ts +20 -0
- package/dist/compiler/index.js +200 -215
- 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/multi-layer.cjs +10 -10
- package/dist/compiler/multi-layer.js +9 -9
- package/dist/compiler/openxr.cjs +7 -7
- package/dist/compiler/openxr.js +6 -6
- package/dist/compiler/playcanvas.cjs +6 -6
- package/dist/compiler/playcanvas.js +5 -5
- package/dist/compiler/r3f.cjs +13 -13
- package/dist/compiler/r3f.js +8 -8
- 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 +8 -8
- package/dist/compiler/trait-composition.js +4 -4
- package/dist/compiler/unity.cjs +7 -7
- package/dist/compiler/unity.js +6 -6
- package/dist/compiler/unreal.cjs +8 -8
- package/dist/compiler/unreal.js +6 -6
- 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 +7 -7
- package/dist/compiler/visionos.js +6 -6
- package/dist/compiler/vrchat.cjs +7 -7
- package/dist/compiler/vrchat.js +5 -5
- package/dist/compiler/vrr.cjs +7 -7
- package/dist/compiler/vrr.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/coordinators/index.cjs +27 -10
- package/dist/coordinators/index.js +27 -10
- package/dist/debugger.cjs +6 -6
- package/dist/debugger.js +4 -4
- package/dist/entries/scripting.cjs +6 -6
- package/dist/entries/scripting.js +2 -2
- package/dist/hololand/index.cjs +36 -36
- package/dist/hololand/index.js +2 -2
- package/dist/index.cjs +1056 -796
- package/dist/index.js +440 -180
- package/dist/math/tropical-spmv.cjs +10 -10
- package/dist/math/tropical-spmv.js +1 -1
- package/dist/math/vec3.cjs +13 -13
- package/dist/math/vec3.js +1 -1
- package/dist/parser/NFTMarketplaceTypes.d.ts +191 -0
- package/dist/parser.cjs +16 -16
- package/dist/parser.js +5 -5
- package/dist/reconstruction/index.cjs +37 -37
- package/dist/reconstruction/index.js +4 -4
- package/dist/runtime.cjs +274 -76
- package/dist/runtime.d.ts +10 -1
- package/dist/runtime.js +268 -70
- package/dist/self-improvement/index.cjs +12 -4
- package/dist/self-improvement/index.js +12 -4
- package/dist/{src-HCCCSYP7.js → src-J6CM4AUR.js} +91 -33
- package/dist/{src-4ROC227P.cjs → src-PT2FERDV.cjs} +93 -35
- package/dist/testing.cjs +5 -5
- package/dist/testing.js +1 -1
- package/dist/traits/botanical-lotus.cjs +49 -49
- package/dist/traits/botanical-lotus.js +2 -2
- package/dist/traits/engines/index.cjs +39 -39
- package/dist/traits/engines/index.d.ts +279 -0
- package/dist/traits/engines/index.js +4 -4
- package/dist/traits/index.cjs +881 -773
- package/dist/traits/index.js +366 -258
- package/dist/world/index.cjs +21 -18
- package/dist/world/index.js +21 -18
- package/dist/world-model/index.cjs +11 -5
- package/dist/world-model/index.d.ts +8 -0
- package/dist/world-model/index.js +11 -5
- package/package.json +74 -68
- package/LICENSE +0 -21
- package/dist/GLTFPipeline-PVLTKDBD.cjs +0 -38
- package/dist/GLTFPipeline-QPI4I7DL.js +0 -17
- package/dist/HoloScriptPlusParser-WKHRIH6T.cjs +0 -27
- package/dist/HoloScriptRuntime-6ZGLUCFS.js +0 -10
- package/dist/HoloScriptRuntime-ALUASIL2.cjs +0 -19
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @holoscript/core/traits/engines — motion-matching engine surface
|
|
3
|
+
*
|
|
4
|
+
* Hand-crafted declarations mirroring packages/core/src/traits/engines/index.ts
|
|
5
|
+
* (a barrel of: motion-matching, onnx-motion-matching, synthetic-walk-cycle,
|
|
6
|
+
* onnx-adapter, pfnn-network, motion-data-schema, cloth-verlet, noise, tensor-ops).
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// ── motion-matching ───────────────────────────────────────────────────────────
|
|
10
|
+
|
|
11
|
+
export interface Vec3 {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
z: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface SkeletonPose {
|
|
18
|
+
joints: Record<string, { position: [number, number, number]; rotation: [number, number, number, number] }>;
|
|
19
|
+
timestamp: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface ContactFeatures {
|
|
23
|
+
leftFoot: boolean;
|
|
24
|
+
rightFoot: boolean;
|
|
25
|
+
[extra: string]: boolean;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export type Gait = 'idle' | 'walk' | 'trot' | 'run' | 'crouch';
|
|
29
|
+
|
|
30
|
+
export interface MotionInferenceInput {
|
|
31
|
+
targetVelocity: Vec3;
|
|
32
|
+
currentPhase: number;
|
|
33
|
+
delta: number;
|
|
34
|
+
terrainNormal?: Vec3;
|
|
35
|
+
energyEfficiency?: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface MotionInferenceResult {
|
|
39
|
+
pose: SkeletonPose;
|
|
40
|
+
phase: number;
|
|
41
|
+
trajectory: Array<[number, number, number]>;
|
|
42
|
+
stability: number;
|
|
43
|
+
contactFeatures: ContactFeatures;
|
|
44
|
+
gait: Gait;
|
|
45
|
+
kineticEnergyProxy: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface MotionMatchingEngine {
|
|
49
|
+
readonly modelId: string;
|
|
50
|
+
readonly loaded: boolean;
|
|
51
|
+
load(): Promise<void>;
|
|
52
|
+
infer(input: MotionInferenceInput): MotionInferenceResult;
|
|
53
|
+
dispose(): void;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export type MotionMatchingEngineFactory = (modelId: string) => MotionMatchingEngine;
|
|
57
|
+
|
|
58
|
+
export declare const TRAJECTORY_HORIZON_FRAMES: 12;
|
|
59
|
+
export declare const TRAJECTORY_FRAME_DT: number;
|
|
60
|
+
|
|
61
|
+
export declare function magnitude(v: Vec3): number;
|
|
62
|
+
export declare function classifyGait(speed: number, energyEfficiency: number): Gait;
|
|
63
|
+
export declare function projectLinearTrajectory(velocity: Vec3): Array<[number, number, number]>;
|
|
64
|
+
|
|
65
|
+
export declare class NullMotionMatchingEngine implements MotionMatchingEngine {
|
|
66
|
+
readonly modelId: string;
|
|
67
|
+
loaded: boolean;
|
|
68
|
+
constructor(modelId: string);
|
|
69
|
+
load(): Promise<void>;
|
|
70
|
+
infer(input: MotionInferenceInput): MotionInferenceResult;
|
|
71
|
+
dispose(): void;
|
|
72
|
+
}
|
|
73
|
+
export declare function createNullMotionMatchingEngine(modelId: string): MotionMatchingEngine;
|
|
74
|
+
|
|
75
|
+
// ── onnx-motion-matching ─────────────────────────────────────────────────────
|
|
76
|
+
|
|
77
|
+
export declare const INPUT_DIM: number;
|
|
78
|
+
export declare const OUTPUT_DIM: number;
|
|
79
|
+
|
|
80
|
+
export interface ModelDescriptor {
|
|
81
|
+
id: string;
|
|
82
|
+
url: string;
|
|
83
|
+
inputDim: number;
|
|
84
|
+
outputDim: number;
|
|
85
|
+
description?: string;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export declare const BUNDLED_MODELS: Record<string, ModelDescriptor>;
|
|
89
|
+
|
|
90
|
+
export declare function encodeInputTensor(input: MotionInferenceInput): Float32Tensor;
|
|
91
|
+
|
|
92
|
+
export declare class OnnxMotionMatchingEngine implements MotionMatchingEngine {
|
|
93
|
+
readonly modelId: string;
|
|
94
|
+
loaded: boolean;
|
|
95
|
+
constructor(modelId: string);
|
|
96
|
+
load(): Promise<void>;
|
|
97
|
+
infer(input: MotionInferenceInput): MotionInferenceResult;
|
|
98
|
+
dispose(): void;
|
|
99
|
+
}
|
|
100
|
+
export declare function createOnnxMotionMatchingEngine(modelId: string): MotionMatchingEngine;
|
|
101
|
+
|
|
102
|
+
// ── synthetic-walk-cycle ──────────────────────────────────────────────────────
|
|
103
|
+
|
|
104
|
+
export declare const SYNTHETIC_WALK_JOINTS: readonly string[];
|
|
105
|
+
export declare function buildSyntheticBipedPose(
|
|
106
|
+
phase: number,
|
|
107
|
+
speed: number
|
|
108
|
+
): Record<string, { position: [number, number, number]; rotation: [number, number, number, number] }>;
|
|
109
|
+
|
|
110
|
+
export declare class SyntheticWalkCycleEngine implements MotionMatchingEngine {
|
|
111
|
+
readonly modelId: string;
|
|
112
|
+
loaded: boolean;
|
|
113
|
+
constructor(modelId: string);
|
|
114
|
+
load(): Promise<void>;
|
|
115
|
+
infer(input: MotionInferenceInput): MotionInferenceResult;
|
|
116
|
+
dispose(): void;
|
|
117
|
+
}
|
|
118
|
+
export declare function createSyntheticWalkCycleEngine(modelId?: string): MotionMatchingEngine;
|
|
119
|
+
|
|
120
|
+
// ── onnx-adapter ─────────────────────────────────────────────────────────────
|
|
121
|
+
|
|
122
|
+
export type ExecutionProvider = 'webgpu' | 'wasm' | 'cpu' | 'cuda';
|
|
123
|
+
export type TensorShape = readonly number[];
|
|
124
|
+
|
|
125
|
+
export interface Float32Tensor {
|
|
126
|
+
data: Float32Array;
|
|
127
|
+
shape: TensorShape;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface InferenceRequest {
|
|
131
|
+
inputs: Record<string, Float32Tensor>;
|
|
132
|
+
outputs?: string[];
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export interface InferenceResponse {
|
|
136
|
+
outputs: Record<string, Float32Tensor>;
|
|
137
|
+
durationMs: number;
|
|
138
|
+
providerUsed: ExecutionProvider;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface InferenceAdapter {
|
|
142
|
+
readonly name: string;
|
|
143
|
+
readonly preferredProvider: ExecutionProvider;
|
|
144
|
+
readonly loaded: boolean;
|
|
145
|
+
load(modelUrl: string): Promise<void>;
|
|
146
|
+
run(request: InferenceRequest): Promise<InferenceResponse>;
|
|
147
|
+
runSync?(request: InferenceRequest): InferenceResponse;
|
|
148
|
+
dispose(): void;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export declare class NoOpInferenceAdapter implements InferenceAdapter {
|
|
152
|
+
readonly name: 'NoOpInferenceAdapter';
|
|
153
|
+
readonly preferredProvider: ExecutionProvider;
|
|
154
|
+
loaded: boolean;
|
|
155
|
+
load(modelUrl: string): Promise<void>;
|
|
156
|
+
runSync(request: InferenceRequest): InferenceResponse;
|
|
157
|
+
run(request: InferenceRequest): Promise<InferenceResponse>;
|
|
158
|
+
dispose(): void;
|
|
159
|
+
}
|
|
160
|
+
export declare function createNoOpInferenceAdapter(): InferenceAdapter;
|
|
161
|
+
|
|
162
|
+
export declare class PureJsInferenceAdapter implements InferenceAdapter {
|
|
163
|
+
readonly name: 'PureJsInferenceAdapter';
|
|
164
|
+
readonly preferredProvider: ExecutionProvider;
|
|
165
|
+
loaded: boolean;
|
|
166
|
+
constructor(inputDim?: number, outputDim?: number);
|
|
167
|
+
load(modelUrl: string): Promise<void>;
|
|
168
|
+
runSync(request: InferenceRequest): InferenceResponse;
|
|
169
|
+
run(request: InferenceRequest): Promise<InferenceResponse>;
|
|
170
|
+
dispose(): void;
|
|
171
|
+
}
|
|
172
|
+
export declare function createPureJsInferenceAdapter(inputDim?: number, outputDim?: number): InferenceAdapter;
|
|
173
|
+
|
|
174
|
+
export declare class OnnxNodeInferenceAdapter implements InferenceAdapter {
|
|
175
|
+
readonly name: 'OnnxNodeInferenceAdapter';
|
|
176
|
+
readonly preferredProvider: ExecutionProvider;
|
|
177
|
+
loaded: boolean;
|
|
178
|
+
constructor(preferredProvider?: ExecutionProvider);
|
|
179
|
+
load(modelUrl: string): Promise<void>;
|
|
180
|
+
run(request: InferenceRequest): Promise<InferenceResponse>;
|
|
181
|
+
dispose(): void;
|
|
182
|
+
}
|
|
183
|
+
export declare function createOnnxNodeInferenceAdapter(preferredProvider?: ExecutionProvider): InferenceAdapter;
|
|
184
|
+
export declare function resolveOnnxModelPath(modelUrl: string): Promise<string | null>;
|
|
185
|
+
|
|
186
|
+
// ── pfnn-network ──────────────────────────────────────────────────────────────
|
|
187
|
+
|
|
188
|
+
export declare const PHASE_CONTROL_POINTS: 4;
|
|
189
|
+
export declare const HIDDEN_DIM: 64;
|
|
190
|
+
|
|
191
|
+
export declare function eluInPlace(data: Float32Array): void;
|
|
192
|
+
|
|
193
|
+
export declare class PfnnNetwork {
|
|
194
|
+
readonly inputDim: number;
|
|
195
|
+
readonly outputDim: number;
|
|
196
|
+
constructor(inputDim: number, outputDim: number, seed?: number);
|
|
197
|
+
forward(input: Float32Array, phase: number): Float32Array;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export declare const BUNDLED_MODEL_SEED: number;
|
|
201
|
+
export declare function createBundledPfnn(inputDim: number, outputDim: number): PfnnNetwork;
|
|
202
|
+
|
|
203
|
+
// ── motion-data-schema ────────────────────────────────────────────────────────
|
|
204
|
+
|
|
205
|
+
export declare const MOTION_DATA_SCHEMA_VERSION: 1;
|
|
206
|
+
|
|
207
|
+
export interface TrainingFrame {
|
|
208
|
+
timestampMs: number;
|
|
209
|
+
velocity: Vec3;
|
|
210
|
+
pose: SkeletonPose;
|
|
211
|
+
contact: ContactFeatures;
|
|
212
|
+
phase: number;
|
|
213
|
+
gait: Gait;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export interface InferenceFrame {
|
|
217
|
+
timestampMs: number;
|
|
218
|
+
input: MotionInferenceInput;
|
|
219
|
+
output: MotionInferenceResult;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export interface MotionCapture {
|
|
223
|
+
captureId: string;
|
|
224
|
+
createdAtMs: number;
|
|
225
|
+
frameRateHz: number;
|
|
226
|
+
jointNames: string[];
|
|
227
|
+
frames: TrainingFrame[];
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export interface TrainingCorpus {
|
|
231
|
+
schemaVersion: typeof MOTION_DATA_SCHEMA_VERSION;
|
|
232
|
+
corpusId: string;
|
|
233
|
+
createdAtMs: number;
|
|
234
|
+
motionCaptures: MotionCapture[];
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// ── cloth-verlet ──────────────────────────────────────────────────────────────
|
|
238
|
+
|
|
239
|
+
export interface ClothVerletState {
|
|
240
|
+
positions: Float32Array;
|
|
241
|
+
prevPositions: Float32Array;
|
|
242
|
+
pinned: Set<number>;
|
|
243
|
+
constraints: Array<[number, number, number]>;
|
|
244
|
+
time: number;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export interface ClothVerletConfig {
|
|
248
|
+
stiffness: number;
|
|
249
|
+
damping: number;
|
|
250
|
+
gravityScale: number;
|
|
251
|
+
windResponse: number;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export declare function buildClothConstraints(
|
|
255
|
+
resolution: number,
|
|
256
|
+
positions: Float32Array
|
|
257
|
+
): Array<[number, number, number]>;
|
|
258
|
+
|
|
259
|
+
export declare function stepClothVerlet(
|
|
260
|
+
state: ClothVerletState,
|
|
261
|
+
config: ClothVerletConfig,
|
|
262
|
+
delta: number
|
|
263
|
+
): void;
|
|
264
|
+
|
|
265
|
+
// ── noise ─────────────────────────────────────────────────────────────────────
|
|
266
|
+
|
|
267
|
+
export declare function noise(t: number, seed: number): number;
|
|
268
|
+
export declare function smoothNoise(t: number, seed: number): number;
|
|
269
|
+
|
|
270
|
+
// ── tensor-ops ────────────────────────────────────────────────────────────────
|
|
271
|
+
|
|
272
|
+
export interface DenseTensor {
|
|
273
|
+
shape: number[];
|
|
274
|
+
data: Float32Array;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
export declare function createTensor(shape: number[], data?: ArrayLike<number>): DenseTensor;
|
|
278
|
+
export declare function add(a: DenseTensor, b: DenseTensor): DenseTensor;
|
|
279
|
+
export declare function matmul(a: DenseTensor, b: DenseTensor): DenseTensor;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TRAJECTORY_HORIZON_FRAMES, projectLinearTrajectory, magnitude } from '../../chunk-
|
|
2
|
-
export { MOTION_DATA_SCHEMA_VERSION, NullMotionMatchingEngine, SYNTHETIC_WALK_JOINTS, SyntheticWalkCycleEngine, TRAJECTORY_FRAME_DT, TRAJECTORY_HORIZON_FRAMES, buildSyntheticBipedPose, classifyGait, createNullMotionMatchingEngine, createSyntheticWalkCycleEngine, inferenceFrameToTensor, magnitude, projectLinearTrajectory, validateMotionCapture, validateTrainingCorpus, validateTrainingFrame } from '../../chunk-
|
|
3
|
-
import { createPureJsInferenceAdapter } from '../../chunk-
|
|
4
|
-
export { BUNDLED_MODEL_SEED, HIDDEN_DIM, NoOpInferenceAdapter, OnnxNodeInferenceAdapter, PHASE_CONTROL_POINTS, PfnnNetwork, PureJsInferenceAdapter, add, createBundledPfnn, createNoOpInferenceAdapter, createOnnxNodeInferenceAdapter, createPureJsInferenceAdapter, createTensor, eluInPlace, matmul, resolveOnnxModelPath } from '../../chunk-
|
|
1
|
+
import { TRAJECTORY_HORIZON_FRAMES, projectLinearTrajectory, magnitude } from '../../chunk-GVOKJNUN.js';
|
|
2
|
+
export { MOTION_DATA_SCHEMA_VERSION, NullMotionMatchingEngine, SYNTHETIC_WALK_JOINTS, SyntheticWalkCycleEngine, TRAJECTORY_FRAME_DT, TRAJECTORY_HORIZON_FRAMES, buildSyntheticBipedPose, classifyGait, createNullMotionMatchingEngine, createSyntheticWalkCycleEngine, inferenceFrameToTensor, magnitude, projectLinearTrajectory, validateMotionCapture, validateTrainingCorpus, validateTrainingFrame } from '../../chunk-GVOKJNUN.js';
|
|
3
|
+
import { createPureJsInferenceAdapter } from '../../chunk-7E7GCQCK.js';
|
|
4
|
+
export { BUNDLED_MODEL_SEED, HIDDEN_DIM, NoOpInferenceAdapter, OnnxNodeInferenceAdapter, PHASE_CONTROL_POINTS, PfnnNetwork, PureJsInferenceAdapter, add, createBundledPfnn, createNoOpInferenceAdapter, createOnnxNodeInferenceAdapter, createPureJsInferenceAdapter, createTensor, eluInPlace, matmul, resolveOnnxModelPath } from '../../chunk-7E7GCQCK.js';
|
|
5
5
|
import '../../chunk-OL46QLBJ.js';
|
|
6
6
|
|
|
7
7
|
// src/traits/engines/onnx-motion-matching.ts
|