mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
feat: reenable mixer
This commit is contained in:
1 parent
96a8f225fc
commit
f5aa2ff9de
12 files changed
+72
-37
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import { Box } from "@radix-ui/themes";
|
||||
import { useRef } from "react";
|
||||
import { MixerScene } from "../../../components/MixerScene";
|
||||
import { PageWrapper } from "../../../components/PageWrapper";
|
||||
import { awaitableModelDefinitions } from "../../../core/awaitables/modelDefinitions";
|
||||
import { awaitableTankDefinitions } from "../../../core/awaitables/tankDefinitions";
|
||||
import {
|
||||
LocaleProvider,
|
||||
@@ -10,7 +10,14 @@ import {
|
||||
import { Mixer } from "../../../stores/mixer";
|
||||
|
||||
const tankDefinitions = await awaitableTankDefinitions;
|
||||
const tanks = Object.values(tankDefinitions.tanks);
|
||||
const modelDefinitions = await awaitableModelDefinitions;
|
||||
const tanks = Object.values(tankDefinitions.tanks).filter((tank) => {
|
||||
const tankModel = modelDefinitions.models[tank.id];
|
||||
const turret = tank.turrets.at(-1)!;
|
||||
const turretModel = tankModel.turrets[turret.id];
|
||||
|
||||
return tank.tier >= 10 && !turretModel.yaw;
|
||||
});
|
||||
|
||||
export function Page({ locale }: LocaleAcceptorProps) {
|
||||
const hull = useRef(tanks[Math.floor(Math.random() * tanks.length)]);
|
||||
@@ -51,12 +58,10 @@ export function Page({ locale }: LocaleAcceptorProps) {
|
||||
|
||||
function Content() {
|
||||
return (
|
||||
<PageWrapper p="0">
|
||||
<Box flexGrow="1" position="relative">
|
||||
<Box position="absolute" width="100%" height="100%" top="0" left="0">
|
||||
<MixerScene />
|
||||
</Box>
|
||||
<Box flexGrow="1" position="relative">
|
||||
<Box position="absolute" width="100%" height="100%" top="0" left="0">
|
||||
<MixerScene />
|
||||
</Box>
|
||||
</PageWrapper>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -1,15 +1,15 @@
|
||||
---
|
||||
import { PageWrapper } from '../../../components/PageWrapper';
|
||||
import BaseLayout from '../../../layouts/BaseLayout.astro';
|
||||
import { Page } from './_index';
|
||||
import { PageWrapper } from "../../../components/PageWrapper";
|
||||
import BaseLayout from "../../../layouts/BaseLayout.astro";
|
||||
import { Page } from "./_index";
|
||||
|
||||
export { getStaticPaths } from '../index.astro';
|
||||
export { getStaticPaths } from "../index.astro";
|
||||
|
||||
const { locale } = Astro.params;
|
||||
---
|
||||
|
||||
<BaseLayout>
|
||||
<PageWrapper p="0" maxWidth="unset">
|
||||
<BaseLayout integrated>
|
||||
<PageWrapper color="gray" p="0" maxWidth="unset">
|
||||
<Page {locale} client:load />
|
||||
</PageWrapper>
|
||||
</BaseLayout>
|
||||
Reference in new issue
Block a user