1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
/// The canvas 2D rendering context type identifier.
pub const RENDERER_CONTEXT_TYPE_2D: &str = "2d";
/// The default font family used for text rendering.
pub const RENDERER_DEFAULT_FONT_FAMILY: &str = "sans-serif";
/// The default font size in pixels.
pub const RENDERER_DEFAULT_FONT_SIZE: f64 = 16.0;
/// The canvas context property name for fill style.
pub const RENDERER_PROPERTY_FILL_STYLE: &str = "fillStyle";
/// The canvas context property name for stroke style.
pub const RENDERER_PROPERTY_STROKE_STYLE: &str = "strokeStyle";
/// The canvas context property name for line width.
pub const RENDERER_PROPERTY_LINE_WIDTH: &str = "lineWidth";
/// The canvas context property name for font.
pub const RENDERER_PROPERTY_FONT: &str = "font";
/// The canvas context property name for global alpha.
pub const RENDERER_PROPERTY_GLOBAL_ALPHA: &str = "globalAlpha";
/// The canvas context property name for global composite operation (blend mode).
pub const RENDERER_PROPERTY_GLOBAL_COMPOSITE_OPERATION: &str = "globalCompositeOperation";
/// The canvas context property name for shadow color.
pub const RENDERER_PROPERTY_SHADOW_COLOR: &str = "shadowColor";
/// The canvas context property name for shadow blur.
pub const RENDERER_PROPERTY_SHADOW_BLUR: &str = "shadowBlur";
/// The canvas context property name for shadow offset x.
pub const RENDERER_PROPERTY_SHADOW_OFFSET_X: &str = "shadowOffsetX";
/// The canvas context property name for shadow offset y.
pub const RENDERER_PROPERTY_SHADOW_OFFSET_Y: &str = "shadowOffsetY";
/// The default camera zoom level.
pub const RENDERER_DEFAULT_CAMERA_ZOOM: f64 = 1.0;
/// The default camera rotation in radians.
pub const RENDERER_DEFAULT_CAMERA_ROTATION: f64 = 0.0;
/// The canvas context property name for image smoothing enabled.
pub const RENDERER_PROPERTY_IMAGE_SMOOTHING_ENABLED: &str = "imageSmoothingEnabled";
/// The canvas context property name for image smoothing quality.
pub const RENDERER_PROPERTY_IMAGE_SMOOTHING_QUALITY: &str = "imageSmoothingQuality";
/// The high-quality image smoothing value.
pub const RENDERER_IMAGE_SMOOTHING_QUALITY_HIGH: &str = "high";
/// The HTML element tag name for creating a canvas element.
pub const RENDERER_ELEMENT_CANVAS: &str = "canvas";
/// The default SSAA scale factor (2.0 means 4x supersampling).
pub const RENDERER_DEFAULT_SSAA_SCALE_FACTOR: f64 = 2.0;
/// The CSS composite operation string for the `Normal` blend mode.
pub const BLEND_MODE_NORMAL: &str = "source-over";
/// The CSS composite operation string for the `Multiply` blend mode.
pub const BLEND_MODE_MULTIPLY: &str = "multiply";
/// The CSS composite operation string for the `Screen` blend mode.
pub const BLEND_MODE_SCREEN: &str = "screen";
/// The CSS composite operation string for the `Lighter` blend mode.
pub const BLEND_MODE_LIGHTER: &str = "lighter";
/// The CSS composite operation string for the `Overlay` blend mode.
pub const BLEND_MODE_OVERLAY: &str = "overlay";
/// The CSS composite operation string for the `Darken` blend mode.
pub const BLEND_MODE_DARKEN: &str = "darken";
/// The CSS composite operation string for the `Lighten` blend mode.
pub const BLEND_MODE_LIGHTEN: &str = "lighten";
/// The CSS composite operation string for the `ColorDodge` blend mode.
pub const BLEND_MODE_COLOR_DODGE: &str = "color-dodge";
/// The CSS composite operation string for the `ColorBurn` blend mode.
pub const BLEND_MODE_COLOR_BURN: &str = "color-burn";
/// The CSS composite operation string for the `HardLight` blend mode.
pub const BLEND_MODE_HARD_LIGHT: &str = "hard-light";
/// The CSS composite operation string for the `SoftLight` blend mode.
pub const BLEND_MODE_SOFT_LIGHT: &str = "soft-light";
/// The CSS composite operation string for the `Difference` blend mode.
pub const BLEND_MODE_DIFFERENCE: &str = "difference";
/// The CSS composite operation string for the `Exclusion` blend mode.
pub const BLEND_MODE_EXCLUSION: &str = "exclusion";
/// The CSS composite operation string for the `Hue` blend mode.
pub const BLEND_MODE_HUE: &str = "hue";
/// The CSS composite operation string for the `Saturation` blend mode.
pub const BLEND_MODE_SATURATION: &str = "saturation";
/// The CSS composite operation string for the `Color` blend mode.
pub const BLEND_MODE_COLOR: &str = "color";
/// The CSS composite operation string for the `Luminosity` blend mode.
pub const BLEND_MODE_LUMINOSITY: &str = "luminosity";
/// The default shadow color used when no explicit color is provided.
pub const RENDERER_DEFAULT_SHADOW_COLOR: &str = "rgba(0, 0, 0, 0.5)";
/// The default shadow blur radius in pixels.
pub const RENDERER_DEFAULT_SHADOW_BLUR: f64 = 4.0;
/// The default render layer z-index for background elements.
pub const RENDERER_LAYER_BACKGROUND: i32 = 0;
/// The default render layer z-index for foreground game objects.
pub const RENDERER_LAYER_FOREGROUND: i32 = 100;
/// The default render layer z-index for UI overlay elements.
pub const RENDERER_LAYER_UI: i32 = 1000;