@roomle/web-sdk 3.8.0 → 3.9.0-alpha.2

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.
Files changed (109) hide show
  1. package/lib/ConfiguratorKernel.wasm +0 -0
  2. package/lib/{GLTFExporter-BqjC9LhS.mjs → GLTFExporter-yfYOtLdk.mjs} +2 -2
  3. package/lib/{GLTFExporter-BqjC9LhS.mjs.map → GLTFExporter-yfYOtLdk.mjs.map} +1 -1
  4. package/lib/RoomleCore.js +3 -3
  5. package/lib/RoomleCore.wasm +0 -0
  6. package/lib/RoomleToolsCore.wasm +0 -0
  7. package/lib/{USDZExporter-qUD2VgwK.mjs → USDZExporter-DFJQYX8l.mjs} +2 -2
  8. package/lib/{USDZExporter-qUD2VgwK.mjs.map → USDZExporter-DFJQYX8l.mjs.map} +1 -1
  9. package/lib/{api-CbHAzwVm.mjs → api-s0Yey2rD.mjs} +12 -12
  10. package/lib/api-s0Yey2rD.mjs.map +1 -0
  11. package/lib/asset-loader.worker-A7nEeQB4.mjs.map +1 -1
  12. package/lib/{banana-for-scale-DiBCpVNM.mjs → banana-for-scale-CFY_5rk1.mjs} +4 -4
  13. package/lib/{banana-for-scale-DiBCpVNM.mjs.map → banana-for-scale-CFY_5rk1.mjs.map} +1 -1
  14. package/lib/budgeteer.sw-CQWYbQSc.mjs.map +1 -1
  15. package/lib/{common-utils-AB4Lnet3.mjs → common-utils-L3DF6Ey5.mjs} +2 -2
  16. package/lib/{common-utils-AB4Lnet3.mjs.map → common-utils-L3DF6Ey5.mjs.map} +1 -1
  17. package/lib/{component-dimensioning-LUnZnpqG.mjs → component-dimensioning-DmcHgmpq.mjs} +44 -38
  18. package/lib/component-dimensioning-DmcHgmpq.mjs.map +1 -0
  19. package/lib/{component-raycast-helper-Bl0mWPcj.mjs → component-raycast-helper-cJxdYLXm.mjs} +28 -28
  20. package/lib/{component-raycast-helper-Bl0mWPcj.mjs.map → component-raycast-helper-cJxdYLXm.mjs.map} +1 -1
  21. package/lib/configurator-CC0uDa2i.mjs +2 -0
  22. package/lib/configurator-CxsFgHxg.mjs +45 -0
  23. package/lib/{configurator-CP80d0HI.mjs.map → configurator-CxsFgHxg.mjs.map} +1 -1
  24. package/lib/{continuous-drawing-helper-BlRy7u2t.mjs → continuous-drawing-helper-DEmx54k_.mjs} +3 -3
  25. package/lib/{continuous-drawing-helper-BlRy7u2t.mjs.map → continuous-drawing-helper-DEmx54k_.mjs.map} +1 -1
  26. package/lib/{decorate-Bck1_lG8.mjs → decorate-C9r0zXzz.mjs} +1 -1
  27. package/lib/{decorate-Bck1_lG8.mjs.map → decorate-C9r0zXzz.mjs.map} +1 -1
  28. package/lib/{dimensioning-helper-vPhGfHd-.mjs → dimensioning-helper-BXD6AEqL.mjs} +28 -21
  29. package/lib/dimensioning-helper-BXD6AEqL.mjs.map +1 -0
  30. package/lib/dimensioning-helper-Do9jwg8T.mjs +2 -0
  31. package/lib/glb-viewer-DyHnMYi0.mjs +2 -0
  32. package/lib/{glb-viewer-B7pA8K_w.mjs → glb-viewer-I86nXb0A.mjs} +69 -69
  33. package/lib/{glb-viewer-B7pA8K_w.mjs.map → glb-viewer-I86nXb0A.mjs.map} +1 -1
  34. package/lib/{highlight-coordinator-DeB46jQq.mjs → highlight-coordinator-DvgAfvb2.mjs} +3 -3
  35. package/lib/{highlight-coordinator-DeB46jQq.mjs.map → highlight-coordinator-DvgAfvb2.mjs.map} +1 -1
  36. package/lib/{homag-intelligence-f1JD0An1.mjs → homag-intelligence-Bt--x6_f.mjs} +23 -9
  37. package/lib/homag-intelligence-Bt--x6_f.mjs.map +1 -0
  38. package/lib/{imos-ix-poc-export-helper-Vyv-uuNs.mjs → imos-ix-poc-export-helper-C9wPB6fl.mjs} +3 -3
  39. package/lib/{imos-ix-poc-export-helper-Vyv-uuNs.mjs.map → imos-ix-poc-export-helper-C9wPB6fl.mjs.map} +1 -1
  40. package/lib/kernel-C7YDLxq8.mjs.map +1 -1
  41. package/lib/{kernel-utils-BG1uqfT_.mjs → kernel-utils-B5QlsCwn.mjs} +15 -7
  42. package/lib/kernel-utils-B5QlsCwn.mjs.map +1 -0
  43. package/lib/{layer-BfckfWZz.mjs → layer-C_JtkhdO.mjs} +1 -1
  44. package/lib/{layer-BfckfWZz.mjs.map → layer-C_JtkhdO.mjs.map} +1 -1
  45. package/lib/{main-CuqGqemT.mjs → main-DeOPstVA.mjs} +37244 -3141
  46. package/lib/main-DeOPstVA.mjs.map +1 -0
  47. package/lib/{material-viewer-Cij9aWpI.mjs → material-viewer-D8Qdq6-m.mjs} +55 -55
  48. package/lib/material-viewer-D8Qdq6-m.mjs.map +1 -0
  49. package/lib/packages-eckwotTn.mjs +4 -0
  50. package/lib/{planner-DKbmQVSf.mjs → planner-BWZr-Th2.mjs} +14 -14
  51. package/lib/{planner-DKbmQVSf.mjs.map → planner-BWZr-Th2.mjs.map} +1 -1
  52. package/lib/planner-D3jvWraY.mjs +2 -0
  53. package/lib/{plugin-system-BEZnFUyT.mjs → plugin-system-BBgoIai2.mjs} +3 -3
  54. package/lib/{plugin-system-BEZnFUyT.mjs.map → plugin-system-BBgoIai2.mjs.map} +1 -1
  55. package/lib/roomle-headless-setup-CMK-quZI.mjs.map +1 -1
  56. package/lib/roomle-headless.d.ts +279 -38
  57. package/lib/roomle-headless.js +42 -41
  58. package/lib/roomle-headless.js.map +1 -1
  59. package/lib/{roomle-renderer-BgT28pfp.mjs → roomle-renderer-CkSFbpmg.mjs} +2 -2
  60. package/lib/{roomle-renderer-BgT28pfp.mjs.map → roomle-renderer-CkSFbpmg.mjs.map} +1 -1
  61. package/lib/roomle-sdk.d.ts +279 -38
  62. package/lib/roomle-sdk.js +8 -7
  63. package/lib/{roomle-webgpu-renderer-BdCItfH1.mjs → roomle-webgpu-renderer-Cs4eLEwf.mjs} +690 -280
  64. package/lib/roomle-webgpu-renderer-Cs4eLEwf.mjs.map +1 -0
  65. package/lib/{scene-renderer-Bdl7umAf.mjs → scene-renderer-4zk6BXsR.mjs} +228 -228
  66. package/lib/{scene-renderer-Bdl7umAf.mjs.map → scene-renderer-4zk6BXsR.mjs.map} +1 -1
  67. package/lib/{script-loader-BtWHegD-.mjs → script-loader-DSL6zJat.mjs} +9 -9
  68. package/lib/{script-loader-BtWHegD-.mjs.map → script-loader-DSL6zJat.mjs.map} +1 -1
  69. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
  70. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.d.ts +7 -3
  71. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.js +2 -1
  72. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/configuratorCoreInterface.js.map +1 -1
  73. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.d.ts +37 -3
  74. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.js +12 -1
  75. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/src/embind/plannerCoreInterface.js.map +1 -1
  76. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
  77. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.js +3 -3
  78. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
  79. package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
  80. package/lib/{stats-helper-BvDfWWfq.mjs → stats-helper-DyRFKnMs.mjs} +3 -3
  81. package/lib/{stats-helper-BvDfWWfq.mjs.map → stats-helper-DyRFKnMs.mjs.map} +1 -1
  82. package/lib/{three.core-K1JzUaep.mjs → three.core-DNErG1F6.mjs} +1 -1
  83. package/lib/{three.core-K1JzUaep.mjs.map → three.core-DNErG1F6.mjs.map} +1 -1
  84. package/lib/{three.module-Q2K9uyhi.mjs → three.module-BZkESKo3.mjs} +2 -2
  85. package/lib/{three.module-Q2K9uyhi.mjs.map → three.module-BZkESKo3.mjs.map} +1 -1
  86. package/lib/{three.webgpu-7v7o6Pxs.mjs → three.webgpu-C8myBXe1.mjs} +2 -2
  87. package/lib/{three.webgpu-7v7o6Pxs.mjs.map → three.webgpu-C8myBXe1.mjs.map} +1 -1
  88. package/lib/three.webgpu-WIkDzwXU.mjs +3 -0
  89. package/lib/{threejs-utils-BzXU2M3w.mjs → threejs-utils-fEhH05zP.mjs} +103 -87
  90. package/lib/threejs-utils-fEhH05zP.mjs.map +1 -0
  91. package/lib/{tools-core-BoxckhTR.mjs → tools-core-Bf4_WCg8.mjs} +5 -5
  92. package/lib/{tools-core-BoxckhTR.mjs.map → tools-core-Bf4_WCg8.mjs.map} +1 -1
  93. package/package.json +5 -2
  94. package/lib/api-CbHAzwVm.mjs.map +0 -1
  95. package/lib/component-dimensioning-LUnZnpqG.mjs.map +0 -1
  96. package/lib/configurator-BmJX0gB5.mjs +0 -2
  97. package/lib/configurator-CP80d0HI.mjs +0 -45
  98. package/lib/dimensioning-helper-5xsc6I7Y.mjs +0 -2
  99. package/lib/dimensioning-helper-vPhGfHd-.mjs.map +0 -1
  100. package/lib/glb-viewer-XFEP993c.mjs +0 -2
  101. package/lib/homag-intelligence-f1JD0An1.mjs.map +0 -1
  102. package/lib/kernel-utils-BG1uqfT_.mjs.map +0 -1
  103. package/lib/main-CuqGqemT.mjs.map +0 -1
  104. package/lib/material-viewer-Cij9aWpI.mjs.map +0 -1
  105. package/lib/packages-DALvuVA_.mjs +0 -4
  106. package/lib/planner-CVn2Lls0.mjs +0 -2
  107. package/lib/roomle-webgpu-renderer-BdCItfH1.mjs.map +0 -1
  108. package/lib/three.webgpu-ChguPx4k.mjs +0 -3
  109. package/lib/threejs-utils-BzXU2M3w.mjs.map +0 -1
