pixelworks
Advanced tools
Comparing version 0.6.0 to 0.7.0
function createMinion(operations) { | ||
var numOps = operations.length; | ||
var pixels, arrays; | ||
return function(data) { | ||
@@ -13,17 +12,12 @@ /* eslint-disable dot-notation */ | ||
/* eslint-enable dot-notation */ | ||
var numBuffers = buffers.length; | ||
var numBytes = buffers[0].byteLength; | ||
var output, b, i, j, k; | ||
if (!pixels) { | ||
arrays = new Array(numBuffers); | ||
pixels = new Array(numBuffers); | ||
for (b = 0; b < numBuffers; ++b) { | ||
arrays[b] = new Uint8ClampedArray(buffers[b]); | ||
pixels[b] = [0, 0, 0, 0]; | ||
} | ||
} | ||
var output, b, k; | ||
if (imageOps) { | ||
var images = new Array(numBuffers); | ||
for (b = 0; b < numBuffers; ++b) { | ||
images[b] = new ImageData(arrays[b], width, height); | ||
images[b] = new ImageData( | ||
new Uint8ClampedArray(buffers[b]), width, height); | ||
} | ||
@@ -36,4 +30,10 @@ for (k = 0; k < numOps; ++k) { | ||
output = new Uint8ClampedArray(numBytes); | ||
for (i = 0; i < numBytes; i += 4) { | ||
for (j = 0; j < numBuffers; ++j) { | ||
var arrays = new Array(numBuffers); | ||
var pixels = new Array(numBuffers); | ||
for (b = 0; b < numBuffers; ++b) { | ||
arrays[b] = new Uint8ClampedArray(buffers[b]); | ||
pixels[b] = [0, 0, 0, 0]; | ||
} | ||
for (var i = 0; i < numBytes; i += 4) { | ||
for (var j = 0; j < numBuffers; ++j) { | ||
var array = arrays[j]; | ||
@@ -40,0 +40,0 @@ pixels[j][0] = array[i]; |
{ | ||
"name": "pixelworks", | ||
"version": "0.6.0", | ||
"version": "0.7.0", | ||
"description": "Utilities for working with ImageData in Workers", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36961
228