mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-11 19:00:00 +01:00
Install GPU.js v2.3.1 (#1374)
* fix: Upgrade GPU.js to v2.3.0 and handle browserifying it * fix? * fiiix * fix * fix tests browserify Co-authored-by: Robert Plummer <robertleeplummerjr@gmail.com>
This commit is contained in:
committed by
Jeffrey Warren
parent
6476b8d698
commit
c370a8b4ea
11
Gruntfile.js
11
Gruntfile.js
@@ -21,6 +21,11 @@ module.exports = function(grunt) {
|
|||||||
},
|
},
|
||||||
|
|
||||||
browserify: {
|
browserify: {
|
||||||
|
options: {
|
||||||
|
alias: {
|
||||||
|
'gpu.js': './node_modules/gpu.js/src/index.js'
|
||||||
|
}
|
||||||
|
},
|
||||||
core: {
|
core: {
|
||||||
src: ['src/ImageSequencer.js'],
|
src: ['src/ImageSequencer.js'],
|
||||||
dest: 'dist/image-sequencer.js'
|
dest: 'dist/image-sequencer.js'
|
||||||
@@ -36,6 +41,10 @@ module.exports = function(grunt) {
|
|||||||
produi: {
|
produi: {
|
||||||
src: ['examples/demo.js'],
|
src: ['examples/demo.js'],
|
||||||
dest: 'dist/image-sequencer-ui.brow.js'
|
dest: 'dist/image-sequencer-ui.brow.js'
|
||||||
|
},
|
||||||
|
tests: {
|
||||||
|
src: ['test/core/sequencer/meta-modules.js', 'test/core/sequencer/image-sequencer.js', 'test/core/sequencer/chain.js', 'test/core/sequencer/replace.js', 'test/core/sequencer/import-export.js', 'test/core/sequencer/run.js', 'test/core/sequencer/dynamic-imports.js', 'test/core/util/*.js'],
|
||||||
|
dest: './output/core-tests.js'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -73,4 +82,6 @@ module.exports = function(grunt) {
|
|||||||
grunt.registerTask('serve', ['browserify:core', 'browserify:ui', 'browserSync', 'watch']);
|
grunt.registerTask('serve', ['browserify:core', 'browserify:ui', 'browserSync', 'watch']);
|
||||||
grunt.registerTask('compile', ['browserify:core', 'browserify:ui']);
|
grunt.registerTask('compile', ['browserify:core', 'browserify:ui']);
|
||||||
grunt.registerTask('production', ['browserify:prodcore', 'browserify:produi', 'uglify:prodcore', 'uglify:produi']);
|
grunt.registerTask('production', ['browserify:prodcore', 'browserify:produi', 'uglify:prodcore', 'uglify:produi']);
|
||||||
|
|
||||||
|
grunt.registerTask('tests', ['browserify:tests']);
|
||||||
};
|
};
|
||||||
|
|||||||
6404
package-lock.json
generated
6404
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@@ -5,10 +5,10 @@
|
|||||||
"main": "src/ImageSequencer.js",
|
"main": "src/ImageSequencer.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"debug": "TEST=true node ./index.js -i ./examples/images/monarch.png -s invert",
|
"debug": "TEST=true node ./index.js -i ./examples/images/monarch.png -s invert",
|
||||||
"test": "TEST=true istanbul cover tape test/core/*.js test/core/ui/user-interface.js test/core/modules/*.js | tap-spec; node test/core/sequencer/benchmark.js; browserify test/core/sequencer/meta-modules.js test/core/sequencer/image-sequencer.js test/core/sequencer/chain.js test/core/sequencer/replace.js test/core/sequencer/import-export.js test/core/sequencer/run.js test/core/sequencer/dynamic-imports.js test/core/util/*.js | tape-run --render=\"tap-spec\"",
|
"test": "TEST=true istanbul cover tape test/core/*.js test/core/ui/user-interface.js test/core/modules/*.js | tap-spec; node test/core/sequencer/benchmark.js; grunt tests; cat ./output/core-tests.js | tape-run --render=\"tap-spec\"",
|
||||||
"test-ui": "node node_modules/jasmine/bin/jasmine test/ui/spec/*.js",
|
"test-ui": "node node_modules/jasmine/bin/jasmine test/ui/spec/*.js",
|
||||||
"test-ui-2":"node ./node_modules/.bin/jest",
|
"test-ui-2": "node ./node_modules/.bin/jest",
|
||||||
"setup": "npm i && npm i -g grunt grunt-cli && grunt build",
|
"setup": "npm i && npm i -g grunt grunt-cli && grunt build $$ npm rebuild --build-from-source",
|
||||||
"start": "grunt serve"
|
"start": "grunt serve"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"atob": "^2.1.2",
|
"atob": "^2.1.2",
|
||||||
"base64-img": "^1.0.4",
|
"base64-img": "^1.0.4",
|
||||||
"bootstrap": "~3.4.0",
|
"bootstrap": "^3.4.1",
|
||||||
"bootstrap-colorpicker": "^2.5.3",
|
"bootstrap-colorpicker": "^2.5.3",
|
||||||
"buffer": "~5.4.0",
|
"buffer": "~5.4.0",
|
||||||
"commander": "^3.0.1",
|
"commander": "^3.0.1",
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
"get-pixels": "~3.3.0",
|
"get-pixels": "~3.3.0",
|
||||||
"gifshot": "^0.4.5",
|
"gifshot": "^0.4.5",
|
||||||
"glfx": "0.0.4",
|
"glfx": "0.0.4",
|
||||||
"gpu.js": "^2.0.0-rc.12",
|
"gpu.js": "^2.3.1",
|
||||||
"image-sequencer-invert": "^1.0.0",
|
"image-sequencer-invert": "^1.0.0",
|
||||||
"imagejs": "0.0.9",
|
"imagejs": "0.0.9",
|
||||||
"imagemin": "^7.0.0",
|
"imagemin": "^7.0.0",
|
||||||
|
|||||||
@@ -2,5 +2,6 @@
|
|||||||
"name": "Blob Analysis",
|
"name": "Blob Analysis",
|
||||||
"description": "Blob/Region identification for microscopic images.",
|
"description": "Blob/Region identification for microscopic images.",
|
||||||
"inputs": {},
|
"inputs": {},
|
||||||
|
"requires": ["webgl", "browser"],
|
||||||
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md#blob-analysis"
|
"docs-link":"https://github.com/publiclab/image-sequencer/blob/main/docs/MODULES.md#blob-analysis"
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
src/modules/MinifyImage/images/test.png
Normal file
BIN
src/modules/MinifyImage/images/test.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 277 B |
BIN
src/modules/MinifyImage/results/test.png
Normal file
BIN
src/modules/MinifyImage/results/test.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 84 B |
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "text-overlay",
|
"name": "text-overlay",
|
||||||
"description": "Overlay text on image.",
|
"description": "Overlay text on image.",
|
||||||
|
"requires": ["webgl", "browser"],
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"text": {
|
"text": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "webgl-distort",
|
"name": "webgl-distort",
|
||||||
"requires": [
|
"requires": ["webgl"],
|
||||||
"webgl"
|
|
||||||
],
|
|
||||||
"description": "Transform perspective of an image based on corner coordinates",
|
"description": "Transform perspective of an image based on corner coordinates",
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nw": {
|
"nw": {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const GPU = require('gpu.js').GPU;
|
const { GPU } = require('gpu.js');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @method convolve
|
* @method convolve
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ function runBenchmarks(sequencer, t) {
|
|||||||
var mods = Object.keys(sequencer.modules);
|
var mods = Object.keys(sequencer.modules);
|
||||||
|
|
||||||
sequencer.loadImages(image);
|
sequencer.loadImages(image);
|
||||||
while ((mods[0] === 'import-image' || (!!sequencer.modulesInfo(mods[0]).requires && sequencer.modulesInfo(mods[0]).requires.includes('webgl'))))
|
while ((mods[0] === 'import-image' || (!!sequencer.modulesInfo(mods[0]).requires && sequencer.modulesInfo(mods[0]).requires.includes('browser'))))
|
||||||
mods.splice(0, 1);
|
mods.splice(0, 1);
|
||||||
sequencer.addSteps(mods[0]);
|
sequencer.addSteps(mods[0]);
|
||||||
global.start = Date.now();
|
global.start = Date.now();
|
||||||
|
|||||||
Reference in New Issue
Block a user