driptorch.Igniter#
- class driptorch.Igniter(velocity: float, gap_length: Optional[float] = None, dash_length: Optional[float] = None)#
An igniter is anything with a velocity and ignition interval, like a person carrying a drip torch or a drone dispatching DAIDs.
- Parameters
- velocityfloat
Igniter velocity in meters per second
- gap_lengthfloat, optional
Length in meters between ignitions. Defaults to None.
- dash_lengthfloat, optional
Length in meters of an ignition line. Defaults to None.
Notes
When both gap_length and dash_length are None, the igniter will produce a continuous line of fire. To configure a point igniter, leave dash_length as None and set gap_length to the desired distance between ignition points. To configure a dash igniter, set dash_length to the desired length of the fire dashes. When configuring a dash igniter, if the gap_length is None, the gap between dashes will be the same as the dash length. Otherwise, the distance between dashes will be the specified gap_length.
Examples
>>> # Create a continuous line igniter >>> line_igniter = driptorch.Igniter(1.8)
>>> # Create a dash igniter with equal dashes and gaps >>> equal_dash_igniter = driptorch.Igniter(1.8, dash_length=10)
>>> # Create a dash igniter with unequal dashes and gaps >>> unequal_dash_igniter = driptorch.Igniter(1.8, gap_length=10, dash_length=20)
>>> # Create a point igniter >>> point_igniter = driptorch.Igniter(1.8, gap_length=10)
Methods
__init__
(velocity[, gap_length, dash_length])copy
()Sometimes we need to copy a particular Igniter because they're so good at what they do.
from_json
(json_string)Create an igniter from a JSON string
to_json
()Convert an igniter to a JSON string