@gamelearn/arcade-components 3.32.3 → 3.32.4
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.
|
@@ -20,7 +20,7 @@ var Nc = (l, e, n, t) => ({
|
|
|
20
20
|
import * as React$2 from "react";
|
|
21
21
|
import React__default, { useRef, useEffect, useCallback, createContext, useReducer, forwardRef, useImperativeHandle, useMemo, useContext, useLayoutEffect, useState } from "react";
|
|
22
22
|
import { OrbitControls, PerspectiveCamera as PerspectiveCamera$1, Environment } from "@react-three/drei";
|
|
23
|
-
import { Renderer, SceneResource, CameraControls, SettingsController, QualityManager, HtmlPro,
|
|
23
|
+
import { Renderer, SceneResource, CameraControls, SettingsController, ProgressManager, QualityManager, HtmlPro, AssetLoader } from "@gamelearn/arcade-three-core";
|
|
24
24
|
import { useThree, useFrame } from "@react-three/fiber";
|
|
25
25
|
import { Vector3, Box3, TrianglesDrawMode, TriangleFanDrawMode, TriangleStripDrawMode, Loader, LoaderUtils, FileLoader, Color, LinearSRGBColorSpace, SpotLight, PointLight, DirectionalLight, MeshBasicMaterial, SRGBColorSpace, MeshPhysicalMaterial, Vector2, Matrix4, Quaternion, InstancedMesh, InstancedBufferAttribute, Object3D, TextureLoader, ImageBitmapLoader, BufferAttribute, InterleavedBuffer, InterleavedBufferAttribute, LinearFilter, LinearMipmapLinearFilter, RepeatWrapping, PointsMaterial, Material, LineBasicMaterial, MeshStandardMaterial, DoubleSide, PropertyBinding, BufferGeometry, SkinnedMesh, Mesh, LineSegments, Line as Line$3, LineLoop, Points, Group as Group$3, PerspectiveCamera, MathUtils, OrthographicCamera, Skeleton, AnimationClip, Bone, InterpolateLinear, ColorManagement, NearestFilter, NearestMipmapNearestFilter, LinearMipmapNearestFilter, NearestMipmapLinearFilter, ClampToEdgeWrapping, MirroredRepeatWrapping, InterpolateDiscrete, FrontSide, Texture, VectorKeyframeTrack, NumberKeyframeTrack, QuaternionKeyframeTrack, Sphere, Interpolant, Raycaster, LoopRepeat } from "three";
|
|
26
26
|
import require$$0 from "react-dom";
|
|
@@ -29827,21 +29827,29 @@ function Panel({ character: l, ttsStarted: e, active: n, visible: t = !0, onLoad
|
|
|
29827
29827
|
] });
|
|
29828
29828
|
}
|
|
29829
29829
|
function PanelsWrapper({ characters: l, slots: e, ttsStarted: n, flex: t, currentMessage: s, lod: o }) {
|
|
29830
|
-
|
|
29831
|
-
|
|
29832
|
-
|
|
29833
|
-
|
|
29834
|
-
const
|
|
29835
|
-
|
|
29836
|
-
|
|
29837
|
-
|
|
29830
|
+
const [d, h] = useState(!1);
|
|
29831
|
+
return useFrame(({ gl: f }) => {
|
|
29832
|
+
f.setScissorTest(!1), f.clear(!0, !0), f.setScissorTest(!0);
|
|
29833
|
+
}), useEffect(() => {
|
|
29834
|
+
const f = () => {
|
|
29835
|
+
h(!0);
|
|
29836
|
+
};
|
|
29837
|
+
return ProgressManager.addEventListener("loaded", f), () => {
|
|
29838
|
+
ProgressManager.removeEventListener("loaded", f);
|
|
29839
|
+
};
|
|
29840
|
+
}, []), /* @__PURE__ */ jsxRuntimeExports.jsx(QualityManager, { lod: d ? o : "divideby64", active: d, children: e.map((f, u) => {
|
|
29841
|
+
let p = null;
|
|
29842
|
+
const _ = l.findIndex((T) => T && T.uid === f.uid);
|
|
29843
|
+
if (_ >= 0) {
|
|
29844
|
+
const T = t ? _ : u;
|
|
29845
|
+
return p = { ...l[_] }, p.slot = T, /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29838
29846
|
Panel,
|
|
29839
29847
|
{
|
|
29840
|
-
character:
|
|
29841
|
-
active: s.position ===
|
|
29848
|
+
character: p,
|
|
29849
|
+
active: s.position === T,
|
|
29842
29850
|
ttsStarted: n
|
|
29843
29851
|
},
|
|
29844
|
-
`${`${
|
|
29852
|
+
`${`${p.uid}_${u}`}`
|
|
29845
29853
|
);
|
|
29846
29854
|
}
|
|
29847
29855
|
return null;
|