Skip to content

Commit 0e9bc00

Browse files
authored
p2hdr
1 parent d1b59f9 commit 0e9bc00

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

src/core/constants.js

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,28 @@ export const VERSION = 'VERSION_WILL_BE_REPLACED_BY_BUILD';
1515

1616
// GRAPHICS RENDERER
1717
/**
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
2024
* @property {P2D} P2D
2125
* @final
2226
*/
2327
export const P2D = 'p2d';
2428

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+
*/
2640

2741
/**
2842
* One of the two render modes in p5.js, used for computationally intensive tasks like 3D rendering and shaders.

0 commit comments

Comments
 (0)