update mixer

This commit is contained in:
tresabhi committed 2026-08-04 20:34:11 -05:00
1 parent 36e8a20cd5
commit 6a05f11001
4 files changed
+26 -28

No files matched your search

@@ -2,7 +2,7 @@ import { useThree, type ThreeEvent } from "@react-three/fiber";
import type { QuicklimeEvent } from "quicklime";
import { useCallback, useEffect, useRef } from "react";
import { Group, Vector2 } from "three";
import { awaitableModelDefinitions } from "../../../core/awaitables/modelDefinitions";
import { api } from "../../../core/blitzkit/api";
import { jsxTree } from "../../../core/blitzkit/jsxTree";
import {
modelTransformEvent,
@@ -12,7 +12,7 @@ import { controlsEnabledEvent } from "../../../core/controlsEnabled";
import { useModel } from "../../../hooks/useModel";
import { Mixer } from "../../../stores/mixer";
const modelDefinitions = await awaitableModelDefinitions;
const modelDefinitions = await api.modelDefinitions();
export function Model() {
const canvas = useThree((state) => state.gl.domElement);
@@ -1,8 +1,8 @@
import { awaitableModelDefinitions } from "../awaitables/modelDefinitions";
import { awaitableTankDefinitions } from "../awaitables/tankDefinitions";
import { api } from "./api";
const tankDefinitions = await api.tankDefinitions();
const modelDefinitions = await api.modelDefinitions();
const tankDefinitions = await awaitableTankDefinitions;
const modelDefinitions = await awaitableModelDefinitions;
const tanks = Object.values(tankDefinitions.tanks).filter((tank) => {
const tankModel = modelDefinitions.models[tank.id];
const turret = tank.turrets.at(-1)!;
@@ -1,5 +1,4 @@
import {
asset,
GunDefinition,
TankDefinition,
TIER_ROMAN_NUMERALS,
@@ -19,27 +18,26 @@ import {
type ButtonProps,
} from "@radix-ui/themes";
import { useRef, useState } from "react";
import { MixerScene } from "../../../components/MixerScene";
import { ModuleButton } from "../../../components/ModuleButtons/ModuleButton";
import { PageWrapper } from "../../../components/PageWrapper";
import { ScreenshotButton } from "../../../components/ScreenshotButton";
import { TankSearch } from "../../../components/TankSearch";
import { awaitableModelDefinitions } from "../../../core/awaitables/modelDefinitions";
import { awaitableTankDefinitions } from "../../../core/awaitables/tankDefinitions";
import { curateMixer } from "../../../core/blitzkit/curateMixer";
import { MixerScene } from "../../../../components/MixerScene";
import { ModuleButton } from "../../../../components/ModuleButtons/ModuleButton";
import { PageWrapper } from "../../../../components/PageWrapper";
import { ScreenshotButton } from "../../../../components/ScreenshotButton";
import { TankSearch } from "../../../../components/TankSearch";
import { api } from "../../../../core/blitzkit/api";
import { curateMixer } from "../../../../core/blitzkit/curateMixer";
import {
LocaleProvider,
useLocale,
type LocaleAcceptorProps,
} from "../../../hooks/useLocale";
import { Mixer } from "../../../stores/mixer";
import { Tankopedia } from "../../../stores/tankopedia";
import type { MaybeSkeletonComponentProps } from "../../../types/maybeSkeletonComponentProps";
} from "../../../../hooks/useLocale";
import { Mixer } from "../../../../stores/mixer";
import { Tankopedia } from "../../../../stores/tankopedia";
import type { MaybeSkeletonComponentProps } from "../../../../types/maybeSkeletonComponentProps";
const modelDefinition = await awaitableModelDefinitions.then(
({ models }) => models[1]
);
const tankDefinitions = await awaitableTankDefinitions;
const modelDefinition = await api
.modelDefinitions()
.then(({ models }) => models[1]);
const tankDefinitions = await api.tankDefinitions();
export function Page({
locale,
@@ -65,7 +63,7 @@ type ModuleButtonProps = Omit<ButtonProps, "onSelect"> &
onSelect: (
tank: TankDefinition,
turret?: TurretDefinition,
gun?: GunDefinition
gun?: GunDefinition,
) => void;
turret?: number;
gun?: number;
@@ -112,7 +110,7 @@ function ModuleChooser({
height: "4em",
objectFit: "contain",
}}
src={asset(`icons/tanks/big/${tank}.webp`)}
src={`/api/tanks/${tank}/icons/big.webp`}
/>
)}
</Button>
@@ -1,7 +1,7 @@
---
import ToolOpenGraph from "../../../components/ToolOpenGraph.astro";
import { tools } from "../../../constants/tools";
import BaseLayout from "../../../layouts/BaseLayout.astro";
import ToolOpenGraph from "../../../../components/ToolOpenGraph.astro";
import { tools } from "../../../../constants/tools";
import BaseLayout from "../../../../layouts/BaseLayout.astro";
import { Page } from "./_index";
export { getStaticPaths } from "../index.astro";