Skip to content

Commit

Permalink
_conv restored
Browse files Browse the repository at this point in the history
  • Loading branch information
nakednous committed Dec 6, 2023
1 parent 284964c commit 2a1d7a6
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions p5.quadrille.js
Original file line number Diff line number Diff line change
Expand Up @@ -1163,20 +1163,6 @@ class Quadrille {
const j = col + jmask - cache_half_size;
const neighbor = source.read(i, j);
let mask_value = mask.read(imask, jmask);
// /*
if (typeof mask_value === 'string') {
const parts = mask_value.trim().split(/\s*([\+\-\*\/])\s*/);
const num1 = parseFloat(parts[0]);
const num2 = parseFloat(parts[2]);
if (!isNaN(num1) && (parts.length === 1 || !isNaN(num2))) {
mask_value = parts.length === 1 ? num1 :
parts[1] === '+' ? num1 + num2 :
parts[1] === '-' ? num1 - num2 :
parts[1] === '*' ? num1 * num2 :
parts[1] === '/' ? num1 / num2 : mask_value;
}
}
// */
if ((neighbor instanceof p5.Color) && (typeof mask_value === 'number' || mask_value instanceof p5.Color)) {
apply = true;
// luma coefficients are: 0.299, 0.587, 0.114, 0
Expand Down

0 comments on commit 2a1d7a6

Please sign in to comment.