p5_sys/
constants.rs

1#![allow(bad_style)]
2use wasm_bindgen::prelude::*;
3#[wasm_bindgen]
4pub enum ANGLE_MODE {
5    Radians = "radians",
6    Degrees = "degrees",
7}
8#[wasm_bindgen]
9pub enum ARC_MODE {
10    Chord = "chord",
11    Pie = "pie",
12    Open = "open",
13}
14#[wasm_bindgen]
15pub enum BEGIN_KIND {
16    Points = 0x0000,
17    Lines = 0x0001,
18    Triangles = 0x0004,
19    TriangleFan = 0x0006,
20    TriangleStrip = 0x0005,
21    // Quads = "quads",
22    // QuadStrip = "quad_strip",
23    // Tess = "tess",
24}
25#[wasm_bindgen]
26pub enum BLEND_MODE {
27    Blend = "source-over",
28    Darkest = "darkest",
29    Lightest = "lighten",
30    Difference = "difference",
31    Multiply = "multiply",
32    Exclusion = "exclusion",
33    Screen = "screen",
34    Replace = "copy",
35    Overlay = "overlay",
36    HardLight = "hard-light",
37    SoftLight = "soft-light",
38    Dodge = "color-dodge",
39    Burn = "color-burn",
40    Add = "lighter",
41    Normal = "normal",
42}
43#[wasm_bindgen]
44pub enum COLOR_MODE {
45    Rgb = "rgb",
46    Hsb = "hsb",
47    Hsl = "hsl",
48}
49#[wasm_bindgen]
50pub enum CURSOR_TYPE {
51    Arrow = "arrow",
52    Cross = "cross",
53    Hand = "hand",
54    Move = "move",
55    Text = "text",
56}
57#[wasm_bindgen]
58pub enum DEBUG_MODE {
59    Grid = "grid",
60    Axes = "axes",
61}
62#[wasm_bindgen]
63pub enum DESCRIBE_DISPLAY {
64    Label = "label",
65    Fallback = "fallback",
66}
67#[wasm_bindgen]
68pub enum ELLIPSE_MODE {
69    Center = "center",
70    Radius = "radius",
71    Corner = "corner",
72    Corners = "corners",
73}
74#[wasm_bindgen]
75pub enum END_MODE {
76    Close = "close",
77}
78#[wasm_bindgen]
79pub enum FILTER_TYPE {
80    Threshold = "threshold",
81    Gray = "gray",
82    Opaque = "opaque",
83    Invert = "invert",
84    Posterize = "posterize",
85    Blur = "blur",
86    Erode = "erode",
87    Dilate = "dilate",
88}
89#[wasm_bindgen]
90pub enum GRAPHICS_RENDERER {
91    P2d = "p2d",
92    Webgl = "webgl",
93}
94#[wasm_bindgen]
95pub enum HORIZ_ALIGN {
96    Left = "left",
97    Center = "center",
98    Right = "right",
99}
100#[wasm_bindgen]
101pub enum IMAGE_MODE {
102    Corner = "corner",
103    Corners = "corners",
104    Center = "center",
105}
106#[wasm_bindgen]
107pub enum RECT_MODE {
108    Corner = "corner",
109    Corners = "corners",
110    Center = "center",
111    Radius = "radius",
112}
113#[wasm_bindgen]
114pub enum RENDERER {
115    P2d = "p2d",
116    Webgl = "webgl",
117}
118#[wasm_bindgen]
119pub enum SIZE_H {
120    Auto = "auto",
121}
122#[wasm_bindgen]
123pub enum SIZE_W {
124    Auto = "auto",
125}
126#[wasm_bindgen]
127pub enum STROKE_CAP {
128    Round = "round",
129    Square = "butt",
130    Project = "square",
131}
132#[wasm_bindgen]
133pub enum STROKE_JOIN {
134    Miter = "miter",
135    Bevel = "bevel",
136    Round = "round",
137}
138#[wasm_bindgen]
139pub enum TEXTURE_MODE {
140    Image = "image",
141    Normal = "normal",
142}
143#[wasm_bindgen]
144pub enum THE_STYLE {
145    Normal = "normal",
146    Italic = "italic",
147    Bold = "bold",
148    Bolditalic = "bolditalic",
149}
150#[wasm_bindgen]
151pub enum TYPE {
152    Video = "video",
153    Audio = "audio",
154}
155#[wasm_bindgen]
156pub enum VERT_ALIGN {
157    Top = "top",
158    Bottom = "bottom",
159    Center = "center",
160    Baseline = "alphabetic",
161}
162#[wasm_bindgen]
163pub enum WRAP_X {
164    Clamp = "clamp",
165    Repeat = "repeat",
166    Mirror = "mirror",
167}
168#[wasm_bindgen]
169pub enum WRAP_Y {
170    Clamp = "clamp",
171    Repeat = "repeat",
172    Mirror = "mirror",
173}