<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<link rel="stylesheet" href="../assets/css/cssgrids-min.css">
	<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
	<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
	<link rel="shortcut icon" type="image/png" href="../assets/favicon.ico">
	<script src="../assets/js/yui-min.js"></script>
	<title>nunuStudio Script</title>  
</head>
<body class="yui3-skin-sam">

<div id="doc">
	<div id="hd" class="yui3-g header">
		<div class="yui3-u-3-4">
				<h1><a href="../index.html"><img src="../assets/css/logo.png" title=""></a></h1>
		</div>
	</div>
	<div id="bd" class="yui3-g">
		<div class="yui3-u-1-4">
			<div id="docs-sidebar" class="sidebar apidocs">
				<div id="api-list">
					<h2 class="off-left">APIs</h2>
					<div id="api-tabview" class="tabview">
						<div id="api-tabview-filter">
							<input type="search" id="api-filter" placeholder="Type to filter APIs">
						</div>
						<ul class="tabs">
							<li><a href="#api-classes">Classes</a></li>
							<li><a href="#api-modules">Modules</a></li>
						</ul>
						<div id="api-tabview-panel">
							<ul id="api-classes" class="apis classes">
								<li><a href="../classes/AfterimagePass.html">AfterimagePass</a></li>
								<li><a href="../classes/AmbientLight.html">AmbientLight</a></li>
								<li><a href="../classes/AnimationMixer.html">AnimationMixer</a></li>
								<li><a href="../classes/AnimationTimer.html">AnimationTimer</a></li>
								<li><a href="../classes/ArraybufferUtils.html">ArraybufferUtils</a></li>
								<li><a href="../classes/Audio.html">Audio</a></li>
								<li><a href="../classes/AudioEmitter.html">AudioEmitter</a></li>
								<li><a href="../classes/AudioLoader.html">AudioLoader</a></li>
								<li><a href="../classes/Base64Utils.html">Base64Utils</a></li>
								<li><a href="../classes/BloomPass.html">BloomPass</a></li>
								<li><a href="../classes/BokehPass.html">BokehPass</a></li>
								<li><a href="../classes/BufferUtils.html">BufferUtils</a></li>
								<li><a href="../classes/ByteArrayUtils.html">ByteArrayUtils</a></li>
								<li><a href="../classes/CanvasSprite.html">CanvasSprite</a></li>
								<li><a href="../classes/CanvasTexture.html">CanvasTexture</a></li>
								<li><a href="../classes/CapsuleBufferGeometry.html">CapsuleBufferGeometry</a></li>
								<li><a href="../classes/ColorifyPass.html">ColorifyPass</a></li>
								<li><a href="../classes/CompressedTexture.html">CompressedTexture</a></li>
								<li><a href="../classes/Container.html">Container</a></li>
								<li><a href="../classes/CopyPass.html">CopyPass</a></li>
								<li><a href="../classes/CSS3DObject.html">CSS3DObject</a></li>
								<li><a href="../classes/CSS3DRenderer.html">CSS3DRenderer</a></li>
								<li><a href="../classes/CSS3DSprite.html">CSS3DSprite</a></li>
								<li><a href="../classes/CubeCamera.html">CubeCamera</a></li>
								<li><a href="../classes/CubeTexture.html">CubeTexture</a></li>
								<li><a href="../classes/DataTexture.html">DataTexture</a></li>
								<li><a href="../classes/DirectionalLight.html">DirectionalLight</a></li>
								<li><a href="../classes/DotScreenPass.html">DotScreenPass</a></li>
								<li><a href="../classes/EffectComposer.html">EffectComposer</a></li>
								<li><a href="../classes/EventManager.html">EventManager</a></li>
								<li><a href="../classes/FileSystem.html">FileSystem</a></li>
								<li><a href="../classes/FilmPass.html">FilmPass</a></li>
								<li><a href="../classes/FirstPersonControls.html">FirstPersonControls</a></li>
								<li><a href="../classes/Fog.html">Fog</a></li>
								<li><a href="../classes/Font.html">Font</a></li>
								<li><a href="../classes/FontLoader.html">FontLoader</a></li>
								<li><a href="../classes/FXAAPass.html">FXAAPass</a></li>
								<li><a href="../classes/Gamepad.html">Gamepad</a></li>
								<li><a href="../classes/GeometryLoader.html">GeometryLoader</a></li>
								<li><a href="../classes/Gyroscope.html">Gyroscope</a></li>
								<li><a href="../classes/HemisphereLight.html">HemisphereLight</a></li>
								<li><a href="../classes/HTMLView.html">HTMLView</a></li>
								<li><a href="../classes/HueSaturationPass.html">HueSaturationPass</a></li>
								<li><a href="../classes/Image.html">Image</a></li>
								<li><a href="../classes/ImageLoader.html">ImageLoader</a></li>
								<li><a href="../classes/InstancedMesh.html">InstancedMesh</a></li>
								<li><a href="../classes/Key.html">Key</a></li>
								<li><a href="../classes/Keyboard.html">Keyboard</a></li>
								<li><a href="../classes/LegacyGeometryLoader.html">LegacyGeometryLoader</a></li>
								<li><a href="../classes/LensFlare.html">LensFlare</a></li>
								<li><a href="../classes/LightProbe.html">LightProbe</a></li>
								<li><a href="../classes/LocalStorage.html">LocalStorage</a></li>
								<li><a href="../classes/Material.html">Material</a></li>
								<li><a href="../classes/MaterialLoader.html">MaterialLoader</a></li>
								<li><a href="../classes/MathUtils.html">MathUtils</a></li>
								<li><a href="../classes/Mesh.html">Mesh</a></li>
								<li><a href="../classes/Model.html">Model</a></li>
								<li><a href="../classes/Mouse.html">Mouse</a></li>
								<li><a href="../classes/Nunu.html">Nunu</a></li>
								<li><a href="../classes/NunuApp.html">NunuApp</a></li>
								<li><a href="../classes/Object3D.html">Object3D</a></li>
								<li><a href="../classes/ObjectLoader.html">ObjectLoader</a></li>
								<li><a href="../classes/ObjectUtils.html">ObjectUtils</a></li>
								<li><a href="../classes/OrbitControls.html">OrbitControls</a></li>
								<li><a href="../classes/OrthographicCamera.html">OrthographicCamera</a></li>
								<li><a href="../classes/ParticleDistributions.html">ParticleDistributions</a></li>
								<li><a href="../classes/ParticleEmitter.html">ParticleEmitter</a></li>
								<li><a href="../classes/ParticleEmitterControl.html">ParticleEmitterControl</a></li>
								<li><a href="../classes/ParticleEmitterControlOptions.html">ParticleEmitterControlOptions</a></li>
								<li><a href="../classes/ParticleGroup.html">ParticleGroup</a></li>
								<li><a href="../classes/Pass.html">Pass</a></li>
								<li><a href="../classes/PerspectiveCamera.html">PerspectiveCamera</a></li>
								<li><a href="../classes/PhysicsGenerator.html">PhysicsGenerator</a></li>
								<li><a href="../classes/PhysicsObject.html">PhysicsObject</a></li>
								<li><a href="../classes/PointLight.html">PointLight</a></li>
								<li><a href="../classes/PositionalAudio.html">PositionalAudio</a></li>
								<li><a href="../classes/Program.html">Program</a></li>
								<li><a href="../classes/RectAreaLight.html">RectAreaLight</a></li>
								<li><a href="../classes/RendererConfiguration.html">RendererConfiguration</a></li>
								<li><a href="../classes/RendererState.html">RendererState</a></li>
								<li><a href="../classes/RenderPass.html">RenderPass</a></li>
								<li><a href="../classes/Resource.html">Resource</a></li>
								<li><a href="../classes/ResourceManager.html">ResourceManager</a></li>
								<li><a href="../classes/RoundedBoxBufferGeometry.html">RoundedBoxBufferGeometry</a></li>
								<li><a href="../classes/Scene.html">Scene</a></li>
								<li><a href="../classes/Script.html">Script</a></li>
								<li><a href="../classes/ShaderAttribute.html">ShaderAttribute</a></li>
								<li><a href="../classes/ShaderPass.html">ShaderPass</a></li>
								<li><a href="../classes/ShaderUtils.html">ShaderUtils</a></li>
								<li><a href="../classes/Skeleton.html">Skeleton</a></li>
								<li><a href="../classes/SkinnedMesh.html">SkinnedMesh</a></li>
								<li><a href="../classes/Sky.html">Sky</a></li>
								<li><a href="../classes/SobelPass.html">SobelPass</a></li>
								<li><a href="../classes/SpineAnimation.html">SpineAnimation</a></li>
								<li><a href="../classes/SpineTexture.html">SpineTexture</a></li>
								<li><a href="../classes/SpotLight.html">SpotLight</a></li>
								<li><a href="../classes/Sprite.html">Sprite</a></li>
								<li><a href="../classes/SpriteSheetTexture.html">SpriteSheetTexture</a></li>
								<li><a href="../classes/SSAONOHPass.html">SSAONOHPass</a></li>
								<li><a href="../classes/SSAOPass.html">SSAOPass</a></li>
								<li><a href="../classes/SSAOShader.html">SSAOShader</a></li>
								<li><a href="../classes/TargetConfig.html">TargetConfig</a></li>
								<li><a href="../classes/TechnicolorPass.html">TechnicolorPass</a></li>
								<li><a href="../classes/TerrainBufferGeometry.html">TerrainBufferGeometry</a></li>
								<li><a href="../classes/TextBitmap.html">TextBitmap</a></li>
								<li><a href="../classes/TextFile.html">TextFile</a></li>
								<li><a href="../classes/TextMesh.html">TextMesh</a></li>
								<li><a href="../classes/TextSprite.html">TextSprite</a></li>
								<li><a href="../classes/Texture.html">Texture</a></li>
								<li><a href="../classes/TextureLoader.html">TextureLoader</a></li>
								<li><a href="../classes/Timer.html">Timer</a></li>
								<li><a href="../classes/TizenKeyboard.html">TizenKeyboard</a></li>
								<li><a href="../classes/Tree.html">Tree</a></li>
								<li><a href="../classes/TreeUtils.html">TreeUtils</a></li>
								<li><a href="../classes/TwistModifier.html">TwistModifier</a></li>
								<li><a href="../classes/TypedArrayHelper.html">TypedArrayHelper</a></li>
								<li><a href="../classes/UnitConverter.html">UnitConverter</a></li>
								<li><a href="../classes/UnrealBloomPass.html">UnrealBloomPass</a></li>
								<li><a href="../classes/Video.html">Video</a></li>
								<li><a href="../classes/VideoLoader.html">VideoLoader</a></li>
								<li><a href="../classes/VideoStream.html">VideoStream</a></li>
								<li><a href="../classes/VideoTexture.html">VideoTexture</a></li>
								<li><a href="../classes/Viewport.html">Viewport</a></li>
								<li><a href="../classes/WebcamTexture.html">WebcamTexture</a></li>
								<li><a href="../classes/WorkerPool.html">WorkerPool</a></li>
								<li><a href="../classes/WorkerTask.html">WorkerTask</a></li>
								<li><a href="../classes/{Object} ParticleGroupOptions.html">{Object} ParticleGroupOptions</a></li>
							</ul>
				
							<ul id="api-modules" class="apis modules">
								<li><a href="../modules/Animation.html">Animation</a></li>
								<li><a href="../modules/Animations.html">Animations</a></li>
								<li><a href="../modules/Audio.html">Audio</a></li>
								<li><a href="../modules/BinaryUtils.html">BinaryUtils</a></li>
								<li><a href="../modules/Cameras.html">Cameras</a></li>
								<li><a href="../modules/Controls.html">Controls</a></li>
								<li><a href="../modules/Core.html">Core</a></li>
								<li><a href="../modules/Files.html">Files</a></li>
								<li><a href="../modules/Input.html">Input</a></li>
								<li><a href="../modules/Lights.html">Lights</a></li>
								<li><a href="../modules/Loaders.html">Loaders</a></li>
								<li><a href="../modules/Meshes.html">Meshes</a></li>
								<li><a href="../modules/Misc.html">Misc</a></li>
								<li><a href="../modules/Particles.html">Particles</a></li>
								<li><a href="../modules/Physics.html">Physics</a></li>
								<li><a href="../modules/Postprocessing.html">Postprocessing</a></li>
								<li><a href="../modules/Resources.html">Resources</a></li>
								<li><a href="../modules/Runtime.html">Runtime</a></li>
								<li><a href="../modules/Script.html">Script</a></li>
								<li><a href="../modules/Sprite.html">Sprite</a></li>
								<li><a href="../modules/Textures.html">Textures</a></li>
								<li><a href="../modules/THREE.html">THREE</a></li>
								<li><a href="../modules/Utils.html">Utils</a></li>
							</ul>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="yui3-u-3-4">
			<!--<div id="api-options">
				Show:
				<label for="api-show-inherited">
					<input type="checkbox" id="api-show-inherited" checked>
					Inherited
				</label>
				<label for="api-show-protected">
					<input type="checkbox" id="api-show-protected">
					Protected
				</label>
				<label for="api-show-private">
					<input type="checkbox" id="api-show-private">
					Private
				</label>
				<label for="api-show-deprecated">
					<input type="checkbox" id="api-show-deprecated">
					Deprecated
				</label>
			</div>-->			<div class="apidocs">
				<div id="docs-main">
					<div class="content">
						<h1>Script Class</h1>
						<div class="box meta">
						
								<div class="extends">
									Extends Object
								</div>
						
						
									Module: <a href="../modules/Script.html">Script</a>
						
						</div>
						
						
						<div class="box intro">
							<p>Script objects are used to control other objects present in the scene.</p>
						<p>These scripts can access everything inside of the program where they are running they should be used to control logic aspect of the application.</p>
						<p>Its possible to extend these scripts by using libraries that can be imported using the include() function provided. Libraries can be stored locally on the project or loaded from remote sources.</p>
						
						</div>
						
						
						<div id="classdocs" class="tabview">
							<ul class="api-class-tabs">
								<li class="api-class-tab index"><a href="#index">Index</a></li>
						
									<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
									<li class="api-class-tab properties"><a href="#properties">Properties</a></li>
									<li class="api-class-tab attrs"><a href="#attrs">Attributes</a></li>
							</ul>
						
							<div>
								<div id="index" class="api-class-tabpanel index">
									<h2 class="off-left">Item Index</h2>
						
										<div class="index-section methods">
											<h3>Methods</h3>
						
											<ul class="index-list methods extends">
													<li class="index-item method">
														<a href="#method_appData">appData</a>
						
													</li>
													<li class="index-item method">
														<a href="#method_compileCode">compileCode</a>
						
													</li>
													<li class="index-item method">
														<a href="#method_dispose">dispose</a>
						
													</li>
													<li class="index-item method">
														<a href="#method_getIncludes">getIncludes</a>
						
															<span class="flag static">static</span>
													</li>
													<li class="index-item method">
														<a href="#method_include">include</a>
						
													</li>
													<li class="index-item method">
														<a href="#method_initialize">initialize</a>
						
													</li>
													<li class="index-item method">
														<a href="#method_removeIncludes">removeIncludes</a>
						
															<span class="flag static">static</span>
													</li>
													<li class="index-item method">
														<a href="#method_resize">resize</a>
						
													</li>
													<li class="index-item method">
														<a href="#method_update">update</a>
						
													</li>
											</ul>
										</div>
						
										<div class="index-section properties">
											<h3>Properties</h3>
						
											<ul class="index-list properties extends">
													<li class="index-item property">
														<a href="#property_code">code</a>
						
													</li>
													<li class="index-item property">
														<a href="#property_mode">mode</a>
						
													</li>
													<li class="index-item property">
														<a href="#property_program">program</a>
						
													</li>
													<li class="index-item property">
														<a href="#property_scene">scene</a>
						
													</li>
											</ul>
										</div>
						
										<div class="index-section attrs">
											<h3>Attributes</h3>
						
											<ul class="index-list attrs extends">
													<li class="index-item attr">
														<a href="#attr_APPEND">APPEND</a>
													</li>
													<li class="index-item attr">
														<a href="#attr_DEFAULT">DEFAULT</a>
													</li>
													<li class="index-item attr">
														<a href="#attr_EVALUATE">EVALUATE</a>
													</li>
													<li class="index-item attr">
														<a href="#attr_INCLUDE">INCLUDE</a>
													</li>
													<li class="index-item attr">
														<a href="#attr_includeRegex">includeRegex</a>
													</li>
													<li class="index-item attr">
														<a href="#attr_METHODS">METHODS</a>
													</li>
													<li class="index-item attr">
														<a href="#attr_script">script</a>
													</li>
											</ul>
										</div>
						
								</div>
						
									<div id="methods" class="api-class-tabpanel">
										<h2 class="off-left">Methods</h2>
						
											<div id="method_appData" class="method item">
												<h3 class="name"><code>appData</code></h3>
											
													<div class="args">
														<span class="paren">(</span><ul class="args-list inline commas">
															<li class="arg">
																	<code>data</code>
															</li>
														</ul><span class="paren">)</span>
													</div>
											
											
											
											
											
											
											
											
												<div class="meta">
															<p>
													</p>
											
											
											
												</div>
											
												<div class="description">
													<p>Call onAppData if available.</p>
											<p>Called automatically every time external data is passed to the runtime.</p>
											
												</div>
											
													<div class="params">
														<h4>Parameters:</h4>
											
														<ul class="params-list">
															<li class="param">
																	<code class="param-name">data</code>
																	<span class="type">Object</span>
											
											
																<div class="param-description">
																	 
																</div>
											
															</li>
														</ul>
													</div>
											
											
											</div>
											<div id="method_compileCode" class="method item">
												<h3 class="name"><code>compileCode</code></h3>
											
													<div class="args">
														<span class="paren">(</span><ul class="args-list inline commas">
															<li class="arg">
																	<code>code</code>
															</li>
															<li class="arg">
																	<code>onReady</code>
															</li>
														</ul><span class="paren">)</span>
													</div>
											
											
											
											
											
											
											
											
												<div class="meta">
															<p>
													</p>
											
											
											
												</div>
											
												<div class="description">
													<p>Prepare the script code to be run. The script can be prepared using different methods depending on the include mode defined.</p>
											<p>Can be used to dinamically change the script code. However it is not recommended can lead to undefined behavior.</p>
											
												</div>
											
													<div class="params">
														<h4>Parameters:</h4>
											
														<ul class="params-list">
															<li class="param">
																	<code class="param-name">code</code>
																	<span class="type">String</span>
											
											
																<div class="param-description">
																	 
																</div>
											
															</li>
															<li class="param">
																	<code class="param-name">onReady</code>
																	<span class="type">Function</span>
											
											
																<div class="param-description">
																	<p>Funtion called when the code is ready.</p>
											
																</div>
											
															</li>
														</ul>
													</div>
											
											
											</div>
											<div id="method_dispose" class="method item">
												<h3 class="name"><code>dispose</code></h3>
											
													<span class="paren">()</span>
											
											
											
											
											
											
											
											
												<div class="meta">
															<p>
													</p>
											
											
											
												</div>
											
												<div class="description">
													<p>Disposes the script, can be used to clear resources when the program exits.</p>
											<p>Calls the script dispose method if it exists.</p>
											
												</div>
											
											
											
											</div>
											<div id="method_getIncludes" class="method item">
												<h3 class="name"><code>getIncludes</code></h3>
											
													<div class="args">
														<span class="paren">(</span><ul class="args-list inline commas">
															<li class="arg">
																	<code>code</code>
															</li>
														</ul><span class="paren">)</span>
													</div>
											
											
											
											
											
													<span class="flag static">static</span>
											
											
											
												<div class="meta">
															<p>
													</p>
											
											
											
												</div>
											
												<div class="description">
													<p>Get includes from the code, includes are fetched from the resource manager or if not found fetched using XHR.</p>
											<p>Used to extract includes from code when loading libraries in APPEND mode.</p>
											
												</div>
											
													<div class="params">
														<h4>Parameters:</h4>
											
														<ul class="params-list">
															<li class="param">
																	<code class="param-name">code</code>
																	<span class="type">String</span>
											
											
																<div class="param-description">
																	<p>Script code.</p>
											
																</div>
											
															</li>
														</ul>
													</div>
											
											
											</div>
											<div id="method_include" class="method item">
												<h3 class="name"><code>include</code></h3>
											
													<div class="args">
														<span class="paren">(</span><ul class="args-list inline commas">
															<li class="arg">
																	<code>name</code>
															</li>
														</ul><span class="paren">)</span>
													</div>
											
											
											
											
											
											
											
											
												<div class="meta">
															<p>
													</p>
											
											
											
												</div>
											
												<div class="description">
													<p>Auxiliar function to include javascript source file from resource into the script.</p>
											<p>The imported source is evaluated and loaded in the context of the script.</p>
											<p>Global declarations need to be cleaned using the dipose method.</p>
											
												</div>
											
													<div class="params">
														<h4>Parameters:</h4>
											
														<ul class="params-list">
															<li class="param">
																	<code class="param-name">name</code>
																	<span class="type">String</span>
											
											
																<div class="param-description">
																	<p>Javascript resource name.</p>
											
																</div>
											
															</li>
														</ul>
													</div>
											
											
											</div>
											<div id="method_initialize" class="method item">
												<h3 class="name"><code>initialize</code></h3>
											
													<span class="paren">()</span>
											
											
											
											
											
											
											
											
												<div class="meta">
															<p>
													</p>
											
											
											
												</div>
											
												<div class="description">
													<p>Initialize script. Automatically called by the runtime.</p>
											<p>Compiles the script code and calls the script initialize method if it exists after the code is compiled.</p>
											
												</div>
											
											
											
											</div>
											<div id="method_removeIncludes" class="method item">
												<h3 class="name"><code>removeIncludes</code></h3>
											
													<div class="args">
														<span class="paren">(</span><ul class="args-list inline commas">
															<li class="arg">
																	<code>code</code>
															</li>
														</ul><span class="paren">)</span>
													</div>
											
											
											
											
											
													<span class="flag static">static</span>
											
											
											
												<div class="meta">
															<p>
													</p>
											
											
											
												</div>
											
												<div class="description">
													<p>Remove includes from code.</p>
											<p>Used to remove include statements when initializing code in APPEND mode.</p>
											
												</div>
											
													<div class="params">
														<h4>Parameters:</h4>
											
														<ul class="params-list">
															<li class="param">
																	<code class="param-name">code</code>
																	<span class="type">String</span>
											
											
																<div class="param-description">
																	<p>Script code.</p>
											
																</div>
											
															</li>
														</ul>
													</div>
											
											
											</div>
											<div id="method_resize" class="method item">
												<h3 class="name"><code>resize</code></h3>
											
													<span class="paren">()</span>
											
											
											
											
											
											
											
											
												<div class="meta">
															<p>
													</p>
											
											
											
												</div>
											
												<div class="description">
													<p>Call resize method if available.</p>
											<p>The resize method receives width and height as arguments.</p>
											
												</div>
											
											
											
											</div>
											<div id="method_update" class="method item">
												<h3 class="name"><code>update</code></h3>
											
													<span class="paren">()</span>
											
											
											
											
											
											
											
											
												<div class="meta">
															<p>
													</p>
											
											
											
												</div>
											
												<div class="description">
													<p>Update script state automatically calls for mouse events if they are defined and for the script update method.</p>
											<p>This method is executed every frame, script logic should not relly on the frame time, use the &quot;delta&quot; value provided.</p>
											
												</div>
											
											
											
											</div>
									</div>
						
									<div id="properties" class="api-class-tabpanel">
										<h2 class="off-left">Properties</h2>
						
											<div id="property_code" class="property item">
												<h3 class="name"><code>code</code></h3>
												<span class="type">String</span>
											
											
											
											
											
												<div class="meta">
															<p>
													</p>
											
											
												</div>
											
												<div class="description">
													<p>Javascript code attached to the script.</p>
											<p>It can access and change every object in the program and supports some events</p>
											<ul>
											<li>initialize
											<ul>
											<li>Called on app initialization, its called after all children elements are initialized, its safe to apply operations on other objects inside this method.</li>
											</ul>
											</li>
											<li>update(delta)
											<ul>
											<li>Called on every frame after rendering</li>
											</ul>
											</li>
											<li>dispose
											<ul>
											<li>Called when disposing the program</li>
											</ul>
											</li>
											<li>onMouseOver(intersections)
											<ul>
											<li>Called on every frame if mouse is on top of one of the script children</li>
											<li>Receives an intersections array as argument.</li>
											</ul>
											</li>
											<li>onResize(x, y)
											<ul>
											<li>Called every time the window is resized</li>
											<li>Receives width and height as parameters</li>
											</ul>
											</li>
											<li>onAppData(data)
											<ul>
											<li>Called when receiving data sent by the host website</li>
											</ul>
											</li>
											</ul>
											<p>Code written inside scripts have access to the following attributes:</p>
											<ul>
											<li>scene</li>
											<li>program</li>
											<li>self
											<ul>
											<li>Same as this reference but global in the script scope</li>
											</ul>
											</li>
											<li>Keyboard</li>
											<li>Mouse</li>
											</ul>
											<p>There is also access to the following functions</p>
											<ul>
											<li>include
											<ul>
											<li>Include a javascript file from resources, when including files the user needs to be carefull and clear manually global declarations. The access to this method may be restricted depeding on the include mode</li>
											</ul>
											</li>
											</ul>
											
												</div>
											
											
											
											</div>
											<div id="property_mode" class="property item">
												<h3 class="name"><code>mode</code></h3>
												<span class="type">Number</span>
											
											
											
											
											
												<div class="meta">
															<p>
													</p>
											
											
												</div>
											
												<div class="description">
													<p>Mode indicates how to include external javascripts files into the script.</p>
											<p>Can be APPEND, EVALUATE or INCLUDE.</p>
											<p>APPEND mode with append the library code to the script code, when running in this mode the include method cannot be used during runtime</p>
											<p>EVALUATE node with evaluate the library code during runtime, include method may still be used.</p>
											<p>INCLUDE mode will include the file as a global script, these libraries are not unloaded after the script or application is terminated.</p>
											
												</div>
											
											
											
											</div>
											<div id="property_program" class="property item">
												<h3 class="name"><code>program</code></h3>
												<span class="type"><a href="../classes/Program.html" class="crosslink">Program</a></span>
											
											
											
											
											
												<div class="meta">
															<p>
													</p>
											
											
												</div>
											
												<div class="description">
													<p>Reference to the program object.</p>
											<p>Can be used to access other scenes, get resources and objects.</p>
											
												</div>
											
											
											
											</div>
											<div id="property_scene" class="property item">
												<h3 class="name"><code>scene</code></h3>
												<span class="type"><a href="../classes/Scene.html" class="crosslink">Scene</a></span>
											
											
											
											
											
												<div class="meta">
															<p>
													</p>
											
											
												</div>
											
												<div class="description">
													<p>Reference to the scene where the script is placed.</p>
											<p>Can be used to interact with other objects.</p>
											
												</div>
											
											
											
											</div>
									</div>
						
									<div id="attrs" class="api-class-tabpanel">
										<h2 class="off-left">Attributes</h2>
						
											<div id="attr_APPEND" class="attr item">
												<a name="config_APPEND"></a> 
												<h3 class="name"><code>APPEND</code></h3>
												<span class="type">Number</span>
											
											
											
											
											
											
											
											
												<div class="meta">
															<p>
													</p>
											
											
												</div>
											
												<div class="description">
													<p>Append libraries on initialization.</p>
											<p>Libraries are appended to the script code on initialization.</p>
											
												</div>
											
											
											
											</div>
											<div id="attr_DEFAULT" class="attr item">
												<a name="config_DEFAULT"></a> 
												<h3 class="name"><code>DEFAULT</code></h3>
												<span class="type">String</span>
											
											
											
											
											
											
											
											
												<div class="meta">
															<p>
													</p>
											
											
												</div>
											
												<div class="description">
													<p>Default script code used when creating a new Script.</p>
											
												</div>
											
											
											
											</div>
											<div id="attr_EVALUATE" class="attr item">
												<a name="config_EVALUATE"></a> 
												<h3 class="name"><code>EVALUATE</code></h3>
												<span class="type">Number</span>
											
											
											
											
											
											
											
											
												<div class="meta">
															<p>
													</p>
											
											
												</div>
											
												<div class="description">
													<p>Evaluate libs during runtime.</p>
											<p>This allows to load new libs during runtime, but its not possible to access private statements.</p>
											
												</div>
											
											
											
											</div>
											<div id="attr_INCLUDE" class="attr item">
												<a name="config_INCLUDE"></a> 
												<h3 class="name"><code>INCLUDE</code></h3>
												<span class="type">Number</span>
											
											
											
											
											
											
											
											
												<div class="meta">
															<p>
													</p>
											
											
												</div>
											
												<div class="description">
													<p>Include file into the document.body.</p>
											<p>This imports the JS file as any other file included into a <script> tag.</p>
											
												</div>
											
											
											
											</div>
											<div id="attr_includeRegex" class="attr item">
												<a name="config_includeRegex"></a> 
												<h3 class="name"><code>includeRegex</code></h3>
												<span class="type">RegExp</span>
											
											
											
											
											
											
											
											
												<div class="meta">
															<p>
													</p>
											
											
												</div>
											
												<div class="description">
													<p>Regular expression to obtain all the include calls placed inside of scripts.</p>
											
												</div>
											
											
											
											</div>
											<div id="attr_METHODS" class="attr item">
												<a name="config_METHODS"></a> 
												<h3 class="name"><code>METHODS</code></h3>
												<span class="type">Array</span>
											
											
											
											
											
											
											
											
												<div class="meta">
															<p>
													</p>
											
											
												</div>
											
												<div class="description">
													<p>List of default methods that can be implemented by scripts.</p>
											<p>This list is used to search for these implementations in the script object at runtime.</p>
											
												</div>
											
											
											
											</div>
											<div id="attr_script" class="attr item">
												<a name="config_script"></a> 
												<h3 class="name"><code>script</code></h3>
												<span class="type">Function</span>
											
											
											
											
											
											
											
											
												<div class="meta">
															<p>
													</p>
											
											
												</div>
											
												<div class="description">
													<p>Compiled function used during runtime.</p>
											<p>This varible gets created using the compileCode() function called automatically on initalization.</p>
											
												</div>
											
											
											
											</div>
									</div>
						
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>