mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-05 16:00:01 +01:00
* Add wasm code * First working model * Add PixelManipulation web assembly code to browser and node * Tests corrected for modules * Corrected test script * Add wasm bechmarks * Update Readme * Applies toggling functionality and refactored PixelManipulation code * Added documentation and corrected wasm toggling * change noise reduction module to use wasm code * Corrected formatting and removed extra comments * Add default wasm option and made README changes * Fixed negative test timings * combined benchmarks file * Update benchmark.js * Removed copies of wasm file and corrected test format * Update package.json Co-Authored-By: Jeffrey Warren <jeff@unterbahn.com> * Added wasm file and removed redundant code * Removed earlier benchmarks * move test/core/sequencer/benchmark.js to its own test command, not passing to tape-spec * Solves memory leaks and blank lines * Solves memory leaks and blank lines * Added handler for node code * Modify test script * Modify test script * Correct doc and removed pace fuctionality
19 lines
1023 B
JavaScript
19 lines
1023 B
JavaScript
var test = require('tape');
|
|
require('../../../src/ImageSequencer.js');
|
|
|
|
var sequencer = ImageSequencer({ ui: false});
|
|
var red = 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAAQABADASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAf/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/8QAFQEBAQAAAAAAAAAAAAAAAAAABgj/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwCdABykX//Z';
|
|
|
|
test('Dynamically add a test Module', function(t) {
|
|
sequencer.loadNewModule('test', { func: require('../testModule/Module'), info: require('../testModule/info') });
|
|
sequencer.loadImages(red);
|
|
t.deepEqual(sequencer.modules['test'], [
|
|
require('../testModule/Module'),
|
|
require('../testModule/info')
|
|
], 'test module was succesfully imported');
|
|
sequencer.addSteps('invert');
|
|
sequencer.addSteps('test');
|
|
sequencer.addSteps('invert');
|
|
sequencer.run();
|
|
t.end();
|
|
}); |