aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmen Kesablyan2012-06-25 11:11:33 -0700
committerArmen Kesablyan2012-06-25 11:11:33 -0700
commit35aebe8d72ccfa9ea010eb79c09ecf89cc1ed44d (patch)
tree337fd4e9ca5c68fd15d3f56a83ff42aa8eade670
parent9fe9bc495af74d963fa7061d4d1a479720133a56 (diff)
parentd24243239f38704580bb3561a3959688b171809b (diff)
downloadninja-35aebe8d72ccfa9ea010eb79c09ecf89cc1ed44d.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal
-rw-r--r--assets/canvas-runtime.js1
-rwxr-xr-xassets/rdge-compiled.js12
-rw-r--r--js/clipboard/external-apps-clipboard-agent.js220
-rw-r--r--js/clipboard/internal-ops/component-clipboard-agent.js40
-rw-r--r--js/clipboard/internal-ops/css-clipboard-agent.js40
-rw-r--r--js/clipboard/internal-ops/elements-clipboard-agent.js364
-rw-r--r--js/clipboard/internal-ops/timeline-clipboard-agent.js40
-rw-r--r--js/clipboard/util.js28
-rw-r--r--js/controllers/clipboard-controller.js120
-rwxr-xr-xjs/controllers/styles-controller.js66
-rwxr-xr-xjs/data/menu-data.js9
-rwxr-xr-xjs/document/helpers/url-parser.js2
-rwxr-xr-xjs/helper-classes/3D/draw-utils.js72
-rwxr-xr-xjs/helper-classes/3D/math-utils.js4
-rwxr-xr-xjs/helper-classes/3D/view-utils.js32
-rwxr-xr-xjs/helper-classes/RDGE/rdge-compiled.js12
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/runtime.js6
-rw-r--r--js/io/system/ninjalibrary.json2
-rwxr-xr-xjs/io/templates/files/html.txt6
-rwxr-xr-xjs/mediators/drag-drop-mediator.js108
-rw-r--r--js/mediators/io-mediator.js59
-rwxr-xr-xjs/mediators/keyboard-mediator.js2
-rwxr-xr-xjs/ninja.reel/ninja.html15
-rw-r--r--js/panels/css-panel/styles-view-container.reel/styles-view-container.js2
-rwxr-xr-xjs/stage/layout.js3
-rwxr-xr-xjs/stage/stage.reel/stage.js2
-rw-r--r--manifest.json4
-rw-r--r--node_modules/montage-google/picasa-carousel.reel/image.reel/image.html3
-rwxr-xr-xnode_modules/montage-google/picasa-carousel.reel/picasa-carousel.css31
-rwxr-xr-xnode_modules/montage-google/picasa-carousel.reel/picasa-carousel.html53
-rw-r--r--node_modules/montage-google/picasa-carousel.reel/picasa-carousel.js2
-rw-r--r--node_modules/montage-google/youtube-channel.reel/youtube-channel.js22
32 files changed, 1156 insertions, 226 deletions
diff --git a/assets/canvas-runtime.js b/assets/canvas-runtime.js
index 13b36540..c441a98d 100644
--- a/assets/canvas-runtime.js
+++ b/assets/canvas-runtime.js
@@ -186,6 +186,7 @@ NinjaCvsRt.GLRuntime = Object.create(Object.prototype, {
186 this._canvas.rdgeid = id; 186 this._canvas.rdgeid = id;
187 RDGE.globals.engine.registerCanvas(this._canvas, this); 187 RDGE.globals.engine.registerCanvas(this._canvas, this);
188 RDGE.RDGEStart( this._canvas ); 188 RDGE.RDGEStart( this._canvas );
189 this._canvas.task.start();
189 } 190 }
190 else 191 else
191 { 192 {
diff --git a/assets/rdge-compiled.js b/assets/rdge-compiled.js
index 0bbcb05b..53a99c35 100755
--- a/assets/rdge-compiled.js
+++ b/assets/rdge-compiled.js
@@ -248,13 +248,13 @@ RDGE.SceneGraph.prototype.insertAbove=function(a,b){RDGE.verifyTransformNode(a);
248RDGE.SceneGraph.prototype._TraverseDFHelper=function(a,b,c){if("undefined"!=b.children){var d=[];for(d.push({node:b,parent:null});0<d.length;){c=d.pop();b=c.node;c=c.parent;if(void 0!==b.transformNode&&(b=b.transformNode,!1===a.process(b,c)))continue;if(void 0!==b.children)for(c=0;c<b.children.length;++c)d.push({node:b.children[c],parent:b})}}}; 248RDGE.SceneGraph.prototype._TraverseDFHelper=function(a,b,c){if("undefined"!=b.children){var d=[];for(d.push({node:b,parent:null});0<d.length;){c=d.pop();b=c.node;c=c.parent;if(void 0!==b.transformNode&&(b=b.transformNode,!1===a.process(b,c)))continue;if(void 0!==b.children)for(c=0;c<b.children.length;++c)d.push({node:b.children[c],parent:b})}}};
249RDGE.SceneGraph.prototype._TraverseDFPostOrderHelper=function(a,b,c){if("undefined"!=b.children){var d=[];d.push({node:b,parent:null});for(b=d.length;0<b;){for(var b=d.length,c=g.children[b-1],c=void 0==c.children?0:c.children.length,f=0;f<c;++f)d.push({node:g.children[f],parent:g});if(!(0<c)){var c=d.pop(),g=c.node,c=c.parent;void 0!==g.transformNode&&(g=g.transformNode,a.process(g,c))}}}}; 249RDGE.SceneGraph.prototype._TraverseDFPostOrderHelper=function(a,b,c){if("undefined"!=b.children){var d=[];d.push({node:b,parent:null});for(b=d.length;0<b;){for(var b=d.length,c=g.children[b-1],c=void 0==c.children?0:c.children.length,f=0;f<c;++f)d.push({node:g.children[f],parent:g});if(!(0<c)){var c=d.pop(),g=c.node,c=c.parent;void 0!==g.transformNode&&(g=g.transformNode,a.process(g,c))}}}};
250RDGE.SceneGraph.prototype.BuildBVHHelper=function(a){if("undefined"!=a.children){a.bbox_world?a.bbox_world.reset():a.bbox_world=new RDGE.box;void 0==a.local&&(a.local=RDGE.mat4.identity());var b=[],c=0;a.id="root";b.push({node:a,xfrm:RDGE.mat4.identity(),parent:null,visited:!1});for(var a=b.length,d=0;0<a;){var a=b.length,d=a-1,f=void 0==b[d].node.transformNode?b[d].node:b[d].node.transformNode,g=b[d].xfrm,h=b[d].parent,d=b[d].visited;void 0==f.id&&(f.id="id"+c);if(!d){if(void 0!==f.local&&(f.bbox_world? 250RDGE.SceneGraph.prototype.BuildBVHHelper=function(a){if("undefined"!=a.children){a.bbox_world?a.bbox_world.reset():a.bbox_world=new RDGE.box;void 0==a.local&&(a.local=RDGE.mat4.identity());var b=[],c=0;a.id="root";b.push({node:a,xfrm:RDGE.mat4.identity(),parent:null,visited:!1});for(var a=b.length,d=0;0<a;){var a=b.length,d=a-1,f=void 0==b[d].node.transformNode?b[d].node:b[d].node.transformNode,g=b[d].xfrm,h=b[d].parent,d=b[d].visited;void 0==f.id&&(f.id="id"+c);if(!d){if(void 0!==f.local&&(f.bbox_world?
251f.bbox_world.reset():f.bbox_world=new RDGE.box,d=this.GetBBoxForNode(f),f.world=RDGE.mat4.mul(f.local,g),d&&(f.bbox_world=d.transform(f.world)),!d||!d.isValid()))g=new RDGE.box,g.set(0,0),f.bbox_world=g;g=void 0==f.children?0:f.children.length;for(d=0;d<g;++d)b.push({node:f.children[d],xfrm:f.world,parent:f,visited:!1});c++;if(0<g)continue}h&&h.bbox_world&&h.bbox_world.isValid()&&f.bbox_world&&f.bbox_world.isValid()&&h.bbox_world.addBox(f.bbox_world);b.pop();a=b.length;if(0<a&&(void 0==b[a-1].node.transformNode? 251f.bbox_world.reset():f.bbox_world=new RDGE.box,d=this.GetBBoxForNode(f),f.world=RDGE.mat4.mul(f.local,g),d&&(f.bbox_world=d.transform(f.world)),!d||!d.isValid()))g=new RDGE.box,g.set(0,0),f.bbox_world=g;g=void 0==f.children?0:f.children.length;for(d=0;d<g;++d)b.push({node:f.children[d],xfrm:f.world,parent:f,visited:!1});c++;if(0<g)continue}h&&(h.bbox_world&&h.bbox_world.isValid()&&f.bbox_world&&f.bbox_world.isValid())&&h.bbox_world.addBox(f.bbox_world);b.pop();a=b.length;if(0<a&&(void 0==b[a-1].node.transformNode?
252b[a-1].node:b[a-1].node.transformNode).id==h.id)b[a-1].visited=!0}}};RDGE.SceneGraph.prototype._TraverseBFHelper=function(a,b){if("undefined"!=b.children){var c=[];for(c.push({node:b,parent:null});0<c.length;){var d=c.shift(),f=d.node,d=d.parent;void 0!==f.transformNode&&(f=f.transformNode,a.process(f,d));if(void 0!==f.children)for(d=0;d<f.children.length;++d)c.push({node:f.children[d],parent:f})}}}; 252b[a-1].node:b[a-1].node.transformNode).id==h.id)b[a-1].visited=!0}}};RDGE.SceneGraph.prototype._TraverseBFHelper=function(a,b){if("undefined"!=b.children){var c=[];for(c.push({node:b,parent:null});0<c.length;){var d=c.shift(),f=d.node,d=d.parent;void 0!==f.transformNode&&(f=f.transformNode,a.process(f,d));if(void 0!==f.children)for(d=0;d<f.children.length;++d)c.push({node:f.children[d],parent:f})}}};
253RDGE.SceneGraph.prototype.update=function(a){var b=RDGE.globals.engine.getContext().renderer;RDGE.globals.engine.getContext().debug.mat4CallCount=0;for(var c=this.animstack.length-1;0<=c;)this.animstack[c].step(a),--c;this.BuildBVHHelper(this.scene);RDGE.g_particleSystemManager.update(a);a=b.cameraManager().getActiveCamera();void 0!==a&&null!=a&&null!=a.controller&&void 0!==a.controller.world&&a.setWorld(a.controller.world);this.tick++}; 253RDGE.SceneGraph.prototype.update=function(a){var b=RDGE.globals.engine.getContext().renderer;RDGE.globals.engine.getContext().debug.mat4CallCount=0;for(var c=this.animstack.length-1;0<=c;)this.animstack[c].step(a),--c;this.BuildBVHHelper(this.scene);RDGE.g_particleSystemManager.update(a);a=b.cameraManager().getActiveCamera();void 0!==a&&(null!=a&&null!=a.controller&&void 0!==a.controller.world)&&a.setWorld(a.controller.world);this.tick++};
254RDGE.SceneGraph.prototype.render=function(a,b){if(0!=this.scene.children.length){var c=RDGE.globals.engine.getContext().renderer;RDGE.rdgeGlobalParameters.u_shadowLightFarZ.set([this.mainLight.zFar()]);this.renderList=this._RenderDFHelper(c,a,this.scene,b);this.shadowsEnabled&&(this.Traverse(this.shadowCuller,!0),this.shadowRenderList=this.shadowCuller.result);this.renderGraph.render(this);RDGE.g_particleSystemManager.render()}}; 254RDGE.SceneGraph.prototype.render=function(a,b){if(0!=this.scene.children.length){var c=RDGE.globals.engine.getContext().renderer;RDGE.rdgeGlobalParameters.u_shadowLightFarZ.set([this.mainLight.zFar()]);this.renderList=this._RenderDFHelper(c,a,this.scene,b);this.shadowsEnabled&&(this.Traverse(this.shadowCuller,!0),this.shadowRenderList=this.shadowCuller.result);this.renderGraph.render(this);RDGE.g_particleSystemManager.render()}};
255RDGE.SceneGraph.prototype.GetBBoxForNode=function(a){var b=null;if(a.materialNode&&a.materialNode.meshNode){var c=null,c=RDGE.globals.meshMan.getModelByName(a.materialNode.meshNode.mesh.name);null!=c&&(b=c.bbox)}return b}; 255RDGE.SceneGraph.prototype.GetBBoxForNode=function(a){var b=null;if(a.materialNode&&a.materialNode.meshNode){var c=null,c=RDGE.globals.meshMan.getModelByName(a.materialNode.meshNode.mesh.name);null!=c&&(b=c.bbox)}return b};
256RDGE.SceneGraph.prototype._RenderDFHelper=function(a,b,c){renderList=[];renderList[this.bckTypes.BACKGROUND]=[];renderList[this.bckTypes.OPAQUE]=[];renderList[this.bckTypes.TRANSPARENT]=[];renderList[this.bckTypes.ADDITIVE]=[];renderList[this.bckTypes.TRANSLUCENT]=[];renderList[this.bckTypes.FOREGROUND]=[];if("undefined"!=c.children){b=[];b.push({node:c,curCtx:RDGE.globals.engine.defaultContext});for(a=a.cameraManager().getActiveCamera();0<b.length;){var d=b.pop(),c=d.node,f=new RDGE.RenderContext; 256RDGE.SceneGraph.prototype._RenderDFHelper=function(a,b,c){renderList=[];renderList[this.bckTypes.BACKGROUND]=[];renderList[this.bckTypes.OPAQUE]=[];renderList[this.bckTypes.TRANSPARENT]=[];renderList[this.bckTypes.ADDITIVE]=[];renderList[this.bckTypes.TRANSLUCENT]=[];renderList[this.bckTypes.FOREGROUND]=[];if("undefined"!=c.children){b=[];b.push({node:c,curCtx:RDGE.globals.engine.defaultContext});for(a=a.cameraManager().getActiveCamera();0<b.length;){var d=b.pop(),c=d.node,f=new RDGE.RenderContext;
257f.Load(d.curCtx);if(void 0!==c.transformNode){c=c.transformNode;if(void 0!==c.hide&&!0==c.hide)continue;if(this.frustumCulling&&c.bbox_world&&c.bbox_world.isValid()&&!c.bbox_world.isVisible(a.frustum))continue;f.shaderProg=this.jdefShaderProgram;d=RDGE.rdgeConstants.categoryEnumeration.OPAQUE;if(c.materialNode){d=c.materialNode.sortCategory;void 0!==c.materialNode.shaderProgram&&(f.shaderProg=c.materialNode.shaderProgram);void 0!==c.materialNode.textureList&&(f.textureList=c.materialNode.textureList.slice()); 257f.Load(d.curCtx);if(void 0!==c.transformNode){c=c.transformNode;if(void 0!==c.hide&&!0==c.hide)continue;if(this.frustumCulling&&(c.bbox_world&&c.bbox_world.isValid())&&!c.bbox_world.isVisible(a.frustum))continue;f.shaderProg=this.jdefShaderProgram;d=RDGE.rdgeConstants.categoryEnumeration.OPAQUE;if(c.materialNode){d=c.materialNode.sortCategory;void 0!==c.materialNode.shaderProgram&&(f.shaderProg=c.materialNode.shaderProgram);void 0!==c.materialNode.textureList&&(f.textureList=c.materialNode.textureList.slice());
2580<c.materialNode.uniforms.length&&(f.uniforms=c.materialNode.uniforms.slice());for(var g=c.materialNode.lightChannel.length,h=0;h<g;++h)c.materialNode.lightChannel[h]&&(f.lights[h]=c.materialNode.lightChannel[h])}this.sortFunc[d](renderList[d],{context:f,node:c,parent:parent})}if(void 0!==c.children){d=c.children.length;for(g=0;g<d;++g)b.push({node:c.children[g],curCtx:f})}}}return renderList}; 2580<c.materialNode.uniforms.length&&(f.uniforms=c.materialNode.uniforms.slice());for(var g=c.materialNode.lightChannel.length,h=0;h<g;++h)c.materialNode.lightChannel[h]&&(f.lights[h]=c.materialNode.lightChannel[h])}this.sortFunc[d](renderList[d],{context:f,node:c,parent:parent})}if(void 0!==c.children){d=c.children.length;for(g=0;g<d;++g)b.push({node:c.children[g],curCtx:f})}}}return renderList};
259RDGE.SceneGraph.prototype.enableShadows=function(a){a?(a=RDGE.globals.engine.getContext().renderer,this.shadowCuller=new shadowCullPass(this.mainLight,RDGE.rdgeConstants.categoryEnumeration.OPAQUE,function(a,c){return a<c}),this.mainLight.init(),this.mainLight.setPerspective(45,a.vpWidth/a.vpHeight,1,200),this.mainLight.setLookAt([-60,17,-15],[-5,-5,15],RDGE.vec3.up()),RDGE.rdgeGlobalParameters.u_shadowLightWorld.set(this.mainLight.world),RDGE.rdgeGlobalParameters.u_vShadowLight.set(this.mainLight.view), 259RDGE.SceneGraph.prototype.enableShadows=function(a){a?(a=RDGE.globals.engine.getContext().renderer,this.shadowCuller=new shadowCullPass(this.mainLight,RDGE.rdgeConstants.categoryEnumeration.OPAQUE,function(a,c){return a<c}),this.mainLight.init(),this.mainLight.setPerspective(45,a.vpWidth/a.vpHeight,1,200),this.mainLight.setLookAt([-60,17,-15],[-5,-5,15],RDGE.vec3.up()),RDGE.rdgeGlobalParameters.u_shadowLightWorld.set(this.mainLight.world),RDGE.rdgeGlobalParameters.u_vShadowLight.set(this.mainLight.view),
260a=RDGE.mat4.identity(),a=RDGE.mat4.scale(a,[0.5,0.5,0.5]),a=RDGE.mat4.translate(a,[0.5,0.5,0.5]),RDGE.rdgeGlobalParameters.u_shadowBiasMatrix.set(a),a=RDGE.mat4.mul(this.mainLight.proj,a),a=RDGE.mat4.mul(this.mainLight.view,a),RDGE.rdgeGlobalParameters.u_shadowBPV.set(a),this.shadowsEnabled=!0):(this.mainLight=null,this.shadowsEnabled=!1)}; 260a=RDGE.mat4.identity(),a=RDGE.mat4.scale(a,[0.5,0.5,0.5]),a=RDGE.mat4.translate(a,[0.5,0.5,0.5]),RDGE.rdgeGlobalParameters.u_shadowBiasMatrix.set(a),a=RDGE.mat4.mul(this.mainLight.proj,a),a=RDGE.mat4.mul(this.mainLight.view,a),RDGE.rdgeGlobalParameters.u_shadowBPV.set(a),this.shadowsEnabled=!0):(this.mainLight=null,this.shadowsEnabled=!1)};
@@ -312,8 +312,8 @@ RDGE.RunState.prototype.LeaveState=function(){if(void 0!=this.userRunState.onCom
312RDGE.LoadState.prototype.loadTexture=function(a){"LoadState"!=this.stateManager.currentState().name&&this.stateManager.PushState(this.stateManager.RDGEInitState,"noInit");this.textureLoadQueue.push(a)};RDGE.LoadState.prototype.Init=function(){this.sceneName&&this.loadScene("assets_web/mesh/"+this.sceneName+".json",this.sceneName);if(this.hasUserState&&this.userRunState&&this.userRunState.onLoadState)this.userRunState.onLoadState()}; 312RDGE.LoadState.prototype.loadTexture=function(a){"LoadState"!=this.stateManager.currentState().name&&this.stateManager.PushState(this.stateManager.RDGEInitState,"noInit");this.textureLoadQueue.push(a)};RDGE.LoadState.prototype.Init=function(){this.sceneName&&this.loadScene("assets_web/mesh/"+this.sceneName+".json",this.sceneName);if(this.hasUserState&&this.userRunState&&this.userRunState.onLoadState)this.userRunState.onLoadState()};
313RDGE.LoadState.prototype.ReInit=function(){if(this.hasUserState&&this.userRunState&&this.userRunState.onLoadState)this.userRunState.onLoadState()};RDGE.LoadState.prototype.Resize=function(){RDGE.globals.engine.lastWindowWidth==window.innerWidth&&RDGE.globals.engine.lastWindowHeight==window.innerHeight&&(this.userRunState.resize(),RDGE.globals.engine.lastWindowWidth=window.innerWidth,RDGE.globals.engine.lastWindowHeight=window.innerHeight)}; 313RDGE.LoadState.prototype.ReInit=function(){if(this.hasUserState&&this.userRunState&&this.userRunState.onLoadState)this.userRunState.onLoadState()};RDGE.LoadState.prototype.Resize=function(){RDGE.globals.engine.lastWindowWidth==window.innerWidth&&RDGE.globals.engine.lastWindowHeight==window.innerHeight&&(this.userRunState.resize(),RDGE.globals.engine.lastWindowWidth=window.innerWidth,RDGE.globals.engine.lastWindowHeight=window.innerHeight)};
314RDGE.LoadState.prototype.Update=function(a){var b=this.sceneLoadQueue.length-1;-1<b&&(b=this.sceneLoadQueue[b],RDGE.globals.meshMan.processMeshData(),b.doSceneRequest?b.requestScene():b.requestComplete&&(b.sceneBeginProcessing?(b.scene=new RDGE.SceneGraph(b.rawData),b.scene.enableShadows(!0),RDGE.globals.engine.AddScene(b.name,b.scene),b.scene.Traverse(b.sceneProcessor,!1),b.sceneBeginProcessing=!1):b.processingComplete()&&(b=this.sceneLoadQueue.shift(),this.userRunState.onComplete(b.name,b.scene)))); 314RDGE.LoadState.prototype.Update=function(a){var b=this.sceneLoadQueue.length-1;-1<b&&(b=this.sceneLoadQueue[b],RDGE.globals.meshMan.processMeshData(),b.doSceneRequest?b.requestScene():b.requestComplete&&(b.sceneBeginProcessing?(b.scene=new RDGE.SceneGraph(b.rawData),b.scene.enableShadows(!0),RDGE.globals.engine.AddScene(b.name,b.scene),b.scene.Traverse(b.sceneProcessor,!1),b.sceneBeginProcessing=!1):b.processingComplete()&&(b=this.sceneLoadQueue.shift(),this.userRunState.onComplete(b.name,b.scene))));
315for(;0<this.textureLoadQueue.length;)this.renderer.commitTexture(this.textureLoadQueue.shift());0==this.sceneLoadQueue.length&&0==this.textureLoadQueue.length&&RDGE.globals.engine.getContext().ctxStateManager.PopState();RDGE.globals.engine.getContext().getScene()&&"not-ready"!=RDGE.globals.engine.getContext().getScene()&&this.stateManager.RDGERunState.initialized&&this.userRunState.update(a)}; 315for(;0<this.textureLoadQueue.length;)this.renderer.commitTexture(this.textureLoadQueue.shift());0==this.sceneLoadQueue.length&&0==this.textureLoadQueue.length&&RDGE.globals.engine.getContext().ctxStateManager.PopState();RDGE.globals.engine.getContext().getScene()&&("not-ready"!=RDGE.globals.engine.getContext().getScene()&&this.stateManager.RDGERunState.initialized)&&this.userRunState.update(a)};
316RDGE.LoadState.prototype.Draw=function(){this.renderer._clear();RDGE.globals.engine.getContext().getScene()&&"not-ready"!=RDGE.globals.engine.getContext().getScene()&&this.stateManager.RDGERunState.initialized&&this.userRunState.draw()};RDGE.LoadState.prototype.Shutdown=function(){};RDGE.LoadState.prototype.LeaveState=function(){if(void 0!=this.userRunState.onComplete)this.userRunState.onComplete()}; 316RDGE.LoadState.prototype.Draw=function(){this.renderer._clear();RDGE.globals.engine.getContext().getScene()&&("not-ready"!=RDGE.globals.engine.getContext().getScene()&&this.stateManager.RDGERunState.initialized)&&this.userRunState.draw()};RDGE.LoadState.prototype.Shutdown=function(){};RDGE.LoadState.prototype.LeaveState=function(){if(void 0!=this.userRunState.onComplete)this.userRunState.onComplete()};
317RDGE.LoadState.prototype.MakeSceneRequest=function(a,b){this.hasScene=!0;this.lastSceneName=b;var c=new XMLHttpRequest;c.initState=this;RDGE.globals.engine.getContext().sceneGraphMap[b]="not-ready";c.onreadystatechange=function(){4==c.readyState&&(200==c.status||-1==window.location.href.indexOf("http")?(this.initState.scene=eval("("+c.responseText+")"),this.initState.loadingDone=!0):alert("An error has occured making the request"))};c.open("GET",a,!0);c.send(null)}; 317RDGE.LoadState.prototype.MakeSceneRequest=function(a,b){this.hasScene=!0;this.lastSceneName=b;var c=new XMLHttpRequest;c.initState=this;RDGE.globals.engine.getContext().sceneGraphMap[b]="not-ready";c.onreadystatechange=function(){4==c.readyState&&(200==c.status||-1==window.location.href.indexOf("http")?(this.initState.scene=eval("("+c.responseText+")"),this.initState.loadingDone=!0):alert("An error has occured making the request"))};c.open("GET",a,!0);c.send(null)};
318RDGE.SetupScene=function(){this.renderer=RDGE.globals.engine.getContext().renderer;this.meshLoadingMap=[];this.onMeshLoaded=function(a){this.meshLoadingMap[a]&&(this.meshLoadingMap[a].stillLoading=!1)};RDGE.globals.meshMan.addOnLoadedCallback(this)}; 318RDGE.SetupScene=function(){this.renderer=RDGE.globals.engine.getContext().renderer;this.meshLoadingMap=[];this.onMeshLoaded=function(a){this.meshLoadingMap[a]&&(this.meshLoadingMap[a].stillLoading=!1)};RDGE.globals.meshMan.addOnLoadedCallback(this)};
319RDGE.SetupScene.prototype.process=function(a,b){RDGE.verifyTransformNode(a);a.parent=b;void 0!==a.local&&(a.local=RDGE.mat4.transpose(a.local));if("undefined"!=((a.materialNode||{}).meshNode||{})&&void 0!==a.materialNode){var c=RDGE.globals.meshMan.loadMesh(a.materialNode.meshNode.mesh);a.meshes.push(a.materialNode.meshNode);null==c?this.meshLoadingMap[a.materialNode.meshNode.mesh.name]={stillLoading:!0,remotelyLoading:!1}:c.primitive?this.renderer.createPrimitive(c.primitive):this.meshLoadingMap[a.materialNode.meshNode.mesh.name]|| 319RDGE.SetupScene.prototype.process=function(a,b){RDGE.verifyTransformNode(a);a.parent=b;void 0!==a.local&&(a.local=RDGE.mat4.transpose(a.local));if("undefined"!=((a.materialNode||{}).meshNode||{})&&void 0!==a.materialNode){var c=RDGE.globals.meshMan.loadMesh(a.materialNode.meshNode.mesh);a.meshes.push(a.materialNode.meshNode);null==c?this.meshLoadingMap[a.materialNode.meshNode.mesh.name]={stillLoading:!0,remotelyLoading:!1}:c.primitive?this.renderer.createPrimitive(c.primitive):this.meshLoadingMap[a.materialNode.meshNode.mesh.name]||
@@ -323,7 +323,7 @@ RDGE.sceneRequestDef=function(a,b){this.name=b;this.addr=a;this.requestComplete=
323function(){this.doSceneRequest=!1;var b=new XMLHttpRequest;b.handler=this;RDGE.globals.engine.getContext().sceneGraphMap[name]="not-ready";b.onreadystatechange=function(){4==b.readyState&&(200==b.status||-1==window.location.href.indexOf("http")?(this.handler.rawData=eval("("+b.responseText+")"),this.handler.requestComplete=!0,this.handler.sceneBeginProcessing=!0):alert("An error has occured making the request"))};b.open("GET",a,!0);b.send(null)}};RDGE=RDGE||{};RDGE.core=RDGE.core||{};RDGE.utilities=RDGE.utilities||{};RDGE.globals=function(){return{engine:new RDGE.Engine,width:0,height:0,cam:null,shaderMan:null,meshMan:null,poolList:[],gl:null}}();RDGE.core.RDGEState=function(){};RDGE.core.RDGEState.prototype.init=function(){};RDGE.core.RDGEState.prototype.update=function(){};RDGE.core.RDGEState.prototype.draw=function(){};RDGE.core.RDGEState.prototype.resize=function(){};RDGE.core.RDGEState.prototype.shutdown=function(){}; 323function(){this.doSceneRequest=!1;var b=new XMLHttpRequest;b.handler=this;RDGE.globals.engine.getContext().sceneGraphMap[name]="not-ready";b.onreadystatechange=function(){4==b.readyState&&(200==b.status||-1==window.location.href.indexOf("http")?(this.handler.rawData=eval("("+b.responseText+")"),this.handler.requestComplete=!0,this.handler.sceneBeginProcessing=!0):alert("An error has occured making the request"))};b.open("GET",a,!0);b.send(null)}};RDGE=RDGE||{};RDGE.core=RDGE.core||{};RDGE.utilities=RDGE.utilities||{};RDGE.globals=function(){return{engine:new RDGE.Engine,width:0,height:0,cam:null,shaderMan:null,meshMan:null,poolList:[],gl:null}}();RDGE.core.RDGEState=function(){};RDGE.core.RDGEState.prototype.init=function(){};RDGE.core.RDGEState.prototype.update=function(){};RDGE.core.RDGEState.prototype.draw=function(){};RDGE.core.RDGEState.prototype.resize=function(){};RDGE.core.RDGEState.prototype.shutdown=function(){};
324RDGE.core.RDGEState.prototype.onComplete=function(){}; 324RDGE.core.RDGEState.prototype.onComplete=function(){};
325RDGE.utilities.validateUserState=function(a){a.init||(a.init=function(){});a.update||(a.update=function(a){var c=RDGE.globals.engine.getContext().currentScene,c=RDGE.globals.engine.getScene(c);c!=null&&c.update(a)});a.draw||(a.draw=function(){var a=RDGE.globals.engine.getContext().currentScene,a=RDGE.globals.engine.getScene(a);a!=null&&a.render()});a.resize||(a.resize=function(){});a.shutdown||(a.shutdown=function(){});a.onComplete||(a.onComplete=function(){})}; 325RDGE.utilities.validateUserState=function(a){a.init||(a.init=function(){});a.update||(a.update=function(a){var c=RDGE.globals.engine.getContext().currentScene,c=RDGE.globals.engine.getScene(c);c!=null&&c.update(a)});a.draw||(a.draw=function(){var a=RDGE.globals.engine.getContext().currentScene,a=RDGE.globals.engine.getScene(a);a!=null&&a.render()});a.resize||(a.resize=function(){});a.shutdown||(a.shutdown=function(){});a.onComplete||(a.onComplete=function(){})};
326RDGE.RDGEStart=function(a){var b=a;"string"===typeof a&&(b=document.getElementById(a));b&&(RDGE.globals.engine.registerCanvas(b),b.task=new RDGE.RDGETask(b,!0),RDGE.globals.shaderMan||(RDGE.globals.shaderMan=new RDGE.ShaderManager),RDGE.globals.meshMan||(RDGE.globals.meshMan=new RDGE.MeshManager),RDGE.globals.engine.initializeComplete||RDGE.globals.engine.init())};RDGE.RDGEStop=function(){}; 326RDGE.RDGEStart=function(a){var b=a;"string"===typeof a&&(b=document.getElementById(a));b&&(RDGE.globals.engine.registerCanvas(b),b.task||(b.task=new RDGE.RDGETask(b,!1)),RDGE.globals.shaderMan||(RDGE.globals.shaderMan=new RDGE.ShaderManager),RDGE.globals.meshMan||(RDGE.globals.meshMan=new RDGE.MeshManager),RDGE.globals.engine.initializeComplete||RDGE.globals.engine.init())};RDGE.RDGEStop=function(){};
327RDGE.RequestAnimationFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}();RDGERequestAnimationFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}(); 327RDGE.RequestAnimationFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}();RDGERequestAnimationFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}();
328RDGE.RDGETask=function(){var a={};return function(b,c){this.id=b.rdgeid;this.lastTime=this.currTime=0;this.running=!1;this.context=null;if(b){this.context=RDGE.globals.engine.ctxMan.handleToObject(b.rdgeCtxHandle);a[this.id]=function(){d.running&&(d.currTime=(new Date).getTime(),d.step((d.currTime-d.lastTime)/1E3),RDGERequestAnimationFrame(a[d.id],b),d.lastTime=d.currTime)};this.start=function(){this.running||(this.running=!0,this.lastTime=this.currTime=(new Date).getTime(),a[this.id]())};this.stop= 328RDGE.RDGETask=function(){var a={};return function(b,c){this.id=b.rdgeid;this.lastTime=this.currTime=0;this.running=!1;this.context=null;if(b){this.context=RDGE.globals.engine.ctxMan.handleToObject(b.rdgeCtxHandle);a[this.id]=function(){d.running&&(d.currTime=(new Date).getTime(),d.step((d.currTime-d.lastTime)/1E3),RDGERequestAnimationFrame(a[d.id],b),d.lastTime=d.currTime)};this.start=function(){this.running||(this.running=!0,this.lastTime=this.currTime=(new Date).getTime(),a[this.id]())};this.stop=
329function(){this.running=!1};this.kill=function(){this.running=!1;a[this.id]=null};this.step=function(a){contextManager.currentCtx=this.context;this.context.ctxStateManager.tick(a)};var d=this;c&&d.start()}}}(); 329function(){this.running=!1};this.kill=function(){this.running=!1;a[this.id]=null};this.step=function(a){contextManager.currentCtx=this.context;this.context.ctxStateManager.tick(a)};var d=this;c&&d.start()}}}();
diff --git a/js/clipboard/external-apps-clipboard-agent.js b/js/clipboard/external-apps-clipboard-agent.js
new file mode 100644
index 00000000..7e55cf08
--- /dev/null
+++ b/js/clipboard/external-apps-clipboard-agent.js
@@ -0,0 +1,220 @@
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//
9
10var Montage = require("montage/core/core").Montage,
11 Component = require("montage/ui/component").Component,
12 ClipboardUtil = require("js/clipboard/util").ClipboardUtil;
13
14var ExternalAppsClipboardAgent = exports.ExternalAppsClipboardAgent = Montage.create(Component, {
15
16 paste:{
17 value: function(clipboardEvent){
18 var clipboardData = clipboardEvent.clipboardData,
19 htmlData = clipboardData.getData("text/html"),
20 textData = clipboardData.getData("text/plain"),
21 i=0,
22 imageMime, imageData, imageElement;
23
24 //handle image blobs