mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-25 03:29:51 +01:00
feat: some simplification
This commit is contained in:
1 parent
1427f61c52
commit
fd37f72f8c
3 files changed
+8
-19
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";
|
||||||
@@ -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 width="100%" height="100%" position="relative">
|
||||||
<Box
|
<Box
|
||||||
|
position="absolute"
|
||||||
width="100%"
|
width="100%"
|
||||||
height="100%"
|
height="100%"
|
||||||
position="relative"
|
top="0"
|
||||||
style={{
|
left="0"
|
||||||
transitionDuration: "1s",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<Box
|
|
||||||
style={{
|
|
||||||
width: "100%",
|
|
||||||
height: "100%",
|
|
||||||
transitionDuration: "2s",
|
|
||||||
opacity: revealed ? 1 : 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