mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-16 21:29:58 +01:00
standardised util functions comments (#1805)
* standardised util functions comments * Update pixelSetter.js * Update pixelSetter.js * Update pixelSetter.js Co-authored-by: Harsh Khandeparkar <34770591+HarshKhandeparkar@users.noreply.github.com>
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
/** Parses the defaults and gets the input which is available. */
|
||||||
module.exports = function(info){
|
module.exports = function(info){
|
||||||
var defaults = {};
|
var defaults = {};
|
||||||
for (var key in info.inputs) {
|
for (var key in info.inputs) {
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* @param {number} x x-coordinate.
|
||||||
|
* @param {number} y y-coordinate.
|
||||||
|
* @param {object} value array [r, g, b, a]
|
||||||
|
* @param {object} pixels NDarray of pixels.
|
||||||
|
* @description Sets the pixels from 0 through length of value.
|
||||||
|
*/
|
||||||
module.exports = function(x, y, value, pixels){
|
module.exports = function(x, y, value, pixels){
|
||||||
for(let i = 0; i < value.length; i++){
|
for(let i = 0; i < value.length; i++){
|
||||||
pixels.set(x, y, i, value[i]);
|
pixels.set(x, y, i, value[i]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user