@holoscript/core 8.0.6 → 8.0.8
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
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { init_R3FCompiler, MATERIAL_PRESETS } from './chunk-
|
|
2
|
-
import { init_ProvenanceSemiring, ProvenanceSemiring } from './chunk-
|
|
1
|
+
import { init_R3FCompiler, MATERIAL_PRESETS } from './chunk-MSYSQ2AJ.js';
|
|
2
|
+
import { init_ProvenanceSemiring, ProvenanceSemiring } from './chunk-SLHLXUMO.js';
|
|
3
3
|
import { init_TraitCompositor, TraitCompositor } from './chunk-4C57PR42.js';
|
|
4
|
-
import { init_PlatformConditional, platformCategory, PLATFORM_CAPABILITIES, PLATFORM_CATEGORIES } from './chunk-
|
|
5
|
-
import { init_DomainBlockCompilerMixin, compileDomainBlocks, inputToUSDA, compileInputBlock, navigationToUSDA, compileNavigationBlock, renderingToUSDA, compileRenderingBlock, proceduralToUSDA, compileProceduralBlock, web3ToUSDA, compileWeb3Block, architectureToUSDA, compileArchitectureBlock, musicToUSDA, compileMusicBlock, educationToUSDA, compileEducationBlock, datavizToUSDA, compileDataVizBlock, iotToUSDA, compileIoTBlock, compileRoboticsBlock, roboticsToUSDA, compileHealthcareBlock, healthcareToUSDA, compilePaymentBlock, paymentToUSDA, compileNarrativeBlock, narrativeToUSDA, compileWeatherBlock, weatherToUSD, compileAudioSourceBlock, audioSourceToUSD, compilePostProcessingBlock, postProcessingToUSD, compileParticleBlock, particlesToUSD, compilePhysicsBlock, compileMaterialBlock, materialToUSD } from './chunk-
|
|
6
|
-
import { init_CompilerBase, CompilerBase } from './chunk-
|
|
7
|
-
import { parsePipeline } from './chunk-
|
|
4
|
+
import { init_PlatformConditional, platformCategory, PLATFORM_CAPABILITIES, PLATFORM_CATEGORIES } from './chunk-GW3LKD5C.js';
|
|
5
|
+
import { init_DomainBlockCompilerMixin, compileDomainBlocks, inputToUSDA, compileInputBlock, navigationToUSDA, compileNavigationBlock, renderingToUSDA, compileRenderingBlock, proceduralToUSDA, compileProceduralBlock, web3ToUSDA, compileWeb3Block, architectureToUSDA, compileArchitectureBlock, musicToUSDA, compileMusicBlock, educationToUSDA, compileEducationBlock, datavizToUSDA, compileDataVizBlock, iotToUSDA, compileIoTBlock, compileRoboticsBlock, roboticsToUSDA, compileHealthcareBlock, healthcareToUSDA, compilePaymentBlock, paymentToUSDA, compileNarrativeBlock, narrativeToUSDA, compileWeatherBlock, weatherToUSD, compileAudioSourceBlock, audioSourceToUSD, compilePostProcessingBlock, postProcessingToUSD, compileParticleBlock, particlesToUSD, compilePhysicsBlock, compileMaterialBlock, materialToUSD } from './chunk-ZA34AN3R.js';
|
|
6
|
+
import { init_CompilerBase, CompilerBase } from './chunk-C7ZBSV2Q.js';
|
|
7
|
+
import { parsePipeline } from './chunk-SYTRBGDS.js';
|
|
8
8
|
import { init_safeJsonParse, readJson } from './chunk-VVKVQZI6.js';
|
|
9
9
|
import { __export, __esm } from './chunk-OL46QLBJ.js';
|
|
10
10
|
import { ANSCapabilityPath } from '@holoscript/core-types/ans';
|
|
@@ -144,9 +144,7 @@ var init_ThreeJSCompiler = __esm({
|
|
|
144
144
|
this.emit('import * as THREE from "three";');
|
|
145
145
|
if (this.options.enablePostProcessing) {
|
|
146
146
|
this.emit('import { EffectComposer } from "three/addons/postprocessing/EffectComposer.js";');
|
|
147
|
-
this.emit(
|
|
148
|
-
'import { RenderPass } from "three/addons/postprocessing/RenderPass.js";'
|
|
149
|
-
);
|
|
147
|
+
this.emit('import { RenderPass } from "three/addons/postprocessing/RenderPass.js";');
|
|
150
148
|
this.emit(
|
|
151
149
|
'import { UnrealBloomPass } from "three/addons/postprocessing/UnrealBloomPass.js";'
|
|
152
150
|
);
|
|
@@ -157,7 +155,9 @@ var init_ThreeJSCompiler = __esm({
|
|
|
157
155
|
for (const prop of env.properties) {
|
|
158
156
|
if (prop.key === "background" || prop.key === "skybox" || prop.key === "preset") {
|
|
159
157
|
if (typeof prop.value === "string" && prop.value.startsWith("#")) {
|
|
160
|
-
this.emit(
|
|
158
|
+
this.emit(
|
|
159
|
+
`this.scene.background = new THREE.Color(${this.toThreeColorHex(prop.value)});`
|
|
160
|
+
);
|
|
161
161
|
} else {
|
|
162
162
|
this.emit(`// skybox: "${prop.value}" \u2014 load via THREE.CubeTextureLoader`);
|
|
163
163
|
}
|
|
@@ -168,13 +168,9 @@ var init_ThreeJSCompiler = __esm({
|
|
|
168
168
|
const color = this.toThreeColorHex(fog.color ?? "#cccccc");
|
|
169
169
|
this.emit(`this.scene.fog = new THREE.Fog(${color}, ${near}, ${far});`);
|
|
170
170
|
} else if (prop.key === "ambient_light") {
|
|
171
|
-
this.emit(
|
|
172
|
-
`this.scene.add(new THREE.AmbientLight(0xffffff, ${prop.value ?? 0.5}));`
|
|
173
|
-
);
|
|
171
|
+
this.emit(`this.scene.add(new THREE.AmbientLight(0xffffff, ${prop.value ?? 0.5}));`);
|
|
174
172
|
} else if (prop.key === "ground") {
|
|
175
|
-
this.emit(
|
|
176
|
-
`const groundGeom = new THREE.PlaneGeometry(100, 100);`
|
|
177
|
-
);
|
|
173
|
+
this.emit(`const groundGeom = new THREE.PlaneGeometry(100, 100);`);
|
|
178
174
|
this.emit(
|
|
179
175
|
`const groundMat = new THREE.MeshStandardMaterial({ color: 0x888888, roughness: 0.8 });`
|
|
180
176
|
);
|
|
@@ -280,10 +276,8 @@ var init_ThreeJSCompiler = __esm({
|
|
|
280
276
|
this.emit(`const ${v} = new THREE.Mesh(${v}Geom, ${v}Mat);`);
|
|
281
277
|
this.emit(`this.scene.add(${v});`);
|
|
282
278
|
}
|
|
283
|
-
if (position)
|
|
284
|
-
|
|
285
|
-
if (rotation)
|
|
286
|
-
this.emit(`${v}.rotation.set(${rotation[0]}, ${rotation[1]}, ${rotation[2]});`);
|
|
279
|
+
if (position) this.emit(`${v}.position.set(${position[0]}, ${position[1]}, ${position[2]});`);
|
|
280
|
+
if (rotation) this.emit(`${v}.rotation.set(${rotation[0]}, ${rotation[1]}, ${rotation[2]});`);
|
|
287
281
|
if (scale) {
|
|
288
282
|
if (Array.isArray(scale)) {
|
|
289
283
|
this.emit(`${v}.scale.set(${scale[0]}, ${scale[1]}, ${scale[2]});`);
|
|
@@ -324,9 +318,7 @@ var init_ThreeJSCompiler = __esm({
|
|
|
324
318
|
} else if (trait.name === "hoverable") {
|
|
325
319
|
this.emit(`// @hoverable \u2014 attach raycaster pointer-move handler to ${v}`);
|
|
326
320
|
} else if (trait.name === "gaussian_splat") {
|
|
327
|
-
this.emit(
|
|
328
|
-
`// @gaussian_splat \u2014 use @mkkellogg/gaussian-splats-3d or three-splat for ${v}`
|
|
329
|
-
);
|
|
321
|
+
this.emit(`// @gaussian_splat \u2014 use @mkkellogg/gaussian-splats-3d or three-splat for ${v}`);
|
|
330
322
|
} else if (trait.name === "object_tracking") {
|
|
331
323
|
this.emit(`// @object_tracking \u2014 WebXR hit-test for ${v}`);
|
|
332
324
|
} else if (trait.name === "eye_tracked") {
|
|
@@ -431,10 +423,9 @@ var init_ThreeJSCompiler = __esm({
|
|
|
431
423
|
}
|
|
432
424
|
case "point": {
|
|
433
425
|
const distStr = distance !== void 0 ? String(distance) : "0";
|
|
434
|
-
this.emit(
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
if (position) this.emit(`${v}.position.set(${position[0]}, ${position[1]}, ${position[2]});`);
|
|
426
|
+
this.emit(`const ${v} = new THREE.PointLight(${colorHex}, ${intStr}, ${distStr});`);
|
|
427
|
+
if (position)
|
|
428
|
+
this.emit(`${v}.position.set(${position[0]}, ${position[1]}, ${position[2]});`);
|
|
438
429
|
if (castShadow && this.options.enableShadows) this.emit(`${v}.castShadow = true;`);
|
|
439
430
|
this.emit(`this.scene.add(${v});`);
|
|
440
431
|
break;
|
|
@@ -445,7 +436,8 @@ var init_ThreeJSCompiler = __esm({
|
|
|
445
436
|
this.emit(
|
|
446
437
|
`const ${v} = new THREE.SpotLight(${colorHex}, ${intStr}, ${distance ?? 0}, ${angleRad}, ${pen});`
|
|
447
438
|
);
|
|
448
|
-
if (position)
|
|
439
|
+
if (position)
|
|
440
|
+
this.emit(`${v}.position.set(${position[0]}, ${position[1]}, ${position[2]});`);
|
|
449
441
|
if (castShadow && this.options.enableShadows) this.emit(`${v}.castShadow = true;`);
|
|
450
442
|
this.emit(`this.scene.add(${v});`);
|
|
451
443
|
break;
|
|
@@ -475,13 +467,9 @@ var init_ThreeJSCompiler = __esm({
|
|
|
475
467
|
if (near !== void 0) this.emit(`this.camera.near = ${near};`);
|
|
476
468
|
if (far !== void 0) this.emit(`this.camera.far = ${far};`);
|
|
477
469
|
if (position)
|
|
478
|
-
this.emit(
|
|
479
|
-
`this.camera.position.set(${position[0]}, ${position[1]}, ${position[2]});`
|
|
480
|
-
);
|
|
470
|
+
this.emit(`this.camera.position.set(${position[0]}, ${position[1]}, ${position[2]});`);
|
|
481
471
|
if (target) {
|
|
482
|
-
this.emit(
|
|
483
|
-
`this.camera.lookAt(new THREE.Vector3(${target[0]}, ${target[1]}, ${target[2]}));`
|
|
484
|
-
);
|
|
472
|
+
this.emit(`this.camera.lookAt(new THREE.Vector3(${target[0]}, ${target[1]}, ${target[2]}));`);
|
|
485
473
|
}
|
|
486
474
|
this.emit(`this.camera.updateProjectionMatrix();`);
|
|
487
475
|
this.emit("");
|
|
@@ -528,9 +516,7 @@ var init_ThreeJSCompiler = __esm({
|
|
|
528
516
|
else if (p.key === "radius") radius = p.value;
|
|
529
517
|
}
|
|
530
518
|
if (shape === "sphere") {
|
|
531
|
-
this.emit(
|
|
532
|
-
`const ${v}Geom = new THREE.SphereGeometry(${radius ?? 5}, 16, 16);`
|
|
533
|
-
);
|
|
519
|
+
this.emit(`const ${v}Geom = new THREE.SphereGeometry(${radius ?? 5}, 16, 16);`);
|
|
534
520
|
} else {
|
|
535
521
|
const s = Array.isArray(size) ? size : [size ?? 5, size ?? 5, size ?? 5];
|
|
536
522
|
this.emit(`const ${v}Geom = new THREE.BoxGeometry(${s[0]}, ${s[1]}, ${s[2]});`);
|
|
@@ -542,9 +528,7 @@ var init_ThreeJSCompiler = __esm({
|
|
|
542
528
|
if (position) this.emit(`${v}.position.set(${position[0]}, ${position[1]}, ${position[2]});`);
|
|
543
529
|
this.emit(`this.scene.add(${v}); // trigger zone (invisible)`);
|
|
544
530
|
if (zone.handlers?.length) {
|
|
545
|
-
this.emit(
|
|
546
|
-
`// Zone handlers: attach raycaster intersection checks for ${v}`
|
|
547
|
-
);
|
|
531
|
+
this.emit(`// Zone handlers: attach raycaster intersection checks for ${v}`);
|
|
548
532
|
for (const h of zone.handlers) {
|
|
549
533
|
this.emit(
|
|
550
534
|
`// on ${this.escapeStringValue(h.event, "TypeScript")}: implement via raycaster.intersectObject(${v})`
|
|
@@ -869,26 +853,156 @@ export default ${safeName}Component;
|
|
|
869
853
|
// ============================================================================
|
|
870
854
|
generateHTMLPage(name, objects, composition) {
|
|
871
855
|
const content = objects.map((obj) => this.generateHTMLNode(obj)).join("\n ");
|
|
872
|
-
let bgColor = "#
|
|
873
|
-
let color = "#
|
|
856
|
+
let bgColor = "#050510";
|
|
857
|
+
let color = "#ffffff";
|
|
874
858
|
if (composition.environment?.properties) {
|
|
875
859
|
const themeProp = composition.environment.properties.find((p) => p.key === "theme");
|
|
876
860
|
const bgProp = composition.environment.properties.find((p) => p.key === "backgroundColor");
|
|
877
|
-
|
|
861
|
+
const fgProp = composition.environment.properties.find((p) => p.key === "color");
|
|
862
|
+
if (themeProp?.value === "light") {
|
|
863
|
+
bgColor = bgProp?.value || "#ffffff";
|
|
864
|
+
color = fgProp?.value || "#000000";
|
|
865
|
+
} else if (themeProp?.value === "dark" || !themeProp) {
|
|
878
866
|
bgColor = bgProp?.value || "#050510";
|
|
879
|
-
color = "#ffffff";
|
|
867
|
+
color = fgProp?.value || "#ffffff";
|
|
880
868
|
}
|
|
881
869
|
}
|
|
870
|
+
if (composition.traits?.some((t) => t.name === "theme" && t.config?.light)) {
|
|
871
|
+
bgColor = "#ffffff";
|
|
872
|
+
color = "#000000";
|
|
873
|
+
}
|
|
882
874
|
return `<!DOCTYPE html>
|
|
883
875
|
<html lang="en">
|
|
884
876
|
<head>
|
|
885
877
|
<meta charset="UTF-8">
|
|
886
878
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
887
879
|
<title>${name}</title>
|
|
888
|
-
<script src="https://cdn.tailwindcss.com"></script>
|
|
889
880
|
<style>
|
|
881
|
+
/* HoloScript Native2D \u2014 minimal Tailwind-compatible utility CSS (no CDN dependency) */
|
|
882
|
+
*, *::before, *::after { box-sizing: border-box; }
|
|
890
883
|
body { margin: 0; padding: 0; background-color: ${bgColor}; color: ${color}; font-family: system-ui, -apple-system, sans-serif; }
|
|
891
|
-
/*
|
|
884
|
+
/* --- Typography --- */
|
|
885
|
+
.text-5xl { font-size: 3rem; line-height: 1; }
|
|
886
|
+
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
|
|
887
|
+
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
|
|
888
|
+
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
|
|
889
|
+
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
|
|
890
|
+
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
|
|
891
|
+
.text-xs { font-size: 0.75rem; line-height: 1rem; }
|
|
892
|
+
.font-bold { font-weight: 700; }
|
|
893
|
+
.font-semibold { font-weight: 600; }
|
|
894
|
+
.font-medium { font-weight: 500; }
|
|
895
|
+
.tracking-tight { letter-spacing: -0.025em; }
|
|
896
|
+
/* --- Colors --- */
|
|
897
|
+
.text-white { color: #fff; }
|
|
898
|
+
.text-black { color: #000; }
|
|
899
|
+
.text-gray-300 { color: #d1d5db; }
|
|
900
|
+
.text-gray-400 { color: #9ca3af; }
|
|
901
|
+
.text-gray-500 { color: #6b7280; }
|
|
902
|
+
.text-gray-600 { color: #4b5563; }
|
|
903
|
+
/* --- Backgrounds --- */
|
|
904
|
+
.bg-white { background-color: #fff; }
|
|
905
|
+
.bg-gray-800 { background-color: #1f2937; }
|
|
906
|
+
.bg-gray-900 { background-color: #111827; }
|
|
907
|
+
.bg-gray-950 { background-color: #030712; }
|
|
908
|
+
.bg-blue-600 { background-color: #2563eb; }
|
|
909
|
+
.bg-blue-700 { background-color: #1d4ed8; }
|
|
910
|
+
.bg-indigo-600 { background-color: #4f46e5; }
|
|
911
|
+
.bg-indigo-500 { background-color: #6366f1; }
|
|
912
|
+
/* --- Hover states --- */
|
|
913
|
+
.hover\\:bg-blue-700:hover { background-color: #1d4ed8; }
|
|
914
|
+
.hover\\:bg-gray-800:hover { background-color: #1f2937; }
|
|
915
|
+
.hover\\:bg-indigo-500:hover { background-color: #6366f1; }
|
|
916
|
+
.hover\\:text-white:hover { color: #fff; }
|
|
917
|
+
/* --- Spacing --- */
|
|
918
|
+
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
|
|
919
|
+
.px-4 { padding-left: 1rem; padding-right: 1rem; }
|
|
920
|
+
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
|
|
921
|
+
.px-8 { padding-left: 2rem; padding-right: 2rem; }
|
|
922
|
+
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
|
|
923
|
+
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
|
|
924
|
+
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
|
|
925
|
+
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
|
|
926
|
+
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
|
|
927
|
+
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
|
|
928
|
+
.p-4 { padding: 1rem; }
|
|
929
|
+
.p-6 { padding: 1.5rem; }
|
|
930
|
+
.p-8 { padding: 2rem; }
|
|
931
|
+
.mt-2 { margin-top: 0.5rem; }
|
|
932
|
+
.mt-4 { margin-top: 1rem; }
|
|
933
|
+
.mt-6 { margin-top: 1.5rem; }
|
|
934
|
+
.mt-8 { margin-top: 2rem; }
|
|
935
|
+
.mb-2 { margin-bottom: 0.5rem; }
|
|
936
|
+
.mb-4 { margin-bottom: 1rem; }
|
|
937
|
+
.mb-6 { margin-bottom: 1.5rem; }
|
|
938
|
+
.gap-2 { gap: 0.5rem; }
|
|
939
|
+
.gap-4 { gap: 1rem; }
|
|
940
|
+
.gap-6 { gap: 1.5rem; }
|
|
941
|
+
.gap-8 { gap: 2rem; }
|
|
942
|
+
.space-y-2 > * + * { margin-top: 0.5rem; }
|
|
943
|
+
.space-y-4 > * + * { margin-top: 1rem; }
|
|
944
|
+
/* --- Borders & Radius --- */
|
|
945
|
+
.border { border-width: 1px; border-style: solid; }
|
|
946
|
+
.border-gray-600 { border-color: #4b5563; }
|
|
947
|
+
.border-gray-700 { border-color: #374151; }
|
|
948
|
+
.border-gray-800 { border-color: #1f2937; }
|
|
949
|
+
.rounded { border-radius: 0.25rem; }
|
|
950
|
+
.rounded-lg { border-radius: 0.5rem; }
|
|
951
|
+
.rounded-xl { border-radius: 0.75rem; }
|
|
952
|
+
.rounded-2xl { border-radius: 1rem; }
|
|
953
|
+
.rounded-full { border-radius: 9999px; }
|
|
954
|
+
/* --- Shadows --- */
|
|
955
|
+
.shadow { box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); }
|
|
956
|
+
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1); }
|
|
957
|
+
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1); }
|
|
958
|
+
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1); }
|
|
959
|
+
/* --- Layout --- */
|
|
960
|
+
.flex { display: flex; }
|
|
961
|
+
.inline-flex { display: inline-flex; }
|
|
962
|
+
.grid { display: grid; }
|
|
963
|
+
.block { display: block; }
|
|
964
|
+
.hidden { display: none; }
|
|
965
|
+
.items-center { align-items: center; }
|
|
966
|
+
.items-start { align-items: flex-start; }
|
|
967
|
+
.justify-center { justify-content: center; }
|
|
968
|
+
.justify-between { justify-content: space-between; }
|
|
969
|
+
.flex-col { flex-direction: column; }
|
|
970
|
+
.flex-wrap { flex-wrap: wrap; }
|
|
971
|
+
.flex-1 { flex: 1 1 0%; }
|
|
972
|
+
.w-full { width: 100%; }
|
|
973
|
+
.w-auto { width: auto; }
|
|
974
|
+
.max-w-sm { max-width: 24rem; }
|
|
975
|
+
.max-w-md { max-width: 28rem; }
|
|
976
|
+
.max-w-lg { max-width: 32rem; }
|
|
977
|
+
.max-w-xl { max-width: 36rem; }
|
|
978
|
+
.max-w-2xl { max-width: 42rem; }
|
|
979
|
+
.max-w-3xl { max-width: 48rem; }
|
|
980
|
+
.max-w-4xl { max-width: 56rem; }
|
|
981
|
+
.max-w-5xl { max-width: 64rem; }
|
|
982
|
+
.max-w-6xl { max-width: 72rem; }
|
|
983
|
+
.max-w-7xl { max-width: 80rem; }
|
|
984
|
+
.mx-auto { margin-left: auto; margin-right: auto; }
|
|
985
|
+
.text-center { text-align: center; }
|
|
986
|
+
.text-left { text-align: left; }
|
|
987
|
+
.text-right { text-align: right; }
|
|
988
|
+
.relative { position: relative; }
|
|
989
|
+
.absolute { position: absolute; }
|
|
990
|
+
/* --- Interaction --- */
|
|
991
|
+
.cursor-pointer { cursor: pointer; }
|
|
992
|
+
.select-none { user-select: none; }
|
|
993
|
+
.transition-all { transition: all 0.15s ease; }
|
|
994
|
+
.transition { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }
|
|
995
|
+
.outline-none { outline: none; }
|
|
996
|
+
/* Focus ring for inputs */
|
|
997
|
+
.focus\\:ring-2:focus { box-shadow: 0 0 0 2px rgba(99,102,241,0.5); }
|
|
998
|
+
.focus\\:ring-indigo-500:focus { box-shadow: 0 0 0 2px #6366f1; }
|
|
999
|
+
/* --- Opacity --- */
|
|
1000
|
+
.opacity-50 { opacity: 0.5; }
|
|
1001
|
+
.opacity-75 { opacity: 0.75; }
|
|
1002
|
+
/* --- Overflow --- */
|
|
1003
|
+
.overflow-hidden { overflow: hidden; }
|
|
1004
|
+
.overflow-auto { overflow: auto; }
|
|
1005
|
+
/* --- Custom HoloScript trait animations --- */
|
|
892
1006
|
.glow-btn:hover { box-shadow: 0 0 15px rgba(255,255,255,0.5); }
|
|
893
1007
|
.lift-card { transition: transform 0.2s ease, box-shadow 0.2s ease; }
|
|
894
1008
|
.lift-card:hover { transform: translateY(-4px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
|
|
@@ -938,10 +1052,85 @@ export default ${safeName}Component;
|
|
|
938
1052
|
</body>
|
|
939
1053
|
</html>`;
|
|
940
1054
|
}
|
|
1055
|
+
/** Build a semantic HTML block for @semantic_entity / @semantic_layout traits.
|
|
1056
|
+
*
|
|
1057
|
+
* HoloScript's `generate_semantic_ui` tool emits 3D-world-style objects
|
|
1058
|
+
* (`mesh`, `text`, `plane`) annotated with semantic traits:
|
|
1059
|
+
* @semantic_entity(stock_table) → config._arg0 = entity name
|
|
1060
|
+
* @semantic_layout(table, columns:["a","b","c"]) → config._arg0 = layout type
|
|
1061
|
+
* @content("Inventory Dashboard") → config._arg0 = text
|
|
1062
|
+
* @color("#16213e") → config._arg0 = bg colour
|
|
1063
|
+
*
|
|
1064
|
+
* Without this handler every semantic object falls through to `tag = 'div'` with
|
|
1065
|
+
* no content. This method maps the semantic vocabulary to real HTML elements so
|
|
1066
|
+
* the compiled page is actually perceivable.
|
|
1067
|
+
*/
|
|
1068
|
+
generateSemanticHTMLBlock(traits) {
|
|
1069
|
+
const layoutType = traits.semantic_layout?._arg0 || traits.semantic_layout?.flow || traits.semantic_layout?.layout || traits.semantic_layout?.type;
|
|
1070
|
+
const entityName = traits.semantic_entity?._arg0 || traits.semantic_entity?.type || traits.semantic_entity?.name || traits.semantic_entity?.entity;
|
|
1071
|
+
const bgColor = traits.color?._arg0;
|
|
1072
|
+
const textContent = traits.content?._arg0;
|
|
1073
|
+
if (!layoutType && !entityName) return null;
|
|
1074
|
+
const styleAttr = bgColor ? ` style="background-color:${bgColor};padding:1rem;border-radius:0.5rem;margin-bottom:1rem;"` : ` style="padding:1rem;margin-bottom:1rem;"`;
|
|
1075
|
+
const isTableEntity = !!entityName && (entityName.includes("table") || entityName.includes("grid") || entityName.includes("list"));
|
|
1076
|
+
if (layoutType === "table" || isTableEntity && !layoutType) {
|
|
1077
|
+
const columns = traits.semantic_layout?.columns || [];
|
|
1078
|
+
const headerCells = columns.map(
|
|
1079
|
+
(col) => `<th style="padding:0.5rem 1rem;text-align:left;border-bottom:2px solid #334;">${col}</th>`
|
|
1080
|
+
).join("");
|
|
1081
|
+
const sampleRow = columns.map((col) => `<td style="padding:0.5rem 1rem;">${col}</td>`).join("");
|
|
1082
|
+
return `<div${styleAttr} data-holo-semantic="table" data-holo-entity="${entityName || ""}">
|
|
1083
|
+
<table style="width:100%;border-collapse:collapse;">
|
|
1084
|
+
<thead><tr>${headerCells}</tr></thead>
|
|
1085
|
+
<tbody>
|
|
1086
|
+
<tr>${sampleRow}</tr>
|
|
1087
|
+
</tbody>
|
|
1088
|
+
</table>
|
|
1089
|
+
</div>`;
|
|
1090
|
+
}
|
|
1091
|
+
if (layoutType === "form" || entityName && entityName.includes("form")) {
|
|
1092
|
+
const fields = traits.semantic_layout?.fields || [];
|
|
1093
|
+
const inputs = fields.map(
|
|
1094
|
+
(f) => `<div style="margin-bottom:0.5rem;"><label style="display:block;margin-bottom:0.25rem;">${f}</label><input type="text" name="${f}" placeholder="${f}" style="width:100%;padding:0.4rem 0.6rem;border:1px solid #556;border-radius:0.25rem;background:#111;color:#eee;" /></div>`
|
|
1095
|
+
).join("\n");
|
|
1096
|
+
return `<div${styleAttr} data-holo-semantic="form" data-holo-entity="${entityName || ""}">
|
|
1097
|
+
<form onsubmit="return false;">
|
|
1098
|
+
${inputs}
|
|
1099
|
+
<button type="submit" style="padding:0.4rem 1rem;border-radius:0.25rem;background:#3b82f6;color:#fff;border:none;cursor:pointer;">Submit</button>
|
|
1100
|
+
</form>
|
|
1101
|
+
</div>`;
|
|
1102
|
+
}
|
|
1103
|
+
if (layoutType === "alert_list") {
|
|
1104
|
+
const filterLabel = traits.semantic_layout?.filter || "";
|
|
1105
|
+
return `<div${styleAttr} data-holo-semantic="alert_list" data-holo-entity="${entityName || ""}">
|
|
1106
|
+
<ul style="list-style:none;padding:0;margin:0;" data-holo-filter="${filterLabel}">
|
|
1107
|
+
<li style="padding:0.4rem 0.8rem;border-bottom:1px solid #446;">(no alerts)</li>
|
|
1108
|
+
</ul>
|
|
1109
|
+
</div>`;
|
|
1110
|
+
}
|
|
1111
|
+
if (layoutType === "dashboard_grid" || layoutType) {
|
|
1112
|
+
return `<div${styleAttr} data-holo-semantic="${layoutType}" data-holo-entity="${entityName || ""}"></div>`;
|
|
1113
|
+
}
|
|
1114
|
+
if (entityName && textContent) {
|
|
1115
|
+
const isButton = entityName.includes("button") || entityName.includes("btn") || entityName.includes("submit");
|
|
1116
|
+
if (isButton) {
|
|
1117
|
+
return `<div${styleAttr} data-holo-entity="${entityName}"><button type="button" style="padding:0.4rem 1rem;border-radius:0.25rem;background:#3b82f6;color:#fff;border:none;cursor:pointer;">${textContent}</button></div>`;
|
|
1118
|
+
}
|
|
1119
|
+
return `<div${styleAttr} data-holo-entity="${entityName}"><span>${textContent}</span></div>`;
|
|
1120
|
+
}
|
|
1121
|
+
if (entityName) {
|
|
1122
|
+
return `<div${styleAttr} data-holo-entity="${entityName}"></div>`;
|
|
1123
|
+
}
|
|
1124
|
+
return null;
|
|
1125
|
+
}
|
|
941
1126
|
generateHTMLNode(obj, opts = {}) {
|
|
942
1127
|
const node = obj;
|
|
943
1128
|
const traits = this.extractTraits(obj);
|
|
944
1129
|
const nodeType = typeof node.type === "string" ? node.type.toLowerCase() : void 0;
|
|
1130
|
+
if (traits.semantic_entity || traits.semantic_layout) {
|
|
1131
|
+
const block = this.generateSemanticHTMLBlock(traits);
|
|
1132
|
+
if (block) return block;
|
|
1133
|
+
}
|
|
945
1134
|
let tag = traits.theme?.tag || traits.panel?.tag || nodeType || "div";
|
|
946
1135
|
if ([
|
|
947
1136
|
"nav",
|
|
@@ -3606,17 +3795,7 @@ var GaussianSplattingCompiler = class extends CompilerBase {
|
|
|
3606
3795
|
c11 *= invLen;
|
|
3607
3796
|
c12 *= invLen;
|
|
3608
3797
|
c22 *= invLen;
|
|
3609
|
-
const ev = this.jacobiEigenvalues3([
|
|
3610
|
-
c00,
|
|
3611
|
-
c01,
|
|
3612
|
-
c02,
|
|
3613
|
-
c01,
|
|
3614
|
-
c11,
|
|
3615
|
-
c12,
|
|
3616
|
-
c02,
|
|
3617
|
-
c12,
|
|
3618
|
-
c22
|
|
3619
|
-
]);
|
|
3798
|
+
const ev = this.jacobiEigenvalues3([c00, c01, c02, c01, c11, c12, c02, c12, c22]);
|
|
3620
3799
|
const minScale = 1e-3;
|
|
3621
3800
|
scales[i * 3] = Math.max(minScale, Math.sqrt(Math.abs(ev.values[0])));
|
|
3622
3801
|
scales[i * 3 + 1] = Math.max(minScale, Math.sqrt(Math.abs(ev.values[1])));
|
|
@@ -4246,11 +4425,7 @@ function computeBounds(anchors) {
|
|
|
4246
4425
|
const cx = (minX + maxX) / 2;
|
|
4247
4426
|
const cy = (minY + maxY) / 2;
|
|
4248
4427
|
const cz = (minZ + maxZ) / 2;
|
|
4249
|
-
const halfSize = Math.max(
|
|
4250
|
-
(maxX - minX) / 2,
|
|
4251
|
-
(maxY - minY) / 2,
|
|
4252
|
-
(maxZ - minZ) / 2
|
|
4253
|
-
);
|
|
4428
|
+
const halfSize = Math.max((maxX - minX) / 2, (maxY - minY) / 2, (maxZ - minZ) / 2);
|
|
4254
4429
|
return {
|
|
4255
4430
|
min: { x: minX, y: minY, z: minZ },
|
|
4256
4431
|
max: { x: maxX, y: maxY, z: maxZ },
|
|
@@ -6286,7 +6461,7 @@ var CompilerBridge = class {
|
|
|
6286
6461
|
if (this.initialized) return;
|
|
6287
6462
|
try {
|
|
6288
6463
|
const [parserModule, compilerModule] = await Promise.all([
|
|
6289
|
-
import('./HoloScriptPlusParser-
|
|
6464
|
+
import('./HoloScriptPlusParser-WENAFEFV.js'),
|
|
6290
6465
|
import('./compiler/r3f.js')
|
|
6291
6466
|
]);
|
|
6292
6467
|
this.modules = {
|
|
@@ -6910,5 +7085,5 @@ function compilePipelineSource(source, options = {}) {
|
|
|
6910
7085
|
}
|
|
6911
7086
|
|
|
6912
7087
|
export { A2AAgentCardCompiler, A2AAgentCardCompiler_exports, BUILTIN_RESOURCES, CAPABILITY_HIERARCHY, CATEGORY_DEFAULT_EMBODIMENT, CodeEditorCompiler, CompilerBridge, CrossRealityTraitRegistry, EFFECTS_BY_CATEGORY, EFFECT_TO_CAPABILITY, EffectChecker, EffectRow, GaussianSplattingCompiler, HANDOFF_PATH_RULES, LinearTypeChecker, MVC_BUDGET_CONSTRAINTS, NIRCompiler, NIRCompiler_exports, Native2DCompiler, Native2DCompiler_exports, PLATFORM_BUDGETS, PLATFORM_EMBODIMENT_OVERRIDES, ResourceBudgetAnalyzer, SHARED_SORT_SHADER_PATH, SpatialPartitionPass, TRAIT_EFFECTS, TRAIT_RESOURCE_COSTS, TRAIT_RESOURCE_MAP, TRUST_LEVEL_CAPABILITIES, ThreeJSCompiler, ThreeJSCompiler_exports, USDZPipeline, bestCategoryForTraits, buildSafetyReport, checkCapabilities, compilePipelineSource, compilePipelineSourceToNode, compilePipelineSourceToPython, compilePipelineToNode, compilePipelineToPython, createCrossRealityTraitRegistry, createEffectChecker, createGaussianSplattingCompiler, dangerLevel, deriveRequirements, detectMultiUserSharedSort, effectCategory, expandCapabilities, formatReport, generateCertificate, getCompilerBridge, getCrossRealityTraitRegistry, inferFromBuiltins, inferFromTraits, init_A2AAgentCardCompiler, init_NIRCompiler, init_Native2DCompiler, init_ThreeJSCompiler, isSafeTraitSet, knownBuiltins, knownTraits, quickSafetyCheck, resetCrossRealityTraitRegistry, runSafetyPass, selectModality, selectModalityForAll, spatialPartition };
|
|
6913
|
-
//# sourceMappingURL=chunk-
|
|
6914
|
-
//# sourceMappingURL=chunk-
|
|
7088
|
+
//# sourceMappingURL=chunk-F2G6CWFT.js.map
|
|
7089
|
+
//# sourceMappingURL=chunk-F2G6CWFT.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkEBS32AJI_cjs = require('./chunk-EBS32AJI.cjs');
|
|
4
|
+
var chunkGH6C2QGW_cjs = require('./chunk-GH6C2QGW.cjs');
|
|
5
|
+
var chunkLODTHGST_cjs = require('./chunk-LODTHGST.cjs');
|
|
6
6
|
var chunkHCCQLAA4_cjs = require('./chunk-HCCQLAA4.cjs');
|
|
7
7
|
var ans = require('@holoscript/core-types/ans');
|
|
8
8
|
|
|
@@ -14,15 +14,15 @@ chunkHCCQLAA4_cjs.__export(UnrealCompiler_exports, {
|
|
|
14
14
|
});
|
|
15
15
|
function compileToUnreal(composition, options) {
|
|
16
16
|
const compiler = new exports.UnrealCompiler(options);
|
|
17
|
-
return compiler.compile(composition,
|
|
17
|
+
return compiler.compile(composition, chunkLODTHGST_cjs.createTestCompilerToken());
|
|
18
18
|
}
|
|
19
19
|
exports.UnrealCompiler = void 0;
|
|
20
20
|
var init_UnrealCompiler = chunkHCCQLAA4_cjs.__esm({
|
|
21
21
|
"src/compiler/UnrealCompiler.ts"() {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
exports.UnrealCompiler = class extends
|
|
22
|
+
chunkLODTHGST_cjs.init_CompilerBase();
|
|
23
|
+
chunkGH6C2QGW_cjs.init_DomainBlockCompilerMixin();
|
|
24
|
+
chunkEBS32AJI_cjs.init_PlatformConditionalCompilerMixin();
|
|
25
|
+
exports.UnrealCompiler = class extends chunkLODTHGST_cjs.CompilerBase {
|
|
26
26
|
constructor(options = {}) {
|
|
27
27
|
super();
|
|
28
28
|
this.compilerName = "UnrealCompiler";
|
|
@@ -41,7 +41,7 @@ var init_UnrealCompiler = chunkHCCQLAA4_cjs.__esm({
|
|
|
41
41
|
platformTarget: options.platformTarget ?? ""
|
|
42
42
|
};
|
|
43
43
|
if (options.platformTarget) {
|
|
44
|
-
this._platformTarget = typeof options.platformTarget === "string" ?
|
|
44
|
+
this._platformTarget = typeof options.platformTarget === "string" ? chunkEBS32AJI_cjs.createPlatformTarget(options.platformTarget) : options.platformTarget;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
getRequiredCapability() {
|
|
@@ -50,7 +50,7 @@ var init_UnrealCompiler = chunkHCCQLAA4_cjs.__esm({
|
|
|
50
50
|
compile(composition, agentToken, outputPath) {
|
|
51
51
|
this.validateCompilerAccess(agentToken, outputPath);
|
|
52
52
|
if (this._platformTarget) {
|
|
53
|
-
const platformMixin = new
|
|
53
|
+
const platformMixin = new chunkEBS32AJI_cjs.PlatformConditionalCompilerMixin();
|
|
54
54
|
composition = platformMixin.filterForPlatform(composition, this._platformTarget);
|
|
55
55
|
}
|
|
56
56
|
this.headerLines = [];
|
|
@@ -401,35 +401,47 @@ var init_UnrealCompiler = chunkHCCQLAA4_cjs.__esm({
|
|
|
401
401
|
break;
|
|
402
402
|
case "grabbable":
|
|
403
403
|
this.emitS(`// @grabbable \u2014 implement via GrabComponent or VR interaction framework`);
|
|
404
|
-
this.emitS(
|
|
404
|
+
this.emitS(
|
|
405
|
+
`UE_LOG(LogTemp, Warning, TEXT("@grabbable on %s \u2014 trait stubbed, needs GrabComponent implementation"), *GetName());`
|
|
406
|
+
);
|
|
405
407
|
break;
|
|
406
408
|
case "pointable":
|
|
407
409
|
case "hoverable":
|
|
408
410
|
this.emitS(
|
|
409
411
|
`// @${this.escapeStringValue(trait.name, "TypeScript")} \u2014 implement via line trace interaction`
|
|
410
412
|
);
|
|
411
|
-
this.emitS(
|
|
413
|
+
this.emitS(
|
|
414
|
+
`UE_LOG(LogTemp, Warning, TEXT("@%s on %s \u2014 trait stubbed, needs line trace interaction"), TEXT("${this.escapeStringValue(trait.name, "TypeScript")}"), *GetName());`
|
|
415
|
+
);
|
|
412
416
|
break;
|
|
413
417
|
case "portal":
|
|
414
418
|
this.emitS(`// @portal \u2014 destination: "${trait.config?.destination || "unknown"}"`);
|
|
415
|
-
this.emitS(
|
|
419
|
+
this.emitS(
|
|
420
|
+
`UE_LOG(LogTemp, Warning, TEXT("@portal on %s \u2014 trait stubbed, needs level streaming/teleport implementation"), *GetName());`
|
|
421
|
+
);
|
|
416
422
|
break;
|
|
417
423
|
case "emissive":
|
|
418
424
|
case "glowing":
|
|
419
425
|
this.emitS(
|
|
420
426
|
`// @${this.escapeStringValue(trait.name, "TypeScript")} \u2014 apply emissive material`
|
|
421
427
|
);
|
|
422
|
-
this.emitS(
|
|
428
|
+
this.emitS(
|
|
429
|
+
`UE_LOG(LogTemp, Warning, TEXT("@%s on %s \u2014 trait stubbed, needs emissive material"), TEXT("${this.escapeStringValue(trait.name, "TypeScript")}"), *GetName());`
|
|
430
|
+
);
|
|
423
431
|
break;
|
|
424
432
|
case "transparent":
|
|
425
433
|
this.emitS(`// @transparent \u2014 set material blend mode`);
|
|
426
|
-
this.emitS(
|
|
434
|
+
this.emitS(
|
|
435
|
+
`UE_LOG(LogTemp, Warning, TEXT("@transparent on %s \u2014 trait stubbed, needs translucent material"), *GetName());`
|
|
436
|
+
);
|
|
427
437
|
break;
|
|
428
438
|
default:
|
|
429
439
|
this.emitS(
|
|
430
440
|
`// @${this.escapeStringValue(trait.name, "TypeScript")} \u2014 custom trait implementation required`
|
|
431
441
|
);
|
|
432
|
-
this.emitS(
|
|
442
|
+
this.emitS(
|
|
443
|
+
`UE_LOG(LogTemp, Warning, TEXT("@%s on %s \u2014 unhandled trait, needs custom implementation"), TEXT("${this.escapeStringValue(trait.name, "TypeScript")}"), *GetName());`
|
|
444
|
+
);
|
|
433
445
|
}
|
|
434
446
|
}
|
|
435
447
|
compileLightSetup(light) {
|
|
@@ -644,32 +656,32 @@ var init_UnrealCompiler = chunkHCCQLAA4_cjs.__esm({
|
|
|
644
656
|
this.emitS("");
|
|
645
657
|
this.emitS("// === v4.2 Domain Blocks ===");
|
|
646
658
|
let blockIdx = 0;
|
|
647
|
-
const compiled =
|
|
659
|
+
const compiled = chunkGH6C2QGW_cjs.compileDomainBlocks(
|
|
648
660
|
domainBlocks,
|
|
649
661
|
{
|
|
650
662
|
material: (block) => {
|
|
651
|
-
const mat =
|
|
652
|
-
return
|
|
663
|
+
const mat = chunkGH6C2QGW_cjs.compileMaterialBlock(block);
|
|
664
|
+
return chunkGH6C2QGW_cjs.materialToUnreal(mat, `DB${blockIdx++}`);
|
|
653
665
|
},
|
|
654
666
|
physics: (block) => {
|
|
655
|
-
const phys =
|
|
656
|
-
return
|
|
667
|
+
const phys = chunkGH6C2QGW_cjs.compilePhysicsBlock(block);
|
|
668
|
+
return chunkGH6C2QGW_cjs.physicsToUnreal(phys, `DB${blockIdx++}`);
|
|
657
669
|
},
|
|
658
670
|
vfx: (block) => {
|
|
659
|
-
const ps =
|
|
660
|
-
return
|
|
671
|
+
const ps = chunkGH6C2QGW_cjs.compileParticleBlock(block);
|
|
672
|
+
return chunkGH6C2QGW_cjs.particlesToUnreal(ps, `DB${blockIdx++}`);
|
|
661
673
|
},
|
|
662
674
|
postfx: (block) => {
|
|
663
|
-
const pp =
|
|
664
|
-
return
|
|
675
|
+
const pp = chunkGH6C2QGW_cjs.compilePostProcessingBlock(block);
|
|
676
|
+
return chunkGH6C2QGW_cjs.postProcessingToUnreal(pp, `DB${blockIdx++}`);
|
|
665
677
|
},
|
|
666
678
|
audio: (block) => {
|
|
667
|
-
const audio =
|
|
668
|
-
return
|
|
679
|
+
const audio = chunkGH6C2QGW_cjs.compileAudioSourceBlock(block);
|
|
680
|
+
return chunkGH6C2QGW_cjs.audioSourceToUnreal(audio, `DB${blockIdx++}`);
|
|
669
681
|
},
|
|
670
682
|
weather: (block) => {
|
|
671
|
-
const weather =
|
|
672
|
-
return
|
|
683
|
+
const weather = chunkGH6C2QGW_cjs.compileWeatherBlock(block);
|
|
684
|
+
return chunkGH6C2QGW_cjs.weatherToUnreal(weather);
|
|
673
685
|
}
|
|
674
686
|
},
|
|
675
687
|
(block) => `// Domain block: ${block.domain}/${block.keyword} "${this.escapeStringValue(block.name, "TypeScript")}"`
|
|
@@ -714,5 +726,5 @@ var init_UnrealCompiler = chunkHCCQLAA4_cjs.__esm({
|
|
|
714
726
|
exports.UnrealCompiler_exports = UnrealCompiler_exports;
|
|
715
727
|
exports.compileToUnreal = compileToUnreal;
|
|
716
728
|
exports.init_UnrealCompiler = init_UnrealCompiler;
|
|
717
|
-
//# sourceMappingURL=chunk-
|
|
718
|
-
//# sourceMappingURL=chunk-
|
|
729
|
+
//# sourceMappingURL=chunk-F5LKJ6F5.cjs.map
|
|
730
|
+
//# sourceMappingURL=chunk-F5LKJ6F5.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { init_CompilerBase, CompilerBase } from './chunk-
|
|
1
|
+
import { init_CompilerBase, CompilerBase } from './chunk-C7ZBSV2Q.js';
|
|
2
2
|
|
|
3
3
|
// src/compiler/QuantumCircuitCompiler.ts
|
|
4
4
|
init_CompilerBase();
|
|
@@ -86,7 +86,9 @@ function generateVQECircuit(atoms, moleculeName, ansatzLayers, initialParams) {
|
|
|
86
86
|
}
|
|
87
87
|
let paramIdx = 0;
|
|
88
88
|
for (let layer = 0; layer < ansatzLayers; layer++) {
|
|
89
|
-
lines.push(
|
|
89
|
+
lines.push(
|
|
90
|
+
`// Layer ${layer}: Ry rotations ( - [${paramIdx}..${paramIdx + n - 1}] optimised by VQE)`
|
|
91
|
+
);
|
|
90
92
|
for (let i = 0; i < n; i++) {
|
|
91
93
|
lines.push(`ry(theta_${paramIdx}) q[${i}];`);
|
|
92
94
|
paramIdx++;
|
|
@@ -275,7 +277,10 @@ var QuantumCircuitCompiler = class extends CompilerBase {
|
|
|
275
277
|
/** Build a {@link QASMOutput} for a VQE circuit. */
|
|
276
278
|
buildVQEOutput(atoms, cfg) {
|
|
277
279
|
const moleculeName = (extractNumber(cfg, "moleculeName") !== void 0 ? void 0 : cfg["moleculeName"]?.value) ?? atoms.map((a) => a.symbol).join("") ?? "molecule";
|
|
278
|
-
const ansatzLayers = Math.max(
|
|
280
|
+
const ansatzLayers = Math.max(
|
|
281
|
+
1,
|
|
282
|
+
Math.round(extractNumber(cfg, "ansatzLayers") ?? extractNumber(cfg, "ansatz_layers") ?? 2)
|
|
283
|
+
);
|
|
279
284
|
const initialParams = cfg["initialParams"]?.value ?? cfg["initial_params"]?.value ?? void 0;
|
|
280
285
|
const { qasm, numQubits, estimatedDepth, warnings, paramNames } = generateVQECircuit(
|
|
281
286
|
atoms,
|
|
@@ -321,5 +326,5 @@ var QuantumCircuitCompiler = class extends CompilerBase {
|
|
|
321
326
|
};
|
|
322
327
|
|
|
323
328
|
export { QuantumCircuitCompiler };
|
|
324
|
-
//# sourceMappingURL=chunk-
|
|
325
|
-
//# sourceMappingURL=chunk-
|
|
329
|
+
//# sourceMappingURL=chunk-FGMDMJM7.js.map
|
|
330
|
+
//# sourceMappingURL=chunk-FGMDMJM7.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileMaterialBlock } from './chunk-
|
|
2
|
-
import { createTestCompilerToken, init_CompilerBase, CompilerBase } from './chunk-
|
|
1
|
+
import { init_DomainBlockCompilerMixin, compileDomainBlocks, compileMaterialBlock } from './chunk-ZA34AN3R.js';
|
|
2
|
+
import { createTestCompilerToken, init_CompilerBase, CompilerBase } from './chunk-C7ZBSV2Q.js';
|
|
3
3
|
import { __export, __esm } from './chunk-OL46QLBJ.js';
|
|
4
4
|
import { ANSCapabilityPath } from '@holoscript/core-types/ans';
|
|
5
5
|
|
|
@@ -1179,5 +1179,5 @@ var init_WASMCompiler = __esm({
|
|
|
1179
1179
|
});
|
|
1180
1180
|
|
|
1181
1181
|
export { WASMCompiler, WASMCompiler_default, WASMCompiler_exports, compileASTToWASM, compileToWASM, createWASMCompiler, init_WASMCompiler };
|
|
1182
|
-
//# sourceMappingURL=chunk-
|
|
1183
|
-
//# sourceMappingURL=chunk-
|
|
1182
|
+
//# sourceMappingURL=chunk-FHQFPYV4.js.map
|
|
1183
|
+
//# sourceMappingURL=chunk-FHQFPYV4.js.map
|