gladly-plot 0.0.6 → 0.0.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gladly-plot",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "GPU-powered multi-axis plotting library with regl + d3",
5
5
  "type": "module",
6
6
  "exports": {
@@ -242,15 +242,17 @@ export class LayerType {
242
242
  }
243
243
 
244
244
  for (const [suffix, qk] of Object.entries(layer.colorAxes)) {
245
- uniforms[`colorscale${suffix}`] = regl.prop(`colorscale_${qk}`)
246
- uniforms[`color_range${suffix}`] = regl.prop(`color_range_${qk}`)
247
- uniforms[`color_scale_type${suffix}`] = regl.prop(`color_scale_type_${qk}`)
248
- uniforms[`alpha_blend${suffix}`] = regl.prop(`alpha_blend_${qk}`)
245
+ const pk = qk.replace(/\./g, '_')
246
+ uniforms[`colorscale${suffix}`] = regl.prop(`colorscale_${pk}`)
247
+ uniforms[`color_range${suffix}`] = regl.prop(`color_range_${pk}`)
248
+ uniforms[`color_scale_type${suffix}`] = regl.prop(`color_scale_type_${pk}`)
249
+ uniforms[`alpha_blend${suffix}`] = regl.prop(`alpha_blend_${pk}`)
249
250
  }
250
251
 
251
252
  for (const [suffix, qk] of Object.entries(layer.filterAxes)) {
252
- uniforms[`filter_range${suffix}`] = regl.prop(`filter_range_${qk}`)
253
- uniforms[`filter_scale_type${suffix}`] = regl.prop(`filter_scale_type_${qk}`)
253
+ const pk = qk.replace(/\./g, '_')
254
+ uniforms[`filter_range${suffix}`] = regl.prop(`filter_range_${pk}`)
255
+ uniforms[`filter_scale_type${suffix}`] = regl.prop(`filter_scale_type_${pk}`)
254
256
  }
255
257
 
256
258
  // Strip spatial uniforms from vert (re-declared in buildSpatialGlsl)
package/src/core/Plot.js CHANGED
@@ -1052,16 +1052,18 @@ void main() {
1052
1052
  }
1053
1053
 
1054
1054
  for (const qk of Object.values(layer.colorAxes)) {
1055
- props[`colorscale_${qk}`] = this.colorAxisRegistry.getColorscaleIndex(qk)
1055
+ const pk = qk.replace(/\./g, '_')
1056
+ props[`colorscale_${pk}`] = this.colorAxisRegistry.getColorscaleIndex(qk)
1056
1057
  const range = this.colorAxisRegistry.getRange(qk)
1057
- props[`color_range_${qk}`] = range ?? [0, 1]
1058
- props[`color_scale_type_${qk}`] = this._getScaleTypeFloat(qk)
1059
- props[`alpha_blend_${qk}`] = this.colorAxisRegistry.getAlphaBlend(qk)
1058
+ props[`color_range_${pk}`] = range ?? [0, 1]
1059
+ props[`color_scale_type_${pk}`] = this._getScaleTypeFloat(qk)
1060
+ props[`alpha_blend_${pk}`] = this.colorAxisRegistry.getAlphaBlend(qk)
1060
1061
  }
1061
1062
 
1062
1063
  for (const qk of Object.values(layer.filterAxes)) {
1063
- props[`filter_range_${qk}`] = this.filterAxisRegistry.getRangeUniform(qk)
1064
- props[`filter_scale_type_${qk}`] = this._getScaleTypeFloat(qk)
1064
+ const pk = qk.replace(/\./g, '_')
1065
+ props[`filter_range_${pk}`] = this.filterAxisRegistry.getRangeUniform(qk)
1066
+ props[`filter_scale_type_${pk}`] = this._getScaleTypeFloat(qk)
1065
1067
  }
1066
1068
 
1067
1069
  layer.draw(props)
@@ -1178,15 +1180,17 @@ void main() {
1178
1180
  }
1179
1181
  if (layer.instanceCount !== null) props.instances = layer.instanceCount
1180
1182
  for (const qk of Object.values(layer.colorAxes)) {
1181
- props[`colorscale_${qk}`] = this.colorAxisRegistry.getColorscaleIndex(qk)
1183
+ const pk = qk.replace(/\./g, '_')
1184
+ props[`colorscale_${pk}`] = this.colorAxisRegistry.getColorscaleIndex(qk)
1182
1185
  const range = this.colorAxisRegistry.getRange(qk)
1183
- props[`color_range_${qk}`] = range ?? [0, 1]
1184
- props[`color_scale_type_${qk}`] = this._getScaleTypeFloat(qk)
1185
- props[`alpha_blend_${qk}`] = this.colorAxisRegistry.getAlphaBlend(qk)
1186
+ props[`color_range_${pk}`] = range ?? [0, 1]
1187
+ props[`color_scale_type_${pk}`] = this._getScaleTypeFloat(qk)
1188
+ props[`alpha_blend_${pk}`] = this.colorAxisRegistry.getAlphaBlend(qk)
1186
1189
  }
1187
1190
  for (const qk of Object.values(layer.filterAxes)) {
1188
- props[`filter_range_${qk}`] = this.filterAxisRegistry.getRangeUniform(qk)
1189
- props[`filter_scale_type_${qk}`] = this._getScaleTypeFloat(qk)
1191
+ const pk = qk.replace(/\./g, '_')
1192
+ props[`filter_range_${pk}`] = this.filterAxisRegistry.getRangeUniform(qk)
1193
+ props[`filter_scale_type_${pk}`] = this._getScaleTypeFloat(qk)
1190
1194
  }
1191
1195
  layer.draw(props)
1192
1196
  }