@gamelearn/arcade-components 3.32.3 → 3.32.5
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";
|
|
@@ -748,16 +748,7 @@ NoticeComponent.defaultProps = {
|
|
|
748
748
|
new Vector3(1, 0, 0);
|
|
749
749
|
new Vector3(0, 1, 0);
|
|
750
750
|
new Vector3(0, 0, 1);
|
|
751
|
-
const bones = [
|
|
752
|
-
"Jaw_M",
|
|
753
|
-
"L_lip_jnt",
|
|
754
|
-
"R_lip_jnt",
|
|
755
|
-
"joint4"
|
|
756
|
-
// 'R_LowerLid_jnt',
|
|
757
|
-
// 'L_LowerLid_jnt',
|
|
758
|
-
// 'L_UpperLid_jnt',
|
|
759
|
-
// 'R_UpperLid_jnt',
|
|
760
|
-
], BASIC_ACTIONS_TYPES_WHITELIST = [
|
|
751
|
+
const bones = ["Jaw_M", "L_lip_jnt", "R_lip_jnt", "joint4"], BASIC_ACTIONS_TYPES_WHITELIST = [
|
|
761
752
|
"61408041e917240012e96b17",
|
|
762
753
|
// Affirmative
|
|
763
754
|
"61407ff1e917240012e96a8a",
|
|
@@ -29827,21 +29818,29 @@ function Panel({ character: l, ttsStarted: e, active: n, visible: t = !0, onLoad
|
|
|
29827
29818
|
] });
|
|
29828
29819
|
}
|
|
29829
29820
|
function PanelsWrapper({ characters: l, slots: e, ttsStarted: n, flex: t, currentMessage: s, lod: o }) {
|
|
29830
|
-
|
|
29831
|
-
|
|
29832
|
-
|
|
29833
|
-
|
|
29834
|
-
const
|
|
29835
|
-
|
|
29836
|
-
|
|
29837
|
-
|
|
29821
|
+
const [d, h] = useState(!1);
|
|
29822
|
+
return useFrame(({ gl: f }) => {
|
|
29823
|
+
f.setScissorTest(!1), f.clear(!0, !0), f.setScissorTest(!0);
|
|
29824
|
+
}), useEffect(() => {
|
|
29825
|
+
const f = () => {
|
|
29826
|
+
h(!0);
|
|
29827
|
+
};
|
|
29828
|
+
return ProgressManager.addEventListener("loaded", f), () => {
|
|
29829
|
+
ProgressManager.removeEventListener("loaded", f);
|
|
29830
|
+
};
|
|
29831
|
+
}, []), /* @__PURE__ */ jsxRuntimeExports.jsx(QualityManager, { lod: d ? o : "divideby64", active: d, children: e.map((f, u) => {
|
|
29832
|
+
let p = null;
|
|
29833
|
+
const _ = l.findIndex((T) => T && T.uid === f.uid);
|
|
29834
|
+
if (_ >= 0) {
|
|
29835
|
+
const T = t ? _ : u;
|
|
29836
|
+
return p = { ...l[_] }, p.slot = T, /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
29838
29837
|
Panel,
|
|
29839
29838
|
{
|
|
29840
|
-
character:
|
|
29841
|
-
active: s.position ===
|
|
29839
|
+
character: p,
|
|
29840
|
+
active: s.position === T,
|
|
29842
29841
|
ttsStarted: n
|
|
29843
29842
|
},
|
|
29844
|
-
`${`${
|
|
29843
|
+
`${`${p.uid}_${u}`}`
|
|
29845
29844
|
);
|
|
29846
29845
|
}
|
|
29847
29846
|
return null;
|
|
@@ -61421,12 +61420,13 @@ function Animation({ animation: l, loopTimes: e, onAnimationFinish: n, onAnimati
|
|
|
61421
61420
|
t({ uid: s.uid, animation: l == null ? void 0 : l.id, index: p.index }), n();
|
|
61422
61421
|
else {
|
|
61423
61422
|
const _ = p.userData.animator, T = () => {
|
|
61424
|
-
_.getAction(l.url)
|
|
61423
|
+
const x = _.getAction(l.url);
|
|
61424
|
+
x.setLoop(LoopRepeat, 1 / 0), x.reset();
|
|
61425
61425
|
function S() {
|
|
61426
|
-
u.current >= e && (_.mix("idle"), n(), _.removeEventListener("loop", S))
|
|
61426
|
+
u.current += 1, u.current >= e && (_.mix("idle"), n(), _.removeEventListener("loop", S));
|
|
61427
61427
|
}
|
|
61428
61428
|
_.mix(l == null ? void 0 : l.url).then((g) => {
|
|
61429
|
-
g && _.addEventListener("loop", S);
|
|
61429
|
+
g && (u.current = 1, _.addEventListener("loop", S));
|
|
61430
61430
|
}), h(!0);
|
|
61431
61431
|
};
|
|
61432
61432
|
_.getAction(l == null ? void 0 : l.url) ? T() : assetLoader.load(
|