Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PngDebugDraw ¶
type PngDebugDraw struct { // Folder to store the frames OutputFolder string // Decimal to Pixel conversion factor // // The engine works on decimal, so 1 means 1 meter // this is used to convert 1 meter to N pixels DecToPix float32 // If the next frame should be saved to disk when // EndFrame is called // // Usefull to skip frames where the visual change is // small SaveToDisk bool // Total time from the simulation (fixed time step) that // should be waited to save a new frame. // // If dt = 1/60, and you want to save at a 1/30 fps you should // set this to 1/30 then the simulation will be saved every 2 frames // // A value of 0 means save every frame TimeBetweenFrames float32 // contains filtered or unexported fields }
Implement the debugdraw interface from figo and save the output to a gif file
func (*PngDebugDraw) BeginFrame ¶
func (f *PngDebugDraw) BeginFrame(info figo.FrameData)
func (*PngDebugDraw) DrawShape ¶
func (s *PngDebugDraw) DrawShape(shape *figo.Shape, mass, vel, acc float32)
func (*PngDebugDraw) EndFrame ¶
func (s *PngDebugDraw) EndFrame()
Click to show internal directories.
Click to hide internal directories.