Add jsdoc comments to cmd module
This commit is contained in:
parent
07100a588c
commit
6612ffa6d1
|
@ -2,6 +2,17 @@
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const delay_1 = require("delay");
|
const delay_1 = require("delay");
|
||||||
class Commands {
|
class Commands {
|
||||||
|
/**
|
||||||
|
* @constructor
|
||||||
|
* Assign all connected devices and mock devices as private classes.
|
||||||
|
*
|
||||||
|
* @param {object} cfg Configuration object
|
||||||
|
* @param {object} proj Projector 1
|
||||||
|
* @param {object} cam Camera 1
|
||||||
|
* @param {object} light Light source
|
||||||
|
* @param {object} cam2 (optional) Camera 2
|
||||||
|
* @param {object} proj2 {optional} Projector 2
|
||||||
|
**/
|
||||||
constructor(cfg, proj, cam, light, cam2 = null, proj2 = null) {
|
constructor(cfg, proj, cam, light, cam2 = null, proj2 = null) {
|
||||||
this.cfg = cfg;
|
this.cfg = cfg;
|
||||||
this.proj = proj;
|
this.proj = proj;
|
||||||
|
@ -15,6 +26,8 @@ class Commands {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Move the projector one frame forward
|
* Move the projector one frame forward
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async projector_forward() {
|
async projector_forward() {
|
||||||
let ms;
|
let ms;
|
||||||
|
@ -33,6 +46,8 @@ class Commands {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Move the projector one frame backward
|
* Move the projector one frame backward
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async projector_backward() {
|
async projector_backward() {
|
||||||
let ms;
|
let ms;
|
||||||
|
@ -53,6 +68,8 @@ class Commands {
|
||||||
* Move the camera one frame forward
|
* Move the camera one frame forward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async camera_forward(rgb = [255, 255, 255]) {
|
async camera_forward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -76,6 +93,8 @@ class Commands {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Move the camera one frame forward with light off
|
* Move the camera one frame forward with light off
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async black_forward() {
|
async black_forward() {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -101,6 +120,8 @@ class Commands {
|
||||||
* Move the camera one frame backward
|
* Move the camera one frame backward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async camera_backward(rgb = [255, 255, 255]) {
|
async camera_backward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -125,6 +146,7 @@ class Commands {
|
||||||
/**
|
/**
|
||||||
* Move the camera one frame forward, light set to black or off
|
* Move the camera one frame forward, light set to black or off
|
||||||
*
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async black_backward() {
|
async black_backward() {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -150,6 +172,8 @@ class Commands {
|
||||||
* Move the second camera one frame forward
|
* Move the second camera one frame forward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async camera_second_forward(rgb = [255, 255, 255]) {
|
async camera_second_forward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -175,6 +199,8 @@ class Commands {
|
||||||
* Move the second camera one frame backward
|
* Move the second camera one frame backward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async camera_second_backward(rgb = [255, 255, 255]) {
|
async camera_second_backward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -200,6 +226,8 @@ class Commands {
|
||||||
* Move the both cameras one frame forward
|
* Move the both cameras one frame forward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async cameras_forward(rgb = [255, 255, 255]) {
|
async cameras_forward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -238,6 +266,8 @@ class Commands {
|
||||||
* Move the both cameras one frame backward
|
* Move the both cameras one frame backward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async cameras_backward(rgb = [255, 255, 255]) {
|
async cameras_backward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -272,6 +302,13 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Move first camera one frame forward and rewind secondary camera one frame backward
|
||||||
|
*
|
||||||
|
* @param {array} rgb Color to set light for frames
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
async camera_forward_camera_second_backward(rgb = [255, 255, 255]) {
|
async camera_forward_camera_second_backward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
let both;
|
let both;
|
||||||
|
@ -305,6 +342,13 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Rewind first camera one frame backward and move secondary camera one frame forward
|
||||||
|
*
|
||||||
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
async camera_backward_camera_second_forward(rgb = [255, 255, 255]) {
|
async camera_backward_camera_second_forward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
let both;
|
let both;
|
||||||
|
@ -341,6 +385,7 @@ class Commands {
|
||||||
/**
|
/**
|
||||||
* Move the secondary projector forward one frame
|
* Move the secondary projector forward one frame
|
||||||
*
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async projector_second_forward() {
|
async projector_second_forward() {
|
||||||
let ms;
|
let ms;
|
||||||
|
@ -357,6 +402,11 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Rewind the secondary projector backward one frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
async projector_second_backward() {
|
async projector_second_backward() {
|
||||||
let ms;
|
let ms;
|
||||||
try {
|
try {
|
||||||
|
@ -372,6 +422,11 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Move the both projectors forward one frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
async projectors_forward() {
|
async projectors_forward() {
|
||||||
let both;
|
let both;
|
||||||
let ms;
|
let ms;
|
||||||
|
@ -400,6 +455,11 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Rewind both projectors backwards one frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
async projectors_backward() {
|
async projectors_backward() {
|
||||||
let both;
|
let both;
|
||||||
let ms;
|
let ms;
|
||||||
|
@ -429,6 +489,12 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Move the primary projector forward one frame and rewind the secondary projector
|
||||||
|
* one frame backwards.
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
async projector_forward_projector_second_backward() {
|
async projector_forward_projector_second_backward() {
|
||||||
let both;
|
let both;
|
||||||
let ms;
|
let ms;
|
||||||
|
@ -458,6 +524,12 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Rewind the primary projector backwards one frame and move the secondary
|
||||||
|
* projector forward one frame.
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
async projector_backward_projector_second_forward() {
|
async projector_backward_projector_second_forward() {
|
||||||
let both;
|
let both;
|
||||||
let ms;
|
let ms;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2,6 +2,17 @@
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const delay_1 = require("delay");
|
const delay_1 = require("delay");
|
||||||
class Commands {
|
class Commands {
|
||||||
|
/**
|
||||||
|
* @constructor
|
||||||
|
* Assign all connected devices and mock devices as private classes.
|
||||||
|
*
|
||||||
|
* @param {object} cfg Configuration object
|
||||||
|
* @param {object} proj Projector 1
|
||||||
|
* @param {object} cam Camera 1
|
||||||
|
* @param {object} light Light source
|
||||||
|
* @param {object} cam2 (optional) Camera 2
|
||||||
|
* @param {object} proj2 {optional} Projector 2
|
||||||
|
**/
|
||||||
constructor(cfg, proj, cam, light, cam2 = null, proj2 = null) {
|
constructor(cfg, proj, cam, light, cam2 = null, proj2 = null) {
|
||||||
this.cfg = cfg;
|
this.cfg = cfg;
|
||||||
this.proj = proj;
|
this.proj = proj;
|
||||||
|
@ -15,6 +26,8 @@ class Commands {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Move the projector one frame forward
|
* Move the projector one frame forward
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async projector_forward() {
|
async projector_forward() {
|
||||||
let ms;
|
let ms;
|
||||||
|
@ -33,6 +46,8 @@ class Commands {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Move the projector one frame backward
|
* Move the projector one frame backward
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async projector_backward() {
|
async projector_backward() {
|
||||||
let ms;
|
let ms;
|
||||||
|
@ -53,6 +68,8 @@ class Commands {
|
||||||
* Move the camera one frame forward
|
* Move the camera one frame forward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async camera_forward(rgb = [255, 255, 255]) {
|
async camera_forward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -76,6 +93,8 @@ class Commands {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Move the camera one frame forward with light off
|
* Move the camera one frame forward with light off
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async black_forward() {
|
async black_forward() {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -101,6 +120,8 @@ class Commands {
|
||||||
* Move the camera one frame backward
|
* Move the camera one frame backward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async camera_backward(rgb = [255, 255, 255]) {
|
async camera_backward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -125,6 +146,7 @@ class Commands {
|
||||||
/**
|
/**
|
||||||
* Move the camera one frame forward, light set to black or off
|
* Move the camera one frame forward, light set to black or off
|
||||||
*
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async black_backward() {
|
async black_backward() {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -150,6 +172,8 @@ class Commands {
|
||||||
* Move the second camera one frame forward
|
* Move the second camera one frame forward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async camera_second_forward(rgb = [255, 255, 255]) {
|
async camera_second_forward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -175,6 +199,8 @@ class Commands {
|
||||||
* Move the second camera one frame backward
|
* Move the second camera one frame backward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async camera_second_backward(rgb = [255, 255, 255]) {
|
async camera_second_backward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -200,6 +226,8 @@ class Commands {
|
||||||
* Move the both cameras one frame forward
|
* Move the both cameras one frame forward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async cameras_forward(rgb = [255, 255, 255]) {
|
async cameras_forward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -238,6 +266,8 @@ class Commands {
|
||||||
* Move the both cameras one frame backward
|
* Move the both cameras one frame backward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async cameras_backward(rgb = [255, 255, 255]) {
|
async cameras_backward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -272,6 +302,13 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Move first camera one frame forward and rewind secondary camera one frame backward
|
||||||
|
*
|
||||||
|
* @param {array} rgb Color to set light for frames
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
async camera_forward_camera_second_backward(rgb = [255, 255, 255]) {
|
async camera_forward_camera_second_backward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
let both;
|
let both;
|
||||||
|
@ -305,6 +342,13 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Rewind first camera one frame backward and move secondary camera one frame forward
|
||||||
|
*
|
||||||
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
async camera_backward_camera_second_forward(rgb = [255, 255, 255]) {
|
async camera_backward_camera_second_forward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
let both;
|
let both;
|
||||||
|
@ -341,6 +385,7 @@ class Commands {
|
||||||
/**
|
/**
|
||||||
* Move the secondary projector forward one frame
|
* Move the secondary projector forward one frame
|
||||||
*
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async projector_second_forward() {
|
async projector_second_forward() {
|
||||||
let ms;
|
let ms;
|
||||||
|
@ -357,6 +402,11 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Rewind the secondary projector backward one frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
async projector_second_backward() {
|
async projector_second_backward() {
|
||||||
let ms;
|
let ms;
|
||||||
try {
|
try {
|
||||||
|
@ -372,6 +422,11 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Move the both projectors forward one frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
async projectors_forward() {
|
async projectors_forward() {
|
||||||
let both;
|
let both;
|
||||||
let ms;
|
let ms;
|
||||||
|
@ -400,6 +455,11 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Rewind both projectors backwards one frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
async projectors_backward() {
|
async projectors_backward() {
|
||||||
let both;
|
let both;
|
||||||
let ms;
|
let ms;
|
||||||
|
@ -429,6 +489,12 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Move the primary projector forward one frame and rewind the secondary projector
|
||||||
|
* one frame backwards.
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
async projector_forward_projector_second_backward() {
|
async projector_forward_projector_second_backward() {
|
||||||
let both;
|
let both;
|
||||||
let ms;
|
let ms;
|
||||||
|
@ -458,6 +524,12 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Rewind the primary projector backwards one frame and move the secondary
|
||||||
|
* projector forward one frame.
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
async projector_backward_projector_second_forward() {
|
async projector_backward_projector_second_forward() {
|
||||||
let both;
|
let both;
|
||||||
let ms;
|
let ms;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -2,6 +2,17 @@
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
const delay_1 = require("delay");
|
const delay_1 = require("delay");
|
||||||
class Commands {
|
class Commands {
|
||||||
|
/**
|
||||||
|
* @constructor
|
||||||
|
* Assign all connected devices and mock devices as private classes.
|
||||||
|
*
|
||||||
|
* @param {object} cfg Configuration object
|
||||||
|
* @param {object} proj Projector 1
|
||||||
|
* @param {object} cam Camera 1
|
||||||
|
* @param {object} light Light source
|
||||||
|
* @param {object} cam2 (optional) Camera 2
|
||||||
|
* @param {object} proj2 {optional} Projector 2
|
||||||
|
**/
|
||||||
constructor(cfg, proj, cam, light, cam2 = null, proj2 = null) {
|
constructor(cfg, proj, cam, light, cam2 = null, proj2 = null) {
|
||||||
this.cfg = cfg;
|
this.cfg = cfg;
|
||||||
this.proj = proj;
|
this.proj = proj;
|
||||||
|
@ -15,6 +26,8 @@ class Commands {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Move the projector one frame forward
|
* Move the projector one frame forward
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async projector_forward() {
|
async projector_forward() {
|
||||||
let ms;
|
let ms;
|
||||||
|
@ -33,6 +46,8 @@ class Commands {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Move the projector one frame backward
|
* Move the projector one frame backward
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async projector_backward() {
|
async projector_backward() {
|
||||||
let ms;
|
let ms;
|
||||||
|
@ -53,6 +68,8 @@ class Commands {
|
||||||
* Move the camera one frame forward
|
* Move the camera one frame forward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async camera_forward(rgb = [255, 255, 255]) {
|
async camera_forward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -76,6 +93,8 @@ class Commands {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Move the camera one frame forward with light off
|
* Move the camera one frame forward with light off
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async black_forward() {
|
async black_forward() {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -101,6 +120,8 @@ class Commands {
|
||||||
* Move the camera one frame backward
|
* Move the camera one frame backward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async camera_backward(rgb = [255, 255, 255]) {
|
async camera_backward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -125,6 +146,7 @@ class Commands {
|
||||||
/**
|
/**
|
||||||
* Move the camera one frame forward, light set to black or off
|
* Move the camera one frame forward, light set to black or off
|
||||||
*
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async black_backward() {
|
async black_backward() {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -150,6 +172,8 @@ class Commands {
|
||||||
* Move the second camera one frame forward
|
* Move the second camera one frame forward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async camera_second_forward(rgb = [255, 255, 255]) {
|
async camera_second_forward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -175,6 +199,8 @@ class Commands {
|
||||||
* Move the second camera one frame backward
|
* Move the second camera one frame backward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async camera_second_backward(rgb = [255, 255, 255]) {
|
async camera_second_backward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -200,6 +226,8 @@ class Commands {
|
||||||
* Move the both cameras one frame forward
|
* Move the both cameras one frame forward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async cameras_forward(rgb = [255, 255, 255]) {
|
async cameras_forward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -238,6 +266,8 @@ class Commands {
|
||||||
* Move the both cameras one frame backward
|
* Move the both cameras one frame backward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async cameras_backward(rgb = [255, 255, 255]) {
|
async cameras_backward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
|
@ -272,6 +302,13 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Move first camera one frame forward and rewind secondary camera one frame backward
|
||||||
|
*
|
||||||
|
* @param {array} rgb Color to set light for frames
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
async camera_forward_camera_second_backward(rgb = [255, 255, 255]) {
|
async camera_forward_camera_second_backward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
let both;
|
let both;
|
||||||
|
@ -305,6 +342,13 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Rewind first camera one frame backward and move secondary camera one frame forward
|
||||||
|
*
|
||||||
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
async camera_backward_camera_second_forward(rgb = [255, 255, 255]) {
|
async camera_backward_camera_second_forward(rgb = [255, 255, 255]) {
|
||||||
const off = [0, 0, 0];
|
const off = [0, 0, 0];
|
||||||
let both;
|
let both;
|
||||||
|
@ -341,6 +385,7 @@ class Commands {
|
||||||
/**
|
/**
|
||||||
* Move the secondary projector forward one frame
|
* Move the secondary projector forward one frame
|
||||||
*
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
async projector_second_forward() {
|
async projector_second_forward() {
|
||||||
let ms;
|
let ms;
|
||||||
|
@ -357,6 +402,11 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Rewind the secondary projector backward one frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
async projector_second_backward() {
|
async projector_second_backward() {
|
||||||
let ms;
|
let ms;
|
||||||
try {
|
try {
|
||||||
|
@ -372,6 +422,11 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Move the both projectors forward one frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
async projectors_forward() {
|
async projectors_forward() {
|
||||||
let both;
|
let both;
|
||||||
let ms;
|
let ms;
|
||||||
|
@ -400,6 +455,11 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Rewind both projectors backwards one frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
async projectors_backward() {
|
async projectors_backward() {
|
||||||
let both;
|
let both;
|
||||||
let ms;
|
let ms;
|
||||||
|
@ -429,6 +489,12 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Move the primary projector forward one frame and rewind the secondary projector
|
||||||
|
* one frame backwards.
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
async projector_forward_projector_second_backward() {
|
async projector_forward_projector_second_backward() {
|
||||||
let both;
|
let both;
|
||||||
let ms;
|
let ms;
|
||||||
|
@ -458,6 +524,12 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Rewind the primary projector backwards one frame and move the secondary
|
||||||
|
* projector forward one frame.
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
async projector_backward_projector_second_forward() {
|
async projector_backward_projector_second_forward() {
|
||||||
let both;
|
let both;
|
||||||
let ms;
|
let ms;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -13,6 +13,18 @@ class Commands {
|
||||||
private cfg : any;
|
private cfg : any;
|
||||||
private ipc : any;
|
private ipc : any;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @constructor
|
||||||
|
* Assign all connected devices and mock devices as private classes.
|
||||||
|
*
|
||||||
|
* @param {object} cfg Configuration object
|
||||||
|
* @param {object} proj Projector 1
|
||||||
|
* @param {object} cam Camera 1
|
||||||
|
* @param {object} light Light source
|
||||||
|
* @param {object} cam2 (optional) Camera 2
|
||||||
|
* @param {object} proj2 {optional} Projector 2
|
||||||
|
**/
|
||||||
|
|
||||||
constructor (cfg : any, proj : any, cam : any, light : any, cam2 : any = null, proj2 : any = null) {
|
constructor (cfg : any, proj : any, cam : any, light : any, cam2 : any = null, proj2 : any = null) {
|
||||||
this.cfg = cfg;
|
this.cfg = cfg;
|
||||||
this.proj = proj;
|
this.proj = proj;
|
||||||
|
@ -27,6 +39,8 @@ class Commands {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Move the projector one frame forward
|
* Move the projector one frame forward
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
public async projector_forward () {
|
public async projector_forward () {
|
||||||
let ms : number;
|
let ms : number;
|
||||||
|
@ -44,6 +58,8 @@ class Commands {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Move the projector one frame backward
|
* Move the projector one frame backward
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
public async projector_backward () {
|
public async projector_backward () {
|
||||||
let ms : number;
|
let ms : number;
|
||||||
|
@ -63,6 +79,8 @@ class Commands {
|
||||||
* Move the camera one frame forward
|
* Move the camera one frame forward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
public async camera_forward (rgb : number[] = [255, 255, 255]) {
|
public async camera_forward (rgb : number[] = [255, 255, 255]) {
|
||||||
const off : number[] = [0, 0, 0];
|
const off : number[] = [0, 0, 0];
|
||||||
|
@ -85,6 +103,8 @@ class Commands {
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Move the camera one frame forward with light off
|
* Move the camera one frame forward with light off
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
public async black_forward () {
|
public async black_forward () {
|
||||||
const off : number[] = [0, 0, 0];
|
const off : number[] = [0, 0, 0];
|
||||||
|
@ -109,6 +129,8 @@ class Commands {
|
||||||
* Move the camera one frame backward
|
* Move the camera one frame backward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
public async camera_backward (rgb : number[] = [255, 255, 255]) {
|
public async camera_backward (rgb : number[] = [255, 255, 255]) {
|
||||||
const off : number[] = [0, 0, 0];
|
const off : number[] = [0, 0, 0];
|
||||||
|
@ -132,6 +154,7 @@ class Commands {
|
||||||
/**
|
/**
|
||||||
* Move the camera one frame forward, light set to black or off
|
* Move the camera one frame forward, light set to black or off
|
||||||
*
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
public async black_backward () {
|
public async black_backward () {
|
||||||
const off : number[] = [0, 0, 0];
|
const off : number[] = [0, 0, 0];
|
||||||
|
@ -157,6 +180,8 @@ class Commands {
|
||||||
* Move the second camera one frame forward
|
* Move the second camera one frame forward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
public async camera_second_forward (rgb : number[] = [255, 255, 255]) {
|
public async camera_second_forward (rgb : number[] = [255, 255, 255]) {
|
||||||
const off : number[] = [0, 0, 0];
|
const off : number[] = [0, 0, 0];
|
||||||
|
@ -182,6 +207,8 @@ class Commands {
|
||||||
* Move the second camera one frame backward
|
* Move the second camera one frame backward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
public async camera_second_backward (rgb : number[] = [255, 255, 255]) {
|
public async camera_second_backward (rgb : number[] = [255, 255, 255]) {
|
||||||
const off : number[] = [0, 0, 0];
|
const off : number[] = [0, 0, 0];
|
||||||
|
@ -208,6 +235,8 @@ class Commands {
|
||||||
* Move the both cameras one frame forward
|
* Move the both cameras one frame forward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
public async cameras_forward (rgb : number[] = [255, 255, 255]) {
|
public async cameras_forward (rgb : number[] = [255, 255, 255]) {
|
||||||
const off : number[] = [0, 0, 0];
|
const off : number[] = [0, 0, 0];
|
||||||
|
@ -246,6 +275,8 @@ class Commands {
|
||||||
* Move the both cameras one frame backward
|
* Move the both cameras one frame backward
|
||||||
*
|
*
|
||||||
* @param {array} rgb Color to set light for frame
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
public async cameras_backward (rgb : number[] = [255, 255, 255]) {
|
public async cameras_backward (rgb : number[] = [255, 255, 255]) {
|
||||||
const off : number[] = [0, 0, 0];
|
const off : number[] = [0, 0, 0];
|
||||||
|
@ -281,6 +312,13 @@ class Commands {
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Move first camera one frame forward and rewind secondary camera one frame backward
|
||||||
|
*
|
||||||
|
* @param {array} rgb Color to set light for frames
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
public async camera_forward_camera_second_backward (rgb : number[] = [255, 255, 255]) {
|
public async camera_forward_camera_second_backward (rgb : number[] = [255, 255, 255]) {
|
||||||
const off : number[] = [0, 0, 0];
|
const off : number[] = [0, 0, 0];
|
||||||
let both : number[];
|
let both : number[];
|
||||||
|
@ -314,7 +352,13 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Rewind first camera one frame backward and move secondary camera one frame forward
|
||||||
|
*
|
||||||
|
* @param {array} rgb Color to set light for frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
public async camera_backward_camera_second_forward (rgb : number[] = [255, 255, 255]) {
|
public async camera_backward_camera_second_forward (rgb : number[] = [255, 255, 255]) {
|
||||||
const off : number[] = [0, 0, 0];
|
const off : number[] = [0, 0, 0];
|
||||||
let both : number[];
|
let both : number[];
|
||||||
|
@ -349,10 +393,10 @@ class Commands {
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Move the secondary projector forward one frame
|
* Move the secondary projector forward one frame
|
||||||
*
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
**/
|
**/
|
||||||
public async projector_second_forward () {
|
public async projector_second_forward () {
|
||||||
let ms : number;
|
let ms : number;
|
||||||
|
@ -368,6 +412,11 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Rewind the secondary projector backward one frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
public async projector_second_backward () {
|
public async projector_second_backward () {
|
||||||
let ms : number;
|
let ms : number;
|
||||||
try {
|
try {
|
||||||
|
@ -383,6 +432,11 @@ class Commands {
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Move the both projectors forward one frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
public async projectors_forward () {
|
public async projectors_forward () {
|
||||||
let both : number[];
|
let both : number[];
|
||||||
let ms : number;
|
let ms : number;
|
||||||
|
@ -409,7 +463,11 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Rewind both projectors backwards one frame
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
public async projectors_backward () {
|
public async projectors_backward () {
|
||||||
let both : number[];
|
let both : number[];
|
||||||
let ms : number;
|
let ms : number;
|
||||||
|
@ -438,6 +496,12 @@ class Commands {
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Move the primary projector forward one frame and rewind the secondary projector
|
||||||
|
* one frame backwards.
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
public async projector_forward_projector_second_backward () {
|
public async projector_forward_projector_second_backward () {
|
||||||
let both : number[];
|
let both : number[];
|
||||||
let ms : number;
|
let ms : number;
|
||||||
|
@ -465,7 +529,12 @@ class Commands {
|
||||||
}
|
}
|
||||||
return ms;
|
return ms;
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Rewind the primary projector backwards one frame and move the secondary
|
||||||
|
* projector forward one frame.
|
||||||
|
*
|
||||||
|
* @returns {integer} Length of action in ms
|
||||||
|
**/
|
||||||
public async projector_backward_projector_second_forward () {
|
public async projector_backward_projector_second_forward () {
|
||||||
let both : number[];
|
let both : number[];
|
||||||
let ms : number;
|
let ms : number;
|
||||||
|
|
Loading…
Reference in New Issue