main
1// Package harmonica is a set of physics-based animation tools for 2D and 3D
2// applications. There's a spring animation simulator for for smooth, realistic
3// motion and a projectile simulator well suited for projectiles and particles.
4//
5// Example spring usage:
6//
7// // Run once to initialize.
8// spring := NewSpring(FPS(60), 6.0, 0.2)
9//
10// // Update on every frame.
11// pos := 0.0
12// velocity := 0.0
13// targetPos := 100.0
14// someUpdateLoop(func() {
15// pos, velocity = spring.Update(pos, velocity, targetPos)
16// })
17//
18// Example projectile usage:
19//
20// // Run once to initialize.
21// projectile := NewProjectile(
22// FPS(60),
23// Point{6.0, 100.0, 0.0},
24// Vector{2.0, 0.0, 0.0},
25// Vector{2.0, -9.81, 0.0},
26// )
27//
28// // Update on every frame.
29// someUpdateLoop(func() {
30// pos := projectile.Update()
31// })
32package harmonica