refactor: clean map gameplay architecture
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
import type { WindState } from "@/data/world/windConfig";
|
||||
|
||||
export function getWindVector(wind: WindState): { x: number; z: number } {
|
||||
const intensity = wind.speed * wind.strength;
|
||||
|
||||
return {
|
||||
x: Math.cos(wind.direction) * intensity,
|
||||
z: Math.sin(wind.direction) * intensity,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user