Skip to main content

Crate chubby_bunny_svg

Crate chubby_bunny_svg 

Source

Structs§

AttachmentSettings
Settings for how child bodies should be attached to parent bodies when parsing from SVG files.
BodyMeta
Metadata associated with a body, including its unique ID, colors for stroke and fill, line weight, z-index for rendering order, and whether to smooth edges when rendering. This is made to be easily serialized for canvas like renderers
BodySettings
Color
Represents an RGBA color with red, green, blue components as u8 (0-255) and alpha as f32 (0.0-1.0).
ConstraintSettings
Settings for automatic constraint generation, based to SVG polygon shapes.
ParticleSettings
How to set up particles, that are being parsed from SVG files.
SVGConstraintSettings

Functions§

add_automatic_constraints
Adds automatic constraints to the body and all its descendants based on the provided settings.
instantiate_svg_bodies
Instantiates multiple body templates, applying the given transformation to each instance. This also generates a new MetaMap for the instances, copying and transforming the metadata from the templates.
instantiate_svg_body
Creates a new instance of a body template, applying the given transformation to the instance. This also generates a new MetaMap for the instance, copying and transforming the metadata from the template.
load_svg
Loads an svg string into a vector of body templates and a corresponding MetaMap.
load_svg_to_body
loads an SVG string into a vector of body templates and a corresponding MetaMap. The body templates are normalized to fit within a unit square, and the MetaMap contains metadata for each body, indexed by their IDs.

Type Aliases§

MetaMap