TopologyViewerComponent(...) -> new TopologyViewerComponent component.
A component that takes incoming topology (change) data and displays it live using pygame. A simple physics model assists with visual layout. Particle types, appearance and physics interactions can be customised.
Keyword arguments (in order): - screensize -- (width,height) of the display area (default = (800,600)) - fullscreen -- True to start up in fullscreen mode (default = False) - caption -- Caption for the pygame window (default = "Topology Viewer") - particleTypes -- dict("type" -> klass) mapping types of particle to classes used to render them (default = {"-":RenderingParticle}) - initialTopology -- (nodes,bonds) where bonds=list((src,dst)) starting state for the topology (default=([],[])) - laws -- Physics laws to apply between particles (default = SimpleLaws(bondlength=100)) - simCyclesPerRedraw -- number of physics sim cycles to run between each redraw (default=1) - border -- Minimum distance from edge of display area that new particles appear (default=100) - extraDrawing -- Optional extra object to be rendered (default=None) - showGrid -- False, or True to show gridlines (default=True) - transparency -- None, or (r,g,b) colour to make transparent - position -- None, or (left,top) position for surface within pygame window
Warning! You should be using the inbox/outbox interface, not these methods (except construction). This documentation is designed as a roadmap as to their functionalilty for maintainers and new component developers. |