mcopy/cli/lib/mscript
mmcwilliams 96d0897f65 Made a breaking change to the mscript module: light array is now the "meta" array to allow for types of commands other than camera movements to have associated metadata. The two driving motivations for this change are the proposed alert feature which will have a string message as its metadata and the proposed pause feature, which will have seconds as its metadata.
Updated tests as well. Still need to change behavior in the mscript.js gui lib.
2019-07-26 19:54:22 -04:00
..
Readme.md Copy build libraries to cli app 2019-03-08 22:31:29 -05:00
TODO.md Copy build libraries to cli app 2019-03-08 22:31:29 -05:00
index.js Made a breaking change to the mscript module: light array is now the "meta" array to allow for types of commands other than camera movements to have associated metadata. The two driving motivations for this change are the proposed alert feature which will have a string message as its metadata and the proposed pause feature, which will have seconds as its metadata. 2019-07-26 19:54:22 -04:00
index.js.map Made a breaking change to the mscript module: light array is now the "meta" array to allow for types of commands other than camera movements to have associated metadata. The two driving motivations for this change are the proposed alert feature which will have a string message as its metadata and the proposed pause feature, which will have seconds as its metadata. 2019-07-26 19:54:22 -04:00
index.old.js Copy build libraries to cli app 2019-03-08 22:31:29 -05:00
package.json Copy build libraries to cli app 2019-03-08 22:31:29 -05:00

Readme.md

lib/mscript

lib/mscript~Mscript

class Mscript

Kind: inner class of lib/mscript

mscript.clear()

Clear the state of the script

Kind: instance method of Mscript

mscript.interpret()

Main function, accepts multi-line string, parses into lines and interprets the instructions from the text. Returns an array of steps to be fed into the mcopy.

Kind: instance method of Mscript

mscript.basic_cmd()

Apply a basic two character command

Kind: instance method of Mscript

mscript.new_loop()

Start a new loop

Kind: instance method of Mscript

mscript.end_loop()

Close the most recent loop

Kind: instance method of Mscript

mscript.move_cam()

Move camera to explicitly-defined frame

Kind: instance method of Mscript

mscript.move_proj()

Move projector to explicitly-defined frame

Kind: instance method of Mscript

mscript.set_state()

Set the state of either the cam or projector

Kind: instance method of Mscript

mscript.last_loop()

Return the last loop

Kind: instance method of Mscript

mscript.parent_loop()

Return the second-last loop

Kind: instance method of Mscript

mscript.loop_count()

Extract the loop count integer from a LOOP cmd

Kind: instance method of Mscript

mscript.fade()

Execute a fade of frame length, from color to another color

Kind: instance method of Mscript

mscript.fade_count()

Extract the fade length integer from a FADE cmd

Kind: instance method of Mscript

mscript.fade_start()

Extract the start color from a string

Kind: instance method of Mscript

mscript.fade_end()

Extract the end color from a string

Kind: instance method of Mscript

mscript.update()

Increase the state of a specific object, such as the camera/projector, by the value defined in val

Kind: instance method of Mscript

mscript.str_to_arr()

Split string on command, extract any integers from string

Kind: instance method of Mscript

mscript.light_to_arr()

Split a string on a command to extract data for light array

Kind: instance method of Mscript

mscript.light_state()

Split a string to extract an rgb color value

Kind: instance method of Mscript

mscript.fail()

Throw an error with specific message

Kind: instance method of Mscript

lib/mscript~startsWith()

startswith function from lodash, do not want the entire lib for this

Kind: inner method of lib/mscript