1 
  2 
  3  
  4 /**
  5  * The sandboxe namespace.
  6  * @namespace 
  7  *
  8  */
  9 var sandboxe = {
 10     /** 
 11      * Types of data specified by the native system. For use with inputBuffer 
 12      * and outputBuffer, for example. 
 13      *
 14      * @namespace 
 15      */
 16     type : {
 17         /**
 18          * Represents a 32bit signed integer.
 19          *
 20          */
 21         int : 0,
 22         
 23         /**
 24          * Represents an floating point value of single precision.
 25          *
 26          */
 27         float : 1,
 28 
 29         /**
 30          * Represents an unsigned 32bit integer.
 31          *
 32          */
 33         uint32 : 2,
 34 
 35         /**
 36          * Represents an unsigned 8bit integer.
 37          *         
 38          */
 39         byte : 3
 40     },
 41     
 42     
 43     /**
 44      * inputBuffer utility namespace
 45      * @namespace
 46      */
 47     inputBuffer : {
 48         /**
 49          * Creates a new inputBuffer object. inputBuffer objects 
 50          * contain utilities to help work with binary input data from 
 51          * files or arbitrary byte buffers.
 52          * @returns {inputBuffer} A new {@link inputBuffer}
 53          * @function
 54          */
 55         create : __input_buffer_create
 56     },
 57 
 58     /**
 59      * inputBuffer utility namespace
 60      * @namespace
 61      */    
 62     outputBuffer : {
 63         /**
 64          * Creates a new outputBuffer object. outputBuffer objects 
 65          * contain utilities to help work with binary output data for 
 66          * files or arbitrary byte buffers.
 67          * @returns {outputBuffer}
 68          * @function
 69          */
 70         create : __output_buffer_create
 71     },
 72 
 73     /**
 74      * particleEmitter2d utility namespace
 75      * @namespace
 76      */   
 77     particleEmitter2D : {
 78         /**
 79          * Creates a new particleEmitter2D, an entity that 
 80          * can efficiently emit particles.
 81          * @returns {particleEmitter2D}
 82          * @function
 83          */
 84         create : __particle_emitter_2d_create
 85     },
 86     /**
 87      * Sound and general audio utility namespace
 88      * @namespace
 89      *
 90      * @description 
 91      * Sound within the engine is output into separate channels, each of which 
 92      * are assembled into a waveform sent to the system. Each channel has its 
 93      * own volume, panning, and custom effect control, allowing for advanced audio control 
 94      * (i.e. independent volume for sound effects and background music.)
 95      */   
 96     sound : {
 97 
 98         /**
 99          * Returns whether the given sound file is playing.
100          * @returns {boolean} 
101          * @param {asset} asset The loaded sound file 
102          * @function
103          */
104         isPlaying : __sound_is_playing,
105         
106         
107         /**
108          * Plays the given audio asset. 
109          *
110          * @returns {activeSound} 
111          * @param {asset} asset The loaded sound asset.
112          * @param {Number} channel The channel to send the audio to. Default is 0. (optional)
113          * @param {Number} volume The volume multiplier to play the audio at. Default is 1.0. (optional)
114          * @param {Number} panning The panning multiplier to play the audio with. 0 -> left audio device, 1-> right audio device. Default is .5. (optional)
115          * @function
116          */        
117         playAudio : __sound_play_audio,
118 
119         /**
120          * Adds an effect to the audio channel. **WARNING:** currently, effect functors are very resource intensive and 
121          * may not perform well enough for most applications.
122          *
123          * Channel effects provide a mechnism to provide custom behavior to the raw audio that 
124          * passes through a sound channel. See {@link audioBuffer}
125          *
126          * @param {Function} effectHandler The function to provde the custom effect. Its input is an {@link audioBuffer}
127          * @param {Number} channel The channel to add this effect to.
128          * @function
129          */     
130         channelAddEffect : __sound_channel_add_effect,
131         
132         /**
133          * Removes all effects from a channel.
134          *
135          * @param {Number} channel Channel to reset.
136          * @function
137          */     
138         channelReset : __sound_channel_reset,
139         
140         /**
141          * Sets the volume for the channel.
142          *
143          * @param {Number} channel Channel to set the volume 
144          * @param {Number} volume Volume to set. Default is 1.0.
145          * @function
146          */
147         channelSetVolume : __sound_channel_set_volume,
148 
149         /**
150          * Sets the panning for the channel. As with all other 
151          * panning input contexts, 0.f is all the way to the left, and 1.f is all the way to the left.
152          *
153          * @param {Number} channel Channel to set the volume 
154          * @param {Number} volume Volume to set. Default is .5
155          * @function
156          */
157         channelSetPanning : __sound_channel_set_panning,
158 
159         /**
160          * Sets whether to keep the channel awake.
161          * By default, channels will only be active if there are samples playing through it 
162          * This is normally fine, execpt this means effects will stop once no samples are 
163          * being processed through a channel. For something like reverberation, this 
164          * would cut off meaningful information from being output. Keeping the channel 
165          * awake sacrifices performance for making more quality effects.
166          *
167          * @param {Number} channel Channel to set the volume 
168          * @param {Boolean} enable Whether to keep the channel awake. By default, no channels are kept awake.
169          * @function
170          */
171         channelKeepAwake : __sound_channel_keep_awake
172     },
173     /**
174      * General debugging utility namespace
175      * @namespace
176      */   
177     debug : {
178 
179         /**
180          * Convenience function that throws an exception if the parameter passed is not true.
181          *
182          * @param {Object} assertion The assertion to check   
183          * @function
184          */
185         assert : function(assertion) {
186             if (!assertion) throw 'Assertion failure.';
187         }
188     },
189 
190     /**
191      * Display management utilities and functions.
192      * @namespace
193      */   
194     display : {
195         /**
196          * Creates a new display object. See {@link display}.
197          *
198          * @param {String} name Optional: A name for the display. The default is "sandboxe"
199          * @param {Number} width Optional: Width for the display. The default is 640
200          * @param {Number} height Optional: Height for the display. The default is 480
201          * @returns {display} 
202          * @function
203          */
204         create : __display_create,
205 
206         /**
207          * Destroys a display object.
208          *
209          * @param {display} display Display to remove from the system.
210          * @function
211          */
212         destroy : __display_destroy,
213 
214         /**
215          * Tells sandboxe which display to update and draw to. Once set as a main display,
216          * this display will receive all update requests from the renderer. In addition,
217          * sandboxe will use this display as the source of input from the user on systems 
218          * where input comes form the display (i.e. WINAPI or X11).
219          *
220          * @param {display} display Display to set as the main.
221          * @function
222          */
223         setMain : __display_set_main,
224         
225         /**
226          * Returns the current main display for sandboxe in use, if any.
227          *
228          * @returns {display}
229          * @function
230          */
231         getMain : __display_get_main,
232 
233         
234         /**
235          * View policy for {@link display.setViewPolicy}.
236          * @namespace 
237          */
238         viewPolicy : {
239             /**
240              * The display will show the attached framebuffer's contents with no transformation
241              */
242             noPolicy : 0,      
243 
244             /**
245              * The display will stretch the attached framebuffer's contents to match the windows dimensions
246              */
247             matchSize : 1
248         },
249         
250         
251         /**
252          * The standard functional capabilities of a Display.
253          * @namespace
254          */
255         capability : {
256             /**
257              * The display can be resized.
258              */
259             canResize : 0,
260 
261             /**
262              * The display's position can be moved.
263              */
264             canMove : 1,        
265 
266             /**
267              * The display's size can consume the entire physical device, often in a special state.
268              */
269             canFullscreen : 2,
270 
271             /**
272              * The display can be hidden.
273              */
274             canHide : 3, 
275 
276             /**
277              * The display can prevent the user from changing the dimensions of the display.
278              */
279             canLockSize : 4 
280         }
281     },
282     
283     
284     /**
285      * Collection of functions managing components in general. See {@link component}
286      * @namespace
287      */   
288     component : {
289 
290         /**
291          * @namespace 
292          * @description 
293          * Component type do be passed to the addComponent function.
294          */
295         type : {
296             /**  Adds a generic component object to the entity. See {@link component} */
297             object : 0,
298          
299             /**  Adds a clock/timer component to the entity. See {@link clock}*/
300             clock : 1,
301 
302             /**  Adds a data storage object to the entity. See {@link dataTable}*/
303             dataTable : 2,
304 
305             /**  Adds a gui-helper object to the entity. See {@link gui}*/
306             gui : 3,
307 
308             /**  Adds an easing function object to the entity. See {@link mutator}*/
309             mutator : 4,
310 
311             /**  Adds a 2D collision and movement helper to the entity. See {@link object2d} */
312             object2d : 5,
313 
314             /**  Adds a 3D lighting component to the entity. See {@link renderLight}*/
315             renderLight : 6,
316 
317             /**  Adds a 3D mesh renderer component to the entity. See {@link renderMesh}*/
318             renderMesh : 7,
319 
320             /**  Adds a timed function manager component to the entity. See {@link scheduler}*/
321             scheduler : 8,
322 
323             /**  Adds a 2D rendering component to the entity. See {@link shape2d}*/
324             shape2d : 9,
325 
326             /**  Adds a state machine to the entity. See {@link stateControl}*/
327             stateControl : 10,
328 
329             /**  Adds a 2D text rendering component to the entity. {See @link text2d}*/
330             text2d : 11
331 
332 
333         },
334 
335 
336         /**
337          * Functions and types general to renderMesh objects. See {@link renderMesh}
338          *
339          * @namespace 
340          */
341         renderMesh : {
342             /**
343              * Primitives to use when rendering 3d vertices.
344              * @namespace 
345              */
346             polygon : {
347                 /** Solid triangle */
348                 triangle : 0,
349                 
350                 /** 3d line */
351                 line : 1
352             }
353         },
354         
355         /**
356          * Functions and types general to renderLight objects. See {@link renderLight}
357          *
358          * @namespace 
359          */
360         renderLight : {
361 
362             /**
363              * Enumerator of different types of lights.
364              * 
365              * @namespace
366              */
367             type : {
368                 /**
369                  * When given to a renderLight as the type, the light becomes a 
370                  * fixed-point type light in 3D space.
371                  */
372                 point : 0,
373 
374                 /**
375                  * When given to a renderLight as the type, the light becomes a 
376                  * location-independent directional light. In this case, the position 
377                  * property is interpreted as a directional vector.
378                  */
379                 directional : 1
380             }
381         },
382         
383 
384 
385         /**
386          * Functions and types general to mutator objects. See {@link mutator}
387          *
388          * @namespace 
389          */
390         mutator : {
391 
392             /**
393              * Types of mutation functions
394              * @namespace
395              */
396             mutation : {
397                 /** Output is a constant value */
398                 constant : 0,
399 
400                 /** Output models a linear function */
401                 linear : 1,
402                 
403                 /** Output models a quadratic function */
404                 quadratic : 2,
405 
406                 /** Output models a squareroot function */
407                 squareRoot : 3,
408 
409                 /** Output models a cubic function */
410                 cubic : 4,
411 
412                 /** Output models a sine wave, where input is radians into a standard sine function.*/
413                 sinudoidal : 5,
414 
415                 /** Output models a logarithmic function. */
416                 logarithmic : 6,
417 
418                 /** Output is random and is independent of input. */
419                 randomDistribution : 7
420             },
421 
422         },
423         
424         /**
425          * Functions and types general to mutator objects. See {@link mutator}
426          *
427          * @namespace 
428          */
429         gui : {
430             /**
431              * Ungrabs the input for the gui that currently owns input
432              * @function
433              */
434             ungrabInput : __gui_ungrab_input,
435 
436             /**
437              * Unsets the currently focused widget. This fires the "on-unfocus" event for the component.
438              * @function
439              */
440             unfocus : __gui_unfocus
441         },
442 
443 
444         /**
445          * Functions and types general to text2d objects. See {@link text2d}
446          *
447          * @namespace 
448          */        
449         text2d : {
450 
451             /**
452              * Flags for spacing modes to be used with text2d objects.
453              * @namespace
454              */
455             spacingMode : {
456                 /** Attempts to produce the most natural spacing between text by taking into account any special character spacing rules determined by the font. This is the default.*/
457                 kerned : 0,
458                 /** Space among characters is distributed uniformly regardless of input text. This is typically preferred for performance and for ease of determining space usage. */
459                 monospace : 1,
460                 /** Spcifies space to be determined by the actual character extents only. This is at times useful, but may cause awkward spacing with certain fonts.*/
461                 bitmap : 2
462             }
463         },
464 
465         /**
466          * Functions and types general to object2d objects. See {@link object2d}
467          *
468          * @namespace 
469          */        
470         object2d : {
471 
472             /**
473              * Group IDs for collisions. See {@link object2d}
474              * @namespace
475              */
476             group : {
477                 /** Group A. This is the defult. */
478                 a : 0,
479                 /** Group B. */
480                 b : 1,
481                 /** Group C. */
482                 c : 2,
483                 /** Group D. */
484                 d : 3,
485                 /** Group E. */
486                 e : 4,
487                 /** Group F. */
488                 f : 5,
489                 /** Group G. */
490                 g : 6,
491                 /** Group H. */
492                 h : 7,
493                 /** Group I. */
494                 i : 8,
495                 /** Group J. */
496                 j : 9,
497                 /** Group K. */
498                 k : 10,
499                 /** Group L. */
500                 l : 11,
501                 /** Group M. */
502                 m : 12,
503                 /** Group N. */
504                 n : 13,
505                 /** Group O. */
506                 o : 14,
507                 /** Group P. */
508                 p : 15,
509                 /** Group Q. */
510                 q : 16,
511                 /** Group R. */
512                 r : 17,
513                 /** Group S. */
514                 s : 18,
515                 /** Group T. */
516                 t : 19,
517                 /** Group U. */
518                 u : 20,
519                 /** Group V. */
520                 v : 21,
521                 /** Group W. */
522                 w : 22,
523                 /** Group X. */
524                 x : 23,
525                 /** Group Y. */
526                 y : 24,
527                 /** Group Z. */
528                 z : 25
529 
530 
531             }
532         },
533         
534         
535         
536         /**
537          * Functions and types general to 2D rendering objects. See {@link text2d} and {@link shape2d}.
538          *
539          * @namespace 
540          */        
541         render2d : {
542             /**
543              * Flags for rendering modes
544              * @namespace
545              */
546             renderMode : {
547                 /** This is the default. Colors are interpreted as you would normally expect with the alpha channle being expressed as a transparency value.*/
548                 normal : 0,
549                 /** Translucency is a way of expressing transparency. When a rasterization is translucent, the vertices colors are added to whatever is drawn underneath it. This is referred to in some places as additive blending. */
550                 translucent : 1,
551             }
552         },
553 
554 
555     },
556 
557     
558     /**
559      * @namespace
560      *
561      * @description
562      * Functions to work with the trunk, allowing for packing assets into binaries. </br>
563      *  
564      * The trunk is a conceptual means by which you can store assets for your project 
565      * to be bundled with an executable. Using the trunk, you can create copies of the 
566      * sandboxe binary with files packed into the binary. When trunk assets are added
567      * they are automatically looked for when doing an action that would normally 
568      * check the disk. </br></br>
569      * 
570      * It's important to note that this process doesn't actually modify the currently 
571      * running executable, but instead allows to create a new executable with the parameters you set. </br></br>
572      * 
573      * The usual process of using the trunk is like so:
574      * <pre>
575      * 1. stage() the files to be included
576      * 2. commit() the files to produce a new binary 
577      * </pre>
578      *
579      * Then when running the new binary, there's no need to change any code. 
580      * The normal routines that look for disk objects (i.e. {@link sandboxe.assets}) will 
581      * automatically search objects in the trunk for a match based on its original path 
582      * before defaulting to the disk. The new binary's trunk can always be checked using 
583      * {@link sandboxe.trunk.getItemNames()}.
584      *
585      * For example:
586      * @example
587      *
588      * // Stages the image for a new binary.
589      * sandboxe.trunk.stage('/path/to/myImage.png');
590      * // create new binary.
591      * sandboxe.trunk.commit('/path/to/new/binary');
592      * 
593      *
594      */
595     trunk : {
596         /** 
597          * Adds the specified file to list of files to add to the trunk. 
598          * @param {String} path The path to the file you wish to commit to the trunk.
599          * @function
600          */
601         stage : __trunk_stage, // stages
602         
603         /**
604          * Removes the given path from the stages files within the trunk. Note that 
605          * this does not remove files from this binary's trun; only the stages 
606          * file reference is removed.
607          * @param {String} path The path to remove from the staged file list.
608          * @function
609          */
610         remove : __trunk_remove,
611 
612         /**
613          * Creates a new binary that is a copy of this one, except its trunk 
614          * consists of the files added with {@link sandboxe.trunk.stage()}. 
615          * If any file is not found, the export fails.
616          * @returns {String} A status message is returned giving info if unsuccessful. If successful, the string is returned is empty.
617          * @function
618          */
619         commit :__trunk_commit,
620         
621 
622         /**
623          * Returns a list of the currently stages files.
624          * @returns {Array} Array of strings with the names given for each staging call.
625          * @function
626          */
627         query : __trunk_query,
628 
629         /**
630          * Removes all stages file names for commit. Note that this doesnt actually touch any files, just removes the effects of staging it
631          * @function
632          */        
633         clear : __trunk_clear,
634         
635         /**
636         * Returns an array of all files added to the trunk from the commit() call that 
637         * created this binary. For any file action whose path equals a name on this list, the 
638         * internal binary data packed in the trunk will be used instead of looking for an on-disk file.
639         *
640         * @function
641         * @returns {Array} List of files in the trunk
642          */
643         getItemNames : __trunk_get_item_names,
644         
645         /**
646         * Stages all trunk items that existed at the creation of this binary.
647         *
648         * @function 
649         */
650         inherit : __trunk_inherit
651     },
652 
653 
654     /**
655      * @namespace
656      * @description 
657      * Collection of functions to work with {@link material}s.
658      */
659     material : {
660         /**
661          * Creates a new material object, needed for working with 3D renderings.
662          * See {@link renderMesh} and {@link mesh}. 
663          * @returns {material}
664          * @function
665          */
666         create : __material_create,
667         
668         /**
669          * Built-in programs for the program property of a material.
670          * These are to be used if no user shader programs are provided.
671          * @namespace
672          */
673         coreProgram : { 
674             /** Default material. No lighting. The color is determined by the Ambient color.*/
675             basic : 0,
676             
677             /** Lighting material. The lighting shader is guaranteed to follow and Phong-like shading model.*/
678             lighting : 1
679         },
680 
681         /**
682          * Slots to specify input image references as texture slots for a material.
683          * @namespace
684          */
685         textureSlot : {
686             
687             /** Interprets the texture as an RGBA texture. */
688             color : 0,
689             
690             /** Interprets the texture as a normal map. Each 4-pixel component is interpreted as a normal vector, using rgb saturation values as xyz directions respectively. The alpha component is ignored. */
691             basic : 1,
692             
693             /** Interprets the texture as a shiny map. Each red component of each 4-pixel is interpreted as a shiny value. The bga values are ignored. */
694             shiny : 2
695         }
696     },
697     
698     /** 
699      * @namespace 
700      * @description 
701      * Collection of references to work with {@link shader} objects.
702      */
703     shader : {
704         /**
705          * Creates a new shader object, which allows for custom rendering using materials and 3d objects.
706          * @returns {shader} 
707          * @function
708          */
709         create : __shader_create,
710 
711         /**
712          * Flags for the shader stage. 
713          * @namespace
714          */
715         stage : {
716             /** First stage of the shader. Processes each vertex */
717             vertexProcessor : 0,
718 
719             /** Next stage of the shader. Processes each fragment (pixel in the output framebuffer) */
720             fragmentProcessor : 1
721         },
722         
723         /**
724          * Flags for the status of a shader compilation.
725          * @namespace
726          */
727         status : {
728             /** compile() was called, but the compilation failed. AddStage() and Copmile() may be called again to fix the bad stage(s). */
729             invalid : 0,
730             /** compile() was successful and the Shader may be used in rendering. See Material. */
731             success : 1,
732             /** compile() has not yet been called. */
733             notCompiled : 2
734         }
735     },
736     
737     
738     /** 
739      * @namespace 
740      * @description 
741      * Collection of functions and references to work with {@link mesh} objects.
742      */
743     mesh : {
744         /**
745          * Creates a new mesh object, which hold raw 3d data to be given to {@link renderMesh} components for drawing. 
746          * @returns {mesh}
747          * @function
748          */
749         create : __mesh_create,
750         
751         /** 
752          * Denotation of vertex data type.
753          * @namespace
754          */
755         vertexAttribute : {
756             /** Position of the vertex. 3 components: xyz. */
757             position : 0,
758 
759             /** he normal vector of the vertex. 3 components: xyz. */
760             normal : 1, 
761             
762             /** The texture cooridates of the vertex. 2 components: xy. */
763             uv : 2,   
764             
765             /** User-defined data. 3 components: xyz. */
766             userData : 3 
767         },
768         
769         /** 
770          * Returns a pre-build mesh representing a cube.
771          * @returns {mesh} A newly made mesh.
772          * @function
773          */
774         createCube : __mesh_create_cube,
775 
776         /** 
777          * Returns a pre-build mesh representing a flat square.
778          * @returns {mesh} A newly made mesh.
779          * @function
780          */
781         createSquare : __mesh_create_square
782 
783     },
784 
785     /**
786      * @namespace 
787      * @description 
788      * Functions for working with {@link camera} entities.
789      */
790     camera : {
791         /** 
792          * Creates a new camera entity, which are necessary for 2d and 3d rendering 
793          * See {@link sandboxe.graphics} for more details in usage.
794          * @returns {camera} 
795          * @function
796          */
797         create : __camera_create
798     },
799     
800     
801     /** 
802      * @namespace 
803      * @description 
804      *
805      * Functions for working with rendering setup and actions.
806      * Note that most rendering actions are done through components 
807      * such as {@link shape2d} or {@link renderMesh}. 
808      */
809     graphics : {
810         
811         /** 
812          * Forces the rendered scene to be drawn on the screen. This is normally done for you.
813          * @function
814          */
815         commit : __graphics_commit,
816 
817         /** 
818          * Draws an object to the current display. This is normally done for you automatically 
819          * by attaching copmonents and having the host entity as part of the main entity tree.
820          * @param {shape2d|renderMesh} object The object to draw.
821          * @function
822          */
823         draw : __graphics_draw,
824 
825         /**
826          * Sets whether or not to automatically draw, commit, and clear.
827          * @param {boolean}
828          * @function
829          */
830         setDrawEachFrame : __graphics_set_draw_each_frame,
831         /**
832          *  whether each frame is being drawn, updated, and swapped automatically by sandboxe or not.
833          * @returns {boolean}
834          * @function
835          */
836         getDrawEachFrame : __graphics_get_draw_each_frame,
837 
838         /**
839          * Disables or enables bilinear filtering of Images during rendering.
840          * Bilinear filtering makes stratched images look less grainy.
841          * The default is not to enable
842          * @param {boolean}
843          * @function
844          */
845         setEnableFiltering : __graphics_set_enable_filtering,
846 
847 
848         /** 
849          * Sets the current camera to view from for 2D renderings.
850          * If invalid, the current camera is not changed.
851          * @param {camera}
852          * @function
853          */
854         setCamera2d : __graphics_set_camera_2d,
855 
856         /**
857          * Sets the current camera to view from for 3D renderings.
858          * If invalid, the current camera is not changed.
859          * @param {camera}
860          * @function
861          */
862         setCamera3d : __graphics_set_camera_3d,
863 
864         /**
865          * Sets the current camera that processes all visuals and hands them to the display i.e. the window.
866          *  If invalid, the current camera is not changed.
867          * @param {camera}
868          * @function
869          */
870         setRenderCamera : __graphics_set_render_camera,
871 
872 
873 
874         /** 
875          * Returns the current 2d camera object. 
876          * @returns {camera}
877          * @function
878          */
879         getCamera2d : __graphics_get_camera_2d,
880 
881         /** 
882          * Returns the current 3d camera object. 
883          * @returns {camera}
884          * @function
885          */
886         getCamera3d : __graphics_get_camera_3d,
887 
888         /** 
889          * Returns the current render camera object. 
890          * @returns {camera}
891          * @function
892          */
893         getRenderCamera : __graphics_get_render_camera
894 
895 
896     },
897     
898 
899     /**
900      * @namespace 
901      * @description 
902      * Functions to work with {@link color} objects
903      * 
904      */
905     color : {
906         /**
907          * Creates a new RGBA color object.
908          * @param {string|number} param If the first parameter is alone, it is interpreted as a string as if calling {@link color.set}. If not alone, it is a decimal for the red component. 
909          * @param {number} green green value as a decimal. 0.f to 1.f.
910          * @param {number} blue Blue value as a decimal. 0.f to 1.f.
911          * @param {number} alpha Alpha value as a decimal. 0.f to 1.f.
912          * @returns {color}
913          * @function
914          */         
915         create : __color_create
916     },
917     
918 
919     /**
920      * @namespace 
921      * @description 
922      * Functions and references to assist in storing external or binary assets. 
923      */
924     assets : {
925         
926         /**
927          * @namespace 
928          * Types of assets  
929          */
930         type : {
931             /** An image object */
932             image : 1,
933             
934             /** A font object */
935             font : 2,        
936             
937             /** An audio object */
938             audio : 3,          
939             
940             /** A sequence type object. Currently unavailable. */
941             sequence : 4,       
942             
943             /** A particle specification type object */
944             particle : 5,       
945 
946             /** Unspecified binary data */
947             rawData : 6,      
948             
949             /** A model object */
950             model : 7,          
951             
952             /** Not a type */
953             noType : 8
954         },
955 
956 
957         /** 
958          * Retrieves an asset object by name or disk path.
959          * @param {String} extension The standard extension of the file. For example 'png' would be for PNG images. 
960          * @param {String} path The path or name of the asset. If the path refers to a stored name within the trunk, raw data referring to the asset is used from within the binary and the disk is not otherwise accessed. If the asset has been loaded before using this function, the same asset reference is returned and a new one is NOT created. In the case that this argument is true and the name is not in the trunk, the disk is searched recursively from the path set from {@link sandboxe.assets.setSearchPath}. By default this is the binary directory.
961          * @param {Boolean} isName Optional. Says whether the path given is a filename only or a full path. If filename, the file will be searched recursively from the search path. Otherwise, the file is looked for directly.
962          * @returns {asset} Reference to the asset.
963          * @function 
964          */
965         load : __assets_load,
966 
967 
968         /**
969          * Loads an asset form raw binary data.
970          * @param {String} extension The standard extension of the file. For example 'png' would be for PNG images. 
971          * @param {String} name The name of the asset. Preferrably should be unique.
972          * @param {Array} bytes An array of byte values to be interpreted as a byte stream.
973          * @returns {asset} Reference to the asset.
974          * @function 
975          */
976         loadFromBuffer : __assets_load_from_buffer,
977         
978         
979         /**
980          * Returns all supported extension strings for loading the given asset type.
981          * @param {Number} type The type of asset to get extensions for. See {@link sandboxe.assets.type}
982          * @returns {Array} The names of supported extention types.
983          * @function
984          */
985         supportedLoadExtensions : __assets_supported_load_extensions,
986 
987         /**
988          * Returns all supported extension strings for writing the given asset type.
989          * @param {Number} type The type of asset to get extensions for. See {@link sandboxe.assets.type}
990          * @returns {Array} The names of supported extention types.
991          * @function
992          */
993         supportedWriteExtensions : __assets_supported_write_extensions,
994 
995 
996         /**
997          * Returns the asset of the given type and name, if any.
998          * @param {Number} type The type of the asset to query. See {@link sandboxe.assets.type}
999          * @param {String} name The name / path of the asset provided when loading it.
1000          * @returns {asset} The asset queried. If none, return undefined.
1001          * @function
1002          */
1003         query : __assets_query,
1004 
1005 
1006         /**
1007          * Sets the base search path for loading assets. The default is sandboxe.engine.getBaseDirectory().
1008          * @param {String} path The path to set as the searching root. See {@link sandboxe.assets.load}.
1009          * @function
1010          */
1011         setSearchPath : __assets_set_search_path,
1012 
1013         /**
1014          * Gets the base search path for loading assets. The default is sandboxe.engine.getBaseDirectory().
1015          * @returns {String} The path set as the searching root. See {@link sandboxe.assets.load}.
1016          * @function
1017          */
1018         getSearchPath : __assets_get_search_path,
1019 
1020         
1021         
1022         /**
1023          * Creates a new asset.
1024          * @param {Number} type The type of th enew asset. See {@link sandboxe.assets.type}
1025          * @param {String} name The name of the new asset. Preferrably should be unique.
1026          * @returns {asset} The new asset to be created.
1027          * @function
1028          */
1029         new : __assets_new
1030     },
1031     
1032     
1033     
1034     /**
1035      * @namespace 
1036      * @description 
1037      * Collection of functions and references to work with input form the system.
1038      */
1039     input : {
1040         /**
1041          * Creates a new buttonListener object, which are used to call methods after certain inputs are detected.
1042          * @param {Number|String} Input The input to detect. See {@link sandboxe} input flags.
1043          * @returns {buttonListener}
1044          * @function
1045          */
1046         buttonListener : {
1047             create : __input_button_listener_new
1048         },
1049         
1050         /**
1051          * Creates a new unicodeListener object, which are used to call methods after characters are typed by the user keyboard.
1052          * @returns {unicodeListener}
1053          * @function
1054          */        
1055         unicodeListener : {
1056             create : __input_unicode_listener_new
1057         },
1058         
1059 
1060         /**
1061          * Returns the X position of the pointer, if any.
1062          * @returns {Number} X position of the pointer.
1063          * @function 
1064          */
1065         mouseX : __input_mouse_x,
1066 
1067         /**
1068          * Returns the Y position of the pointer, if any.
1069          * @returns {Number} Y position of the pointer.
1070          * @function 
1071          */
1072         mouseY : __input_mouse_y,
1073         
1074         
1075         /**
1076          * Returns the X position change since last update frame. 
1077          * @returns {Number} 
1078          * @function 
1079          */
1080         mouseXDelta : __input_mouse_x_delta,
1081 
1082         /**
1083          * Returns the Y position change since last update frame. 
1084          * @returns {Number} 
1085          * @function 
1086          */
1087         mouseYDelta : __input_mouse_y_delta,
1088 
1089         /**
1090          * Returns the mouse wheel's current state. 0 is for "neutral", 
1091          * -1 is for down, and 1 is for up.
1092          * @returns {Number} 
1093          * @function 
1094          */
1095         mouseWheel : __input_mouse_wheel,
1096 
1097 
1098         /**
1099          * Returns the active state of the input. 0 is for inactive (not pressed) 
1100          * 1 is for active (pressed)
1101          * @param {Number|String} Input The type of input to query. See {@link sandboxe} input enumerator.
1102          * @returns {Boolean} 
1103          * @function 
1104          */
1105         getState : __input_get_state,
1106 
1107         /**
1108          * Returns whether the input is currently pressed.
1109          * @param {Number|String} Input The type of input to query. See {@link sandboxe} input enumerator.
1110          * @returns {Boolean} 
1111          * @function 
1112          */
1113         isPressed : __input_is_pressed,
1114 
1115         /**
1116          * Returns whether the input is currently held. That is, in a pressed state for more that one frame continuously..
1117          * @param {Number|String} Input The type of input to query. See {@link sandboxe} input enumerator.
1118          * @returns {Boolean} 
1119          * @function 
1120          */
1121         isHeld : __input_is_held,
1122 
1123         /**
1124          * Returns whether the input was released. That is, transitioned form a pressed state to an unpressed state this frame.
1125          * @param {Number|String} Input The type of input to query. See {@link sandboxe} input enumerator.
1126          * @returns {Boolean} 
1127          * @function 
1128          */
1129         isReleased : __input_is_released,
1130 
1131         /**
1132          * Maps an input value flag to a string, allowing for more convenient querying.
1133          * Once a mapping has taken place, any place an input enumerator value is accepted, a string can be 
1134          * accepted in its place.
1135          * @param {String} Name 
1136          * @param {Number} Input Value to map to. See {@link sandboxe} input enumerator.
1137          * @function 
1138          */
1139         mapInput : __input_map_input,
1140         
1141         /**
1142          * Removes an input map by name.
1143          * @param {String} MappedName  
1144          * @function 
1145          */
1146         unmapInput : __input_unmap_input,
1147 
1148 
1149         /**
1150          * Retrieves the last unicode value typed by a user keyboard if any.
1151          * @returns {Number} 
1152          * @function 
1153          */
1154         getLastUnicode : __input_get_last_unicode
1155     },
1156     
1157     /**
1158      * @namespace 
1159      * @description 
1160      * Collection of fuctions to work with the engine in general 
1161      */
1162     engine : {
1163         /**
1164          * Gets the current entity that is set as the root. See {@link sandbose.engine.setRoot}.
1165          * @returns {entity}
1166          * @function 
1167          */
1168         getRoot : __engine_get_root,
1169 
1170         /**
1171          * Sets the root of the entity hierarchy.
1172          * For normal, automatic updating of an entity by the engine, an entity needs to be 
1173          * either the root of the hierarchy or a child within the hierarchy. 
1174          * Once this is the case, the stepping and drawing behavior for entities will be 
1175          * called at regular intervals. Once in the hierarchy, the entity may also be
1176          * inspected through the runtime debugger (F3).
1177          * @param {entity} root The new root of the emtity hierarchy.
1178          * @function 
1179          */
1180         setRoot : __engine_set_root,
1181 
1182 
1183         /**
1184          * Terminates the program.
1185          * @function 
1186          */
1187         quit : __engine_quit,
1188 
1189         /**
1190          * Attaches a manager-type entity to the engine.
1191          * Normally, the entity hierarchy is used for normal objects; however, 
1192          * sometimes it is useful to have management objects that are 
1193          * separate from the hierarchy. attachManager() does all the 
1194          * management of a given entity is if it were in the hierarchy without 
1195          * exposing it to hierarchy attributes (i.e. inspection in the debugger,
1196          * inheriting transforms, etc.)
1197          * @param {entity} manager The management-type entity to insert into the engine.
1198          * @function
1199          */
1200         attachManager : __engine_attach_manager,
1201         
1202         /** 
1203          * Sets the maximum update rate of the engine. The default is 60 FPS (frames per second).
1204          * In sandboxe, the step and frame rate are coupled.
1205          * @param {Number} FPS The new amount to set.
1206          * @function
1207          */
1208         setMaxFPS : __engine_set_max_fps,
1209         
1210         /**
1211          * Returns the base directory of the binary. This serves as the root path for 
1212          * any specified relative paths given to sandboxe. It is equivalent to the 
1213          * starting directory of the binary. On environments where this doesn't make sense, 
1214          * an empty string is returned.
1215          * @returns {String} The base path.
1216          * @function
1217          */
1218         getBaseDirectory : __engine_get_base_directory,
1219 
1220         /** 
1221          * Returns a version string for the engine.
1222          * @returns {String} The version.
1223          * @function
1224          */
1225         version : __engine_version,
1226         
1227         /**
1228          * Returns the total number of MS since sandboxe started.
1229          * @returns {Number} milliseconds since startup. Note that this is approximate.
1230          */       
1231          getTotalTime : __engine_get_total_time
1232     },
1233     
1234     
1235     /**
1236      * @namespace 
1237      * @description 
1238      * Collection of functions to work with the base {@link vector} object.
1239      */
1240     vector : {
1241         /**
1242          * Creates a new vector object. See {@link vector.set} for syntax.
1243          * @returns {vector}
1244          * @function
1245          */
1246         create : __vector_create_new
1247     },
1248     
1249     /**
1250      * @namespace 
1251      * @description 
1252      * Collection of functions to work with the {@link entity} object.
1253      */
1254     entity : {
1255         
1256         /**
1257          * Creates a new entity object, which are the base updatable 
1258          * extensible objects of sandboxe.
1259          * @returns {entity} A new entity
1260          * @function
1261          */
1262         create : __entity_create_default,
1263         
1264         /**
1265          * Returns all entities within sandboxe.
1266          * @returns {Array} An array of all the entities.
1267          * @function
1268          */
1269         getAll : __entity_get_all,
1270         
1271         
1272         /**
1273          * When entities update, an update class may be chosen for whether a 
1274          * child updates before, after, etc. the parent object does.
1275          * @namespace
1276          */
1277         updateClass : {
1278             /**
1279              * Object updates before its parent does.
1280              */
1281             before : 0,
1282 
1283             /**
1284              * Object updates after its parent does.
1285              */
1286             ater : 1
1287         },
1288 
1289 
1290 
1291     },
1292 
1293 
1294     /**
1295      * @namespace 
1296      * @description
1297      * Collection of references that work with the script side of sandboxe
1298      * 
1299      */
1300     script : {
1301         /**
1302          * Runs all the logic of the given file as if it were a source file.
1303          * This is unconditional.
1304          * @param {String} path Path to file. If absolute is false (which is the default), this is relative to {@link sandboxe.assets.getSearchPath}
1305          * @params {Boolean} absolute Optional. Whether the path given should be interpreted as relative. The default is false.
1306          * @function
1307          */
1308         run : function(script, b) {__script_include(script, 0, b==undefined?false:true);},
1309         
1310         /**
1311          * Similar to {@link sandboxe.script.run} except, a source file is only 
1312          * executabed the first time include() is called for that path. On subsequent calls
1313          * with the same path argument, no action is taken.
1314          * @param {String} path Path to file. This is relative to {@link sandboxe.assets.getSearchPath}
1315          * @params {Boolean} absolute Optional. Whether the path given should be interpreted as relative. The default is false.
1316          * @function
1317          */
1318         include : function(script, b) {__script_include(script, 1, b==undefined?false:true);}
1319     },
1320 
1321     /**
1322      * @namespace 
1323      * @description
1324      * Collection of references that work with the system console.
1325      * 
1326      */
1327     console : {
1328         /**
1329          * Returns whether the console is currently visible
1330          * @returns {boolean} 
1331          * @function
1332          */
1333         isVisible : __console_is_visible,
1334     
1335         /** 
1336          * Sets whether to show the console. 
1337          * The console is also showable through the keyboard shortcut Shift+Tab
1338          * @param {boolean} showConsole  If true, shows the console; if false, hides it.
1339          * @function
1340          */
1341         show : __console_show,
1342 
1343         /**
1344          * Returns whether the console is locked. If locked, the console cannot 
1345          * be shown or hidden through either the keyboard shortcut or the showConsole 
1346          * function.
1347          * @returns {boolean} 
1348          * @function
1349 \         */
1350         isLocked : __console_is_locked,
1351 
1352         /** 
1353          * Returns whether to lock or unlock the console.
1354          * The default is false.
1355          * @param {boolean} lockConsole If true, the console is locked (see isLocked)
1356          * @function
1357          */ 
1358         lock : __console_lock,
1359         
1360         
1361         //var add command 
1362         /** 
1363          * Returns the number of lines of output
1364          * currently held by the console.
1365          * @returns {Number} 
1366          * @function
1367          */
1368         getNumLines : __console_get_num_lines,
1369 
1370         /** 
1371          * Returns the string for the i'th line, starting at 0.
1372          * @param {Number} i THe line to retrieve.
1373          * @returns {String} 
1374          * @function
1375          */
1376         getLine :     __console_get_line,
1377 
1378         /**
1379          * Removes all stored lines of console output.
1380          * @function
1381          */
1382         clear :       __console_clear,
1383 
1384 
1385         /**
1386          * Sets the overlay message mode for incoming console messages.
1387          * @param {Number} mode The mode to set. See {@link sandboxe.console.messageMode}.
1388          * @function
1389          */
1390         setOverlayMessageMode : __console_overlay_message_mode,
1391 
1392         /**
1393          * Gets the overlay message mode. THe default is sandboxe.console.messageMode.standard
1394          * @returns {Number} See {@link sandboxe.console.messageMode}.
1395          * @function
1396          */
1397         getOverlayMessageMode : __console_get_overlay_message_mode,
1398 
1399 
1400         /**
1401          * Prints console output as a system-generated message. If the overlay mode is 
1402          * not disabled, sending a newline (\\n) will trigger a visual.
1403          * @param {String} content
1404          * @function
1405          */
1406         system  : __console_stream_system,
1407 
1408         /**
1409          * Prints console output as a info message. If the overlay mode is 
1410          * not disabled, sending a newline (\\n) will trigger a visual.
1411          * @param {String} content
1412          * @function
1413          */
1414         info    : __console_stream_info,
1415 
1416         /**
1417          * Prints console output as a error message. If the overlay mode is 
1418          * not disabled, sending a newline (\\n) will trigger a visual.
1419          * @param {String} content
1420          * @function
1421          */
1422         error   : __console_stream_error,
1423 
1424         /**
1425          * Prints console output as a warning message. If the overlay mode is 
1426          * not disabled, sending a newline (\\n) will trigger a visual.
1427          * @param {String} content
1428          * @function
1429          */
1430         warning : __console_stream_warning,
1431         
1432 
1433         /**
1434          * @namespace 
1435          * @description 
1436          * Modes possible for the overlay windows from console output. 
1437          */
1438         messageMode : {
1439             /** Standard mode: each newline triggers an output box visual containing the message. */
1440             standard : 0,
1441             
1442             /** No output visual is generated from any console stream activity. */
1443             disabled : 1
1444         }
1445 
1446 
1447     },
1448     
1449     /** 0 */
1450     key_0 : -1, 
1451     
1452     /** 1 */
1453     key_1 : 1, 
1454     
1455     /** 2 */
1456     key_2 : 2, 
1457     
1458     /** 3 */
1459     key_3 : 3, 
1460     
1461     /** 4 */
1462     key_4 : 4, 
1463     
1464     /** 5 */
1465     key_5 : 5,
1466     
1467     /** 6  */
1468     key_6 : 6, 
1469     
1470     /** 7 */
1471     key_7 : 7, 
1472     
1473     /** 8 */
1474     key_8 : 8, 
1475     
1476     /** 9 */
1477     key_9 : 9, 
1478 
1479     /** a*/
1480     key_a : 10, 
1481     
1482     /** b*/
1483     key_b : 11, 
1484     
1485     /** c*/
1486     key_c : 12, 
1487     
1488     /** d*/
1489     key_d : 13, 
1490     
1491     /** e*/
1492     key_e : 14, 
1493     
1494     /** f*/
1495     key_f : 15, 
1496     
1497     /** g*/
1498     key_g : 16, 
1499     
1500     /** h*/
1501     key_h : 17, 
1502 
1503     /** i*/
1504     key_i : 18, 
1505     
1506     /** j*/
1507     key_j : 19, 
1508     
1509     /** k*/
1510     key_k : 20,
1511     
1512     /** l*/ 
1513     key_l : 21, 
1514     
1515     /** m*/
1516     key_m : 22, 
1517     
1518     /** n*/
1519     key_n : 23, 
1520     
1521     /** o*/
1522     key_o : 24, 
1523     
1524     /** p*/
1525     key_p : 25, 
1526     
1527     /** q*/
1528     key_q : 26, 
1529     
1530     /** r*/
1531     key_r : 27, 
1532     
1533     /** s*/
1534     key_s : 28,
1535     
1536     /** t*/ 
1537     key_t : 29,
1538     
1539     /** u*/ 
1540     key_u : 30,
1541     
1542     /** v*/ 
1543     key_v : 31,
1544     
1545     /** w*/ 
1546     key_w : 32,
1547     
1548     /** x*/ 
1549     key_x : 33,
1550     
1551     /** y*/ 
1552     key_y : 34,
1553     
1554     /** z*/ 
1555     key_z : 35, 
1556     
1557     /** Left shift key */
1558     key_lshift : 36, 
1559     
1560     /** Right shift key*/
1561     key_rshift : 37, 
1562     
1563     /** Left control key*/
1564     key_lctrl : 38, 
1565     
1566     /** Right control key*/ 
1567     key_rctrl : 39,  
1568     
1569     /** Left alt key*/
1570     key_lalt : 40,   
1571     
1572     /** Right alt key*/
1573     key_ralt : 41,   
1574     
1575     /** Tab*/
1576     key_tab : 42,    
1577     
1578     /** F1*/
1579     key_F1 : 43,     
1580     
1581     /** F2*/
1582     key_F2 : 44,     
1583     
1584     /** F3*/
1585     key_F3 : 45,     
1586     
1587     /** F4*/
1588     key_F4 : 46,     
1589     
1590     /** F5*/
1591     key_F5 : 47,     
1592     
1593     /** F6*/
1594     key_F6 : 48,    
1595 
1596     /** F7*/ 
1597     key_F7 : 49,     
1598     
1599     /** F8*/
1600     key_F8 : 50,     
1601     
1602     /** F9*/
1603     key_F9 : 51,     
1604     
1605     /** F10*/
1606     key_F10 : 52,    
1607     
1608     /** F11*/
1609     key_F11 : 53,    
1610     
1611     /** F12*/
1612     key_F12 : 54,    
1613     
1614     /** Up arrow*/
1615     key_up : 55,     
1616     
1617     /** Down arrow*/
1618     key_down : 56,   
1619     
1620     /** Left arrow*/
1621     key_left : 57,   
1622     
1623     /** Right arrow*/
1624     key_right : 58,  
1625     
1626     /** -*/
1627     key_minus : 59,  
1628     
1629     /** : */
1630     key_equal : 60,  
1631     
1632     /** Backspace*/
1633     key_backspace : 61,  
1634     
1635     /** `*/
1636     key_grave : 62,  
1637     
1638     /** Escape*/
1639     key_esc : 63,    
1640     
1641     /** Home key*/
1642     key_home : 64,   
1643     
1644     /** Page up key*/
1645     key_pageUp : 65, 
1646     
1647     /** Page down key*/
1648     key_pageDown : 66,  
1649     
1650     /** End key*/
1651     key_end : 67,    
1652     
1653     /** ''*/
1654     key_backslash : 68,
1655     
1656     /** [*/ 
1657     key_lbracket : 69, 
1658     
1659     /** ]*/
1660     key_rbracket : 70, 
1661     
1662     /** ;*/
1663     key_semicolon : 71, 
1664     
1665     /** '*/
1666     key_apostrophe : 72, 
1667     
1668     /** /*/
1669     key_frontslash : 73, 
1670     
1671     /** Enter*/
1672     key_enter : 74, 
1673     
1674     /** Delete*/
1675     key_delete : 75, 
1676     
1677     /** Numpad 0*/
1678     key_numpad0 : 76, 
1679     
1680     /** Numpad 1*/
1681     key_numpad1 : 77, 
1682     
1683     /** Numpad 2*/
1684     key_numpad2 : 78, 
1685     
1686     /** Numpad 3*/
1687     key_numpad3 : 79, 
1688     
1689     /** Numpad 4*/
1690     key_numpad4 : 80, 
1691     
1692     /** Numpad 5*/
1693     key_numpad5 : 81, 
1694     
1695     /** Numpad 6*/
1696     key_numpad6 : 82, 
1697     
1698     /** Numpad 7*/
1699     key_numpad7 : 83, 
1700     
1701     /** Numpad 8*/
1702     key_numpad8 : 84, 
1703     
1704     /** Numpad 9*/
1705     key_numpad9 : 85, 
1706     
1707     /** Print screen button*/
1708     key_prtscr : 86, 
1709     
1710     /** Left Super key (Windows key)*/
1711     key_lsuper : 87, 
1712     
1713     /** Right Super key (Windows key)*/
1714     key_rsuper : 88, 
1715     
1716     /** Space*/
1717     key_space : 89, 
1718     
1719      /** Insert key*/ 
1720     key_insert : 90,
1721     
1722     /** ,*/
1723     key_comma : 91, 
1724     
1725     /** .*/
1726     key_period : 92, 
1727 
1728 
1729     /** Mouse left button*/
1730     mouse_left : 93,
1731 
1732     /** Mouse right button*/
1733     mouse_right : 94,
1734 
1735     /** Mouse middle button*/
1736     mouse_middle : 95,
1737 
1738 
1739     /** Mouse movement X axis*/
1740     mouseAxis_x : 96,
1741 
1742     /** Mouse movement Y axis*/
1743     mouseAxis_y : 97,
1744 
1745     /** Mouse wheel axis*/
1746     mouseAxis_wheel : 98,
1747 
1748 
1749     /** Button 0*/
1750     pad_b0 : 100, 
1751     
1752     /** Button 1*/
1753     pad_b1 : 101, 
1754     
1755     /** Button 2*/
1756     pad_b2 : 102, 
1757     
1758     /** Button 3*/
1759     pad_b3 : 103,
1760     
1761     /** Button 4*/ 
1762     pad_b4 : 104,
1763     
1764     /** Button 5*/
1765     pad_b5 : 105,
1766     
1767     /** Button 6*/
1768     pad_b6 : 106,
1769     
1770     /** Button 7*/
1771     pad_b7 : 107,
1772     
1773     /** Button 8*/
1774     pad_b8 : 108,
1775 
1776     /** Button 9*/
1777     pad_b9 : 109,
1778     
1779     /** Button 10*/
1780     pad_b10 : 110,
1781     
1782     /** Button 11*/
1783     pad_b11 : 111,
1784     
1785     /** Button 12*/    
1786     pad_b12 : 112,
1787     
1788     /** Button 13*/
1789     pad_b13 : 113,
1790     
1791     /** Button 14*/
1792     pad_b14 : 114,
1793     
1794     /** Button 15*/
1795     pad_b15 : 115,
1796     
1797     /** Button 16*/
1798     pad_b16 : 116,
1799     
1800     /** Button 17*/
1801     pad_b17 : 117,
1802     
1803     /** Button 18*/
1804     pad_b18 : 118,
1805     
1806     /** Button 19*/
1807     pad_b19 : 119,
1808     
1809     /** Button 20*/
1810     pad_b20 : 120,
1811     
1812     /** Button 21*/
1813     pad_b21 : 121,
1814     
1815     /** Button 22*/
1816     pad_b22 : 122,
1817     
1818     /** Button 23*/
1819     pad_b23 : 123,
1820     
1821     /** Button 24*/
1822     pad_b24 : 124,
1823     
1824     /** Button 25*/
1825     pad_b25 : 125,
1826     
1827     /** Button 26*/
1828     pad_b26 : 126,
1829     
1830     /** Button 27*/
1831     pad_b27 : 127,
1832     
1833     /** Button 28*/
1834     pad_b28 : 128,
1835     
1836     /** Button 29*/
1837     pad_b29 : 129,
1838     
1839     /** Button 30*/
1840     pad_b30 : 130,
1841     
1842     /** Button 31*/
1843     pad_b31 : 131,
1844 
1845     /** Button 32*/
1846     pad_b32 : 132,
1847 
1848 
1849     /** X button*/
1850     pad_x : 133, 
1851     
1852     /** Y button*/
1853     pad_y : 134, 
1854     
1855      /** Z button*/
1856     pad_z : 135, 
1857     
1858     /** X2 button */
1859     pad_x2 : 136,
1860     
1861     /** Y2 button*/
1862     pad_y2 : 137,
1863     
1864     /** Z2 button*/
1865     pad_z2 : 138,
1866     
1867     /** X3 button*/
1868     pad_x3 : 139,
1869     
1870     /** Y3 button*/
1871     pad_y3 : 140,
1872     
1873     /** Z3 button*/
1874     pad_z3 : 141,
1875     
1876     /** X4 button*/
1877     pad_x4 : 142,
1878 
1879     /** Y4 button*/
1880     pad_y4 : 143,
1881     
1882     /** Z4 button*/
1883     pad_z4 : 144, 
1884 
1885 
1886     /** 
1887      * @function 
1888      * @description
1889      * A generic easing function. For more complex easing, see {@link mutator}.
1890      * @param {Number} Current Current value 
1891      * @param {Number} Destination End value 
1892      * @param {Number} Progress (Optional) Amount of percentage progression to that value. Default is .5f
1893      * @param {Number} Function (Optional) Base easing function. Default is linear. See {@link sandboxe.mutator.mutation}
1894      * @return {Number} New value that should replace current.
1895      */
1896     ease : __mutator_step
1897 
1898 };
1899 sandboxe.heap = __sandboxe_internal__heap;
1900 
1901 
1902 
1903 
1904 
1905