SVG and HTML rendering#
- module:
Draw the world as a SVG.
- Parameters:
world – The world to display
kwargs – Optional configuration: same fields as
navground.sim.ui.RenderConfig
.
The actual configuration is computed by looking (in order) to
the arguments of this function;
the world-specific configuration
navground.sim.World.render_kwargs
;the default configuration
navground.sim.ui.render_default_config
.
- Returns:
An SVG string
Draw the world as a SVG embedded in HTML, optionally with a javascript script to keep the view in sync with
navground.sim.ui.WebUI
- Parameters:
world – The world to display
world_name – The world name used as title
with_websocket – Whether to add a websocket client to keep the view in sync
notebook – Whether the HTML will be embedded in a notebook
port – The websocket port
display_shape – Whether to display the agent circular shape
external_style_path – The external style path
style – An inline CSS style to include
include_script_path – An alternative script path to be included
kwargs – Optional configuration: same fields as
navground.sim.ui.RenderConfig
.
The actual configuration is computed by looking (in order) to
the arguments of this function;
the world-specific configuration
navground.sim.World.render_kwargs
;the default configuration
navground.sim.ui.render_default_config
.
- Returns:
An HTML string