@tresjs/cientos 5.8.1 → 5.9.0
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/trescientos.d.ts +3185 -8274
- package/dist/trescientos.js +1011 -157
- package/package.json +4 -3
package/dist/trescientos.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* name: @tresjs/cientos
|
|
3
|
-
* version: v5.
|
|
3
|
+
* version: v5.9.0
|
|
4
4
|
* (c) 2026
|
|
5
5
|
* description: Collection of useful helpers and fully functional, ready-made abstractions for Tres
|
|
6
6
|
* author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)
|
|
7
7
|
*/
|
|
8
|
-
import { Fragment, Suspense, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, inject, isReactive, isRef, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, onUnmounted, openBlock, provide, reactive, ref, render, renderList, renderSlot, shallowReactive, shallowRef, toDisplayString, toRaw, toRefs, toValue, triggerRef, unref, useAttrs, useSlots, useTemplateRef, vShow, watch, watchEffect, withAsyncContext, withCtx, withDirectives, withModifiers } from "vue";
|
|
9
|
-
import { buildGraph, createTimer, extend, isObject3D, logError, logWarning, normalizeColor, normalizeVectorFlexibleParam, useLoader, useLoop, useTres, useTresContext } from "@tresjs/core";
|
|
8
|
+
import { Fragment, Suspense, Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, inject, isReactive, isRef, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, openBlock, provide, reactive, ref, render, renderList, renderSlot, shallowReactive, shallowRef, toDisplayString, toRaw, toRefs, toValue, triggerRef, unref, useAttrs, useSlots, useTemplateRef, vShow, watch, watchEffect, withAsyncContext, withCtx, withDirectives, withModifiers } from "vue";
|
|
9
|
+
import { INJECTION_KEY, TresPortal, buildGraph, createTimer, extend, isObject3D, logError, logWarning, normalizeColor, normalizeVectorFlexibleParam, useLoader, useLoop, useTres, useTresContext } from "@tresjs/core";
|
|
10
10
|
import * as THREE from "three";
|
|
11
|
-
import { AdditiveBlending, AlwaysStencilFunc, AnimationMixer, Audio, AudioListener, AudioLoader, BackSide, Box2, Box3, BoxGeometry, BufferAttribute, BufferGeometry, Camera, CatmullRomCurve3, ClampToEdgeWrapping, Color, CubeCamera, CubeReflectionMapping, CubeTextureLoader, CubicBezierCurve3, DataTexture, DefaultLoadingManager, DepthTexture, DirectionalLight, DoubleSide, EdgesGeometry, EqualStencilFunc, EquirectangularReflectionMapping, Euler, FloatType, FramebufferTexture, FrontSide, Group, HalfFloatType, IcosahedronGeometry, InstancedMesh, InterleavedBuffer, InterleavedBufferAttribute, KeepStencilOp, LOD, LinearFilter, MOUSE, MathUtils, Matrix4, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshLambertMaterial, MeshPhysicalMaterial, MeshStandardMaterial, NearestFilter, NoBlending, NoToneMapping, NotEqualStencilFunc, Object3D, OrthographicCamera, PerspectiveCamera, Plane, PlaneGeometry, Points, PointsMaterial, QuadraticBezierCurve3, Quaternion, REVISION, RGBAFormat, RawShaderMaterial, Raycaster, RepeatWrapping, ReplaceStencilOp, Scene, ShaderChunk, ShaderMaterial, ShapeGeometry, SkinnedMesh, Sphere, Spherical, TOUCH, TangentSpaceNormalMap, Texture, TextureLoader, UVMapping, Uniform, UniformsUtils, UnsignedByteType, Vector2, Vector3, Vector4, VideoTexture, WebGLCubeRenderTarget, WebGLRenderTarget, WebGLRenderer } from "three";
|
|
11
|
+
import { AdditiveBlending, AlwaysStencilFunc, AnimationMixer, Audio, AudioListener, AudioLoader, BackSide, Box2, Box3, BoxGeometry, BufferAttribute, BufferGeometry, Camera, CatmullRomCurve3, ClampToEdgeWrapping, Color, CubeCamera, CubeReflectionMapping, CubeTextureLoader, CubicBezierCurve3, DataTexture, DefaultLoadingManager, DepthTexture, DirectionalLight, DoubleSide, DynamicDrawUsage, EdgesGeometry, EqualStencilFunc, EquirectangularReflectionMapping, Euler, FloatType, FramebufferTexture, FrontSide, Group, HalfFloatType, IcosahedronGeometry, InstancedBufferAttribute, InstancedMesh, InterleavedBuffer, InterleavedBufferAttribute, KeepStencilOp, LOD, LinearFilter, MOUSE, MathUtils, Matrix4, Mesh, MeshBasicMaterial, MeshDepthMaterial, MeshLambertMaterial, MeshPhysicalMaterial, MeshStandardMaterial, NearestFilter, NoBlending, NoToneMapping, NotEqualStencilFunc, Object3D, OrthographicCamera, PerspectiveCamera, Plane, PlaneGeometry, Points, PointsMaterial, QuadraticBezierCurve3, Quaternion, REVISION, RGBAFormat, RawShaderMaterial, Raycaster, RepeatWrapping, ReplaceStencilOp, Scene, ShaderChunk, ShaderMaterial, ShapeGeometry, SkinnedMesh, Sphere, Spherical, TOUCH, TangentSpaceNormalMap, Texture, TextureLoader, UVMapping, Uniform, UniformsUtils, UnsignedByteType, Vector2, Vector3, Vector4, VideoTexture, WebGLCubeRenderTarget, WebGLRenderTarget, WebGLRenderer } from "three";
|
|
12
12
|
import { onKeyStroke, tryOnScopeDispose, useDebounceFn, useDraggable, useElementSize, useEventListener, useMagicKeys, useMouse, useResizeObserver, useScroll, useWindowScroll, useWindowSize, watchThrottled, whenever } from "@vueuse/core";
|
|
13
|
-
import { DRACOLoader, DecalGeometry, FBXLoader, FontLoader, GLTFExporter, GLTFLoader, HorizontalBlurShader, Line2, LineGeometry, LineMaterial, MapControls, MarchingCubes, MeshSurfaceSampler, OrbitControls, PointerLockControls, PositionalAudioHelper, RGBELoader, Reflector, RoundedBoxGeometry, SVGLoader, SimplexNoise, Sky, TextGeometry, TransformControls, VerticalBlurShader, Water, toCreasedNormals } from "three-stdlib";
|
|
13
|
+
import { DRACOLoader, DecalGeometry, FBXLoader, FontLoader, GLTFExporter, GLTFLoader, HorizontalBlurShader, Line2, LineGeometry, LineMaterial, MapControls, MarchingCubes, MeshSurfaceSampler, OrbitControls, PointerLockControls, PositionalAudioHelper, RGBELoader, Reflector, Refractor, RoundedBoxGeometry, SVGLoader, SimplexNoise, Sky, TextGeometry, TransformControls, VerticalBlurShader, Water, toCreasedNormals } from "three-stdlib";
|
|
14
14
|
import BaseCameraControls, { default as CameraControls } from "camera-controls";
|
|
15
15
|
import StatsImpl from "stats.js";
|
|
16
16
|
import StatsGlImpl from "stats-gl";
|
|
@@ -1162,12 +1162,12 @@ function useDecalEditor() {
|
|
|
1162
1162
|
|
|
1163
1163
|
//#endregion
|
|
1164
1164
|
//#region src/core/abstractions/Decal/DecalItem.vue?vue&type=script&setup=true&lang.ts
|
|
1165
|
-
const _hoisted_1$
|
|
1165
|
+
const _hoisted_1$67 = [
|
|
1166
1166
|
"name",
|
|
1167
1167
|
"render-order",
|
|
1168
1168
|
"material-polygonOffsetFactor"
|
|
1169
1169
|
];
|
|
1170
|
-
const _hoisted_2$
|
|
1170
|
+
const _hoisted_2$32 = [
|
|
1171
1171
|
"geometry",
|
|
1172
1172
|
"visible",
|
|
1173
1173
|
"name"
|
|
@@ -1389,7 +1389,7 @@ var DecalItem_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
|
|
|
1389
1389
|
color: __props.edgeColor,
|
|
1390
1390
|
"depth-test": false,
|
|
1391
1391
|
transparent: true
|
|
1392
|
-
}, null, 8, _hoisted_3$9)], 8, _hoisted_2$
|
|
1392
|
+
}, null, 8, _hoisted_3$9)], 8, _hoisted_2$32)) : createCommentVNode("v-if", true)], 40, _hoisted_1$67);
|
|
1393
1393
|
};
|
|
1394
1394
|
}
|
|
1395
1395
|
});
|
|
@@ -1400,7 +1400,7 @@ var DecalItem_default = DecalItem_vue_vue_type_script_setup_true_lang_default;
|
|
|
1400
1400
|
|
|
1401
1401
|
//#endregion
|
|
1402
1402
|
//#region src/core/abstractions/Decal/DecalEditor.vue?vue&type=script&setup=true&lang.ts
|
|
1403
|
-
const _hoisted_1$
|
|
1403
|
+
const _hoisted_1$66 = ["visible"];
|
|
1404
1404
|
const DRAG_THRESHOLD_SQ = 25;
|
|
1405
1405
|
var DecalEditor_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
1406
1406
|
__name: "DecalEditor",
|
|
@@ -1683,7 +1683,7 @@ var DecalEditor_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
|
|
|
1683
1683
|
color: "#0000ff",
|
|
1684
1684
|
"depth-test": false,
|
|
1685
1685
|
transparent: true
|
|
1686
|
-
}, null, -1)])], 8, _hoisted_1$
|
|
1686
|
+
}, null, -1)])], 8, _hoisted_1$66), renderSlot(_ctx.$slots, "default")], 64);
|
|
1687
1687
|
};
|
|
1688
1688
|
}
|
|
1689
1689
|
});
|
|
@@ -2141,11 +2141,11 @@ function getTextureLabel(tex) {
|
|
|
2141
2141
|
|
|
2142
2142
|
//#endregion
|
|
2143
2143
|
//#region src/core/abstractions/Decal/DebugUI/Handle.vue?vue&type=script&setup=true&lang.ts
|
|
2144
|
-
const _hoisted_1$
|
|
2144
|
+
const _hoisted_1$65 = {
|
|
2145
2145
|
class: "snap-vignette",
|
|
2146
2146
|
"aria-hidden": "true"
|
|
2147
2147
|
};
|
|
2148
|
-
const _hoisted_2$
|
|
2148
|
+
const _hoisted_2$31 = {
|
|
2149
2149
|
class: "snap-ticks",
|
|
2150
2150
|
viewBox: "0 0 100 100",
|
|
2151
2151
|
"aria-hidden": "true"
|
|
@@ -2340,8 +2340,8 @@ var Handle_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineC
|
|
|
2340
2340
|
style: normalizeStyle(innerStyle.value),
|
|
2341
2341
|
class: "handle-inner"
|
|
2342
2342
|
}, [
|
|
2343
|
-
withDirectives(createElementVNode("div", _hoisted_1$
|
|
2344
|
-
withDirectives((openBlock(), createElementBlock("svg", _hoisted_2$
|
|
2343
|
+
withDirectives(createElementVNode("div", _hoisted_1$65, null, 512), [[vShow, unref(isSnapEnabled)]]),
|
|
2344
|
+
withDirectives((openBlock(), createElementBlock("svg", _hoisted_2$31, [(openBlock(true), createElementBlock(Fragment, null, renderList(snapTicks.value, (angle, i) => {
|
|
2345
2345
|
return openBlock(), createElementBlock("g", {
|
|
2346
2346
|
key: i,
|
|
2347
2347
|
transform: `rotate(${angle} 50 50)`
|
|
@@ -2378,11 +2378,11 @@ var Handle_default = Handle_vue_vue_type_script_setup_true_lang_default;
|
|
|
2378
2378
|
|
|
2379
2379
|
//#endregion
|
|
2380
2380
|
//#region src/core/abstractions/Decal/DebugUI/Dock.vue?vue&type=script&setup=true&lang.ts
|
|
2381
|
-
const _hoisted_1$
|
|
2381
|
+
const _hoisted_1$64 = {
|
|
2382
2382
|
key: 0,
|
|
2383
2383
|
class: "dock"
|
|
2384
2384
|
};
|
|
2385
|
-
const _hoisted_2$
|
|
2385
|
+
const _hoisted_2$30 = {
|
|
2386
2386
|
key: 0,
|
|
2387
2387
|
class: "tint-popover",
|
|
2388
2388
|
role: "dialog",
|
|
@@ -2555,7 +2555,7 @@ var Dock_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
2555
2555
|
return openBlock(), createElementBlock("div", { class: normalizeClass(["dock-stack", isVisible.value ? "is-visible" : ""]) }, [
|
|
2556
2556
|
createCommentVNode(" Top row: edit-only tools, slides in/out as edits start/end. "),
|
|
2557
2557
|
createVNode(Transition, { name: "edit-dock" }, {
|
|
2558
|
-
default: withCtx(() => [isEditing.value && !isDraggingTexture.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2558
|
+
default: withCtx(() => [isEditing.value && !isDraggingTexture.value ? (openBlock(), createElementBlock("div", _hoisted_1$64, [
|
|
2559
2559
|
createElementVNode("button", {
|
|
2560
2560
|
class: normalizeClass(["icon-btn", { "is-active": unref(isSnapEnabled) }]),
|
|
2561
2561
|
title: "Snap rotation (15°)",
|
|
@@ -2641,7 +2641,7 @@ var Dock_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
2641
2641
|
key: 0,
|
|
2642
2642
|
class: "tint-swatch",
|
|
2643
2643
|
style: normalizeStyle({ backgroundColor: editingColor.value })
|
|
2644
|
-
}, null, 4)) : createCommentVNode("v-if", true)], 2), isTintOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
2644
|
+
}, null, 4)) : createCommentVNode("v-if", true)], 2), isTintOpen.value ? (openBlock(), createElementBlock("div", _hoisted_2$30, [
|
|
2645
2645
|
createElementVNode("div", _hoisted_3$7, [
|
|
2646
2646
|
_cache[10] || (_cache[10] = createElementVNode("span", { class: "tint-row__label" }, "Color", -1)),
|
|
2647
2647
|
createElementVNode("input", {
|
|
@@ -2925,8 +2925,8 @@ var Dock_default = Dock_vue_vue_type_script_setup_true_lang_default;
|
|
|
2925
2925
|
|
|
2926
2926
|
//#endregion
|
|
2927
2927
|
//#region src/core/abstractions/Decal/DebugUI/LayerList.vue?vue&type=script&setup=true&lang.ts
|
|
2928
|
-
const _hoisted_1$
|
|
2929
|
-
const _hoisted_2$
|
|
2928
|
+
const _hoisted_1$63 = { class: "dock decal-list" };
|
|
2929
|
+
const _hoisted_2$29 = { class: "list-header" };
|
|
2930
2930
|
const _hoisted_3$6 = { class: "list-header__count" };
|
|
2931
2931
|
const _hoisted_4$4 = {
|
|
2932
2932
|
key: 0,
|
|
@@ -3095,8 +3095,8 @@ var LayerList_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
|
|
|
3095
3095
|
dragOverPosition.value = null;
|
|
3096
3096
|
}
|
|
3097
3097
|
return (_ctx, _cache) => {
|
|
3098
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
3099
|
-
createElementVNode("header", _hoisted_2$
|
|
3098
|
+
return openBlock(), createElementBlock("div", _hoisted_1$63, [
|
|
3099
|
+
createElementVNode("header", _hoisted_2$29, [_cache[2] || (_cache[2] = createElementVNode("span", { class: "list-header__title" }, "Layers", -1)), createElementVNode("span", _hoisted_3$6, toDisplayString(totalCount.value), 1)]),
|
|
3100
3100
|
totalCount.value === 0 ? (openBlock(), createElementBlock("div", _hoisted_4$4, " No decals yet ")) : createCommentVNode("v-if", true),
|
|
3101
3101
|
(openBlock(true), createElementBlock(Fragment, null, renderList(groups.value, (group) => {
|
|
3102
3102
|
return openBlock(), createElementBlock("section", {
|
|
@@ -3386,7 +3386,7 @@ var DecalDebugUI_default = DecalDebugUI_vue_vue_type_script_setup_true_lang_defa
|
|
|
3386
3386
|
|
|
3387
3387
|
//#endregion
|
|
3388
3388
|
//#region src/core/abstractions/Edges.vue?vue&type=script&setup=true&lang.ts
|
|
3389
|
-
const _hoisted_1$
|
|
3389
|
+
const _hoisted_1$62 = ["color"];
|
|
3390
3390
|
var Edges_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
3391
3391
|
__name: "Edges",
|
|
3392
3392
|
props: {
|
|
@@ -3424,7 +3424,7 @@ var Edges_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
3424
3424
|
return openBlock(), createElementBlock("TresLineSegments", {
|
|
3425
3425
|
ref_key: "lineSegmentsRef",
|
|
3426
3426
|
ref: lineSegmentsRef
|
|
3427
|
-
}, [renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("TresLineBasicMaterial", { color: unref(color) }, null, 8, _hoisted_1$
|
|
3427
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("TresLineBasicMaterial", { color: unref(color) }, null, 8, _hoisted_1$62)])], 512);
|
|
3428
3428
|
};
|
|
3429
3429
|
}
|
|
3430
3430
|
});
|
|
@@ -3598,7 +3598,7 @@ var Levioso_default = Levioso_vue_vue_type_script_setup_true_lang_default;
|
|
|
3598
3598
|
|
|
3599
3599
|
//#endregion
|
|
3600
3600
|
//#region src/core/abstractions/Mask/component.vue?vue&type=script&setup=true&lang.ts
|
|
3601
|
-
const _hoisted_1$
|
|
3601
|
+
const _hoisted_1$61 = ["render-order"];
|
|
3602
3602
|
var component_vue_vue_type_script_setup_true_lang_default$18 = /* @__PURE__ */ defineComponent({
|
|
3603
3603
|
__name: "component",
|
|
3604
3604
|
props: {
|
|
@@ -3640,7 +3640,7 @@ var component_vue_vue_type_script_setup_true_lang_default$18 = /* @__PURE__ */ d
|
|
|
3640
3640
|
ref_key: "meshRef",
|
|
3641
3641
|
ref: meshRef,
|
|
3642
3642
|
"render-order": -props.id
|
|
3643
|
-
}, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$
|
|
3643
|
+
}, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$61);
|
|
3644
3644
|
};
|
|
3645
3645
|
}
|
|
3646
3646
|
});
|
|
@@ -4030,7 +4030,7 @@ var ScreenSizer_default = ScreenSizer_vue_vue_type_script_setup_true_lang_defaul
|
|
|
4030
4030
|
|
|
4031
4031
|
//#endregion
|
|
4032
4032
|
//#region src/core/abstractions/ScreenSpace.vue?vue&type=script&setup=true&lang.ts
|
|
4033
|
-
const _hoisted_1$
|
|
4033
|
+
const _hoisted_1$60 = ["position"];
|
|
4034
4034
|
var ScreenSpace_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
4035
4035
|
__name: "ScreenSpace",
|
|
4036
4036
|
props: {
|
|
@@ -4097,7 +4097,7 @@ var ScreenSpace_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
|
|
|
4097
4097
|
return openBlock(), createElementBlock("TresGroup", {
|
|
4098
4098
|
ref_key: "outerRef",
|
|
4099
4099
|
ref: outerRef
|
|
4100
|
-
}, [createElementVNode("TresGroup", { position: innerPosition.value }, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$
|
|
4100
|
+
}, [createElementVNode("TresGroup", { position: innerPosition.value }, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$60)], 512);
|
|
4101
4101
|
};
|
|
4102
4102
|
}
|
|
4103
4103
|
});
|
|
@@ -4124,6 +4124,392 @@ function useMask(id, inverse = false) {
|
|
|
4124
4124
|
return result;
|
|
4125
4125
|
}
|
|
4126
4126
|
|
|
4127
|
+
//#endregion
|
|
4128
|
+
//#region src/core/abstractions/Instances/const.ts
|
|
4129
|
+
const INSTANCES_INJECTION_KEY = Symbol("tresInstances");
|
|
4130
|
+
const MERGED_INJECTION_KEY = Symbol("tresMergedInstances");
|
|
4131
|
+
|
|
4132
|
+
//#endregion
|
|
4133
|
+
//#region src/core/abstractions/Instances/PositionMesh.ts
|
|
4134
|
+
const scratchMesh = new Mesh();
|
|
4135
|
+
const scratchIntersects = [];
|
|
4136
|
+
/**
|
|
4137
|
+
* Geometry-less placeholder standing in for a single instance of an `InstancedMesh`.
|
|
4138
|
+
*
|
|
4139
|
+
* It renders nothing (`Object3D` never enters the render list) but borrows its batch's
|
|
4140
|
+
* geometry and material while raycasting, so pointer events resolve to this node instead
|
|
4141
|
+
* of the whole batch.
|
|
4142
|
+
*/
|
|
4143
|
+
var PositionMesh = class extends Object3D {
|
|
4144
|
+
color = new Color("white");
|
|
4145
|
+
batch = null;
|
|
4146
|
+
raycast(raycaster, intersects) {
|
|
4147
|
+
const mesh = this.batch?.mesh.value;
|
|
4148
|
+
if (!mesh?.geometry || !mesh.material) return;
|
|
4149
|
+
scratchMesh.geometry = mesh.geometry;
|
|
4150
|
+
scratchMesh.material = mesh.material;
|
|
4151
|
+
scratchMesh.matrixWorld.copy(this.matrixWorld);
|
|
4152
|
+
scratchIntersects.length = 0;
|
|
4153
|
+
scratchMesh.raycast(raycaster, scratchIntersects);
|
|
4154
|
+
for (const hit of scratchIntersects) intersects.push({
|
|
4155
|
+
...hit,
|
|
4156
|
+
object: this
|
|
4157
|
+
});
|
|
4158
|
+
scratchIntersects.length = 0;
|
|
4159
|
+
}
|
|
4160
|
+
};
|
|
4161
|
+
|
|
4162
|
+
//#endregion
|
|
4163
|
+
//#region src/core/abstractions/Instances/Instance.vue?vue&type=script&setup=true&lang.ts
|
|
4164
|
+
const _hoisted_1$59 = ["object"];
|
|
4165
|
+
var Instance_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
4166
|
+
__name: "Instance",
|
|
4167
|
+
props: {
|
|
4168
|
+
batch: {
|
|
4169
|
+
type: String,
|
|
4170
|
+
required: false
|
|
4171
|
+
},
|
|
4172
|
+
name: {
|
|
4173
|
+
type: String,
|
|
4174
|
+
required: false
|
|
4175
|
+
},
|
|
4176
|
+
color: {
|
|
4177
|
+
type: [
|
|
4178
|
+
Object,
|
|
4179
|
+
String,
|
|
4180
|
+
Number
|
|
4181
|
+
],
|
|
4182
|
+
required: false
|
|
4183
|
+
}
|
|
4184
|
+
},
|
|
4185
|
+
setup(__props, { expose: __expose }) {
|
|
4186
|
+
const props = __props;
|
|
4187
|
+
const node = shallowRef(new PositionMesh());
|
|
4188
|
+
const merged = inject(MERGED_INJECTION_KEY, null);
|
|
4189
|
+
const single = inject(INSTANCES_INJECTION_KEY, null);
|
|
4190
|
+
const target = computed(() => props.batch ? merged?.[props.batch] ?? null : single);
|
|
4191
|
+
watch(target, (next, previous) => {
|
|
4192
|
+
previous?.unregister(node.value);
|
|
4193
|
+
node.value.batch = next;
|
|
4194
|
+
next?.register(node.value);
|
|
4195
|
+
if (next && props.color !== void 0) next.requestColorBuffer();
|
|
4196
|
+
}, { immediate: true });
|
|
4197
|
+
watch(() => props.color, (color) => {
|
|
4198
|
+
if (color === void 0) return;
|
|
4199
|
+
node.value.color.set(color);
|
|
4200
|
+
target.value?.requestColorBuffer();
|
|
4201
|
+
}, { immediate: true });
|
|
4202
|
+
watch(() => props.name, (name) => node.value.name = name ?? "", { immediate: true });
|
|
4203
|
+
onScopeDispose(() => target.value?.unregister(node.value));
|
|
4204
|
+
/**
|
|
4205
|
+
* A `PositionMesh` with no batch renders nothing and reports nothing, and the key a batch
|
|
4206
|
+
* registers under is not always the name of the mesh it came from, so a plausible-looking
|
|
4207
|
+
* `batch` fails silently. Checked a tick after mount, by which point a sibling `<Instances>`
|
|
4208
|
+
* has registered.
|
|
4209
|
+
*/
|
|
4210
|
+
onMounted(() => nextTick(() => {
|
|
4211
|
+
if (target.value) return;
|
|
4212
|
+
if (!merged && !single) {
|
|
4213
|
+
logWarning("Instance: no batch to join, so this renders nothing. An <Instance> belongs inside <Instances> or <Merged>.");
|
|
4214
|
+
return;
|
|
4215
|
+
}
|
|
4216
|
+
if (!merged) {
|
|
4217
|
+
logWarning(`Instance: \`batch\` picks a batch out of a <Merged>, and there is none above this one, so "${props.batch}" renders nothing. Drop \`batch\` to join the enclosing <Instances>.`);
|
|
4218
|
+
return;
|
|
4219
|
+
}
|
|
4220
|
+
if (!props.batch) {
|
|
4221
|
+
logWarning("Instance: <Merged> keys its batches, so an instance inside one needs a `batch` to pick one. This renders nothing.");
|
|
4222
|
+
return;
|
|
4223
|
+
}
|
|
4224
|
+
const available = Object.keys(merged);
|
|
4225
|
+
if (available.length > 0) logWarning(`Instance: no batch named "${props.batch}", so this renders nothing. Available: ${available.join(", ")}.`);
|
|
4226
|
+
}));
|
|
4227
|
+
__expose({ instance: node });
|
|
4228
|
+
return (_ctx, _cache) => {
|
|
4229
|
+
return openBlock(), createElementBlock("primitive", { object: node.value }, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$59);
|
|
4230
|
+
};
|
|
4231
|
+
}
|
|
4232
|
+
});
|
|
4233
|
+
|
|
4234
|
+
//#endregion
|
|
4235
|
+
//#region src/core/abstractions/Instances/Instance.vue
|
|
4236
|
+
var Instance_default = Instance_vue_vue_type_script_setup_true_lang_default;
|
|
4237
|
+
|
|
4238
|
+
//#endregion
|
|
4239
|
+
//#region src/core/abstractions/Instances/useInstancesBatch.ts
|
|
4240
|
+
function createMatrixAttribute(capacity) {
|
|
4241
|
+
const attribute = new InstancedBufferAttribute(new Float32Array(capacity * 16), 16);
|
|
4242
|
+
attribute.setUsage(DynamicDrawUsage);
|
|
4243
|
+
return attribute;
|
|
4244
|
+
}
|
|
4245
|
+
function createColorAttribute(capacity) {
|
|
4246
|
+
const attribute = new InstancedBufferAttribute(new Float32Array(capacity * 3).fill(1), 3);
|
|
4247
|
+
attribute.setUsage(DynamicDrawUsage);
|
|
4248
|
+
return attribute;
|
|
4249
|
+
}
|
|
4250
|
+
const scratchColor = [
|
|
4251
|
+
0,
|
|
4252
|
+
0,
|
|
4253
|
+
0
|
|
4254
|
+
];
|
|
4255
|
+
/**
|
|
4256
|
+
* Writes `source` into `target` at `offset`, reporting whether anything actually moved.
|
|
4257
|
+
*
|
|
4258
|
+
* `Math.fround` is load-bearing: `target` narrows to float32 on write, so comparing raw
|
|
4259
|
+
* doubles against it reports a change every frame for values float32 can't represent.
|
|
4260
|
+
*/
|
|
4261
|
+
function writeIfChanged(target, offset, source, length) {
|
|
4262
|
+
let changed = false;
|
|
4263
|
+
for (let i = 0; i < length; i++) {
|
|
4264
|
+
const value = Math.fround(source[i]);
|
|
4265
|
+
if (target[offset + i] !== value) {
|
|
4266
|
+
target[offset + i] = value;
|
|
4267
|
+
changed = true;
|
|
4268
|
+
}
|
|
4269
|
+
}
|
|
4270
|
+
return changed;
|
|
4271
|
+
}
|
|
4272
|
+
/**
|
|
4273
|
+
* Owns a single `InstancedMesh` and the placeholders registered against it.
|
|
4274
|
+
*
|
|
4275
|
+
* The registry identity is stable across geometry/material/limit changes, so descendants
|
|
4276
|
+
* that injected it stay bound when the underlying mesh is rebuilt.
|
|
4277
|
+
*/
|
|
4278
|
+
function useInstancesBatch(source) {
|
|
4279
|
+
const mesh = shallowRef(null);
|
|
4280
|
+
const nodes = [];
|
|
4281
|
+
const parentInverse = new Matrix4();
|
|
4282
|
+
const instanceMatrix = new Matrix4();
|
|
4283
|
+
let capacity = 0;
|
|
4284
|
+
let hasColors = false;
|
|
4285
|
+
function disposeMesh() {
|
|
4286
|
+
const current = mesh.value;
|
|
4287
|
+
if (!current) return;
|
|
4288
|
+
current.instanceMatrix.dispose();
|
|
4289
|
+
current.instanceColor?.dispose();
|
|
4290
|
+
current.dispose();
|
|
4291
|
+
mesh.value = null;
|
|
4292
|
+
}
|
|
4293
|
+
function build() {
|
|
4294
|
+
disposeMesh();
|
|
4295
|
+
const { geometry, material, limit } = source();
|
|
4296
|
+
capacity = Math.max(1, Math.floor(limit), nodes.length);
|
|
4297
|
+
const next = new InstancedMesh(geometry, material, capacity);
|
|
4298
|
+
next.instanceMatrix = createMatrixAttribute(capacity);
|
|
4299
|
+
next.count = 0;
|
|
4300
|
+
next.frustumCulled = false;
|
|
4301
|
+
next.raycast = () => null;
|
|
4302
|
+
if (hasColors) next.instanceColor = createColorAttribute(capacity);
|
|
4303
|
+
mesh.value = next;
|
|
4304
|
+
}
|
|
4305
|
+
function grow(needed) {
|
|
4306
|
+
const current = mesh.value;
|
|
4307
|
+
if (!current || needed <= capacity) return;
|
|
4308
|
+
const next = Math.max(needed, capacity * 2);
|
|
4309
|
+
const matrixAttribute = createMatrixAttribute(next);
|
|
4310
|
+
matrixAttribute.array.set(current.instanceMatrix.array);
|
|
4311
|
+
current.instanceMatrix.dispose();
|
|
4312
|
+
current.instanceMatrix = matrixAttribute;
|
|
4313
|
+
if (current.instanceColor) {
|
|
4314
|
+
const colorAttribute = createColorAttribute(next);
|
|
4315
|
+
colorAttribute.array.set(current.instanceColor.array);
|
|
4316
|
+
current.instanceColor.dispose();
|
|
4317
|
+
current.instanceColor = colorAttribute;
|
|
4318
|
+
}
|
|
4319
|
+
capacity = next;
|
|
4320
|
+
logWarning(`Instances: more instances registered than \`limit\` allows, reallocated for ${next}. Set \`:limit="${next}"\` to avoid reallocating at runtime.`);
|
|
4321
|
+
}
|
|
4322
|
+
const api = {
|
|
4323
|
+
mesh,
|
|
4324
|
+
register(node) {
|
|
4325
|
+
nodes.push(node);
|
|
4326
|
+
grow(nodes.length);
|
|
4327
|
+
},
|
|
4328
|
+
unregister(node) {
|
|
4329
|
+
const index = nodes.indexOf(node);
|
|
4330
|
+
if (index !== -1) nodes.splice(index, 1);
|
|
4331
|
+
},
|
|
4332
|
+
requestColorBuffer() {
|
|
4333
|
+
if (hasColors) return;
|
|
4334
|
+
hasColors = true;
|
|
4335
|
+
const current = mesh.value;
|
|
4336
|
+
if (current && !current.instanceColor) current.instanceColor = createColorAttribute(capacity);
|
|
4337
|
+
}
|
|
4338
|
+
};
|
|
4339
|
+
function update() {
|
|
4340
|
+
const current = mesh.value;
|
|
4341
|
+
if (!current) return;
|
|
4342
|
+
current.updateWorldMatrix(true, false);
|
|
4343
|
+
parentInverse.copy(current.matrixWorld).invert();
|
|
4344
|
+
const colorAttribute = current.instanceColor;
|
|
4345
|
+
const matrices = current.instanceMatrix.array;
|
|
4346
|
+
const colors = colorAttribute?.array;
|
|
4347
|
+
let matricesChanged = false;
|
|
4348
|
+
let colorsChanged = false;
|
|
4349
|
+
let visible = 0;
|
|
4350
|
+
for (const node of nodes) {
|
|
4351
|
+
if (!node.visible) continue;
|
|
4352
|
+
node.updateWorldMatrix(true, false);
|
|
4353
|
+
instanceMatrix.multiplyMatrices(parentInverse, node.matrixWorld);
|
|
4354
|
+
matricesChanged = writeIfChanged(matrices, visible * 16, instanceMatrix.elements, 16) || matricesChanged;
|
|
4355
|
+
if (colors) {
|
|
4356
|
+
const { r, g, b } = node.color;
|
|
4357
|
+
scratchColor[0] = r;
|
|
4358
|
+
scratchColor[1] = g;
|
|
4359
|
+
scratchColor[2] = b;
|
|
4360
|
+
colorsChanged = writeIfChanged(colors, visible * 3, scratchColor, 3) || colorsChanged;
|
|
4361
|
+
}
|
|
4362
|
+
visible++;
|
|
4363
|
+
}
|
|
4364
|
+
current.count = visible;
|
|
4365
|
+
if (matricesChanged) current.instanceMatrix.needsUpdate = true;
|
|
4366
|
+
if (colorsChanged && colorAttribute) colorAttribute.needsUpdate = true;
|
|
4367
|
+
}
|
|
4368
|
+
watch(source, build, { immediate: true });
|
|
4369
|
+
onScopeDispose(disposeMesh);
|
|
4370
|
+
return {
|
|
4371
|
+
mesh,
|
|
4372
|
+
api,
|
|
4373
|
+
update
|
|
4374
|
+
};
|
|
4375
|
+
}
|
|
4376
|
+
|
|
4377
|
+
//#endregion
|
|
4378
|
+
//#region src/core/abstractions/Instances/Instances.vue?vue&type=script&setup=true&lang.ts
|
|
4379
|
+
const _hoisted_1$58 = [
|
|
4380
|
+
"object",
|
|
4381
|
+
"cast-shadow",
|
|
4382
|
+
"receive-shadow"
|
|
4383
|
+
];
|
|
4384
|
+
var Instances_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
4385
|
+
__name: "Instances",
|
|
4386
|
+
props: {
|
|
4387
|
+
geometry: {
|
|
4388
|
+
type: Object,
|
|
4389
|
+
required: true
|
|
4390
|
+
},
|
|
4391
|
+
material: {
|
|
4392
|
+
type: [Object, Array],
|
|
4393
|
+
required: true
|
|
4394
|
+
},
|
|
4395
|
+
limit: {
|
|
4396
|
+
type: Number,
|
|
4397
|
+
required: false,
|
|
4398
|
+
default: 1e3
|
|
4399
|
+
},
|
|
4400
|
+
batch: {
|
|
4401
|
+
type: String,
|
|
4402
|
+
required: false
|
|
4403
|
+
},
|
|
4404
|
+
name: {
|
|
4405
|
+
type: String,
|
|
4406
|
+
required: false
|
|
4407
|
+
},
|
|
4408
|
+
castShadow: {
|
|
4409
|
+
type: Boolean,
|
|
4410
|
+
required: false,
|
|
4411
|
+
default: false
|
|
4412
|
+
},
|
|
4413
|
+
receiveShadow: {
|
|
4414
|
+
type: Boolean,
|
|
4415
|
+
required: false,
|
|
4416
|
+
default: false
|
|
4417
|
+
}
|
|
4418
|
+
},
|
|
4419
|
+
setup(__props, { expose: __expose }) {
|
|
4420
|
+
const props = __props;
|
|
4421
|
+
const { mesh, api, update } = useInstancesBatch(() => ({
|
|
4422
|
+
geometry: props.geometry,
|
|
4423
|
+
material: props.material,
|
|
4424
|
+
limit: props.limit
|
|
4425
|
+
}));
|
|
4426
|
+
provide(INSTANCES_INJECTION_KEY, api);
|
|
4427
|
+
const merged = inject(MERGED_INJECTION_KEY, null);
|
|
4428
|
+
if (merged) {
|
|
4429
|
+
watch(() => props.batch, (batch, previous) => {
|
|
4430
|
+
if (previous) delete merged[previous];
|
|
4431
|
+
if (batch) merged[batch] = api;
|
|
4432
|
+
}, { immediate: true });
|
|
4433
|
+
onScopeDispose(() => {
|
|
4434
|
+
if (props.batch && merged[props.batch] === api) delete merged[props.batch];
|
|
4435
|
+
});
|
|
4436
|
+
}
|
|
4437
|
+
watch([mesh, () => props.name], ([current, name]) => {
|
|
4438
|
+
if (current) current.name = name ?? "";
|
|
4439
|
+
}, { immediate: true });
|
|
4440
|
+
useLoop().onBeforeRender(update);
|
|
4441
|
+
__expose({ instance: mesh });
|
|
4442
|
+
return (_ctx, _cache) => {
|
|
4443
|
+
return unref(mesh) ? (openBlock(), createElementBlock("primitive", {
|
|
4444
|
+
key: 0,
|
|
4445
|
+
object: unref(mesh),
|
|
4446
|
+
"cast-shadow": __props.castShadow,
|
|
4447
|
+
"receive-shadow": __props.receiveShadow
|
|
4448
|
+
}, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$58)) : createCommentVNode("v-if", true);
|
|
4449
|
+
};
|
|
4450
|
+
}
|
|
4451
|
+
});
|
|
4452
|
+
|
|
4453
|
+
//#endregion
|
|
4454
|
+
//#region src/core/abstractions/Instances/Instances.vue
|
|
4455
|
+
var Instances_default = Instances_vue_vue_type_script_setup_true_lang_default;
|
|
4456
|
+
|
|
4457
|
+
//#endregion
|
|
4458
|
+
//#region src/core/abstractions/Instances/Merged.vue?vue&type=script&setup=true&lang.ts
|
|
4459
|
+
var Merged_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
4460
|
+
__name: "Merged",
|
|
4461
|
+
props: {
|
|
4462
|
+
meshes: {
|
|
4463
|
+
type: Object,
|
|
4464
|
+
required: true
|
|
4465
|
+
},
|
|
4466
|
+
limit: {
|
|
4467
|
+
type: Number,
|
|
4468
|
+
required: false,
|
|
4469
|
+
default: 100
|
|
4470
|
+
},
|
|
4471
|
+
castShadow: {
|
|
4472
|
+
type: Boolean,
|
|
4473
|
+
required: false,
|
|
4474
|
+
default: false
|
|
4475
|
+
},
|
|
4476
|
+
receiveShadow: {
|
|
4477
|
+
type: Boolean,
|
|
4478
|
+
required: false,
|
|
4479
|
+
default: false
|
|
4480
|
+
}
|
|
4481
|
+
},
|
|
4482
|
+
setup(__props, { expose: __expose }) {
|
|
4483
|
+
const registry = shallowReactive({});
|
|
4484
|
+
provide(MERGED_INJECTION_KEY, registry);
|
|
4485
|
+
__expose({ instances: registry });
|
|
4486
|
+
return (_ctx, _cache) => {
|
|
4487
|
+
return openBlock(), createElementBlock(Fragment, null, [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.meshes, (mesh, key) => {
|
|
4488
|
+
return openBlock(), createBlock(Instances_default, {
|
|
4489
|
+
key,
|
|
4490
|
+
batch: key,
|
|
4491
|
+
geometry: mesh.geometry,
|
|
4492
|
+
material: mesh.material,
|
|
4493
|
+
limit: __props.limit,
|
|
4494
|
+
"cast-shadow": __props.castShadow,
|
|
4495
|
+
"receive-shadow": __props.receiveShadow
|
|
4496
|
+
}, null, 8, [
|
|
4497
|
+
"batch",
|
|
4498
|
+
"geometry",
|
|
4499
|
+
"material",
|
|
4500
|
+
"limit",
|
|
4501
|
+
"cast-shadow",
|
|
4502
|
+
"receive-shadow"
|
|
4503
|
+
]);
|
|
4504
|
+
}), 128)), renderSlot(_ctx.$slots, "default")], 64);
|
|
4505
|
+
};
|
|
4506
|
+
}
|
|
4507
|
+
});
|
|
4508
|
+
|
|
4509
|
+
//#endregion
|
|
4510
|
+
//#region src/core/abstractions/Instances/Merged.vue
|
|
4511
|
+
var Merged_default = Merged_vue_vue_type_script_setup_true_lang_default;
|
|
4512
|
+
|
|
4127
4513
|
//#endregion
|
|
4128
4514
|
//#region src/utils/types.ts
|
|
4129
4515
|
const isPerspectiveCamera$1 = (camera) => Boolean(camera && camera.isPerspectiveCamera);
|
|
@@ -4131,7 +4517,7 @@ const isOrthographicCamera$1 = (camera) => Boolean(camera && camera.isOrthograph
|
|
|
4131
4517
|
|
|
4132
4518
|
//#endregion
|
|
4133
4519
|
//#region src/core/controls/CameraControls.vue?vue&type=script&setup=true&lang.ts
|
|
4134
|
-
const _hoisted_1$
|
|
4520
|
+
const _hoisted_1$57 = [
|
|
4135
4521
|
"min-polar-angle",
|
|
4136
4522
|
"max-polar-angle",
|
|
4137
4523
|
"min-azimuth-angle",
|
|
@@ -4400,7 +4786,7 @@ var CameraControls_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
4400
4786
|
args: [__props.camera || unref(activeCamera), __props.domElement || unref(renderer).domElement],
|
|
4401
4787
|
"mouse-buttons": mouseButtons.value,
|
|
4402
4788
|
touches: touches.value
|
|
4403
|
-
}, null, 8, _hoisted_1$
|
|
4789
|
+
}, null, 8, _hoisted_1$57)) : createCommentVNode("v-if", true);
|
|
4404
4790
|
};
|
|
4405
4791
|
}
|
|
4406
4792
|
});
|
|
@@ -4448,7 +4834,8 @@ var KeyboardControls_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
|
|
|
4448
4834
|
});
|
|
4449
4835
|
const sidewardMove = ref(0);
|
|
4450
4836
|
const forwardMove = ref(0);
|
|
4451
|
-
const
|
|
4837
|
+
const verticalMove = ref(0);
|
|
4838
|
+
const { KeyW, KeyA, KeyS, KeyD, Up, Down, Left, Right, KeyQ, KeyE } = useMagicKeys();
|
|
4452
4839
|
watchEffect(() => {
|
|
4453
4840
|
if (KeyA.value || Left.value) sidewardMove.value = -moveSpeed.value;
|
|
4454
4841
|
else if (KeyD.value || Right.value) sidewardMove.value = moveSpeed.value;
|
|
@@ -4456,6 +4843,9 @@ var KeyboardControls_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
|
|
|
4456
4843
|
if (KeyW.value || Up.value) forwardMove.value = moveSpeed.value;
|
|
4457
4844
|
else if (KeyS.value || Down.value) forwardMove.value = -moveSpeed.value;
|
|
4458
4845
|
else forwardMove.value = 0;
|
|
4846
|
+
if (KeyE.value) verticalMove.value = moveSpeed.value;
|
|
4847
|
+
else if (KeyQ.value) verticalMove.value = -moveSpeed.value;
|
|
4848
|
+
else verticalMove.value = 0;
|
|
4459
4849
|
});
|
|
4460
4850
|
__expose({ instance: controls });
|
|
4461
4851
|
const isActive = (isLock) => {
|
|
@@ -4479,11 +4869,20 @@ var KeyboardControls_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
|
|
|
4479
4869
|
emit("change", controls.value);
|
|
4480
4870
|
}
|
|
4481
4871
|
};
|
|
4872
|
+
const moveUp = (movementSpeed) => {
|
|
4873
|
+
if (!activeCamera.value?.position) return;
|
|
4874
|
+
activeCamera.value.position.y += movementSpeed;
|
|
4875
|
+
if (verticalMove.value) {
|
|
4876
|
+
invalidate();
|
|
4877
|
+
emit("change", controls.value);
|
|
4878
|
+
}
|
|
4879
|
+
};
|
|
4482
4880
|
const { onBeforeRender } = useLoop();
|
|
4483
4881
|
onBeforeRender(({ delta }) => {
|
|
4484
4882
|
if (controls.value instanceof PointerLockControls && controls.value?.isLocked) {
|
|
4485
4883
|
moveForward(delta, forwardMove.value);
|
|
4486
4884
|
controls.value.moveRight(sidewardMove.value);
|
|
4885
|
+
moveUp(verticalMove.value);
|
|
4487
4886
|
}
|
|
4488
4887
|
});
|
|
4489
4888
|
return (_ctx, _cache) => {
|
|
@@ -4491,7 +4890,7 @@ var KeyboardControls_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
|
|
|
4491
4890
|
key: 0,
|
|
4492
4891
|
selector: __props.selector,
|
|
4493
4892
|
"make-default": __props.makeDefault,
|
|
4494
|
-
camera: __props.camera || unref(activeCamera),
|
|
4893
|
+
camera: __props.camera || unref(activeCamera)?.value,
|
|
4495
4894
|
"dom-element": __props.domElement || unref(renderer).domElement,
|
|
4496
4895
|
onIsLock: isActive,
|
|
4497
4896
|
onChange: hasChange
|
|
@@ -4568,7 +4967,7 @@ function useOrbitLikeControls(controlsRef, props, emit) {
|
|
|
4568
4967
|
|
|
4569
4968
|
//#endregion
|
|
4570
4969
|
//#region src/core/controls/MapControls.vue?vue&type=script&setup=true&lang.ts
|
|
4571
|
-
const _hoisted_1$
|
|
4970
|
+
const _hoisted_1$56 = [
|
|
4572
4971
|
"args",
|
|
4573
4972
|
"target",
|
|
4574
4973
|
"auto-rotate",
|
|
@@ -4756,7 +5155,7 @@ var MapControls_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
|
|
|
4756
5155
|
"rotate-speed": __props.rotateSpeed,
|
|
4757
5156
|
"mouse-buttons": __props.mouseButtons,
|
|
4758
5157
|
"screen-space-panning": __props.screenSpacePanning
|
|
4759
|
-
}, null, 8, _hoisted_1$
|
|
5158
|
+
}, null, 8, _hoisted_1$56)) : createCommentVNode("v-if", true);
|
|
4760
5159
|
};
|
|
4761
5160
|
}
|
|
4762
5161
|
});
|
|
@@ -4767,7 +5166,7 @@ var MapControls_default = MapControls_vue_vue_type_script_setup_true_lang_defaul
|
|
|
4767
5166
|
|
|
4768
5167
|
//#endregion
|
|
4769
5168
|
//#region src/core/controls/OrbitControls.vue?vue&type=script&setup=true&lang.ts
|
|
4770
|
-
const _hoisted_1$
|
|
5169
|
+
const _hoisted_1$55 = [
|
|
4771
5170
|
"args",
|
|
4772
5171
|
"target",
|
|
4773
5172
|
"auto-rotate",
|
|
@@ -4955,7 +5354,7 @@ var OrbitControls_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
4955
5354
|
"rotate-speed": __props.rotateSpeed,
|
|
4956
5355
|
"mouse-buttons": __props.mouseButtons,
|
|
4957
5356
|
"screen-space-panning": __props.screenSpacePanning
|
|
4958
|
-
}, null, 8, _hoisted_1$
|
|
5357
|
+
}, null, 8, _hoisted_1$55)) : createCommentVNode("v-if", true);
|
|
4959
5358
|
};
|
|
4960
5359
|
}
|
|
4961
5360
|
});
|
|
@@ -4966,7 +5365,7 @@ var OrbitControls_default = OrbitControls_vue_vue_type_script_setup_true_lang_de
|
|
|
4966
5365
|
|
|
4967
5366
|
//#endregion
|
|
4968
5367
|
//#region src/core/controls/PointerLockControls.vue?vue&type=script&setup=true&lang.ts
|
|
4969
|
-
const _hoisted_1$
|
|
5368
|
+
const _hoisted_1$54 = ["args"];
|
|
4970
5369
|
var PointerLockControls_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
4971
5370
|
__name: "PointerLockControls",
|
|
4972
5371
|
props: {
|
|
@@ -5038,7 +5437,7 @@ var PointerLockControls_vue_vue_type_script_setup_true_lang_default = /* @__PURE
|
|
|
5038
5437
|
ref_key: "controlsRef",
|
|
5039
5438
|
ref: controlsRef,
|
|
5040
5439
|
args: [__props.camera || unref(activeCamera), __props.domElement || unref(renderer).domElement]
|
|
5041
|
-
}, null, 8, _hoisted_1$
|
|
5440
|
+
}, null, 8, _hoisted_1$54)) : createCommentVNode("v-if", true);
|
|
5042
5441
|
};
|
|
5043
5442
|
}
|
|
5044
5443
|
});
|
|
@@ -5191,7 +5590,7 @@ var ScrollControls_default = ScrollControls_vue_vue_type_script_setup_true_lang_
|
|
|
5191
5590
|
|
|
5192
5591
|
//#endregion
|
|
5193
5592
|
//#region src/core/controls/TransformControls.vue?vue&type=script&setup=true&lang.ts
|
|
5194
|
-
const _hoisted_1$
|
|
5593
|
+
const _hoisted_1$53 = [
|
|
5195
5594
|
"object",
|
|
5196
5595
|
"args",
|
|
5197
5596
|
"mode",
|
|
@@ -5354,7 +5753,7 @@ var TransformControls_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
|
|
|
5354
5753
|
"show-y": unref(showY),
|
|
5355
5754
|
"show-z": unref(showZ),
|
|
5356
5755
|
visible: true
|
|
5357
|
-
}, null, 8, _hoisted_1$
|
|
5756
|
+
}, null, 8, _hoisted_1$53)) : createCommentVNode("v-if", true);
|
|
5358
5757
|
};
|
|
5359
5758
|
}
|
|
5360
5759
|
});
|
|
@@ -5762,7 +6161,7 @@ var RandomizedLights = class extends Group {
|
|
|
5762
6161
|
|
|
5763
6162
|
//#endregion
|
|
5764
6163
|
//#region src/core/light-shadow/RandomizedLights/component.vue?vue&type=script&setup=true&lang.ts
|
|
5765
|
-
const _hoisted_1$
|
|
6164
|
+
const _hoisted_1$52 = [
|
|
5766
6165
|
"count",
|
|
5767
6166
|
"radius",
|
|
5768
6167
|
"intensity",
|
|
@@ -5863,7 +6262,7 @@ var component_vue_vue_type_script_setup_true_lang_default$14 = /* @__PURE__ */ d
|
|
|
5863
6262
|
near: __props.near,
|
|
5864
6263
|
far: __props.far,
|
|
5865
6264
|
position: pos.value
|
|
5866
|
-
}, null, 8, _hoisted_1$
|
|
6265
|
+
}, null, 8, _hoisted_1$52);
|
|
5867
6266
|
};
|
|
5868
6267
|
}
|
|
5869
6268
|
});
|
|
@@ -5957,6 +6356,8 @@ var ProgressiveLightMap = class {
|
|
|
5957
6356
|
this.renderer.clear();
|
|
5958
6357
|
this.renderer.setRenderTarget(null);
|
|
5959
6358
|
this.renderer.setClearColor(this.clearColor, this.clearAlpha);
|
|
6359
|
+
}
|
|
6360
|
+
prepare() {
|
|
5960
6361
|
this.lights = [];
|
|
5961
6362
|
this.meshes = [];
|
|
5962
6363
|
this.scene.traverse((object) => {
|
|
@@ -5970,8 +6371,6 @@ var ProgressiveLightMap = class {
|
|
|
5970
6371
|
intensity: object.intensity
|
|
5971
6372
|
});
|
|
5972
6373
|
});
|
|
5973
|
-
}
|
|
5974
|
-
prepare() {
|
|
5975
6374
|
this.lights.forEach((light) => light.object.intensity = 0);
|
|
5976
6375
|
this.meshes.forEach((mesh) => mesh.object.material = this.discardMat);
|
|
5977
6376
|
}
|
|
@@ -5990,13 +6389,16 @@ var ProgressiveLightMap = class {
|
|
|
5990
6389
|
const activeMap = this.buffer1Active ? this.progressiveLightMap1 : this.progressiveLightMap2;
|
|
5991
6390
|
const inactiveMap = this.buffer1Active ? this.progressiveLightMap2 : this.progressiveLightMap1;
|
|
5992
6391
|
const oldBg = this.scene.background;
|
|
6392
|
+
const oldEnv = this.scene.environment;
|
|
5993
6393
|
this.scene.background = null;
|
|
6394
|
+
this.scene.environment = null;
|
|
5994
6395
|
this.renderer.setRenderTarget(activeMap);
|
|
5995
6396
|
this.previousShadowMap.value = inactiveMap.texture;
|
|
5996
6397
|
this.buffer1Active = !this.buffer1Active;
|
|
5997
6398
|
this.renderer.render(this.scene, camera);
|
|
5998
6399
|
this.renderer.setRenderTarget(null);
|
|
5999
6400
|
this.scene.background = oldBg;
|
|
6401
|
+
this.scene.environment = oldEnv;
|
|
6000
6402
|
}
|
|
6001
6403
|
};
|
|
6002
6404
|
|
|
@@ -6027,8 +6429,8 @@ const SoftShadowMaterial = /* @__PURE__ */ shaderMaterial({
|
|
|
6027
6429
|
|
|
6028
6430
|
//#endregion
|
|
6029
6431
|
//#region src/core/light-shadow/AccumulativeShadows/component.vue?vue&type=script&setup=true&lang.ts
|
|
6030
|
-
const _hoisted_1$
|
|
6031
|
-
const _hoisted_2$
|
|
6432
|
+
const _hoisted_1$51 = ["scale", "rotation"];
|
|
6433
|
+
const _hoisted_2$28 = [
|
|
6032
6434
|
"alpha-test",
|
|
6033
6435
|
"blend",
|
|
6034
6436
|
"color",
|
|
@@ -6226,7 +6628,7 @@ var component_vue_vue_type_script_setup_true_lang_default$13 = /* @__PURE__ */ d
|
|
|
6226
6628
|
opacity: __props.opacity,
|
|
6227
6629
|
"tone-mapped": __props.toneMapped,
|
|
6228
6630
|
transparent: true
|
|
6229
|
-
}, null, 8, _hoisted_2$
|
|
6631
|
+
}, null, 8, _hoisted_2$28)], 8, _hoisted_1$51)], 512);
|
|
6230
6632
|
};
|
|
6231
6633
|
}
|
|
6232
6634
|
});
|
|
@@ -6252,8 +6654,8 @@ const BakeShadows = defineComponent({
|
|
|
6252
6654
|
|
|
6253
6655
|
//#endregion
|
|
6254
6656
|
//#region src/core/light-shadow/CircleShadow.vue?vue&type=script&setup=true&lang.ts
|
|
6255
|
-
const _hoisted_1$
|
|
6256
|
-
const _hoisted_2$
|
|
6657
|
+
const _hoisted_1$50 = ["rotation-x"];
|
|
6658
|
+
const _hoisted_2$27 = [
|
|
6257
6659
|
"opacity",
|
|
6258
6660
|
"fog",
|
|
6259
6661
|
"depth-write",
|
|
@@ -6326,7 +6728,7 @@ var CircleShadow_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
|
|
|
6326
6728
|
"depth-write": __props.depthWrite,
|
|
6327
6729
|
side: unref(DoubleSide),
|
|
6328
6730
|
map: unref(texture$1)
|
|
6329
|
-
}, null, 8, _hoisted_2$
|
|
6731
|
+
}, null, 8, _hoisted_2$27)], 8, _hoisted_1$50);
|
|
6330
6732
|
};
|
|
6331
6733
|
}
|
|
6332
6734
|
});
|
|
@@ -6337,7 +6739,7 @@ var CircleShadow_default = CircleShadow_vue_vue_type_script_setup_true_lang_defa
|
|
|
6337
6739
|
|
|
6338
6740
|
//#endregion
|
|
6339
6741
|
//#region src/core/light-shadow/ContactShadows.vue?vue&type=script&setup=true&lang.ts
|
|
6340
|
-
const _hoisted_1$
|
|
6742
|
+
const _hoisted_1$49 = ["object"];
|
|
6341
6743
|
var ContactShadows_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
6342
6744
|
__name: "ContactShadows",
|
|
6343
6745
|
props: {
|
|
@@ -6545,7 +6947,7 @@ var ContactShadows_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
6545
6947
|
});
|
|
6546
6948
|
__expose({ instance: pool.shadowGroup });
|
|
6547
6949
|
return (_ctx, _cache) => {
|
|
6548
|
-
return openBlock(), createElementBlock("primitive", { object: unref(pool).shadowGroup }, null, 8, _hoisted_1$
|
|
6950
|
+
return openBlock(), createElementBlock("primitive", { object: unref(pool).shadowGroup }, null, 8, _hoisted_1$49);
|
|
6549
6951
|
};
|
|
6550
6952
|
}
|
|
6551
6953
|
});
|
|
@@ -7572,8 +7974,8 @@ function useSVG(path, options = {}) {
|
|
|
7572
7974
|
|
|
7573
7975
|
//#endregion
|
|
7574
7976
|
//#region src/core/loaders/useSVG/component.vue?vue&type=script&setup=true&lang.ts
|
|
7575
|
-
const _hoisted_1$
|
|
7576
|
-
const _hoisted_2$
|
|
7977
|
+
const _hoisted_1$48 = { key: 0 };
|
|
7978
|
+
const _hoisted_2$26 = ["geometry", "render-order"];
|
|
7577
7979
|
var component_vue_vue_type_script_setup_true_lang_default$11 = /* @__PURE__ */ defineComponent({
|
|
7578
7980
|
__name: "component",
|
|
7579
7981
|
props: {
|
|
@@ -7630,11 +8032,11 @@ var component_vue_vue_type_script_setup_true_lang_default$11 = /* @__PURE__ */ d
|
|
|
7630
8032
|
dispose();
|
|
7631
8033
|
});
|
|
7632
8034
|
return (_ctx, _cache) => {
|
|
7633
|
-
return !unref(isLoading) ? (openBlock(), createElementBlock("TresGroup", _hoisted_1$
|
|
8035
|
+
return !unref(isLoading) ? (openBlock(), createElementBlock("TresGroup", _hoisted_1$48, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(layers), ({ geometry, material, isStroke }, i) => {
|
|
7634
8036
|
return openBlock(), createElementBlock("TresMesh", mergeProps({ key: `${i}` }, { ref_for: true }, isStroke ? props.strokeMeshProps : props.fillMeshProps, {
|
|
7635
8037
|
geometry,
|
|
7636
8038
|
"render-order": props.depth === "renderOrder" ? i : 0
|
|
7637
|
-
}), [createElementVNode("TresMeshBasicMaterial", mergeProps({ ref_for: true }, material), null, 16)], 16, _hoisted_2$
|
|
8039
|
+
}), [createElementVNode("TresMeshBasicMaterial", mergeProps({ ref_for: true }, material), null, 16)], 16, _hoisted_2$26);
|
|
7638
8040
|
}), 128))])) : createCommentVNode("v-if", true);
|
|
7639
8041
|
};
|
|
7640
8042
|
}
|
|
@@ -7681,7 +8083,7 @@ function useFBX(path, options) {
|
|
|
7681
8083
|
|
|
7682
8084
|
//#endregion
|
|
7683
8085
|
//#region src/core/loaders/useFBX/component.vue?vue&type=script&setup=true&lang.ts
|
|
7684
|
-
const _hoisted_1$
|
|
8086
|
+
const _hoisted_1$47 = ["object"];
|
|
7685
8087
|
var component_vue_vue_type_script_setup_true_lang_default$10 = /* @__PURE__ */ defineComponent({
|
|
7686
8088
|
__name: "component",
|
|
7687
8089
|
props: {
|
|
@@ -7716,7 +8118,7 @@ var component_vue_vue_type_script_setup_true_lang_default$10 = /* @__PURE__ */ d
|
|
|
7716
8118
|
return !unref(isLoading) && unref(model) ? (openBlock(), createElementBlock("primitive", {
|
|
7717
8119
|
key: 0,
|
|
7718
8120
|
object: unref(model)
|
|
7719
|
-
}, null, 8, _hoisted_1$
|
|
8121
|
+
}, null, 8, _hoisted_1$47)) : createCommentVNode("v-if", true);
|
|
7720
8122
|
};
|
|
7721
8123
|
}
|
|
7722
8124
|
});
|
|
@@ -7739,6 +8141,17 @@ var component_default$5 = component_vue_vue_type_script_setup_true_lang_default$
|
|
|
7739
8141
|
* const { state: model } = useGLTF('/path/to/model.glb', { draco: true })
|
|
7740
8142
|
* ```
|
|
7741
8143
|
*
|
|
8144
|
+
* The shape of `nodes` and `materials` is only known once the model is loaded, so both
|
|
8145
|
+
* default to a loose record. Pass the model's own shape to get them typed — `tres gltf`
|
|
8146
|
+
* generates those interfaces for you:
|
|
8147
|
+
*
|
|
8148
|
+
* @example
|
|
8149
|
+
* ```ts
|
|
8150
|
+
* interface ModelNodes { Body: SkinnedMesh }
|
|
8151
|
+
* interface ModelMaterials { Skin: MeshStandardMaterial }
|
|
8152
|
+
* const { nodes, materials } = useGLTF<ModelNodes, ModelMaterials>('/path/to/model.glb')
|
|
8153
|
+
* ```
|
|
8154
|
+
*
|
|
7742
8155
|
* @param {MaybeRef<string>} path - Path to the GLTF model file
|
|
7743
8156
|
* @param {UseGLTFOptions} options - Options for loading the model
|
|
7744
8157
|
* @returns {{ state: GLTF, isLoading: boolean, execute: () => Promise<void> }} Object containing the model state, loading state and reload function
|
|
@@ -7771,7 +8184,7 @@ function useGLTF(path, options) {
|
|
|
7771
8184
|
|
|
7772
8185
|
//#endregion
|
|
7773
8186
|
//#region src/core/loaders/useGLTF/component.vue?vue&type=script&setup=true&lang.ts
|
|
7774
|
-
const _hoisted_1$
|
|
8187
|
+
const _hoisted_1$46 = ["object"];
|
|
7775
8188
|
var component_vue_vue_type_script_setup_true_lang_default$9 = /* @__PURE__ */ defineComponent({
|
|
7776
8189
|
__name: "component",
|
|
7777
8190
|
props: {
|
|
@@ -7819,7 +8232,7 @@ var component_vue_vue_type_script_setup_true_lang_default$9 = /* @__PURE__ */ de
|
|
|
7819
8232
|
return !unref(isLoading) && unref(state)?.scene ? (openBlock(), createElementBlock("primitive", {
|
|
7820
8233
|
key: 0,
|
|
7821
8234
|
object: unref(state)?.scene
|
|
7822
|
-
}, null, 8, _hoisted_1$
|
|
8235
|
+
}, null, 8, _hoisted_1$46)) : createCommentVNode("v-if", true);
|
|
7823
8236
|
};
|
|
7824
8237
|
}
|
|
7825
8238
|
});
|
|
@@ -7881,7 +8294,8 @@ function useProgress() {
|
|
|
7881
8294
|
const progress = ref(0);
|
|
7882
8295
|
const items = ref([]);
|
|
7883
8296
|
return new Promise((resolve) => {
|
|
7884
|
-
DefaultLoadingManager.onStart = () => {
|
|
8297
|
+
DefaultLoadingManager.onStart = (_url, itemsLoaded) => {
|
|
8298
|
+
saveLastTotalLoaded = itemsLoaded;
|
|
7885
8299
|
hasFinishLoading.value = false;
|
|
7886
8300
|
};
|
|
7887
8301
|
DefaultLoadingManager.onLoad = () => {
|
|
@@ -8020,8 +8434,8 @@ function useTextures(paths) {
|
|
|
8020
8434
|
|
|
8021
8435
|
//#endregion
|
|
8022
8436
|
//#region src/core/materials/customShaderMaterial/index.vue?vue&type=script&setup=true&lang.ts
|
|
8023
|
-
const _hoisted_1$
|
|
8024
|
-
var index_vue_vue_type_script_setup_true_lang_default$
|
|
8437
|
+
const _hoisted_1$45 = ["args"];
|
|
8438
|
+
var index_vue_vue_type_script_setup_true_lang_default$8 = /* @__PURE__ */ defineComponent({
|
|
8025
8439
|
__name: "index",
|
|
8026
8440
|
props: {
|
|
8027
8441
|
baseMaterial: {
|
|
@@ -8059,14 +8473,14 @@ var index_vue_vue_type_script_setup_true_lang_default$7 = /* @__PURE__ */ define
|
|
|
8059
8473
|
ref_key: "customShaderMaterialClass",
|
|
8060
8474
|
ref: customShaderMaterialClass,
|
|
8061
8475
|
args: [props]
|
|
8062
|
-
}, null, 8, _hoisted_1$
|
|
8476
|
+
}, null, 8, _hoisted_1$45);
|
|
8063
8477
|
};
|
|
8064
8478
|
}
|
|
8065
8479
|
});
|
|
8066
8480
|
|
|
8067
8481
|
//#endregion
|
|
8068
8482
|
//#region src/core/materials/customShaderMaterial/index.vue
|
|
8069
|
-
var customShaderMaterial_default = index_vue_vue_type_script_setup_true_lang_default$
|
|
8483
|
+
var customShaderMaterial_default = index_vue_vue_type_script_setup_true_lang_default$8;
|
|
8070
8484
|
|
|
8071
8485
|
//#endregion
|
|
8072
8486
|
//#region src/core/materials/holographicMaterial/HolographicMaterialParameters.ts
|
|
@@ -8247,7 +8661,7 @@ var HolographicMaterialParameters_default = HolographicMaterial;
|
|
|
8247
8661
|
|
|
8248
8662
|
//#endregion
|
|
8249
8663
|
//#region src/core/materials/holographicMaterial/index.vue?vue&type=script&setup=true&lang.ts
|
|
8250
|
-
const _hoisted_1$
|
|
8664
|
+
const _hoisted_1$44 = [
|
|
8251
8665
|
"uniforms-fresnelAmount-value",
|
|
8252
8666
|
"uniforms-enableBlinking-value",
|
|
8253
8667
|
"uniforms-fresnelOpacity-value",
|
|
@@ -8260,7 +8674,7 @@ const _hoisted_1$42 = [
|
|
|
8260
8674
|
"enableAdditive",
|
|
8261
8675
|
"side"
|
|
8262
8676
|
];
|
|
8263
|
-
var index_vue_vue_type_script_setup_true_lang_default$
|
|
8677
|
+
var index_vue_vue_type_script_setup_true_lang_default$7 = /* @__PURE__ */ defineComponent({
|
|
8264
8678
|
__name: "index",
|
|
8265
8679
|
props: {
|
|
8266
8680
|
fresnelAmount: {
|
|
@@ -8348,18 +8762,18 @@ var index_vue_vue_type_script_setup_true_lang_default$6 = /* @__PURE__ */ define
|
|
|
8348
8762
|
"uniforms-blinkFresnelOnly-value": props.blinkFresnelOnly,
|
|
8349
8763
|
enableAdditive: props.enableAdditive,
|
|
8350
8764
|
side: props.side
|
|
8351
|
-
}, null, 8, _hoisted_1$
|
|
8765
|
+
}, null, 8, _hoisted_1$44);
|
|
8352
8766
|
};
|
|
8353
8767
|
}
|
|
8354
8768
|
});
|
|
8355
8769
|
|
|
8356
8770
|
//#endregion
|
|
8357
8771
|
//#region src/core/materials/holographicMaterial/index.vue
|
|
8358
|
-
var holographicMaterial_default = index_vue_vue_type_script_setup_true_lang_default$
|
|
8772
|
+
var holographicMaterial_default = index_vue_vue_type_script_setup_true_lang_default$7;
|
|
8359
8773
|
|
|
8360
8774
|
//#endregion
|
|
8361
8775
|
//#region src/core/materials/meshDiscardMaterial/index.vue?vue&type=script&setup=true&lang.ts
|
|
8362
|
-
var index_vue_vue_type_script_setup_true_lang_default$
|
|
8776
|
+
var index_vue_vue_type_script_setup_true_lang_default$6 = /* @__PURE__ */ defineComponent({
|
|
8363
8777
|
__name: "index",
|
|
8364
8778
|
setup(__props, { expose: __expose }) {
|
|
8365
8779
|
const meshDiscardMaterialRef = shallowRef();
|
|
@@ -8377,7 +8791,7 @@ var index_vue_vue_type_script_setup_true_lang_default$5 = /* @__PURE__ */ define
|
|
|
8377
8791
|
|
|
8378
8792
|
//#endregion
|
|
8379
8793
|
//#region src/core/materials/meshDiscardMaterial/index.vue
|
|
8380
|
-
var meshDiscardMaterial_default = index_vue_vue_type_script_setup_true_lang_default$
|
|
8794
|
+
var meshDiscardMaterial_default = index_vue_vue_type_script_setup_true_lang_default$6;
|
|
8381
8795
|
|
|
8382
8796
|
//#endregion
|
|
8383
8797
|
//#region src/core/materials/meshGlassMaterial/material.ts
|
|
@@ -8479,7 +8893,7 @@ var material_default = MeshGlassMaterial;
|
|
|
8479
8893
|
|
|
8480
8894
|
//#endregion
|
|
8481
8895
|
//#region src/core/materials/meshGlassMaterial/index.vue?vue&type=script&setup=true&lang.ts
|
|
8482
|
-
var index_vue_vue_type_script_setup_true_lang_default$
|
|
8896
|
+
var index_vue_vue_type_script_setup_true_lang_default$5 = /* @__PURE__ */ defineComponent({
|
|
8483
8897
|
__name: "index",
|
|
8484
8898
|
setup(__props, { expose: __expose }) {
|
|
8485
8899
|
const MeshGlassMaterialClass = shallowRef();
|
|
@@ -8497,7 +8911,206 @@ var index_vue_vue_type_script_setup_true_lang_default$4 = /* @__PURE__ */ define
|
|
|
8497
8911
|
|
|
8498
8912
|
//#endregion
|
|
8499
8913
|
//#region src/core/materials/meshGlassMaterial/index.vue
|
|
8500
|
-
var meshGlassMaterial_default = index_vue_vue_type_script_setup_true_lang_default$
|
|
8914
|
+
var meshGlassMaterial_default = index_vue_vue_type_script_setup_true_lang_default$5;
|
|
8915
|
+
|
|
8916
|
+
//#endregion
|
|
8917
|
+
//#region src/core/materials/meshPortalMaterial/PortalMaterialImpl.ts
|
|
8918
|
+
/**
|
|
8919
|
+
* Window-pass material for MeshPortalMaterial.
|
|
8920
|
+
* Samples the portal FBO in screen space so the mesh becomes a perspective-correct
|
|
8921
|
+
* cutout window into the portal scene. Empty portal areas (alpha 0) show the world.
|
|
8922
|
+
* Ported from drei's PortalMaterialImpl (blur/sdf deferred).
|
|
8923
|
+
*/
|
|
8924
|
+
var PortalMaterialImpl = class extends ShaderMaterial {
|
|
8925
|
+
constructor() {
|
|
8926
|
+
super({
|
|
8927
|
+
transparent: true,
|
|
8928
|
+
uniforms: {
|
|
8929
|
+
map: { value: null },
|
|
8930
|
+
resolution: { value: new Vector2() }
|
|
8931
|
+
},
|
|
8932
|
+
vertexShader: `
|
|
8933
|
+
void main() {
|
|
8934
|
+
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
|
|
8935
|
+
}
|
|
8936
|
+
`,
|
|
8937
|
+
fragmentShader: `
|
|
8938
|
+
uniform sampler2D map;
|
|
8939
|
+
uniform vec2 resolution;
|
|
8940
|
+
void main() {
|
|
8941
|
+
// Sample the portal FBO in screen space so the mesh reads as a window.
|
|
8942
|
+
vec2 uv = gl_FragCoord.xy / resolution.xy;
|
|
8943
|
+
vec4 t = texture2D(map, uv);
|
|
8944
|
+
gl_FragColor = vec4(t.rgb, t.a);
|
|
8945
|
+
#include <tonemapping_fragment>
|
|
8946
|
+
#include <colorspace_fragment>
|
|
8947
|
+
}
|
|
8948
|
+
`
|
|
8949
|
+
});
|
|
8950
|
+
}
|
|
8951
|
+
get map() {
|
|
8952
|
+
return this.uniforms.map.value;
|
|
8953
|
+
}
|
|
8954
|
+
set map(v) {
|
|
8955
|
+
this.uniforms.map.value = v;
|
|
8956
|
+
}
|
|
8957
|
+
};
|
|
8958
|
+
|
|
8959
|
+
//#endregion
|
|
8960
|
+
//#region src/core/materials/meshPortalMaterial/index.vue?vue&type=script&setup=true&lang.ts
|
|
8961
|
+
var index_vue_vue_type_script_setup_true_lang_default$4 = /* @__PURE__ */ defineComponent({
|
|
8962
|
+
__name: "index",
|
|
8963
|
+
props: {
|
|
8964
|
+
blend: {
|
|
8965
|
+
type: Number,
|
|
8966
|
+
required: false,
|
|
8967
|
+
default: 0
|
|
8968
|
+
},
|
|
8969
|
+
resolution: {
|
|
8970
|
+
type: Number,
|
|
8971
|
+
required: false,
|
|
8972
|
+
default: 512
|
|
8973
|
+
},
|
|
8974
|
+
worldUnits: {
|
|
8975
|
+
type: Boolean,
|
|
8976
|
+
required: false,
|
|
8977
|
+
default: false
|
|
8978
|
+
},
|
|
8979
|
+
renderPriority: {
|
|
8980
|
+
type: Number,
|
|
8981
|
+
required: false,
|
|
8982
|
+
default: 0
|
|
8983
|
+
}
|
|
8984
|
+
},
|
|
8985
|
+
setup(__props, { expose: __expose }) {
|
|
8986
|
+
const props = __props;
|
|
8987
|
+
const { extend: extend$1, invalidate } = useTres();
|
|
8988
|
+
extend$1({ PortalMaterialImpl });
|
|
8989
|
+
const materialRef = shallowRef();
|
|
8990
|
+
const portalScene = new Scene();
|
|
8991
|
+
portalScene.matrixAutoUpdate = false;
|
|
8992
|
+
provide(INJECTION_KEY, {
|
|
8993
|
+
...useTresContext(),
|
|
8994
|
+
scene: shallowRef(portalScene)
|
|
8995
|
+
});
|
|
8996
|
+
const rtOptions = {
|
|
8997
|
+
minFilter: LinearFilter,
|
|
8998
|
+
magFilter: LinearFilter,
|
|
8999
|
+
type: HalfFloatType
|
|
9000
|
+
};
|
|
9001
|
+
const fboMap = new WebGLRenderTarget(props.resolution, props.resolution, rtOptions);
|
|
9002
|
+
const buffer1 = new WebGLRenderTarget(1, 1, rtOptions);
|
|
9003
|
+
const buffer2 = new WebGLRenderTarget(1, 1, rtOptions);
|
|
9004
|
+
watch(() => props.resolution, (res) => fboMap.setSize(res, res));
|
|
9005
|
+
const quadScene = new Scene();
|
|
9006
|
+
const quadCamera = new OrthographicCamera(-1, 1, 1, -1, 0, 1);
|
|
9007
|
+
const quadMaterial = new ShaderMaterial({
|
|
9008
|
+
uniforms: {
|
|
9009
|
+
a: { value: buffer1.texture },
|
|
9010
|
+
b: { value: buffer2.texture },
|
|
9011
|
+
blend: { value: 0 }
|
|
9012
|
+
},
|
|
9013
|
+
vertexShader: `
|
|
9014
|
+
varying vec2 vUv;
|
|
9015
|
+
void main() { vUv = uv; gl_Position = vec4(position, 1.0); }
|
|
9016
|
+
`,
|
|
9017
|
+
fragmentShader: `
|
|
9018
|
+
uniform sampler2D a;
|
|
9019
|
+
uniform sampler2D b;
|
|
9020
|
+
uniform float blend;
|
|
9021
|
+
varying vec2 vUv;
|
|
9022
|
+
void main() { gl_FragColor = mix(texture2D(b, vUv), texture2D(a, vUv), blend); }
|
|
9023
|
+
`
|
|
9024
|
+
});
|
|
9025
|
+
const quadGeometry = new PlaneGeometry(2, 2);
|
|
9026
|
+
quadScene.add(new Mesh(quadGeometry, quadMaterial));
|
|
9027
|
+
const { onBeforeRender, onRender } = useLoop();
|
|
9028
|
+
const drawSize = new Vector2();
|
|
9029
|
+
let hasWarnedWebGPU = false;
|
|
9030
|
+
function isWebGL(r) {
|
|
9031
|
+
if (r?.isWebGPURenderer) {
|
|
9032
|
+
if (!hasWarnedWebGPU) {
|
|
9033
|
+
logWarning("MeshPortalMaterial: WebGPURenderer is not supported yet");
|
|
9034
|
+
hasWarnedWebGPU = true;
|
|
9035
|
+
}
|
|
9036
|
+
return false;
|
|
9037
|
+
}
|
|
9038
|
+
return r instanceof WebGLRenderer;
|
|
9039
|
+
}
|
|
9040
|
+
onBeforeRender(({ renderer, camera }) => {
|
|
9041
|
+
const mat = materialRef.value;
|
|
9042
|
+
if (!mat || !isWebGL(renderer)) return;
|
|
9043
|
+
const host = mat.__tres?.parent;
|
|
9044
|
+
const cam = camera.value;
|
|
9045
|
+
if (!host || !cam) return;
|
|
9046
|
+
if (props.worldUnits) portalScene.matrixWorld.identity();
|
|
9047
|
+
else {
|
|
9048
|
+
if (props.blend === 1) host.updateWorldMatrix(true, false);
|
|
9049
|
+
portalScene.matrixWorld.copy(host.matrixWorld);
|
|
9050
|
+
}
|
|
9051
|
+
invalidate();
|
|
9052
|
+
renderer.getDrawingBufferSize(drawSize);
|
|
9053
|
+
mat.uniforms.resolution.value.copy(drawSize);
|
|
9054
|
+
const prevAlpha = renderer.getClearAlpha();
|
|
9055
|
+
renderer.setClearAlpha(0);
|
|
9056
|
+
renderer.setRenderTarget(fboMap);
|
|
9057
|
+
renderer.clear();
|
|
9058
|
+
renderer.render(portalScene, cam);
|
|
9059
|
+
renderer.setRenderTarget(null);
|
|
9060
|
+
renderer.setClearAlpha(prevAlpha);
|
|
9061
|
+
mat.map = fboMap.texture;
|
|
9062
|
+
}, Number.POSITIVE_INFINITY);
|
|
9063
|
+
onRender(({ renderer, scene, camera }) => {
|
|
9064
|
+
if (!materialRef.value || !isWebGL(renderer)) return;
|
|
9065
|
+
const cam = camera.value;
|
|
9066
|
+
if (!cam) return;
|
|
9067
|
+
const blend = props.blend;
|
|
9068
|
+
if (blend <= 0) return;
|
|
9069
|
+
if (blend >= 1) {
|
|
9070
|
+
renderer.render(portalScene, cam);
|
|
9071
|
+
return;
|
|
9072
|
+
}
|
|
9073
|
+
renderer.getDrawingBufferSize(drawSize);
|
|
9074
|
+
if (buffer1.width !== drawSize.x || buffer1.height !== drawSize.y) {
|
|
9075
|
+
buffer1.setSize(drawSize.x, drawSize.y);
|
|
9076
|
+
buffer2.setSize(drawSize.x, drawSize.y);
|
|
9077
|
+
}
|
|
9078
|
+
quadMaterial.uniforms.blend.value = blend;
|
|
9079
|
+
const prevAlpha = renderer.getClearAlpha();
|
|
9080
|
+
renderer.setClearAlpha(1);
|
|
9081
|
+
renderer.setRenderTarget(buffer1);
|
|
9082
|
+
renderer.clear();
|
|
9083
|
+
renderer.render(portalScene, cam);
|
|
9084
|
+
renderer.setRenderTarget(buffer2);
|
|
9085
|
+
renderer.clear();
|
|
9086
|
+
renderer.render(scene.value, cam);
|
|
9087
|
+
renderer.setRenderTarget(null);
|
|
9088
|
+
renderer.render(quadScene, quadCamera);
|
|
9089
|
+
renderer.setClearAlpha(prevAlpha);
|
|
9090
|
+
}, props.renderPriority);
|
|
9091
|
+
onBeforeUnmount(() => {
|
|
9092
|
+
fboMap.dispose();
|
|
9093
|
+
buffer1.dispose();
|
|
9094
|
+
buffer2.dispose();
|
|
9095
|
+
quadGeometry.dispose();
|
|
9096
|
+
quadMaterial.dispose();
|
|
9097
|
+
});
|
|
9098
|
+
__expose({ instance: materialRef });
|
|
9099
|
+
return (_ctx, _cache) => {
|
|
9100
|
+
return openBlock(), createElementBlock(Fragment, null, [createElementVNode("TresPortalMaterialImpl", {
|
|
9101
|
+
ref_key: "materialRef",
|
|
9102
|
+
ref: materialRef
|
|
9103
|
+
}, null, 512), createVNode(unref(TresPortal), { to: unref(portalScene) }, {
|
|
9104
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
9105
|
+
_: 3
|
|
9106
|
+
}, 8, ["to"])], 64);
|
|
9107
|
+
};
|
|
9108
|
+
}
|
|
9109
|
+
});
|
|
9110
|
+
|
|
9111
|
+
//#endregion
|
|
9112
|
+
//#region src/core/materials/meshPortalMaterial/index.vue
|
|
9113
|
+
var meshPortalMaterial_default = index_vue_vue_type_script_setup_true_lang_default$4;
|
|
8501
9114
|
|
|
8502
9115
|
//#endregion
|
|
8503
9116
|
//#region src/utils/constants.ts
|
|
@@ -8916,7 +9529,7 @@ var MeshReflectionMaterial = class extends MeshStandardMaterial {
|
|
|
8916
9529
|
|
|
8917
9530
|
//#endregion
|
|
8918
9531
|
//#region src/core/materials/meshReflectionMaterial/index.vue?vue&type=script&setup=true&lang.ts
|
|
8919
|
-
const _hoisted_1$
|
|
9532
|
+
const _hoisted_1$43 = [
|
|
8920
9533
|
"texture-matrix",
|
|
8921
9534
|
"t-sharp",
|
|
8922
9535
|
"t-depth",
|
|
@@ -9322,7 +9935,7 @@ var index_vue_vue_type_script_setup_true_lang_default$3 = /* @__PURE__ */ define
|
|
|
9322
9935
|
"defines-USE_BLUR": hasBlur.value ? "" : void 0,
|
|
9323
9936
|
"defines-USE_DEPTH": hasDepth.value ? "" : void 0,
|
|
9324
9937
|
"defines-USE_DISTORTION": hasDistortion.value ? "" : void 0
|
|
9325
|
-
}), null, 16, _hoisted_1$
|
|
9938
|
+
}), null, 16, _hoisted_1$43);
|
|
9326
9939
|
};
|
|
9327
9940
|
}
|
|
9328
9941
|
});
|
|
@@ -9578,7 +10191,7 @@ var MeshTransmissionMaterial = class extends MeshPhysicalMaterial {
|
|
|
9578
10191
|
|
|
9579
10192
|
//#endregion
|
|
9580
10193
|
//#region src/core/materials/meshTransmissionMaterial/index.vue?vue&type=script&setup=true&lang.ts
|
|
9581
|
-
const _hoisted_1$
|
|
10194
|
+
const _hoisted_1$42 = ["args"];
|
|
9582
10195
|
var index_vue_vue_type_script_setup_true_lang_default$2 = /* @__PURE__ */ defineComponent({
|
|
9583
10196
|
__name: "index",
|
|
9584
10197
|
props: {
|
|
@@ -9781,7 +10394,7 @@ var index_vue_vue_type_script_setup_true_lang_default$2 = /* @__PURE__ */ define
|
|
|
9781
10394
|
ref_key: "materialRef",
|
|
9782
10395
|
ref: materialRef,
|
|
9783
10396
|
args: constructorArgs.value
|
|
9784
|
-
}, tresProps.value), null, 16, _hoisted_1$
|
|
10397
|
+
}, tresProps.value), null, 16, _hoisted_1$42);
|
|
9785
10398
|
};
|
|
9786
10399
|
}
|
|
9787
10400
|
});
|
|
@@ -9833,7 +10446,7 @@ var WobbleMaterialImpl = class extends MeshStandardMaterial {
|
|
|
9833
10446
|
|
|
9834
10447
|
//#endregion
|
|
9835
10448
|
//#region src/core/materials/meshWobbleMaterial/index.vue?vue&type=script&setup=true&lang.ts
|
|
9836
|
-
const _hoisted_1$
|
|
10449
|
+
const _hoisted_1$41 = ["factor"];
|
|
9837
10450
|
var index_vue_vue_type_script_setup_true_lang_default$1 = /* @__PURE__ */ defineComponent({
|
|
9838
10451
|
__name: "index",
|
|
9839
10452
|
props: {
|
|
@@ -9869,7 +10482,7 @@ var index_vue_vue_type_script_setup_true_lang_default$1 = /* @__PURE__ */ define
|
|
|
9869
10482
|
ref_key: "materialRef",
|
|
9870
10483
|
ref: materialRef,
|
|
9871
10484
|
factor: __props.factor
|
|
9872
|
-
}, null, 8, _hoisted_1$
|
|
10485
|
+
}, null, 8, _hoisted_1$41);
|
|
9873
10486
|
};
|
|
9874
10487
|
}
|
|
9875
10488
|
});
|
|
@@ -9902,7 +10515,7 @@ var PointMaterial = class extends PointsMaterial {
|
|
|
9902
10515
|
|
|
9903
10516
|
//#endregion
|
|
9904
10517
|
//#region src/core/materials/pointMaterial/component.vue?vue&type=script&setup=true&lang.ts
|
|
9905
|
-
const _hoisted_1$
|
|
10518
|
+
const _hoisted_1$40 = ["object"];
|
|
9906
10519
|
var component_vue_vue_type_script_setup_true_lang_default$7 = /* @__PURE__ */ defineComponent({
|
|
9907
10520
|
__name: "component",
|
|
9908
10521
|
props: { sizeAttenuation: {
|
|
@@ -9922,7 +10535,7 @@ var component_vue_vue_type_script_setup_true_lang_default$7 = /* @__PURE__ */ de
|
|
|
9922
10535
|
});
|
|
9923
10536
|
__expose({ instance: materialRef });
|
|
9924
10537
|
return (_ctx, _cache) => {
|
|
9925
|
-
return openBlock(), createElementBlock("primitive", { object: materialRef.value }, null, 8, _hoisted_1$
|
|
10538
|
+
return openBlock(), createElementBlock("primitive", { object: materialRef.value }, null, 8, _hoisted_1$40);
|
|
9926
10539
|
};
|
|
9927
10540
|
}
|
|
9928
10541
|
});
|
|
@@ -10175,7 +10788,7 @@ function _resetGoal(goal) {
|
|
|
10175
10788
|
|
|
10176
10789
|
//#endregion
|
|
10177
10790
|
//#region src/core/miscellaneous/Bounds/component.vue?vue&type=script&setup=true&lang.ts
|
|
10178
|
-
const _hoisted_1$
|
|
10791
|
+
const _hoisted_1$39 = [
|
|
10179
10792
|
"object",
|
|
10180
10793
|
"duration",
|
|
10181
10794
|
"offset"
|
|
@@ -10264,7 +10877,7 @@ var component_vue_vue_type_script_setup_true_lang_default$6 = /* @__PURE__ */ de
|
|
|
10264
10877
|
object: unref(bounds),
|
|
10265
10878
|
duration: __props.duration,
|
|
10266
10879
|
offset: __props.offset
|
|
10267
|
-
}, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$
|
|
10880
|
+
}, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$39);
|
|
10268
10881
|
};
|
|
10269
10882
|
}
|
|
10270
10883
|
});
|
|
@@ -10384,7 +10997,7 @@ var MouseParallax_default = MouseParallax_vue_vue_type_script_setup_true_lang_de
|
|
|
10384
10997
|
|
|
10385
10998
|
//#endregion
|
|
10386
10999
|
//#region src/core/miscellaneous/PositionalAudio.vue?vue&type=script&setup=true&lang.ts
|
|
10387
|
-
const _hoisted_1$
|
|
11000
|
+
const _hoisted_1$38 = ["args"];
|
|
10388
11001
|
var PositionalAudio_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
10389
11002
|
__name: "PositionalAudio",
|
|
10390
11003
|
props: {
|
|
@@ -10539,7 +11152,7 @@ var PositionalAudio_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ *
|
|
|
10539
11152
|
ref_key: "positionalAudioRef",
|
|
10540
11153
|
ref: positionalAudioRef,
|
|
10541
11154
|
args: [unref(listener)]
|
|
10542
|
-
}, null, 8, _hoisted_1$
|
|
11155
|
+
}, null, 8, _hoisted_1$38);
|
|
10543
11156
|
};
|
|
10544
11157
|
}
|
|
10545
11158
|
});
|
|
@@ -10553,8 +11166,19 @@ var PositionalAudio_default = PositionalAudio_vue_vue_type_script_setup_true_lan
|
|
|
10553
11166
|
/**
|
|
10554
11167
|
* Creates an AnimationMixer and returns it.
|
|
10555
11168
|
*
|
|
11169
|
+
* `actions` is keyed by clip name. Pass the model's clip names as `TName` to get those
|
|
11170
|
+
* keys typed instead of a bare string index — `tres gltf` generates that union for you.
|
|
11171
|
+
*
|
|
11172
|
+
* @example
|
|
11173
|
+
* ```ts
|
|
11174
|
+
* type ActionName = 'Idle' | 'Run'
|
|
11175
|
+
* const { actions } = useAnimations<AnimationClip, ActionName>(animations, modelRef)
|
|
11176
|
+
* actions.Idle?.play()
|
|
11177
|
+
* ```
|
|
11178
|
+
*
|
|
10556
11179
|
* @export
|
|
10557
11180
|
* @template T
|
|
11181
|
+
* @template TName
|
|
10558
11182
|
* @param {T[]} animations
|
|
10559
11183
|
* @param {(Scene | Ref<Object3D | undefined | null>)} [modelRef]
|
|
10560
11184
|
* @return {*}
|
|
@@ -10565,7 +11189,7 @@ function useAnimations(animations, modelRef, options) {
|
|
|
10565
11189
|
const actions = shallowReactive({});
|
|
10566
11190
|
const setupActions = () => {
|
|
10567
11191
|
const items = unref(animations);
|
|
10568
|
-
if (items && items.length > 0) {
|
|
11192
|
+
if (reference.value && items && items.length > 0) {
|
|
10569
11193
|
Object.keys(actions).forEach((key) => delete actions[key]);
|
|
10570
11194
|
items.forEach((animation) => {
|
|
10571
11195
|
const action = mixer.value.clipAction(animation, reference.value);
|
|
@@ -10575,14 +11199,15 @@ function useAnimations(animations, modelRef, options) {
|
|
|
10575
11199
|
};
|
|
10576
11200
|
watch(animations, setupActions, {
|
|
10577
11201
|
deep: true,
|
|
10578
|
-
immediate: true
|
|
11202
|
+
immediate: true,
|
|
11203
|
+
flush: "post"
|
|
10579
11204
|
});
|
|
10580
11205
|
watch(reference, (newRef) => {
|
|
10581
11206
|
if (newRef) {
|
|
10582
11207
|
mixer.value.uncacheRoot(reference.value);
|
|
10583
11208
|
setupActions();
|
|
10584
11209
|
}
|
|
10585
|
-
});
|
|
11210
|
+
}, { flush: "post" });
|
|
10586
11211
|
if (!options?.manualUpdate) {
|
|
10587
11212
|
const { onBeforeRender } = useLoop();
|
|
10588
11213
|
onBeforeRender(({ delta }) => {
|
|
@@ -10942,8 +11567,8 @@ function groupAtlasFramesByKey(frames) {
|
|
|
10942
11567
|
|
|
10943
11568
|
//#endregion
|
|
10944
11569
|
//#region src/core/objects/AnimatedSprite/component.vue?vue&type=script&setup=true&lang.ts
|
|
10945
|
-
const _hoisted_1$
|
|
10946
|
-
const _hoisted_2$
|
|
11570
|
+
const _hoisted_1$37 = ["scale", "position"];
|
|
11571
|
+
const _hoisted_2$25 = ["map", "alphaTest"];
|
|
10947
11572
|
const _hoisted_3$5 = ["scale", "position"];
|
|
10948
11573
|
const _hoisted_4$3 = [
|
|
10949
11574
|
"side",
|
|
@@ -11170,7 +11795,7 @@ var component_vue_vue_type_script_setup_true_lang_default$5 = /* @__PURE__ */ de
|
|
|
11170
11795
|
map: unref(texture$1),
|
|
11171
11796
|
transparent: true,
|
|
11172
11797
|
alphaTest: props.alphaTest
|
|
11173
|
-
}, null, 8, _hoisted_2$
|
|
11798
|
+
}, null, 8, _hoisted_2$25)], 8, _hoisted_1$37)) : (openBlock(), createElementBlock("TresMesh", {
|
|
11174
11799
|
key: 1,
|
|
11175
11800
|
scale: [
|
|
11176
11801
|
scaleX.value,
|
|
@@ -11241,7 +11866,7 @@ function useCubeCamera(props) {
|
|
|
11241
11866
|
|
|
11242
11867
|
//#endregion
|
|
11243
11868
|
//#region src/core/objects/CubeCamera/component.vue?vue&type=script&setup=true&lang.ts
|
|
11244
|
-
const _hoisted_1$
|
|
11869
|
+
const _hoisted_1$36 = ["object"];
|
|
11245
11870
|
var component_vue_vue_type_script_setup_true_lang_default$4 = /* @__PURE__ */ defineComponent({
|
|
11246
11871
|
__name: "component",
|
|
11247
11872
|
props: {
|
|
@@ -11305,7 +11930,7 @@ var component_vue_vue_type_script_setup_true_lang_default$4 = /* @__PURE__ */ de
|
|
|
11305
11930
|
return openBlock(), createElementBlock("TresGroup", {
|
|
11306
11931
|
ref_key: "groupRef",
|
|
11307
11932
|
ref: groupRef
|
|
11308
|
-
}, [createElementVNode("primitive", { object: unref(camera) }, null, 8, _hoisted_1$
|
|
11933
|
+
}, [createElementVNode("primitive", { object: unref(camera) }, null, 8, _hoisted_1$36), renderSlot(_ctx.$slots, "default")], 512);
|
|
11309
11934
|
};
|
|
11310
11935
|
}
|
|
11311
11936
|
});
|
|
@@ -11392,7 +12017,7 @@ var component_default$6 = component_vue_vue_type_script_setup_true_lang_default$
|
|
|
11392
12017
|
|
|
11393
12018
|
//#endregion
|
|
11394
12019
|
//#region src/core/objects/GradientTexture.vue?vue&type=script&setup=true&lang.ts
|
|
11395
|
-
const _hoisted_1$
|
|
12020
|
+
const _hoisted_1$35 = [
|
|
11396
12021
|
"color-space",
|
|
11397
12022
|
"args",
|
|
11398
12023
|
"attach"
|
|
@@ -11486,7 +12111,7 @@ var GradientTexture_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ *
|
|
|
11486
12111
|
"color-space": unref(renderer).outputColorSpace,
|
|
11487
12112
|
args: [unref(canvas)],
|
|
11488
12113
|
attach: props.attach
|
|
11489
|
-
}, null, 8, _hoisted_1$
|
|
12114
|
+
}, null, 8, _hoisted_1$35);
|
|
11490
12115
|
};
|
|
11491
12116
|
}
|
|
11492
12117
|
});
|
|
@@ -11642,7 +12267,7 @@ const getObjectCSSMatrix = (matrix, factor) => {
|
|
|
11642
12267
|
|
|
11643
12268
|
//#endregion
|
|
11644
12269
|
//#region src/core/objects/html/HTML.vue?vue&type=script&setup=true&lang.ts
|
|
11645
|
-
const _hoisted_1$
|
|
12270
|
+
const _hoisted_1$34 = [
|
|
11646
12271
|
"material",
|
|
11647
12272
|
"cast-shadow",
|
|
11648
12273
|
"receive-shadow",
|
|
@@ -12010,7 +12635,7 @@ var HTML_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
12010
12635
|
"cast-shadow": unref(castShadow),
|
|
12011
12636
|
"receive-shadow": unref(receiveShadow),
|
|
12012
12637
|
geometry: unref(geometry) || unref(defaultPlaneGeometry)
|
|
12013
|
-
}, null, 8, _hoisted_1$
|
|
12638
|
+
}, null, 8, _hoisted_1$34)) : createCommentVNode("v-if", true)], 512);
|
|
12014
12639
|
};
|
|
12015
12640
|
}
|
|
12016
12641
|
});
|
|
@@ -12115,8 +12740,8 @@ var ImageMaterial_default = ImageMaterial_vue_vue_type_script_setup_true_lang_de
|
|
|
12115
12740
|
|
|
12116
12741
|
//#endregion
|
|
12117
12742
|
//#region src/core/objects/Image/component.vue?vue&type=script&setup=true&lang.ts
|
|
12118
|
-
const _hoisted_1$
|
|
12119
|
-
const _hoisted_2$
|
|
12743
|
+
const _hoisted_1$33 = ["scale"];
|
|
12744
|
+
const _hoisted_2$24 = ["args"];
|
|
12120
12745
|
var component_vue_vue_type_script_setup_true_lang_default$2 = /* @__PURE__ */ defineComponent({
|
|
12121
12746
|
__name: "component",
|
|
12122
12747
|
props: {
|
|
@@ -12210,7 +12835,7 @@ var component_vue_vue_type_script_setup_true_lang_default$2 = /* @__PURE__ */ de
|
|
|
12210
12835
|
1,
|
|
12211
12836
|
props.segments,
|
|
12212
12837
|
props.segments
|
|
12213
|
-
] }, null, 8, _hoisted_2$
|
|
12838
|
+
] }, null, 8, _hoisted_2$24)]), createVNode(ImageMaterial_default, {
|
|
12214
12839
|
color: props.color,
|
|
12215
12840
|
map: texture$1.value,
|
|
12216
12841
|
zoom: props.zoom,
|
|
@@ -12236,7 +12861,7 @@ var component_vue_vue_type_script_setup_true_lang_default$2 = /* @__PURE__ */ de
|
|
|
12236
12861
|
"toneMapped",
|
|
12237
12862
|
"transparent",
|
|
12238
12863
|
"side"
|
|
12239
|
-
])], 8, _hoisted_1$
|
|
12864
|
+
])], 8, _hoisted_1$33);
|
|
12240
12865
|
};
|
|
12241
12866
|
}
|
|
12242
12867
|
});
|
|
@@ -12300,7 +12925,7 @@ var MarchingCube_default = MarchingCube_vue_vue_type_script_setup_true_lang_defa
|
|
|
12300
12925
|
|
|
12301
12926
|
//#endregion
|
|
12302
12927
|
//#region src/core/objects/MarchingCubes/MarchingCubes.vue?vue&type=script&setup=true&lang.ts
|
|
12303
|
-
const _hoisted_1$
|
|
12928
|
+
const _hoisted_1$32 = ["object"];
|
|
12304
12929
|
var MarchingCubes_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
12305
12930
|
__name: "MarchingCubes",
|
|
12306
12931
|
props: {
|
|
@@ -12340,7 +12965,7 @@ var MarchingCubes_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
12340
12965
|
});
|
|
12341
12966
|
__expose({ instance: marchingCubes });
|
|
12342
12967
|
return (_ctx, _cache) => {
|
|
12343
|
-
return openBlock(), createElementBlock("primitive", { object: marchingCubes.value }, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$
|
|
12968
|
+
return openBlock(), createElementBlock("primitive", { object: marchingCubes.value }, [renderSlot(_ctx.$slots, "default")], 8, _hoisted_1$32);
|
|
12344
12969
|
};
|
|
12345
12970
|
}
|
|
12346
12971
|
});
|
|
@@ -12392,9 +13017,81 @@ var MarchingPlane_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
12392
13017
|
//#region src/core/objects/MarchingCubes/MarchingPlane.vue
|
|
12393
13018
|
var MarchingPlane_default = MarchingPlane_vue_vue_type_script_setup_true_lang_default;
|
|
12394
13019
|
|
|
13020
|
+
//#endregion
|
|
13021
|
+
//#region src/core/objects/Refractor.vue?vue&type=script&setup=true&lang.ts
|
|
13022
|
+
const _hoisted_1$31 = ["args", "material-uniforms-color-value"];
|
|
13023
|
+
var Refractor_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
13024
|
+
__name: "Refractor",
|
|
13025
|
+
props: {
|
|
13026
|
+
color: {
|
|
13027
|
+
type: null,
|
|
13028
|
+
required: false,
|
|
13029
|
+
default: "#7f7f7f"
|
|
13030
|
+
},
|
|
13031
|
+
textureWidth: {
|
|
13032
|
+
type: Number,
|
|
13033
|
+
required: false,
|
|
13034
|
+
default: 512
|
|
13035
|
+
},
|
|
13036
|
+
textureHeight: {
|
|
13037
|
+
type: Number,
|
|
13038
|
+
required: false,
|
|
13039
|
+
default: 512
|
|
13040
|
+
},
|
|
13041
|
+
clipBias: {
|
|
13042
|
+
type: Number,
|
|
13043
|
+
required: false,
|
|
13044
|
+
default: 0
|
|
13045
|
+
},
|
|
13046
|
+
multisample: {
|
|
13047
|
+
type: Number,
|
|
13048
|
+
required: false,
|
|
13049
|
+
default: 4
|
|
13050
|
+
},
|
|
13051
|
+
shader: {
|
|
13052
|
+
type: Object,
|
|
13053
|
+
required: false,
|
|
13054
|
+
default: Refractor.RefractorShader
|
|
13055
|
+
}
|
|
13056
|
+
},
|
|
13057
|
+
setup(__props, { expose: __expose }) {
|
|
13058
|
+
const props = __props;
|
|
13059
|
+
const { extend: extend$1, invalidate } = useTres();
|
|
13060
|
+
const refractorRef = shallowRef();
|
|
13061
|
+
extend$1({ Refractor });
|
|
13062
|
+
const { color, textureWidth, textureHeight, clipBias, multisample, shader } = toRefs(props);
|
|
13063
|
+
const colorValue = computed(() => new Color(color.value));
|
|
13064
|
+
watch(props, () => {
|
|
13065
|
+
invalidate();
|
|
13066
|
+
});
|
|
13067
|
+
onBeforeUnmount(() => {
|
|
13068
|
+
refractorRef.value?.dispose();
|
|
13069
|
+
});
|
|
13070
|
+
__expose({ instance: refractorRef });
|
|
13071
|
+
return (_ctx, _cache) => {
|
|
13072
|
+
return openBlock(), createElementBlock("TresRefractor", {
|
|
13073
|
+
ref_key: "refractorRef",
|
|
13074
|
+
ref: refractorRef,
|
|
13075
|
+
args: [void 0, {
|
|
13076
|
+
textureWidth: unref(textureWidth),
|
|
13077
|
+
textureHeight: unref(textureHeight),
|
|
13078
|
+
clipBias: unref(clipBias),
|
|
13079
|
+
multisample: unref(multisample),
|
|
13080
|
+
shader: unref(shader)
|
|
13081
|
+
}],
|
|
13082
|
+
"material-uniforms-color-value": colorValue.value
|
|
13083
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = createElementVNode("TresPlaneGeometry", { args: [5, 5] }, null, -1))])], 8, _hoisted_1$31);
|
|
13084
|
+
};
|
|
13085
|
+
}
|
|
13086
|
+
});
|
|
13087
|
+
|
|
13088
|
+
//#endregion
|
|
13089
|
+
//#region src/core/objects/Refractor.vue
|
|
13090
|
+
var Refractor_default = Refractor_vue_vue_type_script_setup_true_lang_default;
|
|
13091
|
+
|
|
12395
13092
|
//#endregion
|
|
12396
13093
|
//#region src/core/objects/Reflector.vue?vue&type=script&setup=true&lang.ts
|
|
12397
|
-
const _hoisted_1$
|
|
13094
|
+
const _hoisted_1$30 = ["args", "material-uniforms-color-value"];
|
|
12398
13095
|
var Reflector_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
12399
13096
|
__name: "Reflector",
|
|
12400
13097
|
props: {
|
|
@@ -12435,10 +13132,13 @@ var Reflector_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
|
|
|
12435
13132
|
const reflectorRef = shallowRef();
|
|
12436
13133
|
extend$1({ Reflector });
|
|
12437
13134
|
const { color, textureWidth, textureHeight, clipBias, multisample, shader } = toRefs(props);
|
|
12438
|
-
const colorValue = computed(() =>
|
|
13135
|
+
const colorValue = computed(() => new Color(color.value));
|
|
12439
13136
|
watch(props, () => {
|
|
12440
13137
|
invalidate();
|
|
12441
13138
|
});
|
|
13139
|
+
onBeforeUnmount(() => {
|
|
13140
|
+
reflectorRef.value?.dispose();
|
|
13141
|
+
});
|
|
12442
13142
|
__expose({ instance: reflectorRef });
|
|
12443
13143
|
return (_ctx, _cache) => {
|
|
12444
13144
|
return openBlock(), createElementBlock("TresReflector", {
|
|
@@ -12452,7 +13152,7 @@ var Reflector_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defi
|
|
|
12452
13152
|
shader: unref(shader)
|
|
12453
13153
|
}],
|
|
12454
13154
|
"material-uniforms-color-value": colorValue.value
|
|
12455
|
-
}, [renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = createElementVNode("TresPlaneGeometry", { args: [5, 5] }, null, -1))])], 8, _hoisted_1$
|
|
13155
|
+
}, [renderSlot(_ctx.$slots, "default", {}, () => [_cache[0] || (_cache[0] = createElementVNode("TresPlaneGeometry", { args: [5, 5] }, null, -1))])], 8, _hoisted_1$30);
|
|
12456
13156
|
};
|
|
12457
13157
|
}
|
|
12458
13158
|
});
|
|
@@ -12463,7 +13163,7 @@ var Reflector_default = Reflector_vue_vue_type_script_setup_true_lang_default;
|
|
|
12463
13163
|
|
|
12464
13164
|
//#endregion
|
|
12465
13165
|
//#region src/core/objects/Text3D.vue?vue&type=script&setup=true&lang.ts
|
|
12466
|
-
const _hoisted_1$
|
|
13166
|
+
const _hoisted_1$29 = ["args", "center"];
|
|
12467
13167
|
var Text3D_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
12468
13168
|
__name: "Text3D",
|
|
12469
13169
|
props: {
|
|
@@ -12581,7 +13281,7 @@ var Text3D_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineC
|
|
|
12581
13281
|
key: 0,
|
|
12582
13282
|
args: [localText.value, textOptions.value],
|
|
12583
13283
|
center: unref(center)
|
|
12584
|
-
}, null, 8, _hoisted_1$
|
|
13284
|
+
}, null, 8, _hoisted_1$29)) : createCommentVNode("v-if", true), renderSlot(_ctx.$slots, "default")], 512)) : createCommentVNode("v-if", true);
|
|
12585
13285
|
};
|
|
12586
13286
|
}
|
|
12587
13287
|
});
|
|
@@ -12592,8 +13292,8 @@ var Text3D_default = Text3D_vue_vue_type_script_setup_true_lang_default;
|
|
|
12592
13292
|
|
|
12593
13293
|
//#endregion
|
|
12594
13294
|
//#region src/core/shapes/Box.vue?vue&type=script&setup=true&lang.ts
|
|
12595
|
-
const _hoisted_1$
|
|
12596
|
-
const _hoisted_2$
|
|
13295
|
+
const _hoisted_1$28 = ["args"];
|
|
13296
|
+
const _hoisted_2$23 = ["color"];
|
|
12597
13297
|
var Box_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
12598
13298
|
__name: "Box",
|
|
12599
13299
|
props: {
|
|
@@ -12625,7 +13325,7 @@ var Box_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComp
|
|
|
12625
13325
|
return openBlock(), createElementBlock("TresMesh", {
|
|
12626
13326
|
ref_key: "boxRef",
|
|
12627
13327
|
ref: boxRef
|
|
12628
|
-
}, [createElementVNode("TresBoxGeometry", { args: unref(args) }, null, 8, _hoisted_1$
|
|
13328
|
+
}, [createElementVNode("TresBoxGeometry", { args: unref(args) }, null, 8, _hoisted_1$28), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("TresMeshBasicMaterial", { color: unref(color) }, null, 8, _hoisted_2$23)])], 512);
|
|
12629
13329
|
};
|
|
12630
13330
|
}
|
|
12631
13331
|
});
|
|
@@ -12636,7 +13336,7 @@ var Box_default = Box_vue_vue_type_script_setup_true_lang_default;
|
|
|
12636
13336
|
|
|
12637
13337
|
//#endregion
|
|
12638
13338
|
//#region src/core/shapes/Line2.vue?vue&type=script&setup=true&lang.ts
|
|
12639
|
-
const _hoisted_1$
|
|
13339
|
+
const _hoisted_1$27 = ["object"];
|
|
12640
13340
|
var Line2_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
12641
13341
|
__name: "Line2",
|
|
12642
13342
|
props: {
|
|
@@ -12791,7 +13491,7 @@ var Line2_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
12791
13491
|
return openBlock(), createElementBlock("primitive", {
|
|
12792
13492
|
ref: lineRef.value,
|
|
12793
13493
|
object: unref(line$1)
|
|
12794
|
-
}, null, 8, _hoisted_1$
|
|
13494
|
+
}, null, 8, _hoisted_1$27);
|
|
12795
13495
|
};
|
|
12796
13496
|
}
|
|
12797
13497
|
});
|
|
@@ -12919,8 +13619,8 @@ var CatmullRomCurve3_default = CatmullRomCurve3_vue_vue_type_script_setup_true_l
|
|
|
12919
13619
|
|
|
12920
13620
|
//#endregion
|
|
12921
13621
|
//#region src/core/shapes/Circle.vue?vue&type=script&setup=true&lang.ts
|
|
12922
|
-
const _hoisted_1$
|
|
12923
|
-
const _hoisted_2$
|
|
13622
|
+
const _hoisted_1$26 = ["args"];
|
|
13623
|
+
const _hoisted_2$22 = ["color"];
|
|
12924
13624
|
var Circle_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
12925
13625
|
__name: "Circle",
|
|
12926
13626
|
props: {
|
|
@@ -12953,7 +13653,7 @@ var Circle_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineC
|
|
|
12953
13653
|
return openBlock(), createElementBlock("TresMesh", {
|
|
12954
13654
|
ref_key: "circleRef",
|
|
12955
13655
|
ref: circleRef
|
|
12956
|
-
}, [createElementVNode("TresCircleGeometry", { args: unref(args) }, null, 8, _hoisted_1$
|
|
13656
|
+
}, [createElementVNode("TresCircleGeometry", { args: unref(args) }, null, 8, _hoisted_1$26), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("TresMeshBasicMaterial", { color: unref(color) }, null, 8, _hoisted_2$22)])], 512);
|
|
12957
13657
|
};
|
|
12958
13658
|
}
|
|
12959
13659
|
});
|
|
@@ -12964,8 +13664,8 @@ var Circle_default = Circle_vue_vue_type_script_setup_true_lang_default;
|
|
|
12964
13664
|
|
|
12965
13665
|
//#endregion
|
|
12966
13666
|
//#region src/core/shapes/Cone.vue?vue&type=script&setup=true&lang.ts
|
|
12967
|
-
const _hoisted_1$
|
|
12968
|
-
const _hoisted_2$
|
|
13667
|
+
const _hoisted_1$25 = ["args"];
|
|
13668
|
+
const _hoisted_2$21 = ["color"];
|
|
12969
13669
|
var Cone_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
12970
13670
|
__name: "Cone",
|
|
12971
13671
|
props: {
|
|
@@ -13001,7 +13701,7 @@ var Cone_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
13001
13701
|
return openBlock(), createElementBlock("TresMesh", {
|
|
13002
13702
|
ref_key: "coneRef",
|
|
13003
13703
|
ref: coneRef
|
|
13004
|
-
}, [createElementVNode("TresConeGeometry", { args: unref(args) }, null, 8, _hoisted_1$
|
|
13704
|
+
}, [createElementVNode("TresConeGeometry", { args: unref(args) }, null, 8, _hoisted_1$25), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("TresMeshBasicMaterial", { color: unref(color) }, null, 8, _hoisted_2$21)])], 512);
|
|
13005
13705
|
};
|
|
13006
13706
|
}
|
|
13007
13707
|
});
|
|
@@ -13062,8 +13762,8 @@ var CubicBezierLine_default = CubicBezierLine_vue_vue_type_script_setup_true_lan
|
|
|
13062
13762
|
|
|
13063
13763
|
//#endregion
|
|
13064
13764
|
//#region src/core/shapes/Cylinder.vue?vue&type=script&setup=true&lang.ts
|
|
13065
|
-
const _hoisted_1$
|
|
13066
|
-
const _hoisted_2$
|
|
13765
|
+
const _hoisted_1$24 = ["args"];
|
|
13766
|
+
const _hoisted_2$20 = ["color"];
|
|
13067
13767
|
var Cylinder_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
13068
13768
|
__name: "Cylinder",
|
|
13069
13769
|
props: {
|
|
@@ -13100,7 +13800,7 @@ var Cylinder_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defin
|
|
|
13100
13800
|
return openBlock(), createElementBlock("TresMesh", {
|
|
13101
13801
|
ref_key: "cylinderRef",
|
|
13102
13802
|
ref: cylinderRef
|
|
13103
|
-
}, [createElementVNode("TresCylinderGeometry", { args: unref(args) }, null, 8, _hoisted_1$
|
|
13803
|
+
}, [createElementVNode("TresCylinderGeometry", { args: unref(args) }, null, 8, _hoisted_1$24), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("TresMeshBasicMaterial", { color: unref(color) }, null, 8, _hoisted_2$20)])], 512);
|
|
13104
13804
|
};
|
|
13105
13805
|
}
|
|
13106
13806
|
});
|
|
@@ -13111,8 +13811,8 @@ var Cylinder_default = Cylinder_vue_vue_type_script_setup_true_lang_default;
|
|
|
13111
13811
|
|
|
13112
13812
|
//#endregion
|
|
13113
13813
|
//#region src/core/shapes/Dodecahedron.vue?vue&type=script&setup=true&lang.ts
|
|
13114
|
-
const _hoisted_1$
|
|
13115
|
-
const _hoisted_2$
|
|
13814
|
+
const _hoisted_1$23 = ["args"];
|
|
13815
|
+
const _hoisted_2$19 = ["color"];
|
|
13116
13816
|
var Dodecahedron_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
13117
13817
|
__name: "Dodecahedron",
|
|
13118
13818
|
props: {
|
|
@@ -13140,7 +13840,7 @@ var Dodecahedron_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ d
|
|
|
13140
13840
|
return openBlock(), createElementBlock("TresMesh", {
|
|
13141
13841
|
ref_key: "dodecahedronRef",
|
|
13142
13842
|
ref: dodecahedronRef
|
|
13143
|
-
}, [createElementVNode("TresDodecahedronGeometry", { args: unref(args) }, null, 8, _hoisted_1$
|
|
13843
|
+
}, [createElementVNode("TresDodecahedronGeometry", { args: unref(args) }, null, 8, _hoisted_1$23), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("TresMeshBasicMaterial", { color: unref(color) }, null, 8, _hoisted_2$19)])], 512);
|
|
13144
13844
|
};
|
|
13145
13845
|
}
|
|
13146
13846
|
});
|
|
@@ -13151,7 +13851,7 @@ var Dodecahedron_default = Dodecahedron_vue_vue_type_script_setup_true_lang_defa
|
|
|
13151
13851
|
|
|
13152
13852
|
//#endregion
|
|
13153
13853
|
//#region src/core/shapes/Grid.vue?vue&type=script&setup=true&lang.ts
|
|
13154
|
-
const _hoisted_1$
|
|
13854
|
+
const _hoisted_1$22 = [
|
|
13155
13855
|
"side",
|
|
13156
13856
|
"cell-size",
|
|
13157
13857
|
"section-size",
|
|
@@ -13165,7 +13865,7 @@ const _hoisted_1$21 = [
|
|
|
13165
13865
|
"infinite-grid",
|
|
13166
13866
|
"follow-camera"
|
|
13167
13867
|
];
|
|
13168
|
-
const _hoisted_2$
|
|
13868
|
+
const _hoisted_2$18 = ["args"];
|
|
13169
13869
|
var Grid_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
13170
13870
|
__name: "Grid",
|
|
13171
13871
|
props: {
|
|
@@ -13353,7 +14053,7 @@ var Grid_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
13353
14053
|
"fade-from": props.fadeFrom,
|
|
13354
14054
|
"infinite-grid": props.infiniteGrid,
|
|
13355
14055
|
"follow-camera": props.followCamera
|
|
13356
|
-
}, null, 8, _hoisted_1$
|
|
14056
|
+
}, null, 8, _hoisted_1$22), createElementVNode("TresPlaneGeometry", { args: props.args }, null, 8, _hoisted_2$18)], 512);
|
|
13357
14057
|
};
|
|
13358
14058
|
}
|
|
13359
14059
|
});
|
|
@@ -13364,8 +14064,8 @@ var Grid_default = Grid_vue_vue_type_script_setup_true_lang_default;
|
|
|
13364
14064
|
|
|
13365
14065
|
//#endregion
|
|
13366
14066
|
//#region src/core/shapes/Icosahedron.vue?vue&type=script&setup=true&lang.ts
|
|
13367
|
-
const _hoisted_1$
|
|
13368
|
-
const _hoisted_2$
|
|
14067
|
+
const _hoisted_1$21 = ["args"];
|
|
14068
|
+
const _hoisted_2$17 = ["color"];
|
|
13369
14069
|
var Icosahedron_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
13370
14070
|
__name: "Icosahedron",
|
|
13371
14071
|
props: {
|
|
@@ -13393,7 +14093,7 @@ var Icosahedron_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ de
|
|
|
13393
14093
|
return openBlock(), createElementBlock("TresMesh", {
|
|
13394
14094
|
ref_key: "icosahedronRef",
|
|
13395
14095
|
ref: icosahedronRef
|
|
13396
|
-
}, [createElementVNode("TresIcosahedronGeometry", { args: unref(args) }, null, 8, _hoisted_1$
|
|
14096
|
+
}, [createElementVNode("TresIcosahedronGeometry", { args: unref(args) }, null, 8, _hoisted_1$21), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("TresMeshBasicMaterial", { color: unref(color) }, null, 8, _hoisted_2$17)])], 512);
|
|
13397
14097
|
};
|
|
13398
14098
|
}
|
|
13399
14099
|
});
|
|
@@ -13404,8 +14104,8 @@ var Icosahedron_default = Icosahedron_vue_vue_type_script_setup_true_lang_defaul
|
|
|
13404
14104
|
|
|
13405
14105
|
//#endregion
|
|
13406
14106
|
//#region src/core/shapes/Octahedron.vue?vue&type=script&setup=true&lang.ts
|
|
13407
|
-
const _hoisted_1$
|
|
13408
|
-
const _hoisted_2$
|
|
14107
|
+
const _hoisted_1$20 = ["args"];
|
|
14108
|
+
const _hoisted_2$16 = ["color"];
|
|
13409
14109
|
var Octahedron_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
13410
14110
|
__name: "Octahedron",
|
|
13411
14111
|
props: {
|
|
@@ -13433,7 +14133,7 @@ var Octahedron_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ def
|
|
|
13433
14133
|
return openBlock(), createElementBlock("TresMesh", {
|
|
13434
14134
|
ref_key: "octahedronRef",
|
|
13435
14135
|
ref: octahedronRef
|
|
13436
|
-
}, [createElementVNode("TresOctahedronGeometry", { args: unref(args) }, null, 8, _hoisted_1$
|
|
14136
|
+
}, [createElementVNode("TresOctahedronGeometry", { args: unref(args) }, null, 8, _hoisted_1$20), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("TresMeshBasicMaterial", { color: unref(color) }, null, 8, _hoisted_2$16)])], 512);
|
|
13437
14137
|
};
|
|
13438
14138
|
}
|
|
13439
14139
|
});
|
|
@@ -13444,8 +14144,8 @@ var Octahedron_default = Octahedron_vue_vue_type_script_setup_true_lang_default;
|
|
|
13444
14144
|
|
|
13445
14145
|
//#endregion
|
|
13446
14146
|
//#region src/core/shapes/Plane.vue?vue&type=script&setup=true&lang.ts
|
|
13447
|
-
const _hoisted_1$
|
|
13448
|
-
const _hoisted_2$
|
|
14147
|
+
const _hoisted_1$19 = ["rotation"];
|
|
14148
|
+
const _hoisted_2$15 = ["args"];
|
|
13449
14149
|
const _hoisted_3$4 = ["color"];
|
|
13450
14150
|
var Plane_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
13451
14151
|
__name: "Plane",
|
|
@@ -13479,7 +14179,7 @@ var Plane_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCo
|
|
|
13479
14179
|
0,
|
|
13480
14180
|
0
|
|
13481
14181
|
]
|
|
13482
|
-
}, [createElementVNode("TresPlaneGeometry", { args: unref(args) }, null, 8, _hoisted_2$
|
|
14182
|
+
}, [createElementVNode("TresPlaneGeometry", { args: unref(args) }, null, 8, _hoisted_2$15), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("TresMeshBasicMaterial", { color: unref(color) }, null, 8, _hoisted_3$4)])], 8, _hoisted_1$19);
|
|
13483
14183
|
};
|
|
13484
14184
|
}
|
|
13485
14185
|
});
|
|
@@ -13536,8 +14236,8 @@ var QuadraticBezierLine_default = QuadraticBezierLine_vue_vue_type_script_setup_
|
|
|
13536
14236
|
|
|
13537
14237
|
//#endregion
|
|
13538
14238
|
//#region src/core/shapes/Ring.vue?vue&type=script&setup=true&lang.ts
|
|
13539
|
-
const _hoisted_1$
|
|
13540
|
-
const _hoisted_2$
|
|
14239
|
+
const _hoisted_1$18 = ["args"];
|
|
14240
|
+
const _hoisted_2$14 = ["color"];
|
|
13541
14241
|
var Ring_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
13542
14242
|
__name: "Ring",
|
|
13543
14243
|
props: {
|
|
@@ -13568,7 +14268,7 @@ var Ring_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineCom
|
|
|
13568
14268
|
return openBlock(), createElementBlock("TresMesh", {
|
|
13569
14269
|
ref_key: "ringRef",
|
|
13570
14270
|
ref: ringRef
|
|
13571
|
-
}, [createElementVNode("TresRingGeometry", { args: unref(args) }, null, 8, _hoisted_1$
|
|
14271
|
+
}, [createElementVNode("TresRingGeometry", { args: unref(args) }, null, 8, _hoisted_1$18), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("TresMeshBasicMaterial", { color: unref(color) }, null, 8, _hoisted_2$14)])], 512);
|
|
13572
14272
|
};
|
|
13573
14273
|
}
|
|
13574
14274
|
});
|
|
@@ -13579,8 +14279,8 @@ var Ring_default = Ring_vue_vue_type_script_setup_true_lang_default;
|
|
|
13579
14279
|
|
|
13580
14280
|
//#endregion
|
|
13581
14281
|
//#region src/core/shapes/RoundedBox.vue?vue&type=script&setup=true&lang.ts
|
|
13582
|
-
const _hoisted_1$
|
|
13583
|
-
const _hoisted_2$
|
|
14282
|
+
const _hoisted_1$17 = ["args"];
|
|
14283
|
+
const _hoisted_2$13 = ["color"];
|
|
13584
14284
|
var RoundedBox_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
13585
14285
|
__name: "RoundedBox",
|
|
13586
14286
|
props: {
|
|
@@ -13614,7 +14314,7 @@ var RoundedBox_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ def
|
|
|
13614
14314
|
return openBlock(), createElementBlock("TresMesh", {
|
|
13615
14315
|
ref_key: "roundedBoxRef",
|
|
13616
14316
|
ref: roundedBoxRef
|
|
13617
|
-
}, [createElementVNode("TresRoundedBoxGeometry", { args: unref(args) }, null, 8, _hoisted_1$
|
|
14317
|
+
}, [createElementVNode("TresRoundedBoxGeometry", { args: unref(args) }, null, 8, _hoisted_1$17), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("TresMeshBasicMaterial", { color: unref(color) }, null, 8, _hoisted_2$13)])], 512);
|
|
13618
14318
|
};
|
|
13619
14319
|
}
|
|
13620
14320
|
});
|
|
@@ -13623,6 +14323,158 @@ var RoundedBox_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ def
|
|
|
13623
14323
|
//#region src/core/shapes/RoundedBox.vue
|
|
13624
14324
|
var RoundedBox_default = RoundedBox_vue_vue_type_script_setup_true_lang_default;
|
|
13625
14325
|
|
|
14326
|
+
//#endregion
|
|
14327
|
+
//#region src/core/shapes/RoundedPlaneGeometry.ts
|
|
14328
|
+
/**
|
|
14329
|
+
* A plane geometry with rounded corners.
|
|
14330
|
+
*
|
|
14331
|
+
* Vendored from pmndrs/maath (MIT) to avoid an extra dependency.
|
|
14332
|
+
* @see https://github.com/pmndrs/maath/blob/main/packages/maath/src/geometry.ts
|
|
14333
|
+
* @see https://discourse.threejs.org/t/roundedrectangle-squircle/28645/20
|
|
14334
|
+
*/
|
|
14335
|
+
var RoundedPlaneGeometry = class extends BufferGeometry {
|
|
14336
|
+
parameters;
|
|
14337
|
+
constructor(width = 1, height = 1, radius = .2, segments = 16) {
|
|
14338
|
+
super();
|
|
14339
|
+
this.parameters = {
|
|
14340
|
+
width,
|
|
14341
|
+
height,
|
|
14342
|
+
radius,
|
|
14343
|
+
segments
|
|
14344
|
+
};
|
|
14345
|
+
const wi = width / 2 - radius;
|
|
14346
|
+
const hi = height / 2 - radius;
|
|
14347
|
+
const ul = radius / width;
|
|
14348
|
+
const ur = (width - radius) / width;
|
|
14349
|
+
const vl = radius / height;
|
|
14350
|
+
const vh = (height - radius) / height;
|
|
14351
|
+
const positions = [
|
|
14352
|
+
wi,
|
|
14353
|
+
hi,
|
|
14354
|
+
0,
|
|
14355
|
+
-wi,
|
|
14356
|
+
hi,
|
|
14357
|
+
0,
|
|
14358
|
+
-wi,
|
|
14359
|
+
-hi,
|
|
14360
|
+
0,
|
|
14361
|
+
wi,
|
|
14362
|
+
-hi,
|
|
14363
|
+
0
|
|
14364
|
+
];
|
|
14365
|
+
const uvs = [
|
|
14366
|
+
ur,
|
|
14367
|
+
vh,
|
|
14368
|
+
ul,
|
|
14369
|
+
vh,
|
|
14370
|
+
ul,
|
|
14371
|
+
vl,
|
|
14372
|
+
ur,
|
|
14373
|
+
vl
|
|
14374
|
+
];
|
|
14375
|
+
const n = [
|
|
14376
|
+
3 * (segments + 1) + 3,
|
|
14377
|
+
3 * (segments + 1) + 4,
|
|
14378
|
+
segments + 4,
|
|
14379
|
+
segments + 5,
|
|
14380
|
+
2 * (segments + 1) + 4,
|
|
14381
|
+
2,
|
|
14382
|
+
1,
|
|
14383
|
+
2 * (segments + 1) + 3,
|
|
14384
|
+
3,
|
|
14385
|
+
4 * (segments + 1) + 3,
|
|
14386
|
+
4,
|
|
14387
|
+
0
|
|
14388
|
+
];
|
|
14389
|
+
const indices = [
|
|
14390
|
+
n[0],
|
|
14391
|
+
n[1],
|
|
14392
|
+
n[2],
|
|
14393
|
+
n[0],
|
|
14394
|
+
n[2],
|
|
14395
|
+
n[3],
|
|
14396
|
+
n[4],
|
|
14397
|
+
n[5],
|
|
14398
|
+
n[6],
|
|
14399
|
+
n[4],
|
|
14400
|
+
n[6],
|
|
14401
|
+
n[7],
|
|
14402
|
+
n[8],
|
|
14403
|
+
n[9],
|
|
14404
|
+
n[10],
|
|
14405
|
+
n[8],
|
|
14406
|
+
n[10],
|
|
14407
|
+
n[11]
|
|
14408
|
+
];
|
|
14409
|
+
let phi, cos, sin, xc, yc, uc, vc, idx;
|
|
14410
|
+
for (let i = 0; i < 4; i++) {
|
|
14411
|
+
xc = i < 1 || i > 2 ? wi : -wi;
|
|
14412
|
+
yc = i < 2 ? hi : -hi;
|
|
14413
|
+
uc = i < 1 || i > 2 ? ur : ul;
|
|
14414
|
+
vc = i < 2 ? vh : vl;
|
|
14415
|
+
for (let j = 0; j <= segments; j++) {
|
|
14416
|
+
phi = Math.PI / 2 * (i + j / segments);
|
|
14417
|
+
cos = Math.cos(phi);
|
|
14418
|
+
sin = Math.sin(phi);
|
|
14419
|
+
positions.push(xc + radius * cos, yc + radius * sin, 0);
|
|
14420
|
+
uvs.push(uc + ul * cos, vc + vl * sin);
|
|
14421
|
+
if (j < segments) {
|
|
14422
|
+
idx = (segments + 1) * i + j + 4;
|
|
14423
|
+
indices.push(i, idx, idx + 1);
|
|
14424
|
+
}
|
|
14425
|
+
}
|
|
14426
|
+
}
|
|
14427
|
+
this.setIndex(new BufferAttribute(new Uint32Array(indices), 1));
|
|
14428
|
+
this.setAttribute("position", new BufferAttribute(new Float32Array(positions), 3));
|
|
14429
|
+
this.setAttribute("uv", new BufferAttribute(new Float32Array(uvs), 2));
|
|
14430
|
+
}
|
|
14431
|
+
};
|
|
14432
|
+
|
|
14433
|
+
//#endregion
|
|
14434
|
+
//#region src/core/shapes/RoundedPlane.vue?vue&type=script&setup=true&lang.ts
|
|
14435
|
+
const _hoisted_1$16 = ["args"];
|
|
14436
|
+
const _hoisted_2$12 = ["color"];
|
|
14437
|
+
var RoundedPlane_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
14438
|
+
__name: "RoundedPlane",
|
|
14439
|
+
props: {
|
|
14440
|
+
args: {
|
|
14441
|
+
type: Array,
|
|
14442
|
+
required: false,
|
|
14443
|
+
default: () => [
|
|
14444
|
+
1,
|
|
14445
|
+
1,
|
|
14446
|
+
.2,
|
|
14447
|
+
16
|
|
14448
|
+
]
|
|
14449
|
+
},
|
|
14450
|
+
color: {
|
|
14451
|
+
type: null,
|
|
14452
|
+
required: false,
|
|
14453
|
+
default: "#ffffff"
|
|
14454
|
+
}
|
|
14455
|
+
},
|
|
14456
|
+
setup(__props, { expose: __expose }) {
|
|
14457
|
+
const { args, color } = toRefs(__props);
|
|
14458
|
+
const { invalidate, extend: extend$1 } = useTres();
|
|
14459
|
+
extend$1({ RoundedPlaneGeometry });
|
|
14460
|
+
watch(args, () => {
|
|
14461
|
+
invalidate();
|
|
14462
|
+
});
|
|
14463
|
+
const roundedPlaneRef = shallowRef();
|
|
14464
|
+
__expose({ instance: roundedPlaneRef });
|
|
14465
|
+
return (_ctx, _cache) => {
|
|
14466
|
+
return openBlock(), createElementBlock("TresMesh", {
|
|
14467
|
+
ref_key: "roundedPlaneRef",
|
|
14468
|
+
ref: roundedPlaneRef
|
|
14469
|
+
}, [createElementVNode("TresRoundedPlaneGeometry", { args: unref(args) }, null, 8, _hoisted_1$16), renderSlot(_ctx.$slots, "default", {}, () => [createElementVNode("TresMeshBasicMaterial", { color: unref(color) }, null, 8, _hoisted_2$12)])], 512);
|
|
14470
|
+
};
|
|
14471
|
+
}
|
|
14472
|
+
});
|
|
14473
|
+
|
|
14474
|
+
//#endregion
|
|
14475
|
+
//#region src/core/shapes/RoundedPlane.vue
|
|
14476
|
+
var RoundedPlane_default = RoundedPlane_vue_vue_type_script_setup_true_lang_default;
|
|
14477
|
+
|
|
13626
14478
|
//#endregion
|
|
13627
14479
|
//#region src/core/shapes/ScreenQuad.vue?vue&type=script&setup=true&lang.ts
|
|
13628
14480
|
const _hoisted_1$15 = ["geometry"];
|
|
@@ -14731,7 +15583,7 @@ const _hoisted_1$5 = [
|
|
|
14731
15583
|
"transparent",
|
|
14732
15584
|
"size-attenuation"
|
|
14733
15585
|
];
|
|
14734
|
-
const _hoisted_2$3 = ["position"
|
|
15586
|
+
const _hoisted_2$3 = ["position"];
|
|
14735
15587
|
var Precipitation_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
|
|
14736
15588
|
__name: "Precipitation",
|
|
14737
15589
|
props: {
|
|
@@ -14814,15 +15666,15 @@ var Precipitation_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
14814
15666
|
setup(__props, { expose: __expose }) {
|
|
14815
15667
|
const { size, area, color, alphaMap: alphaMapUrl, map: mapUrl, opacity, alphaTest, depthWrite, transparent, sizeAttenuation, count, speed, randomness } = toRefs(__props);
|
|
14816
15668
|
const geometryRef = shallowRef();
|
|
14817
|
-
|
|
14818
|
-
let velocityArray =
|
|
15669
|
+
const positionArray = shallowRef(new Float32Array());
|
|
15670
|
+
let velocityArray = new Float32Array();
|
|
14819
15671
|
const setPosition = () => {
|
|
14820
|
-
positionArray = new Float32Array(count.value * 3);
|
|
15672
|
+
positionArray.value = new Float32Array(count.value * 3);
|
|
14821
15673
|
for (let i = 0; i < count.value; i++) {
|
|
14822
15674
|
const i3 = i * 3;
|
|
14823
|
-
positionArray[i3] = (Math.random() - .5) * area.value[0];
|
|
14824
|
-
positionArray[i3 + 1] = (Math.random() - .5) * area.value[1];
|
|
14825
|
-
positionArray[i3 + 2] = (Math.random() - .5) * area.value[2];
|
|
15675
|
+
positionArray.value[i3] = (Math.random() - .5) * area.value[0];
|
|
15676
|
+
positionArray.value[i3 + 1] = (Math.random() - .5) * area.value[1];
|
|
15677
|
+
positionArray.value[i3 + 2] = (Math.random() - .5) * area.value[2];
|
|
14826
15678
|
}
|
|
14827
15679
|
};
|
|
14828
15680
|
const setSpeed = () => {
|
|
@@ -14834,12 +15686,15 @@ var Precipitation_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
14834
15686
|
};
|
|
14835
15687
|
setSpeed();
|
|
14836
15688
|
setPosition();
|
|
14837
|
-
watch(
|
|
15689
|
+
watch(count, () => {
|
|
15690
|
+
setPosition();
|
|
14838
15691
|
setSpeed();
|
|
14839
15692
|
});
|
|
14840
|
-
|
|
14841
|
-
if (
|
|
14842
|
-
|
|
15693
|
+
watch(area, (newVal, oldVal) => {
|
|
15694
|
+
if (!oldVal || newVal[0] !== oldVal[0] || newVal[1] !== oldVal[1] || newVal[2] !== oldVal[2]) setPosition();
|
|
15695
|
+
}, { deep: true });
|
|
15696
|
+
watch([randomness, speed], () => {
|
|
15697
|
+
setSpeed();
|
|
14843
15698
|
});
|
|
14844
15699
|
const alphaMapTexture = shallowRef(null);
|
|
14845
15700
|
const mapTexture = shallowRef(null);
|
|
@@ -14887,8 +15742,7 @@ var Precipitation_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
|
|
|
14887
15742
|
}, null, 8, _hoisted_1$5), createElementVNode("TresBufferGeometry", {
|
|
14888
15743
|
ref_key: "geometryRef",
|
|
14889
15744
|
ref: geometryRef,
|
|
14890
|
-
position: [
|
|
14891
|
-
velocity: [unref(velocityArray)]
|
|
15745
|
+
position: [positionArray.value, 3]
|
|
14892
15746
|
}, null, 8, _hoisted_2$3)], 512);
|
|
14893
15747
|
};
|
|
14894
15748
|
}
|
|
@@ -16123,4 +16977,4 @@ function extractBindingPosition(binding) {
|
|
|
16123
16977
|
}
|
|
16124
16978
|
|
|
16125
16979
|
//#endregion
|
|
16126
|
-
export { component_default as AccumulativeShadows, Align_default as Align, component_default$1 as AnimatedSprite, Backdrop_default as Backdrop, BakeShadows, BaseCameraControls, Billboard_default as Billboard, component_default$2 as Bounds, Box_default as Box, CameraControls_default as CameraControls, CameraShake_default as CameraShake, CatmullRomCurve3_default as CatmullRomCurve3, Circle_default as Circle, CircleShadow_default as CircleShadow, Cone_default as Cone, ContactShadows_default as ContactShadows, component_default$3 as CubeCamera, CubicBezierLine_default as CubicBezierLine, customShaderMaterial_default as CustomShaderMaterial, Cylinder_default as Cylinder, Decal_default as Decal, DecalDebugUI_default as DecalDebugUI, Dodecahedron_default as Dodecahedron, Edges_default as Edges, component_default$4 as Environment, component_default$5 as FBXModel, component_default$6 as Fbo, Fit_default as Fit, component_default$7 as GLTFModel, GlobalAudio, GradientTexture_default as GradientTexture, Grid_default as Grid, component_default$8 as Helper, holographicMaterial_default as HolographicMaterial, HTML_default as Html, Icosahedron_default as Icosahedron, component_default$9 as Image, KeyboardControls_default as KeyboardControls, LOD_default as LOD, component_default$10 as Lensflare, Levioso_default as Levioso, lightformer_default as Lightformer, Line2_default as Line2, MapControls_default as MapControls, MarchingCube_default as MarchingCube, MarchingCubes_default as MarchingCubes, MarchingPlane_default as MarchingPlane, component_default$11 as Mask, meshDiscardMaterial_default as MeshDiscardMaterial, meshGlassMaterial_default as MeshGlassMaterial, meshReflectionMaterial_default as MeshReflectionMaterial, meshTransmissionMaterial_default as MeshTransmissionMaterial, meshWobbleMaterial_default as MeshWobbleMaterial, MouseParallax_default as MouseParallax, Ocean_default as Ocean, Octahedron_default as Octahedron, OrbitControls_default as OrbitControls, component_default$12 as Outline, Plane_default as Plane, component_default$13 as PointMaterial, PointerLockControls_default as PointerLockControls, PositionalAudio_default as PositionalAudio, Precipitation_default as Precipitation, QuadraticBezierLine_default as QuadraticBezierLine, component_default$14 as RandomizedLights, Reflector_default as Reflector, Ring_default as Ring, RoundedBox_default as RoundedBox, component_default$15 as Sampler, ScreenQuad_default as ScreenQuad, ScreenSizer_default as ScreenSizer, ScreenSpace_default as ScreenSpace, ScrollControls_default as ScrollControls, Sky_default as Sky, Smoke_default as Smoke, SoftShadows_default as SoftShadows, component_default$16 as Sparkles, Sphere_default as Sphere, Stage_default as Stage, Stars_default as Stars, Stats, StatsGl, Superformula_default as Superformula, Tetrahedron_default as Tetrahedron, Text3D_default as Text3D, Torus_default as Torus, TorusKnot_default as TorusKnot, TransformControls_default as TransformControls, Tube_default as Tube, component_default$17 as UseSVG, component_default$18 as UseTexture, ensureTextureNames, extractBindingPosition, getTextureAspect, getTextureName, hasSetter, invalidateDecalGeometry, pick, useAnimations, useBVH, useDecalEditor, useEnvironment, useFBO, useFBX, useGLTF, useGLTFExporter, useHelper, useIntersect, useMask, useProgress, useSVG, useSurfaceSampler, useTexture, useTextures, useVideoTexture };
|
|
16980
|
+
export { component_default as AccumulativeShadows, Align_default as Align, component_default$1 as AnimatedSprite, Backdrop_default as Backdrop, BakeShadows, BaseCameraControls, Billboard_default as Billboard, component_default$2 as Bounds, Box_default as Box, CameraControls_default as CameraControls, CameraShake_default as CameraShake, CatmullRomCurve3_default as CatmullRomCurve3, Circle_default as Circle, CircleShadow_default as CircleShadow, Cone_default as Cone, ContactShadows_default as ContactShadows, component_default$3 as CubeCamera, CubicBezierLine_default as CubicBezierLine, customShaderMaterial_default as CustomShaderMaterial, Cylinder_default as Cylinder, Decal_default as Decal, DecalDebugUI_default as DecalDebugUI, Dodecahedron_default as Dodecahedron, Edges_default as Edges, component_default$4 as Environment, component_default$5 as FBXModel, component_default$6 as Fbo, Fit_default as Fit, component_default$7 as GLTFModel, GlobalAudio, GradientTexture_default as GradientTexture, Grid_default as Grid, component_default$8 as Helper, holographicMaterial_default as HolographicMaterial, HTML_default as Html, INSTANCES_INJECTION_KEY, Icosahedron_default as Icosahedron, component_default$9 as Image, Instance_default as Instance, Instances_default as Instances, KeyboardControls_default as KeyboardControls, LOD_default as LOD, component_default$10 as Lensflare, Levioso_default as Levioso, lightformer_default as Lightformer, Line2_default as Line2, MERGED_INJECTION_KEY, MapControls_default as MapControls, MarchingCube_default as MarchingCube, MarchingCubes_default as MarchingCubes, MarchingPlane_default as MarchingPlane, component_default$11 as Mask, Merged_default as Merged, meshDiscardMaterial_default as MeshDiscardMaterial, meshGlassMaterial_default as MeshGlassMaterial, meshPortalMaterial_default as MeshPortalMaterial, meshReflectionMaterial_default as MeshReflectionMaterial, meshTransmissionMaterial_default as MeshTransmissionMaterial, meshWobbleMaterial_default as MeshWobbleMaterial, MouseParallax_default as MouseParallax, Ocean_default as Ocean, Octahedron_default as Octahedron, OrbitControls_default as OrbitControls, component_default$12 as Outline, Plane_default as Plane, component_default$13 as PointMaterial, PointerLockControls_default as PointerLockControls, PositionMesh, PositionalAudio_default as PositionalAudio, Precipitation_default as Precipitation, QuadraticBezierLine_default as QuadraticBezierLine, component_default$14 as RandomizedLights, Reflector_default as Reflector, Refractor_default as Refractor, Ring_default as Ring, RoundedBox_default as RoundedBox, RoundedPlane_default as RoundedPlane, component_default$15 as Sampler, ScreenQuad_default as ScreenQuad, ScreenSizer_default as ScreenSizer, ScreenSpace_default as ScreenSpace, ScrollControls_default as ScrollControls, Sky_default as Sky, Smoke_default as Smoke, SoftShadows_default as SoftShadows, component_default$16 as Sparkles, Sphere_default as Sphere, Stage_default as Stage, Stars_default as Stars, Stats, StatsGl, Superformula_default as Superformula, Tetrahedron_default as Tetrahedron, Text3D_default as Text3D, Torus_default as Torus, TorusKnot_default as TorusKnot, TransformControls_default as TransformControls, Tube_default as Tube, component_default$17 as UseSVG, component_default$18 as UseTexture, ensureTextureNames, extractBindingPosition, getTextureAspect, getTextureName, hasSetter, invalidateDecalGeometry, pick, useAnimations, useBVH, useDecalEditor, useEnvironment, useFBO, useFBX, useGLTF, useGLTFExporter, useHelper, useIntersect, useMask, useProgress, useSVG, useSurfaceSampler, useTexture, useTextures, useVideoTexture };
|