Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Params ¶
type Params struct { NumFrames int Gravity float64 Worker func(int, func(int), ...string) Things struct { Dynamic []*ThingParams Static []*ThingParams Walls struct { Distance float64 Bounciness float64 Friction float64 Left bool Right bool Top bool Bottom bool } } Solver struct { TimeStep func(float64) float64 VelocityIterations int PositionIterations int } }
type Recording ¶
type Recording struct { Active []bool Frames []int Angles []float64 WorldCenters []box2d.Point LocalCenters []box2d.Point Bounds []box2d.AABB }
func (*Recording) PadRightTo ¶
type Thing ¶
type Thing struct { *ThingParams Shape *box2d.PolygonShape Fixture *box2d.Fixture Frame int Static bool Recording Recording }
func (*Thing) LocalCenter ¶
func (*Thing) SpawnDynamic ¶
func (*Thing) SpawnStatic ¶
func (*Thing) WorldCenter ¶
type ThingParams ¶
type ThingParams struct { Images []image.Image Polygons [][]box2d.Point Bounciness func(float64) float64 LinearDamping func(float64) float64 AngularDamping func(float64) float64 Friction func(float64) float64 Initial struct { LinearVelocity box2d.Point Position box2d.Point Time float64 AngularVelocityDeg float64 } }
func (*ThingParams) New ¶
func (p *ThingParams) New() *Thing
Click to show internal directories.
Click to hide internal directories.