File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -15,14 +15,28 @@ export const VERSION = 'VERSION_WILL_BE_REPLACED_BY_BUILD';
15
15
16
16
// GRAPHICS RENDERER
17
17
/**
18
- * The default, two-dimensional renderer.
19
- * @typedef {unique symbol } P2D
18
+ * The default, two-dimensional renderer in p5.js.
19
+ *
20
+ * Use this when calling {@link p5.createCanvas|createCanvas} (for example,
21
+ * `createCanvas(400, 400, P2D)`) to specify a 2D context.
22
+ *
23
+ * @typedef {'p2d' } P2D
20
24
* @property {P2D } P2D
21
25
* @final
22
26
*/
23
27
export const P2D = 'p2d' ;
24
28
25
- export const P2DHDR = 'p2d-hdr' ;
29
+ /**
30
+ * A high-dynamic-range (HDR) variant of the default, two-dimensional renderer.
31
+ *
32
+ * When available, this mode can allow for extended color ranges and more
33
+ * dynamic color representation. Use it similarly to {@link p5.P2D}:
34
+ * `createCanvas(400, 400, P2DHDR)`.
35
+ *
36
+ * @typedef {'p2d-hdr' } P2DHDR
37
+ * @property {P2DHDR } P2DHDR
38
+ * @final
39
+ */
26
40
27
41
/**
28
42
* One of the two render modes in p5.js, used for computationally intensive tasks like 3D rendering and shaders.
You can’t perform that action at this time.
0 commit comments