🚀 Auto-deploy: BrainWind atualizado em 28/07/2026 10:52:16
This commit is contained in:
@@ -78,13 +78,13 @@ function WindDirectionIndicator({ angle, width, length, height }: { angle: numbe
|
||||
const isDark = useCanvasTheme() === 'dark';
|
||||
const color = isDark ? "#38bdf8" : "#0284c7"; // Light blue / dark blue
|
||||
|
||||
// Angle 0: Wind blows along Z axis, from negative Z towards origin (hitting Wall A at Z=-length/2)
|
||||
// Angle 90: Wind blows along X axis, from negative X towards origin (hitting Wall C at X=-width/2)
|
||||
// Angle 0: Wind blows along X axis, from negative X towards origin (hitting Wall C at X=-width/2)
|
||||
// Angle 90: Wind blows along Z axis, from negative Z towards origin (hitting Wall A at Z=-length/2)
|
||||
|
||||
const dir = angle === 0 ? new THREE.Vector3(0, 0, 1) : new THREE.Vector3(1, 0, 0);
|
||||
const dir = angle === 90 ? new THREE.Vector3(0, 0, 1) : new THREE.Vector3(1, 0, 0);
|
||||
|
||||
const distance = Math.max(width, length) * 0.6 + 5;
|
||||
const startPos = angle === 0 ? new THREE.Vector3(0, height / 2, -distance) : new THREE.Vector3(-distance, height / 2, 0);
|
||||
const startPos = angle === 90 ? new THREE.Vector3(0, height / 2, -distance) : new THREE.Vector3(-distance, height / 2, 0);
|
||||
|
||||
const quat = new THREE.Quaternion();
|
||||
quat.setFromUnitVectors(new THREE.Vector3(0, 1, 0), dir);
|
||||
@@ -116,13 +116,13 @@ function hasOpening(wall: 'A' | 'B' | 'C' | 'D', permCase: string, windAngle: nu
|
||||
if (permCase === 'four-equally-permeable') return true;
|
||||
if (permCase === 'two-opposite-permeable') return wall === 'A' || wall === 'B';
|
||||
if (permCase === 'dominant-windward') {
|
||||
return windAngle === 0 ? wall === 'A' : wall === 'C';
|
||||
return windAngle === 0 ? wall === 'C' : wall === 'A';
|
||||
}
|
||||
if (permCase === 'dominant-leeward') {
|
||||
return windAngle === 0 ? wall === 'B' : wall === 'D';
|
||||
return windAngle === 0 ? wall === 'D' : wall === 'B';
|
||||
}
|
||||
if (permCase === 'dominant-lateral') {
|
||||
return windAngle === 0 ? wall === 'C' : wall === 'A';
|
||||
return windAngle === 0 ? (wall === 'A' || wall === 'B') : (wall === 'C' || wall === 'D');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -187,15 +187,15 @@ export function WarehouseModel() {
|
||||
<group position={[-width / 2, height / 2, 0]}>
|
||||
<mesh position={[0, 0, -length / 4]} castShadow receiveShadow>
|
||||
<boxGeometry args={[wallThickness, height, length / 2]} />
|
||||
<meshStandardMaterial color={isParallel ? wallCColor : wallAColor} roughness={0.4} />
|
||||
<meshStandardMaterial color={wallCColor} roughness={0.4} />
|
||||
</mesh>
|
||||
<PressureArrow center={[0, 0, -length / 4]} normal={[-1, 0, 0]} p={(isParallel ? wallCpe.C : wallCpe.A) - cpi} />
|
||||
<PressureArrow center={[0, 0, -length / 4]} normal={[-1, 0, 0]} p={wallCpe.C - cpi} />
|
||||
|
||||
<mesh position={[0, 0, length / 4]} castShadow receiveShadow>
|
||||
<boxGeometry args={[wallThickness, height, length / 2]} />
|
||||
<meshStandardMaterial color={isParallel ? wallDColor : wallAColor} roughness={0.4} />
|
||||
<meshStandardMaterial color={isParallel ? wallDColor : wallCColor} roughness={0.4} />
|
||||
</mesh>
|
||||
<PressureArrow center={[0, 0, length / 4]} normal={[-1, 0, 0]} p={(isParallel ? wallCpe.D : wallCpe.A) - cpi} />
|
||||
<PressureArrow center={[0, 0, length / 4]} normal={[-1, 0, 0]} p={(isParallel ? wallCpe.D : wallCpe.C) - cpi} />
|
||||
|
||||
{hasOpening('C', permeabilityCase, windAngle) && (
|
||||
<mesh position={[-wallThickness/2 - 0.01, -height/4, 0]}>
|
||||
@@ -209,15 +209,15 @@ export function WarehouseModel() {
|
||||
<group position={[width / 2, height / 2, 0]}>
|
||||
<mesh position={[0, 0, -length / 4]} castShadow receiveShadow>
|
||||
<boxGeometry args={[wallThickness, height, length / 2]} />
|
||||
<meshStandardMaterial color={isParallel ? wallCColor : wallBColor} roughness={0.4} />
|
||||
<meshStandardMaterial color={isParallel ? wallCColor : wallDColor} roughness={0.4} />
|
||||
</mesh>
|
||||
<PressureArrow center={[0, 0, -length / 4]} normal={[1, 0, 0]} p={(isParallel ? wallCpe.C : wallCpe.B) - cpi} />
|
||||
<PressureArrow center={[0, 0, -length / 4]} normal={[1, 0, 0]} p={(isParallel ? wallCpe.C : wallCpe.D) - cpi} />
|
||||
|
||||
<mesh position={[0, 0, length / 4]} castShadow receiveShadow>
|
||||
<boxGeometry args={[wallThickness, height, length / 2]} />
|
||||
<meshStandardMaterial color={isParallel ? wallDColor : wallBColor} roughness={0.4} />
|
||||
<meshStandardMaterial color={wallDColor} roughness={0.4} />
|
||||
</mesh>
|
||||
<PressureArrow center={[0, 0, length / 4]} normal={[1, 0, 0]} p={(isParallel ? wallCpe.D : wallCpe.B) - cpi} />
|
||||
<PressureArrow center={[0, 0, length / 4]} normal={[1, 0, 0]} p={wallCpe.D - cpi} />
|
||||
|
||||
{hasOpening('D', permeabilityCase, windAngle) && (
|
||||
<mesh position={[wallThickness/2 + 0.01, -height/4, 0]}>
|
||||
@@ -231,15 +231,15 @@ export function WarehouseModel() {
|
||||
<group position={[0, height / 2, -length / 2]}>
|
||||
<mesh position={[-width / 4, 0, 0]} castShadow receiveShadow>
|
||||
<boxGeometry args={[width / 2, height, wallThickness]} />
|
||||
<meshStandardMaterial color={isParallel ? wallAColor : wallCColor} roughness={0.4} />
|
||||
<meshStandardMaterial color={wallAColor} roughness={0.4} />
|
||||
</mesh>
|
||||
<PressureArrow center={[-width / 4, 0, 0]} normal={[0, 0, -1]} p={(isParallel ? wallCpe.A : wallCpe.C) - cpi} />
|
||||
<PressureArrow center={[-width / 4, 0, 0]} normal={[0, 0, -1]} p={wallCpe.A - cpi} />
|
||||
|
||||
<mesh position={[width / 4, 0, 0]} castShadow receiveShadow>
|
||||
<boxGeometry args={[width / 2, height, wallThickness]} />
|
||||
<meshStandardMaterial color={isParallel ? wallAColor : wallDColor} roughness={0.4} />
|
||||
<meshStandardMaterial color={isParallel ? wallAColor : wallBColor} roughness={0.4} />
|
||||
</mesh>
|
||||
<PressureArrow center={[width / 4, 0, 0]} normal={[0, 0, -1]} p={(isParallel ? wallCpe.A : wallCpe.D) - cpi} />
|
||||
<PressureArrow center={[width / 4, 0, 0]} normal={[0, 0, -1]} p={(isParallel ? wallCpe.A : wallCpe.B) - cpi} />
|
||||
|
||||
{hasOpening('A', permeabilityCase, windAngle) && (
|
||||
<mesh position={[0, -height/4, -wallThickness/2 - 0.01]}>
|
||||
@@ -253,15 +253,15 @@ export function WarehouseModel() {
|
||||
<group position={[0, height / 2, length / 2]}>
|
||||
<mesh position={[-width / 4, 0, 0]} castShadow receiveShadow>
|
||||
<boxGeometry args={[width / 2, height, wallThickness]} />
|
||||
<meshStandardMaterial color={isParallel ? wallBColor : wallCColor} roughness={0.4} />
|
||||
<meshStandardMaterial color={isParallel ? wallBColor : wallAColor} roughness={0.4} />
|
||||
</mesh>
|
||||
<PressureArrow center={[-width / 4, 0, 0]} normal={[0, 0, 1]} p={(isParallel ? wallCpe.B : wallCpe.C) - cpi} />
|
||||
<PressureArrow center={[-width / 4, 0, 0]} normal={[0, 0, 1]} p={(isParallel ? wallCpe.B : wallCpe.A) - cpi} />
|
||||
|
||||
<mesh position={[width / 4, 0, 0]} castShadow receiveShadow>
|
||||
<boxGeometry args={[width / 2, height, wallThickness]} />
|
||||
<meshStandardMaterial color={isParallel ? wallBColor : wallDColor} roughness={0.4} />
|
||||
<meshStandardMaterial color={wallBColor} roughness={0.4} />
|
||||
</mesh>
|
||||
<PressureArrow center={[width / 4, 0, 0]} normal={[0, 0, 1]} p={(isParallel ? wallCpe.B : wallCpe.D) - cpi} />
|
||||
<PressureArrow center={[width / 4, 0, 0]} normal={[0, 0, 1]} p={wallCpe.B - cpi} />
|
||||
|
||||
{hasOpening('B', permeabilityCase, windAngle) && (
|
||||
<mesh position={[0, -height/4, wallThickness/2 + 0.01]}>
|
||||
@@ -643,7 +643,7 @@ export function WarehouseModel() {
|
||||
anchorX="center"
|
||||
anchorY="middle"
|
||||
>
|
||||
{isParallel ? 'Parede B (Sotavento)' : 'Parede C (Barlavento)'}
|
||||
{isParallel ? 'Parede B (Sotavento)' : 'Parede B (Lateral)'}
|
||||
</Text>
|
||||
|
||||
{/* Rótulo Parede Traseira */}
|
||||
@@ -658,7 +658,7 @@ export function WarehouseModel() {
|
||||
anchorX="center"
|
||||
anchorY="middle"
|
||||
>
|
||||
{isParallel ? 'Parede A (Barlavento)' : 'Parede D (Sotavento)'}
|
||||
{isParallel ? 'Parede A (Barlavento)' : 'Parede A (Lateral)'}
|
||||
</Text>
|
||||
|
||||
{/* Rótulo Parede Esquerda */}
|
||||
@@ -673,7 +673,7 @@ export function WarehouseModel() {
|
||||
anchorX="center"
|
||||
anchorY="middle"
|
||||
>
|
||||
{isParallel ? 'Parede C (Lateral)' : 'Parede A (Lateral)'}
|
||||
{isParallel ? 'Parede C (Lateral)' : 'Parede C (Barlavento)'}
|
||||
</Text>
|
||||
|
||||
{/* Rótulo Parede Direita */}
|
||||
@@ -688,7 +688,7 @@ export function WarehouseModel() {
|
||||
anchorX="center"
|
||||
anchorY="middle"
|
||||
>
|
||||
{isParallel ? 'Parede D (Lateral)' : 'Parede B (Lateral)'}
|
||||
{isParallel ? 'Parede D (Lateral)' : 'Parede D (Sotavento)'}
|
||||
</Text>
|
||||
</group>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user