🚀 Auto-deploy: BrainWind atualizado em 28/07/2026 11:57:50

This commit is contained in:
2026-07-28 11:57:50 +00:00
parent 3752f4a8a1
commit e8334c3603
3 changed files with 11 additions and 11 deletions
+4 -4
View File
@@ -80,13 +80,13 @@ function WindDirectionIndicator({ angle, width, length, height }: { angle: numbe
const isDark = useCanvasTheme() === 'dark'; const isDark = useCanvasTheme() === 'dark';
const color = isDark ? "#38bdf8" : "#0284c7"; // Light blue / dark blue const color = isDark ? "#38bdf8" : "#0284c7"; // Light blue / dark blue
// Angle 0: Wind blows along Z axis (Perpendicular à largura X) // Angle 0: Vento bate na Parede C (Eixo X) - Perpendicular ao comprimento
// Angle 90: Wind blows along X axis (Paralelo à largura X) // Angle 90: Vento bate na Parede A (Eixo Z) - Perpendicular à largura
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 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(); const quat = new THREE.Quaternion();
quat.setFromUnitVectors(new THREE.Vector3(0, 1, 0), dir); quat.setFromUnitVectors(new THREE.Vector3(0, 1, 0), dir);
+5 -5
View File
@@ -61,9 +61,9 @@ export function AirflowSystem({ windAngle, width, length, height, permeabilityCa
if (!meshRef.current) return; if (!meshRef.current) return;
const time = state.clock.elapsedTime; const time = state.clock.elapsedTime;
// Agora 0° é paralelo à Parede A (ao longo do eixo Z) // Agora 0° é paralelo à Parede A e bate na Parede C (Eixo X)
// E 90° é paralelo à Parede C (ao longo do eixo X) // E 90° é paralelo à Parede C e bate na Parede A (Eixo Z)
const isZAxis = windAngle === 0; const isZAxis = windAngle === 90;
const windDir = isZAxis ? new THREE.Vector3(0, 0, 1) : new THREE.Vector3(1, 0, 0); const windDir = isZAxis ? new THREE.Vector3(0, 0, 1) : new THREE.Vector3(1, 0, 0);
const halfW = width / 2; const halfW = width / 2;
@@ -98,11 +98,11 @@ export function AirflowSystem({ windAngle, width, length, height, permeabilityCa
// Colisão: Expulsar as partículas do interior com força (Desvio realístico) // Colisão: Expulsar as partículas do interior com força (Desvio realístico)
const isAirtight = permeabilityCase !== 'four-equally-permeable'; const isAirtight = permeabilityCase !== 'four-equally-permeable';
if (isAirtight) { if (isAirtight) {
if (windAngle === 0 && pz < -halfL + margin) { if (windAngle === 90 && pz < -halfL + margin) {
deflectY = p.baseSpeed * 2.0; // Levanta pro telhado deflectY = p.baseSpeed * 2.0; // Levanta pro telhado
deflectX = px > 0 ? p.baseSpeed * 2.0 : -p.baseSpeed * 2.0; // Contorna laterais deflectX = px > 0 ? p.baseSpeed * 2.0 : -p.baseSpeed * 2.0; // Contorna laterais
p.position.z -= p.baseSpeed * 1.5; // Impede de avançar p.position.z -= p.baseSpeed * 1.5; // Impede de avançar
} else if (windAngle === 90 && px < -halfW + margin) { } else if (windAngle === 0 && px < -halfW + margin) {
deflectY = p.baseSpeed * 2.0; // Levanta pro telhado deflectY = p.baseSpeed * 2.0; // Levanta pro telhado
deflectZ = pz > 0 ? p.baseSpeed * 2.0 : -p.baseSpeed * 2.0; // Contorna laterais deflectZ = pz > 0 ? p.baseSpeed * 2.0 : -p.baseSpeed * 2.0; // Contorna laterais
p.position.x -= p.baseSpeed * 1.5; // Impede de avançar p.position.x -= p.baseSpeed * 1.5; // Impede de avançar
+2 -2
View File
@@ -236,8 +236,8 @@ const GalpaoModule: React.FC = () => {
<SelectValue placeholder="Selecione a direção" /> <SelectValue placeholder="Selecione a direção" />
</SelectTrigger> </SelectTrigger>
<SelectContent> <SelectContent>
<SelectItem value="0">0° (Perpendicular à largura)</SelectItem> <SelectItem value="0">0° (Perpendicular ao comprimento)</SelectItem>
<SelectItem value="90">90° (Paralelo à largura)</SelectItem> <SelectItem value="90">90° (Perpendicular à largura)</SelectItem>
</SelectContent> </SelectContent>
</Select> </Select>
</div> </div>