aboutsummaryrefslogtreecommitdiff
path: root/js/helper-classes
diff options
context:
space:
mode:
Diffstat (limited to 'js/helper-classes')
-rwxr-xr-xjs/helper-classes/3D/draw-utils.js140
-rwxr-xr-xjs/helper-classes/3D/math-utils.js5
-rwxr-xr-xjs/helper-classes/3D/snap-manager.js12
-rwxr-xr-xjs/helper-classes/3D/vec-utils.js71
-rwxr-xr-xjs/helper-classes/RDGE/rdge-compiled.js64
-rw-r--r--js/helper-classes/RDGE/runtime/CanvasDataManager.js98
-rw-r--r--js/helper-classes/RDGE/runtime/GLRuntime.js159
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/MeshManager.js2
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/engine.js15
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/fx/ssao.js2
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/init_state.js12
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/jshader.js8
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/renderer.js1
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/run_state.js16
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/scenegraphNodes.js2
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/utilities.js4
-rw-r--r--js/helper-classes/RDGE/src/tools/compile-rdge-core.bat4
-rw-r--r--js/helper-classes/RDGE/src/tools/compile-rdge-core.sh3
-rw-r--r--js/helper-classes/RDGE/src/tools/compiler.jarbin4927265 -> 0 bytes
-rw-r--r--js/helper-classes/RDGE/src/tools/rdge-compiled.js452
-rwxr-xr-xjs/helper-classes/backup-delete/GLAnchorPoint.js168
-rwxr-xr-xjs/helper-classes/backup-delete/GLBrushStroke.js397
-rwxr-xr-xjs/helper-classes/backup-delete/GLCircle.js710
-rwxr-xr-xjs/helper-classes/backup-delete/GLGeomObj.js278
-rwxr-xr-xjs/helper-classes/backup-delete/GLLight.js30
-rwxr-xr-xjs/helper-classes/backup-delete/GLLine.js507
-rwxr-xr-xjs/helper-classes/backup-delete/GLMaterial.js308
-rwxr-xr-xjs/helper-classes/backup-delete/GLPath.js232
-rwxr-xr-xjs/helper-classes/backup-delete/GLRectangle.js1236
-rwxr-xr-xjs/helper-classes/backup-delete/GLSubpath.js1185
-rwxr-xr-xjs/helper-classes/backup-delete/GLWorld.js1014
-rwxr-xr-xjs/helper-classes/backup-delete/Materials/BumpMetalMaterial.js302
-rw-r--r--js/helper-classes/backup-delete/Materials/DeformMaterial.js133
-rwxr-xr-xjs/helper-classes/backup-delete/Materials/FlatMaterial.js161
-rw-r--r--js/helper-classes/backup-delete/Materials/FlyMaterial.js133
-rw-r--r--js/helper-classes/backup-delete/Materials/JuliaMaterial.js150
-rw-r--r--js/helper-classes/backup-delete/Materials/KeleidoscopeMaterial.js149
-rwxr-xr-xjs/helper-classes/backup-delete/Materials/LinearGradientMaterial.js379
-rw-r--r--js/helper-classes/backup-delete/Materials/MandelMaterial.js151
-rw-r--r--js/helper-classes/backup-delete/Materials/PlasmaMaterial.js134
-rw-r--r--js/helper-classes/backup-delete/Materials/PulseMaterial.js263
-rw-r--r--js/helper-classes/backup-delete/Materials/RadialBlurMaterial.js257
-rwxr-xr-xjs/helper-classes/backup-delete/Materials/RadialGradientMaterial.js303
-rw-r--r--js/helper-classes/backup-delete/Materials/ReliefTunnelMaterial.js133
-rw-r--r--js/helper-classes/backup-delete/Materials/SquareTunnelMaterial.js133
-rw-r--r--js/helper-classes/backup-delete/Materials/StarMaterial.js133
-rw-r--r--js/helper-classes/backup-delete/Materials/TaperMaterial.js223
-rw-r--r--js/helper-classes/backup-delete/Materials/TunnelMaterial.js133
-rw-r--r--js/helper-classes/backup-delete/Materials/TwistMaterial.js149
-rw-r--r--js/helper-classes/backup-delete/Materials/TwistVertMaterial.js248
-rwxr-xr-xjs/helper-classes/backup-delete/Materials/UberMaterial.js673
-rw-r--r--js/helper-classes/backup-delete/Materials/WaterMaterial.js133
-rw-r--r--js/helper-classes/backup-delete/Materials/ZInvertMaterial.js133
-rwxr-xr-xjs/helper-classes/backup-delete/MaterialsLibrary.js230
-rwxr-xr-xjs/helper-classes/backup-delete/ParseUtils.js84
-rwxr-xr-xjs/helper-classes/backup-delete/glUtils.js319
56 files changed, 196 insertions, 12178 deletions
diff --git a/js/helper-classes/3D/draw-utils.js b/js/helper-classes/3D/draw-utils.js
index 63e7799a..1c00f7ea 100755
--- a/js/helper-classes/3D/draw-utils.js
+++ b/js/helper-classes/3D/draw-utils.js
@@ -139,8 +139,8 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
139 handleCloseDocument:{ 139 handleCloseDocument:{
140 value: function() { 140 value: function() {
141 if(this.application.ninja.documentController._documents.length === 0){ 141 if(this.application.ninja.documentController._documents.length === 0){
142 this._eltArray = []; 142 this._eltArray = null;
143 this._planesArray = []; 143 this._planesArray = null;
144 } 144 }
145 } 145 }
146 }, 146 },
@@ -721,8 +721,17 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
721 drawSelectionBounds : { 721 drawSelectionBounds : {
722 value: function( eltArray ) { 722 value: function( eltArray ) {
723 this._selectionCtr = null; 723 this._selectionCtr = null;
724 var len = eltArray.length,
725 i,
726 j,
727 bounds,
728 bounds3D,
729 pt,
730 tmpPt,
731 ssMat,
732 elt;
724 733
725 if (eltArray.length == 0) return; 734 if (len === 0) return;
726 var context = this._drawingContext; 735 var context = this._drawingContext;
727 if (!context) return; 736 if (!context) return;
728 737
@@ -731,18 +740,19 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
731 context.lineWidth = 2; 740 context.lineWidth = 2;
732 741
733 // handle the single element case 742 // handle the single element case
734 if (eltArray.length == 1) 743 // TODO - Currently, the stage draws its own selection bounds for single selection case
744 if (len === 1)
735 { 745 {
736 // single selection case 746 // single selection case
737 //console.log( "single selection" ); 747 //console.log( "single selection" );
738 748
739 var elt = eltArray[0]; 749 elt = eltArray[0];
740 750
741 this.viewUtils.pushViewportObj( elt ); 751 this.viewUtils.pushViewportObj( elt );
742 752
743 // get the element bounds in world space 753 // get the element bounds in world space
744 var bounds3D = this.viewUtils.getElementViewBounds3D( elt ); 754 bounds3D = this.viewUtils.getElementViewBounds3D( elt );
745 for (var j=0; j<4; j++) { 755 for (j=0; j<4; j++) {
746 bounds3D[j] = this.viewUtils.localToGlobal( bounds3D[j], elt ); 756 bounds3D[j] = this.viewUtils.localToGlobal( bounds3D[j], elt );
747 } 757 }
748 758
@@ -766,19 +776,12 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
766 } 776 }
767 else 777 else
768 { 778 {
769 // the multiple selection case.
770 //console.log( "multiple selection" );
771
772 // we set the root to "the world".
773 var saveRoot = this.viewUtils.getRootElement();
774 this.viewUtils.setRootElement( this.viewUtils.getStageElement() );
775
776 // get the plane from the first element to compare against the other elements 779 // get the plane from the first element to compare against the other elements
777 var flat = true; 780 var flat = true;
778 var plane = this.viewUtils.getElementPlane( eltArray[0] ); 781 var plane = this.viewUtils.getElementPlane( eltArray[0] );
779 for (var i=1; i<eltArray.length; i++) 782 for (i=1; i<len; i++)
780 { 783 {
781 var elt = eltArray[i]; 784 elt = eltArray[i];
782 var plane2 = this.viewUtils.getElementPlane( elt ); 785 var plane2 = this.viewUtils.getElementPlane( elt );
783 var dot = MathUtils.dot3(plane,plane2); 786 var dot = MathUtils.dot3(plane,plane2);
784 if (MathUtils.fpCmp(dot, 1) != 0) 787 if (MathUtils.fpCmp(dot, 1) != 0)
@@ -796,34 +799,23 @@ var DrawUtils = exports.DrawUtils = Montage.create(Component, {
796 } 799 }
797 } 800 }
798 801
799 // construct a matrix from world space to 'plane' space
800 var ptOnPlane = this.viewUtils.localToGlobal( [0,0,0], eltArray[0]);
801 var planeToWorld = this.getPlaneToWorldMatrix( plane, ptOnPlane );
802 //var worldToPlane = planeToWorld.inverse();
803 var worldToPlane = glmat4.inverse(planeToWorld, []);
804
805 var ssMat = this.viewUtils.getLocalToGlobalMatrix( this._sourceSpaceElt );
806 // if all the elements share the same plane, draw the 2D rectangle 802 // if all the elements share the same plane, draw the 2D rectangle
807 if (flat) 803 if (flat)
808 { 804 {
809 // make a 2D rectangle on the plane 805 // make a 2D rectangle on the plane
810 var rect; 806 var rect;
811 for (var i=0; i<eltArray.length; i++) 807 for (i=0; i<len; i++)
812 { 808 {
813 var elt = eltArray[i]; 809 elt = eltArray[i];
814 810
815 // get the element bounds in 'plane' space 811 // get the element bounds in 'plane' space
816 var bounds = this.viewUtils.getElementViewBounds3D( elt ); 812 bounds = this.viewUtils.getElementViewBounds3D( elt );
817 for (var j=0; j<4; j++) 813 ssMat = this.viewUtils.getLocalToGlobalMatrix( elt );
814 for (j=0; j<4; j++)
818 { 815 {
819// var gPt = MathUtils.makeDimension4( this.viewUtils.localToGlobal( bounds[j], elt ) );
820// //var pt = worldToPlane.multiply( gPt );