@holoscript/engine 6.0.3 → 6.0.4
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/dist/AutoMesher-CK47F6AV.js +17 -0
- package/dist/GPUBuffers-2LHBCD7X.js +9 -0
- package/dist/WebGPUContext-TNEUYU2Y.js +11 -0
- package/dist/animation/index.cjs +38 -38
- package/dist/animation/index.d.cts +1 -1
- package/dist/animation/index.d.ts +1 -1
- package/dist/animation/index.js +1 -1
- package/dist/audio/index.cjs +16 -6
- package/dist/audio/index.d.cts +1 -1
- package/dist/audio/index.d.ts +1 -1
- package/dist/audio/index.js +1 -1
- package/dist/camera/index.cjs +23 -23
- package/dist/camera/index.d.cts +1 -1
- package/dist/camera/index.d.ts +1 -1
- package/dist/camera/index.js +1 -1
- package/dist/character/index.cjs +6 -4
- package/dist/character/index.js +1 -1
- package/dist/choreography/index.cjs +1194 -0
- package/dist/choreography/index.d.cts +687 -0
- package/dist/choreography/index.d.ts +687 -0
- package/dist/choreography/index.js +1156 -0
- package/dist/chunk-2CSNRI2N.js +217 -0
- package/dist/chunk-33T2WINR.js +266 -0
- package/dist/chunk-35R73OFM.js +1257 -0
- package/dist/chunk-4MMDSUNP.js +1256 -0
- package/dist/chunk-5V6HOU72.js +319 -0
- package/dist/chunk-6QOP6PYF.js +1038 -0
- package/dist/chunk-7KMJVHIL.js +8944 -0
- package/dist/chunk-7VPUC62U.js +1106 -0
- package/dist/chunk-A2Y6RCAT.js +1878 -0
- package/dist/chunk-AHM42MK6.js +8944 -0
- package/dist/chunk-BL7IDTHE.js +218 -0
- package/dist/chunk-CITOMSWL.js +10462 -0
- package/dist/chunk-CXDPKW2K.js +8944 -0
- package/dist/chunk-CXZPLD4S.js +223 -0
- package/dist/chunk-CZYJE7IH.js +5169 -0
- package/dist/chunk-D2OP7YC7.js +6325 -0
- package/dist/chunk-EDRVQHUU.js +1544 -0
- package/dist/chunk-EJSLOOW2.js +3589 -0
- package/dist/chunk-F53SFGW5.js +1878 -0
- package/dist/chunk-HCFPELPY.js +919 -0
- package/dist/chunk-HNEE36PY.js +93 -0
- package/dist/chunk-HYXNV36F.js +1256 -0
- package/dist/chunk-IB7KHVFY.js +821 -0
- package/dist/chunk-IBBO7YYG.js +690 -0
- package/dist/chunk-ILIBGINU.js +5470 -0
- package/dist/chunk-IS4MHLKN.js +5479 -0
- package/dist/chunk-JT2PFKWD.js +5479 -0
- package/dist/chunk-K4CUB4NY.js +1038 -0
- package/dist/chunk-KATDQXRJ.js +10462 -0
- package/dist/chunk-KBQE6ZFJ.js +8944 -0
- package/dist/chunk-KBVD5K7E.js +560 -0
- package/dist/chunk-KCDPVQRY.js +4088 -0
- package/dist/chunk-KN4QJPKN.js +8944 -0
- package/dist/chunk-KWJ3ROSI.js +8944 -0
- package/dist/chunk-L45VF6DD.js +919 -0
- package/dist/chunk-LY4T37YK.js +307 -0
- package/dist/chunk-MDN5WZXA.js +1544 -0
- package/dist/chunk-MGCDP6VU.js +928 -0
- package/dist/chunk-NCX7X6G2.js +8681 -0
- package/dist/chunk-OF54BPVD.js +913 -0
- package/dist/chunk-OWSN2Q3Q.js +690 -0
- package/dist/chunk-PRRB5TTA.js +406 -0
- package/dist/chunk-PXWVQF76.js +4086 -0
- package/dist/chunk-PYCOIDT2.js +812 -0
- package/dist/chunk-PZCSADOV.js +928 -0
- package/dist/chunk-Q2XBVS2K.js +1038 -0
- package/dist/chunk-QDZRXWN5.js +1776 -0
- package/dist/chunk-RNWOZ6WQ.js +913 -0
- package/dist/chunk-ROLFT4CJ.js +1693 -0
- package/dist/chunk-SLTJRZ2N.js +266 -0
- package/dist/chunk-SRUS5XSU.js +4088 -0
- package/dist/chunk-TKCA3WZ5.js +5409 -0
- package/dist/chunk-TNRMXYI2.js +1650 -0
- package/dist/chunk-TQB3GJGM.js +9763 -0
- package/dist/chunk-TUFGXG6K.js +510 -0
- package/dist/chunk-U6KMTGQJ.js +632 -0
- package/dist/chunk-VMGJQST6.js +8681 -0
- package/dist/chunk-X4F4TCG4.js +5470 -0
- package/dist/chunk-ZIFROE75.js +1544 -0
- package/dist/chunk-ZIJQYHSQ.js +1204 -0
- package/dist/combat/index.cjs +4 -4
- package/dist/combat/index.d.cts +1 -1
- package/dist/combat/index.d.ts +1 -1
- package/dist/combat/index.js +1 -1
- package/dist/ecs/index.cjs +1 -1
- package/dist/ecs/index.js +1 -1
- package/dist/environment/index.cjs +14 -14
- package/dist/environment/index.d.cts +1 -1
- package/dist/environment/index.d.ts +1 -1
- package/dist/environment/index.js +1 -1
- package/dist/gpu/index.cjs +4810 -0
- package/dist/gpu/index.js +3714 -0
- package/dist/hologram/index.cjs +27 -1
- package/dist/hologram/index.js +1 -1
- package/dist/index-B2PIsAmR.d.cts +2180 -0
- package/dist/index-B2PIsAmR.d.ts +2180 -0
- package/dist/index-BHySEPX7.d.cts +2921 -0
- package/dist/index-BJV21zuy.d.cts +341 -0
- package/dist/index-BJV21zuy.d.ts +341 -0
- package/dist/index-BQutTphC.d.cts +790 -0
- package/dist/index-ByIq2XrS.d.cts +3910 -0
- package/dist/index-BysHjDSO.d.cts +224 -0
- package/dist/index-BysHjDSO.d.ts +224 -0
- package/dist/index-CKwAJGck.d.ts +455 -0
- package/dist/index-CUl3QstQ.d.cts +3006 -0
- package/dist/index-CUl3QstQ.d.ts +3006 -0
- package/dist/index-CmYtNiI-.d.cts +953 -0
- package/dist/index-CmYtNiI-.d.ts +953 -0
- package/dist/index-CnRzWxi_.d.cts +522 -0
- package/dist/index-CnRzWxi_.d.ts +522 -0
- package/dist/index-CwRWbSC7.d.ts +2921 -0
- package/dist/index-CxKIBstO.d.ts +790 -0
- package/dist/index-DJ6-R8vh.d.cts +455 -0
- package/dist/index-DQKisbcI.d.cts +4968 -0
- package/dist/index-DQKisbcI.d.ts +4968 -0
- package/dist/index-DRT2zJez.d.ts +3910 -0
- package/dist/index-DfNLiAka.d.cts +192 -0
- package/dist/index-DfNLiAka.d.ts +192 -0
- package/dist/index-nMvkoRm8.d.cts +405 -0
- package/dist/index-nMvkoRm8.d.ts +405 -0
- package/dist/index-s9yOFU37.d.cts +604 -0
- package/dist/index-s9yOFU37.d.ts +604 -0
- package/dist/index.cjs +22966 -6960
- package/dist/index.d.cts +864 -20
- package/dist/index.d.ts +864 -20
- package/dist/index.js +3062 -48
- package/dist/input/index.cjs +1 -1
- package/dist/input/index.js +1 -1
- package/dist/orbital/index.cjs +3 -3
- package/dist/orbital/index.d.cts +1 -1
- package/dist/orbital/index.d.ts +1 -1
- package/dist/orbital/index.js +1 -1
- package/dist/particles/index.cjs +16 -16
- package/dist/particles/index.d.cts +1 -1
- package/dist/particles/index.d.ts +1 -1
- package/dist/particles/index.js +1 -1
- package/dist/physics/index.cjs +2377 -21
- package/dist/physics/index.d.cts +1 -1
- package/dist/physics/index.d.ts +1 -1
- package/dist/physics/index.js +35 -1
- package/dist/postfx/index.cjs +3491 -0
- package/dist/postfx/index.js +93 -0
- package/dist/procedural/index.cjs +1 -1
- package/dist/procedural/index.js +1 -1
- package/dist/puppeteer-5VF6KDVO.js +52197 -0
- package/dist/puppeteer-IZVZ3SG4.js +52197 -0
- package/dist/rendering/index.cjs +33 -32
- package/dist/rendering/index.d.cts +1 -1
- package/dist/rendering/index.d.ts +1 -1
- package/dist/rendering/index.js +8 -6
- package/dist/runtime/index.cjs +23 -13
- package/dist/runtime/index.d.cts +1 -1
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.js +8 -6
- package/dist/runtime/protocols/index.cjs +349 -0
- package/dist/runtime/protocols/index.js +15 -0
- package/dist/scene/index.cjs +8 -8
- package/dist/scene/index.d.cts +1 -1
- package/dist/scene/index.d.ts +1 -1
- package/dist/scene/index.js +1 -1
- package/dist/shader/index.cjs +3087 -0
- package/dist/shader/index.js +3044 -0
- package/dist/simulation/index.cjs +10680 -0
- package/dist/simulation/index.d.cts +3 -0
- package/dist/simulation/index.d.ts +3 -0
- package/dist/simulation/index.js +307 -0
- package/dist/spatial/index.cjs +2443 -0
- package/dist/spatial/index.d.cts +1545 -0
- package/dist/spatial/index.d.ts +1545 -0
- package/dist/spatial/index.js +2400 -0
- package/dist/terrain/index.cjs +1 -1
- package/dist/terrain/index.d.cts +1 -1
- package/dist/terrain/index.d.ts +1 -1
- package/dist/terrain/index.js +1 -1
- package/dist/transformers.node-4NKAPD5U.js +45620 -0
- package/dist/vm/index.cjs +7 -8
- package/dist/vm/index.d.cts +1 -1
- package/dist/vm/index.d.ts +1 -1
- package/dist/vm/index.js +1 -1
- package/dist/vm-bridge/index.cjs +2 -2
- package/dist/vm-bridge/index.d.cts +2 -2
- package/dist/vm-bridge/index.d.ts +2 -2
- package/dist/vm-bridge/index.js +1 -1
- package/dist/vr/index.cjs +6 -6
- package/dist/vr/index.js +1 -1
- package/dist/world/index.cjs +3 -3
- package/dist/world/index.d.cts +1 -1
- package/dist/world/index.d.ts +1 -1
- package/dist/world/index.js +1 -1
- package/package.json +53 -21
- package/LICENSE +0 -21
package/dist/index.d.cts
CHANGED
|
@@ -1,35 +1,40 @@
|
|
|
1
1
|
import { E as EngineSystem } from './SpatialEngine-CXmE-U_d.cjs';
|
|
2
2
|
export { a as EngineConfig, b as EngineMetrics, c as EngineState, S as SpatialEngine } from './SpatialEngine-CXmE-U_d.cjs';
|
|
3
|
-
export { A as AABB, M as ADVANCED_PBR_PRESETS, a as AdvancedLight, L as AdvancedLightingLightType, b as AdvancedLightingManager, V as AdvancedLightingVec2, c as AdvancedLightingVec3, d as AdvancedPBRConfig, e as AdvancedPBRMaterial, f as AdvancedPBRVec3, g as AdvancedTexturingVec2, h as AdvancedTexturingVec3, i as AmbientConfig, j as AnimationFrameOptions, k as AnisotropyConfig, l as AreaLightConfig, m as AreaLightShape, n as AtlasPacker, o as AtlasRect, p as AttachmentFormat, B as BVH, q as BVHNode, r as BatchStats, s as BlendMode, t as BloomConfig, u as BloomEffect, C as CausticConfig, v as ChromaticAberrationConfig, w as ClearOp, x as ClearcoatConfig, y as CloudConfig, z as CloudRenderer, D as CloudSample, E as ColorGrading, F as ColorGradingConfig, G as CompiledShader, H as CullMode, I as DOFConfig, J as DecalBatcher, K as DecalDef, N as DecalInstance, O as DecalSystem, P as DetailMapConfig, Q as DisplacementConfig, R as DrawBatch, S as FogConfig, T as FogMode, U as FogSystem, W as FramebufferAttachment, X as GIConfig, Y as GIMode, Z as GIProbe, _ as GIProbeGrid, $ as GlobalIlluminationVec3, a0 as GraphStats, a1 as HitRecord, a2 as IBlendComponent, a3 as IBlendState, a4 as IBoundingBox, a5 as IBufferDescriptor, a6 as ICameraUniforms, a7 as IColorTargetState, a8 as IDepthStencilState, a9 as IDeviceCapabilities, aa as IDrawCall, ab as IESProfile, ac as IFrameStats, ad as IGPUTexture, ae as IIndexBuffer, af as IRenderMaterial, ag as IRenderMesh, ah as IRenderPassColorAttachment, ai as IRenderPassDepthStencilAttachment, aj as IRenderPassDescriptor, ak as IRenderPipelineDescriptor, al as IRendererStats, am as ISamplerDescriptor, an as ISceneUniforms, ao as IShaderModule, ap as ITextureDescriptor, aq as IUniformBuffer, ar as IVertexAttribute, as as IVertexBuffer, at as IVertexBufferLayout, au as IWebGPUContext, av as IWebGPUInitOptions, aw as IridescenceConfig, ax as Light, ay as LightCookie, az as LightType, aA as LightingModel, aB as MaterialDef, aC as MaterialInstance, aD as MaterialLibrary, aE as MaterialSystem, aF as MaterialSystemBlendMode, aG as MaterialSystemCullMode, aH as MaterialSystemMaterial, aI as MotionBlurConfig, aJ as NLMConfig, aK as PDFOptions, aL as POMConfig, aM as PP_PRESETS, aN as PassContext, aO as PathTracerScene, aP as PhysicsDebugDrawer, aQ as PixelBuffer, aR as PostProcess, aS as PostProcessEffect, aT as PostProcessProfile, aU as PostProcessStack, aV as PostProcessingStack, aW as PrerenderOptions, aX as ProbeInfo, aY as ProjectorConfig, aZ as ProjectorLight, a_ as PuppeteerRenderer, a$ as PuppeteerRendererOptions, b0 as RENDERING_MATERIAL_PRESETS, b1 as RGB, b2 as RTApi, b3 as RTFeature, b4 as Ray, b5 as RayTracer, b6 as RayTracingConfig, b7 as RayTracingVec3, b8 as RenderGraph, b9 as RenderPass, ba as RenderPassConfig, bb as RenderPassDescriptor, bc as RenderResult, bd as RenderTarget, be as Rendering, bf as RenderingMaterialType, bg as SH9, bh as SHADER_NODES, bi as SSAOConfig, bj as SSGIConfig, bk as SSRConfig, bl as SSSConfig, bm as SSSLayer, bn as SSSMaterial, bo as SSSModel, bp as SSSRGB, bq as SSS_PRESETS, br as STANDARD_FRAGMENT_SHADER, bs as STANDARD_VERTEX_SHADER, bt as ScreenshotOptions, bu as ShaderConnection, bv as ShaderDataType, bw as ShaderGraph, bx as ShaderNode, by as ShaderNodeDef, bz as ShaderPort, bA as ShaderPortRef, bB as ShaderUniform, bC as SheenConfig, bD as TAAConfig, bE as Texture2D, bF as TextureFormat, bG as TextureSlot, bH as ToneMapper, bI as TonemapOperator, bJ as Triangle, bK as UNLIT_FRAGMENT_SHADER, bL as UNLIT_VERTEX_SHADER, bM as UniformDef, bN as UniformType, bO as VolumetricLight, bP as VolumetricLightConfig, bQ as VolumetricSample, bR as WebGPURenderer, bS as aabbCentroid, bT as aabbSurfaceArea, bU as addSHSample, bV as anisotropicRoughness, bW as applyChromaticAberration, bX as applyDOF, bY as applyDetailAlbedo, bZ as applyFilmGrain, b_ as applyMotionBlur, b$ as applyVignette, c0 as blendDetailNormal, c1 as blendTAA, c2 as buildCircleCookie, c3 as buildSeparableSSSKernel, c4 as burleyProfile, c5 as burleyProfileRGB, c6 as christensenProfile, c7 as computeAABB, c8 as computeCoC, c9 as computeDiffuseAlbedo, ca as computeDisplacedPosition, cb as computeDisplacementNormalsFromHeightMap, cc as computeF0, cd as computePOM, ce as computeSSAO, cf as computeSSGI, cg as computeSSR, ch as computeTriangleNormal, ci as createAtlasPacker, cj as createDefaultMaterialDef, ck as createSH9, cl as createSolidTexture, cm as diskSolidAngle, cn as distributionGGX, co as distributionGGXAnisotropic, cp as evalSH9Irradiance, cq as evalSeparableKernel, cr as evaluateClearcoat, cs as evaluateIridescence, ct as evaluateSheen, cu as fresnelRoughness, cv as fresnelSchlick, cw as geometrySmith, cx as getAtlasEfficiency, cy as getRectUV, cz as haltonJitter, cA as hexToRGBA, cB as intersectRayAABB, cC as intersectRayTriangle, cD as lerpSH9, cE as nlmDenoise, cF as packRect, cG as parseIESProfile, cH as pathTrace, cI as prerenderHTML, cJ as rectSolidAngle, cK as renderPDF, cL as renderScreenshot, cM as rgbaToHex, cN as sampleCookie, cO as sampleIES, cP as sampleTexture, cQ as sampleTextureBilinear, cR as sampleTriplanar, cS as scaleSH9, cT as sheenDistribution, cU as sheenVisibility, cV as thinSlabTransmission, cW as triplanarWeights } from './index-
|
|
4
|
-
|
|
5
|
-
export { i as
|
|
6
|
-
export { i as
|
|
7
|
-
|
|
3
|
+
export { A as AABB, M as ADVANCED_PBR_PRESETS, a as AdvancedLight, L as AdvancedLightingLightType, b as AdvancedLightingManager, V as AdvancedLightingVec2, c as AdvancedLightingVec3, d as AdvancedPBRConfig, e as AdvancedPBRMaterial, f as AdvancedPBRVec3, g as AdvancedTexturingVec2, h as AdvancedTexturingVec3, i as AmbientConfig, j as AnimationFrameOptions, k as AnisotropyConfig, l as AreaLightConfig, m as AreaLightShape, n as AtlasPacker, o as AtlasRect, p as AttachmentFormat, B as BVH, q as BVHNode, r as BatchStats, s as BlendMode, t as BloomConfig, u as BloomEffect, C as CausticConfig, v as ChromaticAberrationConfig, w as ClearOp, x as ClearcoatConfig, y as CloudConfig, z as CloudRenderer, D as CloudSample, E as ColorGrading, F as ColorGradingConfig, G as CompiledShader, H as CullMode, I as DOFConfig, J as DecalBatcher, K as DecalDef, N as DecalInstance, O as DecalSystem, P as DetailMapConfig, Q as DisplacementConfig, R as DrawBatch, S as FogConfig, T as FogMode, U as FogSystem, W as FramebufferAttachment, X as GIConfig, Y as GIMode, Z as GIProbe, _ as GIProbeGrid, $ as GlobalIlluminationVec3, a0 as GraphStats, a1 as HitRecord, a2 as IBlendComponent, a3 as IBlendState, a4 as IBoundingBox, a5 as IBufferDescriptor, a6 as ICameraUniforms, a7 as IColorTargetState, a8 as IDepthStencilState, a9 as IDeviceCapabilities, aa as IDrawCall, ab as IESProfile, ac as IFrameStats, ad as IGPUTexture, ae as IIndexBuffer, af as IRenderMaterial, ag as IRenderMesh, ah as IRenderPassColorAttachment, ai as IRenderPassDepthStencilAttachment, aj as IRenderPassDescriptor, ak as IRenderPipelineDescriptor, al as IRendererStats, am as ISamplerDescriptor, an as ISceneUniforms, ao as IShaderModule, ap as ITextureDescriptor, aq as IUniformBuffer, ar as IVertexAttribute, as as IVertexBuffer, at as IVertexBufferLayout, au as IWebGPUContext, av as IWebGPUInitOptions, aw as IridescenceConfig, ax as Light, ay as LightCookie, az as LightType, aA as LightingModel, aB as MaterialDef, aC as MaterialInstance, aD as MaterialLibrary, aE as MaterialSystem, aF as MaterialSystemBlendMode, aG as MaterialSystemCullMode, aH as MaterialSystemMaterial, aI as MotionBlurConfig, aJ as NLMConfig, aK as PDFOptions, aL as POMConfig, aM as PP_PRESETS, aN as PassContext, aO as PathTracerScene, aP as PhysicsDebugDrawer, aQ as PixelBuffer, aR as PostProcess, aS as PostProcessEffect, aT as PostProcessProfile, aU as PostProcessStack, aV as PostProcessingStack, aW as PrerenderOptions, aX as ProbeInfo, aY as ProjectorConfig, aZ as ProjectorLight, a_ as PuppeteerRenderer, a$ as PuppeteerRendererOptions, b0 as RENDERING_MATERIAL_PRESETS, b1 as RGB, b2 as RTApi, b3 as RTFeature, b4 as Ray, b5 as RayTracer, b6 as RayTracingConfig, b7 as RayTracingVec3, b8 as RenderGraph, b9 as RenderPass, ba as RenderPassConfig, bb as RenderPassDescriptor, bc as RenderResult, bd as RenderTarget, be as Rendering, bf as RenderingMaterialType, bg as SH9, bh as SHADER_NODES, bi as SSAOConfig, bj as SSGIConfig, bk as SSRConfig, bl as SSSConfig, bm as SSSLayer, bn as SSSMaterial, bo as SSSModel, bp as SSSRGB, bq as SSS_PRESETS, br as STANDARD_FRAGMENT_SHADER, bs as STANDARD_VERTEX_SHADER, bt as ScreenshotOptions, bu as ShaderConnection, bv as ShaderDataType, bw as ShaderGraph, bx as ShaderNode, by as ShaderNodeDef, bz as ShaderPort, bA as ShaderPortRef, bB as ShaderUniform, bC as SheenConfig, bD as TAAConfig, bE as Texture2D, bF as TextureFormat, bG as TextureSlot, bH as ToneMapper, bI as TonemapOperator, bJ as Triangle, bK as UNLIT_FRAGMENT_SHADER, bL as UNLIT_VERTEX_SHADER, bM as UniformDef, bN as UniformType, bO as VolumetricLight, bP as VolumetricLightConfig, bQ as VolumetricSample, bR as WebGPURenderer, bS as aabbCentroid, bT as aabbSurfaceArea, bU as addSHSample, bV as anisotropicRoughness, bW as applyChromaticAberration, bX as applyDOF, bY as applyDetailAlbedo, bZ as applyFilmGrain, b_ as applyMotionBlur, b$ as applyVignette, c0 as blendDetailNormal, c1 as blendTAA, c2 as buildCircleCookie, c3 as buildSeparableSSSKernel, c4 as burleyProfile, c5 as burleyProfileRGB, c6 as christensenProfile, c7 as computeAABB, c8 as computeCoC, c9 as computeDiffuseAlbedo, ca as computeDisplacedPosition, cb as computeDisplacementNormalsFromHeightMap, cc as computeF0, cd as computePOM, ce as computeSSAO, cf as computeSSGI, cg as computeSSR, ch as computeTriangleNormal, ci as createAtlasPacker, cj as createDefaultMaterialDef, ck as createSH9, cl as createSolidTexture, cm as diskSolidAngle, cn as distributionGGX, co as distributionGGXAnisotropic, cp as evalSH9Irradiance, cq as evalSeparableKernel, cr as evaluateClearcoat, cs as evaluateIridescence, ct as evaluateSheen, cu as fresnelRoughness, cv as fresnelSchlick, cw as geometrySmith, cx as getAtlasEfficiency, cy as getRectUV, cz as haltonJitter, cA as hexToRGBA, cB as intersectRayAABB, cC as intersectRayTriangle, cD as lerpSH9, cE as nlmDenoise, cF as packRect, cG as parseIESProfile, cH as pathTrace, cI as prerenderHTML, cJ as rectSolidAngle, cK as renderPDF, cL as renderScreenshot, cM as rgbaToHex, cN as sampleCookie, cO as sampleIES, cP as sampleTexture, cQ as sampleTextureBilinear, cR as sampleTriplanar, cS as scaleSH9, cT as sheenDistribution, cU as sheenVisibility, cV as thinSlabTransmission, cW as triplanarWeights } from './index-ByIq2XrS.cjs';
|
|
4
|
+
import { A as AnimationEngine } from './index-CmYtNiI-.cjs';
|
|
5
|
+
export { i as Animation } from './index-CmYtNiI-.cjs';
|
|
6
|
+
export { i as Physics } from './index-BHySEPX7.cjs';
|
|
7
|
+
import { W as WasmMesher, S as SurfaceMesh, a as SurfaceMeshOptions, T as TetMesh } from './index-DQKisbcI.cjs';
|
|
8
|
+
export { i as Simulation } from './index-DQKisbcI.cjs';
|
|
9
|
+
export { i as Runtime } from './index-CUl3QstQ.cjs';
|
|
10
|
+
export { i as Audio } from './index-B2PIsAmR.cjs';
|
|
8
11
|
export { i as VR } from './index-BS3P_0Q8.cjs';
|
|
9
12
|
export { i as Input } from './index-CX2pFNZx.cjs';
|
|
10
|
-
export { i as Camera } from './index-
|
|
13
|
+
export { i as Camera } from './index-s9yOFU37.cjs';
|
|
11
14
|
export { i as Navigation } from './index-C2XVM6Fg.cjs';
|
|
12
|
-
export { i as Particles } from './index-
|
|
13
|
-
export { i as Terrain } from './index-
|
|
15
|
+
export { i as Particles } from './index-CnRzWxi_.cjs';
|
|
16
|
+
export { i as Terrain } from './index-BJV21zuy.cjs';
|
|
14
17
|
export { i as Tilemap } from './index-CXwgtszY.cjs';
|
|
15
18
|
export { i as Procedural } from './index-BfTyHDzB.cjs';
|
|
16
|
-
export { i as Combat } from './index-
|
|
19
|
+
export { i as Combat } from './index-nMvkoRm8.cjs';
|
|
17
20
|
export { i as Dialogue } from './index-riYekckF.cjs';
|
|
18
21
|
export { i as Gameplay } from './index-DALSrkL-.cjs';
|
|
19
22
|
export { i as Character } from './index-Du-wibkm.cjs';
|
|
20
23
|
export { i as ECS } from './index-BHAIZXxZ.cjs';
|
|
21
|
-
export { i as Scene } from './index-
|
|
22
|
-
export { i as Environment } from './index-
|
|
23
|
-
export { i as World } from './index-
|
|
24
|
-
export { i as Orbital } from './index-
|
|
24
|
+
export { i as Scene } from './index-DJ6-R8vh.cjs';
|
|
25
|
+
export { i as Environment } from './index-BQutTphC.cjs';
|
|
26
|
+
export { i as World } from './index-DfNLiAka.cjs';
|
|
27
|
+
export { i as Orbital } from './index-BysHjDSO.cjs';
|
|
25
28
|
export { i as Hologram } from './index-DsSFZOg9.cjs';
|
|
26
|
-
export { i as VM } from './index-
|
|
27
|
-
export { i as VMBridge } from './index-
|
|
28
|
-
import { AssetMaturity } from '@holoscript/core';
|
|
29
|
+
export { i as VM } from './index-B4dc1BWC.cjs';
|
|
30
|
+
export { i as VMBridge } from './index-BrCqHAgp.cjs';
|
|
31
|
+
import { AssetMaturity, INeuralSplatPacket, HSPlusRuntime, ReactiveState, StateDeclaration, VRHand, Vector3, HSPlusAST, HSPlusNode, HSPlusStatement, TraitEvent } from '@holoscript/core';
|
|
29
32
|
import './PhysicsTypes-Dw6_oXuD.cjs';
|
|
33
|
+
import '@holoscript/snn-webgpu';
|
|
34
|
+
import '@holoscript/crdt-spatial';
|
|
30
35
|
import 'three';
|
|
31
36
|
import './World-CgKA4O2J.cjs';
|
|
32
|
-
import './executor-
|
|
37
|
+
import './executor-C6ay5Awb.cjs';
|
|
33
38
|
import '@holoscript/uaal';
|
|
34
39
|
|
|
35
40
|
/**
|
|
@@ -95,6 +100,121 @@ declare class PhysicsStep implements EngineSystem {
|
|
|
95
100
|
destroy(): void;
|
|
96
101
|
}
|
|
97
102
|
|
|
103
|
+
/**
|
|
104
|
+
* WebGPU Context Management
|
|
105
|
+
*
|
|
106
|
+
* Handles WebGPU device initialization, feature detection, and fallback strategies.
|
|
107
|
+
*
|
|
108
|
+
* @module gpu/WebGPUContext
|
|
109
|
+
*/
|
|
110
|
+
interface WebGPUCapabilities {
|
|
111
|
+
supported: boolean;
|
|
112
|
+
adapter: GPUAdapter | null;
|
|
113
|
+
device: GPUDevice | null;
|
|
114
|
+
limits: GPUSupportedLimits | null;
|
|
115
|
+
features: Set<string>;
|
|
116
|
+
}
|
|
117
|
+
interface WebGPUContextOptions {
|
|
118
|
+
powerPreference?: 'low-power' | 'high-performance';
|
|
119
|
+
requiredFeatures?: GPUFeatureName[];
|
|
120
|
+
requiredLimits?: Record<string, number>;
|
|
121
|
+
fallbackToCPU?: boolean;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* WebGPU Context Manager
|
|
125
|
+
*
|
|
126
|
+
* Provides centralized WebGPU device initialization with feature detection
|
|
127
|
+
* and graceful fallback to CPU when WebGPU is unavailable.
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```typescript
|
|
131
|
+
* const context = new WebGPUContext({
|
|
132
|
+
* powerPreference: 'high-performance',
|
|
133
|
+
* fallbackToCPU: true,
|
|
134
|
+
* });
|
|
135
|
+
*
|
|
136
|
+
* await context.initialize();
|
|
137
|
+
*
|
|
138
|
+
* if (context.isSupported()) {
|
|
139
|
+
* // Use GPU acceleration
|
|
140
|
+
* const device = context.getDevice();
|
|
141
|
+
* // ... create compute pipelines
|
|
142
|
+
* } else {
|
|
143
|
+
* // Fallback to CPU physics
|
|
144
|
+
* console.warn('WebGPU not available, using CPU fallback');
|
|
145
|
+
* }
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
declare class WebGPUContext {
|
|
149
|
+
private adapter;
|
|
150
|
+
private device;
|
|
151
|
+
private limits;
|
|
152
|
+
private features;
|
|
153
|
+
private options;
|
|
154
|
+
private initialized;
|
|
155
|
+
constructor(options?: WebGPUContextOptions);
|
|
156
|
+
/**
|
|
157
|
+
* Initialize WebGPU context
|
|
158
|
+
*
|
|
159
|
+
* @returns Promise that resolves when initialization is complete
|
|
160
|
+
* @throws Error if WebGPU is not supported and fallbackToCPU is false
|
|
161
|
+
*/
|
|
162
|
+
initialize(): Promise<void>;
|
|
163
|
+
/**
|
|
164
|
+
* Check if WebGPU is supported and initialized
|
|
165
|
+
*/
|
|
166
|
+
isSupported(): boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Get WebGPU device
|
|
169
|
+
* @throws Error if device is not initialized
|
|
170
|
+
*/
|
|
171
|
+
getDevice(): GPUDevice;
|
|
172
|
+
/**
|
|
173
|
+
* Get WebGPU adapter
|
|
174
|
+
* @throws Error if adapter is not available
|
|
175
|
+
*/
|
|
176
|
+
getAdapter(): GPUAdapter;
|
|
177
|
+
/**
|
|
178
|
+
* Get device limits
|
|
179
|
+
*/
|
|
180
|
+
getLimits(): GPUSupportedLimits;
|
|
181
|
+
/**
|
|
182
|
+
* Get supported features
|
|
183
|
+
*/
|
|
184
|
+
getFeatures(): Set<string>;
|
|
185
|
+
/**
|
|
186
|
+
* Check if a specific feature is supported
|
|
187
|
+
*/
|
|
188
|
+
hasFeature(feature: string): boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Get capabilities object
|
|
191
|
+
*/
|
|
192
|
+
getCapabilities(): WebGPUCapabilities;
|
|
193
|
+
/**
|
|
194
|
+
* Get optimal workgroup size for compute shaders
|
|
195
|
+
*
|
|
196
|
+
* Returns a workgroup size that maximizes occupancy based on device limits.
|
|
197
|
+
* Common values: 64, 128, 256 (must be power of 2)
|
|
198
|
+
*/
|
|
199
|
+
getOptimalWorkgroupSize(): number;
|
|
200
|
+
/**
|
|
201
|
+
* Cleanup resources
|
|
202
|
+
*/
|
|
203
|
+
destroy(): void;
|
|
204
|
+
/**
|
|
205
|
+
* Handle unsupported browser/device
|
|
206
|
+
*/
|
|
207
|
+
private handleUnsupported;
|
|
208
|
+
/**
|
|
209
|
+
* Handle device lost event
|
|
210
|
+
*/
|
|
211
|
+
private handleDeviceLost;
|
|
212
|
+
/**
|
|
213
|
+
* Detect and log GPU information (for debugging)
|
|
214
|
+
*/
|
|
215
|
+
logGPUInfo(): Promise<void>;
|
|
216
|
+
}
|
|
217
|
+
|
|
98
218
|
/**
|
|
99
219
|
* @holoscript/core LOD Types
|
|
100
220
|
*
|
|
@@ -940,7 +1060,7 @@ declare class TransitionScheduler {
|
|
|
940
1060
|
/**
|
|
941
1061
|
* Record actual GPU cost for a transition (for budget tuning)
|
|
942
1062
|
*/
|
|
943
|
-
recordCost(entityId: string,
|
|
1063
|
+
recordCost(entityId: string, _actualCostMs: number): void;
|
|
944
1064
|
/**
|
|
945
1065
|
* Get budget utilization (0-1)
|
|
946
1066
|
*/
|
|
@@ -1198,7 +1318,7 @@ declare class LODPerformanceMetrics {
|
|
|
1198
1318
|
/**
|
|
1199
1319
|
* Start profiling a code section
|
|
1200
1320
|
*/
|
|
1201
|
-
startProfile(
|
|
1321
|
+
startProfile(_name: string): number;
|
|
1202
1322
|
/**
|
|
1203
1323
|
* End profiling and record result
|
|
1204
1324
|
*/
|
|
@@ -1574,4 +1694,728 @@ declare namespace index {
|
|
|
1574
1694
|
export { index_DEFAULT_GENERATION_OPTIONS as DEFAULT_GENERATION_OPTIONS, index_DEFAULT_LOD_CONFIG as DEFAULT_LOD_CONFIG, index_DEFAULT_LOD_LEVEL as DEFAULT_LOD_LEVEL, index_DEFAULT_MANAGER_OPTIONS as DEFAULT_MANAGER_OPTIONS, index_DEFAULT_MESHLET_OPTIONS as DEFAULT_MESHLET_OPTIONS, type index_GeneratedLODLevel as GeneratedLODLevel, index_LODBridge as LODBridge, type index_LODBridgeOptions as LODBridgeOptions, type index_LODChain as LODChain, type index_LODChainLevel as LODChainLevel, type index_LODConfig as LODConfig, type index_LODEvent as LODEvent, type index_LODEventHandler as LODEventHandler, type index_LODEventType as LODEventType, type index_LODFeature as LODFeature, type index_LODGenerationOptions as LODGenerationOptions, type index_LODGenerationResult as LODGenerationResult, index_LODGenerator as LODGenerator, type index_LODGroup as LODGroup, type index_LODHierarchy as LODHierarchy, type index_LODLevel as LODLevel, type index_LODLevelHistogram as LODLevelHistogram, index_LODManager as LODManager, type index_LODManagerOptions as LODManagerOptions, index_LODMemoryPool as LODMemoryPool, type index_LODMetrics as LODMetrics, index_LODPerformanceMetrics as LODPerformanceMetrics, type index_LODState as LODState, type index_LODStrategy as LODStrategy, index_LODTransition as LODTransition, type index_LODTransitionConfig as LODTransitionConfig, type index_MemoryPoolOptions as MemoryPoolOptions, type index_MeshData as MeshData, type index_MeshValidation as MeshValidation, type index_Meshlet as Meshlet, type index_MeshletGenerationResult as MeshletGenerationResult, index_MeshletGenerator as MeshletGenerator, type index_MeshletGeneratorOptions as MeshletGeneratorOptions, type index_PerformanceSnapshot as PerformanceSnapshot, type index_PoolStatistics as PoolStatistics, type index_PooledBuffer as PooledBuffer, type index_ProfilingData as ProfilingData, index_STANDARD_DISTANCES as STANDARD_DISTANCES, index_STANDARD_RATIOS as STANDARD_RATIOS, type index_ScheduledTransition as ScheduledTransition, type index_SimplificationAlgorithm as SimplificationAlgorithm, type index_TransitionBudget as TransitionBudget, type index_TransitionCostAnalysis as TransitionCostAnalysis, type index_TransitionMode as TransitionMode, index_TransitionScheduler as TransitionScheduler, type index_TransitionState as TransitionState, index_calculateOptimalDistances as calculateOptimalDistances, index_calculateScreenCoverage as calculateScreenCoverage, index_createLODGenerator as createLODGenerator, index_createLODGroup as createLODGroup, index_createLODLevel as createLODLevel, index_createLODManager as createLODManager, index_createLODMemoryPool as createLODMemoryPool, index_createLODMetrics as createLODMetrics, index_createLODPerformanceMetrics as createLODPerformanceMetrics, index_createLODState as createLODState, index_createMeshletGenerator as createMeshletGenerator, index_createMobileLODManager as createMobileLODManager, index_createMobileMemoryPool as createMobileMemoryPool, index_createStandardLODConfig as createStandardLODConfig, index_createTestCube as createTestCube, index_createTestSphere as createTestSphere, index_createVRLODManager as createVRLODManager, index_createVRMemoryPool as createVRMemoryPool, index_generateLODs as generateLODs, index_generateMeshlets as generateMeshlets, index_getRecommendedLODCount as getRecommendedLODCount, index_getTrianglesSaved as getTrianglesSaved, index_mergeLODConfigs as mergeLODConfigs, index_selectLODLevelByDistance as selectLODLevelByDistance, index_selectLODLevelByScreenCoverage as selectLODLevelByScreenCoverage, index_validateLODConfig as validateLODConfig };
|
|
1575
1695
|
}
|
|
1576
1696
|
|
|
1577
|
-
|
|
1697
|
+
/**
|
|
1698
|
+
* GaussianSplatSorter - Wait-Free Hierarchical Radix Sort for WebGPU Gaussian Splatting
|
|
1699
|
+
*
|
|
1700
|
+
* Orchestrates the full GPU sort pipeline for Gaussian splat rendering:
|
|
1701
|
+
* 1. Compress: raw splats -> RGBA8 colors, f16 covariance, depth keys
|
|
1702
|
+
* 2. Sort: 4-pass 8-bit radix sort using Blelloch scan (no global atomics)
|
|
1703
|
+
* 3. Render: sorted indices feed the splat renderer for correct back-to-front compositing
|
|
1704
|
+
*
|
|
1705
|
+
* Performance characteristics:
|
|
1706
|
+
* - O(n) radix sort (4 passes for 32-bit keys)
|
|
1707
|
+
* - Wait-free: no global atomics, no cross-workgroup synchronization
|
|
1708
|
+
* - 50% memory reduction via compression (32 bytes/splat vs 64 bytes)
|
|
1709
|
+
* - Cross-browser: Chrome, Safari, Firefox, mobile (no subgroup ops, no shader-f16)
|
|
1710
|
+
*
|
|
1711
|
+
* References:
|
|
1712
|
+
* - HoloScript W.035: Radix sort outperforms bitonic sort for N > 64K splats
|
|
1713
|
+
* - HoloScript G.030.01: Safari requires explicit bind group recreation after buffer swap
|
|
1714
|
+
*
|
|
1715
|
+
* @module gpu/GaussianSplatSorter
|
|
1716
|
+
* @version 1.0.0
|
|
1717
|
+
*/
|
|
1718
|
+
|
|
1719
|
+
interface GaussianSplatSorterOptions {
|
|
1720
|
+
/** Maximum number of splats (determines buffer allocation) */
|
|
1721
|
+
maxSplats: number;
|
|
1722
|
+
/** Workgroup size for compute shaders (default: 256, must be power of 2) */
|
|
1723
|
+
workgroupSize?: number;
|
|
1724
|
+
/** Elements processed per thread in sort passes (default: 4) */
|
|
1725
|
+
elementsPerThread?: number;
|
|
1726
|
+
/** Enable debug timing via timestamp queries (default: false) */
|
|
1727
|
+
enableTimestamps?: boolean;
|
|
1728
|
+
/** Canvas width for projection calculations */
|
|
1729
|
+
canvasWidth: number;
|
|
1730
|
+
/** Canvas height for projection calculations */
|
|
1731
|
+
canvasHeight: number;
|
|
1732
|
+
}
|
|
1733
|
+
interface SplatSortStats {
|
|
1734
|
+
/** Number of splats currently being sorted */
|
|
1735
|
+
splatCount: number;
|
|
1736
|
+
/** Number of workgroup blocks for sort */
|
|
1737
|
+
blockCount: number;
|
|
1738
|
+
/** GPU time for compression pass (ms, if timestamps enabled) */
|
|
1739
|
+
compressTimeMs?: number;
|
|
1740
|
+
/** GPU time for sort passes (ms, if timestamps enabled) */
|
|
1741
|
+
sortTimeMs?: number;
|
|
1742
|
+
/** GPU time for render (ms, if timestamps enabled) */
|
|
1743
|
+
renderTimeMs?: number;
|
|
1744
|
+
/** Total GPU time (ms) */
|
|
1745
|
+
totalTimeMs?: number;
|
|
1746
|
+
/** Memory usage in bytes */
|
|
1747
|
+
memoryUsageBytes: number;
|
|
1748
|
+
}
|
|
1749
|
+
interface CameraState {
|
|
1750
|
+
/** View matrix (column-major, 16 floats) */
|
|
1751
|
+
viewMatrix: Float32Array;
|
|
1752
|
+
/** Projection matrix (column-major, 16 floats) */
|
|
1753
|
+
projMatrix: Float32Array;
|
|
1754
|
+
/** View-projection matrix (column-major, 16 floats) */
|
|
1755
|
+
viewProjectionMatrix: Float32Array;
|
|
1756
|
+
/** Camera position in world space */
|
|
1757
|
+
cameraPosition: [number, number, number];
|
|
1758
|
+
/** Focal length X in pixels */
|
|
1759
|
+
focalX: number;
|
|
1760
|
+
/** Focal length Y in pixels */
|
|
1761
|
+
focalY: number;
|
|
1762
|
+
}
|
|
1763
|
+
declare class GaussianSplatSorter {
|
|
1764
|
+
private context;
|
|
1765
|
+
private device;
|
|
1766
|
+
private options;
|
|
1767
|
+
private sortShaderModule;
|
|
1768
|
+
private compressShaderModule;
|
|
1769
|
+
private renderShaderModule;
|
|
1770
|
+
private compressPipeline;
|
|
1771
|
+
private histogramPipeline;
|
|
1772
|
+
private blellochScanPipeline;
|
|
1773
|
+
private globalPrefixPipeline;
|
|
1774
|
+
private scatterPipeline;
|
|
1775
|
+
private renderPipeline;
|
|
1776
|
+
private rawSplatBuffer;
|
|
1777
|
+
private compressedSplatBuffer;
|
|
1778
|
+
private sortKeysA;
|
|
1779
|
+
private sortKeysB;
|
|
1780
|
+
private sortValuesA;
|
|
1781
|
+
private sortValuesB;
|
|
1782
|
+
private blockHistogramsBuffer;
|
|
1783
|
+
private globalPrefixesBuffer;
|
|
1784
|
+
private compressUniformBuffer;
|
|
1785
|
+
private sortUniformBuffer;
|
|
1786
|
+
private renderUniformBuffer;
|
|
1787
|
+
private compressBindGroup;
|
|
1788
|
+
private splatCount;
|
|
1789
|
+
private blockCount;
|
|
1790
|
+
private initialized;
|
|
1791
|
+
constructor(context: WebGPUContext, options: GaussianSplatSorterOptions);
|
|
1792
|
+
/**
|
|
1793
|
+
* Initialize all GPU resources: shaders, pipelines, buffers.
|
|
1794
|
+
*
|
|
1795
|
+
* Must be called before any sort or render operations.
|
|
1796
|
+
*/
|
|
1797
|
+
initialize(): Promise<void>;
|
|
1798
|
+
/**
|
|
1799
|
+
* Create and validate shader modules with cross-browser error reporting.
|
|
1800
|
+
*/
|
|
1801
|
+
private createShaderModules;
|
|
1802
|
+
/**
|
|
1803
|
+
* Create all compute pipelines for the sort.
|
|
1804
|
+
*/
|
|
1805
|
+
private createComputePipelines;
|
|
1806
|
+
/**
|
|
1807
|
+
* Create render pipeline for sorted splat rendering.
|
|
1808
|
+
*/
|
|
1809
|
+
private createRenderPipeline;
|
|
1810
|
+
/**
|
|
1811
|
+
* Allocate all GPU buffers.
|
|
1812
|
+
*/
|
|
1813
|
+
private createBuffers;
|
|
1814
|
+
private createSortBuffer;
|
|
1815
|
+
/**
|
|
1816
|
+
* Upload raw splat data to the GPU.
|
|
1817
|
+
*
|
|
1818
|
+
* Expected layout per splat (64 bytes):
|
|
1819
|
+
* position: vec3<f32> (12 bytes)
|
|
1820
|
+
* scale: vec3<f32> (12 bytes)
|
|
1821
|
+
* rotation: vec4<f32> (16 bytes) - quaternion (w, x, y, z)
|
|
1822
|
+
* color: vec4<f32> (16 bytes) - RGBA [0..1]
|
|
1823
|
+
* padding: (8 bytes)
|
|
1824
|
+
*
|
|
1825
|
+
* @param data Raw splat data as Float32Array
|
|
1826
|
+
* @param count Number of splats (not bytes)
|
|
1827
|
+
*/
|
|
1828
|
+
uploadSplatData(data: Float32Array, count: number): void;
|
|
1829
|
+
/**
|
|
1830
|
+
* Execute the full sort pipeline: compress -> 4-pass radix sort.
|
|
1831
|
+
*
|
|
1832
|
+
* Should be called each frame before rendering when the camera moves.
|
|
1833
|
+
* Uses a single command encoder for all passes to minimize CPU overhead.
|
|
1834
|
+
*
|
|
1835
|
+
* @param camera Current camera state for depth computation
|
|
1836
|
+
* @param commandEncoder Optional encoder to chain with other passes
|
|
1837
|
+
* @returns Command encoder with all sort passes recorded
|
|
1838
|
+
*/
|
|
1839
|
+
sort(camera: CameraState, commandEncoder?: GPUCommandEncoder): GPUCommandEncoder;
|
|
1840
|
+
/**
|
|
1841
|
+
* Record compression compute pass.
|
|
1842
|
+
*/
|
|
1843
|
+
private recordCompressPass;
|
|
1844
|
+
/**
|
|
1845
|
+
* Record one radix sort pass (histogram + scan + scatter).
|
|
1846
|
+
*/
|
|
1847
|
+
private recordSortPass;
|
|
1848
|
+
/**
|
|
1849
|
+
* Record render pass for sorted Gaussian splats.
|
|
1850
|
+
*
|
|
1851
|
+
* @param encoder Command encoder to record into
|
|
1852
|
+
* @param camera Camera state for rendering
|
|
1853
|
+
* @param colorView Color attachment view
|
|
1854
|
+
* @param depthView Depth attachment view
|
|
1855
|
+
* @param clearColor Optional clear color (default: transparent black)
|
|
1856
|
+
*/
|
|
1857
|
+
recordRenderPass(encoder: GPUCommandEncoder, camera: CameraState, colorView: GPUTextureView, depthView: GPUTextureView, clearColor?: GPUColor): void;
|
|
1858
|
+
/**
|
|
1859
|
+
* Execute full frame: sort + render in a single command submission.
|
|
1860
|
+
*
|
|
1861
|
+
* This is the main per-frame method for most use cases.
|
|
1862
|
+
*
|
|
1863
|
+
* @param camera Current camera state
|
|
1864
|
+
* @param colorView Color attachment view
|
|
1865
|
+
* @param depthView Depth attachment view
|
|
1866
|
+
* @param clearColor Optional clear color
|
|
1867
|
+
*/
|
|
1868
|
+
frame(camera: CameraState, colorView: GPUTextureView, depthView: GPUTextureView, clearColor?: GPUColor): void;
|
|
1869
|
+
/**
|
|
1870
|
+
* Get current sort statistics.
|
|
1871
|
+
*/
|
|
1872
|
+
getStats(): SplatSortStats;
|
|
1873
|
+
/**
|
|
1874
|
+
* Calculate total GPU memory usage in bytes.
|
|
1875
|
+
*/
|
|
1876
|
+
getMemoryUsage(): number;
|
|
1877
|
+
/**
|
|
1878
|
+
* Get the sorted index buffer (for external rendering integration).
|
|
1879
|
+
*
|
|
1880
|
+
* After sort(), the sorted indices are in sortValuesA (for even pass count).
|
|
1881
|
+
*/
|
|
1882
|
+
getSortedIndicesBuffer(): GPUBuffer;
|
|
1883
|
+
/**
|
|
1884
|
+
* Get the compressed splat buffer (for external rendering integration).
|
|
1885
|
+
*/
|
|
1886
|
+
getCompressedSplatBuffer(): GPUBuffer;
|
|
1887
|
+
/**
|
|
1888
|
+
* Update canvas dimensions (e.g., on resize).
|
|
1889
|
+
*/
|
|
1890
|
+
updateDimensions(width: number, height: number): void;
|
|
1891
|
+
/**
|
|
1892
|
+
* Destroy all GPU resources.
|
|
1893
|
+
*/
|
|
1894
|
+
destroy(): void;
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
interface ExtractorOptions {
|
|
1898
|
+
/** Maximum splats to extract */
|
|
1899
|
+
maxSplats: number;
|
|
1900
|
+
}
|
|
1901
|
+
/**
|
|
1902
|
+
* Extracts raw GPU sorted data from a GaussianSplatSorter.
|
|
1903
|
+
* Uses GPUBuffer.mapAsync to read back the `compressedSplatBuffer` and `sortValuesA` buffers
|
|
1904
|
+
* which contain the natively sorted WebGPU output.
|
|
1905
|
+
*
|
|
1906
|
+
* Mitigation for mapAsync stalls: We use double buffering to pipeline the readbacks.
|
|
1907
|
+
*/
|
|
1908
|
+
declare class GaussianSplatExtractor {
|
|
1909
|
+
private context;
|
|
1910
|
+
private device;
|
|
1911
|
+
private options;
|
|
1912
|
+
private readbackBuffersA;
|
|
1913
|
+
private readbackBuffersB;
|
|
1914
|
+
private isUsingA;
|
|
1915
|
+
private ongoingReadback;
|
|
1916
|
+
private frameCounter;
|
|
1917
|
+
constructor(context: WebGPUContext, options: ExtractorOptions);
|
|
1918
|
+
private initializeBuffers;
|
|
1919
|
+
private createReadbackBuffer;
|
|
1920
|
+
/**
|
|
1921
|
+
* Captures the sorted state of the GaussianSplatSorter.
|
|
1922
|
+
* Internally pipelines the GPU readback to avoid stalling the main render loop.
|
|
1923
|
+
*/
|
|
1924
|
+
extractFrame(sorter: GaussianSplatSorter, camera: CameraState, compressedSource: GPUBuffer, indicesSource: GPUBuffer): Promise<INeuralSplatPacket | null>;
|
|
1925
|
+
}
|
|
1926
|
+
|
|
1927
|
+
/**
|
|
1928
|
+
* TetGenWasmMesher — WASM-based tetrahedralization using TetGen.
|
|
1929
|
+
*
|
|
1930
|
+
* This mesher provides high-fidelity constrained Delaunay tetrahedralization
|
|
1931
|
+
* of arbitrary piecewise linear complexes (PLC).
|
|
1932
|
+
*/
|
|
1933
|
+
|
|
1934
|
+
declare class TetGenWasmMesher implements WasmMesher {
|
|
1935
|
+
private wasmModule;
|
|
1936
|
+
constructor();
|
|
1937
|
+
initialize(): Promise<void>;
|
|
1938
|
+
tetrahedralize(surface: SurfaceMesh, options?: SurfaceMeshOptions): Promise<TetMesh>;
|
|
1939
|
+
}
|
|
1940
|
+
|
|
1941
|
+
interface NetworkState<T> {
|
|
1942
|
+
sequenceNumber: number;
|
|
1943
|
+
state: T;
|
|
1944
|
+
}
|
|
1945
|
+
|
|
1946
|
+
/**
|
|
1947
|
+
* KeyboardSystem.ts
|
|
1948
|
+
*
|
|
1949
|
+
* Handles virtual keyboard interactions.
|
|
1950
|
+
* Listens for UI events and updates TextInput components.
|
|
1951
|
+
*/
|
|
1952
|
+
|
|
1953
|
+
/** Extended runtime interface for keyboard-specific methods */
|
|
1954
|
+
interface KeyboardRuntime extends HSPlusRuntime {
|
|
1955
|
+
findInstanceById(id: string): {
|
|
1956
|
+
node: {
|
|
1957
|
+
id: string;
|
|
1958
|
+
type: string;
|
|
1959
|
+
properties: Record<string, unknown>;
|
|
1960
|
+
};
|
|
1961
|
+
children?: Array<{
|
|
1962
|
+
node: {
|
|
1963
|
+
id: string;
|
|
1964
|
+
type: string;
|
|
1965
|
+
properties: Record<string, unknown>;
|
|
1966
|
+
};
|
|
1967
|
+
}>;
|
|
1968
|
+
} | null;
|
|
1969
|
+
updateNodeProperty(id: string, key: string, value: unknown): void;
|
|
1970
|
+
}
|
|
1971
|
+
declare class KeyboardSystem {
|
|
1972
|
+
private runtime;
|
|
1973
|
+
private focusedInputId;
|
|
1974
|
+
private cursorIndex;
|
|
1975
|
+
private static readonly CHAR_WIDTH;
|
|
1976
|
+
private static readonly START_X;
|
|
1977
|
+
constructor(runtime: KeyboardRuntime);
|
|
1978
|
+
private setupListeners;
|
|
1979
|
+
handleEvent(event: string, payload: any): void;
|
|
1980
|
+
private handleKeyPress;
|
|
1981
|
+
private insertAtCursor;
|
|
1982
|
+
private getText;
|
|
1983
|
+
private updateInputState;
|
|
1984
|
+
private setCursorVisible;
|
|
1985
|
+
private updateCursorVisuals;
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1988
|
+
declare class HandMenuSystem {
|
|
1989
|
+
private runtime;
|
|
1990
|
+
private menuNodeId;
|
|
1991
|
+
private menuNode;
|
|
1992
|
+
private isMenuVisible;
|
|
1993
|
+
private isTransitioning;
|
|
1994
|
+
private lastToggleTime;
|
|
1995
|
+
private transitions;
|
|
1996
|
+
constructor(runtime: HSPlusRuntime, engine?: AnimationEngine);
|
|
1997
|
+
update(delta: number): void;
|
|
1998
|
+
private checkPalmFacingUser;
|
|
1999
|
+
private showMenu;
|
|
2000
|
+
private hideMenu;
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
/**
|
|
2004
|
+
* HoloScript+ Runtime Engine
|
|
2005
|
+
*
|
|
2006
|
+
* Executes parsed HoloScript+ AST with:
|
|
2007
|
+
* - Control flow (@for, @if) evaluation
|
|
2008
|
+
* - Lifecycle hook management
|
|
2009
|
+
* - VR trait integration
|
|
2010
|
+
* - Reactive state binding
|
|
2011
|
+
* - TypeScript companion integration
|
|
2012
|
+
*
|
|
2013
|
+
* @version 1.0.0
|
|
2014
|
+
*/
|
|
2015
|
+
|
|
2016
|
+
type LifecycleHandler = (...args: unknown[]) => void;
|
|
2017
|
+
interface NodeInstance {
|
|
2018
|
+
__holo_id: string;
|
|
2019
|
+
node: HSPlusNode;
|
|
2020
|
+
properties: Record<string, unknown>;
|
|
2021
|
+
renderedNode: unknown;
|
|
2022
|
+
lifecycleHandlers: Map<string, LifecycleHandler[]>;
|
|
2023
|
+
children: NodeInstance[];
|
|
2024
|
+
parent: NodeInstance | null;
|
|
2025
|
+
destroyed: boolean;
|
|
2026
|
+
templateName?: string;
|
|
2027
|
+
templateVersion?: number;
|
|
2028
|
+
dirty: boolean;
|
|
2029
|
+
hasTraits: boolean;
|
|
2030
|
+
}
|
|
2031
|
+
interface RuntimeOptions {
|
|
2032
|
+
renderer?: Renderer;
|
|
2033
|
+
vrEnabled?: boolean;
|
|
2034
|
+
companions?: Record<string, Record<string, (...args: unknown[]) => unknown>>;
|
|
2035
|
+
manifestUrl?: string;
|
|
2036
|
+
baseUrl?: string;
|
|
2037
|
+
webXrManagerClass?: unknown;
|
|
2038
|
+
}
|
|
2039
|
+
interface Renderer {
|
|
2040
|
+
createElement(type: string, properties: Record<string, unknown>): unknown;
|
|
2041
|
+
updateElement(element: unknown, properties: Record<string, unknown>): void;
|
|
2042
|
+
appendChild(parent: unknown, child: unknown): void;
|
|
2043
|
+
removeChild(parent: unknown, child: unknown): void;
|
|
2044
|
+
destroy(element: unknown): void;
|
|
2045
|
+
setXRSession?(session: XRSession | null, glBinding: unknown | null, projectionLayer: unknown | null): void;
|
|
2046
|
+
}
|
|
2047
|
+
/** Extended renderer interface for WebXR-capable renderers (e.g. WebGPURenderer). */
|
|
2048
|
+
declare class HoloScriptPlusRuntimeImpl implements HSPlusRuntime {
|
|
2049
|
+
private ast;
|
|
2050
|
+
private options;
|
|
2051
|
+
state: ReactiveState<StateDeclaration>;
|
|
2052
|
+
private evaluator;
|
|
2053
|
+
private builtins;
|
|
2054
|
+
private traitRegistry;
|
|
2055
|
+
private rootInstance;
|
|
2056
|
+
private eventHandlers;
|
|
2057
|
+
private templates;
|
|
2058
|
+
private updateLoopId;
|
|
2059
|
+
private lastUpdateTime;
|
|
2060
|
+
private companions;
|
|
2061
|
+
private networkSync;
|
|
2062
|
+
private mounted;
|
|
2063
|
+
private scaleMultiplier;
|
|
2064
|
+
private chunkLoader;
|
|
2065
|
+
private hotReloader;
|
|
2066
|
+
private networkPredictor;
|
|
2067
|
+
private movementPredictor;
|
|
2068
|
+
private _flatEntities;
|
|
2069
|
+
private _copilot;
|
|
2070
|
+
/**
|
|
2071
|
+
* Set the AI Copilot for generate directive processing.
|
|
2072
|
+
*/
|
|
2073
|
+
setCopilot(copilot: {
|
|
2074
|
+
isReady(): boolean;
|
|
2075
|
+
generateFromPrompt(prompt: string, options: Record<string, unknown>): Promise<unknown>;
|
|
2076
|
+
}): void;
|
|
2077
|
+
vrContext: {
|
|
2078
|
+
hands: {
|
|
2079
|
+
left: VRHand | null;
|
|
2080
|
+
right: VRHand | null;
|
|
2081
|
+
};
|
|
2082
|
+
headset: {
|
|
2083
|
+
position: Vector3;
|
|
2084
|
+
rotation: Vector3;
|
|
2085
|
+
};
|
|
2086
|
+
controllers: {
|
|
2087
|
+
left: unknown;
|
|
2088
|
+
right: unknown;
|
|
2089
|
+
};
|
|
2090
|
+
};
|
|
2091
|
+
private webXrManager;
|
|
2092
|
+
private isXRSessionActive;
|
|
2093
|
+
private physicsWorld;
|
|
2094
|
+
private vrPhysicsBridge;
|
|
2095
|
+
private debugDrawer;
|
|
2096
|
+
keyboardSystem: KeyboardSystem;
|
|
2097
|
+
handMenuSystem: HandMenuSystem;
|
|
2098
|
+
constructor(ast: HSPlusAST, options?: RuntimeOptions);
|
|
2099
|
+
enterVR(): Promise<void>;
|
|
2100
|
+
/**
|
|
2101
|
+
* Main XR Loop - called by WebXRManager
|
|
2102
|
+
*/
|
|
2103
|
+
private xrLoop;
|
|
2104
|
+
exitVR(): Promise<void>;
|
|
2105
|
+
/**
|
|
2106
|
+
* Convert Quaternion to Euler Angles (YXZ sequence)
|
|
2107
|
+
*/
|
|
2108
|
+
private quaternionToEuler;
|
|
2109
|
+
private updateVRInput;
|
|
2110
|
+
private initializeState;
|
|
2111
|
+
private loadImports;
|
|
2112
|
+
mount(container: unknown): void;
|
|
2113
|
+
unmount(): void;
|
|
2114
|
+
/**
|
|
2115
|
+
* Scans the AST for all template definitions, including nested ones.
|
|
2116
|
+
*/
|
|
2117
|
+
private findAllTemplates;
|
|
2118
|
+
/**
|
|
2119
|
+
* Dynamically mount a new object into the scene (e.g. from a lazy-loaded chunk)
|
|
2120
|
+
*/
|
|
2121
|
+
mountObject(node: HSPlusNode, parent?: NodeInstance | null): NodeInstance;
|
|
2122
|
+
unmountObject(idOrInstance: string | NodeInstance): void;
|
|
2123
|
+
private _holoIdCounter;
|
|
2124
|
+
private generateHoloId;
|
|
2125
|
+
private instantiateNode;
|
|
2126
|
+
getNode(id: string): HSPlusNode | undefined;
|
|
2127
|
+
private processDirectives;
|
|
2128
|
+
private registerLifecycleHandler;
|
|
2129
|
+
private processControlFlow;
|
|
2130
|
+
private cloneNodeWithContext;
|
|
2131
|
+
private interpolateString;
|
|
2132
|
+
private interpolateProperties;
|
|
2133
|
+
private evaluateExpression;
|
|
2134
|
+
private evaluateProperties;
|
|
2135
|
+
/**
|
|
2136
|
+
* Expands spread expressions in a properties object.
|
|
2137
|
+
* Spread keys are formatted as __spread_N with value { type: 'spread', argument: ... }
|
|
2138
|
+
*/
|
|
2139
|
+
private expandPropertySpreads;
|
|
2140
|
+
/**
|
|
2141
|
+
* Expands spread expressions within an array.
|
|
2142
|
+
*/
|
|
2143
|
+
private expandArraySpreads;
|
|
2144
|
+
/**
|
|
2145
|
+
* Resolves a spread argument to its runtime value.
|
|
2146
|
+
*/
|
|
2147
|
+
private resolveSpreadArgument;
|
|
2148
|
+
private callLifecycle;
|
|
2149
|
+
private startUpdateLoop;
|
|
2150
|
+
private stopUpdateLoop;
|
|
2151
|
+
update(delta: number): void;
|
|
2152
|
+
/**
|
|
2153
|
+
* Authoritative server sync for networked state.
|
|
2154
|
+
*/
|
|
2155
|
+
onNetworkStateUpdate(serverState: NetworkState<Record<string, unknown>>): void;
|
|
2156
|
+
private updateInstance;
|
|
2157
|
+
private syncAvatarParts;
|
|
2158
|
+
private generatedNodes;
|
|
2159
|
+
private processGenerateDirectives;
|
|
2160
|
+
private apiPollingTimers;
|
|
2161
|
+
private updateExternalApis;
|
|
2162
|
+
private executeExternalApi;
|
|
2163
|
+
private parseDurationToMs;
|
|
2164
|
+
private createTraitContext;
|
|
2165
|
+
private destroyInstance;
|
|
2166
|
+
togglePhysicsDebug(enabled: boolean): void;
|
|
2167
|
+
updateData(data: unknown): void;
|
|
2168
|
+
updateNodeProperty(nodeId: string, property: string, value: unknown): void;
|
|
2169
|
+
getState(): Record<string, unknown>;
|
|
2170
|
+
getVariable(name: string): unknown;
|
|
2171
|
+
setVariable(name: string, value: unknown): void;
|
|
2172
|
+
getContext(): Record<string, unknown>;
|
|
2173
|
+
reset(): void;
|
|
2174
|
+
updateAnimations(): void;
|
|
2175
|
+
updateParticles(delta: number): void;
|
|
2176
|
+
getHologramStates(): Map<string, Record<string, unknown>>;
|
|
2177
|
+
setState(updates: Partial<StateDeclaration>): void;
|
|
2178
|
+
emit(event: string, payload?: unknown): void;
|
|
2179
|
+
updateEntity(id: string, properties: Partial<Record<string, unknown>>): boolean;
|
|
2180
|
+
on(event: string, handler: (payload: unknown) => void): () => void;
|
|
2181
|
+
hotReload(newAst: HSPlusAST): Promise<void>;
|
|
2182
|
+
/**
|
|
2183
|
+
* Creates a Map proxy that reflects the reactive state.
|
|
2184
|
+
* This allowed the HotReloader (designed for Map-based state) to work with
|
|
2185
|
+
* the runtime's Record-based reactive state.
|
|
2186
|
+
*/
|
|
2187
|
+
private createStateMapProxy;
|
|
2188
|
+
findInstanceById(id: string, root?: NodeInstance | null): NodeInstance | null;
|
|
2189
|
+
/**
|
|
2190
|
+
* Executes a block of HoloScript+ statements
|
|
2191
|
+
*/
|
|
2192
|
+
executeStatementBlock(instance: NodeInstance, body: HSPlusStatement[]): Promise<void>;
|
|
2193
|
+
/**
|
|
2194
|
+
* Executes a single HoloScript+ statement
|
|
2195
|
+
*/
|
|
2196
|
+
executeStatement(instance: NodeInstance, stmt: HSPlusStatement): Promise<void>;
|
|
2197
|
+
private migrateInstancesOfTemplate;
|
|
2198
|
+
private findAllInstancesOfTemplate;
|
|
2199
|
+
private migrateInstance;
|
|
2200
|
+
private executeMigrationCode;
|
|
2201
|
+
updateVRContext(context: typeof this.vrContext): void;
|
|
2202
|
+
handleVREvent(event: TraitEvent, node: HSPlusNode): void;
|
|
2203
|
+
private findInstance;
|
|
2204
|
+
registerTemplate(name: string, node: HSPlusNode): void;
|
|
2205
|
+
spawnTemplate(name: string, position: Vector3): HSPlusNode;
|
|
2206
|
+
destroyNode(node: HSPlusNode): void;
|
|
2207
|
+
}
|
|
2208
|
+
/**
|
|
2209
|
+
* Create a new HoloScript+ runtime instance
|
|
2210
|
+
*/
|
|
2211
|
+
declare function createRuntime(ast: HSPlusAST, options?: RuntimeOptions): HSPlusRuntime;
|
|
2212
|
+
|
|
2213
|
+
/**
|
|
2214
|
+
* InstancedRenderer.ts
|
|
2215
|
+
*
|
|
2216
|
+
* GPU instanced rendering system for massive object counts.
|
|
2217
|
+
* Allows rendering 10,000+ similar objects with minimal draw calls.
|
|
2218
|
+
*
|
|
2219
|
+
* Features:
|
|
2220
|
+
* - Automatic batching by geometry type and material
|
|
2221
|
+
* - GPU instancing (1 draw call per batch vs 1 per object)
|
|
2222
|
+
* - Dynamic instance management (add/remove/update)
|
|
2223
|
+
* - Transform matrix updates (position, rotation, scale)
|
|
2224
|
+
* - Material variation support
|
|
2225
|
+
* - Performance monitoring
|
|
2226
|
+
*/
|
|
2227
|
+
interface InstancedObject {
|
|
2228
|
+
/** Unique instance ID */
|
|
2229
|
+
id: string;
|
|
2230
|
+
/** Batch key (geometry + material) */
|
|
2231
|
+
batchKey: string;
|
|
2232
|
+
/** Instance index in batch */
|
|
2233
|
+
instanceIndex: number;
|
|
2234
|
+
/** Transform matrix (16 floats) */
|
|
2235
|
+
matrix: Float32Array;
|
|
2236
|
+
/** Material color override */
|
|
2237
|
+
color?: [number, number, number];
|
|
2238
|
+
/** Visibility flag */
|
|
2239
|
+
visible: boolean;
|
|
2240
|
+
}
|
|
2241
|
+
interface InstanceBatch {
|
|
2242
|
+
/** Batch identifier */
|
|
2243
|
+
key: string;
|
|
2244
|
+
/** Geometry type */
|
|
2245
|
+
geometryType: string;
|
|
2246
|
+
/** Material type */
|
|
2247
|
+
materialType: string;
|
|
2248
|
+
/** Three.js InstancedMesh */
|
|
2249
|
+
instancedMesh: any;
|
|
2250
|
+
/** Maximum instances */
|
|
2251
|
+
maxInstances: number;
|
|
2252
|
+
/** Current instance count */
|
|
2253
|
+
count: number;
|
|
2254
|
+
/** Instance ID → Index mapping */
|
|
2255
|
+
instanceMap: Map<string, number>;
|
|
2256
|
+
/** Free instance indices (for reuse) */
|
|
2257
|
+
freeIndices: number[];
|
|
2258
|
+
/** Needs matrix update */
|
|
2259
|
+
needsUpdate: boolean;
|
|
2260
|
+
}
|
|
2261
|
+
interface InstancedRenderingStats {
|
|
2262
|
+
/** Total batches */
|
|
2263
|
+
batchCount: number;
|
|
2264
|
+
/** Total instances across all batches */
|
|
2265
|
+
totalInstances: number;
|
|
2266
|
+
/** Draw calls (one per batch) */
|
|
2267
|
+
drawCalls: number;
|
|
2268
|
+
/** Memory usage (approximate, MB) */
|
|
2269
|
+
memoryUsage: number;
|
|
2270
|
+
/** Performance improvement vs non-instanced */
|
|
2271
|
+
improvement: string;
|
|
2272
|
+
}
|
|
2273
|
+
/**
|
|
2274
|
+
* Instanced Rendering Manager
|
|
2275
|
+
* Automatically batches similar objects for GPU instancing
|
|
2276
|
+
*/
|
|
2277
|
+
declare class InstancedRenderer {
|
|
2278
|
+
private batches;
|
|
2279
|
+
private objects;
|
|
2280
|
+
private scene;
|
|
2281
|
+
private maxInstancesPerBatch;
|
|
2282
|
+
private enabled;
|
|
2283
|
+
constructor(scene: any, maxInstancesPerBatch?: number);
|
|
2284
|
+
/**
|
|
2285
|
+
* Add object to instanced rendering
|
|
2286
|
+
*/
|
|
2287
|
+
addInstance(id: string, geometryType: string, materialType: string, position: [number, number, number], rotation?: [number, number, number], scale?: [number, number, number], color?: [number, number, number]): boolean;
|
|
2288
|
+
/**
|
|
2289
|
+
* Remove instance from rendering
|
|
2290
|
+
*/
|
|
2291
|
+
removeInstance(id: string): boolean;
|
|
2292
|
+
/**
|
|
2293
|
+
* Update instance transform
|
|
2294
|
+
*/
|
|
2295
|
+
updateInstance(id: string, position?: [number, number, number], rotation?: [number, number, number], scale?: [number, number, number]): boolean;
|
|
2296
|
+
/**
|
|
2297
|
+
* Update instance color
|
|
2298
|
+
*/
|
|
2299
|
+
updateInstanceColor(id: string, color: [number, number, number]): boolean;
|
|
2300
|
+
/**
|
|
2301
|
+
* Update all batches (call once per frame)
|
|
2302
|
+
*/
|
|
2303
|
+
update(): void;
|
|
2304
|
+
/**
|
|
2305
|
+
* Create a new batch
|
|
2306
|
+
*/
|
|
2307
|
+
private createBatch;
|
|
2308
|
+
/**
|
|
2309
|
+
* Create geometry by type
|
|
2310
|
+
*/
|
|
2311
|
+
private createGeometry;
|
|
2312
|
+
/**
|
|
2313
|
+
* Create material by type
|
|
2314
|
+
*/
|
|
2315
|
+
private createMaterial;
|
|
2316
|
+
/**
|
|
2317
|
+
* Create transform matrix from position, rotation, scale
|
|
2318
|
+
*/
|
|
2319
|
+
private createTransformMatrix;
|
|
2320
|
+
/**
|
|
2321
|
+
* Convert Float32Array to THREE.Matrix4
|
|
2322
|
+
*/
|
|
2323
|
+
private arrayToMatrix4;
|
|
2324
|
+
/**
|
|
2325
|
+
* Extract transform from matrix
|
|
2326
|
+
*/
|
|
2327
|
+
private matrixToTransform;
|
|
2328
|
+
/**
|
|
2329
|
+
* Get statistics
|
|
2330
|
+
*/
|
|
2331
|
+
getStatistics(): InstancedRenderingStats;
|
|
2332
|
+
/**
|
|
2333
|
+
* Enable/disable instanced rendering
|
|
2334
|
+
*/
|
|
2335
|
+
setEnabled(enabled: boolean): void;
|
|
2336
|
+
/**
|
|
2337
|
+
* Clear all batches
|
|
2338
|
+
*/
|
|
2339
|
+
clear(): void;
|
|
2340
|
+
/**
|
|
2341
|
+
* Get batch for inspection
|
|
2342
|
+
*/
|
|
2343
|
+
getBatch(key: string): InstanceBatch | undefined;
|
|
2344
|
+
/**
|
|
2345
|
+
* Get all batch keys
|
|
2346
|
+
*/
|
|
2347
|
+
getBatchKeys(): string[];
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2350
|
+
/**
|
|
2351
|
+
* @holoscript/core Asset Streamer Interface
|
|
2352
|
+
*
|
|
2353
|
+
* Defines the @builtin runtime interface for predictive asset streaming.
|
|
2354
|
+
* Runtimes implement this to manage low-priority background loading and decompression.
|
|
2355
|
+
*/
|
|
2356
|
+
/**
|
|
2357
|
+
* Asset streaming priority
|
|
2358
|
+
*/
|
|
2359
|
+
declare enum StreamPriority {
|
|
2360
|
+
IMMEDIATE = 0,
|
|
2361
|
+
PREDICTIVE_HIGH = 1,
|
|
2362
|
+
PREDICTIVE_LOW = 2,
|
|
2363
|
+
BACKGROUND = 3
|
|
2364
|
+
}
|
|
2365
|
+
/**
|
|
2366
|
+
* Asset metadata for streaming
|
|
2367
|
+
*/
|
|
2368
|
+
interface AssetStreamRequest {
|
|
2369
|
+
id: string;
|
|
2370
|
+
url: string;
|
|
2371
|
+
type: 'mesh' | 'texture' | 'audio' | 'script';
|
|
2372
|
+
priority: StreamPriority;
|
|
2373
|
+
size?: number;
|
|
2374
|
+
compression?: 'draco' | 'meshopt' | 'none';
|
|
2375
|
+
}
|
|
2376
|
+
/**
|
|
2377
|
+
* Streaming status
|
|
2378
|
+
*/
|
|
2379
|
+
interface StreamStatus {
|
|
2380
|
+
id: string;
|
|
2381
|
+
progress: number;
|
|
2382
|
+
state: 'queued' | 'loading' | 'decompressing' | 'ready' | 'error';
|
|
2383
|
+
error?: string;
|
|
2384
|
+
}
|
|
2385
|
+
/**
|
|
2386
|
+
* AssetStreamer @builtin Interface
|
|
2387
|
+
*/
|
|
2388
|
+
interface AssetStreamer {
|
|
2389
|
+
/** Initialize the streamer with config */
|
|
2390
|
+
initialize(config: {
|
|
2391
|
+
workerPoolSize?: number;
|
|
2392
|
+
memoryLimitMB?: number;
|
|
2393
|
+
}): Promise<void>;
|
|
2394
|
+
/**
|
|
2395
|
+
* Request an asset to be streamed.
|
|
2396
|
+
* If priority is PREDICTIVE, it will be loaded in the background.
|
|
2397
|
+
*/
|
|
2398
|
+
requestAsset(request: AssetStreamRequest): void;
|
|
2399
|
+
/** Cancel a pending stream request */
|
|
2400
|
+
cancelRequest(id: string): void;
|
|
2401
|
+
/** Get the status of a specific asset stream */
|
|
2402
|
+
getStatus(id: string): StreamStatus | undefined;
|
|
2403
|
+
/** Purge old or distant assets from memory */
|
|
2404
|
+
purgeAssets(distanceThreshold: number, currentPlayerPos: [number, number, number]): void;
|
|
2405
|
+
/** Dispose resources */
|
|
2406
|
+
dispose(): void;
|
|
2407
|
+
}
|
|
2408
|
+
/**
|
|
2409
|
+
* Global registry for builtin AssetStreamers
|
|
2410
|
+
*/
|
|
2411
|
+
declare const assetStreamerRegistry: Map<string, AssetStreamer>;
|
|
2412
|
+
/**
|
|
2413
|
+
* Register an asset streamer implementation
|
|
2414
|
+
*/
|
|
2415
|
+
declare function registerAssetStreamer(name: string, streamer: AssetStreamer): void;
|
|
2416
|
+
/**
|
|
2417
|
+
* Get a registered asset streamer
|
|
2418
|
+
*/
|
|
2419
|
+
declare function getAssetStreamer(name: string): AssetStreamer | undefined;
|
|
2420
|
+
|
|
2421
|
+
export { type AssetStreamRequest, type AssetStreamer, type CollisionCallback, type CollisionEvent, DEFAULT_GENERATION_OPTIONS, DEFAULT_LOD_CONFIG, DEFAULT_LOD_LEVEL, DEFAULT_MANAGER_OPTIONS, DEFAULT_MESHLET_OPTIONS, EngineSystem, type ExtractorOptions, GaussianSplatExtractor, type GeneratedLODLevel, HoloScriptPlusRuntimeImpl, type InstanceBatch, type InstancedObject, InstancedRenderer, type InstancedRenderingStats, index as LOD, LODBridge, type LODBridgeOptions, type LODChain, type LODChainLevel, type LODConfig, type LODEvent, type LODEventHandler, type LODEventType, type LODFeature, type LODGenerationOptions, type LODGenerationResult, LODGenerator, type LODGroup, type LODHierarchy, type LODLevel, type LODLevelHistogram, LODManager, type LODManagerOptions, LODMemoryPool, type LODMetrics, LODPerformanceMetrics, type LODState, type LODStrategy, LODTransition, type LODTransitionConfig, type MemoryPoolOptions, type MeshData, type MeshValidation, type Meshlet, type MeshletGenerationResult, MeshletGenerator, type MeshletGeneratorOptions, type NodeInstance, type PerformanceSnapshot, type PhysicsBodyState, PhysicsStep, type PoolStatistics, type PooledBuffer, type ProfilingData, type Renderer, type RuntimeOptions, STANDARD_DISTANCES, STANDARD_RATIOS, type ScheduledTransition, type SimplificationAlgorithm, StreamPriority, type StreamStatus, TetGenWasmMesher, type TransitionBudget, type TransitionCostAnalysis, type TransitionMode, TransitionScheduler, type TransitionState, type Vec3, assetStreamerRegistry, calculateOptimalDistances, calculateScreenCoverage, createLODGenerator, createLODGroup, createLODLevel, createLODManager, createLODMemoryPool, createLODMetrics, createLODPerformanceMetrics, createLODState, createMeshletGenerator, createMobileLODManager, createMobileMemoryPool, createRuntime, createStandardLODConfig, createTestCube, createTestSphere, createVRLODManager, createVRMemoryPool, generateLODs, generateMeshlets, getAssetStreamer, getRecommendedLODCount, getTrianglesSaved, mergeLODConfigs, registerAssetStreamer, selectLODLevelByDistance, selectLODLevelByScreenCoverage, validateLODConfig };
|