Versions in this module Expand all Collapse all v0 v0.0.7 May 6, 2026 v0.0.6 Apr 24, 2026 Changes in this version + const DefaultDrag + const DefaultGravity + const DefaultMass type IntegrationStep + func NewDefaultVerletIntegrator(ps *ParticleSystem) IntegrationStep + func NewVelocityVerletIntegrator(ps *ParticleSystem) IntegrationStep type ParticleSystem + func NewDefaultParticleSystem() *ParticleSystem + func NewParticleSystem(g, drag float64) *ParticleSystem + func (ps *ParticleSystem) NewAttraction(a, b *Particle, strength, minimumDistance float64) *Attraction + func (ps *ParticleSystem) NewDefaultParticle() *Particle + func (ps *ParticleSystem) NewParticle(mass, x, y, z float64) *Particle + func (ps *ParticleSystem) NewSpring(a, b *Particle, strength, damping, restLength float64) *Spring v0.0.5 Apr 24, 2026 v0.0.4 May 26, 2025 Changes in this version + const DEFAULT_DRAG + const DEFAULT_GRAVITY + const DEFAULT_MASS + type Attraction struct + A *Particle + B *Particle + MinimumDistanceSquared float64 + On bool + Strength float64 + func (a *Attraction) SetMinimumDistance(minimumDistance float64) + func (a *Attraction) TurnOff() + func (a *Attraction) TurnOn() + type FPS struct + Value float64 + func (f *FPS) Tick() *FPS + func (f FPS) String() string + type IntegrationStep func(t float64) float64 + func MakeDefaultVerletIntegrator(ps *ParticleSystem) IntegrationStep + func MakeVelocityVerletIntegrator(ps *ParticleSystem) IntegrationStep + type Particle struct + Fixed bool + Force Vec3 + Mass float64 + Position Vec3 + Velocity Vec3 + type ParticleSystem struct + Attractions []*Attraction + Drag float64 + Gravity Vec3 + Particles []*Particle + Springs []*Spring + Step IntegrationStep + func MakeDefaultParticleSystem() *ParticleSystem + func MakeParticleSystem(g, drag float64) *ParticleSystem + func (ps *ParticleSystem) ApplyForces() + func (ps *ParticleSystem) Clear() + func (ps *ParticleSystem) MakeAttraction(a, b *Particle, strength, minimumDistance float64) *Attraction + func (ps *ParticleSystem) MakeDefaultParticle() *Particle + func (ps *ParticleSystem) MakeParticle(mass, x, y, z float64) *Particle + func (ps *ParticleSystem) MakeSpring(a, b *Particle, strength, damping, restLength float64) *Spring + func (ps *ParticleSystem) Tick(t float64) float64 + type Spring struct + A *Particle + B *Particle + Damping float64 + On bool + RestLength float64 + Strength float64 + func (s *Spring) TurnOff() + func (s *Spring) TurnOn() + type Vec3 struct + X float64 + Y float64 + Z float64 + func (v *Vec3) AddAssign(a Vec3) + func (v *Vec3) ScaleAssign(scalar float64) + func (v *Vec3) SubtractAssign(a Vec3) + func (v Vec3) Add(a Vec3) Vec3 + func (v Vec3) Dot(a Vec3) float64 + func (v Vec3) Length() float64 + func (v Vec3) LengthSquared() float64 + func (v Vec3) Scale(scalar float64) Vec3 + func (v Vec3) Subtract(a Vec3) Vec3