aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/document/html-document.js16
-rwxr-xr-xjs/helper-classes/RDGE/precompiled.js17
-rwxr-xr-xjs/helper-classes/RDGE/rdge-compiled.js777
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/MeshManager.js131
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/RenderInitProcs.js476
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/RenderProcs.js787
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/ScreenQuad.js32
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/ShaderManager.js124
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/TextureManager.js6
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/animation.js191
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/box.js181
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/camera.js468
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/engine.js417
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/fx/blur.js283
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/fx/ssao.js211
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/init_state.js249
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/input.js117
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/jpass.js771
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/jshader.js272
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/lightmanager.js148
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/math/mat4.js1085
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/math/quat.js237
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/math/vec2.js229
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/math/vec3.js423
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/math/vec4.js315
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/objectManager.js8
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/particle.js1591
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/precompiled.js123
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/renderUtils.js644
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/rendercontext.js451
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/renderer.js2310
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/run_state.js275
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/runtime.js280
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/scenegraph.js1754
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/scenegraphNodes.js463
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/shadowLight.js90
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/sockets.js243
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/ubershader.js159
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/util/dbgpanel.js237
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/util/fpsTracker.js51
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/util/statTracker.js338
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/utilities.js110
-rw-r--r--js/helper-classes/RDGE/src/tools/compile-rdge-core.bat1
-rw-r--r--js/helper-classes/RDGE/src/tools/compile-rdge-core.sh1
-rw-r--r--js/io/system/ninjalibrary.json2
-rwxr-xr-xjs/lib/drawing/world.js290
-rwxr-xr-xjs/lib/geom/brush-stroke.js12
-rwxr-xr-xjs/lib/geom/circle.js102
-rwxr-xr-xjs/lib/geom/geom-obj.js442
-rwxr-xr-xjs/lib/geom/line.js74
-rwxr-xr-xjs/lib/geom/rectangle.js118
-rw-r--r--js/lib/geom/shape-primitive.js4
-rwxr-xr-xjs/lib/rdge/materials/bump-metal-material.js64
-rw-r--r--js/lib/rdge/materials/cloud-material.js377
-rw-r--r--js/lib/rdge/materials/deform-material.js88
-rwxr-xr-xjs/lib/rdge/materials/flat-material.js141
-rw-r--r--js/lib/rdge/materials/fly-material.js9
-rw-r--r--js/lib/rdge/materials/julia-material.js8
-rw-r--r--js/lib/rdge/materials/keleidoscope-material.js8
-rwxr-xr-xjs/lib/rdge/materials/linear-gradient-material.js426
-rw-r--r--js/lib/rdge/materials/mandel-material.js8
-rwxr-xr-xjs/lib/rdge/materials/material-parser.js81
-rwxr-xr-xjs/lib/rdge/materials/material.js15
-rw-r--r--js/lib/rdge/materials/plasma-material.js12
-rw-r--r--js/lib/rdge/materials/pulse-material.js68
-rw-r--r--js/lib/rdge/materials/radial-blur-material.js414
-rwxr-xr-xjs/lib/rdge/materials/radial-gradient-material.js438
-rw-r--r--js/lib/rdge/materials/relief-tunnel-material.js132
-rw-r--r--js/lib/rdge/materials/square-tunnel-material.js133
-rw-r--r--js/lib/rdge/materials/star-material.js133
-rw-r--r--js/lib/rdge/materials/taper-material.js401
-rw-r--r--js/lib/rdge/materials/tunnel-material.js79
-rw-r--r--js/lib/rdge/materials/twist-material.js161
-rw-r--r--js/lib/rdge/materials/twist-vert-material.js448
-rwxr-xr-xjs/lib/rdge/materials/uber-material.js1560
-rw-r--r--js/lib/rdge/materials/water-material.js275
-rw-r--r--js/lib/rdge/materials/z-invert-material.js132
-rw-r--r--js/mediators/io-mediator.js1096
78 files changed, 10813 insertions, 14030 deletions
diff --git a/js/document/html-document.js b/js/document/html-document.js
index 42a7d537..e96c9943 100755
--- a/js/document/html-document.js
+++ b/js/document/html-document.js
@@ -212,7 +212,7 @@ exports.HTMLDocument = Montage.create(TextDocument, {
212 { 212 {
213 /* 213 /*
214 // Use this code to test the runtime version of WebGL 214 // Use this code to test the runtime version of WebGL
215 var cdm = new CanvasDataManager(); 215 var cdm = new NinjaCvsRt.CanvasDataManager();
216 cdm.loadGLData(elt, value, null ); 216 cdm.loadGLData(elt, value, null );
217 */ 217 */
218 218
@@ -276,13 +276,6 @@ exports.HTMLDocument = Montage.create(TextDocument, {
276 var world = new GLWorld( canvas, useWebGL ); 276 var world = new GLWorld( canvas, useWebGL );
277 world.importJSON( jObj ); 277 world.importJSON( jObj );
278 } 278 }
279 else
280 {
281 var index = importStr.indexOf( "webGL: " );
282 var useWebGL = (index >= 0);
283 var world = new GLWorld( canvas, useWebGL );
284 world.import( importStr );
285 }
286 279
287 this.buildShapeModel( canvas.elementModel, world ); 280 this.buildShapeModel( canvas.elementModel, world );
288 } 281 }
@@ -432,7 +425,6 @@ exports.HTMLDocument = Montage.create(TextDocument, {
432 if (elt.elementModel && elt.elementModel.shapeModel && elt.elementModel.shapeModel.GLWorld) 425 if (elt.elementModel && elt.elementModel.shapeModel && elt.elementModel.shapeModel.GLWorld)
433 { 426 {
434 var data = elt.elementModel.shapeModel.GLWorld.exportJSON(); 427 var data = elt.elementModel.shapeModel.GLWorld.exportJSON();
435 //var data = elt.elementModel.shapeModel.GLWorld.export();
436 dataArray.push( data ); 428 dataArray.push( data );
437 } 429 }
438 430
@@ -877,11 +869,7 @@ exports.HTMLDocument = Montage.create(TextDocument, {
877 //TODO: Add logic to handle save before preview 869 //TODO: Add logic to handle save before preview
878 this.application.ninja.documentController.handleExecuteSaveAll(null); 870 this.application.ninja.documentController.handleExecuteSaveAll(null);
879 //Temp check for webGL Hack 871 //Temp check for webGL Hack
880 if (this.application.ninja.documentController.activeDocument.glData.length && this.application.ninja.documentController.activeDocument.glData.length > 1) {//TODO: Should be 0, temp hack fix 872 window.open(this.application.ninja.coreIoApi.rootUrl + this.application.ninja.documentController._activeDocument.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]);
881 setTimeout(function () {window.open(this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController._activeDocument.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]);}.bind(this), 3500);
882 } else {
883 window.open(this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController._activeDocument.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]);
884 }
885 //chrome.tabs.create({url: this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController._activeDocument.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]}); 873 //chrome.tabs.create({url: this.application.ninja.coreIoApi.rootUrl+this.application.ninja.documentController._activeDocument.uri.split(this.application.ninja.coreIoApi.cloudData.root)[1]});
886 } 874 }
887 }, 875 },
diff --git a/js/helper-classes/RDGE/precompiled.js b/js/helper-classes/RDGE/precompiled.js
deleted file mode 100755
index 7932444c..00000000
--- a/js/helper-classes/RDGE/precompiled.js
+++ /dev/null
@@ -1,17 +0,0 @@
1/* <copyright>
2This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4(c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5</copyright> */
6
7/*
8 * A list of shared parameters that all shaders can support (the engine always try to bind these uniforms)
9 * These parameters are compiled into all jshaders and can be set from any jshader
10 * with a call to jshader.global.u_matDiffuse.set([1,0,0,1]) if the jshader depends on that parameter.
11 * To set directly call rdgeGlobalParameters.'param'.set(x), for example rdgeGlobalParameters.u_lightPos.set([1,1,1])
12 * The values can be added to a jshaders params list - this will creating local jshader memory that binds to the parameter
13