minerender 2.1.0-alpha.48 → 2.1.0-alpha.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundle.js CHANGED
@@ -10988,7 +10988,7 @@ var MineRender = (() => {
10988
10988
  }
10989
10989
  }
10990
10990
  }
10991
- var REVISION, MOUSE, TOUCH, CullFaceNone, CullFaceBack, CullFaceFront, PCFShadowMap, PCFSoftShadowMap, VSMShadowMap, FrontSide, BackSide, DoubleSide, NoBlending, NormalBlending, AdditiveBlending, SubtractiveBlending, MultiplyBlending, CustomBlending, AddEquation, SubtractEquation, ReverseSubtractEquation, MinEquation, MaxEquation, ZeroFactor, OneFactor, SrcColorFactor, OneMinusSrcColorFactor, SrcAlphaFactor, OneMinusSrcAlphaFactor, DstAlphaFactor, OneMinusDstAlphaFactor, DstColorFactor, OneMinusDstColorFactor, SrcAlphaSaturateFactor, ConstantColorFactor, OneMinusConstantColorFactor, ConstantAlphaFactor, OneMinusConstantAlphaFactor, NeverDepth, AlwaysDepth, LessDepth, LessEqualDepth, EqualDepth, GreaterEqualDepth, GreaterDepth, NotEqualDepth, MultiplyOperation, MixOperation, AddOperation, NoToneMapping, LinearToneMapping, ReinhardToneMapping, CineonToneMapping, ACESFilmicToneMapping, CustomToneMapping, UVMapping, CubeReflectionMapping, CubeRefractionMapping, EquirectangularReflectionMapping, EquirectangularRefractionMapping, CubeUVReflectionMapping, RepeatWrapping, ClampToEdgeWrapping, MirroredRepeatWrapping, NearestFilter, NearestMipmapNearestFilter, NearestMipmapLinearFilter, LinearFilter, LinearMipmapNearestFilter, LinearMipmapLinearFilter, UnsignedByteType, ByteType, ShortType, UnsignedShortType, IntType, UnsignedIntType, FloatType, HalfFloatType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedInt248Type, AlphaFormat, RGBAFormat, LuminanceFormat, LuminanceAlphaFormat, DepthFormat, DepthStencilFormat, RedFormat, RedIntegerFormat, RGFormat, RGIntegerFormat, RGBAIntegerFormat, RGB_S3TC_DXT1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGB_PVRTC_4BPPV1_Format, RGB_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_PVRTC_2BPPV1_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGBA_ETC2_EAC_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_10x10_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_BPTC_Format, RGB_BPTC_SIGNED_Format, RGB_BPTC_UNSIGNED_Format, RED_RGTC1_Format, SIGNED_RED_RGTC1_Format, RED_GREEN_RGTC2_Format, SIGNED_RED_GREEN_RGTC2_Format, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, ZeroCurvatureEnding, ZeroSlopeEnding, WrapAroundEnding, TrianglesDrawMode, TriangleStripDrawMode, TriangleFanDrawMode, LinearEncoding, sRGBEncoding, BasicDepthPacking, RGBADepthPacking, TangentSpaceNormalMap, ObjectSpaceNormalMap, NoColorSpace, SRGBColorSpace, LinearSRGBColorSpace, DisplayP3ColorSpace, LinearDisplayP3ColorSpace, LinearTransfer, SRGBTransfer, Rec709Primaries, P3Primaries, KeepStencilOp, AlwaysStencilFunc, NeverCompare, LessCompare, EqualCompare, LessEqualCompare, GreaterCompare, NotEqualCompare, GreaterEqualCompare, AlwaysCompare, StaticDrawUsage, GLSL3, _SRGBAFormat, WebGLCoordinateSystem, WebGPUCoordinateSystem, EventDispatcher, _lut, _seed, DEG2RAD, RAD2DEG, MathUtils, Vector2, Matrix3, _m3, _cache, LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, COLOR_SPACES, SUPPORTED_WORKING_COLOR_SPACES, ColorManagement, _canvas, ImageUtils, _sourceId, Source, _textureId, Texture, Vector4, RenderTarget, WebGLRenderTarget, DataArrayTexture, Data3DTexture, Quaternion, Vector3, _vector$b, _quaternion$4, Box3, _points, _vector$a, _box$3, _v0$2, _v1$7, _v2$4, _f0, _f1, _f2, _center, _extents, _triangleNormal, _testAxis, _box$2, _v1$6, _v2$3, Sphere, _vector$9, _segCenter, _segDir, _diff, _edge1, _edge2, _normal$1, Ray, Matrix4, _v1$5, _m1$2, _zero, _one, _x, _y, _z, _matrix, _quaternion$3, Euler, Layers, _object3DId, _v1$4, _q1, _m1$1, _target, _position$3, _scale$2, _quaternion$2, _xAxis, _yAxis, _zAxis, _addedEvent, _removedEvent, Object3D, _v0$1, _v1$3, _v2$2, _v3$1, _vab, _vac, _vbc, _vap, _vbp, _vcp, warnedGetUV, Triangle, _colorKeywords, _hslA, _hslB, Color, _color, _materialId, Material, MeshBasicMaterial, _vector$8, _vector2$1, BufferAttribute, Uint16BufferAttribute, Uint32BufferAttribute, Float32BufferAttribute, _id$2, _m1, _obj, _offset, _box$1, _boxMorphTargets, _vector$7, BufferGeometry, _inverseMatrix$3, _ray$3, _sphere$5, _sphereHitAt, _vA$1, _vB$1, _vC$1, _tempA, _morphA, _uvA$1, _uvB$1, _uvC$1, _normalA, _normalB, _normalC, _intersectionPoint, _intersectionPointWorld, Mesh, BoxGeometry, UniformsUtils, default_vertex, default_fragment, ShaderMaterial, Camera, PerspectiveCamera, fov, aspect, CubeCamera, CubeTexture, WebGLCubeRenderTarget, _vector1, _vector2, _normalMatrix, Plane, _sphere$4, _vector$6, Frustum, PlaneGeometry, alphahash_fragment, alphahash_pars_fragment, alphamap_fragment, alphamap_pars_fragment, alphatest_fragment, alphatest_pars_fragment, aomap_fragment, aomap_pars_fragment, begin_vertex, beginnormal_vertex, bsdfs, iridescence_fragment, bumpmap_pars_fragment, clipping_planes_fragment, clipping_planes_pars_fragment, clipping_planes_pars_vertex, clipping_planes_vertex, color_fragment, color_pars_fragment, color_pars_vertex, color_vertex, common, cube_uv_reflection_fragment, defaultnormal_vertex, displacementmap_pars_vertex, displacementmap_vertex, emissivemap_fragment, emissivemap_pars_fragment, colorspace_fragment, colorspace_pars_fragment, envmap_fragment, envmap_common_pars_fragment, envmap_pars_fragment, envmap_pars_vertex, envmap_vertex, fog_vertex, fog_pars_vertex, fog_fragment, fog_pars_fragment, gradientmap_pars_fragment, lightmap_fragment, lightmap_pars_fragment, lights_lambert_fragment, lights_lambert_pars_fragment, lights_pars_begin, envmap_physical_pars_fragment, lights_toon_fragment, lights_toon_pars_fragment, lights_phong_fragment, lights_phong_pars_fragment, lights_physical_fragment, lights_physical_pars_fragment, lights_fragment_begin, lights_fragment_maps, lights_fragment_end, logdepthbuf_fragment, logdepthbuf_pars_fragment, logdepthbuf_pars_vertex, logdepthbuf_vertex, map_fragment, map_pars_fragment, map_particle_fragment, map_particle_pars_fragment, metalnessmap_fragment, metalnessmap_pars_fragment, morphcolor_vertex, morphnormal_vertex, morphtarget_pars_vertex, morphtarget_vertex, normal_fragment_begin, normal_fragment_maps, normal_pars_fragment, normal_pars_vertex, normal_vertex, normalmap_pars_fragment, clearcoat_normal_fragment_begin, clearcoat_normal_fragment_maps, clearcoat_pars_fragment, iridescence_pars_fragment, opaque_fragment, packing, premultiplied_alpha_fragment, project_vertex, dithering_fragment, dithering_pars_fragment, roughnessmap_fragment, roughnessmap_pars_fragment, shadowmap_pars_fragment, shadowmap_pars_vertex, shadowmap_vertex, shadowmask_pars_fragment, skinbase_vertex, skinning_pars_vertex, skinning_vertex, skinnormal_vertex, specularmap_fragment, specularmap_pars_fragment, tonemapping_fragment, tonemapping_pars_fragment, transmission_fragment, transmission_pars_fragment, uv_pars_fragment, uv_pars_vertex, uv_vertex, worldpos_vertex, vertex$h, fragment$h, vertex$g, fragment$g, vertex$f, fragment$f, vertex$e, fragment$e, vertex$d, fragment$d, vertex$c, fragment$c, vertex$b, fragment$b, vertex$a, fragment$a, vertex$9, fragment$9, vertex$8, fragment$8, vertex$7, fragment$7, vertex$6, fragment$6, vertex$5, fragment$5, vertex$4, fragment$4, vertex$3, fragment$3, vertex$2, fragment$2, vertex$1, fragment$1, ShaderChunk, UniformsLib, ShaderLib, _rgb, OrthographicCamera, LOD_MIN, EXTRA_LOD_SIGMA, MAX_SAMPLES, _flatCamera, _clearColor, _oldTarget, _oldActiveCubeFace, _oldActiveMipmapLevel, PHI, INV_PHI, _axisDirections, PMREMGenerator, emptyTexture, emptyArrayTexture, empty3dTexture, emptyCubeTexture, arrayCacheF32, arrayCacheI32, mat4array, mat3array, mat2array, SingleUniform, PureArrayUniform, StructuredUniform, RePathPart, WebGLUniforms, COMPLETION_STATUS_KHR, programIdCount, includePattern, shaderChunkMap, unrollLoopPattern, _id$1, WebGLShaderCache, WebGLShaderStage, nextVersion, MeshDepthMaterial, MeshDistanceMaterial, vertex, fragment, ArrayCamera, Group, _moveEvent, WebXRController, DepthTexture, WebXRManager, WebGLRenderer, WebGL1Renderer, Scene, InterleavedBuffer, _vector$5, InterleavedBufferAttribute, DataTexture, InstancedBufferAttribute, _instanceLocalMatrix, _instanceWorldMatrix, _instanceIntersects, _box3, _identity, _mesh, _sphere$2, InstancedMesh, LineBasicMaterial, _start$1, _end$1, _inverseMatrix$1, _ray$1, _sphere$1, Line, _start, _end, LineSegments, CanvasTexture, _v0, _v1$1, _normal, _triangle, EdgesGeometry, MeshStandardMaterial, Interpolant, CubicInterpolant, LinearInterpolant, DiscreteInterpolant, KeyframeTrack, BooleanKeyframeTrack, ColorKeyframeTrack, NumberKeyframeTrack, QuaternionLinearInterpolant, QuaternionKeyframeTrack, StringKeyframeTrack, VectorKeyframeTrack, LoadingManager, DefaultLoadingManager, Loader, _RESERVED_CHARS_RE, _reservedRe, _wordChar, _wordCharOrDot, _directoryRe, _nodeRe, _objectRe, _propertyRe, _trackRe, _supportedObjectNames, Composite, PropertyBinding, _controlInterpolantsResultBuffer, Uniform, Raycaster, Spherical, GridHelper, AxesHelper;
10991
+ var REVISION, MOUSE, TOUCH, CullFaceNone, CullFaceBack, CullFaceFront, PCFShadowMap, PCFSoftShadowMap, VSMShadowMap, FrontSide, BackSide, DoubleSide, NoBlending, NormalBlending, AdditiveBlending, SubtractiveBlending, MultiplyBlending, CustomBlending, AddEquation, SubtractEquation, ReverseSubtractEquation, MinEquation, MaxEquation, ZeroFactor, OneFactor, SrcColorFactor, OneMinusSrcColorFactor, SrcAlphaFactor, OneMinusSrcAlphaFactor, DstAlphaFactor, OneMinusDstAlphaFactor, DstColorFactor, OneMinusDstColorFactor, SrcAlphaSaturateFactor, ConstantColorFactor, OneMinusConstantColorFactor, ConstantAlphaFactor, OneMinusConstantAlphaFactor, NeverDepth, AlwaysDepth, LessDepth, LessEqualDepth, EqualDepth, GreaterEqualDepth, GreaterDepth, NotEqualDepth, MultiplyOperation, MixOperation, AddOperation, NoToneMapping, LinearToneMapping, ReinhardToneMapping, CineonToneMapping, ACESFilmicToneMapping, CustomToneMapping, UVMapping, CubeReflectionMapping, CubeRefractionMapping, EquirectangularReflectionMapping, EquirectangularRefractionMapping, CubeUVReflectionMapping, RepeatWrapping, ClampToEdgeWrapping, MirroredRepeatWrapping, NearestFilter, NearestMipmapNearestFilter, NearestMipmapLinearFilter, LinearFilter, LinearMipmapNearestFilter, LinearMipmapLinearFilter, UnsignedByteType, ByteType, ShortType, UnsignedShortType, IntType, UnsignedIntType, FloatType, HalfFloatType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedInt248Type, AlphaFormat, RGBAFormat, LuminanceFormat, LuminanceAlphaFormat, DepthFormat, DepthStencilFormat, RedFormat, RedIntegerFormat, RGFormat, RGIntegerFormat, RGBAIntegerFormat, RGB_S3TC_DXT1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGB_PVRTC_4BPPV1_Format, RGB_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_PVRTC_2BPPV1_Format, RGB_ETC1_Format, RGB_ETC2_Format, RGBA_ETC2_EAC_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_10x10_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_BPTC_Format, RGB_BPTC_SIGNED_Format, RGB_BPTC_UNSIGNED_Format, RED_RGTC1_Format, SIGNED_RED_RGTC1_Format, RED_GREEN_RGTC2_Format, SIGNED_RED_GREEN_RGTC2_Format, InterpolateDiscrete, InterpolateLinear, InterpolateSmooth, ZeroCurvatureEnding, ZeroSlopeEnding, WrapAroundEnding, TrianglesDrawMode, TriangleStripDrawMode, TriangleFanDrawMode, LinearEncoding, sRGBEncoding, BasicDepthPacking, RGBADepthPacking, TangentSpaceNormalMap, ObjectSpaceNormalMap, NoColorSpace, SRGBColorSpace, LinearSRGBColorSpace, DisplayP3ColorSpace, LinearDisplayP3ColorSpace, LinearTransfer, SRGBTransfer, Rec709Primaries, P3Primaries, KeepStencilOp, AlwaysStencilFunc, NeverCompare, LessCompare, EqualCompare, LessEqualCompare, GreaterCompare, NotEqualCompare, GreaterEqualCompare, AlwaysCompare, StaticDrawUsage, GLSL3, _SRGBAFormat, WebGLCoordinateSystem, WebGPUCoordinateSystem, EventDispatcher, _lut, _seed, DEG2RAD, RAD2DEG, MathUtils, Vector2, Matrix3, _m3, _cache, LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, COLOR_SPACES, SUPPORTED_WORKING_COLOR_SPACES, ColorManagement, _canvas, ImageUtils, _sourceId, Source, _textureId, Texture, Vector4, RenderTarget, WebGLRenderTarget, DataArrayTexture, Data3DTexture, Quaternion, Vector3, _vector$b, _quaternion$4, Box3, _points, _vector$a, _box$3, _v0$2, _v1$7, _v2$4, _f0, _f1, _f2, _center, _extents, _triangleNormal, _testAxis, _box$2, _v1$6, _v2$3, Sphere, _vector$9, _segCenter, _segDir, _diff, _edge1, _edge2, _normal$1, Ray, Matrix4, _v1$5, _m1$2, _zero, _one, _x, _y, _z, _matrix, _quaternion$3, Euler, Layers, _object3DId, _v1$4, _q1, _m1$1, _target, _position$3, _scale$2, _quaternion$2, _xAxis, _yAxis, _zAxis, _addedEvent, _removedEvent, Object3D, _v0$1, _v1$3, _v2$2, _v3$1, _vab, _vac, _vbc, _vap, _vbp, _vcp, warnedGetUV, Triangle, _colorKeywords, _hslA, _hslB, Color, _color, _materialId, Material, MeshBasicMaterial, _vector$8, _vector2$1, BufferAttribute, Uint16BufferAttribute, Uint32BufferAttribute, Float32BufferAttribute, _id$2, _m1, _obj, _offset, _box$1, _boxMorphTargets, _vector$7, BufferGeometry, _inverseMatrix$3, _ray$3, _sphere$5, _sphereHitAt, _vA$1, _vB$1, _vC$1, _tempA, _morphA, _uvA$1, _uvB$1, _uvC$1, _normalA, _normalB, _normalC, _intersectionPoint, _intersectionPointWorld, Mesh, BoxGeometry, UniformsUtils, default_vertex, default_fragment, ShaderMaterial, Camera, PerspectiveCamera, fov, aspect, CubeCamera, CubeTexture, WebGLCubeRenderTarget, _vector1, _vector2, _normalMatrix, Plane, _sphere$4, _vector$6, Frustum, PlaneGeometry, alphahash_fragment, alphahash_pars_fragment, alphamap_fragment, alphamap_pars_fragment, alphatest_fragment, alphatest_pars_fragment, aomap_fragment, aomap_pars_fragment, begin_vertex, beginnormal_vertex, bsdfs, iridescence_fragment, bumpmap_pars_fragment, clipping_planes_fragment, clipping_planes_pars_fragment, clipping_planes_pars_vertex, clipping_planes_vertex, color_fragment, color_pars_fragment, color_pars_vertex, color_vertex, common, cube_uv_reflection_fragment, defaultnormal_vertex, displacementmap_pars_vertex, displacementmap_vertex, emissivemap_fragment, emissivemap_pars_fragment, colorspace_fragment, colorspace_pars_fragment, envmap_fragment, envmap_common_pars_fragment, envmap_pars_fragment, envmap_pars_vertex, envmap_vertex, fog_vertex, fog_pars_vertex, fog_fragment, fog_pars_fragment, gradientmap_pars_fragment, lightmap_fragment, lightmap_pars_fragment, lights_lambert_fragment, lights_lambert_pars_fragment, lights_pars_begin, envmap_physical_pars_fragment, lights_toon_fragment, lights_toon_pars_fragment, lights_phong_fragment, lights_phong_pars_fragment, lights_physical_fragment, lights_physical_pars_fragment, lights_fragment_begin, lights_fragment_maps, lights_fragment_end, logdepthbuf_fragment, logdepthbuf_pars_fragment, logdepthbuf_pars_vertex, logdepthbuf_vertex, map_fragment, map_pars_fragment, map_particle_fragment, map_particle_pars_fragment, metalnessmap_fragment, metalnessmap_pars_fragment, morphcolor_vertex, morphnormal_vertex, morphtarget_pars_vertex, morphtarget_vertex, normal_fragment_begin, normal_fragment_maps, normal_pars_fragment, normal_pars_vertex, normal_vertex, normalmap_pars_fragment, clearcoat_normal_fragment_begin, clearcoat_normal_fragment_maps, clearcoat_pars_fragment, iridescence_pars_fragment, opaque_fragment, packing, premultiplied_alpha_fragment, project_vertex, dithering_fragment, dithering_pars_fragment, roughnessmap_fragment, roughnessmap_pars_fragment, shadowmap_pars_fragment, shadowmap_pars_vertex, shadowmap_vertex, shadowmask_pars_fragment, skinbase_vertex, skinning_pars_vertex, skinning_vertex, skinnormal_vertex, specularmap_fragment, specularmap_pars_fragment, tonemapping_fragment, tonemapping_pars_fragment, transmission_fragment, transmission_pars_fragment, uv_pars_fragment, uv_pars_vertex, uv_vertex, worldpos_vertex, vertex$h, fragment$h, vertex$g, fragment$g, vertex$f, fragment$f, vertex$e, fragment$e, vertex$d, fragment$d, vertex$c, fragment$c, vertex$b, fragment$b, vertex$a, fragment$a, vertex$9, fragment$9, vertex$8, fragment$8, vertex$7, fragment$7, vertex$6, fragment$6, vertex$5, fragment$5, vertex$4, fragment$4, vertex$3, fragment$3, vertex$2, fragment$2, vertex$1, fragment$1, ShaderChunk, UniformsLib, ShaderLib, _rgb, OrthographicCamera, LOD_MIN, EXTRA_LOD_SIGMA, MAX_SAMPLES, _flatCamera, _clearColor, _oldTarget, _oldActiveCubeFace, _oldActiveMipmapLevel, PHI, INV_PHI, _axisDirections, PMREMGenerator, emptyTexture, emptyArrayTexture, empty3dTexture, emptyCubeTexture, arrayCacheF32, arrayCacheI32, mat4array, mat3array, mat2array, SingleUniform, PureArrayUniform, StructuredUniform, RePathPart, WebGLUniforms, COMPLETION_STATUS_KHR, programIdCount, includePattern, shaderChunkMap, unrollLoopPattern, _id$1, WebGLShaderCache, WebGLShaderStage, nextVersion, MeshDepthMaterial, MeshDistanceMaterial, vertex, fragment, ArrayCamera, Group, _moveEvent, WebXRController, DepthTexture, WebXRManager, WebGLRenderer, WebGL1Renderer, Scene, InterleavedBuffer, _vector$5, InterleavedBufferAttribute, DataTexture, InstancedBufferAttribute, _instanceLocalMatrix, _instanceWorldMatrix, _instanceIntersects, _box3, _identity, _mesh, _sphere$2, InstancedMesh, LineBasicMaterial, _start$1, _end$1, _inverseMatrix$1, _ray$1, _sphere$1, Line, _start, _end, LineSegments, CanvasTexture, _v0, _v1$1, _normal, _triangle, EdgesGeometry, MeshStandardMaterial, Interpolant, CubicInterpolant, LinearInterpolant, DiscreteInterpolant, KeyframeTrack, BooleanKeyframeTrack, ColorKeyframeTrack, NumberKeyframeTrack, QuaternionLinearInterpolant, QuaternionKeyframeTrack, StringKeyframeTrack, VectorKeyframeTrack, LoadingManager, DefaultLoadingManager, Loader, _RESERVED_CHARS_RE, _reservedRe, _wordChar, _wordCharOrDot, _directoryRe, _nodeRe, _objectRe, _propertyRe, _trackRe, _supportedObjectNames, Composite, PropertyBinding, _controlInterpolantsResultBuffer, Uniform, Raycaster, Spherical, _vector$4, Box2, GridHelper, AxesHelper;
10992
10992
  var init_three_module = __esm({
10993
10993
  "../../node_modules/three/build/three.module.js"() {
10994
10994
  init_dirname();
@@ -23549,6 +23549,109 @@ var MineRender = (() => {
23549
23549
  return new this.constructor().copy(this);
23550
23550
  }
23551
23551
  };
23552
+ _vector$4 = /* @__PURE__ */ new Vector2();
23553
+ Box2 = class {
23554
+ constructor(min = new Vector2(Infinity, Infinity), max2 = new Vector2(-Infinity, -Infinity)) {
23555
+ this.isBox2 = true;
23556
+ this.min = min;
23557
+ this.max = max2;
23558
+ }
23559
+ set(min, max2) {
23560
+ this.min.copy(min);
23561
+ this.max.copy(max2);
23562
+ return this;
23563
+ }
23564
+ setFromPoints(points) {
23565
+ this.makeEmpty();
23566
+ for (let i4 = 0, il = points.length; i4 < il; i4++) {
23567
+ this.expandByPoint(points[i4]);
23568
+ }
23569
+ return this;
23570
+ }
23571
+ setFromCenterAndSize(center, size) {
23572
+ const halfSize = _vector$4.copy(size).multiplyScalar(0.5);
23573
+ this.min.copy(center).sub(halfSize);
23574
+ this.max.copy(center).add(halfSize);
23575
+ return this;
23576
+ }
23577
+ clone() {
23578
+ return new this.constructor().copy(this);
23579
+ }
23580
+ copy(box) {
23581
+ this.min.copy(box.min);
23582
+ this.max.copy(box.max);
23583
+ return this;
23584
+ }
23585
+ makeEmpty() {
23586
+ this.min.x = this.min.y = Infinity;
23587
+ this.max.x = this.max.y = -Infinity;
23588
+ return this;
23589
+ }
23590
+ isEmpty() {
23591
+ return this.max.x < this.min.x || this.max.y < this.min.y;
23592
+ }
23593
+ getCenter(target) {
23594
+ return this.isEmpty() ? target.set(0, 0) : target.addVectors(this.min, this.max).multiplyScalar(0.5);
23595
+ }
23596
+ getSize(target) {
23597
+ return this.isEmpty() ? target.set(0, 0) : target.subVectors(this.max, this.min);
23598
+ }
23599
+ expandByPoint(point) {
23600
+ this.min.min(point);
23601
+ this.max.max(point);
23602
+ return this;
23603
+ }
23604
+ expandByVector(vector) {
23605
+ this.min.sub(vector);
23606
+ this.max.add(vector);
23607
+ return this;
23608
+ }
23609
+ expandByScalar(scalar) {
23610
+ this.min.addScalar(-scalar);
23611
+ this.max.addScalar(scalar);
23612
+ return this;
23613
+ }
23614
+ containsPoint(point) {
23615
+ return point.x < this.min.x || point.x > this.max.x || point.y < this.min.y || point.y > this.max.y ? false : true;
23616
+ }
23617
+ containsBox(box) {
23618
+ return this.min.x <= box.min.x && box.max.x <= this.max.x && this.min.y <= box.min.y && box.max.y <= this.max.y;
23619
+ }
23620
+ getParameter(point, target) {
23621
+ return target.set(
23622
+ (point.x - this.min.x) / (this.max.x - this.min.x),
23623
+ (point.y - this.min.y) / (this.max.y - this.min.y)
23624
+ );
23625
+ }
23626
+ intersectsBox(box) {
23627
+ return box.max.x < this.min.x || box.min.x > this.max.x || box.max.y < this.min.y || box.min.y > this.max.y ? false : true;
23628
+ }
23629
+ clampPoint(point, target) {
23630
+ return target.copy(point).clamp(this.min, this.max);
23631
+ }
23632
+ distanceToPoint(point) {
23633
+ return this.clampPoint(point, _vector$4).distanceTo(point);
23634
+ }
23635
+ intersect(box) {
23636
+ this.min.max(box.min);
23637
+ this.max.min(box.max);
23638
+ if (this.isEmpty()) this.makeEmpty();
23639
+ return this;
23640
+ }
23641
+ union(box) {
23642
+ this.min.min(box.min);
23643
+ this.max.max(box.max);
23644
+ return this;
23645
+ }
23646
+ translate(offset) {
23647
+ this.min.add(offset);
23648
+ this.max.add(offset);
23649
+ return this;
23650
+ }
23651
+ equals(box) {
23652
+ return box.min.equals(this.min) && box.max.equals(this.max);
23653
+ }
23654
+ };
23552
23655
  GridHelper = class extends LineSegments {
23553
23656
  constructor(size = 10, divisions = 10, color1 = 4473924, color2 = 8947848) {
23554
23657
  color1 = new Color(color1);
@@ -33040,6 +33143,31 @@ var MineRender = (() => {
33040
33143
  alphaTest: 0.5
33041
33144
  });
33042
33145
  }
33146
+ static createGuiCanvasMaterial(canvas) {
33147
+ const material = new MeshBasicMaterial({
33148
+ map: Textures.createCanvasTexture(canvas),
33149
+ transparent: true,
33150
+ depthWrite: false,
33151
+ side: DoubleSide,
33152
+ toneMapped: false
33153
+ });
33154
+ material.onBeforeCompile = (shader) => {
33155
+ for (const [stage, direction] of [["vertex", "out"], ["fragment", "in"]]) {
33156
+ const chunk = `uv_pars_${stage}`;
33157
+ shader[`${stage}Shader`] = shader[`${stage}Shader`].replace(
33158
+ `#include <${chunk}>`,
33159
+ ShaderChunk[chunk].replace("varying vec2 vMapUv;", `
33160
+ #if __VERSION__ >= 300
33161
+ centroid ${direction} vec2 vMapUv;
33162
+ #else
33163
+ varying vec2 vMapUv;
33164
+ #endif
33165
+ `)
33166
+ );
33167
+ }
33168
+ };
33169
+ return material;
33170
+ }
33043
33171
  static createShadedCanvasMaterial(canvas, transparent = false, shade = false) {
33044
33172
  const vertShader = `
33045
33173
  uniform bool SHADE;
@@ -78554,6 +78682,10 @@ ${key}` : key;
78554
78682
  async init() {
78555
78683
  }
78556
78684
  notifyDirty() {
78685
+ this.traverseAncestors((parent) => {
78686
+ const scene = parent;
78687
+ if (scene.isMineRenderScene) scene.dirty = true;
78688
+ });
78557
78689
  this.dispatchEvent(changeEvent);
78558
78690
  }
78559
78691
  //<editor-fold desc="GROUPS">
@@ -78897,6 +79029,7 @@ ${key}` : key;
78897
79029
  } else {
78898
79030
  object.visible = !object.visible;
78899
79031
  }
79032
+ this.notifyDirty();
78900
79033
  return object.visible;
78901
79034
  }
78902
79035
  this.notifyDirty();
@@ -78929,8 +79062,8 @@ ${key}` : key;
78929
79062
  this.notifyDirty();
78930
79063
  }
78931
79064
  removeFromScene() {
78932
- this._scene?.remove(this);
78933
79065
  this.notifyDirty();
79066
+ this.removeFromParent();
78934
79067
  }
78935
79068
  //</editor-fold>
78936
79069
  };
@@ -82816,6 +82949,7 @@ ${key}` : key;
82816
82949
  Env: () => Env,
82817
82950
  FluidModelObject: () => FluidModelObject,
82818
82951
  Geometries: () => Geometries,
82952
+ GuiHelper: () => GuiHelper,
82819
82953
  GuiLight: () => GuiLight,
82820
82954
  GuiObject: () => GuiObject,
82821
82955
  HostedAssetSource: () => HostedAssetSource,
@@ -82893,6 +83027,7 @@ ${key}` : key;
82893
83027
  isDisposable: () => isDisposable,
82894
83028
  isDoubleArray: () => isDoubleArray,
82895
83029
  isEntityObject: () => isEntityObject,
83030
+ isGuiObject: () => isGuiObject,
82896
83031
  isInstanceManager: () => isInstanceManager,
82897
83032
  isInstanceReference: () => isInstanceReference,
82898
83033
  isInstanceable: () => isInstanceable,
@@ -83569,6 +83704,22 @@ ${key}` : key;
83569
83704
  init_buffer2();
83570
83705
  init_process2();
83571
83706
 
83707
+ // src/gui/GuiHelper.ts
83708
+ init_dirname();
83709
+ init_buffer2();
83710
+ init_process2();
83711
+ var GuiHelper = class {
83712
+ static inventorySlot(slot, origin = [0, 0], offset = [18, 18], rowSize = 9) {
83713
+ const [column, row] = typeof slot === "number" ? [slot % rowSize, Math.floor(slot / rowSize)] : slot;
83714
+ return [origin[0] + column * offset[0], origin[1] + row * offset[1]];
83715
+ }
83716
+ };
83717
+
83718
+ // src/gui/GuiLayer.ts
83719
+ init_dirname();
83720
+ init_buffer2();
83721
+ init_process2();
83722
+
83572
83723
  // src/gui/scene/index.ts
83573
83724
  init_dirname();
83574
83725
  init_buffer2();
@@ -83578,10 +83729,91 @@ ${key}` : key;
83578
83729
  init_dirname();
83579
83730
  init_buffer2();
83580
83731
  init_process2();
83732
+ init_three_module();
83733
+ init_AssetKey();
83734
+ init_ModelTextures();
83735
+ init_Caching();
83581
83736
  init_SceneObject();
83737
+ init_Materials();
83582
83738
  var GuiObject = class extends SceneObject {
83583
- //TODO
83739
+ constructor(textureLayers, options) {
83740
+ super({ ...options, instanceMeshes: false, mergeMeshes: false });
83741
+ this.textureLayers = textureLayers;
83742
+ this.isGuiObject = true;
83743
+ /** Local bounds in GUI pixels, with y growing down from the origin. */
83744
+ this.bounds = new Box2();
83745
+ this.geometries = /* @__PURE__ */ new Set();
83746
+ this.ownedMaterials = /* @__PURE__ */ new Set();
83747
+ this.initialized = false;
83748
+ }
83749
+ async init() {
83750
+ if (this.initialized) return;
83751
+ try {
83752
+ for (const [index, layer] of this.textureLayers.entries()) {
83753
+ const key = typeof layer.texture === "string" ? AssetKey.parse("textures", layer.texture) : layer.texture;
83754
+ const material = await this.loadMaterial(key);
83755
+ const image = material.map.image;
83756
+ const [cropX, cropY, cropWidth, cropHeight] = layer.crop ?? [0, 0, image.width, image.height];
83757
+ const [width, height] = layer.size ?? [cropWidth, cropHeight];
83758
+ const [x4, y5] = layer.position ?? [0, 0];
83759
+ const geometry = new PlaneGeometry(width, height);
83760
+ this.geometries.add(geometry);
83761
+ const uv = geometry.getAttribute("uv");
83762
+ for (let i4 = 0; i4 < uv.count; i4++) {
83763
+ uv.setXY(
83764
+ i4,
83765
+ (cropX + uv.getX(i4) * cropWidth) / image.width,
83766
+ 1 - (cropY + (1 - uv.getY(i4)) * cropHeight) / image.height
83767
+ );
83768
+ }
83769
+ const mesh = new Mesh(geometry, material);
83770
+ mesh.name = `mesh:${layer.name ?? index}`;
83771
+ mesh.position.set(x4 + width / 2, -y5 - height / 2, 0);
83772
+ mesh.renderOrder = index;
83773
+ this.add(mesh);
83774
+ this.bounds.expandByPoint(new Vector2(x4, y5));
83775
+ this.bounds.expandByPoint(new Vector2(x4 + width, y5 + height));
83776
+ }
83777
+ this.initialized = true;
83778
+ this.notifyDirty();
83779
+ } catch (error) {
83780
+ this.disposeAndRemoveAllChildren();
83781
+ throw error;
83782
+ }
83783
+ }
83784
+ async loadMaterial(key) {
83785
+ const assetKey = key.serialize();
83786
+ const materialKey = `gui:${assetKey}`;
83787
+ const cached2 = Caching.materialCache.getIfPresent(materialKey);
83788
+ if (cached2) return cached2;
83789
+ const pending = ModelTextures.get(key);
83790
+ const cachedAsset = Caching.textureAssetCache.getIfPresent(assetKey);
83791
+ const image = await pending;
83792
+ if (!image) throw new Error(`Could not load GUI texture ${key.toNamespacedString()}`);
83793
+ const create = () => Materials.createGuiCanvasMaterial(image.data.canvas);
83794
+ if (cachedAsset && Caching.textureAssetCache.getIfPresent(assetKey) === cachedAsset) {
83795
+ return Caching.materialCache.get(materialKey, create);
83796
+ }
83797
+ const material = create();
83798
+ this.ownedMaterials.add(material);
83799
+ return material;
83800
+ }
83801
+ disposeAndRemoveAllChildren() {
83802
+ for (const geometry of this.geometries) geometry.dispose();
83803
+ this.geometries.clear();
83804
+ for (const material of this.ownedMaterials) {
83805
+ material.map.dispose();
83806
+ material.dispose();
83807
+ }
83808
+ this.ownedMaterials.clear();
83809
+ this.bounds.makeEmpty();
83810
+ this.initialized = false;
83811
+ super.disposeAndRemoveAllChildren();
83812
+ }
83584
83813
  };
83814
+ function isGuiObject(obj) {
83815
+ return obj.isGuiObject;
83816
+ }
83585
83817
 
83586
83818
  // src/index.ts
83587
83819
  init_image();
@@ -87626,6 +87858,14 @@ ${key}` : key;
87626
87858
  async addEntity(entity, options, parent = this) {
87627
87859
  return this.addSceneObject(entity, () => new EntityObject(entity, options), options, parent);
87628
87860
  }
87861
+ async addGui(layers, options, parent = this) {
87862
+ const obj = new GuiObject(layers, options);
87863
+ obj.scene = this;
87864
+ await obj.init();
87865
+ parent.add(obj);
87866
+ this.dirty = true;
87867
+ return obj;
87868
+ }
87629
87869
  };
87630
87870
  _MineRenderScene.DEFAULT_OPTIONS = (0, import_ts_deepmerge8.default)({}, {});
87631
87871
  var MineRenderScene = _MineRenderScene;