Release v0.1.10 2026-07-13

This commit is contained in:
Warren H
2026-07-13 20:47:56 -04:00
parent aa9f5eff20
commit fb41147197
4 changed files with 46 additions and 4 deletions
+8 -3
View File
@@ -29,6 +29,7 @@ import { useGameStore } from "../game/store";
import type { BossId, MemberId, PulseKind } from "../game/types";
import { BossRoom } from "./BossRoom";
import { BossMechanicIndicators } from "./boss/BossMechanicIndicators";
import { bossBurrowPositionY, bossIsBurrowing } from "./boss/bossBurrowVisuals";
import { bossCanTrackTarget, bossDeathOpacity } from "./boss/bossDeathVisuals";
import { GameAssetProvider, LEGACY_GAME_ASSETS_FORCED, selectedGameAssetUrl, useGameGLTF } from "./GameAssetProvider";
@@ -130,8 +131,11 @@ function createBossRenderModel(source: THREE.Object3D) {
? object.material.map(cloneMaterial)
: cloneMaterial(object.material);
});
model.updateMatrixWorld(true);
const modelTopY = new THREE.Box3().setFromObject(model).max.y;
return {
model,
modelTopY,
fadeMaterials: [...materialClones.values()].map((material): BossFadeMaterial => ({
material,
baseOpacity: material.opacity,
@@ -834,9 +838,10 @@ function AlternateBoss({ kind, bossIndex }: { kind: AlternateBossKind; bossIndex
const light = useRef<THREE.PointLight>(null);
const assetUrl = selectedGameAssetUrl(config.url, config.optimizedUrl ?? config.url);
const gltf = useGameGLTF(assetUrl);
const { model, fadeMaterials } = useMemo(() => createBossRenderModel(gltf.scene), [gltf.scene]);
const { model, modelTopY, fadeMaterials } = useMemo(() => createBossRenderModel(gltf.scene), [gltf.scene]);
const { actions } = useAnimations(gltf.animations, model);
const targetPosition = useMemo(() => new THREE.Vector3(), []);
const burrowPositionY = bossBurrowPositionY(modelTopY, config.scale);
useEffect(() => {
return () => { for (const entry of fadeMaterials) entry.material.dispose(); };
@@ -873,9 +878,9 @@ function AlternateBoss({ kind, bossIndex }: { kind: AlternateBossKind; bossIndex
if (!current) return;
const motion = current.motion;
const airborne = archetype === "sky-sweeper" && motion.mode === "skyfall";
const burrowed = archetype === "burrower" && motion.activeMechanicId === "burrow-rush" && motion.mode === "charging";
const burrowing = archetype === "burrower" && bossIsBurrowing(motion.activeMechanicId, motion.mode);
const floatingHeight = config.floating ? 0.2 : 0.03;
targetPosition.set(motion.position[0], airborne ? 3.2 : burrowed ? -0.58 : floatingHeight, motion.position[1]);
targetPosition.set(motion.position[0], airborne ? 3.2 : burrowing ? burrowPositionY : floatingHeight, motion.position[1]);
group.current.position.lerp(targetPosition, 1 - Math.pow(0.00001, delta));
if (!bossCanTrackTarget(current.boss.hp)) return;