UNPKG

dreemgl

Version:

DreemGL is an open-source multi-screen prototyping framework for mediated environments, with a visual editor and shader styling for webGL and DALi runtimes written in JavaScript. As a toolkit for gpu-accelerated multiscreen development, DreemGL includes

55 lines (39 loc) 2.33 kB
# DreemGL Headless Platform The headless platform code allows much of DreemGL's functionality to be tested. These tests do not require a webgl, or DALi interface and should run on any platform that supports Node. This platform is modeled from the DALi platform. In DALi, interface objects are created to handle the translation between DreemGL and DALi. In the headless platform, these objects only hold the state, allowing this state to be verified, or dumped as a JSON object. ### Usage ```javascript node server.js -nomoni -headless <COMPOSITION> ``` The COMPOSITION is the location of the COMPOSITION relative to the top of the DreemGL repository. The ```-nomoni``` argument tells the node server not to reload the application when it attempts to close. For example, to run the test ```test_initialization.js``` ```javascript node server.js -nomoni -verbose -headless test/test_initialization ``` The output is ``` Loading environment headless Reloading composition $root/test\test_initialization.js deviceheadless.createContext NOT implemented compositionheadless.createBus is NOT implemented Tests Ran Terminate ``` The ```Tests Ran``` string is the output from the composition. The other messages are generated by the headless platform. You can remove these other messages by removing the ```-verbose``` argument. ### Headless Options | Argument | Default | Description | | --------------- |:-------:| -------------| | ```-headless``` | | Use the headless platform, specifying the name of the composition to load. | | ```-nomoni``` | | Do not restart the application when it closes. | | ```-verbose``` | | Display output generated by the headless platform | | ```-width``` | 1920 | Width of the display. | | ```-height``` | 1080 | Height of the display. | | ```-name``` | dreemgl | Window name. | | ```-dumpstate```| stdout | Name of file to dump final state. (Optional) | | ```-duration``` | 0 | Duration of test, in msec. 0 will render the screen once and stop. | ### If you see the error, ```Error: No screen found``` A screen must have a name to prevent this error from being generated. If you see the error, modify your composition to define a name field for a screen. For example, ``` var s = screen({ name: 'default', ... ```