@@ -1,65 +1,141 @@
1
- import { Ar as e, C as t, Cr as n, Dn as r, Gn as i, J as a, K as o, Or as s, Sr as c, Tn as l, Ui as u, Vi as d, Wn as f, Zt as p, _i as m, bi as h, fi as g, gi as _, h as v, hi as y, kr as ee, mi as te, mr as ne, mt as re, nt as b, pi as ie, pr as ae, q as oe, qr as se, si as x, st as ce, t as le, vi as ue, wt as de, yi as fe, zr as pe } from "./three.core-K1JzUaep.mjs";
2
- import { t as me } from "./scene-renderer-Bdl7umAf.mjs";
3
- import { n as he, r as ge, t as _e } from "./decorate-Bck1_lG8.mjs";
4
- import { n as ve } from "./roomle-renderer-BgT28pfp.mjs";
5
- import { Rt as S, Un as C, Ut as ye, Wn as be, Z as xe, bn as w, fr as T, jn as Se, kt as Ce, lr as we, un as Te, vn as Ee, x as De } from "./three.webgpu-7v7o6Pxs.mjs";
6
- C.BRDF_GGX, C.BRDF_Lambert, C.BasicPointShadowFilter, C.BasicShadowFilter, C.Break, C.Const, C.Continue, C.DFGLUT, C.D_GGX, C.Discard, C.EPSILON, C.F_Schlick;
7
- var E = C.Fn;
8
- C.INFINITY, C.If;
9
- var Oe = C.Loop;
10
- C.NodeAccess, C.NodeShaderStage, C.NodeType, C.NodeUpdateType, C.PCFShadowFilter, C.PCFSoftShadowFilter, C.PI, C.PI2, C.TWO_PI, C.HALF_PI, C.PointShadowFilter, C.Return, C.Schlick_to_F0, C.ShaderNode, C.Stack, C.Switch, C.TBNViewMatrix, C.VSMShadowFilter, C.V_GGX_SmithCorrelated, C.Var, C.VarIntent, C.abs, C.acesFilmicToneMapping, C.acos, C.acosh, C.add, C.addMethodChaining, C.addNodeElement, C.agxToneMapping, C.all, C.alphaT, C.and, C.anisotropy, C.anisotropyB, C.anisotropyT, C.any, C.append, C.array, C.arrayBuffer, C.asin, C.asinh, C.assign, C.atan, C.atanh, C.atomicAdd, C.atomicAnd, C.atomicFunc, C.atomicLoad, C.atomicMax, C.atomicMin, C.atomicOr, C.atomicStore, C.atomicSub, C.atomicXor, C.attenuationColor, C.attenuationDistance, C.attribute, C.attributeArray, C.backgroundBlurriness, C.backgroundIntensity, C.backgroundRotation, C.batch, C.bentNormalView, C.billboarding, C.bitAnd, C.bitNot, C.bitOr, C.bitXor, C.bitangentGeometry, C.bitangentLocal, C.bitangentView, C.bitangentWorld, C.bitcast, C.blendBurn, C.blendColor, C.blendDodge, C.blendOverlay, C.blendScreen, C.blur, C.bool, C.buffer, C.bufferAttribute, C.bumpMap, C.builtin, C.builtinAOContext, C.builtinShadowContext, C.bvec2, C.bvec3, C.bvec4, C.bypass, C.cache, C.call, C.cameraFar, C.cameraIndex, C.cameraNear, C.cameraNormalMatrix, C.cameraPosition, C.cameraProjectionMatrix, C.cameraProjectionMatrixInverse, C.cameraViewMatrix, C.cameraViewport, C.cameraWorldMatrix, C.cbrt, C.cdl, C.ceil, C.checker, C.cineonToneMapping, C.clamp, C.clearcoat, C.clearcoatNormalView, C.clearcoatRoughness, C.clipSpace, C.code;
11
- var ke = C.color;
12
- C.colorSpaceToWorking, C.colorToDirection, C.compute, C.computeKernel, C.computeSkinning, C.context, C.convert, C.convertColorSpace, C.convertToTexture, C.countLeadingZeros, C.countOneBits, C.countTrailingZeros, C.cos, C.cosh, C.cross, C.cubeTexture, C.cubeTextureBase, C.dFdx, C.dFdy, C.dashSize, C.debug, C.decrement, C.decrementBefore, C.defaultBuildStages, C.defaultShaderStages, C.defined, C.degrees, C.deltaTime, C.densityFog, C.densityFogFactor, C.depth, C.depthPass, C.determinant, C.difference, C.diffuseColor, C.directPointLight, C.directionToColor, C.directionToFaceDirection, C.dispersion, C.distance, C.div, C.dot, C.drawIndex, C.dynamicBufferAttribute, C.element, C.emissive, C.equal, C.equirectUV;
13
- var Ae = C.exp;
14
- C.exp2, C.exponentialHeightFogFactor, C.expression, C.faceDirection, C.faceForward, C.faceforward;
15
- var D = C.float;
16
- C.floatBitsToInt, C.floatBitsToUint, C.floor, C.fog, C.fract, C.frameGroup, C.frameId, C.frontFacing, C.fwidth, C.gain, C.gapSize, C.getConstNodeType, C.getCurrentStack, C.getDirection, C.getDistanceAttenuation, C.getGeometryRoughness, C.getNormalFromDepth, C.interleavedGradientNoise, C.vogelDiskSample, C.getParallaxCorrectNormal, C.getRoughness, C.getScreenPosition, C.getShIrradianceAt, C.getShadowMaterial, C.getShadowRenderObjectFunction, C.getTextureIndex, C.getViewPosition, C.globalId, C.glsl, C.glslFn, C.grayscale, C.greaterThan, C.greaterThanEqual, C.hash, C.highpModelNormalViewMatrix, C.highpModelViewMatrix, C.hue, C.increment, C.incrementBefore, C.instance, C.instanceIndex, C.instancedArray, C.instancedBufferAttribute, C.instancedDynamicBufferAttribute, C.instancedMesh;
17
- var je = C.int;
18
- C.intBitsToFloat, C.inverse, C.inverseSqrt, C.inversesqrt, C.invocationLocalIndex, C.invocationSubgroupIndex, C.ior, C.iridescence, C.iridescenceIOR, C.iridescenceThickness, C.ivec2, C.ivec3, C.ivec4, C.js, C.label, C.length, C.lengthSq, C.lessThan, C.lessThanEqual, C.lightPosition, C.lightProjectionUV, C.lightShadowMatrix, C.lightTargetDirection, C.lightTargetPosition, C.lightViewPosition, C.lightingContext, C.lights, C.linearDepth, C.linearToneMapping, C.localId, C.log, C.log2, C.logarithmicDepthToViewZ, C.luminance, C.mat2, C.mat3, C.mat4, C.matcapUV, C.materialAO, C.materialAlphaTest, C.materialAnisotropy, C.materialAnisotropyVector, C.materialAttenuationColor, C.materialAttenuationDistance, C.materialClearcoat, C.materialClearcoatNormal, C.materialClearcoatRoughness, C.materialColor, C.materialDispersion, C.materialEmissive, C.materialEnvIntensity, C.materialEnvRotation, C.materialIOR, C.materialIridescence, C.materialIridescenceIOR, C.materialIridescenceThickness, C.materialLightMap, C.materialLineDashOffset, C.materialLineDashSize, C.materialLineGapSize, C.materialLineScale, C.materialLineWidth, C.materialMetalness, C.materialNormal, C.materialOpacity, C.materialPointSize, C.materialReference, C.materialReflectivity, C.materialRefractionRatio, C.materialRotation, C.materialRoughness, C.materialSheen, C.materialSheenRoughness, C.materialShininess, C.materialSpecular, C.materialSpecularColor, C.materialSpecularIntensity, C.materialSpecularStrength, C.materialThickness, C.materialTransmission, C.max, C.maxMipLevel, C.mediumpModelViewMatrix, C.metalness;
19
- var O = C.min;
20
- C.mix, C.mixElement, C.mod, C.modInt, C.modelDirection, C.modelNormalMatrix, C.modelPosition, C.modelRadius, C.modelScale, C.modelViewMatrix, C.modelViewPosition, C.modelViewProjection, C.modelWorldMatrix, C.modelWorldMatrixInverse, C.morphReference, C.mrt;
21
- var Me = C.mul;
22
- C.mx_aastep, C.mx_add, C.mx_atan2, C.mx_cell_noise_float, C.mx_contrast, C.mx_divide, C.mx_fractal_noise_float, C.mx_fractal_noise_vec2, C.mx_fractal_noise_vec3, C.mx_fractal_noise_vec4, C.mx_frame, C.mx_heighttonormal, C.mx_hsvtorgb, C.mx_ifequal, C.mx_ifgreater, C.mx_ifgreatereq, C.mx_invert, C.mx_modulo, C.mx_multiply, C.mx_noise_float, C.mx_noise_vec3, C.mx_noise_vec4, C.mx_place2d, C.mx_power, C.mx_ramp4, C.mx_ramplr, C.mx_ramptb, C.mx_rgbtohsv, C.mx_rotate2d, C.mx_rotate3d, C.mx_safepower, C.mx_separate, C.mx_splitlr, C.mx_splittb, C.mx_srgb_texture_to_lin_rec709, C.mx_subtract, C.mx_timer, C.mx_transform_uv, C.mx_unifiednoise2d, C.mx_unifiednoise3d, C.mx_worley_noise_float, C.mx_worley_noise_vec2, C.mx_worley_noise_vec3, C.negate, C.neutralToneMapping, C.nodeArray, C.nodeImmutable;
23
- var Ne = C.nodeObject;
24
- C.nodeObjectIntent, C.nodeObjects, C.nodeProxy, C.nodeProxyIntent, C.normalFlat, C.normalGeometry, C.normalLocal, C.normalMap, C.normalView, C.normalViewGeometry, C.normalWorld, C.normalWorldGeometry, C.normalize, C.not, C.notEqual, C.numWorkgroups, C.objectDirection, C.objectGroup, C.objectPosition, C.objectRadius, C.objectScale, C.objectViewPosition, C.objectWorldMatrix, C.OnBeforeObjectUpdate, C.OnBeforeMaterialUpdate, C.OnObjectUpdate;
25
- var Pe = C.OnMaterialUpdate;
26
- C.oneMinus, C.or;
27
- var Fe = C.orthographicDepthToViewZ;
28
- C.oscSawtooth, C.oscSine, C.oscSquare, C.oscTriangle, C.output, C.outputStruct, C.overloadingFn, C.packHalf2x16, C.packSnorm2x16, C.packUnorm2x16, C.parabola, C.parallaxDirection, C.parallaxUV, C.parameter;
29
- var Ie = C.pass, Le = C.passTexture;
30
- C.pcurve;
31
- var Re = C.perspectiveDepthToViewZ;
32
- C.pmremTexture, C.pointShadow, C.pointUV, C.pointWidth, C.positionGeometry, C.positionLocal, C.positionPrevious;
33
- var ze = C.positionView;
34
- C.positionViewDirection, C.positionWorld, C.positionWorldDirection, C.posterize, C.pow, C.pow2, C.pow3, C.pow4, C.premultiplyAlpha, C.property, C.radians, C.rand, C.range, C.rangeFog, C.rangeFogFactor, C.reciprocal;
35
- var k = C.reference;
36
- C.referenceBuffer, C.reflect, C.reflectVector, C.reflectView, C.reflector, C.refract, C.refractVector, C.refractView, C.reinhardToneMapping, C.remap, C.remapClamp, C.renderGroup;
37
- var Be = C.renderOutput;
38
- C.rendererReference, C.replaceDefaultUV, C.rotate, C.rotateUV, C.roughness, C.round, C.rtt, C.sRGBTransferEOTF, C.sRGBTransferOETF, C.sample, C.sampler, C.samplerComparison, C.saturate, C.saturation, C.screen, C.screenCoordinate, C.screenDPR, C.screenSize;
39
- var A = C.screenUV;
40
- C.select, C.setCurrentStack, C.setName, C.shaderStages, C.shadow, C.shadowPositionWorld, C.shapeCircle, C.sharedUniformGroup, C.sheen, C.sheenRoughness, C.shiftLeft, C.shiftRight, C.shininess, C.sign, C.sin, C.sinh, C.sinc, C.skinning, C.smoothstep, C.smoothstepElement, C.specularColor, C.specularF90, C.spherizeUV, C.split, C.spritesheetUV, C.sqrt, C.stack;
41
- var j = C.step;
42
- C.stepElement, C.storage, C.storageBarrier, C.storageTexture, C.string, C.struct, C.sub, C.subgroupAdd, C.subgroupAll, C.subgroupAnd, C.subgroupAny, C.subgroupBallot, C.subgroupBroadcast, C.subgroupBroadcastFirst, C.subBuild, C.subgroupElect, C.subgroupExclusiveAdd, C.subgroupExclusiveMul, C.subgroupInclusiveAdd, C.subgroupInclusiveMul, C.subgroupIndex, C.subgroupMax, C.subgroupMin, C.subgroupMul, C.subgroupOr, C.subgroupShuffle, C.subgroupShuffleDown, C.subgroupShuffleUp, C.subgroupShuffleXor, C.subgroupSize, C.subgroupXor, C.tan, C.tanh, C.tangentGeometry, C.tangentLocal, C.tangentView, C.tangentWorld;
43
- var M = C.texture;
44
- C.texture3D, C.textureBarrier, C.textureBicubic, C.textureBicubicLevel, C.textureCubeUV, C.textureLoad;
45
- var Ve = C.textureSize;
46
- C.textureLevel, C.textureStore, C.thickness, C.time, C.toneMapping, C.toneMappingExposure, C.toonOutlinePass, C.transformDirection, C.transformNormal, C.transformNormalToView, C.transformedClearcoatNormalView, C.transformedNormalView, C.transformedNormalWorld, C.transmission, C.transpose, C.triNoise3D, C.triplanarTexture, C.triplanarTextures, C.trunc, C.uint, C.uintBitsToFloat;
47
- var N = C.uniform;
48
- C.uniformArray, C.uniformCubeTexture, C.uniformGroup, C.uniformFlow, C.uniformTexture, C.unpackHalf2x16, C.unpackSnorm2x16, C.unpackUnorm2x16, C.unpremultiplyAlpha, C.userData;
49
- var He = C.uv;
50
- C.uvec2, C.uvec3, C.uvec4, C.varying, C.varyingProperty;
51
- var P = C.vec2, F = C.vec3, I = C.vec4;
52
- C.vectorComponents, C.velocity, C.vertexColor, C.vertexIndex, C.vertexStage, C.vibrance, C.viewZToLogarithmicDepth, C.viewZToOrthographicDepth, C.viewZToPerspectiveDepth, C.viewZToReversedOrthographicDepth, C.viewZToReversedPerspectiveDepth, C.viewport, C.viewportCoordinate, C.viewportDepthTexture, C.viewportLinearDepth, C.viewportMipTexture, C.viewportOpaqueMipTexture, C.viewportResolution, C.viewportSafeUV, C.viewportSharedTexture, C.viewportSize, C.viewportTexture, C.viewportUV, C.wgsl, C.wgslFn, C.workgroupArray, C.workgroupBarrier, C.workgroupId, C.workingToColorSpace, C.xor;
1
+ import { Ar as e, C as t, Cr as n, Dn as r, Gn as i, J as a, K as o, Or as s, Sr as c, Tn as l, Ui as u, Vi as d, Wn as f, Zt as p, _i as m, bi as h, fi as g, gi as _, h as v, hi as y, kr as b, mi as x, mr as S, mt as C, nt as ee, on as w, pi as te, pr as ne, q as re, qr as ie, rn as T, si as E, st as ae, t as oe, vi as se, wt as ce, yi as le, zr as ue } from "./three.core-DNErG1F6.mjs";
2
+ import { o as de, t as fe } from "./scene-renderer-4zk6BXsR.mjs";
3
+ import { n as pe, r as me, t as he } from "./decorate-C9r0zXzz.mjs";
4
+ import { n as ge } from "./roomle-renderer-CkSFbpmg.mjs";
5
+ import { Rt as D, Un as O, Ut as _e, Wn as ve, Z as ye, bn as k, fr as be, jn as xe, kt as Se, lr as Ce, un as we, vn as Te, x as Ee } from "./three.webgpu-C8myBXe1.mjs";
6
+ O.BRDF_GGX, O.BRDF_Lambert, O.BasicPointShadowFilter, O.BasicShadowFilter;
7
+ var De = O.Break;
8
+ O.Const, O.Continue, O.DFGLUT, O.D_GGX, O.Discard, O.EPSILON, O.F_Schlick;
9
+ var A = O.Fn;
10
+ O.INFINITY;
11
+ var j = O.If, Oe = O.Loop;
12
+ O.NodeAccess, O.NodeShaderStage, O.NodeType;
13
+ var ke = O.NodeUpdateType;
14
+ O.PCFShadowFilter, O.PCFSoftShadowFilter;
15
+ var Ae = O.PI;
16
+ O.PI2, O.TWO_PI;
17
+ var je = O.HALF_PI;
18
+ O.PointShadowFilter, O.Return, O.Schlick_to_F0, O.ShaderNode, O.Stack, O.Switch, O.TBNViewMatrix, O.VSMShadowFilter, O.V_GGX_SmithCorrelated, O.Var, O.VarIntent;
19
+ var M = O.abs;
20
+ O.acesFilmicToneMapping;
21
+ var Me = O.acos;
22
+ O.acosh;
23
+ var Ne = O.add;
24
+ O.addMethodChaining, O.addNodeElement, O.agxToneMapping, O.all, O.alphaT, O.and, O.anisotropy, O.anisotropyB, O.anisotropyT, O.any, O.append, O.array, O.arrayBuffer, O.asin, O.asinh, O.assign, O.atan, O.atanh, O.atomicAdd, O.atomicAnd, O.atomicFunc, O.atomicLoad, O.atomicMax, O.atomicMin, O.atomicOr, O.atomicStore, O.atomicSub, O.atomicXor, O.attenuationColor, O.attenuationDistance, O.attribute, O.attributeArray, O.backgroundBlurriness, O.backgroundIntensity, O.backgroundRotation, O.batch, O.bentNormalView, O.billboarding, O.bitAnd, O.bitNot, O.bitOr, O.bitXor, O.bitangentGeometry, O.bitangentLocal, O.bitangentView, O.bitangentWorld, O.bitcast, O.blendBurn, O.blendColor, O.blendDodge, O.blendOverlay, O.blendScreen, O.blur;
25
+ var Pe = O.bool;
26
+ O.buffer, O.bufferAttribute, O.bumpMap, O.builtin, O.builtinAOContext, O.builtinShadowContext, O.bvec2, O.bvec3, O.bvec4, O.bypass, O.cache, O.call, O.cameraFar, O.cameraIndex, O.cameraNear, O.cameraNormalMatrix, O.cameraPosition, O.cameraProjectionMatrix, O.cameraProjectionMatrixInverse, O.cameraViewMatrix, O.cameraViewport, O.cameraWorldMatrix, O.cbrt, O.cdl;
27
+ var Fe = O.ceil;
28
+ O.checker, O.cineonToneMapping;
29
+ var N = O.clamp;
30
+ O.clearcoat, O.clearcoatNormalView, O.clearcoatRoughness, O.clipSpace, O.code;
31
+ var Ie = O.color;
32
+ O.colorSpaceToWorking;
33
+ var Le = O.colorToDirection;
34
+ O.compute, O.computeKernel, O.computeSkinning, O.context, O.convert, O.convertColorSpace;
35
+ var Re = O.convertToTexture;
36
+ O.countLeadingZeros;
37
+ var ze = O.countOneBits;
38
+ O.countTrailingZeros;
39
+ var Be = O.cos;
40
+ O.cosh;
41
+ var Ve = O.cross;
42
+ O.cubeTexture, O.cubeTextureBase, O.dFdx, O.dFdy, O.dashSize, O.debug, O.decrement, O.decrementBefore, O.defaultBuildStages, O.defaultShaderStages, O.defined, O.degrees, O.deltaTime, O.densityFog, O.densityFogFactor, O.depth, O.depthPass, O.determinant, O.difference;
43
+ var He = O.diffuseColor;
44
+ O.directPointLight;
45
+ var Ue = O.directionToColor;
46
+ O.directionToFaceDirection, O.dispersion, O.distance;
47
+ var We = O.div, P = O.dot;
48
+ O.drawIndex, O.dynamicBufferAttribute, O.element, O.emissive, O.equal, O.equirectUV;
49
+ var Ge = O.exp;
50
+ O.exp2, O.exponentialHeightFogFactor, O.expression, O.faceDirection, O.faceForward, O.faceforward;
51
+ var F = O.float;
52
+ O.floatBitsToInt, O.floatBitsToUint, O.floor, O.fog;
53
+ var Ke = O.fract;
54
+ O.frameGroup, O.frameId, O.frontFacing, O.fwidth, O.gain, O.gapSize, O.getConstNodeType, O.getCurrentStack, O.getDirection, O.getDistanceAttenuation, O.getGeometryRoughness;
55
+ var qe = O.getNormalFromDepth, Je = O.interleavedGradientNoise;
56
+ O.vogelDiskSample, O.getParallaxCorrectNormal, O.getRoughness, O.getScreenPosition, O.getShIrradianceAt, O.getShadowMaterial, O.getShadowRenderObjectFunction, O.getTextureIndex;
57
+ var Ye = O.getViewPosition;
58
+ O.globalId, O.glsl, O.glslFn, O.grayscale, O.greaterThan, O.greaterThanEqual, O.hash, O.highpModelNormalViewMatrix, O.highpModelViewMatrix, O.hue, O.increment, O.incrementBefore, O.instance, O.instanceIndex, O.instancedArray, O.instancedBufferAttribute, O.instancedDynamicBufferAttribute, O.instancedMesh;
59
+ var Xe = O.int;
60
+ O.intBitsToFloat, O.inverse, O.inverseSqrt, O.inversesqrt, O.invocationLocalIndex, O.invocationSubgroupIndex, O.ior, O.iridescence, O.iridescenceIOR, O.iridescenceThickness;
61
+ var Ze = O.ivec2;
62
+ O.ivec3, O.ivec4, O.js, O.label, O.length, O.lengthSq, O.lessThan, O.lessThanEqual, O.lightPosition, O.lightProjectionUV, O.lightShadowMatrix, O.lightTargetDirection, O.lightTargetPosition, O.lightViewPosition, O.lightingContext, O.lights, O.linearDepth, O.linearToneMapping, O.localId, O.log, O.log2;
63
+ var Qe = O.logarithmicDepthToViewZ, $e = O.luminance;
64
+ O.mat2, O.mat3, O.mat4, O.matcapUV, O.materialAO, O.materialAlphaTest, O.materialAnisotropy, O.materialAnisotropyVector, O.materialAttenuationColor, O.materialAttenuationDistance, O.materialClearcoat, O.materialClearcoatNormal, O.materialClearcoatRoughness, O.materialColor, O.materialDispersion, O.materialEmissive, O.materialEnvIntensity, O.materialEnvRotation, O.materialIOR, O.materialIridescence, O.materialIridescenceIOR, O.materialIridescenceThickness, O.materialLightMap, O.materialLineDashOffset, O.materialLineDashSize, O.materialLineGapSize, O.materialLineScale, O.materialLineWidth, O.materialMetalness, O.materialNormal, O.materialOpacity, O.materialPointSize, O.materialReference, O.materialReflectivity, O.materialRefractionRatio, O.materialRotation, O.materialRoughness, O.materialSheen, O.materialSheenRoughness, O.materialShininess, O.materialSpecular, O.materialSpecularColor, O.materialSpecularIntensity, O.materialSpecularStrength, O.materialThickness, O.materialTransmission;
65
+ var I = O.max;
66
+ O.maxMipLevel, O.mediumpModelViewMatrix, O.metalness;
67
+ var et = O.min, tt = O.mix;
68
+ O.mixElement, O.mod, O.modInt, O.modelDirection, O.modelNormalMatrix, O.modelPosition, O.modelRadius, O.modelScale, O.modelViewMatrix, O.modelViewPosition, O.modelViewProjection, O.modelWorldMatrix, O.modelWorldMatrixInverse, O.morphReference;
69
+ var nt = O.mrt, L = O.mul;
70
+ O.mx_aastep, O.mx_add, O.mx_atan2, O.mx_cell_noise_float, O.mx_contrast, O.mx_divide, O.mx_fractal_noise_float, O.mx_fractal_noise_vec2, O.mx_fractal_noise_vec3, O.mx_fractal_noise_vec4, O.mx_frame, O.mx_heighttonormal, O.mx_hsvtorgb, O.mx_ifequal, O.mx_ifgreater, O.mx_ifgreatereq, O.mx_invert, O.mx_modulo, O.mx_multiply, O.mx_noise_float, O.mx_noise_vec3, O.mx_noise_vec4, O.mx_place2d, O.mx_power, O.mx_ramp4, O.mx_ramplr, O.mx_ramptb, O.mx_rgbtohsv, O.mx_rotate2d, O.mx_rotate3d, O.mx_safepower, O.mx_separate, O.mx_splitlr, O.mx_splittb, O.mx_srgb_texture_to_lin_rec709, O.mx_subtract, O.mx_timer, O.mx_transform_uv, O.mx_unifiednoise2d, O.mx_unifiednoise3d, O.mx_worley_noise_float, O.mx_worley_noise_vec2, O.mx_worley_noise_vec3, O.negate, O.neutralToneMapping, O.nodeArray, O.nodeImmutable;
71
+ var rt = O.nodeObject;
72
+ O.nodeObjectIntent, O.nodeObjects, O.nodeProxy, O.nodeProxyIntent, O.normalFlat, O.normalGeometry, O.normalLocal, O.normalMap;
73
+ var it = O.normalView;
74
+ O.normalViewGeometry, O.normalWorld, O.normalWorldGeometry;
75
+ var R = O.normalize;
76
+ O.not, O.notEqual, O.numWorkgroups, O.objectDirection, O.objectGroup, O.objectPosition, O.objectRadius, O.objectScale, O.objectViewPosition, O.objectWorldMatrix, O.OnBeforeObjectUpdate, O.OnBeforeMaterialUpdate, O.OnObjectUpdate;
77
+ var at = O.OnMaterialUpdate;
78
+ O.oneMinus, O.or;
79
+ var ot = O.orthographicDepthToViewZ;
80
+ O.oscSawtooth, O.oscSine, O.oscSquare, O.oscTriangle;
81
+ var st = O.output;
82
+ O.outputStruct, O.overloadingFn, O.packHalf2x16, O.packSnorm2x16, O.packUnorm2x16, O.parabola, O.parallaxDirection, O.parallaxUV, O.parameter;
83
+ var ct = O.pass, lt = O.passTexture;
84
+ O.pcurve;
85
+ var ut = O.perspectiveDepthToViewZ;
86
+ O.pmremTexture, O.pointShadow, O.pointUV, O.pointWidth, O.positionGeometry, O.positionLocal, O.positionPrevious;
87
+ var dt = O.positionView;
88
+ O.positionViewDirection, O.positionWorld, O.positionWorldDirection, O.posterize;
89
+ var ft = O.pow;
90
+ O.pow2, O.pow3, O.pow4, O.premultiplyAlpha, O.property, O.radians;
91
+ var pt = O.rand;
92
+ O.range, O.rangeFog, O.rangeFogFactor, O.reciprocal;
93
+ var mt = O.reference;
94
+ O.referenceBuffer, O.reflect, O.reflectVector, O.reflectView, O.reflector, O.refract, O.refractVector, O.refractView, O.reinhardToneMapping, O.remap, O.remapClamp, O.renderGroup;
95
+ var ht = O.renderOutput;
96
+ O.rendererReference, O.replaceDefaultUV, O.rotate, O.rotateUV, O.roughness, O.round, O.rtt, O.sRGBTransferEOTF, O.sRGBTransferOETF;
97
+ var gt = O.sample;
98
+ O.sampler, O.samplerComparison, O.saturate, O.saturation, O.screen;
99
+ var _t = O.screenCoordinate;
100
+ O.screenDPR, O.screenSize;
101
+ var vt = O.screenUV;
102
+ O.select, O.setCurrentStack, O.setName, O.shaderStages, O.shadow, O.shadowPositionWorld, O.shapeCircle, O.sharedUniformGroup, O.sheen, O.sheenRoughness, O.shiftLeft;
103
+ var yt = O.shiftRight;
104
+ O.shininess;
105
+ var bt = O.sign, xt = O.sin;
106
+ O.sinh, O.sinc, O.skinning, O.smoothstep, O.smoothstepElement, O.specularColor, O.specularF90, O.spherizeUV, O.split, O.spritesheetUV;
107
+ var St = O.sqrt;
108
+ O.stack;
109
+ var Ct = O.step;
110
+ O.stepElement, O.storage, O.storageBarrier, O.storageTexture, O.string;
111
+ var wt = O.struct, Tt = O.sub;
112
+ O.subgroupAdd, O.subgroupAll, O.subgroupAnd, O.subgroupAny, O.subgroupBallot, O.subgroupBroadcast, O.subgroupBroadcastFirst, O.subBuild, O.subgroupElect, O.subgroupExclusiveAdd, O.subgroupExclusiveMul, O.subgroupInclusiveAdd, O.subgroupInclusiveMul, O.subgroupIndex, O.subgroupMax, O.subgroupMin, O.subgroupMul, O.subgroupOr, O.subgroupShuffle, O.subgroupShuffleDown, O.subgroupShuffleUp, O.subgroupShuffleXor, O.subgroupSize, O.subgroupXor, O.tan, O.tanh, O.tangentGeometry, O.tangentLocal, O.tangentView, O.tangentWorld;
113
+ var z = O.texture;
114
+ O.texture3D, O.textureBarrier, O.textureBicubic, O.textureBicubicLevel, O.textureCubeUV, O.textureLoad;
115
+ var Et = O.textureSize;
116
+ O.textureLevel, O.textureStore, O.thickness, O.time, O.toneMapping, O.toneMappingExposure, O.toonOutlinePass, O.transformDirection, O.transformNormal, O.transformNormalToView, O.transformedClearcoatNormalView, O.transformedNormalView, O.transformedNormalWorld, O.transmission, O.transpose, O.triNoise3D, O.triplanarTexture, O.triplanarTextures, O.trunc;
117
+ var B = O.uint;
118
+ O.uintBitsToFloat;
119
+ var V = O.uniform;
120
+ O.uniformArray, O.uniformCubeTexture, O.uniformGroup, O.uniformFlow, O.uniformTexture, O.unpackHalf2x16, O.unpackSnorm2x16, O.unpackUnorm2x16, O.unpremultiplyAlpha, O.userData;
121
+ var Dt = O.uv;
122
+ O.uvec2, O.uvec3, O.uvec4, O.varying, O.varyingProperty;
123
+ var H = O.vec2, U = O.vec3, W = O.vec4;
124
+ O.vectorComponents;
125
+ var Ot = O.velocity;
126
+ O.vertexColor, O.vertexIndex, O.vertexStage, O.vibrance, O.viewZToLogarithmicDepth;
127
+ var kt = O.viewZToOrthographicDepth, At = O.viewZToPerspectiveDepth;
128
+ O.viewZToReversedOrthographicDepth, O.viewZToReversedPerspectiveDepth, O.viewport, O.viewportCoordinate, O.viewportDepthTexture, O.viewportLinearDepth, O.viewportMipTexture, O.viewportOpaqueMipTexture, O.viewportResolution, O.viewportSafeUV, O.viewportSharedTexture, O.viewportSize, O.viewportTexture, O.viewportUV, O.wgsl, O.wgslFn, O.workgroupArray, O.workgroupBarrier, O.workgroupId, O.workingToColorSpace, O.xor;
53
129
  //#endregion
54
130
  //#region ../../node_modules/three/examples/jsm/tsl/display/OutlineNode.js
