movis.layer.texture.Stripe#
- class movis.layer.texture.Stripe(size: tuple[int, int] = (100, 100), angle: float = 45.0, color1: tuple[int, int, int] | str = (0, 0, 0), color2: tuple[int, int, int] | str = (255, 255, 255), opacity1: float = 1.0, opacity2: float = 1.0, total_width: float = 64.0, phase: float = 0.0, ratio: float = 0.5, duration: float = 1000000.0)[source]#
A layer that generates a stripe pattern.
- Args:
- size:
the size of the generated image. Defaults to
(100, 100).- angle:
the angle of the stripe pattern in degrees. Defaults to
45.0.- color1:
the first color of the stripe pattern. Defaults to
(0, 0, 0). the color can be specified as a tuple of(R, G, B), or a string (e.g.,"#ff0000", or"red").- color2:
the second color of the stripe pattern. Defaults to
(255, 255, 255).- opacity1:
the opacity of the first color. Defaults to
1.0.- opacity2:
the opacity of the second color. Defaults to
1.0.- total_width:
the total width of the stripe pattern. The stripe pattern repeats every
total_width. Defaults to64.0.- phase:
the phase of the stripe pattern in degrees. Defaults to
0.0.- ratio:
the ratio of the first color. Defaults to
0.5.- duration:
the duration of the layer. Defaults to
1e6.
- Animatable Attributes:
anglecolor1color2opacity1opacity2total_widthphaseratio
Methods
- get_key(time: float) tuple[Hashable, ...]#
Returns a tuple of hashable values that represent the state of the instance at a given time.
Attributes
attributesA dictionary of attributes that are used to generate cache keys.