update logistices
This commit is contained in:
@@ -112,7 +112,7 @@ const CalculationBeamMemo = React.memo(CalculationBeam);
|
||||
* a particle shell and neural links. It powers up during the AI-scan phase,
|
||||
* fires an expanding radar scan, then a route-optimization burst.
|
||||
*/
|
||||
function AICore({ progress, reduced = false }: Props) {
|
||||
function AICore({ progress }: Props) {
|
||||
const root = useRef<THREE.Group>(null);
|
||||
|
||||
const hubOffsets = useMemo(() => {
|
||||
|
||||
@@ -26,7 +26,7 @@ const clusterCenters = Array.from({ length: clusterCount }, (_, c) => {
|
||||
return new THREE.Vector3(cx, 0.1, cz);
|
||||
});
|
||||
|
||||
function HologramCity({ progress, reduced = false }: Props) {
|
||||
function HologramCity({ progress }: Props) {
|
||||
const mainWarehouseRef = useRef<THREE.Group>(null);
|
||||
const radarRefs = useRef<(THREE.Group | null)[]>([]);
|
||||
const corridorMats = useRef<(THREE.LineBasicMaterial | null)[]>([]);
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
"use client";
|
||||
|
||||
import React, { useMemo, useRef } from "react";
|
||||
import React, { useRef } from "react";
|
||||
import { Canvas, useFrame } from "@react-three/fiber";
|
||||
import { EffectComposer, Bloom, Vignette } from "@react-three/postprocessing";
|
||||
import { KernelSize } from "postprocessing";
|
||||
import * as THREE from "three";
|
||||
import { COLORS } from "./constants";
|
||||
import { damp, lerp, seeded } from "./math";
|
||||
import { damp, lerp } from "./math";
|
||||
import HologramCity from "./HologramCity";
|
||||
import RouteSystem from "./RouteSystem";
|
||||
import VehicleFleet from "./VehicleFleet";
|
||||
|
||||
@@ -451,19 +451,22 @@ const styles = `
|
||||
top: 110px !important;
|
||||
left: 40px !important;
|
||||
right: 40px !important;
|
||||
bottom: 24px !important;
|
||||
border-radius: 35px !important;
|
||||
bottom: 0 !important;
|
||||
/* flat bottom + flush to container so the Performance card butts directly
|
||||
against it, reading as one continuous container (home-page technique) */
|
||||
border-radius: 42px 42px 0 0 !important;
|
||||
overflow: hidden !important;
|
||||
background: linear-gradient(165deg, #06101f 0%, #020617 35%, #040d1c 70%, #030a18 100%) !important;
|
||||
border: 1.5px solid ${rgba("#ffffff", 0.08)} !important;
|
||||
box-shadow:
|
||||
0 0 0 1px ${rgba(COLORS.cyan, 0.04)},
|
||||
0 4px 30px -4px rgba(0, 0, 0, 0.7),
|
||||
0 20px 80px -20px rgba(0, 0, 0, 0.6),
|
||||
0 0 120px -30px ${rgba(COLORS.cyan, 0.08)},
|
||||
inset 0 1px 0 ${rgba("#ffffff", 0.06)},
|
||||
inset 0 -1px 0 ${rgba("#ffffff", 0.02)} !important;
|
||||
box-sizing: border-box !important;
|
||||
// background: linear-gradient(165deg, #06101f 0%, #020617 35%, #040d1c 70%, #030a18 100%) !important;
|
||||
// border: 0px solid ${rgba("#ffffff", 0.08)} !important;
|
||||
border-bottom: none !important;
|
||||
// box-shadow:
|
||||
// 0 0 0 1px ${rgba(COLORS.cyan, 0.04)},
|
||||
// 0 4px 30px -4px rgba(0, 0, 0, 0.7),
|
||||
// 0 20px 80px -20px rgba(0, 0, 0, 0.6),
|
||||
// 0 0 120px -30px ${rgba(COLORS.cyan, 0.08)},
|
||||
// inset 0 1px 0 ${rgba("#ffffff", 0.06)},
|
||||
// inset 0 -1px 0 ${rgba("#ffffff", 0.02)} !important;
|
||||
// box-sizing: border-box !important;
|
||||
}
|
||||
/* Animated subtle grid pattern */
|
||||
.dm-opt-card::before {
|
||||
@@ -493,8 +496,8 @@ const styles = `
|
||||
top: 96px !important;
|
||||
left: 20px !important;
|
||||
right: 20px !important;
|
||||
bottom: 16px !important;
|
||||
border-radius: 42px !important;
|
||||
bottom: 0 !important;
|
||||
border-radius: 42px 42px 0 0 !important;
|
||||
}
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
@@ -502,8 +505,8 @@ const styles = `
|
||||
top: 86px !important;
|
||||
left: 10px !important;
|
||||
right: 10px !important;
|
||||
bottom: 10px !important;
|
||||
border-radius: 28px !important;
|
||||
bottom: 0 !important;
|
||||
border-radius: 28px 28px 0 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -120,15 +120,6 @@ function VehicleFleet({ progress, reduced = false }: Props) {
|
||||
const chaosProgress = useRef<number[]>([]);
|
||||
const optProgress = useRef<number[]>([]);
|
||||
|
||||
// Re-sync on length change (not just when empty) so a fleet-size edit / HMR
|
||||
// doesn't leave indices reading `undefined` and crashing getPointAt().
|
||||
if (chaosProgress.current.length !== chaosFleet.length) {
|
||||
chaosProgress.current = chaosFleet.map((v) => v.offset);
|
||||
}
|
||||
if (optProgress.current.length !== optFleet.length) {
|
||||
optProgress.current = optFleet.map((v) => v.offset);
|
||||
}
|
||||
|
||||
const place = (
|
||||
group: THREE.Group | null,
|
||||
def: VehicleDef,
|
||||
@@ -191,6 +182,15 @@ function VehicleFleet({ progress, reduced = false }: Props) {
|
||||
};
|
||||
|
||||
useFrame((state, dt) => {
|
||||
// Re-sync on length change (not just when empty) so a fleet-size edit / HMR
|
||||
// doesn't leave indices reading `undefined` and crashing getPointAt().
|
||||
if (chaosProgress.current.length !== chaosFleet.length) {
|
||||
chaosProgress.current = chaosFleet.map((v) => v.offset);
|
||||
}
|
||||
if (optProgress.current.length !== optFleet.length) {
|
||||
optProgress.current = optFleet.map((v) => v.offset);
|
||||
}
|
||||
|
||||
const p = progress.current ?? 0;
|
||||
const t = state.clock.elapsedTime;
|
||||
const safeDt = Math.min(0.06, dt);
|
||||
|
||||
Reference in New Issue
Block a user