55
- var L = /* @__PURE__ */ new Te(), Ue = /* @__PURE__ */ new h(), We = /* @__PURE__ */ new h(1, 0), Ge = /* @__PURE__ */ new h(0, 1), R, Ke = class extends be {
131
+ var G = /* @__PURE__ */ new we(), jt = /* @__PURE__ */ new h(), Mt = /* @__PURE__ */ new h(1, 0), Nt = /* @__PURE__ */ new h(0, 1), K, Pt = class extends ve {
56
132
  static get type() {
57
133
  return "OutlineNode";
58
134
  }
59
135
  constructor(t, n, r = {}) {
60
136
  super("vec4");
61
- let { selectedObjects: i = [], edgeThickness: o = D(1), edgeGlow: s = D(0), downSampleRatio: c = 2 } = r;
62
- this.scene = t, this.camera = n, this.selectedObjects = i, this.edgeThicknessNode = Ne(o), this.edgeGlowNode = Ne(s), this.downSampleRatio = c, this.updateBeforeType = ye.FRAME, this._renderTargetDepthBuffer = new e(), this._renderTargetDepthBuffer.depthTexture = new a(), this._renderTargetDepthBuffer.depthTexture.type = ce, this._renderTargetMaskBuffer = new e(), this._renderTargetMaskDownSampleBuffer = new e(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer1 = new e(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer2 = new e(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer1 = new e(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer2 = new e(1, 1, { depthBuffer: !1 }), this._renderTargetComposite = new e(1, 1, { depthBuffer: !1 }), this._cameraNear = k("near", "float", n), this._cameraFar = k("far", "float", n), this._blurDirection = N(new h()), this._depthTextureUniform = M(this._renderTargetDepthBuffer.depthTexture), this._maskTextureUniform = M(this._renderTargetMaskBuffer.texture), this._maskTextureDownsSampleUniform = M(this._renderTargetMaskDownSampleBuffer.texture), this._edge1TextureUniform = M(this._renderTargetEdgeBuffer1.texture), this._edge2TextureUniform = M(this._renderTargetEdgeBuffer2.texture), this._blurColorTextureUniform = M(this._renderTargetEdgeBuffer1.texture), this._visibleEdgeColor = F(1, 0, 0), this._hiddenEdgeColor = F(0, 1, 0), this._depthMaterial = new S(), this._depthMaterial.colorNode = ke(0, 0, 0), this._depthMaterial.name = "OutlineNode.depth", this._depthSpriteMaterial = new Se(), this._depthSpriteMaterial.colorNode = ke(0, 0, 0), this._depthSpriteMaterial.name = "OutlineNode.depthSprite", this._prepareMaskMaterial = new S(), this._prepareMaskMaterial.name = "OutlineNode.prepareMask", this._prepareMaskSpriteMaterial = new Se(), this._prepareMaskSpriteMaterial.name = "OutlineNode.prepareMaskSprite", this._materialCopy = new S(), this._materialCopy.name = "OutlineNode.copy", this._edgeDetectionMaterial = new S(), this._edgeDetectionMaterial.name = "OutlineNode.edgeDetection", this._separableBlurMaterial = new S(), this._separableBlurMaterial.name = "OutlineNode.separableBlur", this._separableBlurMaterial2 = new S(), this._separableBlurMaterial2.name = "OutlineNode.separableBlur2", this._compositeMaterial = new S(), this._compositeMaterial.name = "OutlineNode.composite", this._selectionCache = /* @__PURE__ */ new Set(), this._lastSelectionCount = 0, this._textureNode = Le(this, this._renderTargetComposite.texture);
137
+ let { selectedObjects: i = [], edgeThickness: o = F(1), edgeGlow: s = F(0), downSampleRatio: c = 2 } = r;
138
+ this.scene = t, this.camera = n, this.selectedObjects = i, this.edgeThicknessNode = rt(o), this.edgeGlowNode = rt(s), this.downSampleRatio = c, this.updateBeforeType = _e.FRAME, this._renderTargetDepthBuffer = new e(), this._renderTargetDepthBuffer.depthTexture = new a(), this._renderTargetDepthBuffer.depthTexture.type = ae, this._renderTargetMaskBuffer = new e(), this._renderTargetMaskDownSampleBuffer = new e(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer1 = new e(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer2 = new e(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer1 = new e(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer2 = new e(1, 1, { depthBuffer: !1 }), this._renderTargetComposite = new e(1, 1, { depthBuffer: !1 }), this._cameraNear = mt("near", "float", n), this._cameraFar = mt("far", "float", n), this._blurDirection = V(new h()), this._depthTextureUniform = z(this._renderTargetDepthBuffer.depthTexture), this._maskTextureUniform = z(this._renderTargetMaskBuffer.texture), this._maskTextureDownsSampleUniform = z(this._renderTargetMaskDownSampleBuffer.texture), this._edge1TextureUniform = z(this._renderTargetEdgeBuffer1.texture), this._edge2TextureUniform = z(this._renderTargetEdgeBuffer2.texture), this._blurColorTextureUniform = z(this._renderTargetEdgeBuffer1.texture), this._visibleEdgeColor = U(1, 0, 0), this._hiddenEdgeColor = U(0, 1, 0), this._depthMaterial = new D(), this._depthMaterial.colorNode = Ie(0, 0, 0), this._depthMaterial.name = "OutlineNode.depth", this._depthSpriteMaterial = new xe(), this._depthSpriteMaterial.colorNode = Ie(0, 0, 0), this._depthSpriteMaterial.name = "OutlineNode.depthSprite", this._prepareMaskMaterial = new D(), this._prepareMaskMaterial.name = "OutlineNode.prepareMask", this._prepareMaskSpriteMaterial = new xe(), this._prepareMaskSpriteMaterial.name = "OutlineNode.prepareMaskSprite", this._materialCopy = new D(), this._materialCopy.name = "OutlineNode.copy", this._edgeDetectionMaterial = new D(), this._edgeDetectionMaterial.name = "OutlineNode.edgeDetection", this._separableBlurMaterial = new D(), this._separableBlurMaterial.name = "OutlineNode.separableBlur", this._separableBlurMaterial2 = new D(), this._separableBlurMaterial2.name = "OutlineNode.separableBlur2", this._compositeMaterial = new D(), this._compositeMaterial.name = "OutlineNode.composite", this._selectionCache = /* @__PURE__ */ new Set(), this._lastSelectionCount = 0, this._textureNode = lt(this, this._renderTargetComposite.texture);
63
139
  }
64
140
  get visibleEdge() {
65
141
  return this.r;
@@ -78,11 +154,11 @@ var L = /* @__PURE__ */ new Te(), Ue = /* @__PURE__ */ new h(), We = /* @__PURE_
78
154
  updateBefore(e) {
79
155
  let { renderer: t } = e, { camera: n, scene: r } = this;
80
156
  if (this._updateSelectionCache(), this._selectionCache.size === 0) {
81
- this._lastSelectionCount > 0 && (R = w.resetRendererState(t, R), t.setRenderTarget(this._renderTargetComposite), t.setClearColor(0, 0), t.clear(), w.restoreRendererState(t, R), this._lastSelectionCount = 0);
157
+ this._lastSelectionCount > 0 && (K = k.resetRendererState(t, K), t.setRenderTarget(this._renderTargetComposite), t.setClearColor(0, 0), t.clear(), k.restoreRendererState(t, K), this._lastSelectionCount = 0);
82
158
  return;
83
159
  }
84
- this._lastSelectionCount = this._selectionCache.size, R = w.resetRendererAndSceneState(t, r, R);
85
- let i = t.getDrawingBufferSize(Ue);
160
+ this._lastSelectionCount = this._selectionCache.size, K = k.resetRendererAndSceneState(t, r, K);
161
+ let i = t.getDrawingBufferSize(jt);
86
162
  this.setSize(i.width, i.height), t.setClearColor(16777215, 1);
87
163
  let a = r.name;
88
164
  t.setRenderTarget(this._renderTargetDepthBuffer), t.setRenderObjectFunction((e, n, r, i, a, o, s, c) => {
@@ -95,33 +171,33 @@ var L = /* @__PURE__ */ new Te(), Ue = /* @__PURE__ */ new h(), We = /* @__PURE_
95
171
  let a = e.isSprite ? this._prepareMaskSpriteMaterial : this._prepareMaskMaterial;
96
172
  t.renderObject(e, n, r, i, a, o, s, c);
97
173
  }
98
- }), r.name = "Outline [ Selected Objects Pass ]", t.render(r, n), t.setRenderObjectFunction(R.renderObjectFunction), this._selectionCache.clear(), r.name = a, L.material = this._materialCopy, L.name = "Outline [ Downsample ]", t.setRenderTarget(this._renderTargetMaskDownSampleBuffer), L.render(t), L.material = this._edgeDetectionMaterial, L.name = "Outline [ Edge Detection ]", t.setRenderTarget(this._renderTargetEdgeBuffer1), L.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(We), L.material = this._separableBlurMaterial, L.name = "Outline [ Blur Half Resolution ]", t.setRenderTarget(this._renderTargetBlurBuffer1), L.render(t), this._blurColorTextureUniform.value = this._renderTargetBlurBuffer1.texture, this._blurDirection.value.copy(Ge), t.setRenderTarget(this._renderTargetEdgeBuffer1), L.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(We), L.material = this._separableBlurMaterial2, L.name = "Outline [ Blur Quarter Resolution ]", t.setRenderTarget(this._renderTargetBlurBuffer2), L.render(t), this._blurColorTextureUniform.value = this._renderTargetBlurBuffer2.texture, this._blurDirection.value.copy(Ge), t.setRenderTarget(this._renderTargetEdgeBuffer2), L.render(t), L.material = this._compositeMaterial, L.name = "Outline [ Blur Quarter Resolution ]", t.setRenderTarget(this._renderTargetComposite), L.render(t), w.restoreRendererAndSceneState(t, r, R);
174
+ }), r.name = "Outline [ Selected Objects Pass ]", t.render(r, n), t.setRenderObjectFunction(K.renderObjectFunction), this._selectionCache.clear(), r.name = a, G.material = this._materialCopy, G.name = "Outline [ Downsample ]", t.setRenderTarget(this._renderTargetMaskDownSampleBuffer), G.render(t), G.material = this._edgeDetectionMaterial, G.name = "Outline [ Edge Detection ]", t.setRenderTarget(this._renderTargetEdgeBuffer1), G.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(Mt), G.material = this._separableBlurMaterial, G.name = "Outline [ Blur Half Resolution ]", t.setRenderTarget(this._renderTargetBlurBuffer1), G.render(t), this._blurColorTextureUniform.value = this._renderTargetBlurBuffer1.texture, this._blurDirection.value.copy(Nt), t.setRenderTarget(this._renderTargetEdgeBuffer1), G.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(Mt), G.material = this._separableBlurMaterial2, G.name = "Outline [ Blur Quarter Resolution ]", t.setRenderTarget(this._renderTargetBlurBuffer2), G.render(t), this._blurColorTextureUniform.value = this._renderTargetBlurBuffer2.texture, this._blurDirection.value.copy(Nt), t.setRenderTarget(this._renderTargetEdgeBuffer2), G.render(t), G.material = this._compositeMaterial, G.name = "Outline [ Blur Quarter Resolution ]", t.setRenderTarget(this._renderTargetComposite), G.render(t), k.restoreRendererAndSceneState(t, r, K);
99
175
  }
100
176
  setup() {
101
177
  let e = () => {
102
- let e = this._depthTextureUniform.sample(A), t;
103
- return t = this.camera.isPerspectiveCamera ? Re(e, this._cameraNear, this._cameraFar) : Fe(e, this._cameraNear, this._cameraFar), F(0, ze.z.lessThanEqual(t).select(1, 0), 1);
178
+ let e = this._depthTextureUniform.sample(vt), t;
179
+ return t = this.camera.isPerspectiveCamera ? ut(e, this._cameraNear, this._cameraFar) : ot(e, this._cameraNear, this._cameraFar), U(0, dt.z.lessThanEqual(t).select(1, 0), 1);
104
180
  };
105
181
  this._prepareMaskMaterial.colorNode = e(), this._prepareMaskMaterial.needsUpdate = !0, this._prepareMaskSpriteMaterial.colorNode = e(), this._prepareMaskSpriteMaterial.needsUpdate = !0, this._materialCopy.fragmentNode = this._maskTextureUniform, this._materialCopy.needsUpdate = !0;
106
- let t = E(() => {
107
- let e = Ve(this._maskTextureDownsSampleUniform), t = P(1).div(e).toVar(), n = I(1, 0, 0, 1).mul(I(t, t)), r = He(), i = this._maskTextureDownsSampleUniform.sample(r.add(n.xy)).toVar(), a = this._maskTextureDownsSampleUniform.sample(r.sub(n.xy)).toVar(), o = this._maskTextureDownsSampleUniform.sample(r.add(n.yw)).toVar(), s = this._maskTextureDownsSampleUniform.sample(r.sub(n.yw)).toVar(), c = P(Me(i.r.sub(a.r), .5), Me(o.r.sub(s.r), .5)).length();
108
- return I(O(O(i.g, a.g), O(o.g, s.g)).oneMinus().greaterThan(.001).select(this._visibleEdgeColor, this._hiddenEdgeColor), 1).mul(c);
182
+ let t = A(() => {
183
+ let e = Et(this._maskTextureDownsSampleUniform), t = H(1).div(e).toVar(), n = W(1, 0, 0, 1).mul(W(t, t)), r = Dt(), i = this._maskTextureDownsSampleUniform.sample(r.add(n.xy)).toVar(), a = this._maskTextureDownsSampleUniform.sample(r.sub(n.xy)).toVar(), o = this._maskTextureDownsSampleUniform.sample(r.add(n.yw)).toVar(), s = this._maskTextureDownsSampleUniform.sample(r.sub(n.yw)).toVar(), c = H(L(i.r.sub(a.r), .5), L(o.r.sub(s.r), .5)).length();
184
+ return W(et(et(i.g, a.g), et(o.g, s.g)).oneMinus().greaterThan(.001).select(this._visibleEdgeColor, this._hiddenEdgeColor), 1).mul(c);
109
185
  });
110
186
  this._edgeDetectionMaterial.fragmentNode = t(), this._edgeDetectionMaterial.needsUpdate = !0;
111
- let n = E(([e, t]) => D(.39894).mul(Ae(D(-.5).mul(e).mul(e).div(t.mul(t))).div(t))), r = E(([e]) => {
112
- let t = Ve(this._maskTextureDownsSampleUniform), r = P(1).div(t).toVar(), i = He(), a = e.div(2).toVar(), o = n(0, a).toVar(), s = this._blurColorTextureUniform.sample(i).mul(o).toVar(), c = this._blurDirection.mul(r).mul(e).div(4).toVar(), l = c.toVar();
187
+ let n = A(([e, t]) => F(.39894).mul(Ge(F(-.5).mul(e).mul(e).div(t.mul(t))).div(t))), r = A(([e]) => {
188
+ let t = Et(this._maskTextureDownsSampleUniform), r = H(1).div(t).toVar(), i = Dt(), a = e.div(2).toVar(), o = n(0, a).toVar(), s = this._blurColorTextureUniform.sample(i).mul(o).toVar(), c = this._blurDirection.mul(r).mul(e).div(4).toVar(), l = c.toVar();
113
189
  return Oe({
114
- start: je(1),
115
- end: je(4),
190
+ start: Xe(1),
191
+ end: Xe(4),
116
192
  type: "int",
117
193
  condition: "<="
118
194
  }, ({ i: t }) => {
119
- let r = n(e.mul(D(t)).div(4), a), u = this._blurColorTextureUniform.sample(i.add(l)), d = this._blurColorTextureUniform.sample(i.sub(l));
195
+ let r = n(e.mul(F(t)).div(4), a), u = this._blurColorTextureUniform.sample(i.add(l)), d = this._blurColorTextureUniform.sample(i.sub(l));
120
196
  s.addAssign(u.add(d).mul(r)), o.addAssign(r.mul(2)), l.addAssign(c);
121
197
  }), s.div(o);
122
198
  });
123
199
  this._separableBlurMaterial.fragmentNode = r(this.edgeThicknessNode), this._separableBlurMaterial.needsUpdate = !0, this._separableBlurMaterial2.fragmentNode = r(4), this._separableBlurMaterial2.needsUpdate = !0;
124
- let i = E(() => {
200
+ let i = A(() => {
125
201
  let e = this._edge1TextureUniform, t = this._edge2TextureUniform, n = this._maskTextureUniform, r = e.add(t.mul(this.edgeGlowNode));
126
202
  return n.r.mul(r);
127
203
  });
@@ -135,12 +211,12 @@ var L = /* @__PURE__ */ new Te(), Ue = /* @__PURE__ */ new h(), We = /* @__PURE_
135
211
  (e.isMesh || e.isSprite) && this._selectionCache.add(e);
136
212
  });
137
213
  }
138
- }, qe = (e, t, n) => new Ke(e, t, n), Je = class {}, z = class e extends Je {
214
+ }, Ft = (e, t, n) => new Pt(e, t, n), It = class {}, Lt = class e extends It {
139
215
  static {
140
216
  this.passId = "OutlineRenderPass";
141
217
  }
142
218
  constructor(n) {
143
- super(), this.passId = e.passId, this.selectedObjects = n.selectedObjects, this.edgeStrength = N(n.edgeStrength), this.edgeGlow = N(n.edgeGlow), this.edgeThickness = N(n.edgeThickness), this.visibleEdgeColor = N(new t(n.visibleEdgeColor)), this.hiddenEdgeColor = N(new t(n.hiddenEdgeColor));
219
+ super(), this.passId = e.passId, this.selectedObjects = n.selectedObjects, this.edgeStrength = V(n.edgeStrength), this.edgeGlow = V(n.edgeGlow), this.edgeThickness = V(n.edgeThickness), this.visibleEdgeColor = V(new t(n.visibleEdgeColor)), this.hiddenEdgeColor = V(new t(n.hiddenEdgeColor));
144
220
  }
145
221
  highlightObjects(e) {
146
222
  this.selectedObjects.splice(0, this.selectedObjects.length, ...e);
@@ -148,40 +224,36 @@ var L = /* @__PURE__ */ new Te(), Ue = /* @__PURE__ */ new h(), We = /* @__PURE_
148
224
  setOutlineColors(e, n) {
149
225
  this.visibleEdgeColor.value = new t(e), this.hiddenEdgeColor.value = new t(n);
150
226
  }
151
- areObjectsSelected() {
152
- return this.selectedObjects.length !== 0;
153
- }
154
- assemble(e, t, n, r) {
155
- if (!this.areObjectsSelected()) return e;
156
- let { visibleEdge: i, hiddenEdge: a } = qe(t, n, {
227
+ assemble(e, t, n, r, i) {
228
+ let { visibleEdge: a, hiddenEdge: o } = Ft(n, r, {
157
229
  selectedObjects: this.selectedObjects,
158
230
  edgeThickness: this.edgeThickness,
159
231
  edgeGlow: this.edgeGlow
160
- }), o = i.mul(this.visibleEdgeColor).add(a.mul(this.hiddenEdgeColor)).mul(this.edgeStrength);
161
- return r === "outline" ? I(0, 0, 0, 0).add(o) : e.add(o);
232
+ }), s = a.mul(this.visibleEdgeColor).add(o.mul(this.hiddenEdgeColor)).mul(this.edgeStrength);
233
+ return i === "outline" ? W(0, 0, 0, 0).add(s) : t.add(s);
162
234
  }
163
235
  addParametersToGUI(e, t) {
164
236
  let n = e.addFolder("Outline Settings");
165
- n.add(this.edgeStrength, "value", .01, 10).name("edgeStrength").onChange(() => t()), n.add(this.edgeGlow, "value", 0, 1).name("edgeGlow").onChange(() => t()), n.add(this.edgeThickness, "value", 1, 4).name("edgeThickness").onChange(() => t()), n.addColor({ color: this.visibleEdgeColor.value.getHex(pe) }, "color").name("visibleEdgeColor").onChange((e) => {
237
+ n.add(this.edgeStrength, "value", .01, 10).name("edgeStrength").onChange(() => t()), n.add(this.edgeGlow, "value", 0, 1).name("edgeGlow").onChange(() => t()), n.add(this.edgeThickness, "value", 1, 4).name("edgeThickness").onChange(() => t()), n.addColor({ color: this.visibleEdgeColor.value.getHex(ue) }, "color").name("visibleEdgeColor").onChange((e) => {
166
238
  this.visibleEdgeColor.value.set(e), t();
167
- }), n.addColor({ color: this.hiddenEdgeColor.value.getHex(pe) }, "color").name("hiddenEdgeColor").onChange((e) => {
239
+ }), n.addColor({ color: this.hiddenEdgeColor.value.getHex(ue) }, "color").name("hiddenEdgeColor").onChange((e) => {
168
240
  this.hiddenEdgeColor.value.set(e), t();
169
241
  });
170
242
  }
171
- }, Ye = class {
243
+ }, Rt = class {
172
244
  constructor(e, t) {
173
245
  this.uid = e, this.cid = e.match(/^(.*):f(\d+)$/)[1], this.name = t, this.timestamp = 0, this.cpu = 0, this.gpu = 0, this.fps = 0, this.children = [], this.parent = null;
174
246
  }
175
- }, Xe = class extends Ye {
247
+ }, zt = class extends Rt {
176
248
  constructor(e, t, n, r) {
177
249
  let i = t.name;
178
250
  i === "" && (t.isScene ? i = "Scene" : t.isQuadMesh && (i = "QuadMesh")), super(e, i), this.scene = t, this.camera = n, this.renderTarget = r, this.isRenderStats = !0;
179
251
  }
180
- }, Ze = class extends Ye {
252
+ }, Bt = class extends Rt {
181
253
  constructor(e, t) {
182
254
  super(e, t.name), this.computeNode = t, this.isComputeStats = !0;
183
255
  }
184
- }, Qe = class extends xe {
256
+ }, Vt = class extends ye {
185
257
  constructor() {
186
258
  super(), this.currentFrame = null, this.currentRender = null, this.currentNodes = null, this.lastFrame = null, this.frames = [], this.framesLib = {}, this.maxFrames = 512, this._lastFinishTime = 0, this._resolveTimestampPromise = null, this.isRendererInspector = !0;
187
259
  }
@@ -229,8 +301,8 @@ var L = /* @__PURE__ */ new Te(), Ue = /* @__PURE__ */ new h(), We = /* @__PURE_
229
301
  return this._resolveTimestampPromise === null && (this._resolveTimestampPromise = new Promise((e) => {
230
302
  requestAnimationFrame(async () => {
231
303
  let t = this.getRenderer();
232
- await t.resolveTimestampsAsync(x.COMPUTE), await t.resolveTimestampsAsync(x.RENDER);
233
- let n = t.backend.getTimestampFrames(x.COMPUTE), r = t.backend.getTimestampFrames(x.RENDER), i = [...new Set([...n, ...r])];
304
+ await t.resolveTimestampsAsync(E.COMPUTE), await t.resolveTimestampsAsync(E.RENDER);
305
+ let n = t.backend.getTimestampFrames(E.COMPUTE), r = t.backend.getTimestampFrames(E.RENDER), i = [...new Set([...n, ...r])];
234
306
  for (let e of i) {
235
307
  let i = this.getFrameById(e);
236
308
  if (i !== null) {
@@ -270,7 +342,7 @@ var L = /* @__PURE__ */ new Te(), Ue = /* @__PURE__ */ new h(), We = /* @__PURE_
270
342
  beginCompute(e, t) {
271
343
  let n = this.getFrame();
272
344
  if (!n) return;
273
- let r = new Ze(e, t);
345
+ let r = new Bt(e, t);
274
346
  r.timestamp = performance.now(), r.parent = this.currentCompute || this.getParent(), n.computes.push(r), this.currentRender === null ? n.children.push(r) : this.currentRender.children.push(r), this.currentCompute = r;
275
347
  }
276
348
  finishCompute() {
@@ -281,7 +353,7 @@ var L = /* @__PURE__ */ new Te(), Ue = /* @__PURE__ */ new h(), We = /* @__PURE_
281
353
  beginRender(e, t, n, r) {
282
354
  let i = this.getFrame();
283
355
  if (!i) return;
284
- let a = new Xe(e, t, n, r);
356
+ let a = new zt(e, t, n, r);
285
357
  a.timestamp = performance.now(), a.parent = this.getParent(), i.renders.push(a), this.currentRender === null ? i.children.push(a) : this.currentRender.children.push(a), this.currentRender = a;
286
358
  }
287
359
  finishRender() {
@@ -289,15 +361,15 @@ var L = /* @__PURE__ */ new Te(), Ue = /* @__PURE__ */ new h(), We = /* @__PURE_
289
361
  let e = this.currentRender;
290
362
  e.cpu = performance.now() - e.timestamp, this.currentRender = e.parent;
291
363
  }
292
- }, $e = class {
364
+ }, Ht = class {
293
365
  static init() {
294
366
  if (document.getElementById("profiler-styles")) return;
295
367
  let e = document.createElement("style");
296
368
  e.id = "profiler-styles", e.textContent = "\n:root {\n --profiler-bg: #1e1e24f5;\n --profiler-header-bg: #2a2a33aa;\n --profiler-header: #2a2a33;\n --profiler-border: #4a4a5a;\n --text-primary: #e0e0e0;\n --text-secondary: #9a9aab;\n --accent-color: #00aaff;\n --color-green: #4caf50;\n --color-yellow: #ffc107;\n --color-red: #f44336;\n --color-fps: rgb(63, 81, 181);\n --color-call: rgba(255, 185, 34, 1);\n --font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n --font-mono: 'Fira Code', 'Courier New', Courier, monospace;\n}\n\n@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Fira+Code&display=swap');\n\n#profiler-panel *, #profiler-toggle * {\n text-transform: initial;\n line-height: normal;\n box-sizing: border-box;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n#profiler-toggle {\n position: fixed;\n top: 15px;\n right: 15px;\n background-color: rgba(30, 30, 36, 0.85);\n border: 1px solid #4a4a5a54;\n border-radius: 12px 6px 6px 12px;\n color: var(--text-primary);\n cursor: pointer;\n z-index: 1001;\n transition: all 0.2s ease-in-out;\n /*font-size: 14px;*/\n font-size: 15px;\n backdrop-filter: blur(8px);\n box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);\n display: flex;\n align-items: stretch;\n padding: 0;\n overflow: hidden;\n font-family: var(--font-family);\n}\n\n#profiler-toggle.position-right.panel-open {\n right: auto;\n left: 15px;\n border-radius: 6px 12px 12px 6px;\n flex-direction: row-reverse;\n}\n\n#profiler-toggle.position-right.panel-open #builtin-tabs-container {\n border-right: none;\n border-left: 1px solid #262636;\n}\n\n#profiler-toggle:hover {\n border-color: var(--accent-color);\n}\n\n#profiler-toggle.panel-open #toggle-icon {\n background-color: rgba(0, 170, 255, 0.2);\n color: var(--accent-color);\n}\n\n#toggle-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n font-size: 20px;\n transition: background-color 0.2s;\n}\n\n#profiler-toggle:hover #toggle-icon {\n background-color: rgba(255, 255, 255, 0.05);\n}\n\n#profiler-toggle.panel-open:hover #toggle-icon {\n background-color: rgba(0, 170, 255, 0.3);\n}\n\n.toggle-separator {\n width: 1px;\n background-color: var(--profiler-border);\n}\n\n#toggle-text {\n display: flex;\n align-items: baseline;\n padding: 8px 14px;\n min-width: 80px;\n justify-content: right;\n}\n\n#toggle-text .fps-label {\n font-size: 0.7em;\n margin-left: 10px;\n color: #999;\n}\n\n#builtin-tabs-container {\n display: flex;\n align-items: stretch;\n gap: 0;\n border-right: 1px solid #262636;\n order: -1;\n}\n\n.builtin-tab-btn {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n cursor: pointer;\n padding: 8px 14px;\n font-family: var(--font-family);\n font-size: 13px;\n font-weight: 600;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n min-width: 32px;\n position: relative;\n}\n\n.builtin-tab-btn svg {\n width: 20px;\n height: 20px;\n stroke: currentColor;\n}\n\n.builtin-tab-btn:hover {\n background-color: rgba(255, 255, 255, 0.08);\n color: var(--accent-color);\n}\n\n.builtin-tab-btn:active {\n background-color: rgba(255, 255, 255, 0.12);\n}\n\n.builtin-tab-btn.active {\n background-color: rgba(0, 170, 255, 0.2);\n color: var(--accent-color);\n}\n\n.builtin-tab-btn.active:hover {\n background-color: rgba(0, 170, 255, 0.3);\n}\n\n#profiler-mini-panel {\n position: fixed;\n top: 60px;\n right: 15px;\n background-color: rgba(30, 30, 36, 0.85);\n border: 1px solid #4a4a5a54;\n border-radius: 8px;\n color: var(--text-primary);\n z-index: 9999;\n backdrop-filter: blur(8px);\n box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);\n font-family: var(--font-family);\n font-size: 11px;\n width: 350px;\n max-height: calc(100vh - 100px);\n overflow-y: auto;\n overflow-x: hidden;\n display: none;\n opacity: 0;\n transform: translateY(-10px) scale(0.98);\n transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), \n transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n#profiler-mini-panel.position-right.panel-open {\n right: auto;\n left: 15px;\n}\n\n#profiler-mini-panel.visible {\n display: block;\n opacity: 1;\n transform: translateY(0) scale(1);\n}\n\n#profiler-mini-panel::-webkit-scrollbar {\n width: 6px;\n}\n\n#profiler-mini-panel::-webkit-scrollbar-track {\n background: transparent;\n}\n\n#profiler-mini-panel::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.15);\n border-radius: 3px;\n transition: background 0.2s;\n}\n\n#profiler-mini-panel::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.25);\n}\n\n.mini-panel-content {\n padding: 0;\n font-size: 11px;\n line-height: 1.5;\n font-family: var(--font-mono);\n letter-spacing: 0.3px;\n user-select: none;\n -webkit-user-select: none;\n}\n\n.mini-panel-content .profiler-content {\n display: block !important;\n background: transparent;\n}\n\n.mini-panel-content .list-scroll-wrapper {\n max-height: calc(100vh - 120px);\n overflow-y: auto;\n overflow-x: hidden;\n width: 100%;\n}\n\n.mini-panel-content .list-scroll-wrapper::-webkit-scrollbar {\n width: 4px;\n}\n\n.mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.1);\n border-radius: 2px;\n}\n\n.mini-panel-content .list-scroll-wrapper::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.2);\n}\n\n.mini-panel-content .parameters {\n background: transparent;\n border: none;\n box-shadow: none;\n padding: 4px;\n}\n\n.mini-panel-content .list-container.parameters {\n padding: 2px 6px 0px 6px !important;\n}\n\n.mini-panel-content .list-header {\n display: none;\n padding: 2px 4px;\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n}\n\n.mini-panel-content .list-item {\n border-bottom: 1px solid rgba(74, 74, 90, 0.2);\n transition: background-color 0.15s;\n}\n\n.mini-panel-content .list-item:last-child {\n border-bottom: none;\n}\n\n.mini-panel-content .list-item:hover {\n background-color: rgba(255, 255, 255, 0.04);\n}\n\n.mini-panel-content .list-item.actionable:hover {\n background-color: rgba(255, 255, 255, 0.06);\n cursor: pointer;\n}\n\n/* Style adjustments for lil-gui look */\n.mini-panel-content .item-row {\n padding: 3px 8px;\n min-height: 24px;\n}\n\n.mini-panel-content .list-item-row {\n padding: 1px 4px;\n gap: 8px;\n min-height: 21px;\n align-items: center;\n}\n\n.mini-panel-content input[type=\"checkbox\"] {\n width: 12px;\n height: 12px;\n}\n\n.mini-panel-content input[type=\"range\"] {\n height: 18px;\n}\n\n.mini-panel-content .value-number input,\n.mini-panel-content .value-slider input {\n background-color: rgba(0, 0, 0, 0.3);\n border: 1px solid rgba(74, 74, 90, 0.5);\n font-size: 10px;\n}\n\n.mini-panel-content .value-number input:focus,\n.mini-panel-content .value-slider input:focus {\n border-color: var(--accent-color);\n}\n\n.mini-panel-content .value-slider {\n gap: 6px;\n}\n\n/* Compact nested items */\n.mini-panel-content .list-item .list-item {\n margin-left: 8px;\n}\n\n.mini-panel-content .list-item .list-item .item-row,\n.mini-panel-content .list-item .list-item .list-item-row {\n padding: 2px 6px;\n min-height: 22px;\n}\n\n/* Compact collapsible headers */\n.mini-panel-content .collapsible .item-row,\n.mini-panel-content .list-item-row.collapsible {\n padding: 2px 8px;\n font-weight: 600;\n min-height: 16px;\n display: flex;\n align-items: center;\n}\n\n.mini-panel-content .collapsible-icon {\n font-size: 10px;\n width: 14px;\n height: 14px;\n}\n\n.mini-panel-content .param-control input[type=\"range\"] {\n height: 12px;\n margin-top: 1px;\n padding-top: 5px;\n user-select: none;\n -webkit-user-select: none;\n outline: none;\n}\n\n.mini-panel-content .param-control input[type=\"range\"]::-webkit-slider-thumb {\n width: 14px;\n height: 14px;\n margin-top: -5px;\n user-select: none;\n -webkit-user-select: none;\n}\n\n.mini-panel-content .param-control input[type=\"range\"]::-moz-range-thumb {\n width: 14px;\n height: 14px;\n user-select: none;\n -moz-user-select: none;\n}\n\n.mini-panel-content .list-children-container {\n padding-left: 0;\n}\n\n.mini-panel-content .param-control input[type=\"number\"] {\n flex-basis: 60px !important;\n}\n\n.mini-panel-content .param-control {\n align-items: center;\n}\n\n.mini-panel-content .param-control select {\n font-size: 11px;\n}\n\n.mini-panel-content .list-item-wrapper {\n margin-top: 0;\n margin-bottom: 0;\n}\n\n#profiler-panel {\n position: fixed;\n z-index: 1001 !important;\n bottom: 0;\n left: 0;\n right: 0;\n height: 350px;\n background-color: var(--profiler-bg);\n backdrop-filter: blur(8px);\n border-top: 2px solid var(--profiler-border);\n color: var(--text-primary);\n display: flex;\n flex-direction: column;\n z-index: 1000;\n /*box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.5);*/\n transform: translateY(100%);\n transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), height 0.3s ease-out, width 0.3s ease-out;\n font-family: var(--font-mono);\n}\n\n#profiler-panel.resizing,\n#profiler-panel.dragging {\n transition: none;\n}\n\n#profiler-panel.visible {\n transform: translateY(0);\n}\n\n#profiler-panel.maximized {\n height: 100vh;\n}\n\n/* Position-specific styles */\n#profiler-panel.position-top {\n bottom: auto;\n top: 0;\n border-top: none;\n border-bottom: 2px solid var(--profiler-border);\n transform: translateY(-100%);\n}\n\n#profiler-panel.position-top.visible {\n transform: translateY(0);\n}\n\n#profiler-panel.position-bottom {\n /* Default position - already defined above */\n}\n\n#profiler-panel.position-left {\n top: 0;\n bottom: 0;\n left: 0;\n right: auto;\n width: 350px;\n height: 100%;\n border-top: none;\n border-right: 2px solid var(--profiler-border);\n transform: translateX(-100%);\n}\n\n#profiler-panel.position-left.visible {\n transform: translateX(0);\n}\n\n#profiler-panel.position-right {\n top: 0;\n bottom: 0;\n left: auto;\n right: 0;\n width: 350px;\n height: 100%;\n border-top: none;\n border-left: 2px solid var(--profiler-border);\n transform: translateX(100%);\n}\n\n#profiler-panel.position-right.visible {\n transform: translateX(0);\n}\n\n#profiler-panel.position-floating {\n border: 2px solid var(--profiler-border);\n border-radius: 8px;\n box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);\n transform: none !important;\n overflow: hidden;\n}\n\n#profiler-panel.position-floating.visible {\n transform: none !important;\n}\n\n#profiler-panel.position-floating .profiler-header {\n border-radius: 6px 6px 0 0;\n}\n\n#profiler-panel.position-floating .panel-resizer {\n bottom: 0;\n right: 0;\n top: auto;\n left: auto;\n width: 16px;\n height: 16px;\n cursor: nwse-resize;\n border-radius: 0 0 6px 0;\n}\n\n#profiler-panel.position-floating .panel-resizer::after {\n content: '';\n position: absolute;\n right: 2px;\n bottom: 2px;\n width: 10px;\n height: 10px;\n background: linear-gradient(135deg, transparent 0%, transparent 45%, var(--profiler-border) 45%, var(--profiler-border) 55%, transparent 55%);\n}\n\n\n.panel-resizer {\n position: absolute;\n top: -2px;\n left: 0;\n width: 100%;\n height: 5px;\n cursor: ns-resize;\n z-index: 1001;\n touch-action: none;\n}\n\n#profiler-panel.position-top .panel-resizer {\n top: auto;\n bottom: -2px;\n}\n\n#profiler-panel.position-left .panel-resizer {\n top: 0;\n left: auto;\n right: -2px;\n width: 5px;\n height: 100%;\n cursor: ew-resize;\n}\n\n#profiler-panel.position-right .panel-resizer {\n top: 0;\n left: -2px;\n right: auto;\n width: 5px;\n height: 100%;\n cursor: ew-resize;\n}\n\n.profiler-header {\n display: flex;\n background-color: var(--profiler-header-bg);\n border-bottom: 1px solid var(--profiler-border);\n flex-shrink: 0;\n justify-content: space-between;\n align-items: stretch;\n\n overflow-x: auto;\n overflow-y: hidden;\n width: calc(100% - 134px);\n height: 38px;\n user-select: none;\n -webkit-user-select: none;\n}\n\n/* Adjust header width based on panel position */\n#profiler-panel.position-right .profiler-header,\n#profiler-panel.position-left .profiler-header {\n width: calc(100% - 134px);\n}\n\n#profiler-panel.position-bottom .profiler-header,\n#profiler-panel.position-top .profiler-header {\n width: calc(100% - 134px);\n}\n\n/* Adjust header width when position toggle button is hidden (mobile) */\n#profiler-panel.hide-position-toggle .profiler-header {\n width: calc(100% - 90px);\n}\n\n/* ===== RULES FOR WHEN THERE ARE NO TABS ===== */\n\n/* Horizontal mode (bottom/top) without tabs */\n#profiler-panel.position-bottom.no-tabs:not(.maximized),\n#profiler-panel.position-top.no-tabs:not(.maximized) {\n height: 38px !important;\n min-height: 38px !important;\n}\n\n#profiler-panel.position-bottom.no-tabs .profiler-header,\n#profiler-panel.position-top.no-tabs .profiler-header {\n width: 100%;\n height: 38px;\n border-bottom: none;\n}\n\n#profiler-panel.position-bottom.no-tabs .profiler-content-wrapper,\n#profiler-panel.position-top.no-tabs .profiler-content-wrapper {\n display: none;\n}\n\n#profiler-panel.position-bottom.no-tabs .panel-resizer,\n#profiler-panel.position-top.no-tabs .panel-resizer {\n display: none;\n}\n\n/* Vertical mode (right/left) without tabs */\n#profiler-panel.position-right.no-tabs:not(.maximized),\n#profiler-panel.position-left.no-tabs:not(.maximized) {\n width: 45px !important;\n min-width: 45px !important;\n}\n\n/* Vertical layout for header when no tabs */\n#profiler-panel.position-right.no-tabs .profiler-header,\n#profiler-panel.position-left.no-tabs .profiler-header {\n width: 100%;\n flex-direction: column;\n height: 100%;\n border-bottom: none;\n}\n\n/* Vertical layout for controls when no tabs */\n#profiler-panel.position-right.no-tabs .profiler-controls,\n#profiler-panel.position-left.no-tabs .profiler-controls {\n position: static;\n flex-direction: column-reverse;\n justify-content: flex-end;\n width: 100%;\n height: 100%;\n border-bottom: none;\n border-left: none;\n background: transparent;\n}\n\n#profiler-panel.position-right.no-tabs .profiler-controls button,\n#profiler-panel.position-left.no-tabs .profiler-controls button {\n width: 100%;\n height: 45px;\n border-left: none;\n border-top: none;\n border-bottom: 1px solid var(--profiler-border);\n}\n\n#profiler-panel.position-right.no-tabs .profiler-content-wrapper,\n#profiler-panel.position-left.no-tabs .profiler-content-wrapper {\n display: none;\n}\n\n#profiler-panel.position-right.no-tabs .profiler-tabs,\n#profiler-panel.position-left.no-tabs .profiler-tabs {\n display: none;\n}\n\n#profiler-panel.position-right.no-tabs .panel-resizer,\n#profiler-panel.position-left.no-tabs .panel-resizer {\n display: none;\n}\n\n/* Hide position toggle on mobile without tabs */\n#profiler-panel.hide-position-toggle.position-right.no-tabs:not(.maximized),\n#profiler-panel.hide-position-toggle.position-left.no-tabs:not(.maximized) {\n width: 45px !important;\n min-width: 45px !important;\n}\n\n/* Hide drag indicator on mobile devices */\n#profiler-panel.is-mobile .tab-btn.active::before {\n display: none;\n}\n\n.profiler-header::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n.profiler-header::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.profiler-header::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.25);\n border-radius: 10px;\n transition: background 0.3s ease;\n}\n\n.profiler-header::-webkit-scrollbar-thumb:hover {\n background-color: rgba(0, 0, 0, 0.4);\n}\n\n.profiler-header::-webkit-scrollbar-corner {\n background: transparent;\n}\n\n#profiler-panel.dragging .profiler-header {\n cursor: grabbing !important;\n}\n\n#profiler-panel.dragging {\n opacity: 0.8;\n}\n\n.profiler-tabs {\n display: flex;\n cursor: grab;\n position: relative;\n}\n\n.profiler-tabs:active {\n cursor: grabbing;\n}\n\n.profiler-tabs::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n.profiler-tabs::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.profiler-tabs::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.25);\n border-radius: 10px;\n transition: background 0.3s ease;\n}\n\n.profiler-tabs::-webkit-scrollbar-thumb:hover {\n background-color: rgba(0, 0, 0, 0.4);\n}\n\n.profiler-tabs::-webkit-scrollbar-corner {\n background: transparent;\n}\n\n.profiler-controls {\n display: flex;\n position: absolute;\n right: 0;\n top: 0;\n height: 38px;\n background: var(--profiler-header-bg);\n border-bottom: 1px solid var(--profiler-border);\n}\n\n.tab-btn {\n position: relative;\n background: transparent;\n border: none;\n /*border-right: 1px solid var(--profiler-border);*/\n color: var(--text-secondary);\n padding: 8px 18px;\n cursor: default;\n display: flex;\n align-items: center;\n font-family: var(--font-family);\n font-weight: 600;\n font-size: 14px;\n user-select: none;\n transition: opacity 0.2s, transform 0.2s;\n touch-action: pan-x;\n}\n\n.tab-btn.active {\n border-bottom: 2px solid var(--accent-color);\n color: white;\n}\n\n.tab-btn.active::before {\n content: '⋮⋮';\n position: absolute;\n left: 3px;\n top: calc(50% - .1rem);\n transform: translateY(-50%);\n color: var(--profiler-border);\n font-size: 18px;\n letter-spacing: -2px;\n opacity: 0.6;\n}\n\n.tab-btn.no-detach.active::before {\n display: none;\n}\n\n#floating-btn,\n#maximize-btn,\n#hide-panel-btn {\n background: transparent;\n border: none;\n border-left: 1px solid var(--profiler-border);\n color: var(--text-secondary);\n width: 45px;\n height: 100%;\n cursor: pointer;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n}\n\n/* Disable transitions in vertical mode to avoid broken animations */\n#profiler-panel.position-right #floating-btn,\n#profiler-panel.position-right #maximize-btn,\n#profiler-panel.position-right #hide-panel-btn,\n#profiler-panel.position-left #floating-btn,\n#profiler-panel.position-left #maximize-btn,\n#profiler-panel.position-left #hide-panel-btn {\n transition: background-color 0.2s, color 0.2s;\n}\n\n#floating-btn:hover,\n#maximize-btn:hover,\n#hide-panel-btn:hover {\n background-color: rgba(255, 255, 255, 0.1);\n color: var(--text-primary);\n}\n\n/* Hide maximize button when there are no tabs */\n#profiler-panel.position-right.no-tabs #maximize-btn,\n#profiler-panel.position-left.no-tabs #maximize-btn,\n#profiler-panel.position-bottom.no-tabs #maximize-btn,\n#profiler-panel.position-top.no-tabs #maximize-btn {\n display: none !important;\n}\n\n.profiler-content-wrapper {\n flex-grow: 1;\n overflow: hidden;\n position: relative;\n}\n\n.profiler-content {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n overflow-y: auto;\n font-size: 13px;\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.2s, visibility 0.2s;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n user-select: none;\n -webkit-user-select: none;\n}\n\n.profiler-content.active {\n visibility: visible;\n opacity: 1;\n}\n\n.profiler-content {\n overflow: auto; /* make sure scrollbars can appear */\n}\n\n.profiler-content::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n.profiler-content::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.profiler-content::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.25);\n border-radius: 10px;\n transition: background 0.3s ease;\n}\n\n.profiler-content::-webkit-scrollbar-thumb:hover {\n background-color: rgba(0, 0, 0, 0.4);\n}\n\n.profiler-content::-webkit-scrollbar-corner {\n background: transparent;\n}\n\n.profiler-content {\n scrollbar-width: thin; /* \"auto\" | \"thin\" */\n scrollbar-color: rgba(0, 0, 0, 0.25) transparent;\n}\n\n.list-item-row {\n display: grid;\n align-items: center;\n padding: 4px 8px;\n border-radius: 3px;\n transition: background-color 0.2s;\n gap: 10px;\n border-bottom: none;\n user-select: none;\n -webkit-user-select: none;\n}\n\n.parameters .list-item-row {\n min-height: 31px;\n}\n\n.mini-panel-content .parameters .list-item-row {\n min-height: 21px;\n}\n\n.list-item-wrapper {\n margin-top: 2px;\n margin-bottom: 2px;\n user-select: none;\n -webkit-user-select: none;\n}\n\n.list-item-wrapper:first-child {\n /*margin-top: 0;*/\n}\n\n.list-item-wrapper:not(.header-wrapper):nth-child(odd) > .list-item-row {\n background-color: rgba(0,0,0,0.1);\n}\n\n.list-item-wrapper.header-wrapper>.list-item-row {\n color: var(--accent-color);\n background-color: rgba(0, 170, 255, 0.1);\n}\n\n.list-item-wrapper.header-wrapper>.list-item-row>.list-item-cell:first-child {\n font-weight: 600;\n line-height: 1;\n}\n\n.list-item-row.collapsible,\n.list-item-row.actionable {\n cursor: pointer;\n}\n\n.list-item-row.collapsible {\n background-color: rgba(0, 170, 255, 0.15) !important;\n min-height: 23px;\n}\n\n.list-item-row.collapsible.alert,\n.list-item-row.alert {\n background-color: rgba(244, 67, 54, 0.1) !important;\n}\n\n@media (hover: hover) {\n\n .list-item-row:hover:not(.collapsible):not(.no-hover),\n .list-item-row:hover:not(.no-hover),\n .list-item-row.actionable:hover,\n .list-item-row.collapsible.actionable:hover {\n background-color: rgba(255, 255, 255, 0.05) !important;\n }\n\n .list-item-row.collapsible:hover {\n background-color: rgba(0, 170, 255, 0.25) !important;\n }\n\n}\n\n.list-item-cell {\n white-space: pre;\n display: flex;\n align-items: center;\n user-select: none;\n -webkit-user-select: none;\n}\n\n.list-item-cell:not(:first-child) {\n justify-content: flex-end;\n font-weight: 600;\n}\n\n.list-header {\n display: grid;\n align-items: center;\n padding: 4px 8px;\n font-weight: 600;\n color: var(--text-secondary);\n padding-bottom: 6px;\n border-bottom: 1px solid var(--profiler-border);\n margin-bottom: 5px;\n gap: 10px;\n user-select: none;\n -webkit-user-select: none;\n}\n\n.list-item-wrapper.section-start {\n margin-top: 5px;\n margin-bottom: 5px;\n}\n\n.list-header .list-header-cell:not(:first-child) {\n text-align: right;\n}\n\n.list-children-container {\n padding-left: 1.5em;\n overflow: hidden;\n transition: max-height 0.1s ease-out;\n margin-top: 2px;\n}\n\n.list-children-container.closed {\n max-height: 0;\n}\n\n.item-toggler {\n display: inline-block;\n margin-right: 0.8em;\n text-align: left;\n}\n\n.list-item-row.open .item-toggler::before {\n content: '-';\n}\n\n.list-item-row:not(.open) .item-toggler::before {\n content: '+';\n}\n\n.list-item-cell .value.good {\n color: var(--color-green);\n}\n\n.list-item-cell .value.warn {\n color: var(--color-yellow);\n}\n\n.list-item-cell .value.bad {\n color: var(--color-red);\n}\n\n.list-scroll-wrapper {\n width: max-content;\n min-width: 100%;\n display: flex;\n flex-direction: column;\n min-height: 100%;\n}\n\n.list-container.parameters .list-item-row:not(.collapsible) {\n}\n\n.graph-container {\n width: 100%;\n box-sizing: border-box;\n padding: 8px 0;\n position: relative;\n}\n\n.graph-svg {\n width: 100%;\n height: 80px;\n background-color: var(--profiler-header);\n border: 1px solid var(--profiler-border);\n border-radius: 4px;\n}\n\n.graph-path {\n stroke-width: 2;\n fill-opacity: 0.4;\n}\n\n.console-header {\n padding: 10px;\n border-bottom: 1px solid var(--profiler-border);\n display: flex;\n gap: 20px;\n flex-shrink: 0;\n align-items: center;\n justify-content: space-between;\n}\n\n.console-buttons-group {\n display: flex;\n gap: 20px;\n}\n\n.console-filter-input {\n background-color: var(--profiler-bg);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px 8px;\n font-family: var(--font-mono);\n flex-grow: 1;\n max-width: 300px;\n border-radius: 15px;\n}\n\n.console-filter-input:focus {\n outline: none;\n border-color: var(--text-secondary);\n}\n\n.console-copy-button {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n cursor: pointer;\n padding: 4px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n transition: color 0.2s, background-color 0.2s;\n}\n\n.console-copy-button:hover {\n color: var(--text-primary);\n background-color: var(--profiler-hover);\n}\n\n.console-copy-button.copied {\n color: var(--color-green);\n}\n\n#console-log {\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 10px;\n overflow-y: auto;\n flex-grow: 1;\n user-select: text;\n -webkit-user-select: text;\n}\n\n.log-message {\n padding: 2px 5px;\n white-space: pre-wrap;\n word-break: break-all;\n border-radius: 3px;\n line-height: 1.5 !important;\n}\n\n.log-message.hidden {\n display: none;\n}\n\n.log-message.info {\n color: var(--text-primary);\n}\n\n.log-message.warn {\n color: var(--color-yellow);\n}\n\n.log-message.error {\n color: #f9dedc;\n background-color: rgba(244, 67, 54, 0.1);\n}\n\n.log-prefix {\n color: var(--text-secondary);\n margin-right: 8px;\n}\n\n.log-code {\n background-color: rgba(255, 255, 255, 0.1);\n border-radius: 3px;\n padding: 1px 4px;\n}\n\n.thumbnail-container {\n display: flex;\n align-items: center;\n}\n\n.thumbnail-svg {\n width: 40px;\n height: 22.5px;\n flex-shrink: 0;\n margin-right: 8px;\n}\n\n.param-control {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 10px;\n width: 100%;\n}\n\n.param-control input,\n.param-control select,\n.param-control button {\n background-color: var(--profiler-bg);\n border: 1px solid var(--profiler-border);\n color: var(--text-primary);\n border-radius: 4px;\n padding: 4px 6px;\n padding-bottom: 2px;\n font-family: var(--font-mono);\n width: 100%;\n box-sizing: border-box;\n}\n\n.param-control input:focus {\n outline: none;\n border-color: var(--accent-color);\n}\n\n.param-control select {\n padding-top: 3px;\n padding-bottom: 1px;\n}\n\n.param-control input[type=\"number\"] {\n cursor: ns-resize;\n}\n\n.param-control input[type=\"color\"] {\n padding: 2px;\n}\n\n.param-control button {\n cursor: pointer;\n transition: background-color 0.2s;\n}\n\n.param-control button:hover {\n background-color: var(--profiler-header);\n}\n\n.param-control-vector {\n display: flex;\n gap: 5px;\n}\n\n.custom-checkbox {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n gap: 8px;\n will-change: transform;\n}\n\n.custom-checkbox input {\n display: none;\n}\n\n.custom-checkbox .checkmark {\n width: 14px;\n height: 14px;\n border: 1px solid var(--accent-color);\n border-radius: 3px;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n transition: background-color 0.2s, border-color 0.2s;\n}\n\n.custom-checkbox .checkmark::after {\n content: '';\n width: 6px;\n height: 6px;\n background-color: var(--accent-color);\n border-radius: 1px;\n display: block;\n transform: scale(0);\n transition: transform 0.2s;\n}\n\n.custom-checkbox input:checked+.checkmark {\n border-color: var(--accent-color);\n}\n\n.custom-checkbox input:checked+.checkmark::after {\n transform: scale(1);\n}\n\n.param-control input[type=\"range\"] {\n -webkit-appearance: none;\n appearance: none;\n width: 100%;\n height: 16px;\n background: var(--profiler-header);\n border-radius: 5px;\n border: 1px solid var(--profiler-border);\n outline: none;\n padding: 0px;\n padding-top: 8px;\n}\n\n.param-control input[type=\"range\"]::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 18px;\n height: 18px;\n background: var(--profiler-bg);\n border: 1px solid var(--accent-color);\n border-radius: 3px;\n cursor: pointer;\n margin-top: -8px;\n}\n\n.param-control input[type=\"range\"]::-moz-range-thumb {\n width: 18px;\n height: 18px;\n background: var(--profiler-bg);\n border: 2px solid var(--accent-color);\n border-radius: 3px;\n cursor: pointer;\n}\n\n.param-control input[type=\"range\"]::-moz-range-track {\n width: 100%;\n height: 16px;\n background: var(--profiler-header);\n border-radius: 5px;\n border: 1px solid var(--profiler-border);\n}\n\n/* Override .param-control styles for mini-panel-content */\n.mini-panel-content input,\n.mini-panel-content select,\n.mini-panel-content button {\n padding: 2px 4px;\n height: 21px;\n line-height: 1.4;\n padding-top: 4px;\n}\n\n.mini-panel-content .param-control input,\n.mini-panel-content .param-control select,\n.mini-panel-content .param-control button {\n background-color: #1e1e24c2;\n line-height: 1.0;\n}\n\n.mini-panel-content .param-control select {\n padding: 2px 2px;\n padding-top: 3px;\n}\n\n.mini-panel-content .param-control input[type=\"number\"]::-webkit-outer-spin-button,\n.mini-panel-content .param-control input[type=\"number\"]::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n.mini-panel-content .param-control input[type=\"number\"] {\n -moz-appearance: textfield;\n}\n\n.mini-panel-content .list-item-cell span {\n position: relative;\n top: 1px;\n margin-left: 2px;\n}\n\n.mini-panel-content .custom-checkbox .checkmark {\n width: 12px;\n height: 12px;\n margin-bottom: 2px;\n will-change: transform;\n}\n\n.mini-panel-content .list-container.parameters .list-item-row:not(.collapsible) {\n margin-bottom: 2px;\n}\n\n@media screen and (max-width: 450px) and (orientation: portrait) {\n\n .console-filter-input {\n max-width: 100px;\n }\n\n}\n\n/* Touch device optimizations */\n@media (hover: none) and (pointer: coarse) {\n\n .panel-resizer {\n top: -10px !important;\n height: 20px !important;\n }\n\n #profiler-panel.position-top .panel-resizer {\n top: auto !important;\n bottom: -10px !important;\n height: 20px !important;\n }\n\n #profiler-panel.position-left .panel-resizer {\n right: -10px !important;\n width: 20px !important;\n height: 100% !important;\n }\n\n #profiler-panel.position-right .panel-resizer {\n left: -10px !important;\n width: 20px !important;\n height: 100% !important;\n }\n\n .detached-tab-resizer-top,\n .detached-tab-resizer-bottom {\n height: 10px !important;\n }\n\n .detached-tab-resizer-left,\n .detached-tab-resizer-right {\n width: 10px !important;\n }\n\n}\n\n.drag-preview-indicator {\n position: fixed;\n background-color: rgba(0, 170, 255, 0.2);\n border: 2px dashed var(--accent-color);\n z-index: 999;\n pointer-events: none;\n transition: all 0.2s ease-out;\n}\n\n/* Detached Tab Windows */\n.detached-tab-panel {\n position: fixed;\n width: 500px;\n height: 400px;\n background: var(--profiler-bg);\n border: 1px solid var(--profiler-border);\n border-radius: 8px;\n box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);\n z-index: 1002;\n display: flex;\n flex-direction: column;\n backdrop-filter: blur(10px);\n overflow: hidden;\n opacity: 1;\n visibility: visible;\n transition: opacity 0.2s, visibility 0.2s;\n}\n\n#profiler-panel:not(.visible) ~ * .detached-tab-panel,\nbody:has(#profiler-panel:not(.visible)) .detached-tab-panel {\n opacity: 0;\n visibility: hidden;\n pointer-events: none;\n}\n\n.detached-tab-header {\n background: var(--profiler-header-bg);\n padding: 0 7px 0 15px;\n font-family: var(--font-family);\n font-size: 14px;\n color: var(--text-primary);\n font-weight: 600;\n display: flex;\n justify-content: space-between;\n align-items: center;\n border-bottom: 1px solid var(--profiler-border);\n cursor: grab;\n user-select: none;\n height: 38px;\n flex-shrink: 0;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n touch-action: none;\n}\n\n.detached-tab-header:active {\n cursor: grabbing;\n}\n\n.detached-header-controls {\n display: flex;\n gap: 5px;\n}\n\n.detached-reattach-btn {\n background: transparent;\n border: none;\n color: var(--text-secondary);\n font-family: var(--font-family);\n font-size: 18px;\n line-height: 1;\n cursor: pointer;\n padding: 4px 8px;\n border-radius: 4px;\n transition: all 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.detached-reattach-btn:hover {\n background: rgba(0, 170, 255, 0.2);\n color: var(--accent-color);\n}\n\n.detached-tab-content {\n flex: 1;\n overflow: auto;\n position: relative;\n background: var(--profiler-bg);\n}\n\n.detached-tab-content::-webkit-scrollbar {\n width: 8px;\n height: 8px;\n}\n\n.detached-tab-content::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.detached-tab-content::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.25);\n border-radius: 10px;\n transition: background 0.3s ease;\n}\n\n.detached-tab-content::-webkit-scrollbar-thumb:hover {\n background-color: rgba(0, 0, 0, 0.4);\n}\n\n.detached-tab-content::-webkit-scrollbar-corner {\n background: transparent;\n}\n\n.detached-tab-content .profiler-content {\n display: block !important;\n height: 100%;\n visibility: visible !important;\n opacity: 1 !important;\n position: relative !important;\n}\n\n.detached-tab-content .profiler-content > * {\n font-family: var(--font-mono);\n color: var(--text-primary);\n}\n\n.detached-tab-resizer {\n position: absolute;\n bottom: 0;\n right: 0;\n width: 20px;\n height: 20px;\n cursor: nwse-resize;\n z-index: 10;\n touch-action: none;\n}\n\n.detached-tab-resizer::after {\n content: '';\n position: absolute;\n bottom: 2px;\n right: 2px;\n width: 12px;\n height: 12px;\n border-right: 2px solid var(--profiler-border);\n border-bottom: 2px solid var(--profiler-border);\n border-bottom-right-radius: 6px;\n opacity: 0.5;\n}\n\n.detached-tab-resizer:hover::after {\n opacity: 1;\n border-color: var(--accent-color);\n}\n\n/* Edge resizers */\n.detached-tab-resizer-top {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 5px;\n cursor: ns-resize;\n z-index: 10;\n touch-action: none;\n}\n\n.detached-tab-resizer-right {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n width: 5px;\n cursor: ew-resize;\n z-index: 10;\n touch-action: none;\n}\n\n.detached-tab-resizer-bottom {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 5px;\n cursor: ns-resize;\n z-index: 10;\n touch-action: none;\n}\n\n.detached-tab-resizer-left {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n width: 5px;\n cursor: ew-resize;\n z-index: 10;\n touch-action: none;\n}\n\n/* Input number spin buttons - hide arrows */\n/* Chrome, Safari, Edge, Opera */\n#profiler-panel input[type=\"number\"]::-webkit-outer-spin-button,\n#profiler-panel input[type=\"number\"]::-webkit-inner-spin-button,\n.detached-tab-content input[type=\"number\"]::-webkit-outer-spin-button,\n.detached-tab-content input[type=\"number\"]::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/* Firefox */\n#profiler-panel input[type=\"number\"],\n.detached-tab-content input[type=\"number\"] {\n -moz-appearance: textfield;\n}\n\n.panel-action-btn {\n background: transparent;\n color: var(--text-primary);\n border: 1px solid var(--profiler-border);\n border-radius: 4px;\n padding: 6px 12px;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: 12px;\n transition: background-color 0.2s;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.panel-action-btn:hover {\n background-color: rgba(255, 255, 255, 0.05);\n}\n", document.head.appendChild(e);
297
369
  }
298
- }, et = class extends b {
370
+ }, Ut = class extends ee {
299
371
  constructor(e) {
300
- super(), this.inspector = e, this.tabs = {}, this.activeTabId = null, this.isResizing = !1, this.lastHeightBottom = 350, this.lastWidthRight = 450, this.position = "bottom", this.detachedWindows = [], this.maxZIndex = 1002, this.nextTabOriginalIndex = 0, $e.init(), this.setupShell(), this.setupResizing(), this.setupWindowResizeListener(), this.setupOrientationListener();
372
+ super(), this.inspector = e, this.tabs = {}, this.activeTabId = null, this.isResizing = !1, this.lastHeightBottom = 350, this.lastWidthRight = 450, this.position = "bottom", this.detachedWindows = [], this.maxZIndex = 1002, this.nextTabOriginalIndex = 0, Ht.init(), this.setupShell(), this.setupResizing(), this.setupWindowResizeListener(), this.setupOrientationListener();
301
373
  }
302
374
  getSize() {
303
375
  return this.panel.classList.contains("visible") === !1 || this.panel.classList.contains("no-tabs") ? {
@@ -655,7 +727,7 @@ var L = /* @__PURE__ */ new Te(), Ue = /* @__PURE__ */ new h(), We = /* @__PURE_
655
727
  });
656
728
  });
657
729
  try {
658
- $("layout", e);
730
+ bn("layout", e);
659
731
  } catch (e) {
660
732
  console.warn("Failed to save profiler layout:", e);
661
733
  }
@@ -663,7 +735,7 @@ var L = /* @__PURE__ */ new Te(), Ue = /* @__PURE__ */ new h(), We = /* @__PURE_
663
735
  loadLayout() {
664
736
  this.isLoadingLayout = !0;
665
737
  try {
666
- let e = Q("layout");
738
+ let e = yn("layout");
667
739
  if (Object.keys(e).length === 0) return;
668
740
  if (e.detachedTabs && e.detachedTabs.length > 0) {
669
741
  let t = window.innerWidth, n = window.innerHeight;
@@ -710,7 +782,7 @@ var L = /* @__PURE__ */ new Te(), Ue = /* @__PURE__ */ new h(), We = /* @__PURE_
710
782
  this.updatePanelSize();
711
783
  }
712
784
  }
713
- }, B = class extends b {
785
+ }, q = class extends ee {
714
786
  constructor(e, t = {}) {
715
787
  super(), this.id = e.toLowerCase(), this.button = document.createElement("button"), this.button.className = "tab-btn", this.button.textContent = e, this.content = document.createElement("div"), this.content.id = `${this.id}-content`, this.content.className = "profiler-content", this._isActive = !1, this.isVisible = !0, this.isDetached = !1, this.detachedWindow = null, this.allowDetach = t.allowDetach === void 0 ? !0 : t.allowDetach, this.builtin = t.builtin === void 0 ? !1 : t.builtin, this.icon = t.icon || null, this.builtinButton = null, this.miniContent = null, this.profiler = null, this.onVisibilityChange = null;
716
788
  }
@@ -750,7 +822,7 @@ var L = /* @__PURE__ */ new Te(), Ue = /* @__PURE__ */ new h(), We = /* @__PURE_
750
822
  this.builtinButton && this.builtinButton.classList.remove("active"), this.profiler && (Array.from(this.profiler.miniPanel.querySelectorAll(".mini-panel-content")).some((e) => e.style.display !== "none") || this.profiler.miniPanel.classList.remove("visible"), Array.from(this.profiler.builtinTabsContainer.querySelectorAll(".builtin-tab-btn")).some((e) => e.style.display !== "none") || (this.profiler.builtinTabsContainer.style.display = "none"));
751
823
  }
752
824
  }
753
- }, V = class {
825
+ }, Wt = class {
754
826
  constructor(...e) {
755
827
  this.headers = e, this.children = [], this.domElement = document.createElement("div"), this.domElement.className = "list-container", this.domElement.style.padding = "10px", this.id = `list-${Math.random().toString(36).slice(2, 11)}`, this.domElement.dataset.listId = this.id, this.gridStyleElement = document.createElement("style"), this.domElement.appendChild(this.gridStyleElement);
756
828
  let t = document.createElement("div");
@@ -774,7 +846,7 @@ var L = /* @__PURE__ */ new Te(), Ue = /* @__PURE__ */ new h(), We = /* @__PURE_
774
846
  let t = this.children.indexOf(e);
775
847
  return t !== -1 && (this.children.splice(t, 1), this.domElement.removeChild(e.domElement), e.parent = null), this;
776
848
  }
777
- }, H = class {
849
+ }, Gt = class {
778
850
  constructor(e = 512) {
779
851
  this.maxPoints = e, this.lines = {}, this.limit = 0, this.limitIndex = 0, this.domElement = document.createElementNS("http://www.w3.org/2000/svg", "svg"), this.domElement.setAttribute("class", "graph-svg");
780
852
  }
@@ -809,7 +881,7 @@ var L = /* @__PURE__ */ new Te(), Ue = /* @__PURE__ */ new h(), We = /* @__PURE_
809
881
  }
810
882
  this.limitIndex++ > this.maxPoints && this.resetLimit();
811
883
  }
812
- }, U = class {
884
+ }, J = class {
813
885
  constructor(...e) {
814
886
  this.children = [], this.isOpen = !0, this.childrenContainer = null, this.parent = null, this.domElement = document.createElement("div"), this.domElement.className = "list-item-wrapper", this.itemRow = document.createElement("div"), this.itemRow.className = "list-item-row", this.userData = {}, this.data = e, this.data.forEach((e) => {
815
887
  let t = document.createElement("div");
@@ -839,15 +911,15 @@ var L = /* @__PURE__ */ new Te(), Ue = /* @__PURE__ */ new h(), We = /* @__PURE_
839
911
  };
840
912
  //#endregion
841
913
  //#region ../../node_modules/three/examples/jsm/inspector/ui/utils.js
842
- function W(e = null) {
914
+ function Y(e = null) {
843
915
  let t = document.createElement("span");
844
916
  return t.className = "value", e !== null && (t.id = e), t;
845
917
  }
846
- function G(e, t) {
918
+ function X(e, t) {
847
919
  let n = e instanceof HTMLElement ? e : document.getElementById(e);
848
920
  n && n.textContent !== t && (n.textContent = t);
849
921
  }
850
- function tt(e) {
922
+ function Kt(e) {
851
923
  let t = e.lastIndexOf("/");
852
924
  return t === -1 ? {
853
925
  path: "",
@@ -857,10 +929,10 @@ function tt(e) {
857
929
  name: e.substring(t + 1).trim()
858
930
  };
859
931
  }
860
- function nt(e) {
932
+ function qt(e) {
861
933
  return e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").trim();
862
934
  }
863
- function K(e, t = 2) {
935
+ function Z(e, t = 2) {
864
936
  if (e === 0) return "0 Bytes";
865
937
  let n = 1024, r = t < 0 ? 0 : t, i = [
866
938
  "Bytes",
@@ -877,36 +949,36 @@ function K(e, t = 2) {
877
949
  }
878
950
  //#endregion
879
951
  //#region ../../node_modules/three/examples/jsm/inspector/tabs/Performance.js
880
- var rt = class extends B {
952
+ var Jt = class extends q {
881
953
  constructor(e = {}) {
882
954
  super("Performance", e);
883
- let t = new V("Name", "CPU", "GPU", "Total");
955
+ let t = new Wt("Name", "CPU", "GPU", "Total");
884
956
  t.setGridStyle("minmax(200px, 2fr) 80px 80px 80px"), t.domElement.style.minWidth = "600px";
885
957
  let n = document.createElement("div");
886
958
  n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n);
887
959
  let r = document.createElement("div");
888
960
  r.className = "graph-container";
889
- let i = new H();
961
+ let i = new Gt();
890
962
  i.addLine("fps", "var( --color-fps )"), r.append(i.domElement);
891
- let a = new U("Graph Stats", W(), W(), W("graph-fps-counter"));
963
+ let a = new J("Graph Stats", Y(), Y(), Y("graph-fps-counter"));
892
964
  t.add(a);
893
- let o = new U(r);
965
+ let o = new J(r);
894
966
  o.itemRow.childNodes[0].style.gridColumn = "1 / -1", a.add(o);
895
- let s = new U("Frame Stats", W(), W(), W());
967
+ let s = new J("Frame Stats", Y(), Y(), Y());
896
968
  t.add(s);
897
- let c = new U("Miscellaneous & Idle", W(), W(), W());
969
+ let c = new J("Miscellaneous & Idle", Y(), Y(), Y());
898
970
  c.domElement.firstChild.style.backgroundColor = "#00ff0b1a", c.domElement.firstChild.classList.add("no-hover"), s.add(c), this.notInUse = /* @__PURE__ */ new Map(), this.frameStats = s, this.graphStats = a, this.graph = i, this.miscellaneous = c, this.currentRender = null, this.currentItem = null, this.frameItems = /* @__PURE__ */ new Map();
899
971
  }
900
972
  resolveStats(e, t) {
901
973
  let n = e.getStatsData(t.cid), r = n.item;
902
- if (r === void 0) r = new U(W(), W(), W(), W()), t.name ? t.isComputeStats === !0 && (t.name = `${t.name} [ Compute ]`) : t.name = `Unnamed ${t.cid}`, r.userData.name = t.name, this.currentItem.add(r), n.item = r;
974
+ if (r === void 0) r = new J(Y(), Y(), Y(), Y()), t.name ? t.isComputeStats === !0 && (t.name = `${t.name} [ Compute ]`) : t.name = `Unnamed ${t.cid}`, r.userData.name = t.name, this.currentItem.add(r), n.item = r;
903
975
  else {
904
976
  r.userData.name = t.name, this.notInUse.has(t.cid) && (r.domElement.firstElementChild.classList.remove("alert"), this.notInUse.delete(t.cid));
905
977
  let e = t.parent.children.indexOf(t);
906
978
  (r.parent === null || r.parent.children.indexOf(r) !== e) && this.currentItem.add(r, e);
907
979
  }
908
980
  let i = r.userData.name;
909
- t.isComputeStats && (i += " [ Compute ]"), G(r.data[0], i), G(r.data[1], n.cpu.toFixed(2)), G(r.data[2], t.gpuNotAvailable === !0 ? "-" : n.gpu.toFixed(2)), G(r.data[3], n.total.toFixed(2));
981
+ t.isComputeStats && (i += " [ Compute ]"), X(r.data[0], i), X(r.data[1], n.cpu.toFixed(2)), X(r.data[2], t.gpuNotAvailable === !0 ? "-" : n.gpu.toFixed(2)), X(r.data[3], n.total.toFixed(2));
910
982
  let a = this.currentItem;
911
983
  this.currentItem = r;
912
984
  for (let n of t.children) this.resolveStats(e, n);
@@ -925,7 +997,7 @@ var rt = class extends B {
925
997
  let { item: t, time: n } = this.notInUse.get(e), r = performance.now(), i = 5 - Math.floor((r - n) / 1e3);
926
998
  if (i >= 0) {
927
999
  let e = "*".repeat(Math.max(0, i));
928
- G(t.domElement.querySelector(".list-item-cell .value"), t.userData.name + " (not in use) " + e);
1000
+ X(t.domElement.querySelector(".list-item-cell .value"), t.userData.name + " (not in use) " + e);
929
1001
  } else t.domElement.firstElementChild.classList.remove("alert"), t.parent.remove(t), this.notInUse.delete(e);
930
1002
  }
931
1003
  updateText(e, t) {
@@ -934,23 +1006,23 @@ var rt = class extends B {
934
1006
  for (let n of t.children) this.resolveStats(e, n);
935
1007
  for (let [e, t] of n) this.frameItems.has(e) || (this.addNotInUse(e, t), n.delete(e));
936
1008
  for (let e of this.notInUse.keys()) this.updateNotInUse(e);
937
- G("graph-fps-counter", e.fps.toFixed() + " FPS"), G(this.frameStats.data[1], t.cpu.toFixed(2)), G(this.frameStats.data[2], t.gpu.toFixed(2)), G(this.frameStats.data[3], t.total.toFixed(2)), G(this.miscellaneous.data[1], t.miscellaneous.toFixed(2)), G(this.miscellaneous.data[2], "-"), G(this.miscellaneous.data[3], t.miscellaneous.toFixed(2)), this.currentItem = null;
1009
+ X("graph-fps-counter", e.fps.toFixed() + " FPS"), X(this.frameStats.data[1], t.cpu.toFixed(2)), X(this.frameStats.data[2], t.gpu.toFixed(2)), X(this.frameStats.data[3], t.total.toFixed(2)), X(this.miscellaneous.data[1], t.miscellaneous.toFixed(2)), X(this.miscellaneous.data[2], "-"), X(this.miscellaneous.data[3], t.miscellaneous.toFixed(2)), this.currentItem = null;
938
1010
  }
939
- }, it = class extends B {
1011
+ }, Yt = class extends q {
940
1012
  constructor(e = {}) {
941
1013
  super("Memory", e);
942
- let t = new V("Name", "Count", "Size");
1014
+ let t = new Wt("Name", "Count", "Size");
943
1015
  t.setGridStyle("minmax(200px, 2fr) 60px 100px"), t.domElement.style.minWidth = "300px";
944
1016
  let n = document.createElement("div");
945
1017
  n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n);
946
1018
  let r = document.createElement("div");
947
1019
  r.className = "graph-container";
948
- let i = new H();
1020
+ let i = new Gt();
949
1021
  i.addLine("total", "var( --color-yellow )"), r.append(i.domElement);
950
- let a = new U("Graph Stats", "", "");
1022
+ let a = new J("Graph Stats", "", "");
951
1023
  t.add(a);
952
- let o = new U(r);
953
- o.itemRow.childNodes[0].style.gridColumn = "1 / -1", a.add(o), this.memoryStats = new U("Renderer Info", "", W()), this.memoryStats.domElement.firstChild.classList.add("no-hover"), t.add(this.memoryStats), this.attributes = new U("Attributes", W(), W()), this.memoryStats.add(this.attributes), this.geometries = new U("Geometries", W(), "N/A"), this.memoryStats.add(this.geometries), this.indexAttributes = new U("Index Attributes", W(), W()), this.memoryStats.add(this.indexAttributes), this.indirectStorageAttributes = new U("Indirect Storage Attributes", W(), W()), this.memoryStats.add(this.indirectStorageAttributes), this.programs = new U("Programs", W(), W()), this.memoryStats.add(this.programs), this.readbackBuffers = new U("Readback Buffers", W(), W()), this.memoryStats.add(this.readbackBuffers), this.renderTargets = new U("Render Targets", W(), "N/A"), this.memoryStats.add(this.renderTargets), this.storageAttributes = new U("Storage Attributes", W(), W()), this.memoryStats.add(this.storageAttributes), this.textures = new U("Textures", W(), W()), this.memoryStats.add(this.textures), this.graph = i;
1024
+ let o = new J(r);
1025
+ o.itemRow.childNodes[0].style.gridColumn = "1 / -1", a.add(o), this.memoryStats = new J("Renderer Info", "", Y()), this.memoryStats.domElement.firstChild.classList.add("no-hover"), t.add(this.memoryStats), this.attributes = new J("Attributes", Y(), Y()), this.memoryStats.add(this.attributes), this.geometries = new J("Geometries", Y(), "N/A"), this.memoryStats.add(this.geometries), this.indexAttributes = new J("Index Attributes", Y(), Y()), this.memoryStats.add(this.indexAttributes), this.indirectStorageAttributes = new J("Indirect Storage Attributes", Y(), Y()), this.memoryStats.add(this.indirectStorageAttributes), this.programs = new J("Programs", Y(), Y()), this.memoryStats.add(this.programs), this.readbackBuffers = new J("Readback Buffers", Y(), Y()), this.memoryStats.add(this.readbackBuffers), this.renderTargets = new J("Render Targets", Y(), "N/A"), this.memoryStats.add(this.renderTargets), this.storageAttributes = new J("Storage Attributes", Y(), Y()), this.memoryStats.add(this.storageAttributes), this.textures = new J("Textures", Y(), Y()), this.memoryStats.add(this.textures), this.graph = i;
954
1026
  }
955
1027
  updateGraph(e) {
956
1028
  let t = e.getRenderer();
@@ -962,9 +1034,9 @@ var rt = class extends B {
962
1034
  let t = e.getRenderer();
963
1035
  if (!t) return;
964
1036
  let n = t.info.memory;
965
- G(this.memoryStats.data[2], K(n.total)), G(this.attributes.data[1], n.attributes.toString()), G(this.attributes.data[2], K(n.attributesSize)), G(this.geometries.data[1], n.geometries.toString()), G(this.indexAttributes.data[1], n.indexAttributes.toString()), G(this.indexAttributes.data[2], K(n.indexAttributesSize)), G(this.indirectStorageAttributes.data[1], n.indirectStorageAttributes.toString()), G(this.indirectStorageAttributes.data[2], K(n.indirectStorageAttributesSize)), G(this.programs.data[1], n.programs.toString()), G(this.programs.data[2], K(n.programsSize)), G(this.readbackBuffers.data[1], n.readbackBuffers.toString()), G(this.readbackBuffers.data[2], K(n.readbackBuffersSize)), G(this.renderTargets.data[1], n.renderTargets.toString()), G(this.storageAttributes.data[1], n.storageAttributes.toString()), G(this.storageAttributes.data[2], K(n.storageAttributesSize)), G(this.textures.data[1], n.textures.toString()), G(this.textures.data[2], K(n.texturesSize));
1037
+ X(this.memoryStats.data[2], Z(n.total)), X(this.attributes.data[1], n.attributes.toString()), X(this.attributes.data[2], Z(n.attributesSize)), X(this.geometries.data[1], n.geometries.toString()), X(this.indexAttributes.data[1], n.indexAttributes.toString()), X(this.indexAttributes.data[2], Z(n.indexAttributesSize)), X(this.indirectStorageAttributes.data[1], n.indirectStorageAttributes.toString()), X(this.indirectStorageAttributes.data[2], Z(n.indirectStorageAttributesSize)), X(this.programs.data[1], n.programs.toString()), X(this.programs.data[2], Z(n.programsSize)), X(this.readbackBuffers.data[1], n.readbackBuffers.toString()), X(this.readbackBuffers.data[2], Z(n.readbackBuffersSize)), X(this.renderTargets.data[1], n.renderTargets.toString()), X(this.storageAttributes.data[1], n.storageAttributes.toString()), X(this.storageAttributes.data[2], Z(n.storageAttributesSize)), X(this.textures.data[1], n.textures.toString()), X(this.textures.data[2], Z(n.texturesSize));
966
1038
  }
967
- }, at = class extends B {
1039
+ }, Xt = class extends q {
968
1040
  constructor(e = {}) {
969
1041
  super("Console", e), this.filters = {
970
1042
  info: !0,
@@ -1035,7 +1107,7 @@ var rt = class extends B {
1035
1107
  let r = this.filters[e], i = t.toLowerCase().includes(this.filterText);
1036
1108
  n.classList.toggle("hidden", !(r && i)), this.logContainer.appendChild(n), this.logContainer.scrollTop = this.logContainer.scrollHeight, this.logContainer.children.length > 200 && this.logContainer.removeChild(this.logContainer.firstChild);
1037
1109
  }
1038
- }, q = class extends b {
1110
+ }, Q = class extends ee {
1039
1111
  constructor() {
1040
1112
  super(), this.domElement = document.createElement("div"), this.domElement.className = "param-control", this._onChangeFunction = null, this.addEventListener("change", (e) => {
1041
1113
  requestAnimationFrame(() => {
@@ -1058,7 +1130,7 @@ var rt = class extends B {
1058
1130
  onChange(e) {
1059
1131
  return this._onChangeFunction = e, this;
1060
1132
  }
1061
- }, ot = class extends q {
1133
+ }, Zt = class extends Q {
1062
1134
  constructor({ value: e = 0, step: t = .1, min: n = -Infinity, max: r = Infinity }) {
1063
1135
  super(), this.input = document.createElement("input"), this.input.type = "number", this.input.value = e, this.input.step = t, this.input.min = n, this.input.max = r, this.input.addEventListener("change", this._onChangeValue.bind(this)), this.domElement.appendChild(this.input), this.addDragHandler();
1064
1136
  }
@@ -1089,7 +1161,7 @@ var rt = class extends B {
1089
1161
  getValue() {
1090
1162
  return parseFloat(this.input.value);
1091
1163
  }
1092
- }, st = class extends q {
1164
+ }, Qt = class extends Q {
1093
1165
  constructor({ value: e = !1 }) {
1094
1166
  super();
1095
1167
  let t = document.createElement("label");
@@ -1107,10 +1179,10 @@ var rt = class extends B {
1107
1179
  getValue() {
1108
1180
  return this.checkbox.checked;
1109
1181
  }
1110
- }, ct = class extends q {
1182
+ }, $t = class extends Q {
1111
1183
  constructor({ value: e = 0, min: t = 0, max: n = 1, step: r = .01 }) {
1112
1184
  super(), this.slider = document.createElement("input"), this.slider.type = "range", this.slider.min = t, this.slider.max = n, this.slider.step = r;
1113
- let i = new ot({
1185
+ let i = new Zt({
1114
1186
  value: e,
1115
1187
  min: t,
1116
1188
  max: n,
@@ -1131,7 +1203,7 @@ var rt = class extends B {
1131
1203
  step(e) {
1132
1204
  return this.slider.step = e, this.numberInput.step = e, this;
1133
1205
  }
1134
- }, lt = class extends q {
1206
+ }, en = class extends Q {
1135
1207
  constructor({ options: e = [], value: t = "" }) {
1136
1208
  super();
1137
1209
  let n = document.createElement("select"), r = (e, r) => {
@@ -1146,7 +1218,7 @@ var rt = class extends B {
1146
1218
  let e = this.options;
1147
1219
  return Array.isArray(e) ? e[this.select.selectedIndex] : e[this.select.value];
1148
1220
  }
1149
- }, ut = class extends q {
1221
+ }, tn = class extends Q {
1150
1222
  constructor({ value: e = "#ffffff" }) {
1151
1223
  super();
1152
1224
  let t = document.createElement("input");
@@ -1162,13 +1234,13 @@ var rt = class extends B {
1162
1234
  let e = this._value;
1163
1235
  return typeof e == "string" && (e = parseInt(e.slice(1), 16)), e;
1164
1236
  }
1165
- }, dt = class extends q {
1237
+ }, nn = class extends Q {
1166
1238
  constructor({ text: e = "Button", value: t = () => {} }) {
1167
1239
  super();
1168
1240
  let n = document.createElement("button");
1169
1241
  n.textContent = e, n.onclick = t, this.domElement.appendChild(n);
1170
1242
  }
1171
- }, ft = class extends q {
1243
+ }, rn = class extends Q {
1172
1244
  constructor({ value: e = "" }) {
1173
1245
  super();
1174
1246
  let t = document.createElement("input");
@@ -1182,9 +1254,9 @@ var rt = class extends B {
1182
1254
  getValue() {
1183
1255
  return this.input.value;
1184
1256
  }
1185
- }, pt = class e {
1257
+ }, an = class e {
1186
1258
  constructor(e, t) {
1187
- this.parameters = e, this.name = t, this.paramList = new U(t), this.objects = [];
1259
+ this.parameters = e, this.name = t, this.paramList = new J(t), this.objects = [];
1188
1260
  }
1189
1261
  close() {
1190
1262
  return this.paramList.close(), this;
@@ -1211,13 +1283,13 @@ var rt = class extends B {
1211
1283
  });
1212
1284
  }
1213
1285
  addString(e, t) {
1214
- let n = e[t], r = new ft({ value: n });
1286
+ let n = e[t], r = new rn({ value: n });
1215
1287
  r.addEventListener("change", ({ value: n }) => {
1216
1288
  e[t] = n;
1217
1289
  });
1218
- let i = W();
1290
+ let i = Y();
1219
1291
  i.textContent = t;
1220
- let a = new U(i, r.domElement);
1292
+ let a = new J(i, r.domElement);
1221
1293
  return this.paramList.add(a), a.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, r, a), r;
1222
1294
  }
1223
1295
  addFolder(t) {
@@ -1225,13 +1297,13 @@ var rt = class extends B {
1225
1297
  return this.paramList.add(n.paramList), n;
1226
1298
  }
1227
1299
  addBoolean(e, t) {
1228
- let n = e[t], r = new st({ value: n });
1300
+ let n = e[t], r = new Qt({ value: n });
1229
1301
  r.addEventListener("change", ({ value: n }) => {
1230
1302
  e[t] = n;
1231
1303
  });
1232
- let i = W();
1304
+ let i = Y();
1233
1305
  i.textContent = t;
1234
- let a = new U(i, r.domElement);
1306
+ let a = new J(i, r.domElement);
1235
1307
  this.paramList.add(a);
1236
1308
  let o = a.domElement.firstChild;
1237
1309
  return o.classList.add("actionable"), o.addEventListener("click", (e) => {
@@ -1241,30 +1313,30 @@ var rt = class extends B {
1241
1313
  }), this._addParameter(e, t, r, a), r;
1242
1314
  }
1243
1315
  addSelect(e, t, n) {
1244
- let r = e[t], i = new lt({
1316
+ let r = e[t], i = new en({
1245
1317
  options: n,
1246
1318
  value: r
1247
1319
  });
1248
1320
  i.addEventListener("change", ({ value: n }) => {
1249
1321
  e[t] = n;
1250
1322
  });
1251
- let a = W();
1323
+ let a = Y();
1252
1324
  a.textContent = t;
1253
- let o = new U(a, i.domElement);
1325
+ let o = new J(a, i.domElement);
1254
1326
  return this.paramList.add(o), o.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, i, o), i;
1255
1327
  }
1256
1328
  addColor(e, t) {
1257
- let n = e[t], r = new ut({ value: n });
1329
+ let n = e[t], r = new tn({ value: n });
1258
1330
  r.addEventListener("change", ({ value: n }) => {
1259
1331
  e[t] = n;
1260
1332
  });
1261
- let i = W();
1333
+ let i = Y();
1262
1334
  i.textContent = t;
1263
- let a = new U(i, r.domElement);
1335
+ let a = new J(i, r.domElement);
1264
1336
  return this.paramList.add(a), a.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, r, a), r;
1265
1337
  }
1266
1338
  addSlider(e, t, n = 0, r = 1, i = .01) {
1267
- let a = e[t], o = new ct({
1339
+ let a = e[t], o = new $t({
1268
1340
  value: a,
1269
1341
  min: n,
1270
1342
  max: r,
@@ -1273,13 +1345,13 @@ var rt = class extends B {
1273
1345
  o.addEventListener("change", ({ value: n }) => {
1274
1346
  e[t] = n;
1275
1347
  });
1276
- let s = W();
1348
+ let s = Y();
1277
1349
  s.textContent = t;
1278
- let c = new U(s, o.domElement);
1350
+ let c = new J(s, o.domElement);
1279
1351
  return this.paramList.add(c), c.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, o, c), o;
1280
1352
  }
1281
1353
  addNumber(e, t, ...n) {
1282
- let r = e[t], [i, a] = n, o = new ot({
1354
+ let r = e[t], [i, a] = n, o = new Zt({
1283
1355
  value: r,
1284
1356
  min: i,
1285
1357
  max: a
@@ -1287,81 +1359,81 @@ var rt = class extends B {
1287
1359
  o.addEventListener("change", ({ value: n }) => {
1288
1360
  e[t] = n;
1289
1361
  });
1290
- let s = W();
1362
+ let s = Y();
1291
1363
  s.textContent = t;
1292
- let c = new U(s, o.domElement);
1364
+ let c = new J(s, o.domElement);
1293
1365
  return this.paramList.add(c), c.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, o, c), o;
1294
1366
  }
1295
1367
  addButton(e, t) {
1296
- let n = e[t], r = new dt({
1368
+ let n = e[t], r = new nn({
1297
1369
  text: t,
1298
1370
  value: n
1299
1371
  });
1300
1372
  r.addEventListener("change", ({ value: n }) => {
1301
1373
  e[t] = n;
1302
1374
  });
1303
- let i = new U(r.domElement);
1375
+ let i = new J(r.domElement);
1304
1376
  return i.itemRow.childNodes[0].style.gridColumn = "1 / -1", this.paramList.add(i), i.domElement.firstChild.classList.add("actionable"), r.name = (e) => (r.domElement.childNodes[0].textContent = e, r), this._registerParameter(e, t, r, i), r;
1305
1377
  }
1306
- }, mt = class extends B {
1378
+ }, on = class extends q {
1307
1379
  constructor(e = {}) {
1308
1380
  super(e.name || "Parameters", e);
1309
- let t = new V("Property", "Value");
1381
+ let t = new Wt("Property", "Value");
1310
1382
  t.domElement.classList.add("parameters"), t.setGridStyle(".5fr 1fr"), t.domElement.style.minWidth = "300px";
1311
1383
  let n = document.createElement("div");
1312
1384
  n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n), this.paramList = t, this.groups = [];
1313
1385
  }
1314
1386
  createGroup(e) {
1315
- let t = new pt(this, e);
1387
+ let t = new an(this, e);
1316
1388
  return this.paramList.add(t.paramList), this.groups.push(t), t;
1317
1389
  }
1318
- }, ht = "../extensions/extensions.json", J = T.prototype.init;
1319
- function gt(e) {
1320
- e ? T.prototype.init = async function() {
1390
+ }, sn = "../extensions/extensions.json", cn = be.prototype.init;
1391
+ function ln(e) {
1392
+ e ? be.prototype.init = async function() {
1321
1393
  if (this.backend.isWebGLBackend !== !0) {
1322
1394
  let e = this.backend.parameters;
1323
- this.backend = new we(e);
1395
+ this.backend = new Ce(e);
1324
1396
  }
1325
- return J.call(this);
1326
- } : T.prototype.init = J;
1397
+ return cn.call(this);
1398
+ } : be.prototype.init = cn;
1327
1399
  }
1328
- var Y = null;
1329
- function _t() {
1330
- if (Y !== null) return Y;
1331
- let e = Q("settings");
1332
- return Y = {
1400
+ var $ = null;
1401
+ function un() {
1402
+ if ($ !== null) return $;
1403
+ let e = yn("settings");
1404
+ return $ = {
1333
1405
  forceWebGL: e.forceWebGL === void 0 ? !1 : e.forceWebGL,
1334
1406
  captureStackTrace: e.captureStackTrace === void 0 ? !1 : e.captureStackTrace,
1335
1407
  activeExtensions: e.activeExtensions === void 0 ? {} : e.activeExtensions
1336
- }, Y.forceWebGL && gt(!0), Y.captureStackTrace && (Ce.captureStackTrace = !0), Y;
1408
+ }, $.forceWebGL && ln(!0), $.captureStackTrace && (Se.captureStackTrace = !0), $;
1337
1409
  }
1338
- function X() {
1339
- $("settings", {
1340
- forceWebGL: Y.forceWebGL,
1341
- captureStackTrace: Y.captureStackTrace,
1342
- activeExtensions: Y.activeExtensions
1410
+ function dn() {
1411
+ bn("settings", {
1412
+ forceWebGL: $.forceWebGL,
1413
+ captureStackTrace: $.captureStackTrace,
1414
+ activeExtensions: $.activeExtensions
1343
1415
  });
1344
1416
  }
1345
- _t();
1346
- var vt = class extends mt {
1417
+ un();
1418
+ var fn = class extends on {
1347
1419
  constructor() {
1348
1420
  super({ name: "Settings" }), this.extensions = {};
1349
- let e = _t(), t = this.createGroup("Renderer");
1421
+ let e = un(), t = this.createGroup("Renderer");
1350
1422
  t.add(e, "forceWebGL").name("Force WebGL").onChange((e) => {
1351
- gt(e), X(), location.reload();
1423
+ ln(e), dn(), location.reload();
1352
1424
  }), t.add(e, "captureStackTrace").name("Capture Stack Trace").onChange((e) => {
1353
- Ce.captureStackTrace = e, X(), location.reload();
1425
+ Se.captureStackTrace = e, dn(), location.reload();
1354
1426
  });
1355
1427
  }
1356
1428
  init() {
1357
1429
  let e = this.createGroup("Extensions");
1358
1430
  this._getExtensions().then((t) => {
1359
1431
  for (let n of t) n.active = !1, n.loaded = !1, n.tab = null, this.extensions[n.name] = n, n.ui = e.add({ [n.name]: !1 }, n.name).onChange(async (e) => {
1360
- this.setActiveExtension(n.name, e), e ? Y.activeExtensions[n.name] = {
1432
+ this.setActiveExtension(n.name, e), e ? $.activeExtensions[n.name] = {
1361
1433
  name: n.name,
1362
1434
  url: n.url
1363
- } : delete Y.activeExtensions[n.name], this._updateExtensionUI(n), X();
1364
- }), Y.activeExtensions[n.name] !== void 0 && n.ui.setValue(!0);
1435
+ } : delete $.activeExtensions[n.name], this._updateExtensionUI(n), dn();
1436
+ }), $.activeExtensions[n.name] !== void 0 && n.ui.setValue(!0);
1365
1437
  });
1366
1438
  }
1367
1439
  async setActiveExtension(e, t) {
@@ -1369,7 +1441,7 @@ var vt = class extends mt {
1369
1441
  n && (t ? await this._loadExtension(r, n) : await this._unloadExtension(r, n));
1370
1442
  }
1371
1443
  _updateExtensionUI(e) {
1372
- e.active && Y.activeExtensions[e.name] === void 0 ? (e.ui.checkbox.checked = !0, e.ui.domElement.style.setProperty("--accent-color", "var(--color-green)")) : e.ui.domElement.style.removeProperty("--accent-color");
1444
+ e.active && $.activeExtensions[e.name] === void 0 ? (e.ui.checkbox.checked = !0, e.ui.domElement.style.setProperty("--accent-color", "var(--color-green)")) : e.ui.domElement.style.removeProperty("--accent-color");
1373
1445
  }
1374
1446
  async _unloadExtension(e, t) {
1375
1447
  t.active !== !1 && (e.removeTab(t.tab), t.active = !1, t.loaded = !1, t.tab = null, this._updateExtensionUI(t), this.dispatchEvent({
@@ -1380,7 +1452,7 @@ var vt = class extends mt {
1380
1452
  async _loadExtension(e, t) {
1381
1453
  if (t.active === !0) return;
1382
1454
  t.active = !0;
1383
- let n = await import(new URL(t.url, new URL(ht, import.meta.url)).href), r = n[Object.keys(n)[0]], i = new r();
1455
+ let n = await import(new URL(t.url, new URL(sn, import.meta.url)).href), r = n[Object.keys(n)[0]], i = new r();
1384
1456
  e.addTab(i), t.loaded = !0, t.tab = i, this._updateExtensionUI(t), this.dispatchEvent({
1385
1457
  type: "extensionadded",
1386
1458
  name: t.name,
@@ -1388,52 +1460,52 @@ var vt = class extends mt {
1388
1460
  });
1389
1461
  }
1390
1462
  async _getExtensions() {
1391
- let e = new URL(ht, import.meta.url);
1463
+ let e = new URL(sn, import.meta.url);
1392
1464
  return await fetch(e).then((e) => e.json());
1393
1465
  }
1394
- }, yt = /* @__PURE__ */ E(([e, t]) => {
1395
- let n = N(0);
1396
- Pe(() => {
1466
+ }, pn = /* @__PURE__ */ A(([e, t]) => {
1467
+ let n = V(0);
1468
+ at(() => {
1397
1469
  let { width: e, height: r } = t.value;
1398
1470
  n.value = e / r;
1399
1471
  });
1400
- let r = e.sub(.5), i = P(r.x.div(n), r.y).add(.5);
1401
- return F(i, j(0, i.x).mul(j(i.x, 1)).mul(j(0, i.y)).mul(j(i.y, 1)));
1402
- }), bt = class extends B {
1472
+ let r = e.sub(.5), i = H(r.x.div(n), r.y).add(.5);
1473
+ return U(i, Ct(0, i.x).mul(Ct(i.x, 1)).mul(Ct(0, i.y)).mul(Ct(i.y, 1)));
1474
+ }), mn = class extends q {
1403
1475
  constructor(e = {}) {
1404
1476
  super("Viewer", e);
1405
- let t = new V("Viewer", "Name");
1477
+ let t = new Wt("Viewer", "Name");
1406
1478
  t.setGridStyle("150px minmax(200px, 2fr)"), t.domElement.style.minWidth = "400px";
1407
1479
  let n = document.createElement("div");
1408
1480
  n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n);
1409
- let r = new U("Nodes");
1481
+ let r = new J("Nodes");
1410
1482
  t.add(r), this.itemLibrary = /* @__PURE__ */ new Map(), this.folderLibrary = /* @__PURE__ */ new Map(), this.canvasNodes = /* @__PURE__ */ new Map(), this.currentDataList = [], this.nodeList = t, this.nodes = r;
1411
1483
  }
1412
1484
  getFolder(e) {
1413
1485
  let t = this.folderLibrary.get(e);
1414
- return t === void 0 && (t = new U(e), this.folderLibrary.set(e, t), this.nodeList.add(t)), t;
1486
+ return t === void 0 && (t = new J(e), this.folderLibrary.set(e, t), this.nodeList.add(t)), t;
1415
1487
  }
1416
1488
  addNodeItem(e) {
1417
1489
  let t = this.itemLibrary.get(e.id);
1418
1490
  if (t === void 0) {
1419
1491
  let n = e.name, r = e.canvasTarget.domElement;
1420
- t = new U(r, n), t.itemRow.children[1].style["justify-content"] = "flex-start", this.itemLibrary.set(e.id, t);
1492
+ t = new J(r, n), t.itemRow.children[1].style["justify-content"] = "flex-start", this.itemLibrary.set(e.id, t);
1421
1493
  }
1422
1494
  return t;
1423
1495
  }
1424
1496
  getCanvasDataByNode(e, t) {
1425
1497
  let n = this.canvasNodes.get(t);
1426
1498
  if (n === void 0) {
1427
- let r = new De(document.createElement("canvas"));
1499
+ let r = new Ee(document.createElement("canvas"));
1428
1500
  r.setPixelRatio(window.devicePixelRatio), r.setSize(140, 140);
1429
- let i = t.id, { path: a, name: o } = tt(nt(t.getName() || "(unnamed)")), s = I(F(t.context({ getUV: (e) => {
1430
- let t = yt(A, e), n = t.xy, r = t.z;
1501
+ let i = t.id, { path: a, name: o } = Kt(qt(t.getName() || "(unnamed)")), s = W(U(t.context({ getUV: (e) => {
1502
+ let t = pn(vt, e), n = t.xy, r = t.z;
1431
1503
  return n.mul(r);
1432
1504
  } })), 1);
1433
- s = Be(s, 0, e.outputColorSpace), s = s.context({ inspector: !0 });
1434
- let c = new S();
1505
+ s = ht(s, 0, e.outputColorSpace), s = s.context({ inspector: !0 });
1506
+ let c = new D();
1435
1507
  c.outputNode = s;
1436
- let l = new Te(c);
1508
+ let l = new we(c);
1437
1509
  l.name = "Viewer - " + o, n = {
1438
1510
  id: i,
1439
1511
  name: o,
@@ -1469,13 +1541,13 @@ var vt = class extends mt {
1469
1541
  a[o] === void 0 && (a[o] = 0), (e.parent === null || n.parent !== e || e.children.indexOf(n) !== a[o]) && e.add(n), a[o]++;
1470
1542
  } else n.parent || this.nodes.add(n);
1471
1543
  this.currentDataList = r;
1472
- let s = w.resetRendererState(t);
1473
- t.toneMapping = 0, t.outputColorSpace = p, t.setCanvasTarget(e.canvasTarget), e.quad.render(t), t.setCanvasTarget(i), w.restoreRendererState(t, s);
1544
+ let s = k.resetRendererState(t);
1545
+ t.toneMapping = 0, t.outputColorSpace = p, t.setCanvasTarget(e.canvasTarget), e.quad.render(t), t.setCanvasTarget(i), k.restoreRendererState(t, s);
1474
1546
  }
1475
1547
  }
1476
- }, xt = 500, St = 60, Ct = class extends B {
1548
+ }, hn = 500, gn = 60, _n = class extends q {
1477
1549
  constructor(e = {}) {
1478
- super("Timeline", e), this.isRecording = !1, this.frames = [], this.baseTriangles = 0, this.currentFrame = null, this.isHierarchicalView = !0, this.callBlocks = /* @__PURE__ */ new WeakMap(), this.fallbackBlocks = [], this.originalBackend = null, this.originalMethods = /* @__PURE__ */ new Map(), this.renderer = null, this.graph = new H(xt), this.graph.addLine("fps", "var( --color-fps )"), this.graph.addLine("calls", "var( --color-call )"), this.graph.addLine("triangles", "var( --color-red )");
1550
+ super("Timeline", e), this.isRecording = !1, this.frames = [], this.baseTriangles = 0, this.currentFrame = null, this.isHierarchicalView = !0, this.callBlocks = /* @__PURE__ */ new WeakMap(), this.fallbackBlocks = [], this.originalBackend = null, this.originalMethods = /* @__PURE__ */ new Map(), this.renderer = null, this.graph = new Gt(hn), this.graph.addLine("fps", "var( --color-fps )"), this.graph.addLine("calls", "var( --color-call )"), this.graph.addLine("triangles", "var( --color-red )");
1479
1551
  let t = document.createElement("div");
1480
1552
  t.className = "list-scroll-wrapper", this.scrollWrapper = t, this.content.appendChild(t), this.buildHeader(), this.buildUI(), window.addEventListener("resize", () => {
1481
1553
  !this.isRecording && this.frames.length > 0 && this.renderSlider();
@@ -1488,8 +1560,8 @@ var vt = class extends mt {
1488
1560
  t.className = "console-copy-button", t.title = "Clear", t.innerHTML = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"3 6 5 6 21 6\"></polyline><path d=\"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2\"></path><line x1=\"10\" y1=\"11\" x2=\"10\" y2=\"17\"></line><line x1=\"14\" y1=\"11\" x2=\"14\" y2=\"17\"></line></svg>", t.style.padding = "0 10px", t.style.lineHeight = "24px", t.style.display = "flex", t.style.alignItems = "center", t.addEventListener("click", () => this.clear()), this.viewModeButton = document.createElement("button"), this.viewModeButton.className = "console-copy-button", this.viewModeButton.title = "Toggle View Mode", this.viewModeButton.textContent = "Mode: Hierarchy", this.viewModeButton.style.padding = "0 10px", this.viewModeButton.style.lineHeight = "24px", this.viewModeButton.addEventListener("click", () => {
1489
1561
  this.isHierarchicalView = !this.isHierarchicalView, this.viewModeButton.textContent = this.isHierarchicalView ? "Mode: Hierarchy" : "Mode: Counts", this.selectedFrameIndex !== void 0 && this.selectedFrameIndex !== -1 && this.selectFrame(this.selectedFrameIndex);
1490
1562
  }), this.recordRefreshButton = document.createElement("button"), this.recordRefreshButton.className = "console-copy-button", this.recordRefreshButton.title = "Refresh & Record", this.recordRefreshButton.innerHTML = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8\"></path><path d=\"M21 3v5h-5\"></path><circle cx=\"12\" cy=\"12\" r=\"3\" fill=\"currentColor\"></circle></svg>", this.recordRefreshButton.style.padding = "0 10px", this.recordRefreshButton.style.lineHeight = "24px", this.recordRefreshButton.style.display = "flex", this.recordRefreshButton.style.alignItems = "center", this.recordRefreshButton.addEventListener("click", () => {
1491
- let e = Q("timeline");
1492
- e.recording = !0, $("timeline", e), window.location.reload();
1563
+ let e = yn("timeline");
1564
+ e.recording = !0, bn("timeline", e), window.location.reload();
1493
1565
  }), this.exportButton = document.createElement("button"), this.exportButton.className = "console-copy-button", this.exportButton.title = "Export", this.exportButton.innerHTML = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"></path><polyline points=\"7 10 12 15 17 10\"></polyline><line x1=\"12\" y1=\"15\" x2=\"12\" y2=\"3\"></line></svg>", this.exportButton.style.padding = "0 10px", this.exportButton.style.lineHeight = "24px", this.exportButton.style.display = "flex", this.exportButton.style.alignItems = "center", this.exportButton.addEventListener("click", () => this.exportData());
1494
1566
  let n = document.createElement("div");
1495
1567
  n.className = "console-buttons-group", n.appendChild(this.viewModeButton), n.appendChild(this.recordButton), n.appendChild(this.recordRefreshButton), n.appendChild(this.exportButton), n.appendChild(t), e.style.display = "flex", e.style.justifyContent = "space-between", e.style.padding = "6px", e.style.borderBottom = "1px solid var(--border-color)";
@@ -1571,8 +1643,8 @@ var vt = class extends mt {
1571
1643
  }
1572
1644
  setRenderer(e) {
1573
1645
  this.renderer = e;
1574
- let t = Q("timeline");
1575
- t.recording && (t.recording = !1, $("timeline", t), this.toggleRecording());
1646
+ let t = yn("timeline");
1647
+ t.recording && (t.recording = !1, bn("timeline", t), this.toggleRecording());
1576
1648
  }
1577
1649
  toggleRecording() {
1578
1650
  if (!this.renderer) {
@@ -1602,7 +1674,7 @@ var vt = class extends mt {
1602
1674
  for (let t = 0; t < n.length; t++) n[t] *= e;
1603
1675
  }
1604
1676
  }
1605
- let t = this.baseTriangles > 0 ? e / this.baseTriangles * St : 0;
1677
+ let t = this.baseTriangles > 0 ? e / this.baseTriangles * gn : 0;
1606
1678
  this.graph.addPoint("calls", this.currentFrame.calls.length), this.graph.addPoint("fps", this.currentFrame.fps), this.graph.addPoint("triangles", t), this.graph.update();
1607
1679
  }
1608
1680
  if (this.currentFrame = {
@@ -1610,7 +1682,7 @@ var vt = class extends mt {
1610
1682
  calls: [],
1611
1683
  fps: 0,
1612
1684
  triangles: 0
1613
- }, this.frames.push(this.currentFrame), this.frames.length > xt && this.frames.shift(), !this.isManualScrubbing) {
1685
+ }, this.frames.push(this.currentFrame), this.frames.length > hn && this.frames.shift(), !this.isManualScrubbing) {
1614
1686
  if (this.isTrackingLatest) {
1615
1687
  let e = this.frames.length > 1 ? this.frames.length - 2 : 0;
1616
1688
  this.selectFrame(e);
@@ -1653,30 +1725,30 @@ var vt = class extends mt {
1653
1725
  switch (e.type) {
1654
1726
  case v:
1655
1727
  case g: return "8";
1656
- case se:
1657
- case fe:
1658
- case re:
1728
+ case ie:
1729
+ case le:
1730
+ case C:
1659
1731
  case m:
1660
- case ue: return "16";
1661
- case de:
1662
- case _:
1732
+ case se: return "16";
1663
1733
  case ce:
1664
- case te:
1734
+ case _:
1735
+ case ae:
1736
+ case x:
1665
1737
  case y:
1666
- case ie: return "32";
1738
+ case te: return "32";
1667
1739
  default: return "?";
1668
1740
  }
1669
1741
  }, l = (e) => {
1670
1742
  switch (e.format) {
1671
- case le: return "a";
1743
+ case oe: return "a";
1672
1744
  case s:
1673
- case ee: return "r";
1745
+ case b: return "r";
1674
1746
  case c:
1675
1747
  case n: return "rg";
1676
- case ae:
1677
- case ne: return "rgb";
1748
+ case ne:
1749
+ case S: return "rgb";
1678
1750
  case o: return "depth";
1679
- case oe: return "depth-stencil";
1751
+ case re: return "depth-stencil";
1680
1752
  case f:
1681
1753
  case i:
1682
1754
  default: return "rgba";
@@ -1878,7 +1950,7 @@ var vt = class extends mt {
1878
1950
  r > t && (t = r);
1879
1951
  }
1880
1952
  for (let n = 0; n < e.length; n++) {
1881
- let r = e[n].triangles || 0, i = t > 0 ? r / t * St : 0;
1953
+ let r = e[n].triangles || 0, i = t > 0 ? r / t * gn : 0;
1882
1954
  this.graph.addPoint("calls", e[n].calls.length), this.graph.addPoint("fps", e[n].fps || 0), this.graph.addPoint("triangles", i);
1883
1955
  }
1884
1956
  this.graph.update(), this.playhead.style.display = "block";
@@ -1971,27 +2043,27 @@ var vt = class extends mt {
1971
2043
  getColorForMethod(e) {
1972
2044
  return e.startsWith("begin") ? "var(--color-green)" : e.startsWith("finish") || e.startsWith("destroy") ? "var(--color-red)" : e.startsWith("draw") || e.startsWith("compute") || e.startsWith("create") || e.startsWith("generate") ? "var(--color-yellow)" : "var(--text-secondary)";
1973
2045
  }
1974
- }, Z = class extends Qe {
2046
+ }, vn = class extends Vt {
1975
2047
  constructor() {
1976
2048
  super();
1977
- let e = new et(this);
2049
+ let e = new Ut(this);
1978
2050
  e.addEventListener("resize", (e) => this.dispatchEvent(e));
1979
- let t = new mt({
2051
+ let t = new on({
1980
2052
  builtin: !0,
1981
2053
  icon: "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M14 6m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0\" /><path d=\"M4 6l8 0\" /><path d=\"M16 6l4 0\" /><path d=\"M8 12m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0\" /><path d=\"M4 12l2 0\" /><path d=\"M10 12l10 0\" /><path d=\"M17 18m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0\" /><path d=\"M4 18l11 0\" /><path d=\"M19 18l1 0\" /></svg>"
1982
2054
  });
1983
2055
  t.hide(), e.addTab(t);
1984
- let n = new bt();
2056
+ let n = new mn();
1985
2057
  n.hide(), e.addTab(n);
1986
- let r = new rt();
2058
+ let r = new Jt();
1987
2059
  e.addTab(r);
1988
- let i = new it();
2060
+ let i = new Yt();
1989
2061
  e.addTab(i);
1990
- let a = new Ct();
2062
+ let a = new _n();
1991
2063
  e.addTab(a);
1992
- let o = new at();
2064
+ let o = new Xt();
1993
2065
  e.addTab(o);
1994
- let s = new vt();
2066
+ let s = new fn();
1995
2067
  e.addTab(s), e.loadLayout(), e.activeTabId || e.setActiveTab(r.id), this.statsData = /* @__PURE__ */ new Map(), this.profiler = e, this.performance = r, this.memory = i, this.console = o, this.parameters = t, this.viewer = n, this.timeline = a, this.settings = s, this.once = {}, this.extensionsData = /* @__PURE__ */ new WeakMap(), this.displayCycle = {
1996
2068
  text: {
1997
2069
  needsUpdate: !1,
@@ -2104,89 +2176,387 @@ var vt = class extends mt {
2104
2176
  let n = this.getStatsData(t.cid);
2105
2177
  e.cpu += n.cpu, e.gpu += n.gpu, e.total += n.total;
2106
2178
  }
2107
- e.deltaTime = t.startTime - e.startTime, e.miscellaneous = e.deltaTime - e.total, e.miscellaneous < 0 && (e.miscellaneous = 0), this.updateCycle(this.displayCycle.text), this.updateCycle(this.displayCycle.graph), this.displayCycle.text.needsUpdate && (G("fps-counter", this.fps.toFixed()), this.performance.updateText(this, e), this.memory.updateText(this)), this.displayCycle.graph.needsUpdate && (this.performance.updateGraph(this, e), this.memory.updateGraph(this)), this.displayCycle.text.needsUpdate = !1, this.displayCycle.graph.needsUpdate = !1;
2179
+ e.deltaTime = t.startTime - e.startTime, e.miscellaneous = e.deltaTime - e.total, e.miscellaneous < 0 && (e.miscellaneous = 0), this.updateCycle(this.displayCycle.text), this.updateCycle(this.displayCycle.graph), this.displayCycle.text.needsUpdate && (X("fps-counter", this.fps.toFixed()), this.performance.updateText(this, e), this.memory.updateText(this)), this.displayCycle.graph.needsUpdate && (this.performance.updateGraph(this, e), this.memory.updateGraph(this)), this.displayCycle.text.needsUpdate = !1, this.displayCycle.graph.needsUpdate = !1;
2108
2180
  }
2109
2181
  }
2110
2182
  updateCycle(e) {
2111
2183
  e.time += this.nodeFrame.deltaTime, e.time >= e.duration && (e.needsUpdate = !0, e.time = 0);
2112
2184
  }
2113
2185
  static getItem(e) {
2114
- return console.warn("Inspector.getItem is deprecated. Use getItem directly instead."), Q(e);
2186
+ return console.warn("Inspector.getItem is deprecated. Use getItem directly instead."), yn(e);
2115
2187
  }
2116
2188
  static setItem(e, t) {
2117
- console.warn("Inspector.setItem is deprecated. Use setItem directly instead."), $(e, t);
2189
+ console.warn("Inspector.setItem is deprecated. Use setItem directly instead."), bn(e, t);
2118
2190
  }
2119
2191
  };
2120
- function Q(e) {
2192
+ function yn(e) {
2121
2193
  return JSON.parse(localStorage.getItem("threejs-inspector") || "{}")[e] || {};
2122
2194
  }
2123
- function $(e, t) {
2195
+ function bn(e, t) {
2124
2196
  let n = JSON.parse(localStorage.getItem("threejs-inspector") || "{}");
2125
2197
  t === null ? delete n[e] : n[e] = t, localStorage.setItem("threejs-inspector", JSON.stringify(n));
2126
2198
  }
2127
2199
  //#endregion
2128
- //#region packages/common-core/src/webgpu/roomle-webgpu-renderer.ts
2129
- var wt = class extends ve {
2130
- constructor(e, t, n) {
2131
- super(e, t), this.passNeedsReassembly = !0, this.debugMode = "off", this.renderPasses = /* @__PURE__ */ new Map(), this.guiParameterGroups = /* @__PURE__ */ new Map(), this.renderPipeline = new Ee(t), n && this.enableOutline(n.outlineVisibleEdgeColor, n.outlineHiddenEdgeColor);
2200
+ //#region ../../node_modules/three/examples/jsm/tsl/display/SSGINode.js
2201
+ var xn = /* @__PURE__ */ new we(), Sn = /* @__PURE__ */ new h(), Cn = [
2202
+ 60,
2203
+ 300,
2204
+ 180,
2205
+ 240,
2206
+ 120,
2207
+ 0
2208
+ ], wn = [
2209
+ 0,
2210
+ .5,
2211
+ .25,
2212
+ .75
2213
+ ], Tn, En = class extends ve {
2214
+ static get type() {
2215
+ return "SSGINode";
2132
2216
  }
2133
- addRenderPass(e) {
2134
- this.renderPasses.set(e.passId, e), this.passNeedsReassembly = !0;
2217
+ constructor(t, n, r, i) {
2218
+ super("vec4"), this.beautyNode = t, this.depthNode = n, this.normalNode = r, this.updateBeforeType = ke.FRAME, this.sliceCount = V(1, "uint"), this.stepCount = V(12, "uint"), this.aoIntensity = V(1, "float"), this.giIntensity = V(10, "float"), this.radius = V(12, "float"), this.useScreenSpaceSampling = V(!0, "bool"), this.expFactor = V(2, "float"), this.thickness = V(1, "float"), this.useLinearThickness = V(!1, "bool"), this.backfaceLighting = V(0, "float"), this.useTemporalFiltering = !0, this._resolution = V(new h()), this._halfProjScale = V(1), this._temporalDirection = V(0), this._temporalOffset = V(0), this._cameraProjectionMatrix = V(i.projectionMatrix), this._cameraProjectionMatrixInverse = V(i.projectionMatrixInverse), this._cameraNear = mt("near", "float", i), this._cameraFar = mt("far", "float", i), this._camera = i, this._ssgiRenderTarget = new e(1, 1, { depthBuffer: !1 }), this._ssgiRenderTarget.texture.name = "SSGI", this._material = new D(), this._material.name = "SSGI", this._textureNode = lt(this, this._ssgiRenderTarget.texture);
2219
+ }
2220
+ getTextureNode() {
2221
+ return this._textureNode;
2222
+ }
2223
+ setSize(e, t) {
2224
+ this._resolution.value.set(e, t), this._ssgiRenderTarget.setSize(e, t), this._halfProjScale.value = t / (Math.tan(this._camera.fov * T.DEG2RAD * .5) * 2) * .5;
2225
+ }
2226
+ updateBefore(e) {
2227
+ let { renderer: t } = e;
2228
+ Tn = k.resetRendererState(t, Tn);
2229
+ let n = t.getDrawingBufferSize(Sn);
2230
+ if (this.setSize(n.width, n.height), this.useTemporalFiltering === !0) {
2231
+ let t = e.frameId;
2232
+ this._temporalDirection.value = Cn[t % 6] / 360, this._temporalOffset.value = wn[t % 4];
2233
+ } else this._temporalDirection.value = 1, this._temporalOffset.value = 1;
2234
+ xn.material = this._material, xn.name = "SSGI", t.setClearColor(0, 1), t.setRenderTarget(this._ssgiRenderTarget), xn.render(t), k.restoreRendererState(t, Tn);
2235
+ }
2236
+ setup(e) {
2237
+ let t = Dt(), n = B(32), r = B(0), i = (t) => {
2238
+ let n = this.depthNode.sample(t).r;
2239
+ return e.renderer.logarithmicDepthBuffer === !0 ? At(Qe(n, this._cameraNear, this._cameraFar), this._cameraNear, this._cameraFar) : n;
2240
+ }, a = (e) => this.normalNode === null ? qe(e, this.depthNode.value, this._cameraProjectionMatrixInverse) : this.normalNode.sample(e).rgb.normalize(), o = (e) => this.beautyNode.sample(e), s = A(([e]) => F(.25).mul(Tt(e.y, e.x).bitAnd(3))).setLayout({
2241
+ name: "spatialOffsets",
2242
+ type: "float",
2243
+ inputs: [{
2244
+ name: "position",
2245
+ type: "vec2"
2246
+ }]
2247
+ }), c = A(([e]) => {
2248
+ let t = M(e).mul(F(-.156583)).add(je);
2249
+ return t.mulAssign(St(M(e).oneMinus())), H(e.x.greaterThanEqual(0).select(t.x, Ae.sub(t.x)), e.y.greaterThanEqual(0).select(t.y, Ae.sub(t.y)));
2250
+ }).setLayout({
2251
+ name: "GTAOFastAcos",
2252
+ type: "vec2",
2253
+ inputs: [{
2254
+ name: "value",
2255
+ type: "vec2"
2256
+ }]
2257
+ }), l = A(([e, t, s, l, u, d, f, p, m]) => {
2258
+ let h = this.stepCount.toConst(), g = this.expFactor.toConst(), _ = this.thickness.toConst(), v = this.backfaceLighting.toConst(), y = F(0);
2259
+ j(this.useScreenSpaceSampling.equal(!0), () => {
2260
+ y.assign(t.mul(this._resolution.x.div(2)).div(F(16)));
2261
+ }).Else(() => {
2262
+ y.assign(I(t.mul(this._halfProjScale).div(s.z.negate()), F(h)));
2263
+ }), y.divAssign(F(h).add(1));
2264
+ let b = I(1, F(h.sub(1))).mul(y), x = e.equal(!0).select(H(1, -1), H(-1, 1)), S = e.equal(!0).select(1, -1), C = U(0);
2265
+ return Oe({
2266
+ start: B(0),
2267
+ end: h,
2268
+ type: "uint",
2269
+ condition: "<"
2270
+ }, ({ i: t }) => {
2271
+ let h = ft(M(L(y, F(t).add(u)).div(b)), g).mul(b).toConst(), ee = l.mul(I(h, F(t).add(1))).toConst(), w = d.add(ee.mul(x)).toConst();
2272
+ j(w.x.lessThanEqual(0).or(w.y.lessThanEqual(0)).or(w.x.greaterThanEqual(1)).or(w.y.greaterThanEqual(1)), () => {
2273
+ De();
2274
+ });
2275
+ let te = Ye(w, i(w), this._cameraProjectionMatrixInverse).toConst(), ne = te.sub(s).normalize().toConst(), re = this.useLinearThickness.equal(!0).select(te.z.negate().div(this._cameraFar).clamp().mul(100), F(1)), ie = R(te.sub(re.mul(f).mul(_)).sub(s)), T = H(P(ne, f), P(ie, f));
2276
+ T = c(N(T, -1, 1)), T = N(We(L(S, T.negate()).sub(m.sub(je)), Ae)), T = e.equal(!0).select(T.yx, T.xy);
2277
+ let E = T.x.toConst(), ae = T.y.toConst(), oe = B(T.mul(F(n))).toConst(), se = B(Fe(ae.sub(E).mul(F(n)))).toConst(), ce = se.greaterThan(B(0)).select(B(yt(B(4294967295), B(32).sub(n).add(n.sub(se)))), B(0)).toConst().shiftLeft(oe);
2278
+ ce = ce.bitAnd(r.bitNot()), r.assign(r.bitOr(ce));
2279
+ let le = ze(ce);
2280
+ j(le.greaterThan(0), () => {
2281
+ let e = o(w);
2282
+ j($e(e).greaterThan(.001), () => {
2283
+ let t = R(ne), r = N(P(p, t));
2284
+ j(r.greaterThan(.001), () => {
2285
+ let i = a(w), o = P(i, t.negate()), s = bt(o).lessThan(0).select(M(o).mul(v), M(o));
2286
+ o = v.greaterThan(0).and(P(i, f).greaterThan(0)).select(s, N(o)), C.rgb.addAssign(F(le).div(F(n)).mul(e).mul(r).mul(o));
2287
+ });
2288
+ });
2289
+ });
2290
+ }), U(C);
2291
+ }), u = A(() => {
2292
+ let e = i(t).toVar();
2293
+ e.greaterThanEqual(1).discard();
2294
+ let o = Ye(t, e, this._cameraProjectionMatrixInverse).toVar(), c = a(t).toVar(), u = R(o.xyz.negate()).toVar(), d = s(_t), f = Je(_t), p = this._temporalDirection.mul(.02), m = Ke(d.add(this._temporalOffset)).add(pt(t.add(p).mul(2).sub(1))), h = F(0), g = U(0), _ = this.sliceCount.toConst(), v = this.aoIntensity.toConst(), y = this.giIntensity.toConst(), b = this.radius.toConst();
2295
+ Oe({
2296
+ start: B(0),
2297
+ end: _,
2298
+ type: "uint",
2299
+ condition: "<"
2300
+ }, ({ i: e }) => {
2301
+ let i = L(F(e).add(f).add(this._temporalDirection), Ae.div(F(_))).toConst(), a = U(H(Be(i), xt(i)), 0).toConst(), s = a.xy.mul(F(1).div(this._resolution)).toConst(), d = R(Ve(a, u)).toConst(), p = Ve(u, d).toConst(), v = c.sub(d.mul(P(c, d))).toConst(), y = N(P(R(v).toConst(), u), -1, 1).toConst(), x = bt(P(v, p)).negate().mul(Me(y)).toConst();
2302
+ r.assign(0), g.addAssign(l(Pe(!0), b, o, s, m, t, u, c, x)), g.addAssign(l(Pe(!1), b, o, s, m, t, u, c, x)), h.addAssign(F(ze(r)).div(F(n)));
2303
+ }), h.divAssign(F(_)), h.assign(ft(h.clamp().oneMinus(), v).clamp()), g.divAssign(F(_)), g.mulAssign(y);
2304
+ let x = F(7).toConst(), S = $e(g), C = S.greaterThan(x).select(x.div(S), F(1));
2305
+ return g.mulAssign(C), W(g, h);
2306
+ });
2307
+ return this._material.fragmentNode = u().context(e.getSharedContext()), this._material.needsUpdate = !0, this._textureNode;
2308
+ }
2309
+ dispose() {
2310
+ this._ssgiRenderTarget.dispose(), this._material.dispose();
2311
+ }
2312
+ }, Dn = (e, t, n, r) => new En(Re(e), t, n, r), On = class e extends It {
2313
+ static {
2314
+ this.passId = "SsgiRenderPass";
2315
+ }
2316
+ constructor(t) {
2317
+ super(), this.passId = e.passId, this.sliceCount = V(t.sliceCount, "uint"), this.stepCount = V(t.stepCount, "uint"), this.radius = V(t.radius), this.expFactor = V(t.expFactor), this.thickness = V(t.thickness), this.backfaceLighting = V(t.backfaceLighting), this.aoIntensity = V(t.aoIntensity), this.giIntensity = V(t.giIntensity), this.useLinearThickness = V(t.useLinearThickness), this.useScreenSpaceSampling = V(t.useScreenSpaceSampling);
2318
+ }
2319
+ addParametersToGUI(e, t) {
2320
+ let n = e.addFolder("SSGI Settings");
2321
+ n.add(this.sliceCount, "value", 1, 4, 1).name("slice count").onChange(() => t()), n.add(this.stepCount, "value", 1, 32, 1).name("step count").onChange(() => t()), n.add(this.radius, "value", 1, 25).name("radius").onChange(() => t()), n.add(this.expFactor, "value", 1, 3).name("exp factor").onChange(() => t()), n.add(this.thickness, "value", .01, 10).name("thickness").onChange(() => t()), n.add(this.backfaceLighting, "value", 0, 1).name("backface lighting").onChange(() => t()), n.add(this.aoIntensity, "value", 0, 4).name("AO intensity").onChange(() => t()), n.add(this.giIntensity, "value", 0, 100).name("GI intensity").onChange(() => t()), n.add(this.useLinearThickness, "value").name("use linear thickness").onChange(() => t()), n.add(this.useScreenSpaceSampling, "value").name("use screen-space sampling").onChange(() => t());
2322
+ }
2323
+ assemble(e, t, n, i, a) {
2324
+ if (!(i instanceof r)) return t;
2325
+ e.setMRT(nt({
2326
+ output: st,
2327
+ diffuseColor: He,
2328
+ normal: Ue(it),
2329
+ velocity: Ot
2330
+ }));
2331
+ let o = e.getTextureNode("output"), s = e.getTextureNode("diffuseColor"), c = e.getTextureNode("depth"), l = e.getTextureNode("normal"), u = Dn(o, c, gt((e) => Le(l.sample(e))), i);
2332
+ u.sliceCount = this.sliceCount, u.stepCount = this.stepCount, u.radius = this.radius, u.expFactor = this.expFactor, u.thickness = this.thickness, u.backfaceLighting = this.backfaceLighting, u.aoIntensity = this.aoIntensity, u.giIntensity = this.giIntensity, u.useLinearThickness = this.useLinearThickness, u.useScreenSpaceSampling = this.useScreenSpaceSampling;
2333
+ let d = u.rgb, f = u.a, p = W(Ne(o.rgb.mul(f), s.rgb.mul(d)), o.a);
2334
+ return p.name = "Ssgi Composite", a === "ao only" ? W(U(f), 1) : a === "gi only" ? W(d, 1) : a === "direct lighting only" ? o : p;
2335
+ }
2336
+ }, kn = /* @__PURE__ */ new we(), An = /* @__PURE__ */ new h(), jn, Mn = class extends ve {
2337
+ static get type() {
2338
+ return "TRAANode";
2339
+ }
2340
+ constructor(t, n, r, i) {
2341
+ super("vec4"), this.isTRAANode = !0, this.updateBeforeType = _e.FRAME, this.beautyNode = t, this.depthNode = n, this.velocityNode = r, this.camera = i, this.depthThreshold = 5e-4, this.edgeDepthDiff = .001, this.maxVelocityLength = 128, this.useSubpixelCorrection = !0, this._jitterIndex = 0, this._invSize = V(new h()), this._historyRenderTarget = new e(1, 1, {
2342
+ depthBuffer: !1,
2343
+ type: C,
2344
+ depthTexture: new a()
2345
+ }), this._historyRenderTarget.texture.name = "TRAANode.history", this._resolveRenderTarget = new e(1, 1, {
2346
+ depthBuffer: !1,
2347
+ type: C
2348
+ }), this._resolveRenderTarget.texture.name = "TRAANode.resolve", this._resolveMaterial = new D(), this._resolveMaterial.name = "TRAA.resolve", this._textureNode = lt(this, this._resolveRenderTarget.texture), this._originalProjectionMatrix = new w(), this._cameraNearFar = V(new h()), this._cameraWorldMatrix = V(new w()), this._cameraWorldMatrixInverse = V(new w()), this._cameraProjectionMatrixInverse = V(new w()), this._previousCameraWorldMatrix = V(new w()), this._previousCameraProjectionMatrixInverse = V(new w()), this._previousDepthNode = z(new a(1, 1)), this._needsPostProcessingSync = !1, this._velocityNode = null;
2349
+ }
2350
+ getTextureNode() {
2351
+ return this._textureNode;
2135
2352
  }
2136
- clearCache() {
2137
- console.error("RoomleWebGPURenderer.clearCache is not implemented yet");
2353
+ setSize(e, t) {
2354
+ this._historyRenderTarget.setSize(e, t), this._resolveRenderTarget.setSize(e, t), this._invSize.value.set(1 / e, 1 / t);
2355
+ }
2356
+ setViewOffset(e, t) {
2357
+ this.camera.updateProjectionMatrix(), this._originalProjectionMatrix.copy(this.camera.projectionMatrix), this._velocityNode.setProjectionMatrix(this._originalProjectionMatrix);
2358
+ let n = {
2359
+ fullWidth: e,
2360
+ fullHeight: t,
2361
+ offsetX: 0,
2362
+ offsetY: 0,
2363
+ width: e,
2364
+ height: t
2365
+ }, r = Pn[this._jitterIndex];
2366
+ this.camera.setViewOffset(n.fullWidth, n.fullHeight, n.offsetX + r[0] - .5, n.offsetY + r[1] - .5, n.width, n.height);
2367
+ }
2368
+ clearViewOffset() {
2369
+ this.camera.clearViewOffset(), this._velocityNode.setProjectionMatrix(null), this._jitterIndex++, this._jitterIndex %= Pn.length - 1;
2138
2370
  }
2139
- disableUiInteractionMode() {
2140
- console.error("RoomleWebGPURenderer.disableUiInteractionMode is not implemented yet");
2371
+ updateBefore(e) {
2372
+ let { renderer: t } = e;
2373
+ this._previousCameraWorldMatrix.value.copy(this._cameraWorldMatrix.value), this._previousCameraProjectionMatrixInverse.value.copy(this._cameraProjectionMatrixInverse.value), this._cameraNearFar.value.set(this.camera.near, this.camera.far), this._cameraWorldMatrix.value.copy(this.camera.matrixWorld), this._cameraWorldMatrixInverse.value.copy(this.camera.matrixWorldInverse), this._cameraProjectionMatrixInverse.value.copy(this.camera.projectionMatrixInverse);
2374
+ let n = this.beautyNode.isRTTNode ? this.beautyNode.renderTarget : this.beautyNode.passNode.renderTarget, r = n.texture.width, i = n.texture.height;
2375
+ this._needsPostProcessingSync === !0 && (this.setViewOffset(r, i), this._needsPostProcessingSync = !1), jn = k.resetRendererState(t, jn);
2376
+ let a = this._historyRenderTarget.width !== r || this._historyRenderTarget.height !== i;
2377
+ this.setSize(r, i), a === !0 && (t.initRenderTarget(this._historyRenderTarget), t.initRenderTarget(this._resolveRenderTarget), t.copyTextureToTexture(n.texture, this._historyRenderTarget.texture)), t.setRenderTarget(this._resolveRenderTarget), kn.material = this._resolveMaterial, kn.name = "TRAA", kn.render(t), t.setRenderTarget(null), t.copyTextureToTexture(this._resolveRenderTarget.texture, this._historyRenderTarget.texture);
2378
+ let o = t.getDrawingBufferSize(An);
2379
+ if (this._historyRenderTarget.height === o.height && this._historyRenderTarget.width === o.width) {
2380
+ let e = this.depthNode.value;
2381
+ t.copyTextureToTexture(e, this._historyRenderTarget.depthTexture), this._previousDepthNode.value = this._historyRenderTarget.depthTexture;
2382
+ }
2383
+ k.restoreRendererState(t, jn);
2384
+ }
2385
+ setup(e) {
2386
+ let t = e.context.renderPipeline;
2387
+ t && (this._needsPostProcessingSync = !0, t.context.onBeforeRenderPipeline = () => {
2388
+ let t = e.renderer.getDrawingBufferSize(An);
2389
+ this.setViewOffset(t.width, t.height);
2390
+ }, t.context.onAfterRenderPipeline = () => {
2391
+ this.clearViewOffset();
2392
+ }), e.renderer.reversedDepthBuffer === !0 && (this._historyRenderTarget.depthTexture.type = ae), e.context.velocity === void 0 ? this._velocityNode = Ot : this._velocityNode = e.context.velocity;
2393
+ let n = (e) => {
2394
+ let { x: t, y: n } = this._cameraNearFar;
2395
+ return At(Qe(e, t, n), t, n);
2396
+ }, r = wt({
2397
+ closestDepth: "float",
2398
+ closestPositionTexel: "vec2",
2399
+ farthestDepth: "float"
2400
+ }), i = A(([t]) => {
2401
+ let i = F(2).toVar(), a = H(0).toVar(), o = F(-1).toVar();
2402
+ for (let r = -1; r <= 1; ++r) for (let s = -1; s <= 1; ++s) {
2403
+ let c = t.add(H(r, s)).toVar(), l = this.depthNode.load(c).r;
2404
+ e.renderer.reversedDepthBuffer && (l = l.oneMinus()), e.renderer.logarithmicDepthBuffer && (l = n(l)), l = l.toVar(), j(l.lessThan(i), () => {
2405
+ i.assign(l), a.assign(c);
2406
+ }), j(l.greaterThan(o), () => {
2407
+ o.assign(l);
2408
+ });
2409
+ }
2410
+ return r(i, a, o);
2411
+ }), a = (t) => {
2412
+ let r = this._previousDepthNode.sample(t).r;
2413
+ e.renderer.logarithmicDepthBuffer && (r = n(r));
2414
+ let i = Ye(t, r, this._previousCameraProjectionMatrixInverse), a = this._previousCameraWorldMatrix.mul(W(i, 1)).xyz, o = this._cameraWorldMatrixInverse.mul(W(a, 1)).z;
2415
+ return this.camera.isOrthographicCamera ? kt(o, this._cameraNearFar.x, this._cameraNearFar.y) : At(o, this._cameraNearFar.x, this._cameraNearFar.y);
2416
+ }, o = A(([e, t, n, r]) => {
2417
+ let i = r.rgb.add(n.rgb).mul(.5), a = r.rgb.sub(n.rgb).mul(.5).add(1e-7), o = t.sub(W(i, e.a)), s = o.xyz.div(a).abs(), c = I(s.x, s.y, s.z);
2418
+ return c.greaterThan(1).select(W(i, e.a).add(o.div(c)), t);
2419
+ }).setLayout({
2420
+ name: "clipAABB",
2421
+ type: "vec4",
2422
+ inputs: [
2423
+ {
2424
+ name: "currentColor",
2425
+ type: "vec4"
2426
+ },
2427
+ {
2428
+ name: "historyColor",
2429
+ type: "vec4"
2430
+ },
2431
+ {
2432
+ name: "minColor",
2433
+ type: "vec4"
2434
+ },
2435
+ {
2436
+ name: "maxColor",
2437
+ type: "vec4"
2438
+ }
2439
+ ]
2440
+ }), s = A(([e, t, n, r]) => {
2441
+ let i = [
2442
+ [-1, -1],
2443
+ [-1, 1],
2444
+ [1, -1],
2445
+ [1, 1],
2446
+ [1, 0],
2447
+ [0, -1],
2448
+ [0, 1],
2449
+ [-1, 0]
2450
+ ], a = t.toVar(), s = t.pow2().toVar();
2451
+ for (let [t, n] of i) {
2452
+ let r = this.beautyNode.offset(Ze(t, n)).load(e).max(0);
2453
+ a.addAssign(r), s.addAssign(r.pow2());
2454
+ }
2455
+ let c = F(i.length + 1), l = a.div(c), u = s.div(c).sub(l.pow2()).max(0).sqrt().mul(r), d = l.sub(u), f = l.add(u);
2456
+ return o(l.clamp(d, f), n, d, f);
2457
+ }), c = A(([e, t]) => {
2458
+ let n = e.mul(t).fract().abs(), r = I(n, n.oneMinus());
2459
+ return r.x.mul(r.y).oneMinus().div(.75);
2460
+ }).setLayout({
2461
+ name: "subpixelCorrection",
2462
+ type: "float",
2463
+ inputs: [{
2464
+ name: "velocityUV",
2465
+ type: "vec2"
2466
+ }, {
2467
+ name: "textureSize",
2468
+ type: "ivec2"
2469
+ }]
2470
+ }), l = A(([e, t, n]) => {
2471
+ let r = n.oneMinus(), i = e.mul(F(1).div(I(e.r, e.g, e.b).add(1))), a = t.mul(F(1).div(I(t.r, t.g, t.b).add(1))), o = $e(i.rgb), s = $e(a.rgb);
2472
+ return n.mulAssign(F(1).div(o.add(1))), r.mulAssign(F(1).div(s.add(1))), Ne(e.mul(n), t.mul(r)).div(I(n.add(r), 1e-5)).toVar();
2473
+ }), u = z(this._historyRenderTarget.texture), d = A(() => {
2474
+ let e = Dt(), t = this.beautyNode.size(), n = e.mul(t), r = i(n), o = r.get("closestDepth"), d = r.get("closestPositionTexel"), f = r.get("farthestDepth"), p = this.velocityNode.load(d).xy.mul(H(.5, -.5)), m = e.sub(p), h = a(m), g = m.greaterThanEqual(0).all().and(m.lessThanEqual(1).all()), _ = f.sub(o).greaterThan(this.edgeDepthDiff), v = o.sub(h).greaterThan(this.depthThreshold), y = g.and(_.or(v.not())), b = this.beautyNode.sample(e), x = u.sample(e.sub(p)), S = e.sub(m).mul(t).length().div(this.maxVelocityLength).saturate(), C = F(.05).toVar();
2475
+ return this.useSubpixelCorrection && C.addAssign(c(p, t).mul(.25)), C.assign(y.select(C.add(S).saturate(), 1)), l(b, s(n, b, x, tt(.5, 1, S.oneMinus().pow2())), C);
2476
+ });
2477
+ return this._resolveMaterial.colorNode = d(), this._textureNode;
2141
2478
  }
2142
- enableUiInteractionMode() {
2143
- console.error("RoomleWebGPURenderer.enableUiInteractionMode is not implemented yet");
2479
+ dispose() {
2480
+ this._historyRenderTarget.dispose(), this._resolveRenderTarget.dispose(), this._resolveMaterial.dispose();
2481
+ }
2482
+ };
2483
+ function Nn(e, t) {
2484
+ let n = 1, r = 0;
2485
+ for (; e > 0;) n /= t, r += e % t * n, e = Math.floor(e / t);
2486
+ return r;
2487
+ }
2488
+ var Pn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Nn(t + 1, 2), Nn(t + 1, 3)]), Fn = (e, t, n, r) => new Mn(Re(e), t, n, r), In = class e extends It {
2489
+ constructor(...t) {
2490
+ super(...t), this.passId = e.passId;
2144
2491
  }
2492
+ static {
2493
+ this.passId = "TraaRenderPass";
2494
+ }
2495
+ assemble(e, t, n, i, a) {
2496
+ return i instanceof r ? Fn(t, e.getTextureNode("depth"), e.getTextureNode("velocity"), i) : t;
2497
+ }
2498
+ addParametersToGUI(e, t) {}
2499
+ }, Ln = class extends ge {
2500
+ constructor(e, t, n, r) {
2501
+ super(e, t), this.passNeedsReassembly = !0, this.debugMode = "off", this.renderPasses = /* @__PURE__ */ new Map(), this.guiParameterGroups = /* @__PURE__ */ new Map(), this.lastRenderCamera = void 0, this.renderPipeline = new Te(t), this.enableRenderPasses(n, r);
2502
+ }
2503
+ enableRenderPasses(e, t) {
2504
+ e && this.enableSsgiPass(), t && this.enableOutline(t.outlineVisibleEdgeColor, t.outlineHiddenEdgeColor), e && this.enableTraaPass();
2505
+ }
2506
+ addGroundShadowLightAndFloor(e) {
2507
+ this._webGpuGroundShadow.addToScene(e);
2508
+ }
2509
+ addRenderPass(e) {
2510
+ this.renderPasses.set(e.passId, e), this.passNeedsReassembly = !0;
2511
+ }
2512
+ clearCache() {}
2513
+ disableUiInteractionMode() {}
2514
+ enableUiInteractionMode() {}
2145
2515
  getQualityLevel() {
2146
- return console.error("RoomleWebGPURenderer.getQualityLevel is not implemented yet"), me.HIGHEST;
2516
+ return console.error("RoomleRenderer.getQualityLevel is part of autoquality/performance tuning which is not implemented yet for WebGPU"), fe.HIGHEST;
2147
2517
  }
2148
2518
  setCameraType(e) {
2149
2519
  super.setCameraType(e), this.passNeedsReassembly = !0;
2150
2520
  }
2521
+ switchToConfigurator() {
2522
+ super.switchToConfigurator(), this._webGpuGroundShadow?.setVisible(!0);
2523
+ }
2151
2524
  switchToPlanner(e) {
2152
- super.switchToPlanner(e), this.passNeedsReassembly = !0;
2525
+ super.switchToPlanner(e), this._webGpuGroundShadow?.setVisible(!1), this.passNeedsReassembly = !0;
2153
2526
  }
2154
2527
  highlightObjects(e) {
2155
- let t = this.getOutlinePassOrUndefined();
2156
- t && (this.passNeedsReassembly = this.passNeedsReassembly || t.areObjectsSelected() && e.length === 0 || !t.areObjectsSelected() && e.length > 0), t?.highlightObjects(e);
2528
+ this.getOutlinePassOrUndefined()?.highlightObjects(e);
2157
2529
  }
2158
2530
  loadLutImages(e) {
2159
2531
  console.error("RoomleWebGPURenderer.loadLutImages is not implemented yet");
2160
2532
  }
2161
2533
  render(e, t) {
2162
- this.updateCameraProjectionMatrix(t), this.passNeedsReassembly &&= (this.renderPipeline.outputNode = this.assembleRenderPasses(e, t), this.renderPipeline.needsUpdate = !0, !1), this.renderPipeline.render();
2534
+ this.updateCameraProjectionMatrix(t), (this.passNeedsReassembly || this.lastRenderCamera !== t) && (this.renderPipeline.outputNode = this.assembleRenderPasses(e, t), this.renderPipeline.needsUpdate = !0, this.passNeedsReassembly = !1, this.lastRenderCamera = t), this.renderPipeline.render();
2163
2535
  }
2164
2536
  updateCameraProjectionMatrix(e) {
2165
2537
  (e instanceof l || e instanceof r) && e.updateProjectionMatrix();
2166
2538
  }
2167
2539
  assembleRenderPasses(e, t) {
2168
- let n = Ie(e, t);
2169
- for (let r of this.renderPasses.values()) n = r.assemble(n, e, t, this.debugMode);
2170
- return n;
2540
+ let n = ct(e, t), r = n;
2541
+ for (let i of this.renderPasses.values()) r = i.assemble(n, r, e, t, this.debugMode);
2542
+ return r;
2171
2543
  }
2172
2544
  setAutoQuality(e) {
2173
- console.error("RoomleWebGPURenderer.setAutoQuality is not implemented yet");
2174
- }
2175
- setCustomShadingParameters(e, t) {
2176
- console.error("RoomleWebGPURenderer.setCustomShadingParameters is not implemented yet");
2545
+ console.error("RoomleRenderer.setAutoQuality is part of autoquality/performance tuning which is not implemented yet for WebGPU");
2177
2546
  }
2547
+ setCustomShadingParameters(e, t) {}
2178
2548
  setCustomOutlineParameters(e) {
2179
2549
  let t = this.getOutlinePassOrUndefined();
2180
- t && (t.setOutlineColors(e.outlineVisibleEdgeColor, e.outlineHiddenEdgeColor), this.passNeedsReassembly = !0);
2550
+ t && t.setOutlineColors(e.outlineVisibleEdgeColor, e.outlineHiddenEdgeColor);
2181
2551
  }
2182
- setGroundShadow(e) {
2183
- console.error("RoomleWebGPURenderer.setGroundShadow is not implemented yet");
2552
+ setGroundShadow(e, t) {
2553
+ this.isConfiguratorMode && this._webGpuGroundShadow?.setVisible(e);
2184
2554
  }
2185
2555
  setOnQualityLevelChangeCallback(e) {
2186
- console.error("RoomleWebGPURenderer.setOnQualityLevelChangeCallback is not implemented yet");
2556
+ console.error("RoomleRenderer.setOnQualityLevelChangeCallback is part of autoquality/performance tuning which is not implemented yet for WebGPU");
2187
2557
  }
2188
2558
  enableOutline(e, t) {
2189
- this.renderPasses.get(z.passId) || this.addRenderPass(new z({
2559
+ this.getOutlinePassOrUndefined() || this.addRenderPass(new Lt({
2190
2560
  selectedObjects: [],
2191
2561
  visibleEdgeColor: e,
2192
2562
  hiddenEdgeColor: t,
@@ -2196,39 +2566,79 @@ var wt = class extends ve {
2196
2566
  }));
2197
2567
  }
2198
2568
  getOutlinePassOrUndefined() {
2199
- let e = this.renderPasses.get(z.passId);
2200
- if (e && e instanceof z) return e;
2569
+ let e = this.renderPasses.get(Lt.passId);
2570
+ if (e && e instanceof Lt) return e;
2571
+ }
2572
+ enableSsgiPass() {
2573
+ this.renderPasses.get(On.passId) || this.addRenderPass(new On({
2574
+ sliceCount: 2,
2575
+ stepCount: 12,
2576
+ radius: 8,
2577
+ expFactor: 2,
2578
+ thickness: 1,
2579
+ backfaceLighting: 0,
2580
+ aoIntensity: .6,
2581
+ giIntensity: 4,
2582
+ useLinearThickness: !1,
2583
+ useScreenSpaceSampling: !0
2584
+ }));
2585
+ }
2586
+ enableTraaPass() {
2587
+ this.renderPasses.get(In.passId) || this.addRenderPass(new In());
2201
2588
  }
2202
2589
  setQualityLevel(e) {
2203
- console.error("RoomleWebGPURenderer.setQualityLevel is not implemented yet");
2590
+ console.error("RoomleRenderer.setQualityLevel is part of autoquality/performance tuning which is not implemented yet for WebGPU");
2204
2591
  }
2205
2592
  setQualityMap(e) {
2206
- console.error("RoomleWebGPURenderer.setQualityMap is not implemented yet");
2593
+ console.error("RoomleRenderer.setQualityMap is part of autoquality/performance tuning which is not implemented yet for WebGPU");
2207
2594
  }
2208
2595
  setShadingType(e) {
2209
- console.error("RoomleWebGPURenderer.setShadingType is not implemented yet");
2596
+ e !== de.DEFAULT && console.error("RoomleWebGPURenderer.setShadingType is not implemented yet");
2210
2597
  }
2211
2598
  showGUI(e) {
2212
- if (this.renderer.inspector instanceof Z) return;
2599
+ if (this.renderer.inspector instanceof vn) return;
2213
2600
  let t = document.createElement("style");
2214
2601
  t.innerText = "#profiler-toggle,\n #profiler-mini-panel {\n left: 15px;\n right: auto !important;\n }", document.head.appendChild(t);
2215
- let n = new Z();
2602
+ let n = new vn();
2216
2603
  this.renderer.inspector = n, this._domHelper.element?.appendChild(n.domElement), this.addDebugGUI(n, e);
2217
2604
  let r = n.createParameters("Render Pass Settings");
2218
2605
  for (let t of this.renderPasses.values()) t.addParametersToGUI(r, e);
2606
+ this.addToneMappingSettings(r, e);
2219
2607
  }
2220
2608
  addDebugGUI(e, t) {
2221
2609
  let n = e.createParameters("Debug Settings"), r = { debugMode: this.debugMode };
2222
2610
  n.add(r, "debugMode", {
2223
2611
  Off: "off",
2224
- Outline: "outline"
2612
+ Outline: "outline",
2613
+ Direct: "direct lighting only",
2614
+ Ao: "ao only",
2615
+ Gi: "gi only"
2225
2616
  }).onChange((e) => {
2226
2617
  this.debugMode = e, this.passNeedsReassembly = !0, t();
2227
2618
  });
2228
2619
  }
2620
+ addToneMappingSettings(e, t) {
2621
+ let n = e.addFolder("Tone Mapping"), r = {
2622
+ toneMapping: this.renderer.toneMapping,
2623
+ toneMappingExposure: this.renderer.toneMappingExposure
2624
+ };
2625
+ n.add(r, "toneMapping", {
2626
+ None: 0,
2627
+ Linear: 1,
2628
+ Reinhard: 2,
2629
+ Cineon: 3,
2630
+ ACESFilmic: 4,
2631
+ AgX: 6,
2632
+ Neutral: 7
2633
+ }).onChange((e) => {
2634
+ this.renderer.toneMapping = e, this.passNeedsReassembly = !0, t();
2635
+ }), n.add(r, "toneMappingExposure", 0, 3, .01).onChange((e) => {
2636
+ this.renderer.toneMappingExposure = e, this.passNeedsReassembly = !0, t();
2637
+ });
2638
+ }
2229
2639
  getOrCreateGUIParameters(e) {
2230
2640
  let t = this.renderer.inspector;
2231
- if (t instanceof Z) return this.guiParameterGroups.get(e) ?? this.createAndCacheGUIParameters(t, e);
2641
+ if (t instanceof vn) return this.guiParameterGroups.get(e) ?? this.createAndCacheGUIParameters(t, e);
2232
2642
  throw Error("Inspector GUI is not initialized. Call showGUI() before creating parameter groups.");
2233
2643
  }
2234
2644
  createAndCacheGUIParameters(e, t) {
@@ -2236,8 +2646,8 @@ var wt = class extends ve {
2236
2646
  return this.guiParameterGroups.set(t, n), n;
2237
2647
  }
2238
2648
  };
2239
- _e([ge, he("design:type", Object)], wt.prototype, "_domHelper", void 0);
2649
+ he([me, pe("design:type", Object)], Ln.prototype, "_domHelper", void 0), he([me, pe("design:type", Object)], Ln.prototype, "_webGpuGroundShadow", void 0);
2240
2650
  //#endregion
2241
- export { wt as RoomleWebGPURenderer };
2651
+ export { Ln as RoomleWebGPURenderer };
2242
2652
 
2243
- //# sourceMappingURL=roomle-webgpu-renderer-BdCItfH1.mjs.map
2653
+ //# sourceMappingURL=roomle-webgpu-renderer-Cs4eLEwf.mjs.map