FastLED 3.9.15
Loading...
Searching...
No Matches

◆ toJson()

list[dict] gen.Point.toJson ( list["Point"] points)
static

Definition at line 40 of file gen.py.

40 def toJson(points: list["Point"]) -> list[dict]:
41 x_values = [p.x for p in points]
42 y_values = [p.y for p in points]
43 # round
44 x_values = [round(x, 4) for x in x_values]
45 y_values = [round(y, 4) for y in y_values]
46 if MIRROR_X:
47 x_values = [-x for x in x_values]
48
49 return {"x": x_values, "y": y_values, "diameter": LED_DIAMETER}
50
#define round(x)
Definition util.h:10

References round.