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

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