x3d-image 2.0.31 → 2.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -74,6 +74,10 @@ The color space in which color calculations take place.
74
74
 
75
75
  The exposure of an image describes the amount of light that is captured.
76
76
 
77
+ ### -m *[**NONE**, ACES_NARKOWICZ, ACES_HILL, ACES_HILL_EXPOSURE_BOOST, KHR_PBR_NEUTRAL]*
78
+
79
+ Whether tone mapping should be applied.
80
+
77
81
  ### -t *[**CHAR_SPACING**, SCALING]*
78
82
 
79
83
  Controls how Text.length and Text.maxExtent are handled. Either by adjusting char spacing or by scaling text letters.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x3d-image",
3
- "version": "2.0.31",
3
+ "version": "2.0.32",
4
4
  "description": "Render image files from X3D",
5
5
  "main": "src/main.js",
6
6
  "bin": {
package/src/image.js CHANGED
@@ -140,6 +140,15 @@ async function generate (argv)
140
140
  array: true,
141
141
  default: [1],
142
142
  })
143
+ .option ("tone-mapping",
144
+ {
145
+ type: "string",
146
+ alias: "m",
147
+ description: `Whether tone mapping should be applied.`,
148
+ choices: ["NONE", "ACES_NARKOWICZ", "ACES_HILL", "ACES_HILL_EXPOSURE_BOOST", "KHR_PBR_NEUTRAL"],
149
+ array: true,
150
+ default: ["NONE"],
151
+ })
143
152
  .option ("text-compression",
144
153
  {
145
154
  type: "string",
@@ -212,6 +221,9 @@ async function generate (argv)
212
221
  if (arg (args .exposure, i))
213
222
  browser .setBrowserOption ("Exposure", arg (args .exposure, i));
214
223
 
224
+ if (arg (args ["tone-mapping"], i))
225
+ browser .setBrowserOption ("ToneMapping", arg (args ["tone-mapping"], i));
226
+
215
227
  if (arg (args ["text-compression"], i))
216
228
  browser .setBrowserOption ("TextCompression", arg (args ["text-compression"], i));
217
229