boids

package
v0.0.0-...-f899180 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultO = O{
		PoolSize: 24,

		AvoidanceWeight:  5,
		AvoidanceHorizon: 1,

		SeekWeight: 0,

		ArrivalWeight:  1,
		ArrivalHorizon: 3,
	}
)

Functions

This section is empty.

Types

type B

type B struct {
	// contains filtered or unexported fields
}

func New

func New(db *database.DB, o O) *B

func (*B) Tick

func (b *B) Tick(d time.Duration)

TODO(minkezhang): Make concurrent.

type O

type O struct {
	PoolSize int

	AvoidanceWeight  float64
	AvoidanceHorizon float64
	SeekWeight       float64
	ArrivalWeight    float64
	ArrivalHorizon   float64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL