mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
feat: some simplification
This commit is contained in:
1 parent
1427f61c52
commit
fd37f72f8c
3 files changed
+18
-29
No files matched your search
+1
@@ -104,6 +104,7 @@ export function Lighting() {
|
|||||||
castShadow={highGraphics}
|
castShadow={highGraphics}
|
||||||
decay={1}
|
decay={1}
|
||||||
color="#ffffff"
|
color="#ffffff"
|
||||||
|
angle={0}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
+2
-1
@@ -174,6 +174,8 @@ export const TankSandbox = forwardRef<HTMLCanvasElement, TankSandboxProps>(
|
|||||||
outline: naked ? "1rem red solid" : undefined,
|
outline: naked ? "1rem red solid" : undefined,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
<Lighting />
|
||||||
|
|
||||||
{!naked && <SceneProps />}
|
{!naked && <SceneProps />}
|
||||||
{(display === TankopediaDisplay.Model ||
|
{(display === TankopediaDisplay.Model ||
|
||||||
(display === TankopediaDisplay.DynamicArmor &&
|
(display === TankopediaDisplay.DynamicArmor &&
|
||||||
@@ -190,7 +192,6 @@ export const TankSandbox = forwardRef<HTMLCanvasElement, TankSandboxProps>(
|
|||||||
{display === TankopediaDisplay.StaticArmor && (
|
{display === TankopediaDisplay.StaticArmor && (
|
||||||
<StaticArmor thicknessRange={thicknessRange} />
|
<StaticArmor thicknessRange={thicknessRange} />
|
||||||
)}
|
)}
|
||||||
<Lighting />
|
|
||||||
</Suspense>
|
</Suspense>
|
||||||
|
|
||||||
<InitialAligner />
|
<InitialAligner />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { Box, Flex } from "@radix-ui/themes";
|
import { Box, Flex } from "@radix-ui/themes";
|
||||||
import { times } from "lodash-es";
|
import { times } from "lodash-es";
|
||||||
import { Suspense, useEffect, useMemo, useRef } from "react";
|
import { useEffect, useMemo, useRef } from "react";
|
||||||
import { awaitableTankDefinitions } from "../../../core/awaitables/tankDefinitions";
|
import { awaitableTankDefinitions } from "../../../core/awaitables/tankDefinitions";
|
||||||
import { useFullScreen } from "../../../hooks/useFullScreen";
|
import { useFullScreen } from "../../../hooks/useFullScreen";
|
||||||
import { Duel } from "../../../stores/duel";
|
import { Duel } from "../../../stores/duel";
|
||||||
@@ -99,11 +99,11 @@ export function HeroSection({ skeleton }: MaybeSkeletonComponentProps) {
|
|||||||
isFullScreen
|
isFullScreen
|
||||||
? "100vh"
|
? "100vh"
|
||||||
: disturbed
|
: disturbed
|
||||||
? "calc(100svh - 8rem)"
|
? "calc(100svh - 8rem)"
|
||||||
: {
|
: {
|
||||||
initial: "28rem",
|
initial: "28rem",
|
||||||
md: "calc(100svh - 14rem)",
|
md: "calc(100svh - 14rem)",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
maxWidth={isFullScreen ? undefined : "120rem"}
|
maxWidth={isFullScreen ? undefined : "120rem"}
|
||||||
flexGrow="1"
|
flexGrow="1"
|
||||||
@@ -120,30 +120,17 @@ export function HeroSection({ skeleton }: MaybeSkeletonComponentProps) {
|
|||||||
position="relative"
|
position="relative"
|
||||||
>
|
>
|
||||||
<Box position="absolute" width="100%" height="100%" overflow="hidden">
|
<Box position="absolute" width="100%" height="100%" overflow="hidden">
|
||||||
<Box
|
<Box width="100%" height="100%" position="relative">
|
||||||
width="100%"
|
|
||||||
height="100%"
|
|
||||||
position="relative"
|
|
||||||
style={{
|
|
||||||
transitionDuration: "1s",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Box
|
<Box
|
||||||
style={{
|
position="absolute"
|
||||||
width: "100%",
|
width="100%"
|
||||||
height: "100%",
|
height="100%"
|
||||||
transitionDuration: "2s",
|
top="0"
|
||||||
opacity: revealed ? 1 : 0,
|
left="0"
|
||||||
filter: disturbed
|
|
||||||
? undefined
|
|
||||||
: `drop-shadow(0 1rem 1rem black)`,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<Suspense>
|
{!skeleton && (
|
||||||
{!skeleton && (
|
<TankSandbox ref={canvas} thicknessRange={thicknessRange} />
|
||||||
<TankSandbox ref={canvas} thicknessRange={thicknessRange} />
|
)}
|
||||||
)}
|
|
||||||
</Suspense>
|
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user