@holoscript/engine 6.0.3 → 6.0.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.
- package/dist/AutoMesher-CK47F6AV.js +17 -0
- package/dist/GPUBuffers-2LHBCD7X.js +9 -0
- package/dist/WebGPUContext-TNEUYU2Y.js +11 -0
- package/dist/animation/index.cjs +38 -38
- package/dist/animation/index.d.cts +1 -1
- package/dist/animation/index.d.ts +1 -1
- package/dist/animation/index.js +1 -1
- package/dist/audio/index.cjs +16 -6
- package/dist/audio/index.d.cts +1 -1
- package/dist/audio/index.d.ts +1 -1
- package/dist/audio/index.js +1 -1
- package/dist/camera/index.cjs +23 -23
- package/dist/camera/index.d.cts +1 -1
- package/dist/camera/index.d.ts +1 -1
- package/dist/camera/index.js +1 -1
- package/dist/character/index.cjs +6 -4
- package/dist/character/index.js +1 -1
- package/dist/choreography/index.cjs +1194 -0
- package/dist/choreography/index.d.cts +687 -0
- package/dist/choreography/index.d.ts +687 -0
- package/dist/choreography/index.js +1156 -0
- package/dist/chunk-2CSNRI2N.js +217 -0
- package/dist/chunk-33T2WINR.js +266 -0
- package/dist/chunk-35R73OFM.js +1257 -0
- package/dist/chunk-4MMDSUNP.js +1256 -0
- package/dist/chunk-5V6HOU72.js +319 -0
- package/dist/chunk-6QOP6PYF.js +1038 -0
- package/dist/chunk-7KMJVHIL.js +8944 -0
- package/dist/chunk-7VPUC62U.js +1106 -0
- package/dist/chunk-A2Y6RCAT.js +1878 -0
- package/dist/chunk-AHM42MK6.js +8944 -0
- package/dist/chunk-BL7IDTHE.js +218 -0
- package/dist/chunk-CITOMSWL.js +10462 -0
- package/dist/chunk-CXDPKW2K.js +8944 -0
- package/dist/chunk-CXZPLD4S.js +223 -0
- package/dist/chunk-CZYJE7IH.js +5169 -0
- package/dist/chunk-D2OP7YC7.js +6325 -0
- package/dist/chunk-EDRVQHUU.js +1544 -0
- package/dist/chunk-EJSLOOW2.js +3589 -0
- package/dist/chunk-F53SFGW5.js +1878 -0
- package/dist/chunk-HCFPELPY.js +919 -0
- package/dist/chunk-HNEE36PY.js +93 -0
- package/dist/chunk-HYXNV36F.js +1256 -0
- package/dist/chunk-IB7KHVFY.js +821 -0
- package/dist/chunk-IBBO7YYG.js +690 -0
- package/dist/chunk-ILIBGINU.js +5470 -0
- package/dist/chunk-IS4MHLKN.js +5479 -0
- package/dist/chunk-JT2PFKWD.js +5479 -0
- package/dist/chunk-K4CUB4NY.js +1038 -0
- package/dist/chunk-KATDQXRJ.js +10462 -0
- package/dist/chunk-KBQE6ZFJ.js +8944 -0
- package/dist/chunk-KBVD5K7E.js +560 -0
- package/dist/chunk-KCDPVQRY.js +4088 -0
- package/dist/chunk-KN4QJPKN.js +8944 -0
- package/dist/chunk-KWJ3ROSI.js +8944 -0
- package/dist/chunk-L45VF6DD.js +919 -0
- package/dist/chunk-LY4T37YK.js +307 -0
- package/dist/chunk-MDN5WZXA.js +1544 -0
- package/dist/chunk-MGCDP6VU.js +928 -0
- package/dist/chunk-NCX7X6G2.js +8681 -0
- package/dist/chunk-OF54BPVD.js +913 -0
- package/dist/chunk-OWSN2Q3Q.js +690 -0
- package/dist/chunk-PRRB5TTA.js +406 -0
- package/dist/chunk-PXWVQF76.js +4086 -0
- package/dist/chunk-PYCOIDT2.js +812 -0
- package/dist/chunk-PZCSADOV.js +928 -0
- package/dist/chunk-Q2XBVS2K.js +1038 -0
- package/dist/chunk-QDZRXWN5.js +1776 -0
- package/dist/chunk-RNWOZ6WQ.js +913 -0
- package/dist/chunk-ROLFT4CJ.js +1693 -0
- package/dist/chunk-SLTJRZ2N.js +266 -0
- package/dist/chunk-SRUS5XSU.js +4088 -0
- package/dist/chunk-TKCA3WZ5.js +5409 -0
- package/dist/chunk-TNRMXYI2.js +1650 -0
- package/dist/chunk-TQB3GJGM.js +9763 -0
- package/dist/chunk-TUFGXG6K.js +510 -0
- package/dist/chunk-U6KMTGQJ.js +632 -0
- package/dist/chunk-VMGJQST6.js +8681 -0
- package/dist/chunk-X4F4TCG4.js +5470 -0
- package/dist/chunk-ZIFROE75.js +1544 -0
- package/dist/chunk-ZIJQYHSQ.js +1204 -0
- package/dist/combat/index.cjs +4 -4
- package/dist/combat/index.d.cts +1 -1
- package/dist/combat/index.d.ts +1 -1
- package/dist/combat/index.js +1 -1
- package/dist/ecs/index.cjs +1 -1
- package/dist/ecs/index.js +1 -1
- package/dist/environment/index.cjs +14 -14
- package/dist/environment/index.d.cts +1 -1
- package/dist/environment/index.d.ts +1 -1
- package/dist/environment/index.js +1 -1
- package/dist/gpu/index.cjs +4810 -0
- package/dist/gpu/index.js +3714 -0
- package/dist/hologram/index.cjs +27 -1
- package/dist/hologram/index.js +1 -1
- package/dist/index-B2PIsAmR.d.cts +2180 -0
- package/dist/index-B2PIsAmR.d.ts +2180 -0
- package/dist/index-BHySEPX7.d.cts +2921 -0
- package/dist/index-BJV21zuy.d.cts +341 -0
- package/dist/index-BJV21zuy.d.ts +341 -0
- package/dist/index-BQutTphC.d.cts +790 -0
- package/dist/index-ByIq2XrS.d.cts +3910 -0
- package/dist/index-BysHjDSO.d.cts +224 -0
- package/dist/index-BysHjDSO.d.ts +224 -0
- package/dist/index-CKwAJGck.d.ts +455 -0
- package/dist/index-CUl3QstQ.d.cts +3006 -0
- package/dist/index-CUl3QstQ.d.ts +3006 -0
- package/dist/index-CmYtNiI-.d.cts +953 -0
- package/dist/index-CmYtNiI-.d.ts +953 -0
- package/dist/index-CnRzWxi_.d.cts +522 -0
- package/dist/index-CnRzWxi_.d.ts +522 -0
- package/dist/index-CwRWbSC7.d.ts +2921 -0
- package/dist/index-CxKIBstO.d.ts +790 -0
- package/dist/index-DJ6-R8vh.d.cts +455 -0
- package/dist/index-DQKisbcI.d.cts +4968 -0
- package/dist/index-DQKisbcI.d.ts +4968 -0
- package/dist/index-DRT2zJez.d.ts +3910 -0
- package/dist/index-DfNLiAka.d.cts +192 -0
- package/dist/index-DfNLiAka.d.ts +192 -0
- package/dist/index-nMvkoRm8.d.cts +405 -0
- package/dist/index-nMvkoRm8.d.ts +405 -0
- package/dist/index-s9yOFU37.d.cts +604 -0
- package/dist/index-s9yOFU37.d.ts +604 -0
- package/dist/index.cjs +22966 -6960
- package/dist/index.d.cts +864 -20
- package/dist/index.d.ts +864 -20
- package/dist/index.js +3062 -48
- package/dist/input/index.cjs +1 -1
- package/dist/input/index.js +1 -1
- package/dist/orbital/index.cjs +3 -3
- package/dist/orbital/index.d.cts +1 -1
- package/dist/orbital/index.d.ts +1 -1
- package/dist/orbital/index.js +1 -1
- package/dist/particles/index.cjs +16 -16
- package/dist/particles/index.d.cts +1 -1
- package/dist/particles/index.d.ts +1 -1
- package/dist/particles/index.js +1 -1
- package/dist/physics/index.cjs +2377 -21
- package/dist/physics/index.d.cts +1 -1
- package/dist/physics/index.d.ts +1 -1
- package/dist/physics/index.js +35 -1
- package/dist/postfx/index.cjs +3491 -0
- package/dist/postfx/index.js +93 -0
- package/dist/procedural/index.cjs +1 -1
- package/dist/procedural/index.js +1 -1
- package/dist/puppeteer-5VF6KDVO.js +52197 -0
- package/dist/puppeteer-IZVZ3SG4.js +52197 -0
- package/dist/rendering/index.cjs +33 -32
- package/dist/rendering/index.d.cts +1 -1
- package/dist/rendering/index.d.ts +1 -1
- package/dist/rendering/index.js +8 -6
- package/dist/runtime/index.cjs +23 -13
- package/dist/runtime/index.d.cts +1 -1
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.js +8 -6
- package/dist/runtime/protocols/index.cjs +349 -0
- package/dist/runtime/protocols/index.js +15 -0
- package/dist/scene/index.cjs +8 -8
- package/dist/scene/index.d.cts +1 -1
- package/dist/scene/index.d.ts +1 -1
- package/dist/scene/index.js +1 -1
- package/dist/shader/index.cjs +3087 -0
- package/dist/shader/index.js +3044 -0
- package/dist/simulation/index.cjs +10680 -0
- package/dist/simulation/index.d.cts +3 -0
- package/dist/simulation/index.d.ts +3 -0
- package/dist/simulation/index.js +307 -0
- package/dist/spatial/index.cjs +2443 -0
- package/dist/spatial/index.d.cts +1545 -0
- package/dist/spatial/index.d.ts +1545 -0
- package/dist/spatial/index.js +2400 -0
- package/dist/terrain/index.cjs +1 -1
- package/dist/terrain/index.d.cts +1 -1
- package/dist/terrain/index.d.ts +1 -1
- package/dist/terrain/index.js +1 -1
- package/dist/transformers.node-4NKAPD5U.js +45620 -0
- package/dist/vm/index.cjs +7 -8
- package/dist/vm/index.d.cts +1 -1
- package/dist/vm/index.d.ts +1 -1
- package/dist/vm/index.js +1 -1
- package/dist/vm-bridge/index.cjs +2 -2
- package/dist/vm-bridge/index.d.cts +2 -2
- package/dist/vm-bridge/index.d.ts +2 -2
- package/dist/vm-bridge/index.js +1 -1
- package/dist/vr/index.cjs +6 -6
- package/dist/vr/index.js +1 -1
- package/dist/world/index.cjs +3 -3
- package/dist/world/index.d.cts +1 -1
- package/dist/world/index.d.ts +1 -1
- package/dist/world/index.js +1 -1
- package/package.json +53 -21
- package/LICENSE +0 -21
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
findNodesInSphere,
|
|
3
|
+
findNodesOnFace,
|
|
4
|
+
meshBox,
|
|
5
|
+
meshQuality,
|
|
6
|
+
meshSurface,
|
|
7
|
+
registerWasmMesher
|
|
8
|
+
} from "./chunk-BL7IDTHE.js";
|
|
9
|
+
import "./chunk-AKLW2MUS.js";
|
|
10
|
+
export {
|
|
11
|
+
findNodesInSphere,
|
|
12
|
+
findNodesOnFace,
|
|
13
|
+
meshBox,
|
|
14
|
+
meshQuality,
|
|
15
|
+
meshSurface,
|
|
16
|
+
registerWasmMesher
|
|
17
|
+
};
|
package/dist/animation/index.cjs
CHANGED
|
@@ -937,7 +937,7 @@ var AvatarController = class {
|
|
|
937
937
|
/**
|
|
938
938
|
* Calibrate avatar scale based on user height
|
|
939
939
|
*/
|
|
940
|
-
calibrate(
|
|
940
|
+
calibrate(_userHeight) {
|
|
941
941
|
this.calibrated = true;
|
|
942
942
|
}
|
|
943
943
|
/**
|
|
@@ -947,15 +947,15 @@ var AvatarController = class {
|
|
|
947
947
|
if (!this.calibrated) return;
|
|
948
948
|
this.solver.setTarget(
|
|
949
949
|
"leftArm",
|
|
950
|
-
input.leftHand.position
|
|
951
|
-
input.leftHand.position
|
|
952
|
-
input.leftHand.position
|
|
950
|
+
input.leftHand.position[0],
|
|
951
|
+
input.leftHand.position[1],
|
|
952
|
+
input.leftHand.position[2]
|
|
953
953
|
);
|
|
954
954
|
this.solver.setTarget(
|
|
955
955
|
"rightArm",
|
|
956
|
-
input.rightHand.position
|
|
957
|
-
input.rightHand.position
|
|
958
|
-
input.rightHand.position
|
|
956
|
+
input.rightHand.position[0],
|
|
957
|
+
input.rightHand.position[1],
|
|
958
|
+
input.rightHand.position[2]
|
|
959
959
|
);
|
|
960
960
|
const leftHandBone = this.bones.getBone("LeftHand");
|
|
961
961
|
if (leftHandBone) {
|
|
@@ -1339,31 +1339,31 @@ var IKSolver = class {
|
|
|
1339
1339
|
const a = root.length;
|
|
1340
1340
|
const b = mid.length;
|
|
1341
1341
|
const target = chain.target;
|
|
1342
|
-
const dx = target
|
|
1343
|
-
const dy = target
|
|
1344
|
-
const dz = target
|
|
1342
|
+
const dx = target[0] - root.position[0];
|
|
1343
|
+
const dy = target[1] - root.position[1];
|
|
1344
|
+
const dz = target[2] - root.position[2];
|
|
1345
1345
|
const distSq = dx * dx + dy * dy + dz * dz;
|
|
1346
1346
|
const dist = Math.sqrt(distSq);
|
|
1347
1347
|
const maxReach = a + b;
|
|
1348
1348
|
const minReach = Math.abs(a - b);
|
|
1349
1349
|
const clampedDist = Math.max(minReach + 1e-3, Math.min(maxReach - 1e-3, dist));
|
|
1350
1350
|
const cosAngle = (a * a + b * b - clampedDist * clampedDist) / (2 * a * b);
|
|
1351
|
-
const
|
|
1351
|
+
const _midAngle = Math.acos(Math.max(-1, Math.min(1, cosAngle)));
|
|
1352
1352
|
const rootAngle = Math.atan2(dy, Math.sqrt(dx * dx + dz * dz));
|
|
1353
1353
|
const cosA = (a * a + clampedDist * clampedDist - b * b) / (2 * a * clampedDist);
|
|
1354
1354
|
const rootBendAngle = Math.acos(Math.max(-1, Math.min(1, cosA)));
|
|
1355
1355
|
const totalRootAngle = rootAngle + rootBendAngle * chain.weight;
|
|
1356
|
-
mid.position =
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1356
|
+
mid.position = [
|
|
1357
|
+
root.position[0] + Math.cos(totalRootAngle) * a * (dx / (dist || 1)),
|
|
1358
|
+
root.position[1] + Math.sin(totalRootAngle) * a,
|
|
1359
|
+
root.position[2] + Math.cos(totalRootAngle) * a * (dz / (dist || 1))
|
|
1360
|
+
];
|
|
1361
1361
|
if (end) {
|
|
1362
|
-
const blendedTarget =
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1362
|
+
const blendedTarget = [
|
|
1363
|
+
end.position[0] + (target[0] - end.position[0]) * chain.weight,
|
|
1364
|
+
end.position[1] + (target[1] - end.position[1]) * chain.weight,
|
|
1365
|
+
end.position[2] + (target[2] - end.position[2]) * chain.weight
|
|
1366
|
+
];
|
|
1367
1367
|
end.position = blendedTarget;
|
|
1368
1368
|
}
|
|
1369
1369
|
return true;
|
|
@@ -1381,14 +1381,14 @@ var IKSolver = class {
|
|
|
1381
1381
|
const bone = bones[i];
|
|
1382
1382
|
const endEffector = bones[bones.length - 1];
|
|
1383
1383
|
const toEnd = {
|
|
1384
|
-
x: endEffector.position
|
|
1385
|
-
y: endEffector.position
|
|
1386
|
-
z: endEffector.position
|
|
1384
|
+
x: endEffector.position[0] - bone.position[0],
|
|
1385
|
+
y: endEffector.position[1] - bone.position[1],
|
|
1386
|
+
z: endEffector.position[2] - bone.position[2]
|
|
1387
1387
|
};
|
|
1388
1388
|
const toTarget = {
|
|
1389
|
-
x: target
|
|
1390
|
-
y: target
|
|
1391
|
-
z: target
|
|
1389
|
+
x: target[0] - bone.position[0],
|
|
1390
|
+
y: target[1] - bone.position[1],
|
|
1391
|
+
z: target[2] - bone.position[2]
|
|
1392
1392
|
};
|
|
1393
1393
|
const angleEnd = Math.atan2(toEnd.y, toEnd.x);
|
|
1394
1394
|
const angleTarget = Math.atan2(toTarget.y, toTarget.x);
|
|
@@ -1399,19 +1399,19 @@ var IKSolver = class {
|
|
|
1399
1399
|
const cosA = Math.cos(angle), sinA = Math.sin(angle);
|
|
1400
1400
|
for (let j = i + 1; j < bones.length; j++) {
|
|
1401
1401
|
const child = bones[j];
|
|
1402
|
-
const rx = child.position
|
|
1403
|
-
const ry = child.position
|
|
1404
|
-
child.position =
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1402
|
+
const rx = child.position[0] - bone.position[0];
|
|
1403
|
+
const ry = child.position[1] - bone.position[1];
|
|
1404
|
+
child.position = [
|
|
1405
|
+
bone.position[0] + rx * cosA - ry * sinA,
|
|
1406
|
+
bone.position[1] + rx * sinA + ry * cosA,
|
|
1407
|
+
child.position[2]
|
|
1408
|
+
];
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|
|
1411
1411
|
const end = bones[bones.length - 1];
|
|
1412
|
-
const dx = end.position
|
|
1413
|
-
const dy = end.position
|
|
1414
|
-
const dz = end.position
|
|
1412
|
+
const dx = end.position[0] - target[0];
|
|
1413
|
+
const dy = end.position[1] - target[1];
|
|
1414
|
+
const dz = end.position[2] - target[2];
|
|
1415
1415
|
if (dx * dx + dy * dy + dz * dz < 1e-3) return true;
|
|
1416
1416
|
}
|
|
1417
1417
|
return true;
|
|
@@ -1671,7 +1671,7 @@ var Timeline = class {
|
|
|
1671
1671
|
if (!this.isPlaying || this.isPaused) return;
|
|
1672
1672
|
this.elapsed += delta * this.direction;
|
|
1673
1673
|
if (this.elapsed < 0) return;
|
|
1674
|
-
const
|
|
1674
|
+
const _t = this.totalDuration > 0 ? this.elapsed / this.totalDuration : 1;
|
|
1675
1675
|
if (this.config.mode === "sequential") {
|
|
1676
1676
|
this.updateSequential(this.elapsed);
|
|
1677
1677
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a as ActiveAnimation, b as AnimClip, c as AnimLayer, d as AnimPose, e as AnimationClipDef, A as AnimationEngine, K as AnimationEngineKeyframe, f as AnimationGraph, g as AnimationGraphInstance, h as AnimationLayer, j as AnimationState, k as AnimationTrack, l as AnimationTraitConfig, m as AnimationTransition, n as AnimationTransitionSystem, o as AvatarController, p as AvatarInput, B as BlendNode, q as BlendState, r as Bone, s as BonePose, t as BoneSystem, u as BoneTransform, C as ClipEvent, v as ClipKeyframe, w as ClipTrack, x as CutsceneBuilder, y as CutsceneDefinition, z as CutsceneState, D as CutsceneTimeline, E as Easing, F as EasingFn, G as EngineAnimationClip, H as FootPlacementConfig, I as GraphAnimationClip, J as GraphKeyframe, L as HSPlusNode, M as IKBone, N as IKChain, O as IKSolver, P as IVector3, Q as InterpolationMode, R as MorphDelta, S as MorphPreset, T as MorphTarget, U as MorphTargetSystem, V as RagdollTransitionDirection, W as SkeletalBlender, X as SpringAnimator, Y as SpringConfig, Z as SpringDef, _ as SpringPresets, $ as Timeline, a0 as TimelineConfig, a1 as TimelineEntry, a2 as TimelineEvent, a3 as TimelineEventType, a4 as TimelineMode, a5 as TimelineTrack, a6 as TraitHandler, a7 as TransitionCondition, a8 as TransitionConfig, a9 as TransitionOptions, aa as TransitionSystem, ab as UiTransitionDirection, ac as Vec3SpringAnimator, ad as animationTraitHandler, ae as getSharedAnimationEngine } from '../index-CmYtNiI-.cjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { a as ActiveAnimation, b as AnimClip, c as AnimLayer, d as AnimPose, e as AnimationClipDef, A as AnimationEngine, K as AnimationEngineKeyframe, f as AnimationGraph, g as AnimationGraphInstance, h as AnimationLayer, j as AnimationState, k as AnimationTrack, l as AnimationTraitConfig, m as AnimationTransition, n as AnimationTransitionSystem, o as AvatarController, p as AvatarInput, B as BlendNode, q as BlendState, r as Bone, s as BonePose, t as BoneSystem, u as BoneTransform, C as ClipEvent, v as ClipKeyframe, w as ClipTrack, x as CutsceneBuilder, y as CutsceneDefinition, z as CutsceneState, D as CutsceneTimeline, E as Easing, F as EasingFn, G as EngineAnimationClip, H as FootPlacementConfig, I as GraphAnimationClip, J as GraphKeyframe, L as HSPlusNode, M as IKBone, N as IKChain, O as IKSolver, P as IVector3, Q as InterpolationMode, R as MorphDelta, S as MorphPreset, T as MorphTarget, U as MorphTargetSystem, V as RagdollTransitionDirection, W as SkeletalBlender, X as SpringAnimator, Y as SpringConfig, Z as SpringDef, _ as SpringPresets, $ as Timeline, a0 as TimelineConfig, a1 as TimelineEntry, a2 as TimelineEvent, a3 as TimelineEventType, a4 as TimelineMode, a5 as TimelineTrack, a6 as TraitHandler, a7 as TransitionCondition, a8 as TransitionConfig, a9 as TransitionOptions, aa as TransitionSystem, ab as UiTransitionDirection, ac as Vec3SpringAnimator, ad as animationTraitHandler, ae as getSharedAnimationEngine } from '../index-CmYtNiI-.js';
|
package/dist/animation/index.js
CHANGED
package/dist/audio/index.cjs
CHANGED
|
@@ -3295,9 +3295,13 @@ var audioTraitHandler = {
|
|
|
3295
3295
|
if (!config.soundId || !config.autoPlay) return;
|
|
3296
3296
|
const engine = getSharedAudioEngine();
|
|
3297
3297
|
const nodeId = node.id ?? "unknown";
|
|
3298
|
-
const pos = node.properties?.position || {
|
|
3298
|
+
const pos = node.properties?.position || {
|
|
3299
|
+
x: 0,
|
|
3300
|
+
y: 0,
|
|
3301
|
+
z: 0
|
|
3302
|
+
};
|
|
3299
3303
|
const sourceId = engine.play(config.soundId, {
|
|
3300
|
-
position: pos,
|
|
3304
|
+
position: { x: pos.x, y: pos.y, z: pos.z },
|
|
3301
3305
|
volume: config.volume,
|
|
3302
3306
|
pitch: config.pitch,
|
|
3303
3307
|
loop: config.loop,
|
|
@@ -3321,7 +3325,11 @@ var audioTraitHandler = {
|
|
|
3321
3325
|
const nodeId = node.id ?? "unknown";
|
|
3322
3326
|
const sourceId = nodeAudioSources.get(nodeId);
|
|
3323
3327
|
if (!sourceId) return;
|
|
3324
|
-
const pos = node.properties?.position || {
|
|
3328
|
+
const pos = node.properties?.position || {
|
|
3329
|
+
x: 0,
|
|
3330
|
+
y: 0,
|
|
3331
|
+
z: 0
|
|
3332
|
+
};
|
|
3325
3333
|
getSharedAudioEngine().setSourcePosition(sourceId, pos);
|
|
3326
3334
|
}
|
|
3327
3335
|
};
|
|
@@ -3798,9 +3806,9 @@ var SpatialAudioZoneSystem = class {
|
|
|
3798
3806
|
}
|
|
3799
3807
|
}
|
|
3800
3808
|
distanceToZone(zone) {
|
|
3801
|
-
const dx = this.listenerPos
|
|
3802
|
-
const dy = this.listenerPos
|
|
3803
|
-
const dz = this.listenerPos
|
|
3809
|
+
const dx = this.listenerPos[0] - zone.position[0];
|
|
3810
|
+
const dy = this.listenerPos[1] - zone.position[1];
|
|
3811
|
+
const dz = this.listenerPos[2] - zone.position[2];
|
|
3804
3812
|
if (zone.shape === "sphere") {
|
|
3805
3813
|
const dist = Math.sqrt(dx * dx + dy * dy + dz * dz);
|
|
3806
3814
|
return Math.max(0, dist - zone.size.x);
|
|
@@ -4003,6 +4011,8 @@ var VoiceManager = class {
|
|
|
4003
4011
|
this.input = input;
|
|
4004
4012
|
this.transport = transport;
|
|
4005
4013
|
}
|
|
4014
|
+
input;
|
|
4015
|
+
transport;
|
|
4006
4016
|
isPttPressed = false;
|
|
4007
4017
|
isMuted = false;
|
|
4008
4018
|
mutedPeers = /* @__PURE__ */ new Set();
|
package/dist/audio/index.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as ADSRConfig, a as ADSREnvelope, b as AUDIO_DEFAULTS, c as AudioAnalyzer, d as AudioBand, e as AudioCone, f as AudioConnection, g as AudioContextImpl, h as AudioDiffractionSystem, j as AudioDynamics, k as AudioEffect, l as AudioEngine, m as AudioEngineSource, n as AudioEnvelope, o as AudioEventCallback, p as AudioEventType, q as AudioFilter, F as AudioFilterType, r as AudioGraph, s as AudioGraphNode, t as AudioMixer, u as AudioNodeType, v as AudioOcclusionSystem, w as AudioPortal, x as AudioPresets, y as AudioSourceConfig, z as AudioSourceType, B as AudioTraitConfig, C as AudioZoneConfig, D as AutomationPoint, E as BeatDetectionConfig, G as BeatEvent, H as ChordDef, I as ChordQuality, J as CompressorConfig, K as CurveType, L as DEFAULT_BANDS, M as DiffractionConfig, N as DiffractionEdge, O as DiffractionPath, P as DiffractionResult, Q as DistanceModel, R as DuckingConfig, S as EQBand, T as EdgeDetectionProvider, U as EnvelopeStage, V as FilterConfig, W as FilterDef, X as FilterType, Y as FrequencyAbsorption, Z as GateConfig, _ as IAudioBus, $ as IAudioContext, a0 as IAudioEvent, a1 as IAudioGroup, a2 as IAudioListenerConfig, a3 as IAudioOrientation, a4 as IAudioSourceConfig, a5 as IAudioSourceState, a6 as IAudioSystemConfig, a7 as ICompressorEffect, a8 as IDelayEffect, a9 as IDistortionEffect, aa as IEqualizerBand, ab as IEqualizerEffect, ac as IFilterEffect, ad as IGainEffect, ae as INote, af as IPanEffect, ag as IPattern, ah as IReverbEffect, ai as ISequence, aj as ISequencer, ak as ISequencerConfig, al as ISpatialEffect, am as ITrack, an as LineOfSightProvider, ao as ListenerState, ap as LoopMode, aq as LoudnessMetrics, ar as MelodyNote, as as MixerAudioSource, at as MixerChannel, au as MixingContext, av as MusicGenerator, aw as NoiseType, ax as OCCLUSION_MATERIALS, ay as OcclusionHit, az as OcclusionMaterial, aA as OcclusionRay, aB as OcclusionResult, aC as OscillatorDef, aD as OscillatorType, aE as ParameterAutomation, aF as PlaybackState, aG as REVERB_PRESETS, aH as RaycastProvider, aI as ReverbPreset, aJ as RhythmPattern, aK as RolloffModel, aL as RolloffType, aM as ScaleType, aN as SequencerImpl, aO as SequencerState, aP as SidechainConfig, aQ as SoundDefinition, aR as SoundPool, aS as SpatialAudioConfig, aT as SpatialAudioSource, aU as SpatialAudioZoneSystem, aV as SpatialModel, aW as SpectrumData, aX as SynthEngine, aY as SynthVoice, aZ as VoiceManager, a_ as VoiceStealingStrategy, a$ as WaveformType, b0 as ZoneState, b1 as audioTraitHandler, b2 as bandpassFilter, b3 as bufferSource, b4 as compressorEffect, b5 as createAudioContext, b6 as createNote, b7 as createPattern, b8 as createSequence, b9 as createSequencer, ba as createTrack, bb as defaultOrientation, bc as delayEffect, bd as distortionEffect, be as eqBand, bf as equalizerEffect, bg as filterEffect, bh as frequencyToMidi, bi as gainEffect, bj as getSharedAudioEngine, bk as highpassFilter, bl as lowpassFilter, bm as midiToFrequency, bn as midiToNoteName, bo as noiseSource, bp as noteNameToMidi, bq as oscillatorSource, br as panEffect, bs as reverbEffect, bt as setSharedAudioEngine, bu as spatialSource, bv as streamSource, bw as zeroVector } from '../index-
|
|
1
|
+
export { A as ADSRConfig, a as ADSREnvelope, b as AUDIO_DEFAULTS, c as AudioAnalyzer, d as AudioBand, e as AudioCone, f as AudioConnection, g as AudioContextImpl, h as AudioDiffractionSystem, j as AudioDynamics, k as AudioEffect, l as AudioEngine, m as AudioEngineSource, n as AudioEnvelope, o as AudioEventCallback, p as AudioEventType, q as AudioFilter, F as AudioFilterType, r as AudioGraph, s as AudioGraphNode, t as AudioMixer, u as AudioNodeType, v as AudioOcclusionSystem, w as AudioPortal, x as AudioPresets, y as AudioSourceConfig, z as AudioSourceType, B as AudioTraitConfig, C as AudioZoneConfig, D as AutomationPoint, E as BeatDetectionConfig, G as BeatEvent, H as ChordDef, I as ChordQuality, J as CompressorConfig, K as CurveType, L as DEFAULT_BANDS, M as DiffractionConfig, N as DiffractionEdge, O as DiffractionPath, P as DiffractionResult, Q as DistanceModel, R as DuckingConfig, S as EQBand, T as EdgeDetectionProvider, U as EnvelopeStage, V as FilterConfig, W as FilterDef, X as FilterType, Y as FrequencyAbsorption, Z as GateConfig, _ as IAudioBus, $ as IAudioContext, a0 as IAudioEvent, a1 as IAudioGroup, a2 as IAudioListenerConfig, a3 as IAudioOrientation, a4 as IAudioSourceConfig, a5 as IAudioSourceState, a6 as IAudioSystemConfig, a7 as ICompressorEffect, a8 as IDelayEffect, a9 as IDistortionEffect, aa as IEqualizerBand, ab as IEqualizerEffect, ac as IFilterEffect, ad as IGainEffect, ae as INote, af as IPanEffect, ag as IPattern, ah as IReverbEffect, ai as ISequence, aj as ISequencer, ak as ISequencerConfig, al as ISpatialEffect, am as ITrack, an as LineOfSightProvider, ao as ListenerState, ap as LoopMode, aq as LoudnessMetrics, ar as MelodyNote, as as MixerAudioSource, at as MixerChannel, au as MixingContext, av as MusicGenerator, aw as NoiseType, ax as OCCLUSION_MATERIALS, ay as OcclusionHit, az as OcclusionMaterial, aA as OcclusionRay, aB as OcclusionResult, aC as OscillatorDef, aD as OscillatorType, aE as ParameterAutomation, aF as PlaybackState, aG as REVERB_PRESETS, aH as RaycastProvider, aI as ReverbPreset, aJ as RhythmPattern, aK as RolloffModel, aL as RolloffType, aM as ScaleType, aN as SequencerImpl, aO as SequencerState, aP as SidechainConfig, aQ as SoundDefinition, aR as SoundPool, aS as SpatialAudioConfig, aT as SpatialAudioSource, aU as SpatialAudioZoneSystem, aV as SpatialModel, aW as SpectrumData, aX as SynthEngine, aY as SynthVoice, aZ as VoiceManager, a_ as VoiceStealingStrategy, a$ as WaveformType, b0 as ZoneState, b1 as audioTraitHandler, b2 as bandpassFilter, b3 as bufferSource, b4 as compressorEffect, b5 as createAudioContext, b6 as createNote, b7 as createPattern, b8 as createSequence, b9 as createSequencer, ba as createTrack, bb as defaultOrientation, bc as delayEffect, bd as distortionEffect, be as eqBand, bf as equalizerEffect, bg as filterEffect, bh as frequencyToMidi, bi as gainEffect, bj as getSharedAudioEngine, bk as highpassFilter, bl as lowpassFilter, bm as midiToFrequency, bn as midiToNoteName, bo as noiseSource, bp as noteNameToMidi, bq as oscillatorSource, br as panEffect, bs as reverbEffect, bt as setSharedAudioEngine, bu as spatialSource, bv as streamSource, bw as zeroVector } from '../index-B2PIsAmR.cjs';
|
|
2
2
|
import '@holoscript/core';
|
package/dist/audio/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as ADSRConfig, a as ADSREnvelope, b as AUDIO_DEFAULTS, c as AudioAnalyzer, d as AudioBand, e as AudioCone, f as AudioConnection, g as AudioContextImpl, h as AudioDiffractionSystem, j as AudioDynamics, k as AudioEffect, l as AudioEngine, m as AudioEngineSource, n as AudioEnvelope, o as AudioEventCallback, p as AudioEventType, q as AudioFilter, F as AudioFilterType, r as AudioGraph, s as AudioGraphNode, t as AudioMixer, u as AudioNodeType, v as AudioOcclusionSystem, w as AudioPortal, x as AudioPresets, y as AudioSourceConfig, z as AudioSourceType, B as AudioTraitConfig, C as AudioZoneConfig, D as AutomationPoint, E as BeatDetectionConfig, G as BeatEvent, H as ChordDef, I as ChordQuality, J as CompressorConfig, K as CurveType, L as DEFAULT_BANDS, M as DiffractionConfig, N as DiffractionEdge, O as DiffractionPath, P as DiffractionResult, Q as DistanceModel, R as DuckingConfig, S as EQBand, T as EdgeDetectionProvider, U as EnvelopeStage, V as FilterConfig, W as FilterDef, X as FilterType, Y as FrequencyAbsorption, Z as GateConfig, _ as IAudioBus, $ as IAudioContext, a0 as IAudioEvent, a1 as IAudioGroup, a2 as IAudioListenerConfig, a3 as IAudioOrientation, a4 as IAudioSourceConfig, a5 as IAudioSourceState, a6 as IAudioSystemConfig, a7 as ICompressorEffect, a8 as IDelayEffect, a9 as IDistortionEffect, aa as IEqualizerBand, ab as IEqualizerEffect, ac as IFilterEffect, ad as IGainEffect, ae as INote, af as IPanEffect, ag as IPattern, ah as IReverbEffect, ai as ISequence, aj as ISequencer, ak as ISequencerConfig, al as ISpatialEffect, am as ITrack, an as LineOfSightProvider, ao as ListenerState, ap as LoopMode, aq as LoudnessMetrics, ar as MelodyNote, as as MixerAudioSource, at as MixerChannel, au as MixingContext, av as MusicGenerator, aw as NoiseType, ax as OCCLUSION_MATERIALS, ay as OcclusionHit, az as OcclusionMaterial, aA as OcclusionRay, aB as OcclusionResult, aC as OscillatorDef, aD as OscillatorType, aE as ParameterAutomation, aF as PlaybackState, aG as REVERB_PRESETS, aH as RaycastProvider, aI as ReverbPreset, aJ as RhythmPattern, aK as RolloffModel, aL as RolloffType, aM as ScaleType, aN as SequencerImpl, aO as SequencerState, aP as SidechainConfig, aQ as SoundDefinition, aR as SoundPool, aS as SpatialAudioConfig, aT as SpatialAudioSource, aU as SpatialAudioZoneSystem, aV as SpatialModel, aW as SpectrumData, aX as SynthEngine, aY as SynthVoice, aZ as VoiceManager, a_ as VoiceStealingStrategy, a$ as WaveformType, b0 as ZoneState, b1 as audioTraitHandler, b2 as bandpassFilter, b3 as bufferSource, b4 as compressorEffect, b5 as createAudioContext, b6 as createNote, b7 as createPattern, b8 as createSequence, b9 as createSequencer, ba as createTrack, bb as defaultOrientation, bc as delayEffect, bd as distortionEffect, be as eqBand, bf as equalizerEffect, bg as filterEffect, bh as frequencyToMidi, bi as gainEffect, bj as getSharedAudioEngine, bk as highpassFilter, bl as lowpassFilter, bm as midiToFrequency, bn as midiToNoteName, bo as noiseSource, bp as noteNameToMidi, bq as oscillatorSource, br as panEffect, bs as reverbEffect, bt as setSharedAudioEngine, bu as spatialSource, bv as streamSource, bw as zeroVector } from '../index-
|
|
1
|
+
export { A as ADSRConfig, a as ADSREnvelope, b as AUDIO_DEFAULTS, c as AudioAnalyzer, d as AudioBand, e as AudioCone, f as AudioConnection, g as AudioContextImpl, h as AudioDiffractionSystem, j as AudioDynamics, k as AudioEffect, l as AudioEngine, m as AudioEngineSource, n as AudioEnvelope, o as AudioEventCallback, p as AudioEventType, q as AudioFilter, F as AudioFilterType, r as AudioGraph, s as AudioGraphNode, t as AudioMixer, u as AudioNodeType, v as AudioOcclusionSystem, w as AudioPortal, x as AudioPresets, y as AudioSourceConfig, z as AudioSourceType, B as AudioTraitConfig, C as AudioZoneConfig, D as AutomationPoint, E as BeatDetectionConfig, G as BeatEvent, H as ChordDef, I as ChordQuality, J as CompressorConfig, K as CurveType, L as DEFAULT_BANDS, M as DiffractionConfig, N as DiffractionEdge, O as DiffractionPath, P as DiffractionResult, Q as DistanceModel, R as DuckingConfig, S as EQBand, T as EdgeDetectionProvider, U as EnvelopeStage, V as FilterConfig, W as FilterDef, X as FilterType, Y as FrequencyAbsorption, Z as GateConfig, _ as IAudioBus, $ as IAudioContext, a0 as IAudioEvent, a1 as IAudioGroup, a2 as IAudioListenerConfig, a3 as IAudioOrientation, a4 as IAudioSourceConfig, a5 as IAudioSourceState, a6 as IAudioSystemConfig, a7 as ICompressorEffect, a8 as IDelayEffect, a9 as IDistortionEffect, aa as IEqualizerBand, ab as IEqualizerEffect, ac as IFilterEffect, ad as IGainEffect, ae as INote, af as IPanEffect, ag as IPattern, ah as IReverbEffect, ai as ISequence, aj as ISequencer, ak as ISequencerConfig, al as ISpatialEffect, am as ITrack, an as LineOfSightProvider, ao as ListenerState, ap as LoopMode, aq as LoudnessMetrics, ar as MelodyNote, as as MixerAudioSource, at as MixerChannel, au as MixingContext, av as MusicGenerator, aw as NoiseType, ax as OCCLUSION_MATERIALS, ay as OcclusionHit, az as OcclusionMaterial, aA as OcclusionRay, aB as OcclusionResult, aC as OscillatorDef, aD as OscillatorType, aE as ParameterAutomation, aF as PlaybackState, aG as REVERB_PRESETS, aH as RaycastProvider, aI as ReverbPreset, aJ as RhythmPattern, aK as RolloffModel, aL as RolloffType, aM as ScaleType, aN as SequencerImpl, aO as SequencerState, aP as SidechainConfig, aQ as SoundDefinition, aR as SoundPool, aS as SpatialAudioConfig, aT as SpatialAudioSource, aU as SpatialAudioZoneSystem, aV as SpatialModel, aW as SpectrumData, aX as SynthEngine, aY as SynthVoice, aZ as VoiceManager, a_ as VoiceStealingStrategy, a$ as WaveformType, b0 as ZoneState, b1 as audioTraitHandler, b2 as bandpassFilter, b3 as bufferSource, b4 as compressorEffect, b5 as createAudioContext, b6 as createNote, b7 as createPattern, b8 as createSequence, b9 as createSequencer, ba as createTrack, bb as defaultOrientation, bc as delayEffect, bd as distortionEffect, be as eqBand, bf as equalizerEffect, bg as filterEffect, bh as frequencyToMidi, bi as gainEffect, bj as getSharedAudioEngine, bk as highpassFilter, bl as lowpassFilter, bm as midiToFrequency, bn as midiToNoteName, bo as noiseSource, bp as noteNameToMidi, bq as oscillatorSource, br as panEffect, bs as reverbEffect, bt as setSharedAudioEngine, bu as spatialSource, bv as streamSource, bw as zeroVector } from '../index-B2PIsAmR.js';
|
|
2
2
|
import '@holoscript/core';
|
package/dist/audio/index.js
CHANGED
package/dist/camera/index.cjs
CHANGED
|
@@ -163,7 +163,7 @@ var CameraController = class {
|
|
|
163
163
|
constructor(config) {
|
|
164
164
|
this.config = { ...DEFAULT_CAMERA, ...config };
|
|
165
165
|
this.state = {
|
|
166
|
-
position:
|
|
166
|
+
position: [0, 5, -10],
|
|
167
167
|
rotation: { pitch: 0, yaw: 0, roll: 0 },
|
|
168
168
|
zoom: 1,
|
|
169
169
|
fov: this.config.fov
|
|
@@ -214,37 +214,37 @@ var CameraController = class {
|
|
|
214
214
|
const desiredX = this.target.x + off.x;
|
|
215
215
|
const desiredY = this.target.y + off.y;
|
|
216
216
|
const desiredZ = this.target.z + off.z;
|
|
217
|
-
const dx = Math.abs(this.target
|
|
218
|
-
const dy = Math.abs(this.target
|
|
217
|
+
const dx = Math.abs(this.target[0] - this.state.position[0] + off[0]);
|
|
218
|
+
const dy = Math.abs(this.target[1] - this.state.position[1] + off[1]);
|
|
219
219
|
const dz = this.config.deadZone;
|
|
220
220
|
if (dx < dz.x && dy < dz.y) return;
|
|
221
221
|
const s = 1 - Math.pow(1 - this.config.smoothing, dt * 60);
|
|
222
|
-
this.state.position
|
|
223
|
-
this.state.position
|
|
224
|
-
this.state.position
|
|
222
|
+
this.state.position[0] = this.lerp(this.state.position[0], desiredX, s);
|
|
223
|
+
this.state.position[1] = this.lerp(this.state.position[1], desiredY, s);
|
|
224
|
+
this.state.position[2] = this.lerp(this.state.position[2], desiredZ, s);
|
|
225
225
|
}
|
|
226
226
|
updateOrbit(_dt) {
|
|
227
227
|
const d = this.config.orbitDistance * this.state.zoom;
|
|
228
|
-
this.state.position
|
|
229
|
-
this.state.position
|
|
230
|
-
this.state.position
|
|
228
|
+
this.state.position[0] = this.target.x + Math.sin(this.orbitAngle) * Math.cos(this.orbitPitch) * d;
|
|
229
|
+
this.state.position[1] = this.target[1] + Math.sin(this.orbitPitch) * d;
|
|
230
|
+
this.state.position[2] = this.target.z + Math.cos(this.orbitAngle) * Math.cos(this.orbitPitch) * d;
|
|
231
231
|
this.state.rotation.yaw = this.orbitAngle;
|
|
232
232
|
this.state.rotation.pitch = -this.orbitPitch;
|
|
233
233
|
}
|
|
234
234
|
updateTopDown(_dt) {
|
|
235
235
|
const height = 20 * this.state.zoom;
|
|
236
236
|
const s = 1 - Math.pow(1 - this.config.smoothing, 1);
|
|
237
|
-
this.state.position
|
|
238
|
-
this.state.position
|
|
239
|
-
this.state.position
|
|
237
|
+
this.state.position[0] = this.lerp(this.state.position[0], this.target[0], s);
|
|
238
|
+
this.state.position[1] = height;
|
|
239
|
+
this.state.position[2] = this.lerp(this.state.position[2], this.target[2], s);
|
|
240
240
|
this.state.rotation.pitch = -Math.PI / 2;
|
|
241
241
|
this.state.rotation.yaw = 0;
|
|
242
242
|
}
|
|
243
243
|
clampToBounds() {
|
|
244
244
|
const b = this.config.bounds;
|
|
245
|
-
this.state.position
|
|
246
|
-
this.state.position
|
|
247
|
-
this.state.position
|
|
245
|
+
this.state.position[0] = Math.max(b.min[0], Math.min(b.max[0], this.state.position[0]));
|
|
246
|
+
this.state.position[1] = Math.max(b.min[1], Math.min(b.max[1], this.state.position[1]));
|
|
247
|
+
this.state.position[2] = Math.max(b.min[2], Math.min(b.max[2], this.state.position[2]));
|
|
248
248
|
}
|
|
249
249
|
// ---------------------------------------------------------------------------
|
|
250
250
|
// Controls
|
|
@@ -333,9 +333,9 @@ var CameraController = class {
|
|
|
333
333
|
* ```
|
|
334
334
|
*/
|
|
335
335
|
moveCamera(dx, dy, dz) {
|
|
336
|
-
this.state.position
|
|
337
|
-
this.state.position
|
|
338
|
-
this.state.position
|
|
336
|
+
this.state.position[0] += dx * this.config.freeSpeed;
|
|
337
|
+
this.state.position[1] += dy * this.config.freeSpeed;
|
|
338
|
+
this.state.position[2] += dz * this.config.freeSpeed;
|
|
339
339
|
}
|
|
340
340
|
/**
|
|
341
341
|
* Changes the camera's behavior mode.
|
|
@@ -637,7 +637,7 @@ var CameraPath = class {
|
|
|
637
637
|
// ---------------------------------------------------------------------------
|
|
638
638
|
evaluate(t) {
|
|
639
639
|
const n = this.points.length;
|
|
640
|
-
if (n === 0) return { position:
|
|
640
|
+
if (n === 0) return { position: [0, 0, 0], lookAt: null };
|
|
641
641
|
if (n === 1) return { position: { ...this.points[0] }, lookAt: null };
|
|
642
642
|
const f = t * (n - 1);
|
|
643
643
|
const i = Math.min(Math.floor(f), n - 2);
|
|
@@ -837,7 +837,7 @@ var CinematicTrack = class {
|
|
|
837
837
|
// ---------------------------------------------------------------------------
|
|
838
838
|
evaluate(time) {
|
|
839
839
|
const state = {
|
|
840
|
-
position:
|
|
840
|
+
position: [0, 0, 0],
|
|
841
841
|
rotation: { pitch: 0, yaw: 0, roll: 0 },
|
|
842
842
|
fov: 60,
|
|
843
843
|
zoom: 1
|
|
@@ -864,9 +864,9 @@ var CinematicTrack = class {
|
|
|
864
864
|
const rawT = range > 0 ? (time - kA.time) / range : 1;
|
|
865
865
|
const t = this.applyEasing(rawT, kB.easing);
|
|
866
866
|
if (kA.position && kB.position) {
|
|
867
|
-
state.position
|
|
868
|
-
state.position
|
|
869
|
-
state.position
|
|
867
|
+
state.position[0] = kA.position[0] + (kB.position[0] - kA.position[0]) * t;
|
|
868
|
+
state.position[1] = kA.position[1] + (kB.position[1] - kA.position[1]) * t;
|
|
869
|
+
state.position[2] = kA.position[2] + (kB.position[2] - kA.position[2]) * t;
|
|
870
870
|
} else if (kB.position) {
|
|
871
871
|
state.position = { ...kB.position };
|
|
872
872
|
} else if (kA.position) {
|
package/dist/camera/index.d.cts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as ActiveEffect, B as Bounds, C as CameraConfig, a as CameraConstraints, b as CameraController, c as CameraEffects, d as CameraMode, e as CameraPath, f as CameraShake, g as CameraState, h as CinematicCue, j as CinematicKeyframe, k as CinematicState, l as CinematicTrack, D as DeadZone, E as EasingType, m as EffectType, F as FadeParams, n as FlashParams, L as LetterboxParams, P as PathPoint, S as ShakeLayer, o as ShakeOutput, p as ShakeParams, q as SoftLimit, Z as ZoomParams } from '../index-
|
|
1
|
+
export { A as ActiveEffect, B as Bounds, C as CameraConfig, a as CameraConstraints, b as CameraController, c as CameraEffects, d as CameraMode, e as CameraPath, f as CameraShake, g as CameraState, h as CinematicCue, j as CinematicKeyframe, k as CinematicState, l as CinematicTrack, D as DeadZone, E as EasingType, m as EffectType, F as FadeParams, n as FlashParams, L as LetterboxParams, P as PathPoint, S as ShakeLayer, o as ShakeOutput, p as ShakeParams, q as SoftLimit, Z as ZoomParams } from '../index-s9yOFU37.cjs';
|
package/dist/camera/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as ActiveEffect, B as Bounds, C as CameraConfig, a as CameraConstraints, b as CameraController, c as CameraEffects, d as CameraMode, e as CameraPath, f as CameraShake, g as CameraState, h as CinematicCue, j as CinematicKeyframe, k as CinematicState, l as CinematicTrack, D as DeadZone, E as EasingType, m as EffectType, F as FadeParams, n as FlashParams, L as LetterboxParams, P as PathPoint, S as ShakeLayer, o as ShakeOutput, p as ShakeParams, q as SoftLimit, Z as ZoomParams } from '../index-
|
|
1
|
+
export { A as ActiveEffect, B as Bounds, C as CameraConfig, a as CameraConstraints, b as CameraController, c as CameraEffects, d as CameraMode, e as CameraPath, f as CameraShake, g as CameraState, h as CinematicCue, j as CinematicKeyframe, k as CinematicState, l as CinematicTrack, D as DeadZone, E as EasingType, m as EffectType, F as FadeParams, n as FlashParams, L as LetterboxParams, P as PathPoint, S as ShakeLayer, o as ShakeOutput, p as ShakeParams, q as SoftLimit, Z as ZoomParams } from '../index-s9yOFU37.js';
|
package/dist/camera/index.js
CHANGED
package/dist/character/index.cjs
CHANGED
|
@@ -1128,14 +1128,16 @@ var IdleBehaviorSystem = class {
|
|
|
1128
1128
|
if (deltaSec <= 0) {
|
|
1129
1129
|
return this.computeFrame();
|
|
1130
1130
|
}
|
|
1131
|
+
const prevElapsedSec = this.elapsedSec;
|
|
1131
1132
|
this.elapsedSec += deltaSec;
|
|
1132
|
-
if (this.elapsedSec >= this.nextBlinkSec) {
|
|
1133
|
-
this.blinkT = this.config.blinkDurationSec;
|
|
1134
|
-
this.scheduleNextBlink();
|
|
1135
|
-
}
|
|
1136
1133
|
if (this.blinkT > 0) {
|
|
1137
1134
|
this.blinkT = Math.max(0, this.blinkT - deltaSec);
|
|
1138
1135
|
}
|
|
1136
|
+
if (prevElapsedSec < this.nextBlinkSec && this.elapsedSec >= this.nextBlinkSec) {
|
|
1137
|
+
const overshoot = this.elapsedSec - this.nextBlinkSec;
|
|
1138
|
+
this.blinkT = Math.max(0, this.config.blinkDurationSec - overshoot);
|
|
1139
|
+
this.scheduleNextBlink();
|
|
1140
|
+
}
|
|
1139
1141
|
if (this.elapsedSec >= this.nextSaccadeSec) {
|
|
1140
1142
|
const a = this.config.microSaccadeAmplitude;
|
|
1141
1143
|
this.saccadeTarget = {
|