@roomle/web-sdk 3.9.0-alpha.4 → 3.9.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{BufferGeometry-ltw0XkYt.mjs → BufferGeometry-Dxcf7n9V.mjs} +1 -1
- package/lib/{BufferGeometry-ltw0XkYt.mjs.map → BufferGeometry-Dxcf7n9V.mjs.map} +1 -1
- package/lib/ConfiguratorKernel.wasm +0 -0
- package/lib/{GLTFExporter-yfYOtLdk.mjs → GLTFExporter-kpv1e-Ks.mjs} +84 -84
- package/lib/{GLTFExporter-yfYOtLdk.mjs.map → GLTFExporter-kpv1e-Ks.mjs.map} +1 -1
- package/lib/GaussianBlurNode-CMVlBe39.mjs +59 -0
- package/lib/GaussianBlurNode-CMVlBe39.mjs.map +1 -0
- package/lib/{PointLightHelper-AxCe6I00.mjs → PointLightHelper-fzRB58rC.mjs} +2 -2
- package/lib/{PointLightHelper-AxCe6I00.mjs.map → PointLightHelper-fzRB58rC.mjs.map} +1 -1
- package/lib/RoomleCore.wasm +0 -0
- package/lib/RoomleToolsCore.wasm +0 -0
- package/lib/{SpotLightHelper-DpMerFPv.mjs → SpotLightHelper-D5UFwRPb.mjs} +2 -2
- package/lib/{SpotLightHelper-DpMerFPv.mjs.map → SpotLightHelper-D5UFwRPb.mjs.map} +1 -1
- package/lib/{USDZExporter-DFJQYX8l.mjs → USDZExporter-Y0SSGr5_.mjs} +2 -2
- package/lib/{USDZExporter-DFJQYX8l.mjs.map → USDZExporter-Y0SSGr5_.mjs.map} +1 -1
- package/lib/{api-x84SYo8e.mjs → api-52cOotqw.mjs} +2 -2
- package/lib/{api-x84SYo8e.mjs.map → api-52cOotqw.mjs.map} +1 -1
- package/lib/{asset-loader.worker-A7nEeQB4.mjs → asset-loader.worker-C911tbNL.mjs} +1 -1
- package/lib/asset-loader.worker-C911tbNL.mjs.map +1 -0
- package/lib/{banana-for-scale-CFY_5rk1.mjs → banana-for-scale-B_LIHI9q.mjs} +3 -3
- package/lib/{banana-for-scale-CFY_5rk1.mjs.map → banana-for-scale-B_LIHI9q.mjs.map} +1 -1
- package/lib/{budgeteer.sw-CQWYbQSc.mjs → budgeteer.sw-D3VxiASa.mjs} +1 -1
- package/lib/budgeteer.sw-D3VxiASa.mjs.map +1 -0
- package/lib/{common-utils-L3DF6Ey5.mjs → common-utils-B9PC_rvS.mjs} +2 -2
- package/lib/{common-utils-L3DF6Ey5.mjs.map → common-utils-B9PC_rvS.mjs.map} +1 -1
- package/lib/{component-dimensioning-FjlPqIvQ.mjs → component-dimensioning-12aJsCzQ.mjs} +31 -31
- package/lib/{component-dimensioning-FjlPqIvQ.mjs.map → component-dimensioning-12aJsCzQ.mjs.map} +1 -1
- package/lib/{component-raycast-helper-1n4uXeSD.mjs → component-raycast-helper-CcrmOq29.mjs} +14 -14
- package/lib/{component-raycast-helper-1n4uXeSD.mjs.map → component-raycast-helper-CcrmOq29.mjs.map} +1 -1
- package/lib/configurator-CarZpfPv.mjs +2 -0
- package/lib/{configurator-Dw5JbPMY.mjs → configurator-D3ZKy6bf.mjs} +10 -10
- package/lib/{configurator-Dw5JbPMY.mjs.map → configurator-D3ZKy6bf.mjs.map} +1 -1
- package/lib/{continuous-drawing-helper-DEmx54k_.mjs → continuous-drawing-helper-D25YPUle.mjs} +4 -4
- package/lib/{continuous-drawing-helper-DEmx54k_.mjs.map → continuous-drawing-helper-D25YPUle.mjs.map} +1 -1
- package/lib/{dimensioning-helper-BXD6AEqL.mjs → dimensioning-helper-d6JA4UMr.mjs} +49 -49
- package/lib/{dimensioning-helper-BXD6AEqL.mjs.map → dimensioning-helper-d6JA4UMr.mjs.map} +1 -1
- package/lib/dimensioning-helper-pPTkh8pl.mjs +2 -0
- package/lib/{glb-viewer-CWkc6wx7.mjs → glb-viewer-BJJ9OIlH.mjs} +35 -35
- package/lib/{glb-viewer-CWkc6wx7.mjs.map → glb-viewer-BJJ9OIlH.mjs.map} +1 -1
- package/lib/glb-viewer-CJ7BPqI-.mjs +2 -0
- package/lib/{highlight-coordinator-BJJw_RgR.mjs → highlight-coordinator-BuFleG2q.mjs} +8 -8
- package/lib/{highlight-coordinator-BJJw_RgR.mjs.map → highlight-coordinator-BuFleG2q.mjs.map} +1 -1
- package/lib/{homag-intelligence-Dk4WxD0p.mjs → homag-intelligence-BxpMWKLs.mjs} +5 -5
- package/lib/{homag-intelligence-Dk4WxD0p.mjs.map → homag-intelligence-BxpMWKLs.mjs.map} +1 -1
- package/lib/{imos-ix-poc-export-helper-C9wPB6fl.mjs → imos-ix-poc-export-helper-DU0ag-Lw.mjs} +3 -3
- package/lib/{imos-ix-poc-export-helper-C9wPB6fl.mjs.map → imos-ix-poc-export-helper-DU0ag-Lw.mjs.map} +1 -1
- package/lib/{kernel-utils-B5QlsCwn.mjs → kernel-utils-Cj5B4fDD.mjs} +16 -16
- package/lib/{kernel-utils-B5QlsCwn.mjs.map → kernel-utils-Cj5B4fDD.mjs.map} +1 -1
- package/lib/{main-CqSFaC9L.mjs → main-QTvbXAvy.mjs} +27277 -3406
- package/lib/main-QTvbXAvy.mjs.map +1 -0
- package/lib/{material-viewer-BSgvHUAe.mjs → material-viewer-BPcCfvCC.mjs} +18 -18
- package/lib/{material-viewer-BSgvHUAe.mjs.map → material-viewer-BPcCfvCC.mjs.map} +1 -1
- package/lib/packages-JQ2uWInj.mjs +4 -0
- package/lib/{planner-BgAj8Jp1.mjs → planner-C1-sOmHY.mjs} +5 -5
- package/lib/{planner-BgAj8Jp1.mjs.map → planner-C1-sOmHY.mjs.map} +1 -1
- package/lib/planner-CnRaQM_h.mjs +2 -0
- package/lib/{plugin-system-BBgoIai2.mjs → plugin-system-DlME_5b_.mjs} +2 -2
- package/lib/{plugin-system-BBgoIai2.mjs.map → plugin-system-DlME_5b_.mjs.map} +1 -1
- package/lib/rolldown-runtime-BwvMKf85.mjs +23 -0
- package/lib/roomle-headless.d.ts +32 -4
- package/lib/roomle-headless.js +40 -40
- package/lib/roomle-headless.js.map +1 -1
- package/lib/{roomle-renderer-CkSFbpmg.mjs → roomle-renderer-DYQvV88j.mjs} +2 -2
- package/lib/{roomle-renderer-CkSFbpmg.mjs.map → roomle-renderer-DYQvV88j.mjs.map} +1 -1
- package/lib/roomle-sdk.d.ts +32 -4
- package/lib/roomle-sdk.js +8 -8
- package/lib/{roomle-webgpu-renderer-DUr1RZL6.mjs → roomle-webgpu-renderer-BrZZeAGw.mjs} +296 -419
- package/lib/roomle-webgpu-renderer-BrZZeAGw.mjs.map +1 -0
- package/lib/{scene-renderer-BuMnigf2.mjs → scene-renderer-3nhM4cEu.mjs} +394 -394
- package/lib/{scene-renderer-BuMnigf2.mjs.map → scene-renderer-3nhM4cEu.mjs.map} +1 -1
- package/lib/{script-loader-DzyUQT3-.mjs → script-loader-3LiaLeLT.mjs} +2 -2
- package/lib/{script-loader-DzyUQT3-.mjs.map → script-loader-3LiaLeLT.mjs.map} +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/package.json +1 -1
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/ConfiguratorKernel.wasm +0 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleCore.wasm +0 -0
- package/lib/static/roomle-core-hsc/node_modules/roomle-core-hsc/wasm_modern/RoomleToolsCore.wasm +0 -0
- package/lib/{stats-helper-BZnX3BX3.mjs → stats-helper-COC7Moh0.mjs} +3 -3
- package/lib/{stats-helper-BZnX3BX3.mjs.map → stats-helper-COC7Moh0.mjs.map} +1 -1
- package/lib/{three.core-DNErG1F6.mjs → three.core-tV_4n8Wg.mjs} +374 -301
- package/lib/{three.core-DNErG1F6.mjs.map → three.core-tV_4n8Wg.mjs.map} +1 -1
- package/lib/{three.module-BZkESKo3.mjs → three.module-DC5fF9Zl.mjs} +1568 -1568
- package/lib/{three.module-BZkESKo3.mjs.map → three.module-DC5fF9Zl.mjs.map} +1 -1
- package/lib/three.tsl-CAEdYyg3.mjs +136 -0
- package/lib/three.tsl-CAEdYyg3.mjs.map +1 -0
- package/lib/three.tsl-S0OKwamA.mjs +2 -0
- package/lib/{three.webgpu-C8myBXe1.mjs → three.webgpu-CkP2nkXM.mjs} +747 -747
- package/lib/{three.webgpu-C8myBXe1.mjs.map → three.webgpu-CkP2nkXM.mjs.map} +1 -1
- package/lib/three.webgpu-qrxDA_v0.mjs +3 -0
- package/lib/{threejs-utils-D7sinreM.mjs → threejs-utils-CElderZe.mjs} +68 -68
- package/lib/threejs-utils-CElderZe.mjs.map +1 -0
- package/lib/{tools-core-BxOoo-C1.mjs → tools-core-mkA4m80O.mjs} +3 -3
- package/lib/{tools-core-BxOoo-C1.mjs.map → tools-core-mkA4m80O.mjs.map} +1 -1
- package/lib/workers-HXGCmmZS.mjs +6 -0
- package/lib/{workers-BJYv3y38.mjs.map → workers-HXGCmmZS.mjs.map} +1 -1
- package/package.json +1 -1
- package/lib/asset-loader.worker-A7nEeQB4.mjs.map +0 -1
- package/lib/budgeteer.sw-CQWYbQSc.mjs.map +0 -1
- package/lib/configurator-DeUTcLI3.mjs +0 -2
- package/lib/dimensioning-helper-Do9jwg8T.mjs +0 -2
- package/lib/glb-viewer-Ci-IZcIt.mjs +0 -2
- package/lib/main-CqSFaC9L.mjs.map +0 -1
- package/lib/packages-0mEYlGTx.mjs +0 -4
- package/lib/planner-CIvdB7af.mjs +0 -2
- package/lib/rolldown-runtime-DgwB9i60.mjs +0 -13
- package/lib/roomle-webgpu-renderer-DUr1RZL6.mjs.map +0 -1
- package/lib/three.webgpu-WIkDzwXU.mjs +0 -3
- package/lib/threejs-utils-D7sinreM.mjs.map +0 -1
- package/lib/workers-BJYv3y38.mjs +0 -6
|
@@ -1,141 +1,18 @@
|
|
|
1
|
-
import { Ar as e,
|
|
2
|
-
import { o as
|
|
3
|
-
import { n as
|
|
4
|
-
import { n as
|
|
5
|
-
import { Rt as
|
|
6
|
-
|
|
7
|
-
var De = O.Break;
|
|
8
|
-
O.Const, O.Continue, O.DFGLUT, O.D_GGX, O.Discard, O.EPSILON, O.F_Schlick;
|
|
9
|
-
var A = O.Fn;
|
|
10
|
-
O.INFINITY;
|
|
11
|
-
var j = O.If, Oe = O.Loop;
|
|
12
|
-
O.NodeAccess, O.NodeShaderStage, O.NodeType;
|
|
13
|
-
var ke = O.NodeUpdateType;
|
|
14
|
-
O.PCFShadowFilter, O.PCFSoftShadowFilter;
|
|
15
|
-
var Ae = O.PI;
|
|
16
|
-
O.PI2, O.TWO_PI;
|
|
17
|
-
var je = O.HALF_PI;
|
|
18
|
-
O.PointShadowFilter, O.Return, O.Schlick_to_F0, O.ShaderNode, O.Stack, O.Switch, O.TBNViewMatrix, O.VSMShadowFilter, O.V_GGX_SmithCorrelated, O.Var, O.VarIntent;
|
|
19
|
-
var M = O.abs;
|
|
20
|
-
O.acesFilmicToneMapping;
|
|
21
|
-
var Me = O.acos;
|
|
22
|
-
O.acosh;
|
|
23
|
-
var Ne = O.add;
|
|
24
|
-
O.addMethodChaining, O.addNodeElement, O.agxToneMapping, O.all, O.alphaT, O.and, O.anisotropy, O.anisotropyB, O.anisotropyT, O.any, O.append, O.array, O.arrayBuffer, O.asin, O.asinh, O.assign, O.atan, O.atanh, O.atomicAdd, O.atomicAnd, O.atomicFunc, O.atomicLoad, O.atomicMax, O.atomicMin, O.atomicOr, O.atomicStore, O.atomicSub, O.atomicXor, O.attenuationColor, O.attenuationDistance, O.attribute, O.attributeArray, O.backgroundBlurriness, O.backgroundIntensity, O.backgroundRotation, O.batch, O.bentNormalView, O.billboarding, O.bitAnd, O.bitNot, O.bitOr, O.bitXor, O.bitangentGeometry, O.bitangentLocal, O.bitangentView, O.bitangentWorld, O.bitcast, O.blendBurn, O.blendColor, O.blendDodge, O.blendOverlay, O.blendScreen, O.blur;
|
|
25
|
-
var Pe = O.bool;
|
|
26
|
-
O.buffer, O.bufferAttribute, O.bumpMap, O.builtin, O.builtinAOContext, O.builtinShadowContext, O.bvec2, O.bvec3, O.bvec4, O.bypass, O.cache, O.call, O.cameraFar, O.cameraIndex, O.cameraNear, O.cameraNormalMatrix, O.cameraPosition, O.cameraProjectionMatrix, O.cameraProjectionMatrixInverse, O.cameraViewMatrix, O.cameraViewport, O.cameraWorldMatrix, O.cbrt, O.cdl;
|
|
27
|
-
var Fe = O.ceil;
|
|
28
|
-
O.checker, O.cineonToneMapping;
|
|
29
|
-
var N = O.clamp;
|
|
30
|
-
O.clearcoat, O.clearcoatNormalView, O.clearcoatRoughness, O.clipSpace, O.code;
|
|
31
|
-
var Ie = O.color;
|
|
32
|
-
O.colorSpaceToWorking;
|
|
33
|
-
var Le = O.colorToDirection;
|
|
34
|
-
O.compute, O.computeKernel, O.computeSkinning, O.context, O.convert, O.convertColorSpace;
|
|
35
|
-
var Re = O.convertToTexture;
|
|
36
|
-
O.countLeadingZeros;
|
|
37
|
-
var ze = O.countOneBits;
|
|
38
|
-
O.countTrailingZeros;
|
|
39
|
-
var Be = O.cos;
|
|
40
|
-
O.cosh;
|
|
41
|
-
var Ve = O.cross;
|
|
42
|
-
O.cubeTexture, O.cubeTextureBase, O.dFdx, O.dFdy, O.dashSize, O.debug, O.decrement, O.decrementBefore, O.defaultBuildStages, O.defaultShaderStages, O.defined, O.degrees, O.deltaTime, O.densityFog, O.densityFogFactor, O.depth, O.depthPass, O.determinant, O.difference;
|
|
43
|
-
var He = O.diffuseColor;
|
|
44
|
-
O.directPointLight;
|
|
45
|
-
var Ue = O.directionToColor;
|
|
46
|
-
O.directionToFaceDirection, O.dispersion, O.distance;
|
|
47
|
-
var We = O.div, P = O.dot;
|
|
48
|
-
O.drawIndex, O.dynamicBufferAttribute, O.element, O.emissive, O.equal, O.equirectUV;
|
|
49
|
-
var Ge = O.exp;
|
|
50
|
-
O.exp2, O.exponentialHeightFogFactor, O.expression, O.faceDirection, O.faceForward, O.faceforward;
|
|
51
|
-
var F = O.float;
|
|
52
|
-
O.floatBitsToInt, O.floatBitsToUint, O.floor, O.fog;
|
|
53
|
-
var Ke = O.fract;
|
|
54
|
-
O.frameGroup, O.frameId, O.frontFacing, O.fwidth, O.gain, O.gapSize, O.getConstNodeType, O.getCurrentStack, O.getDirection, O.getDistanceAttenuation, O.getGeometryRoughness;
|
|
55
|
-
var qe = O.getNormalFromDepth, Je = O.interleavedGradientNoise;
|
|
56
|
-
O.vogelDiskSample, O.getParallaxCorrectNormal, O.getRoughness, O.getScreenPosition, O.getShIrradianceAt, O.getShadowMaterial, O.getShadowRenderObjectFunction, O.getTextureIndex;
|
|
57
|
-
var Ye = O.getViewPosition;
|
|
58
|
-
O.globalId, O.glsl, O.glslFn, O.grayscale, O.greaterThan, O.greaterThanEqual, O.hash, O.highpModelNormalViewMatrix, O.highpModelViewMatrix, O.hue, O.increment, O.incrementBefore, O.instance, O.instanceIndex, O.instancedArray, O.instancedBufferAttribute, O.instancedDynamicBufferAttribute, O.instancedMesh;
|
|
59
|
-
var Xe = O.int;
|
|
60
|
-
O.intBitsToFloat, O.inverse, O.inverseSqrt, O.inversesqrt, O.invocationLocalIndex, O.invocationSubgroupIndex, O.ior, O.iridescence, O.iridescenceIOR, O.iridescenceThickness;
|
|
61
|
-
var Ze = O.ivec2;
|
|
62
|
-
O.ivec3, O.ivec4, O.js, O.label, O.length, O.lengthSq, O.lessThan, O.lessThanEqual, O.lightPosition, O.lightProjectionUV, O.lightShadowMatrix, O.lightTargetDirection, O.lightTargetPosition, O.lightViewPosition, O.lightingContext, O.lights, O.linearDepth, O.linearToneMapping, O.localId, O.log, O.log2;
|
|
63
|
-
var Qe = O.logarithmicDepthToViewZ, $e = O.luminance;
|
|
64
|
-
O.mat2, O.mat3, O.mat4, O.matcapUV, O.materialAO, O.materialAlphaTest, O.materialAnisotropy, O.materialAnisotropyVector, O.materialAttenuationColor, O.materialAttenuationDistance, O.materialClearcoat, O.materialClearcoatNormal, O.materialClearcoatRoughness, O.materialColor, O.materialDispersion, O.materialEmissive, O.materialEnvIntensity, O.materialEnvRotation, O.materialIOR, O.materialIridescence, O.materialIridescenceIOR, O.materialIridescenceThickness, O.materialLightMap, O.materialLineDashOffset, O.materialLineDashSize, O.materialLineGapSize, O.materialLineScale, O.materialLineWidth, O.materialMetalness, O.materialNormal, O.materialOpacity, O.materialPointSize, O.materialReference, O.materialReflectivity, O.materialRefractionRatio, O.materialRotation, O.materialRoughness, O.materialSheen, O.materialSheenRoughness, O.materialShininess, O.materialSpecular, O.materialSpecularColor, O.materialSpecularIntensity, O.materialSpecularStrength, O.materialThickness, O.materialTransmission;
|
|
65
|
-
var I = O.max;
|
|
66
|
-
O.maxMipLevel, O.mediumpModelViewMatrix, O.metalness;
|
|
67
|
-
var et = O.min, tt = O.mix;
|
|
68
|
-
O.mixElement, O.mod, O.modInt, O.modelDirection, O.modelNormalMatrix, O.modelPosition, O.modelRadius, O.modelScale, O.modelViewMatrix, O.modelViewPosition, O.modelViewProjection, O.modelWorldMatrix, O.modelWorldMatrixInverse, O.morphReference;
|
|
69
|
-
var nt = O.mrt, L = O.mul;
|
|
70
|
-
O.mx_aastep, O.mx_add, O.mx_atan2, O.mx_cell_noise_float, O.mx_contrast, O.mx_divide, O.mx_fractal_noise_float, O.mx_fractal_noise_vec2, O.mx_fractal_noise_vec3, O.mx_fractal_noise_vec4, O.mx_frame, O.mx_heighttonormal, O.mx_hsvtorgb, O.mx_ifequal, O.mx_ifgreater, O.mx_ifgreatereq, O.mx_invert, O.mx_modulo, O.mx_multiply, O.mx_noise_float, O.mx_noise_vec3, O.mx_noise_vec4, O.mx_place2d, O.mx_power, O.mx_ramp4, O.mx_ramplr, O.mx_ramptb, O.mx_rgbtohsv, O.mx_rotate2d, O.mx_rotate3d, O.mx_safepower, O.mx_separate, O.mx_splitlr, O.mx_splittb, O.mx_srgb_texture_to_lin_rec709, O.mx_subtract, O.mx_timer, O.mx_transform_uv, O.mx_unifiednoise2d, O.mx_unifiednoise3d, O.mx_worley_noise_float, O.mx_worley_noise_vec2, O.mx_worley_noise_vec3, O.negate, O.neutralToneMapping, O.nodeArray, O.nodeImmutable;
|
|
71
|
-
var rt = O.nodeObject;
|
|
72
|
-
O.nodeObjectIntent, O.nodeObjects, O.nodeProxy, O.nodeProxyIntent, O.normalFlat, O.normalGeometry, O.normalLocal, O.normalMap;
|
|
73
|
-
var it = O.normalView;
|
|
74
|
-
O.normalViewGeometry, O.normalWorld, O.normalWorldGeometry;
|
|
75
|
-
var R = O.normalize;
|
|
76
|
-
O.not, O.notEqual, O.numWorkgroups, O.objectDirection, O.objectGroup, O.objectPosition, O.objectRadius, O.objectScale, O.objectViewPosition, O.objectWorldMatrix, O.OnBeforeObjectUpdate, O.OnBeforeMaterialUpdate, O.OnObjectUpdate;
|
|
77
|
-
var at = O.OnMaterialUpdate;
|
|
78
|
-
O.oneMinus, O.or;
|
|
79
|
-
var ot = O.orthographicDepthToViewZ;
|
|
80
|
-
O.oscSawtooth, O.oscSine, O.oscSquare, O.oscTriangle;
|
|
81
|
-
var st = O.output;
|
|
82
|
-
O.outputStruct, O.overloadingFn, O.packHalf2x16, O.packSnorm2x16, O.packUnorm2x16, O.parabola, O.parallaxDirection, O.parallaxUV, O.parameter;
|
|
83
|
-
var ct = O.pass, lt = O.passTexture;
|
|
84
|
-
O.pcurve;
|
|
85
|
-
var ut = O.perspectiveDepthToViewZ;
|
|
86
|
-
O.pmremTexture, O.pointShadow, O.pointUV, O.pointWidth, O.positionGeometry, O.positionLocal, O.positionPrevious;
|
|
87
|
-
var dt = O.positionView;
|
|
88
|
-
O.positionViewDirection, O.positionWorld, O.positionWorldDirection, O.posterize;
|
|
89
|
-
var ft = O.pow;
|
|
90
|
-
O.pow2, O.pow3, O.pow4, O.premultiplyAlpha, O.property, O.radians;
|
|
91
|
-
var pt = O.rand;
|
|
92
|
-
O.range, O.rangeFog, O.rangeFogFactor, O.reciprocal;
|
|
93
|
-
var mt = O.reference;
|
|
94
|
-
O.referenceBuffer, O.reflect, O.reflectVector, O.reflectView, O.reflector, O.refract, O.refractVector, O.refractView, O.reinhardToneMapping, O.remap, O.remapClamp, O.renderGroup;
|
|
95
|
-
var ht = O.renderOutput;
|
|
96
|
-
O.rendererReference, O.replaceDefaultUV, O.rotate, O.rotateUV, O.roughness, O.round, O.rtt, O.sRGBTransferEOTF, O.sRGBTransferOETF;
|
|
97
|
-
var gt = O.sample;
|
|
98
|
-
O.sampler, O.samplerComparison, O.saturate, O.saturation, O.screen;
|
|
99
|
-
var _t = O.screenCoordinate;
|
|
100
|
-
O.screenDPR, O.screenSize;
|
|
101
|
-
var vt = O.screenUV;
|
|
102
|
-
O.select, O.setCurrentStack, O.setName, O.shaderStages, O.shadow, O.shadowPositionWorld, O.shapeCircle, O.sharedUniformGroup, O.sheen, O.sheenRoughness, O.shiftLeft;
|
|
103
|
-
var yt = O.shiftRight;
|
|
104
|
-
O.shininess;
|
|
105
|
-
var bt = O.sign, xt = O.sin;
|
|
106
|
-
O.sinh, O.sinc, O.skinning, O.smoothstep, O.smoothstepElement, O.specularColor, O.specularF90, O.spherizeUV, O.split, O.spritesheetUV;
|
|
107
|
-
var St = O.sqrt;
|
|
108
|
-
O.stack;
|
|
109
|
-
var Ct = O.step;
|
|
110
|
-
O.stepElement, O.storage, O.storageBarrier, O.storageTexture, O.string;
|
|
111
|
-
var wt = O.struct, Tt = O.sub;
|
|
112
|
-
O.subgroupAdd, O.subgroupAll, O.subgroupAnd, O.subgroupAny, O.subgroupBallot, O.subgroupBroadcast, O.subgroupBroadcastFirst, O.subBuild, O.subgroupElect, O.subgroupExclusiveAdd, O.subgroupExclusiveMul, O.subgroupInclusiveAdd, O.subgroupInclusiveMul, O.subgroupIndex, O.subgroupMax, O.subgroupMin, O.subgroupMul, O.subgroupOr, O.subgroupShuffle, O.subgroupShuffleDown, O.subgroupShuffleUp, O.subgroupShuffleXor, O.subgroupSize, O.subgroupXor, O.tan, O.tanh, O.tangentGeometry, O.tangentLocal, O.tangentView, O.tangentWorld;
|
|
113
|
-
var z = O.texture;
|
|
114
|
-
O.texture3D, O.textureBarrier, O.textureBicubic, O.textureBicubicLevel, O.textureCubeUV, O.textureLoad;
|
|
115
|
-
var Et = O.textureSize;
|
|
116
|
-
O.textureLevel, O.textureStore, O.thickness, O.time, O.toneMapping, O.toneMappingExposure, O.toonOutlinePass, O.transformDirection, O.transformNormal, O.transformNormalToView, O.transformedClearcoatNormalView, O.transformedNormalView, O.transformedNormalWorld, O.transmission, O.transpose, O.triNoise3D, O.triplanarTexture, O.triplanarTextures, O.trunc;
|
|
117
|
-
var B = O.uint;
|
|
118
|
-
O.uintBitsToFloat;
|
|
119
|
-
var V = O.uniform;
|
|
120
|
-
O.uniformArray, O.uniformCubeTexture, O.uniformGroup, O.uniformFlow, O.uniformTexture, O.unpackHalf2x16, O.unpackSnorm2x16, O.unpackUnorm2x16, O.unpremultiplyAlpha, O.userData;
|
|
121
|
-
var Dt = O.uv;
|
|
122
|
-
O.uvec2, O.uvec3, O.uvec4, O.varying, O.varyingProperty;
|
|
123
|
-
var H = O.vec2, U = O.vec3, W = O.vec4;
|
|
124
|
-
O.vectorComponents;
|
|
125
|
-
var Ot = O.velocity;
|
|
126
|
-
O.vertexColor, O.vertexIndex, O.vertexStage, O.vibrance, O.viewZToLogarithmicDepth;
|
|
127
|
-
var kt = O.viewZToOrthographicDepth, At = O.viewZToPerspectiveDepth;
|
|
128
|
-
O.viewZToReversedOrthographicDepth, O.viewZToReversedPerspectiveDepth, O.viewport, O.viewportCoordinate, O.viewportDepthTexture, O.viewportLinearDepth, O.viewportMipTexture, O.viewportOpaqueMipTexture, O.viewportResolution, O.viewportSafeUV, O.viewportSharedTexture, O.viewportSize, O.viewportTexture, O.viewportUV, O.wgsl, O.wgslFn, O.workgroupArray, O.workgroupBarrier, O.workgroupId, O.workingToColorSpace, O.xor;
|
|
129
|
-
//#endregion
|
|
1
|
+
import { Ar as e, Br as t, Cr as n, En as r, Gn as i, Hi as a, J as o, Jr as s, Kn as c, On as l, Qt as u, Tt as d, Wi as f, Y as p, _i as m, bi as h, ci as g, ct as _, g as v, gi as y, hi as b, hr as x, ht as S, in as C, jr as w, kr as T, mi as ee, mr as te, pi as ne, q as re, rt as E, sn as D, t as ie, vi as ae, w as O, wr as oe, xi as k, yi as se } from "./three.core-tV_4n8Wg.mjs";
|
|
2
|
+
import { o as ce, t as le } from "./scene-renderer-3nhM4cEu.mjs";
|
|
3
|
+
import { n as ue, r as de, t as fe } from "./decorate-C9r0zXzz.mjs";
|
|
4
|
+
import { n as pe } from "./roomle-renderer-DYQvV88j.mjs";
|
|
5
|
+
import { Rt as A, Ut as me, Wn as he, Z as ge, bn as j, fr as _e, jn as ve, kt as ye, lr as be, un as xe, vn as Se, x as Ce } from "./three.webgpu-CkP2nkXM.mjs";
|
|
6
|
+
import { A as we, B as Te, C as Ee, Ct as De, D as Oe, E as M, F as N, G as ke, H as Ae, I as je, J as Me, K as Ne, L as Pe, M as Fe, N as Ie, O as Le, P as Re, Q as ze, R as Be, S as Ve, St as He, T as Ue, U as We, V as Ge, W as Ke, Y as qe, Z as Je, _ as Ye, _t as Xe, a as Ze, at as Qe, b as $e, bt as P, c as et, ct as tt, d as nt, dt as rt, et as it, f as at, ft as F, g as ot, h as st, ht as I, i as L, it as ct, j as lt, k as ut, l as R, lt as dt, m as z, mt as B, n as V, nt as ft, o as pt, ot as mt, p as ht, pt as gt, q as _t, r as vt, rt as yt, s as bt, t as xt, tt as St, u as Ct, ut as wt, v as Tt, vt as H, w as U, x as Et, xt as Dt, y as Ot, yt as W, z as kt } from "./three.tsl-CAEdYyg3.mjs";
|
|
130
7
|
//#region ../../node_modules/three/examples/jsm/tsl/display/OutlineNode.js
|
|
131
|
-
var G = /* @__PURE__ */ new
|
|
8
|
+
var G = /* @__PURE__ */ new xe(), At = /* @__PURE__ */ new k(), jt = /* @__PURE__ */ new k(1, 0), Mt = /* @__PURE__ */ new k(0, 1), K, Nt = class extends he {
|
|
132
9
|
static get type() {
|
|
133
10
|
return "OutlineNode";
|
|
134
11
|
}
|
|
135
|
-
constructor(t, n
|
|
12
|
+
constructor(e, t, n = {}) {
|
|
136
13
|
super("vec4");
|
|
137
|
-
let { selectedObjects:
|
|
138
|
-
this.scene =
|
|
14
|
+
let { selectedObjects: r = [], edgeThickness: i = M(1), edgeGlow: a = M(0), downSampleRatio: o = 2 } = n;
|
|
15
|
+
this.scene = e, this.camera = t, this.selectedObjects = r, this.edgeThicknessNode = Te(i), this.edgeGlowNode = Te(a), this.downSampleRatio = o, this.updateBeforeType = me.FRAME, this._renderTargetDepthBuffer = new w(), this._renderTargetDepthBuffer.depthTexture = new p(), this._renderTargetDepthBuffer.depthTexture.type = _, this._renderTargetMaskBuffer = new w(), this._renderTargetMaskDownSampleBuffer = new w(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer1 = new w(1, 1, { depthBuffer: !1 }), this._renderTargetEdgeBuffer2 = new w(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer1 = new w(1, 1, { depthBuffer: !1 }), this._renderTargetBlurBuffer2 = new w(1, 1, { depthBuffer: !1 }), this._renderTargetComposite = new w(1, 1, { depthBuffer: !1 }), this._cameraNear = ze("near", "float", t), this._cameraFar = ze("far", "float", t), this._blurDirection = I(new k()), this._depthTextureUniform = F(this._renderTargetDepthBuffer.depthTexture), this._maskTextureUniform = F(this._renderTargetMaskBuffer.texture), this._maskTextureDownsSampleUniform = F(this._renderTargetMaskDownSampleBuffer.texture), this._edge1TextureUniform = F(this._renderTargetEdgeBuffer1.texture), this._edge2TextureUniform = F(this._renderTargetEdgeBuffer2.texture), this._blurColorTextureUniform = F(this._renderTargetEdgeBuffer1.texture), this._visibleEdgeColor = W(1, 0, 0), this._hiddenEdgeColor = W(0, 1, 0), this._depthMaterial = new A(), this._depthMaterial.colorNode = st(0, 0, 0), this._depthMaterial.name = "OutlineNode.depth", this._depthSpriteMaterial = new ve(), this._depthSpriteMaterial.colorNode = st(0, 0, 0), this._depthSpriteMaterial.name = "OutlineNode.depthSprite", this._prepareMaskMaterial = new A(), this._prepareMaskMaterial.name = "OutlineNode.prepareMask", this._prepareMaskSpriteMaterial = new ve(), this._prepareMaskSpriteMaterial.name = "OutlineNode.prepareMaskSprite", this._materialCopy = new A(), this._materialCopy.name = "OutlineNode.copy", this._edgeDetectionMaterial = new A(), this._edgeDetectionMaterial.name = "OutlineNode.edgeDetection", this._separableBlurMaterial = new A(), this._separableBlurMaterial.name = "OutlineNode.separableBlur", this._separableBlurMaterial2 = new A(), this._separableBlurMaterial2.name = "OutlineNode.separableBlur2", this._compositeMaterial = new A(), this._compositeMaterial.name = "OutlineNode.composite", this._selectionCache = /* @__PURE__ */ new Set(), this._lastSelectionCount = 0, this._textureNode = Ne(this, this._renderTargetComposite.texture);
|
|
139
16
|
}
|
|
140
17
|
get visibleEdge() {
|
|
141
18
|
return this.r;
|
|
@@ -154,11 +31,11 @@ var G = /* @__PURE__ */ new we(), jt = /* @__PURE__ */ new h(), Mt = /* @__PURE_
|
|
|
154
31
|
updateBefore(e) {
|
|
155
32
|
let { renderer: t } = e, { camera: n, scene: r } = this;
|
|
156
33
|
if (this._updateSelectionCache(), this._selectionCache.size === 0) {
|
|
157
|
-
this._lastSelectionCount > 0 && (K =
|
|
34
|
+
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);
|
|
158
35
|
return;
|
|
159
36
|
}
|
|
160
|
-
this._lastSelectionCount = this._selectionCache.size, K =
|
|
161
|
-
let i = t.getDrawingBufferSize(
|
|
37
|
+
this._lastSelectionCount = this._selectionCache.size, K = j.resetRendererAndSceneState(t, r, K);
|
|
38
|
+
let i = t.getDrawingBufferSize(At);
|
|
162
39
|
this.setSize(i.width, i.height), t.setClearColor(16777215, 1);
|
|
163
40
|
let a = r.name;
|
|
164
41
|
t.setRenderTarget(this._renderTargetDepthBuffer), t.setRenderObjectFunction((e, n, r, i, a, o, s, c) => {
|
|
@@ -171,33 +48,33 @@ var G = /* @__PURE__ */ new we(), jt = /* @__PURE__ */ new h(), Mt = /* @__PURE_
|
|
|
171
48
|
let a = e.isSprite ? this._prepareMaskSpriteMaterial : this._prepareMaskMaterial;
|
|
172
49
|
t.renderObject(e, n, r, i, a, o, s, c);
|
|
173
50
|
}
|
|
174
|
-
}), r.name = "Outline [ Selected Objects Pass ]", t.render(r, n), t.setRenderObjectFunction(K.renderObjectFunction), this._selectionCache.clear(), r.name = a, G.material = this._materialCopy, G.name = "Outline [ Downsample ]", t.setRenderTarget(this._renderTargetMaskDownSampleBuffer), G.render(t), G.material = this._edgeDetectionMaterial, G.name = "Outline [ Edge Detection ]", t.setRenderTarget(this._renderTargetEdgeBuffer1), G.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(
|
|
51
|
+
}), 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(jt), 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(Mt), t.setRenderTarget(this._renderTargetEdgeBuffer1), G.render(t), this._blurColorTextureUniform.value = this._renderTargetEdgeBuffer1.texture, this._blurDirection.value.copy(jt), 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(Mt), 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);
|
|
175
52
|
}
|
|
176
53
|
setup() {
|
|
177
54
|
let e = () => {
|
|
178
|
-
let e = this._depthTextureUniform.sample(
|
|
179
|
-
return t = this.camera.isPerspectiveCamera ?
|
|
55
|
+
let e = this._depthTextureUniform.sample(yt), t;
|
|
56
|
+
return t = this.camera.isPerspectiveCamera ? _t(e, this._cameraNear, this._cameraFar) : We(e, this._cameraNear, this._cameraFar), W(0, Me.z.lessThanEqual(t).select(1, 0), 1);
|
|
180
57
|
};
|
|
181
58
|
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;
|
|
182
|
-
let t =
|
|
183
|
-
let e =
|
|
184
|
-
return
|
|
59
|
+
let t = V(() => {
|
|
60
|
+
let e = gt(this._maskTextureDownsSampleUniform), t = H(1).div(e).toVar(), n = P(1, 0, 0, 1).mul(P(t, t)), r = Xe(), 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(kt(i.r.sub(a.r), .5), kt(o.r.sub(s.r), .5)).length();
|
|
61
|
+
return P(je(je(i.g, a.g), je(o.g, s.g)).oneMinus().greaterThan(.001).select(this._visibleEdgeColor, this._hiddenEdgeColor), 1).mul(c);
|
|
185
62
|
});
|
|
186
63
|
this._edgeDetectionMaterial.fragmentNode = t(), this._edgeDetectionMaterial.needsUpdate = !0;
|
|
187
|
-
let n =
|
|
188
|
-
let t =
|
|
189
|
-
return
|
|
190
|
-
start:
|
|
191
|
-
end:
|
|
64
|
+
let n = V(([e, t]) => M(.39894).mul(Ue(M(-.5).mul(e).mul(e).div(t.mul(t))).div(t))), r = V(([e]) => {
|
|
65
|
+
let t = gt(this._maskTextureDownsSampleUniform), r = H(1).div(t).toVar(), i = Xe(), 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();
|
|
66
|
+
return Ze({
|
|
67
|
+
start: we(1),
|
|
68
|
+
end: we(4),
|
|
192
69
|
type: "int",
|
|
193
70
|
condition: "<="
|
|
194
71
|
}, ({ i: t }) => {
|
|
195
|
-
let r = n(e.mul(
|
|
72
|
+
let r = n(e.mul(M(t)).div(4), a), u = this._blurColorTextureUniform.sample(i.add(l)), d = this._blurColorTextureUniform.sample(i.sub(l));
|
|
196
73
|
s.addAssign(u.add(d).mul(r)), o.addAssign(r.mul(2)), l.addAssign(c);
|
|
197
74
|
}), s.div(o);
|
|
198
75
|
});
|
|
199
76
|
this._separableBlurMaterial.fragmentNode = r(this.edgeThicknessNode), this._separableBlurMaterial.needsUpdate = !0, this._separableBlurMaterial2.fragmentNode = r(4), this._separableBlurMaterial2.needsUpdate = !0;
|
|
200
|
-
let i =
|
|
77
|
+
let i = V(() => {
|
|
201
78
|
let e = this._edge1TextureUniform, t = this._edge2TextureUniform, n = this._maskTextureUniform, r = e.add(t.mul(this.edgeGlowNode));
|
|
202
79
|
return n.r.mul(r);
|
|
203
80
|
});
|
|
@@ -211,49 +88,49 @@ var G = /* @__PURE__ */ new we(), jt = /* @__PURE__ */ new h(), Mt = /* @__PURE_
|
|
|
211
88
|
(e.isMesh || e.isSprite) && this._selectionCache.add(e);
|
|
212
89
|
});
|
|
213
90
|
}
|
|
214
|
-
},
|
|
91
|
+
}, Pt = (e, t, n) => new Nt(e, t, n), Ft = class {}, It = class e extends Ft {
|
|
215
92
|
static {
|
|
216
93
|
this.passId = "OutlineRenderPass";
|
|
217
94
|
}
|
|
218
|
-
constructor(
|
|
219
|
-
super(), this.passId = e.passId, this.selectedObjects =
|
|
95
|
+
constructor(t) {
|
|
96
|
+
super(), this.passId = e.passId, this.selectedObjects = t.selectedObjects, this.edgeStrength = I(t.edgeStrength), this.edgeGlow = I(t.edgeGlow), this.edgeThickness = I(t.edgeThickness), this.visibleEdgeColor = I(new O(t.visibleEdgeColor)), this.hiddenEdgeColor = I(new O(t.hiddenEdgeColor));
|
|
220
97
|
}
|
|
221
98
|
highlightObjects(e) {
|
|
222
99
|
this.selectedObjects.splice(0, this.selectedObjects.length, ...e);
|
|
223
100
|
}
|
|
224
|
-
setOutlineColors(e,
|
|
225
|
-
this.visibleEdgeColor.value = new
|
|
101
|
+
setOutlineColors(e, t) {
|
|
102
|
+
this.visibleEdgeColor.value = new O(e), this.hiddenEdgeColor.value = new O(t);
|
|
226
103
|
}
|
|
227
104
|
assemble(e, t, n, r, i) {
|
|
228
|
-
let { visibleEdge: a, hiddenEdge: o } =
|
|
105
|
+
let { visibleEdge: a, hiddenEdge: o } = Pt(n, r, {
|
|
229
106
|
selectedObjects: this.selectedObjects,
|
|
230
107
|
edgeThickness: this.edgeThickness,
|
|
231
108
|
edgeGlow: this.edgeGlow
|
|
232
109
|
}), s = a.mul(this.visibleEdgeColor).add(o.mul(this.hiddenEdgeColor)).mul(this.edgeStrength);
|
|
233
|
-
return i === "outline" ?
|
|
234
|
-
}
|
|
235
|
-
addParametersToGUI(e,
|
|
236
|
-
let
|
|
237
|
-
|
|
238
|
-
this.visibleEdgeColor.value.set(e),
|
|
239
|
-
}),
|
|
240
|
-
this.hiddenEdgeColor.value.set(e),
|
|
110
|
+
return i === "outline" ? P(0, 0, 0, 0).add(s) : t.add(s);
|
|
111
|
+
}
|
|
112
|
+
addParametersToGUI(e, n) {
|
|
113
|
+
let r = e.addFolder("Outline Settings");
|
|
114
|
+
r.add(this.edgeStrength, "value", .01, 10).name("edgeStrength").onChange(() => n()), r.add(this.edgeGlow, "value", 0, 1).name("edgeGlow").onChange(() => n()), r.add(this.edgeThickness, "value", 1, 4).name("edgeThickness").onChange(() => n()), r.addColor({ color: this.visibleEdgeColor.value.getHex(t) }, "color").name("visibleEdgeColor").onChange((e) => {
|
|
115
|
+
this.visibleEdgeColor.value.set(e), n();
|
|
116
|
+
}), r.addColor({ color: this.hiddenEdgeColor.value.getHex(t) }, "color").name("hiddenEdgeColor").onChange((e) => {
|
|
117
|
+
this.hiddenEdgeColor.value.set(e), n();
|
|
241
118
|
});
|
|
242
119
|
}
|
|
243
|
-
},
|
|
120
|
+
}, Lt = class {
|
|
244
121
|
constructor(e, t) {
|
|
245
122
|
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;
|
|
246
123
|
}
|
|
247
|
-
},
|
|
124
|
+
}, Rt = class extends Lt {
|
|
248
125
|
constructor(e, t, n, r) {
|
|
249
126
|
let i = t.name;
|
|
250
127
|
i === "" && (t.isScene ? i = "Scene" : t.isQuadMesh && (i = "QuadMesh")), super(e, i), this.scene = t, this.camera = n, this.renderTarget = r, this.isRenderStats = !0;
|
|
251
128
|
}
|
|
252
|
-
},
|
|
129
|
+
}, zt = class extends Lt {
|
|
253
130
|
constructor(e, t) {
|
|
254
131
|
super(e, t.name), this.computeNode = t, this.isComputeStats = !0;
|
|
255
132
|
}
|
|
256
|
-
},
|
|
133
|
+
}, Bt = class extends ge {
|
|
257
134
|
constructor() {
|
|
258
135
|
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;
|
|
259
136
|
}
|
|
@@ -301,8 +178,8 @@ var G = /* @__PURE__ */ new we(), jt = /* @__PURE__ */ new h(), Mt = /* @__PURE_
|
|
|
301
178
|
return this._resolveTimestampPromise === null && (this._resolveTimestampPromise = new Promise((e) => {
|
|
302
179
|
requestAnimationFrame(async () => {
|
|
303
180
|
let t = this.getRenderer();
|
|
304
|
-
await t.resolveTimestampsAsync(
|
|
305
|
-
let n = t.backend.getTimestampFrames(
|
|
181
|
+
await t.resolveTimestampsAsync(g.COMPUTE), await t.resolveTimestampsAsync(g.RENDER);
|
|
182
|
+
let n = t.backend.getTimestampFrames(g.COMPUTE), r = t.backend.getTimestampFrames(g.RENDER), i = [...new Set([...n, ...r])];
|
|
306
183
|
for (let e of i) {
|
|
307
184
|
let i = this.getFrameById(e);
|
|
308
185
|
if (i !== null) {
|
|
@@ -337,12 +214,12 @@ var G = /* @__PURE__ */ new we(), jt = /* @__PURE__ */ new h(), Mt = /* @__PURE_
|
|
|
337
214
|
}
|
|
338
215
|
inspect(e) {
|
|
339
216
|
let t = this.currentNodes;
|
|
340
|
-
t === null ?
|
|
217
|
+
t === null ? f("RendererInspector: Unable to inspect node outside of frame scope. Use \"renderer.setAnimationLoop()\".") : t.push(e);
|
|
341
218
|
}
|
|
342
219
|
beginCompute(e, t) {
|
|
343
220
|
let n = this.getFrame();
|
|
344
221
|
if (!n) return;
|
|
345
|
-
let r = new
|
|
222
|
+
let r = new zt(e, t);
|
|
346
223
|
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;
|
|
347
224
|
}
|
|
348
225
|
finishCompute() {
|
|
@@ -353,7 +230,7 @@ var G = /* @__PURE__ */ new we(), jt = /* @__PURE__ */ new h(), Mt = /* @__PURE_
|
|
|
353
230
|
beginRender(e, t, n, r) {
|
|
354
231
|
let i = this.getFrame();
|
|
355
232
|
if (!i) return;
|
|
356
|
-
let a = new
|
|
233
|
+
let a = new Rt(e, t, n, r);
|
|
357
234
|
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;
|
|
358
235
|
}
|
|
359
236
|
finishRender() {
|
|
@@ -361,15 +238,15 @@ var G = /* @__PURE__ */ new we(), jt = /* @__PURE__ */ new h(), Mt = /* @__PURE_
|
|
|
361
238
|
let e = this.currentRender;
|
|
362
239
|
e.cpu = performance.now() - e.timestamp, this.currentRender = e.parent;
|
|
363
240
|
}
|
|
364
|
-
},
|
|
241
|
+
}, Vt = class {
|
|
365
242
|
static init() {
|
|
366
243
|
if (document.getElementById("profiler-styles")) return;
|
|
367
244
|
let e = document.createElement("style");
|
|
368
245
|
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);
|
|
369
246
|
}
|
|
370
|
-
},
|
|
247
|
+
}, Ht = class extends E {
|
|
371
248
|
constructor(e) {
|
|
372
|
-
super(), this.inspector = e, this.tabs = {}, this.activeTabId = null, this.isResizing = !1, this.lastHeightBottom = 350, this.lastWidthRight = 450, this.position = "bottom", this.detachedWindows = [], this.maxZIndex = 1002, this.nextTabOriginalIndex = 0,
|
|
249
|
+
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, Vt.init(), this.setupShell(), this.setupResizing(), this.setupWindowResizeListener(), this.setupOrientationListener();
|
|
373
250
|
}
|
|
374
251
|
getSize() {
|
|
375
252
|
return this.panel.classList.contains("visible") === !1 || this.panel.classList.contains("no-tabs") ? {
|
|
@@ -727,7 +604,7 @@ var G = /* @__PURE__ */ new we(), jt = /* @__PURE__ */ new h(), Mt = /* @__PURE_
|
|
|
727
604
|
});
|
|
728
605
|
});
|
|
729
606
|
try {
|
|
730
|
-
|
|
607
|
+
yn("layout", e);
|
|
731
608
|
} catch (e) {
|
|
732
609
|
console.warn("Failed to save profiler layout:", e);
|
|
733
610
|
}
|
|
@@ -735,7 +612,7 @@ var G = /* @__PURE__ */ new we(), jt = /* @__PURE__ */ new h(), Mt = /* @__PURE_
|
|
|
735
612
|
loadLayout() {
|
|
736
613
|
this.isLoadingLayout = !0;
|
|
737
614
|
try {
|
|
738
|
-
let e =
|
|
615
|
+
let e = vn("layout");
|
|
739
616
|
if (Object.keys(e).length === 0) return;
|
|
740
617
|
if (e.detachedTabs && e.detachedTabs.length > 0) {
|
|
741
618
|
let t = window.innerWidth, n = window.innerHeight;
|
|
@@ -782,7 +659,7 @@ var G = /* @__PURE__ */ new we(), jt = /* @__PURE__ */ new h(), Mt = /* @__PURE_
|
|
|
782
659
|
this.updatePanelSize();
|
|
783
660
|
}
|
|
784
661
|
}
|
|
785
|
-
}, q = class extends
|
|
662
|
+
}, q = class extends E {
|
|
786
663
|
constructor(e, t = {}) {
|
|
787
664
|
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;
|
|
788
665
|
}
|
|
@@ -822,7 +699,7 @@ var G = /* @__PURE__ */ new we(), jt = /* @__PURE__ */ new h(), Mt = /* @__PURE_
|
|
|
822
699
|
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"));
|
|
823
700
|
}
|
|
824
701
|
}
|
|
825
|
-
},
|
|
702
|
+
}, Ut = class {
|
|
826
703
|
constructor(...e) {
|
|
827
704
|
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);
|
|
828
705
|
let t = document.createElement("div");
|
|
@@ -846,7 +723,7 @@ var G = /* @__PURE__ */ new we(), jt = /* @__PURE__ */ new h(), Mt = /* @__PURE_
|
|
|
846
723
|
let t = this.children.indexOf(e);
|
|
847
724
|
return t !== -1 && (this.children.splice(t, 1), this.domElement.removeChild(e.domElement), e.parent = null), this;
|
|
848
725
|
}
|
|
849
|
-
},
|
|
726
|
+
}, Wt = class {
|
|
850
727
|
constructor(e = 512) {
|
|
851
728
|
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");
|
|
852
729
|
}
|
|
@@ -919,7 +796,7 @@ function X(e, t) {
|
|
|
919
796
|
let n = e instanceof HTMLElement ? e : document.getElementById(e);
|
|
920
797
|
n && n.textContent !== t && (n.textContent = t);
|
|
921
798
|
}
|
|
922
|
-
function
|
|
799
|
+
function Gt(e) {
|
|
923
800
|
let t = e.lastIndexOf("/");
|
|
924
801
|
return t === -1 ? {
|
|
925
802
|
path: "",
|
|
@@ -929,7 +806,7 @@ function Kt(e) {
|
|
|
929
806
|
name: e.substring(t + 1).trim()
|
|
930
807
|
};
|
|
931
808
|
}
|
|
932
|
-
function
|
|
809
|
+
function Kt(e) {
|
|
933
810
|
return e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").trim();
|
|
934
811
|
}
|
|
935
812
|
function Z(e, t = 2) {
|
|
@@ -949,16 +826,16 @@ function Z(e, t = 2) {
|
|
|
949
826
|
}
|
|
950
827
|
//#endregion
|
|
951
828
|
//#region ../../node_modules/three/examples/jsm/inspector/tabs/Performance.js
|
|
952
|
-
var
|
|
829
|
+
var qt = class extends q {
|
|
953
830
|
constructor(e = {}) {
|
|
954
831
|
super("Performance", e);
|
|
955
|
-
let t = new
|
|
832
|
+
let t = new Ut("Name", "CPU", "GPU", "Total");
|
|
956
833
|
t.setGridStyle("minmax(200px, 2fr) 80px 80px 80px"), t.domElement.style.minWidth = "600px";
|
|
957
834
|
let n = document.createElement("div");
|
|
958
835
|
n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n);
|
|
959
836
|
let r = document.createElement("div");
|
|
960
837
|
r.className = "graph-container";
|
|
961
|
-
let i = new
|
|
838
|
+
let i = new Wt();
|
|
962
839
|
i.addLine("fps", "var( --color-fps )"), r.append(i.domElement);
|
|
963
840
|
let a = new J("Graph Stats", Y(), Y(), Y("graph-fps-counter"));
|
|
964
841
|
t.add(a);
|
|
@@ -1008,16 +885,16 @@ var Jt = class extends q {
|
|
|
1008
885
|
for (let e of this.notInUse.keys()) this.updateNotInUse(e);
|
|
1009
886
|
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;
|
|
1010
887
|
}
|
|
1011
|
-
},
|
|
888
|
+
}, Jt = class extends q {
|
|
1012
889
|
constructor(e = {}) {
|
|
1013
890
|
super("Memory", e);
|
|
1014
|
-
let t = new
|
|
891
|
+
let t = new Ut("Name", "Count", "Size");
|
|
1015
892
|
t.setGridStyle("minmax(200px, 2fr) 60px 100px"), t.domElement.style.minWidth = "300px";
|
|
1016
893
|
let n = document.createElement("div");
|
|
1017
894
|
n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n);
|
|
1018
895
|
let r = document.createElement("div");
|
|
1019
896
|
r.className = "graph-container";
|
|
1020
|
-
let i = new
|
|
897
|
+
let i = new Wt();
|
|
1021
898
|
i.addLine("total", "var( --color-yellow )"), r.append(i.domElement);
|
|
1022
899
|
let a = new J("Graph Stats", "", "");
|
|
1023
900
|
t.add(a);
|
|
@@ -1036,7 +913,7 @@ var Jt = class extends q {
|
|
|
1036
913
|
let n = t.info.memory;
|
|
1037
914
|
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));
|
|
1038
915
|
}
|
|
1039
|
-
},
|
|
916
|
+
}, Yt = class extends q {
|
|
1040
917
|
constructor(e = {}) {
|
|
1041
918
|
super("Console", e), this.filters = {
|
|
1042
919
|
info: !0,
|
|
@@ -1107,7 +984,7 @@ var Jt = class extends q {
|
|
|
1107
984
|
let r = this.filters[e], i = t.toLowerCase().includes(this.filterText);
|
|
1108
985
|
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);
|
|
1109
986
|
}
|
|
1110
|
-
}, Q = class extends
|
|
987
|
+
}, Q = class extends E {
|
|
1111
988
|
constructor() {
|
|
1112
989
|
super(), this.domElement = document.createElement("div"), this.domElement.className = "param-control", this._onChangeFunction = null, this.addEventListener("change", (e) => {
|
|
1113
990
|
requestAnimationFrame(() => {
|
|
@@ -1130,7 +1007,7 @@ var Jt = class extends q {
|
|
|
1130
1007
|
onChange(e) {
|
|
1131
1008
|
return this._onChangeFunction = e, this;
|
|
1132
1009
|
}
|
|
1133
|
-
},
|
|
1010
|
+
}, Xt = class extends Q {
|
|
1134
1011
|
constructor({ value: e = 0, step: t = .1, min: n = -Infinity, max: r = Infinity }) {
|
|
1135
1012
|
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();
|
|
1136
1013
|
}
|
|
@@ -1161,7 +1038,7 @@ var Jt = class extends q {
|
|
|
1161
1038
|
getValue() {
|
|
1162
1039
|
return parseFloat(this.input.value);
|
|
1163
1040
|
}
|
|
1164
|
-
},
|
|
1041
|
+
}, Zt = class extends Q {
|
|
1165
1042
|
constructor({ value: e = !1 }) {
|
|
1166
1043
|
super();
|
|
1167
1044
|
let t = document.createElement("label");
|
|
@@ -1179,10 +1056,10 @@ var Jt = class extends q {
|
|
|
1179
1056
|
getValue() {
|
|
1180
1057
|
return this.checkbox.checked;
|
|
1181
1058
|
}
|
|
1182
|
-
},
|
|
1059
|
+
}, Qt = class extends Q {
|
|
1183
1060
|
constructor({ value: e = 0, min: t = 0, max: n = 1, step: r = .01 }) {
|
|
1184
1061
|
super(), this.slider = document.createElement("input"), this.slider.type = "range", this.slider.min = t, this.slider.max = n, this.slider.step = r;
|
|
1185
|
-
let i = new
|
|
1062
|
+
let i = new Xt({
|
|
1186
1063
|
value: e,
|
|
1187
1064
|
min: t,
|
|
1188
1065
|
max: n,
|
|
@@ -1203,7 +1080,7 @@ var Jt = class extends q {
|
|
|
1203
1080
|
step(e) {
|
|
1204
1081
|
return this.slider.step = e, this.numberInput.step = e, this;
|
|
1205
1082
|
}
|
|
1206
|
-
},
|
|
1083
|
+
}, $t = class extends Q {
|
|
1207
1084
|
constructor({ options: e = [], value: t = "" }) {
|
|
1208
1085
|
super();
|
|
1209
1086
|
let n = document.createElement("select"), r = (e, r) => {
|
|
@@ -1218,7 +1095,7 @@ var Jt = class extends q {
|
|
|
1218
1095
|
let e = this.options;
|
|
1219
1096
|
return Array.isArray(e) ? e[this.select.selectedIndex] : e[this.select.value];
|
|
1220
1097
|
}
|
|
1221
|
-
},
|
|
1098
|
+
}, en = class extends Q {
|
|
1222
1099
|
constructor({ value: e = "#ffffff" }) {
|
|
1223
1100
|
super();
|
|
1224
1101
|
let t = document.createElement("input");
|
|
@@ -1234,13 +1111,13 @@ var Jt = class extends q {
|
|
|
1234
1111
|
let e = this._value;
|
|
1235
1112
|
return typeof e == "string" && (e = parseInt(e.slice(1), 16)), e;
|
|
1236
1113
|
}
|
|
1237
|
-
},
|
|
1114
|
+
}, tn = class extends Q {
|
|
1238
1115
|
constructor({ text: e = "Button", value: t = () => {} }) {
|
|
1239
1116
|
super();
|
|
1240
1117
|
let n = document.createElement("button");
|
|
1241
1118
|
n.textContent = e, n.onclick = t, this.domElement.appendChild(n);
|
|
1242
1119
|
}
|
|
1243
|
-
},
|
|
1120
|
+
}, nn = class extends Q {
|
|
1244
1121
|
constructor({ value: e = "" }) {
|
|
1245
1122
|
super();
|
|
1246
1123
|
let t = document.createElement("input");
|
|
@@ -1254,7 +1131,7 @@ var Jt = class extends q {
|
|
|
1254
1131
|
getValue() {
|
|
1255
1132
|
return this.input.value;
|
|
1256
1133
|
}
|
|
1257
|
-
},
|
|
1134
|
+
}, rn = class e {
|
|
1258
1135
|
constructor(e, t) {
|
|
1259
1136
|
this.parameters = e, this.name = t, this.paramList = new J(t), this.objects = [];
|
|
1260
1137
|
}
|
|
@@ -1283,7 +1160,7 @@ var Jt = class extends q {
|
|
|
1283
1160
|
});
|
|
1284
1161
|
}
|
|
1285
1162
|
addString(e, t) {
|
|
1286
|
-
let n = e[t], r = new
|
|
1163
|
+
let n = e[t], r = new nn({ value: n });
|
|
1287
1164
|
r.addEventListener("change", ({ value: n }) => {
|
|
1288
1165
|
e[t] = n;
|
|
1289
1166
|
});
|
|
@@ -1297,7 +1174,7 @@ var Jt = class extends q {
|
|
|
1297
1174
|
return this.paramList.add(n.paramList), n;
|
|
1298
1175
|
}
|
|
1299
1176
|
addBoolean(e, t) {
|
|
1300
|
-
let n = e[t], r = new
|
|
1177
|
+
let n = e[t], r = new Zt({ value: n });
|
|
1301
1178
|
r.addEventListener("change", ({ value: n }) => {
|
|
1302
1179
|
e[t] = n;
|
|
1303
1180
|
});
|
|
@@ -1313,7 +1190,7 @@ var Jt = class extends q {
|
|
|
1313
1190
|
}), this._addParameter(e, t, r, a), r;
|
|
1314
1191
|
}
|
|
1315
1192
|
addSelect(e, t, n) {
|
|
1316
|
-
let r = e[t], i = new
|
|
1193
|
+
let r = e[t], i = new $t({
|
|
1317
1194
|
options: n,
|
|
1318
1195
|
value: r
|
|
1319
1196
|
});
|
|
@@ -1326,7 +1203,7 @@ var Jt = class extends q {
|
|
|
1326
1203
|
return this.paramList.add(o), o.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, i, o), i;
|
|
1327
1204
|
}
|
|
1328
1205
|
addColor(e, t) {
|
|
1329
|
-
let n = e[t], r = new
|
|
1206
|
+
let n = e[t], r = new en({ value: n });
|
|
1330
1207
|
r.addEventListener("change", ({ value: n }) => {
|
|
1331
1208
|
e[t] = n;
|
|
1332
1209
|
});
|
|
@@ -1336,7 +1213,7 @@ var Jt = class extends q {
|
|
|
1336
1213
|
return this.paramList.add(a), a.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, r, a), r;
|
|
1337
1214
|
}
|
|
1338
1215
|
addSlider(e, t, n = 0, r = 1, i = .01) {
|
|
1339
|
-
let a = e[t], o = new
|
|
1216
|
+
let a = e[t], o = new Qt({
|
|
1340
1217
|
value: a,
|
|
1341
1218
|
min: n,
|
|
1342
1219
|
max: r,
|
|
@@ -1351,7 +1228,7 @@ var Jt = class extends q {
|
|
|
1351
1228
|
return this.paramList.add(c), c.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, o, c), o;
|
|
1352
1229
|
}
|
|
1353
1230
|
addNumber(e, t, ...n) {
|
|
1354
|
-
let r = e[t], [i, a] = n, o = new
|
|
1231
|
+
let r = e[t], [i, a] = n, o = new Xt({
|
|
1355
1232
|
value: r,
|
|
1356
1233
|
min: i,
|
|
1357
1234
|
max: a
|
|
@@ -1365,7 +1242,7 @@ var Jt = class extends q {
|
|
|
1365
1242
|
return this.paramList.add(c), c.domElement.firstChild.classList.add("actionable"), this._addParameter(e, t, o, c), o;
|
|
1366
1243
|
}
|
|
1367
1244
|
addButton(e, t) {
|
|
1368
|
-
let n = e[t], r = new
|
|
1245
|
+
let n = e[t], r = new tn({
|
|
1369
1246
|
text: t,
|
|
1370
1247
|
value: n
|
|
1371
1248
|
});
|
|
@@ -1375,54 +1252,54 @@ var Jt = class extends q {
|
|
|
1375
1252
|
let i = new J(r.domElement);
|
|
1376
1253
|
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;
|
|
1377
1254
|
}
|
|
1378
|
-
},
|
|
1255
|
+
}, an = class extends q {
|
|
1379
1256
|
constructor(e = {}) {
|
|
1380
1257
|
super(e.name || "Parameters", e);
|
|
1381
|
-
let t = new
|
|
1258
|
+
let t = new Ut("Property", "Value");
|
|
1382
1259
|
t.domElement.classList.add("parameters"), t.setGridStyle(".5fr 1fr"), t.domElement.style.minWidth = "300px";
|
|
1383
1260
|
let n = document.createElement("div");
|
|
1384
1261
|
n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n), this.paramList = t, this.groups = [];
|
|
1385
1262
|
}
|
|
1386
1263
|
createGroup(e) {
|
|
1387
|
-
let t = new
|
|
1264
|
+
let t = new rn(this, e);
|
|
1388
1265
|
return this.paramList.add(t.paramList), this.groups.push(t), t;
|
|
1389
1266
|
}
|
|
1390
|
-
},
|
|
1391
|
-
function
|
|
1392
|
-
e ?
|
|
1267
|
+
}, on = "../extensions/extensions.json", sn = _e.prototype.init;
|
|
1268
|
+
function cn(e) {
|
|
1269
|
+
e ? _e.prototype.init = async function() {
|
|
1393
1270
|
if (this.backend.isWebGLBackend !== !0) {
|
|
1394
1271
|
let e = this.backend.parameters;
|
|
1395
|
-
this.backend = new
|
|
1272
|
+
this.backend = new be(e);
|
|
1396
1273
|
}
|
|
1397
|
-
return
|
|
1398
|
-
} :
|
|
1274
|
+
return sn.call(this);
|
|
1275
|
+
} : _e.prototype.init = sn;
|
|
1399
1276
|
}
|
|
1400
1277
|
var $ = null;
|
|
1401
|
-
function
|
|
1278
|
+
function ln() {
|
|
1402
1279
|
if ($ !== null) return $;
|
|
1403
|
-
let e =
|
|
1280
|
+
let e = vn("settings");
|
|
1404
1281
|
return $ = {
|
|
1405
1282
|
forceWebGL: e.forceWebGL === void 0 ? !1 : e.forceWebGL,
|
|
1406
1283
|
captureStackTrace: e.captureStackTrace === void 0 ? !1 : e.captureStackTrace,
|
|
1407
1284
|
activeExtensions: e.activeExtensions === void 0 ? {} : e.activeExtensions
|
|
1408
|
-
}, $.forceWebGL &&
|
|
1285
|
+
}, $.forceWebGL && cn(!0), $.captureStackTrace && (ye.captureStackTrace = !0), $;
|
|
1409
1286
|
}
|
|
1410
|
-
function
|
|
1411
|
-
|
|
1287
|
+
function un() {
|
|
1288
|
+
yn("settings", {
|
|
1412
1289
|
forceWebGL: $.forceWebGL,
|
|
1413
1290
|
captureStackTrace: $.captureStackTrace,
|
|
1414
1291
|
activeExtensions: $.activeExtensions
|
|
1415
1292
|
});
|
|
1416
1293
|
}
|
|
1417
|
-
|
|
1418
|
-
var
|
|
1294
|
+
ln();
|
|
1295
|
+
var dn = class extends an {
|
|
1419
1296
|
constructor() {
|
|
1420
1297
|
super({ name: "Settings" }), this.extensions = {};
|
|
1421
|
-
let e =
|
|
1298
|
+
let e = ln(), t = this.createGroup("Renderer");
|
|
1422
1299
|
t.add(e, "forceWebGL").name("Force WebGL").onChange((e) => {
|
|
1423
|
-
|
|
1300
|
+
cn(e), un(), location.reload();
|
|
1424
1301
|
}), t.add(e, "captureStackTrace").name("Capture Stack Trace").onChange((e) => {
|
|
1425
|
-
|
|
1302
|
+
ye.captureStackTrace = e, un(), location.reload();
|
|
1426
1303
|
});
|
|
1427
1304
|
}
|
|
1428
1305
|
init() {
|
|
@@ -1432,7 +1309,7 @@ var fn = class extends on {
|
|
|
1432
1309
|
this.setActiveExtension(n.name, e), e ? $.activeExtensions[n.name] = {
|
|
1433
1310
|
name: n.name,
|
|
1434
1311
|
url: n.url
|
|
1435
|
-
} : delete $.activeExtensions[n.name], this._updateExtensionUI(n),
|
|
1312
|
+
} : delete $.activeExtensions[n.name], this._updateExtensionUI(n), un();
|
|
1436
1313
|
}), $.activeExtensions[n.name] !== void 0 && n.ui.setValue(!0);
|
|
1437
1314
|
});
|
|
1438
1315
|
}
|
|
@@ -1452,7 +1329,7 @@ var fn = class extends on {
|
|
|
1452
1329
|
async _loadExtension(e, t) {
|
|
1453
1330
|
if (t.active === !0) return;
|
|
1454
1331
|
t.active = !0;
|
|
1455
|
-
let n = await import(new URL(t.url, new URL(
|
|
1332
|
+
let n = await import(new URL(t.url, new URL(on, import.meta.url)).href), r = n[Object.keys(n)[0]], i = new r();
|
|
1456
1333
|
e.addTab(i), t.loaded = !0, t.tab = i, this._updateExtensionUI(t), this.dispatchEvent({
|
|
1457
1334
|
type: "extensionadded",
|
|
1458
1335
|
name: t.name,
|
|
@@ -1460,21 +1337,21 @@ var fn = class extends on {
|
|
|
1460
1337
|
});
|
|
1461
1338
|
}
|
|
1462
1339
|
async _getExtensions() {
|
|
1463
|
-
let e = new URL(
|
|
1340
|
+
let e = new URL(on, import.meta.url);
|
|
1464
1341
|
return await fetch(e).then((e) => e.json());
|
|
1465
1342
|
}
|
|
1466
|
-
},
|
|
1467
|
-
let n =
|
|
1468
|
-
|
|
1343
|
+
}, fn = /* @__PURE__ */ V(([e, t]) => {
|
|
1344
|
+
let n = I(0);
|
|
1345
|
+
bt(() => {
|
|
1469
1346
|
let { width: e, height: r } = t.value;
|
|
1470
1347
|
n.value = e / r;
|
|
1471
1348
|
});
|
|
1472
1349
|
let r = e.sub(.5), i = H(r.x.div(n), r.y).add(.5);
|
|
1473
|
-
return
|
|
1474
|
-
}),
|
|
1350
|
+
return W(i, dt(0, i.x).mul(dt(i.x, 1)).mul(dt(0, i.y)).mul(dt(i.y, 1)));
|
|
1351
|
+
}), pn = class extends q {
|
|
1475
1352
|
constructor(e = {}) {
|
|
1476
1353
|
super("Viewer", e);
|
|
1477
|
-
let t = new
|
|
1354
|
+
let t = new Ut("Viewer", "Name");
|
|
1478
1355
|
t.setGridStyle("150px minmax(200px, 2fr)"), t.domElement.style.minWidth = "400px";
|
|
1479
1356
|
let n = document.createElement("div");
|
|
1480
1357
|
n.className = "list-scroll-wrapper", n.appendChild(t.domElement), this.content.appendChild(n);
|
|
@@ -1496,16 +1373,16 @@ var fn = class extends on {
|
|
|
1496
1373
|
getCanvasDataByNode(e, t) {
|
|
1497
1374
|
let n = this.canvasNodes.get(t);
|
|
1498
1375
|
if (n === void 0) {
|
|
1499
|
-
let r = new
|
|
1376
|
+
let r = new Ce(document.createElement("canvas"));
|
|
1500
1377
|
r.setPixelRatio(window.devicePixelRatio), r.setSize(140, 140);
|
|
1501
|
-
let i = t.id, { path: a, name: o } = Kt(
|
|
1502
|
-
let t =
|
|
1378
|
+
let i = t.id, { path: a, name: o } = Gt(Kt(t.getName() || "(unnamed)")), s = P(W(t.context({ getUV: (e) => {
|
|
1379
|
+
let t = fn(yt, e), n = t.xy, r = t.z;
|
|
1503
1380
|
return n.mul(r);
|
|
1504
1381
|
} })), 1);
|
|
1505
|
-
s =
|
|
1506
|
-
let c = new
|
|
1382
|
+
s = it(s, 0, e.outputColorSpace), s = s.context({ inspector: !0 });
|
|
1383
|
+
let c = new A();
|
|
1507
1384
|
c.outputNode = s;
|
|
1508
|
-
let l = new
|
|
1385
|
+
let l = new xe(c);
|
|
1509
1386
|
l.name = "Viewer - " + o, n = {
|
|
1510
1387
|
id: i,
|
|
1511
1388
|
name: o,
|
|
@@ -1541,13 +1418,13 @@ var fn = class extends on {
|
|
|
1541
1418
|
a[o] === void 0 && (a[o] = 0), (e.parent === null || n.parent !== e || e.children.indexOf(n) !== a[o]) && e.add(n), a[o]++;
|
|
1542
1419
|
} else n.parent || this.nodes.add(n);
|
|
1543
1420
|
this.currentDataList = r;
|
|
1544
|
-
let s =
|
|
1545
|
-
t.toneMapping = 0, t.outputColorSpace =
|
|
1421
|
+
let s = j.resetRendererState(t);
|
|
1422
|
+
t.toneMapping = 0, t.outputColorSpace = u, t.setCanvasTarget(e.canvasTarget), e.quad.render(t), t.setCanvasTarget(i), j.restoreRendererState(t, s);
|
|
1546
1423
|
}
|
|
1547
1424
|
}
|
|
1548
|
-
},
|
|
1425
|
+
}, mn = 500, hn = 60, gn = class extends q {
|
|
1549
1426
|
constructor(e = {}) {
|
|
1550
|
-
super("Timeline", e), this.isRecording = !1, this.frames = [], this.baseTriangles = 0, this.currentFrame = null, this.isHierarchicalView = !0, this.callBlocks = /* @__PURE__ */ new WeakMap(), this.fallbackBlocks = [], this.originalBackend = null, this.originalMethods = /* @__PURE__ */ new Map(), this.renderer = null, this.graph = new
|
|
1427
|
+
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 Wt(mn), this.graph.addLine("fps", "var( --color-fps )"), this.graph.addLine("calls", "var( --color-call )"), this.graph.addLine("triangles", "var( --color-red )");
|
|
1551
1428
|
let t = document.createElement("div");
|
|
1552
1429
|
t.className = "list-scroll-wrapper", this.scrollWrapper = t, this.content.appendChild(t), this.buildHeader(), this.buildUI(), window.addEventListener("resize", () => {
|
|
1553
1430
|
!this.isRecording && this.frames.length > 0 && this.renderSlider();
|
|
@@ -1560,8 +1437,8 @@ var fn = class extends on {
|
|
|
1560
1437
|
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", () => {
|
|
1561
1438
|
this.isHierarchicalView = !this.isHierarchicalView, this.viewModeButton.textContent = this.isHierarchicalView ? "Mode: Hierarchy" : "Mode: Counts", this.selectedFrameIndex !== void 0 && this.selectedFrameIndex !== -1 && this.selectFrame(this.selectedFrameIndex);
|
|
1562
1439
|
}), 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", () => {
|
|
1563
|
-
let e =
|
|
1564
|
-
e.recording = !0,
|
|
1440
|
+
let e = vn("timeline");
|
|
1441
|
+
e.recording = !0, yn("timeline", e), window.location.reload();
|
|
1565
1442
|
}), 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());
|
|
1566
1443
|
let n = document.createElement("div");
|
|
1567
1444
|
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)";
|
|
@@ -1643,8 +1520,8 @@ var fn = class extends on {
|
|
|
1643
1520
|
}
|
|
1644
1521
|
setRenderer(e) {
|
|
1645
1522
|
this.renderer = e;
|
|
1646
|
-
let t =
|
|
1647
|
-
t.recording && (t.recording = !1,
|
|
1523
|
+
let t = vn("timeline");
|
|
1524
|
+
t.recording && (t.recording = !1, yn("timeline", t), this.toggleRecording());
|
|
1648
1525
|
}
|
|
1649
1526
|
toggleRecording() {
|
|
1650
1527
|
if (!this.renderer) {
|
|
@@ -1674,7 +1551,7 @@ var fn = class extends on {
|
|
|
1674
1551
|
for (let t = 0; t < n.length; t++) n[t] *= e;
|
|
1675
1552
|
}
|
|
1676
1553
|
}
|
|
1677
|
-
let t = this.baseTriangles > 0 ? e / this.baseTriangles *
|
|
1554
|
+
let t = this.baseTriangles > 0 ? e / this.baseTriangles * hn : 0;
|
|
1678
1555
|
this.graph.addPoint("calls", this.currentFrame.calls.length), this.graph.addPoint("fps", this.currentFrame.fps), this.graph.addPoint("triangles", t), this.graph.update();
|
|
1679
1556
|
}
|
|
1680
1557
|
if (this.currentFrame = {
|
|
@@ -1682,7 +1559,7 @@ var fn = class extends on {
|
|
|
1682
1559
|
calls: [],
|
|
1683
1560
|
fps: 0,
|
|
1684
1561
|
triangles: 0
|
|
1685
|
-
}, this.frames.push(this.currentFrame), this.frames.length >
|
|
1562
|
+
}, this.frames.push(this.currentFrame), this.frames.length > mn && this.frames.shift(), !this.isManualScrubbing) {
|
|
1686
1563
|
if (this.isTrackingLatest) {
|
|
1687
1564
|
let e = this.frames.length > 1 ? this.frames.length - 2 : 0;
|
|
1688
1565
|
this.selectFrame(e);
|
|
@@ -1720,49 +1597,49 @@ var fn = class extends on {
|
|
|
1720
1597
|
let e = JSON.stringify(this.frames, null, " "), t = new Blob([e], { type: "application/json" }), n = URL.createObjectURL(t), r = document.createElement("a");
|
|
1721
1598
|
r.href = n, r.download = "threejs-timeline.json", r.click(), URL.revokeObjectURL(n);
|
|
1722
1599
|
}
|
|
1723
|
-
getRenderTargetDetails(
|
|
1724
|
-
let
|
|
1600
|
+
getRenderTargetDetails(t) {
|
|
1601
|
+
let r = t.textures, a = [], l = (e) => {
|
|
1725
1602
|
switch (e.type) {
|
|
1726
1603
|
case v:
|
|
1727
|
-
case
|
|
1728
|
-
case
|
|
1729
|
-
case
|
|
1730
|
-
case
|
|
1731
|
-
case
|
|
1604
|
+
case ne: return "8";
|
|
1605
|
+
case s:
|
|
1606
|
+
case h:
|
|
1607
|
+
case S:
|
|
1608
|
+
case ae:
|
|
1732
1609
|
case se: return "16";
|
|
1733
|
-
case
|
|
1610
|
+
case d:
|
|
1611
|
+
case m:
|
|
1734
1612
|
case _:
|
|
1735
|
-
case
|
|
1736
|
-
case x:
|
|
1613
|
+
case b:
|
|
1737
1614
|
case y:
|
|
1738
|
-
case
|
|
1615
|
+
case ee: return "32";
|
|
1739
1616
|
default: return "?";
|
|
1740
1617
|
}
|
|
1741
|
-
},
|
|
1742
|
-
switch (
|
|
1743
|
-
case
|
|
1744
|
-
case
|
|
1745
|
-
case
|
|
1746
|
-
case
|
|
1747
|
-
case
|
|
1748
|
-
case
|
|
1749
|
-
case
|
|
1750
|
-
case
|
|
1751
|
-
case
|
|
1752
|
-
case f:
|
|
1618
|
+
}, u = (t) => {
|
|
1619
|
+
switch (t.format) {
|
|
1620
|
+
case ie: return "a";
|
|
1621
|
+
case T:
|
|
1622
|
+
case e: return "r";
|
|
1623
|
+
case n:
|
|
1624
|
+
case oe: return "rg";
|
|
1625
|
+
case te:
|
|
1626
|
+
case x: return "rgb";
|
|
1627
|
+
case re: return "depth";
|
|
1628
|
+
case o: return "depth-stencil";
|
|
1753
1629
|
case i:
|
|
1630
|
+
case c:
|
|
1754
1631
|
default: return "rgba";
|
|
1755
1632
|
}
|
|
1756
1633
|
};
|
|
1757
|
-
for (let e = 0; e <
|
|
1758
|
-
let
|
|
1759
|
-
|
|
1634
|
+
for (let e = 0; e < r.length; e++) {
|
|
1635
|
+
let t = r[e], n = l(t), i = u(t), o = `[${e}]`;
|
|
1636
|
+
t.name && !(t.isDepthTexture && t.name === "depth") && (o += ` ${t.name}`), o += ` ${i} ${n} bpc`, a.push(o);
|
|
1760
1637
|
}
|
|
1761
|
-
let
|
|
1762
|
-
target:
|
|
1763
|
-
[`attachments(${
|
|
1638
|
+
let f = {
|
|
1639
|
+
target: t.name || "RenderTarget",
|
|
1640
|
+
[`attachments(${r.length})`]: a.join(", ")
|
|
1764
1641
|
};
|
|
1765
|
-
return
|
|
1642
|
+
return t.depthTexture && (f.depth = `${l(t.depthTexture)} bpc`), f;
|
|
1766
1643
|
}
|
|
1767
1644
|
getCallDetail(e, t) {
|
|
1768
1645
|
switch (e) {
|
|
@@ -1950,7 +1827,7 @@ var fn = class extends on {
|
|
|
1950
1827
|
r > t && (t = r);
|
|
1951
1828
|
}
|
|
1952
1829
|
for (let n = 0; n < e.length; n++) {
|
|
1953
|
-
let r = e[n].triangles || 0, i = t > 0 ? r / t *
|
|
1830
|
+
let r = e[n].triangles || 0, i = t > 0 ? r / t * hn : 0;
|
|
1954
1831
|
this.graph.addPoint("calls", e[n].calls.length), this.graph.addPoint("fps", e[n].fps || 0), this.graph.addPoint("triangles", i);
|
|
1955
1832
|
}
|
|
1956
1833
|
this.graph.update(), this.playhead.style.display = "block";
|
|
@@ -2043,27 +1920,27 @@ var fn = class extends on {
|
|
|
2043
1920
|
getColorForMethod(e) {
|
|
2044
1921
|
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)";
|
|
2045
1922
|
}
|
|
2046
|
-
},
|
|
1923
|
+
}, _n = class extends Bt {
|
|
2047
1924
|
constructor() {
|
|
2048
1925
|
super();
|
|
2049
|
-
let e = new
|
|
1926
|
+
let e = new Ht(this);
|
|
2050
1927
|
e.addEventListener("resize", (e) => this.dispatchEvent(e));
|
|
2051
|
-
let t = new
|
|
1928
|
+
let t = new an({
|
|
2052
1929
|
builtin: !0,
|
|
2053
1930
|
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>"
|
|
2054
1931
|
});
|
|
2055
1932
|
t.hide(), e.addTab(t);
|
|
2056
|
-
let n = new
|
|
1933
|
+
let n = new pn();
|
|
2057
1934
|
n.hide(), e.addTab(n);
|
|
2058
|
-
let r = new
|
|
1935
|
+
let r = new qt();
|
|
2059
1936
|
e.addTab(r);
|
|
2060
|
-
let i = new
|
|
1937
|
+
let i = new Jt();
|
|
2061
1938
|
e.addTab(i);
|
|
2062
|
-
let a = new
|
|
1939
|
+
let a = new gn();
|
|
2063
1940
|
e.addTab(a);
|
|
2064
|
-
let o = new
|
|
1941
|
+
let o = new Yt();
|
|
2065
1942
|
e.addTab(o);
|
|
2066
|
-
let s = new
|
|
1943
|
+
let s = new dn();
|
|
2067
1944
|
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 = {
|
|
2068
1945
|
text: {
|
|
2069
1946
|
needsUpdate: !1,
|
|
@@ -2129,7 +2006,7 @@ var fn = class extends on {
|
|
|
2129
2006
|
e.backend.isWebGPUBackend ? t += "WebGPU" : e.backend.isWebGLBackend && (t += "WebGL2"), t += "\" ]", this.console.addMessage("info", t), e.inspector.domElement.parentElement === null && e.domElement.parentElement !== null && e.domElement.parentElement.appendChild(e.inspector.domElement);
|
|
2130
2007
|
}
|
|
2131
2008
|
setRenderer(e) {
|
|
2132
|
-
return super.setRenderer(e), e !== null && (
|
|
2009
|
+
return super.setRenderer(e), e !== null && (a(this.resolveConsole.bind(this)), this.isAvailable && (e.init().then(() => {
|
|
2133
2010
|
e.backend.trackTimestamp = !0, e.hasFeature("timestamp-query") !== !0 && this.console.addMessage("error", "THREE.Inspector: GPU Timestamp Queries not available.");
|
|
2134
2011
|
}), this.timeline.setRenderer(e))), this;
|
|
2135
2012
|
}
|
|
@@ -2183,70 +2060,70 @@ var fn = class extends on {
|
|
|
2183
2060
|
e.time += this.nodeFrame.deltaTime, e.time >= e.duration && (e.needsUpdate = !0, e.time = 0);
|
|
2184
2061
|
}
|
|
2185
2062
|
static getItem(e) {
|
|
2186
|
-
return console.warn("Inspector.getItem is deprecated. Use getItem directly instead."),
|
|
2063
|
+
return console.warn("Inspector.getItem is deprecated. Use getItem directly instead."), vn(e);
|
|
2187
2064
|
}
|
|
2188
2065
|
static setItem(e, t) {
|
|
2189
|
-
console.warn("Inspector.setItem is deprecated. Use setItem directly instead."),
|
|
2066
|
+
console.warn("Inspector.setItem is deprecated. Use setItem directly instead."), yn(e, t);
|
|
2190
2067
|
}
|
|
2191
2068
|
};
|
|
2192
|
-
function
|
|
2069
|
+
function vn(e) {
|
|
2193
2070
|
return JSON.parse(localStorage.getItem("threejs-inspector") || "{}")[e] || {};
|
|
2194
2071
|
}
|
|
2195
|
-
function
|
|
2072
|
+
function yn(e, t) {
|
|
2196
2073
|
let n = JSON.parse(localStorage.getItem("threejs-inspector") || "{}");
|
|
2197
2074
|
t === null ? delete n[e] : n[e] = t, localStorage.setItem("threejs-inspector", JSON.stringify(n));
|
|
2198
2075
|
}
|
|
2199
2076
|
//#endregion
|
|
2200
2077
|
//#region ../../node_modules/three/examples/jsm/tsl/display/SSGINode.js
|
|
2201
|
-
var
|
|
2078
|
+
var bn = /* @__PURE__ */ new xe(), xn = /* @__PURE__ */ new k(), Sn = [
|
|
2202
2079
|
60,
|
|
2203
2080
|
300,
|
|
2204
2081
|
180,
|
|
2205
2082
|
240,
|
|
2206
2083
|
120,
|
|
2207
2084
|
0
|
|
2208
|
-
],
|
|
2085
|
+
], Cn = [
|
|
2209
2086
|
0,
|
|
2210
2087
|
.5,
|
|
2211
2088
|
.25,
|
|
2212
2089
|
.75
|
|
2213
|
-
],
|
|
2090
|
+
], wn, Tn = class extends he {
|
|
2214
2091
|
static get type() {
|
|
2215
2092
|
return "SSGINode";
|
|
2216
2093
|
}
|
|
2217
|
-
constructor(t, n, r
|
|
2218
|
-
super("vec4"), this.beautyNode =
|
|
2094
|
+
constructor(e, t, n, r) {
|
|
2095
|
+
super("vec4"), this.beautyNode = e, this.depthNode = t, this.normalNode = n, this.updateBeforeType = pt.FRAME, this.sliceCount = I(1, "uint"), this.stepCount = I(12, "uint"), this.aoIntensity = I(1, "float"), this.giIntensity = I(10, "float"), this.radius = I(12, "float"), this.useScreenSpaceSampling = I(!0, "bool"), this.expFactor = I(2, "float"), this.thickness = I(1, "float"), this.useLinearThickness = I(!1, "bool"), this.backfaceLighting = I(0, "float"), this.useTemporalFiltering = !0, this._resolution = I(new k()), this._halfProjScale = I(1), this._temporalDirection = I(0), this._temporalOffset = I(0), this._cameraProjectionMatrix = I(r.projectionMatrix), this._cameraProjectionMatrixInverse = I(r.projectionMatrixInverse), this._cameraNear = ze("near", "float", r), this._cameraFar = ze("far", "float", r), this._camera = r, this._ssgiRenderTarget = new w(1, 1, { depthBuffer: !1 }), this._ssgiRenderTarget.texture.name = "SSGI", this._material = new A(), this._material.name = "SSGI", this._textureNode = Ne(this, this._ssgiRenderTarget.texture);
|
|
2219
2096
|
}
|
|
2220
2097
|
getTextureNode() {
|
|
2221
2098
|
return this._textureNode;
|
|
2222
2099
|
}
|
|
2223
2100
|
setSize(e, t) {
|
|
2224
|
-
this._resolution.value.set(e, t), this._ssgiRenderTarget.setSize(e, t), this._halfProjScale.value = t / (Math.tan(this._camera.fov *
|
|
2101
|
+
this._resolution.value.set(e, t), this._ssgiRenderTarget.setSize(e, t), this._halfProjScale.value = t / (Math.tan(this._camera.fov * C.DEG2RAD * .5) * 2) * .5;
|
|
2225
2102
|
}
|
|
2226
2103
|
updateBefore(e) {
|
|
2227
2104
|
let { renderer: t } = e;
|
|
2228
|
-
|
|
2229
|
-
let n = t.getDrawingBufferSize(
|
|
2105
|
+
wn = j.resetRendererState(t, wn);
|
|
2106
|
+
let n = t.getDrawingBufferSize(xn);
|
|
2230
2107
|
if (this.setSize(n.width, n.height), this.useTemporalFiltering === !0) {
|
|
2231
2108
|
let t = e.frameId;
|
|
2232
|
-
this._temporalDirection.value =
|
|
2109
|
+
this._temporalDirection.value = Sn[t % 6] / 360, this._temporalOffset.value = Cn[t % 4];
|
|
2233
2110
|
} else this._temporalDirection.value = 1, this._temporalOffset.value = 1;
|
|
2234
|
-
|
|
2111
|
+
bn.material = this._material, bn.name = "SSGI", t.setClearColor(0, 1), t.setRenderTarget(this._ssgiRenderTarget), bn.render(t), j.restoreRendererState(t, wn);
|
|
2235
2112
|
}
|
|
2236
2113
|
setup(e) {
|
|
2237
|
-
let t =
|
|
2114
|
+
let t = Xe(), n = B(32), r = B(0), i = (t) => {
|
|
2238
2115
|
let n = this.depthNode.sample(t).r;
|
|
2239
|
-
return e.renderer.logarithmicDepthBuffer === !0 ?
|
|
2240
|
-
}, a = (e) => this.normalNode === null ?
|
|
2116
|
+
return e.renderer.logarithmicDepthBuffer === !0 ? De(Ie(n, this._cameraNear, this._cameraFar), this._cameraNear, this._cameraFar) : n;
|
|
2117
|
+
}, a = (e) => this.normalNode === null ? Le(e, this.depthNode.value, this._cameraProjectionMatrixInverse) : this.normalNode.sample(e).rgb.normalize(), o = (e) => this.beautyNode.sample(e), s = V(([e]) => M(.25).mul(rt(e.y, e.x).bitAnd(3))).setLayout({
|
|
2241
2118
|
name: "spatialOffsets",
|
|
2242
2119
|
type: "float",
|
|
2243
2120
|
inputs: [{
|
|
2244
2121
|
name: "position",
|
|
2245
2122
|
type: "vec2"
|
|
2246
2123
|
}]
|
|
2247
|
-
}), c =
|
|
2248
|
-
let t =
|
|
2249
|
-
return t.mulAssign(
|
|
2124
|
+
}), c = V(([e]) => {
|
|
2125
|
+
let t = R(e).mul(M(-.156583)).add(vt);
|
|
2126
|
+
return t.mulAssign(tt(R(e).oneMinus())), H(e.x.greaterThanEqual(0).select(t.x, et.sub(t.x)), e.y.greaterThanEqual(0).select(t.y, et.sub(t.y)));
|
|
2250
2127
|
}).setLayout({
|
|
2251
2128
|
name: "GTAOFastAcos",
|
|
2252
2129
|
type: "vec2",
|
|
@@ -2254,98 +2131,98 @@ var xn = /* @__PURE__ */ new we(), Sn = /* @__PURE__ */ new h(), Cn = [
|
|
|
2254
2131
|
name: "value",
|
|
2255
2132
|
type: "vec2"
|
|
2256
2133
|
}]
|
|
2257
|
-
}), l =
|
|
2258
|
-
let h = this.stepCount.toConst(), g = this.expFactor.toConst(), _ = this.thickness.toConst(), v = this.backfaceLighting.toConst(), y =
|
|
2259
|
-
|
|
2260
|
-
y.assign(t.mul(this._resolution.x.div(2)).div(
|
|
2134
|
+
}), l = V(([e, t, s, l, u, d, f, p, m]) => {
|
|
2135
|
+
let h = this.stepCount.toConst(), g = this.expFactor.toConst(), _ = this.thickness.toConst(), v = this.backfaceLighting.toConst(), y = M(0);
|
|
2136
|
+
L(this.useScreenSpaceSampling.equal(!0), () => {
|
|
2137
|
+
y.assign(t.mul(this._resolution.x.div(2)).div(M(16)));
|
|
2261
2138
|
}).Else(() => {
|
|
2262
|
-
y.assign(
|
|
2263
|
-
}), y.divAssign(
|
|
2264
|
-
let b =
|
|
2265
|
-
return
|
|
2139
|
+
y.assign(N(t.mul(this._halfProjScale).div(s.z.negate()), M(h)));
|
|
2140
|
+
}), y.divAssign(M(h).add(1));
|
|
2141
|
+
let b = N(1, M(h.sub(1))).mul(y), x = e.equal(!0).select(H(1, -1), H(-1, 1)), S = e.equal(!0).select(1, -1), C = W(0);
|
|
2142
|
+
return Ze({
|
|
2266
2143
|
start: B(0),
|
|
2267
2144
|
end: h,
|
|
2268
2145
|
type: "uint",
|
|
2269
2146
|
condition: "<"
|
|
2270
2147
|
}, ({ i: t }) => {
|
|
2271
|
-
let h =
|
|
2272
|
-
|
|
2273
|
-
|
|
2148
|
+
let h = qe(R(kt(y, M(t).add(u)).div(b)), g).mul(b).toConst(), w = l.mul(N(h, M(t).add(1))).toConst(), T = d.add(w.mul(x)).toConst();
|
|
2149
|
+
L(T.x.lessThanEqual(0).or(T.y.lessThanEqual(0)).or(T.x.greaterThanEqual(1)).or(T.y.greaterThanEqual(1)), () => {
|
|
2150
|
+
xt();
|
|
2274
2151
|
});
|
|
2275
|
-
let
|
|
2276
|
-
|
|
2277
|
-
let
|
|
2278
|
-
|
|
2279
|
-
let
|
|
2280
|
-
|
|
2281
|
-
let e = o(
|
|
2282
|
-
|
|
2283
|
-
let t =
|
|
2284
|
-
|
|
2285
|
-
let i = a(
|
|
2286
|
-
o = v.greaterThan(0).and(
|
|
2152
|
+
let ee = ut(T, i(T), this._cameraProjectionMatrixInverse).toConst(), te = ee.sub(s).normalize().toConst(), ne = this.useLinearThickness.equal(!0).select(ee.z.negate().div(this._cameraFar).clamp().mul(100), M(1)), re = Ae(ee.sub(ne.mul(f).mul(_)).sub(s)), E = H(U(te, f), U(re, f));
|
|
2153
|
+
E = c(z(E, -1, 1)), E = z(Ee(kt(S, E.negate()).sub(m.sub(vt)), et)), E = e.equal(!0).select(E.yx, E.xy);
|
|
2154
|
+
let D = E.x.toConst(), ie = E.y.toConst(), ae = B(E.mul(M(n))).toConst(), O = B(ht(ie.sub(D).mul(M(n)))).toConst(), oe = O.greaterThan(B(0)).select(B(ct(B(4294967295), B(32).sub(n).add(n.sub(O)))), B(0)).toConst().shiftLeft(ae);
|
|
2155
|
+
oe = oe.bitAnd(r.bitNot()), r.assign(r.bitOr(oe));
|
|
2156
|
+
let k = Ot(oe);
|
|
2157
|
+
L(k.greaterThan(0), () => {
|
|
2158
|
+
let e = o(T);
|
|
2159
|
+
L(Re(e).greaterThan(.001), () => {
|
|
2160
|
+
let t = Ae(te), r = z(U(p, t));
|
|
2161
|
+
L(r.greaterThan(.001), () => {
|
|
2162
|
+
let i = a(T), o = U(i, t.negate()), s = Qe(o).lessThan(0).select(R(o).mul(v), R(o));
|
|
2163
|
+
o = v.greaterThan(0).and(U(i, f).greaterThan(0)).select(s, z(o)), C.rgb.addAssign(M(k).div(M(n)).mul(e).mul(r).mul(o));
|
|
2287
2164
|
});
|
|
2288
2165
|
});
|
|
2289
2166
|
});
|
|
2290
|
-
}),
|
|
2291
|
-
}), u =
|
|
2167
|
+
}), W(C);
|
|
2168
|
+
}), u = V(() => {
|
|
2292
2169
|
let e = i(t).toVar();
|
|
2293
2170
|
e.greaterThanEqual(1).discard();
|
|
2294
|
-
let o =
|
|
2295
|
-
|
|
2171
|
+
let o = ut(t, e, this._cameraProjectionMatrixInverse).toVar(), c = a(t).toVar(), u = Ae(o.xyz.negate()).toVar(), d = s(ft), f = lt(ft), p = this._temporalDirection.mul(.02), m = Oe(d.add(this._temporalOffset)).add(Je(t.add(p).mul(2).sub(1))), h = M(0), g = W(0), _ = this.sliceCount.toConst(), v = this.aoIntensity.toConst(), y = this.giIntensity.toConst(), b = this.radius.toConst();
|
|
2172
|
+
Ze({
|
|
2296
2173
|
start: B(0),
|
|
2297
2174
|
end: _,
|
|
2298
2175
|
type: "uint",
|
|
2299
2176
|
condition: "<"
|
|
2300
2177
|
}, ({ i: e }) => {
|
|
2301
|
-
let i =
|
|
2302
|
-
r.assign(0), g.addAssign(l(
|
|
2303
|
-
}), h.divAssign(
|
|
2304
|
-
let x =
|
|
2305
|
-
return g.mulAssign(C),
|
|
2178
|
+
let i = kt(M(e).add(f).add(this._temporalDirection), et.div(M(_))).toConst(), a = W(H(Tt(i), mt(i)), 0).toConst(), s = a.xy.mul(M(1).div(this._resolution)).toConst(), d = Ae($e(a, u)).toConst(), p = $e(u, d).toConst(), v = c.sub(d.mul(U(c, d))).toConst(), y = z(U(Ae(v).toConst(), u), -1, 1).toConst(), x = Qe(U(v, p)).negate().mul(Ct(y)).toConst();
|
|
2179
|
+
r.assign(0), g.addAssign(l(at(!0), b, o, s, m, t, u, c, x)), g.addAssign(l(at(!1), b, o, s, m, t, u, c, x)), h.addAssign(M(Ot(r)).div(M(n)));
|
|
2180
|
+
}), h.divAssign(M(_)), h.assign(qe(h.clamp().oneMinus(), v).clamp()), g.divAssign(M(_)), g.mulAssign(y);
|
|
2181
|
+
let x = M(7).toConst(), S = Re(g), C = S.greaterThan(x).select(x.div(S), M(1));
|
|
2182
|
+
return g.mulAssign(C), P(g, h);
|
|
2306
2183
|
});
|
|
2307
2184
|
return this._material.fragmentNode = u().context(e.getSharedContext()), this._material.needsUpdate = !0, this._textureNode;
|
|
2308
2185
|
}
|
|
2309
2186
|
dispose() {
|
|
2310
2187
|
this._ssgiRenderTarget.dispose(), this._material.dispose();
|
|
2311
2188
|
}
|
|
2312
|
-
},
|
|
2189
|
+
}, En = (e, t, n, r) => new Tn(Ye(e), t, n, r), Dn = class e extends Ft {
|
|
2313
2190
|
static {
|
|
2314
2191
|
this.passId = "SsgiRenderPass";
|
|
2315
2192
|
}
|
|
2316
2193
|
constructor(t) {
|
|
2317
|
-
super(), this.passId = e.passId, this.sliceCount =
|
|
2194
|
+
super(), this.passId = e.passId, this.sliceCount = I(t.sliceCount, "uint"), this.stepCount = I(t.stepCount, "uint"), this.radius = I(t.radius), this.expFactor = I(t.expFactor), this.thickness = I(t.thickness), this.backfaceLighting = I(t.backfaceLighting), this.aoIntensity = I(t.aoIntensity), this.giIntensity = I(t.giIntensity), this.useLinearThickness = I(t.useLinearThickness), this.useScreenSpaceSampling = I(t.useScreenSpaceSampling);
|
|
2318
2195
|
}
|
|
2319
2196
|
addParametersToGUI(e, t) {
|
|
2320
2197
|
let n = e.addFolder("SSGI Settings");
|
|
2321
2198
|
n.add(this.sliceCount, "value", 1, 4, 1).name("slice count").onChange(() => t()), n.add(this.stepCount, "value", 1, 32, 1).name("step count").onChange(() => t()), n.add(this.radius, "value", 1, 25).name("radius").onChange(() => t()), n.add(this.expFactor, "value", 1, 3).name("exp factor").onChange(() => t()), n.add(this.thickness, "value", .01, 10).name("thickness").onChange(() => t()), n.add(this.backfaceLighting, "value", 0, 1).name("backface lighting").onChange(() => t()), n.add(this.aoIntensity, "value", 0, 4).name("AO intensity").onChange(() => t()), n.add(this.giIntensity, "value", 0, 100).name("GI intensity").onChange(() => t()), n.add(this.useLinearThickness, "value").name("use linear thickness").onChange(() => t()), n.add(this.useScreenSpaceSampling, "value").name("use screen-space sampling").onChange(() => t());
|
|
2322
2199
|
}
|
|
2323
|
-
assemble(e, t, n,
|
|
2324
|
-
if (!(
|
|
2325
|
-
e.setMRT(
|
|
2326
|
-
output:
|
|
2327
|
-
diffuseColor:
|
|
2328
|
-
normal:
|
|
2329
|
-
velocity:
|
|
2200
|
+
assemble(e, t, n, r, i) {
|
|
2201
|
+
if (!(r instanceof l)) return t;
|
|
2202
|
+
e.setMRT(Be({
|
|
2203
|
+
output: Ke,
|
|
2204
|
+
diffuseColor: Et,
|
|
2205
|
+
normal: Ve(Ge),
|
|
2206
|
+
velocity: Dt
|
|
2330
2207
|
}));
|
|
2331
|
-
let
|
|
2208
|
+
let a = e.getTextureNode("output"), o = e.getTextureNode("diffuseColor"), s = e.getTextureNode("depth"), c = e.getTextureNode("normal"), u = En(a, s, St((e) => ot(c.sample(e))), r);
|
|
2332
2209
|
u.sliceCount = this.sliceCount, u.stepCount = this.stepCount, u.radius = this.radius, u.expFactor = this.expFactor, u.thickness = this.thickness, u.backfaceLighting = this.backfaceLighting, u.aoIntensity = this.aoIntensity, u.giIntensity = this.giIntensity, u.useLinearThickness = this.useLinearThickness, u.useScreenSpaceSampling = this.useScreenSpaceSampling;
|
|
2333
|
-
let d = u.rgb, f = u.a, p =
|
|
2334
|
-
return p.name = "Ssgi Composite",
|
|
2210
|
+
let d = u.rgb, f = u.a, p = P(nt(a.rgb.mul(f), o.rgb.mul(d)), a.a);
|
|
2211
|
+
return p.name = "Ssgi Composite", i === "ao only" ? P(W(f), 1) : i === "gi only" ? P(d, 1) : i === "direct lighting only" ? a : p;
|
|
2335
2212
|
}
|
|
2336
|
-
},
|
|
2213
|
+
}, On = /* @__PURE__ */ new xe(), kn = /* @__PURE__ */ new k(), An, jn = class extends he {
|
|
2337
2214
|
static get type() {
|
|
2338
2215
|
return "TRAANode";
|
|
2339
2216
|
}
|
|
2340
|
-
constructor(t, n, r
|
|
2341
|
-
super("vec4"), this.isTRAANode = !0, this.updateBeforeType =
|
|
2217
|
+
constructor(e, t, n, r) {
|
|
2218
|
+
super("vec4"), this.isTRAANode = !0, this.updateBeforeType = me.FRAME, this.beautyNode = e, this.depthNode = t, this.velocityNode = n, this.camera = r, this.depthThreshold = 5e-4, this.edgeDepthDiff = .001, this.maxVelocityLength = 128, this.useSubpixelCorrection = !0, this._jitterIndex = 0, this._invSize = I(new k()), this._historyRenderTarget = new w(1, 1, {
|
|
2342
2219
|
depthBuffer: !1,
|
|
2343
|
-
type:
|
|
2344
|
-
depthTexture: new
|
|
2345
|
-
}), this._historyRenderTarget.texture.name = "TRAANode.history", this._resolveRenderTarget = new
|
|
2220
|
+
type: S,
|
|
2221
|
+
depthTexture: new p()
|
|
2222
|
+
}), this._historyRenderTarget.texture.name = "TRAANode.history", this._resolveRenderTarget = new w(1, 1, {
|
|
2346
2223
|
depthBuffer: !1,
|
|
2347
|
-
type:
|
|
2348
|
-
}), this._resolveRenderTarget.texture.name = "TRAANode.resolve", this._resolveMaterial = new
|
|
2224
|
+
type: S
|
|
2225
|
+
}), this._resolveRenderTarget.texture.name = "TRAANode.resolve", this._resolveMaterial = new A(), this._resolveMaterial.name = "TRAA.resolve", this._textureNode = Ne(this, this._resolveRenderTarget.texture), this._originalProjectionMatrix = new D(), this._cameraNearFar = I(new k()), this._cameraWorldMatrix = I(new D()), this._cameraWorldMatrixInverse = I(new D()), this._cameraProjectionMatrixInverse = I(new D()), this._previousCameraWorldMatrix = I(new D()), this._previousCameraProjectionMatrixInverse = I(new D()), this._previousDepthNode = F(new p(1, 1)), this._needsPostProcessingSync = !1, this._velocityNode = null;
|
|
2349
2226
|
}
|
|
2350
2227
|
getTextureNode() {
|
|
2351
2228
|
return this._textureNode;
|
|
@@ -2362,48 +2239,48 @@ var xn = /* @__PURE__ */ new we(), Sn = /* @__PURE__ */ new h(), Cn = [
|
|
|
2362
2239
|
offsetY: 0,
|
|
2363
2240
|
width: e,
|
|
2364
2241
|
height: t
|
|
2365
|
-
}, r =
|
|
2242
|
+
}, r = Nn[this._jitterIndex];
|
|
2366
2243
|
this.camera.setViewOffset(n.fullWidth, n.fullHeight, n.offsetX + r[0] - .5, n.offsetY + r[1] - .5, n.width, n.height);
|
|
2367
2244
|
}
|
|
2368
2245
|
clearViewOffset() {
|
|
2369
|
-
this.camera.clearViewOffset(), this._velocityNode.setProjectionMatrix(null), this._jitterIndex++, this._jitterIndex %=
|
|
2246
|
+
this.camera.clearViewOffset(), this._velocityNode.setProjectionMatrix(null), this._jitterIndex++, this._jitterIndex %= Nn.length - 1;
|
|
2370
2247
|
}
|
|
2371
2248
|
updateBefore(e) {
|
|
2372
2249
|
let { renderer: t } = e;
|
|
2373
2250
|
this._previousCameraWorldMatrix.value.copy(this._cameraWorldMatrix.value), this._previousCameraProjectionMatrixInverse.value.copy(this._cameraProjectionMatrixInverse.value), this._cameraNearFar.value.set(this.camera.near, this.camera.far), this._cameraWorldMatrix.value.copy(this.camera.matrixWorld), this._cameraWorldMatrixInverse.value.copy(this.camera.matrixWorldInverse), this._cameraProjectionMatrixInverse.value.copy(this.camera.projectionMatrixInverse);
|
|
2374
2251
|
let n = this.beautyNode.isRTTNode ? this.beautyNode.renderTarget : this.beautyNode.passNode.renderTarget, r = n.texture.width, i = n.texture.height;
|
|
2375
|
-
this._needsPostProcessingSync === !0 && (this.setViewOffset(r, i), this._needsPostProcessingSync = !1),
|
|
2252
|
+
this._needsPostProcessingSync === !0 && (this.setViewOffset(r, i), this._needsPostProcessingSync = !1), An = j.resetRendererState(t, An);
|
|
2376
2253
|
let a = this._historyRenderTarget.width !== r || this._historyRenderTarget.height !== i;
|
|
2377
|
-
this.setSize(r, i), a === !0 && (t.initRenderTarget(this._historyRenderTarget), t.initRenderTarget(this._resolveRenderTarget), t.copyTextureToTexture(n.texture, this._historyRenderTarget.texture)), t.setRenderTarget(this._resolveRenderTarget),
|
|
2378
|
-
let o = t.getDrawingBufferSize(
|
|
2254
|
+
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), On.material = this._resolveMaterial, On.name = "TRAA", On.render(t), t.setRenderTarget(null), t.copyTextureToTexture(this._resolveRenderTarget.texture, this._historyRenderTarget.texture);
|
|
2255
|
+
let o = t.getDrawingBufferSize(kn);
|
|
2379
2256
|
if (this._historyRenderTarget.height === o.height && this._historyRenderTarget.width === o.width) {
|
|
2380
2257
|
let e = this.depthNode.value;
|
|
2381
2258
|
t.copyTextureToTexture(e, this._historyRenderTarget.depthTexture), this._previousDepthNode.value = this._historyRenderTarget.depthTexture;
|
|
2382
2259
|
}
|
|
2383
|
-
|
|
2260
|
+
j.restoreRendererState(t, An);
|
|
2384
2261
|
}
|
|
2385
2262
|
setup(e) {
|
|
2386
2263
|
let t = e.context.renderPipeline;
|
|
2387
2264
|
t && (this._needsPostProcessingSync = !0, t.context.onBeforeRenderPipeline = () => {
|
|
2388
|
-
let t = e.renderer.getDrawingBufferSize(
|
|
2265
|
+
let t = e.renderer.getDrawingBufferSize(kn);
|
|
2389
2266
|
this.setViewOffset(t.width, t.height);
|
|
2390
2267
|
}, t.context.onAfterRenderPipeline = () => {
|
|
2391
2268
|
this.clearViewOffset();
|
|
2392
|
-
}), e.renderer.reversedDepthBuffer === !0 && (this._historyRenderTarget.depthTexture.type =
|
|
2269
|
+
}), e.renderer.reversedDepthBuffer === !0 && (this._historyRenderTarget.depthTexture.type = _), e.context.velocity === void 0 ? this._velocityNode = Dt : this._velocityNode = e.context.velocity;
|
|
2393
2270
|
let n = (e) => {
|
|
2394
2271
|
let { x: t, y: n } = this._cameraNearFar;
|
|
2395
|
-
return
|
|
2272
|
+
return De(Ie(e, t, n), t, n);
|
|
2396
2273
|
}, r = wt({
|
|
2397
2274
|
closestDepth: "float",
|
|
2398
2275
|
closestPositionTexel: "vec2",
|
|
2399
2276
|
farthestDepth: "float"
|
|
2400
|
-
}), i =
|
|
2401
|
-
let i =
|
|
2277
|
+
}), i = V(([t]) => {
|
|
2278
|
+
let i = M(2).toVar(), a = H(0).toVar(), o = M(-1).toVar();
|
|
2402
2279
|
for (let r = -1; r <= 1; ++r) for (let s = -1; s <= 1; ++s) {
|
|
2403
2280
|
let c = t.add(H(r, s)).toVar(), l = this.depthNode.load(c).r;
|
|
2404
|
-
e.renderer.reversedDepthBuffer && (l = l.oneMinus()), e.renderer.logarithmicDepthBuffer && (l = n(l)), l = l.toVar(),
|
|
2281
|
+
e.renderer.reversedDepthBuffer && (l = l.oneMinus()), e.renderer.logarithmicDepthBuffer && (l = n(l)), l = l.toVar(), L(l.lessThan(i), () => {
|
|
2405
2282
|
i.assign(l), a.assign(c);
|
|
2406
|
-
}),
|
|
2283
|
+
}), L(l.greaterThan(o), () => {
|
|
2407
2284
|
o.assign(l);
|
|
2408
2285
|
});
|
|
2409
2286
|
}
|
|
@@ -2411,11 +2288,11 @@ var xn = /* @__PURE__ */ new we(), Sn = /* @__PURE__ */ new h(), Cn = [
|
|
|
2411
2288
|
}), a = (t) => {
|
|
2412
2289
|
let r = this._previousDepthNode.sample(t).r;
|
|
2413
2290
|
e.renderer.logarithmicDepthBuffer && (r = n(r));
|
|
2414
|
-
let i =
|
|
2415
|
-
return this.camera.isOrthographicCamera ?
|
|
2416
|
-
}, o =
|
|
2417
|
-
let i = r.rgb.add(n.rgb).mul(.5), a = r.rgb.sub(n.rgb).mul(.5).add(1e-7), o = t.sub(
|
|
2418
|
-
return c.greaterThan(1).select(
|
|
2291
|
+
let i = ut(t, r, this._previousCameraProjectionMatrixInverse), a = this._previousCameraWorldMatrix.mul(P(i, 1)).xyz, o = this._cameraWorldMatrixInverse.mul(P(a, 1)).z;
|
|
2292
|
+
return this.camera.isOrthographicCamera ? He(o, this._cameraNearFar.x, this._cameraNearFar.y) : De(o, this._cameraNearFar.x, this._cameraNearFar.y);
|
|
2293
|
+
}, o = V(([e, t, n, r]) => {
|
|
2294
|
+
let i = r.rgb.add(n.rgb).mul(.5), a = r.rgb.sub(n.rgb).mul(.5).add(1e-7), o = t.sub(P(i, e.a)), s = o.xyz.div(a).abs(), c = N(s.x, s.y, s.z);
|
|
2295
|
+
return c.greaterThan(1).select(P(i, e.a).add(o.div(c)), t);
|
|
2419
2296
|
}).setLayout({
|
|
2420
2297
|
name: "clipAABB",
|
|
2421
2298
|
type: "vec4",
|
|
@@ -2437,7 +2314,7 @@ var xn = /* @__PURE__ */ new we(), Sn = /* @__PURE__ */ new h(), Cn = [
|
|
|
2437
2314
|
type: "vec4"
|
|
2438
2315
|
}
|
|
2439
2316
|
]
|
|
2440
|
-
}), s =
|
|
2317
|
+
}), s = V(([e, t, n, r]) => {
|
|
2441
2318
|
let i = [
|
|
2442
2319
|
[-1, -1],
|
|
2443
2320
|
[-1, 1],
|
|
@@ -2449,13 +2326,13 @@ var xn = /* @__PURE__ */ new we(), Sn = /* @__PURE__ */ new h(), Cn = [
|
|
|
2449
2326
|
[-1, 0]
|
|
2450
2327
|
], a = t.toVar(), s = t.pow2().toVar();
|
|
2451
2328
|
for (let [t, n] of i) {
|
|
2452
|
-
let r = this.beautyNode.offset(
|
|
2329
|
+
let r = this.beautyNode.offset(Fe(t, n)).load(e).max(0);
|
|
2453
2330
|
a.addAssign(r), s.addAssign(r.pow2());
|
|
2454
2331
|
}
|
|
2455
|
-
let c =
|
|
2332
|
+
let c = M(i.length + 1), l = a.div(c), u = s.div(c).sub(l.pow2()).max(0).sqrt().mul(r), d = l.sub(u), f = l.add(u);
|
|
2456
2333
|
return o(l.clamp(d, f), n, d, f);
|
|
2457
|
-
}), c =
|
|
2458
|
-
let n = e.mul(t).fract().abs(), r =
|
|
2334
|
+
}), c = V(([e, t]) => {
|
|
2335
|
+
let n = e.mul(t).fract().abs(), r = N(n, n.oneMinus());
|
|
2459
2336
|
return r.x.mul(r.y).oneMinus().div(.75);
|
|
2460
2337
|
}).setLayout({
|
|
2461
2338
|
name: "subpixelCorrection",
|
|
@@ -2467,12 +2344,12 @@ var xn = /* @__PURE__ */ new we(), Sn = /* @__PURE__ */ new h(), Cn = [
|
|
|
2467
2344
|
name: "textureSize",
|
|
2468
2345
|
type: "ivec2"
|
|
2469
2346
|
}]
|
|
2470
|
-
}), l =
|
|
2471
|
-
let r = n.oneMinus(), i = e.mul(
|
|
2472
|
-
return n.mulAssign(
|
|
2473
|
-
}), u =
|
|
2474
|
-
let e =
|
|
2475
|
-
return this.useSubpixelCorrection && C.addAssign(c(p, t).mul(.25)), C.assign(y.select(C.add(S).saturate(), 1)), l(b, s(n, b, x,
|
|
2347
|
+
}), l = V(([e, t, n]) => {
|
|
2348
|
+
let r = n.oneMinus(), i = e.mul(M(1).div(N(e.r, e.g, e.b).add(1))), a = t.mul(M(1).div(N(t.r, t.g, t.b).add(1))), o = Re(i.rgb), s = Re(a.rgb);
|
|
2349
|
+
return n.mulAssign(M(1).div(o.add(1))), r.mulAssign(M(1).div(s.add(1))), nt(e.mul(n), t.mul(r)).div(N(n.add(r), 1e-5)).toVar();
|
|
2350
|
+
}), u = F(this._historyRenderTarget.texture), d = V(() => {
|
|
2351
|
+
let e = Xe(), 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 = M(.05).toVar();
|
|
2352
|
+
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, Pe(.5, 1, S.oneMinus().pow2())), C);
|
|
2476
2353
|
});
|
|
2477
2354
|
return this._resolveMaterial.colorNode = d(), this._textureNode;
|
|
2478
2355
|
}
|
|
@@ -2480,31 +2357,31 @@ var xn = /* @__PURE__ */ new we(), Sn = /* @__PURE__ */ new h(), Cn = [
|
|
|
2480
2357
|
this._historyRenderTarget.dispose(), this._resolveRenderTarget.dispose(), this._resolveMaterial.dispose();
|
|
2481
2358
|
}
|
|
2482
2359
|
};
|
|
2483
|
-
function
|
|
2360
|
+
function Mn(e, t) {
|
|
2484
2361
|
let n = 1, r = 0;
|
|
2485
2362
|
for (; e > 0;) n /= t, r += e % t * n, e = Math.floor(e / t);
|
|
2486
2363
|
return r;
|
|
2487
2364
|
}
|
|
2488
|
-
var
|
|
2365
|
+
var Nn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Mn(t + 1, 2), Mn(t + 1, 3)]), Pn = (e, t, n, r) => new jn(Ye(e), t, n, r), Fn = class e extends Ft {
|
|
2489
2366
|
constructor(...t) {
|
|
2490
2367
|
super(...t), this.passId = e.passId;
|
|
2491
2368
|
}
|
|
2492
2369
|
static {
|
|
2493
2370
|
this.passId = "TraaRenderPass";
|
|
2494
2371
|
}
|
|
2495
|
-
assemble(e, t, n,
|
|
2496
|
-
return
|
|
2372
|
+
assemble(e, t, n, r, i) {
|
|
2373
|
+
return r instanceof l ? Pn(t, e.getTextureNode("depth"), e.getTextureNode("velocity"), r) : t;
|
|
2497
2374
|
}
|
|
2498
2375
|
addParametersToGUI(e, t) {}
|
|
2499
|
-
},
|
|
2376
|
+
}, In = class extends pe {
|
|
2500
2377
|
constructor(e, t, n, r) {
|
|
2501
|
-
super(e, t), this.passNeedsReassembly = !0, this.debugMode = "off", this.renderPasses = /* @__PURE__ */ new Map(), this.guiParameterGroups = /* @__PURE__ */ new Map(), this.lastRenderCamera = void 0, this.renderPipeline = new
|
|
2378
|
+
super(e, t), this.passNeedsReassembly = !0, this.debugMode = "off", this.renderPasses = /* @__PURE__ */ new Map(), this.guiParameterGroups = /* @__PURE__ */ new Map(), this.lastRenderCamera = void 0, this.renderPipeline = new Se(t), this.enableRenderPasses(n, r);
|
|
2502
2379
|
}
|
|
2503
2380
|
enableRenderPasses(e, t) {
|
|
2504
2381
|
e && this.enableSsgiPass(), t && this.enableOutline(t.outlineVisibleEdgeColor, t.outlineHiddenEdgeColor), e && this.enableTraaPass();
|
|
2505
2382
|
}
|
|
2506
|
-
addGroundShadowLightAndFloor(e) {
|
|
2507
|
-
this.
|
|
2383
|
+
async addGroundShadowLightAndFloor(e) {
|
|
2384
|
+
await this._webGpuGroundShadowReflection.addToScene(e);
|
|
2508
2385
|
}
|
|
2509
2386
|
addRenderPass(e) {
|
|
2510
2387
|
this.renderPasses.set(e.passId, e), this.passNeedsReassembly = !0;
|
|
@@ -2513,16 +2390,16 @@ var Pn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Nn(t + 1, 2), Nn(
|
|
|
2513
2390
|
disableUiInteractionMode() {}
|
|
2514
2391
|
enableUiInteractionMode() {}
|
|
2515
2392
|
getQualityLevel() {
|
|
2516
|
-
return console.error("RoomleRenderer.getQualityLevel is part of autoquality/performance tuning which is not implemented yet for WebGPU"),
|
|
2393
|
+
return console.error("RoomleRenderer.getQualityLevel is part of autoquality/performance tuning which is not implemented yet for WebGPU"), le.HIGHEST;
|
|
2517
2394
|
}
|
|
2518
2395
|
setCameraType(e) {
|
|
2519
2396
|
super.setCameraType(e), this.passNeedsReassembly = !0;
|
|
2520
2397
|
}
|
|
2521
2398
|
switchToConfigurator() {
|
|
2522
|
-
super.switchToConfigurator(), this.
|
|
2399
|
+
super.switchToConfigurator(), this._webGpuGroundShadowReflection.setVisible(!0);
|
|
2523
2400
|
}
|
|
2524
2401
|
switchToPlanner(e) {
|
|
2525
|
-
super.switchToPlanner(e), this.
|
|
2402
|
+
super.switchToPlanner(e), this._webGpuGroundShadowReflection.setVisible(!1), this.passNeedsReassembly = !0;
|
|
2526
2403
|
}
|
|
2527
2404
|
highlightObjects(e) {
|
|
2528
2405
|
this.getOutlinePassOrUndefined()?.highlightObjects(e);
|
|
@@ -2534,10 +2411,10 @@ var Pn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Nn(t + 1, 2), Nn(
|
|
|
2534
2411
|
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();
|
|
2535
2412
|
}
|
|
2536
2413
|
updateCameraProjectionMatrix(e) {
|
|
2537
|
-
(e instanceof
|
|
2414
|
+
(e instanceof r || e instanceof l) && e.updateProjectionMatrix();
|
|
2538
2415
|
}
|
|
2539
2416
|
assembleRenderPasses(e, t) {
|
|
2540
|
-
let n =
|
|
2417
|
+
let n = ke(e, t), r = n;
|
|
2541
2418
|
for (let i of this.renderPasses.values()) r = i.assemble(n, r, e, t, this.debugMode);
|
|
2542
2419
|
return r;
|
|
2543
2420
|
}
|
|
@@ -2550,13 +2427,13 @@ var Pn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Nn(t + 1, 2), Nn(
|
|
|
2550
2427
|
t && t.setOutlineColors(e.outlineVisibleEdgeColor, e.outlineHiddenEdgeColor);
|
|
2551
2428
|
}
|
|
2552
2429
|
setGroundShadow(e, t) {
|
|
2553
|
-
this.isConfiguratorMode && this.
|
|
2430
|
+
this.isConfiguratorMode && this._webGpuGroundShadowReflection.setReceiveShadow(e);
|
|
2554
2431
|
}
|
|
2555
2432
|
setOnQualityLevelChangeCallback(e) {
|
|
2556
2433
|
console.error("RoomleRenderer.setOnQualityLevelChangeCallback is part of autoquality/performance tuning which is not implemented yet for WebGPU");
|
|
2557
2434
|
}
|
|
2558
2435
|
enableOutline(e, t) {
|
|
2559
|
-
this.getOutlinePassOrUndefined() || this.addRenderPass(new
|
|
2436
|
+
this.getOutlinePassOrUndefined() || this.addRenderPass(new It({
|
|
2560
2437
|
selectedObjects: [],
|
|
2561
2438
|
visibleEdgeColor: e,
|
|
2562
2439
|
hiddenEdgeColor: t,
|
|
@@ -2566,11 +2443,11 @@ var Pn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Nn(t + 1, 2), Nn(
|
|
|
2566
2443
|
}));
|
|
2567
2444
|
}
|
|
2568
2445
|
getOutlinePassOrUndefined() {
|
|
2569
|
-
let e = this.renderPasses.get(
|
|
2570
|
-
if (e && e instanceof
|
|
2446
|
+
let e = this.renderPasses.get(It.passId);
|
|
2447
|
+
if (e && e instanceof It) return e;
|
|
2571
2448
|
}
|
|
2572
2449
|
enableSsgiPass() {
|
|
2573
|
-
this.renderPasses.get(
|
|
2450
|
+
this.renderPasses.get(Dn.passId) || this.addRenderPass(new Dn({
|
|
2574
2451
|
sliceCount: 2,
|
|
2575
2452
|
stepCount: 12,
|
|
2576
2453
|
radius: 8,
|
|
@@ -2584,7 +2461,7 @@ var Pn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Nn(t + 1, 2), Nn(
|
|
|
2584
2461
|
}));
|
|
2585
2462
|
}
|
|
2586
2463
|
enableTraaPass() {
|
|
2587
|
-
this.renderPasses.get(
|
|
2464
|
+
this.renderPasses.get(Fn.passId) || this.addRenderPass(new Fn());
|
|
2588
2465
|
}
|
|
2589
2466
|
setQualityLevel(e) {
|
|
2590
2467
|
console.error("RoomleRenderer.setQualityLevel is part of autoquality/performance tuning which is not implemented yet for WebGPU");
|
|
@@ -2593,17 +2470,17 @@ var Pn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Nn(t + 1, 2), Nn(
|
|
|
2593
2470
|
console.error("RoomleRenderer.setQualityMap is part of autoquality/performance tuning which is not implemented yet for WebGPU");
|
|
2594
2471
|
}
|
|
2595
2472
|
setShadingType(e) {
|
|
2596
|
-
e !==
|
|
2473
|
+
e !== ce.DEFAULT && console.error("RoomleWebGPURenderer.setShadingType is not implemented yet");
|
|
2597
2474
|
}
|
|
2598
2475
|
showGUI(e) {
|
|
2599
|
-
if (this.renderer.inspector instanceof
|
|
2476
|
+
if (this.renderer.inspector instanceof _n) return;
|
|
2600
2477
|
let t = document.createElement("style");
|
|
2601
2478
|
t.innerText = "#profiler-toggle,\n #profiler-mini-panel {\n left: 15px;\n right: auto !important;\n }", document.head.appendChild(t);
|
|
2602
|
-
let n = new
|
|
2479
|
+
let n = new _n();
|
|
2603
2480
|
this.renderer.inspector = n, this._domHelper.element?.appendChild(n.domElement), this.addDebugGUI(n, e);
|
|
2604
2481
|
let r = n.createParameters("Render Pass Settings");
|
|
2605
2482
|
for (let t of this.renderPasses.values()) t.addParametersToGUI(r, e);
|
|
2606
|
-
this.addToneMappingSettings(r, e);
|
|
2483
|
+
this._webGpuGroundShadowReflection.addParametersToGUI(r, e), this.addToneMappingSettings(r, e);
|
|
2607
2484
|
}
|
|
2608
2485
|
addDebugGUI(e, t) {
|
|
2609
2486
|
let n = e.createParameters("Debug Settings"), r = { debugMode: this.debugMode };
|
|
@@ -2638,7 +2515,7 @@ var Pn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Nn(t + 1, 2), Nn(
|
|
|
2638
2515
|
}
|
|
2639
2516
|
getOrCreateGUIParameters(e) {
|
|
2640
2517
|
let t = this.renderer.inspector;
|
|
2641
|
-
if (t instanceof
|
|
2518
|
+
if (t instanceof _n) return this.guiParameterGroups.get(e) ?? this.createAndCacheGUIParameters(t, e);
|
|
2642
2519
|
throw Error("Inspector GUI is not initialized. Call showGUI() before creating parameter groups.");
|
|
2643
2520
|
}
|
|
2644
2521
|
createAndCacheGUIParameters(e, t) {
|
|
@@ -2646,8 +2523,8 @@ var Pn = /* @__PURE__ */ Array.from({ length: 32 }, (e, t) => [Nn(t + 1, 2), Nn(
|
|
|
2646
2523
|
return this.guiParameterGroups.set(t, n), n;
|
|
2647
2524
|
}
|
|
2648
2525
|
};
|
|
2649
|
-
|
|
2526
|
+
fe([de, ue("design:type", Object)], In.prototype, "_domHelper", void 0), fe([de, ue("design:type", Object)], In.prototype, "_webGpuGroundShadowReflection", void 0);
|
|
2650
2527
|
//#endregion
|
|
2651
|
-
export {
|
|
2528
|
+
export { In as RoomleWebGPURenderer };
|
|
2652
2529
|
|
|
2653
|
-
//# sourceMappingURL=roomle-webgpu-renderer-
|
|
2530
|
+
//# sourceMappingURL=roomle-webgpu-renderer-BrZZeAGw.mjs.map
|