🚀 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
+5 -5
View File
@@ -61,9 +61,9 @@ export function AirflowSystem({ windAngle, width, length, height, permeabilityCa
if (!meshRef.current) return;
const time = state.clock.elapsedTime;
// Agora 0° é paralelo à Parede A (ao longo do eixo Z)
// E 90° é paralelo à Parede C (ao longo do eixo X)
const isZAxis = windAngle === 0;
// Agora 0° é paralelo à Parede A e bate na Parede C (Eixo X)
// E 90° é paralelo à Parede C e bate na Parede A (Eixo Z)
const isZAxis = windAngle === 90;
const windDir = isZAxis ? new THREE.Vector3(0, 0, 1) : new THREE.Vector3(1, 0, 0);
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)
const isAirtight = permeabilityCase !== 'four-equally-permeable';
if (isAirtight) {
if (windAngle === 0 && pz < -halfL + margin) {
if (windAngle === 90 && pz < -halfL + margin) {
deflectY = p.baseSpeed * 2.0; // Levanta pro telhado
deflectX = px > 0 ? p.baseSpeed * 2.0 : -p.baseSpeed * 2.0; // Contorna laterais
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
deflectZ = pz > 0 ? p.baseSpeed * 2.0 : -p.baseSpeed * 2.0; // Contorna laterais
p.position.x -= p.baseSpeed * 1.5; // Impede de avançar