aboutsummaryrefslogtreecommitdiff
path: root/node_modules/tools
diff options
context:
space:
mode:
authorJohn Mayhew2012-04-02 16:28:39 -0700
committerJohn Mayhew2012-04-02 16:28:39 -0700
commitb4155fb4c33675a8a7cd37473513718043fdf0ba (patch)
tree3d8c802473f2395d53d599ec9d8b70b60a4db50c /node_modules/tools
parent5ba9aeac94c86049423fd5d4b37b277263939c13 (diff)
parentc6de22bf42be90b403491b5f87b1818d9020310c (diff)
downloadninja-b4155fb4c33675a8a7cd37473513718043fdf0ba.tar.gz
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal into WorkingBranch
Conflicts: js/helper-classes/RDGE/rdge-compiled.js js/helper-classes/RDGE/runtime/GLRuntime.js js/helper-classes/RDGE/src/core/script/MeshManager.js js/helper-classes/RDGE/src/core/script/engine.js js/helper-classes/RDGE/src/core/script/fx/ssao.js js/helper-classes/RDGE/src/core/script/init_state.js js/helper-classes/RDGE/src/core/script/run_state.js js/helper-classes/RDGE/src/core/script/scenegraphNodes.js js/helper-classes/RDGE/src/core/script/utilities.js js/helper-classes/RDGE/src/tools/compile-rdge-core.bat js/helper-classes/RDGE/src/tools/compile-rdge-core.sh js/helper-classes/RDGE/src/tools/rdge-compiled.js js/lib/drawing/world.js js/lib/rdge/materials/bump-metal-material.js js/lib/rdge/materials/deform-material.js js/lib/rdge/materials/flat-material.js js/lib/rdge/materials/fly-material.js js/lib/rdge/materials/julia-material.js js/lib/rdge/materials/keleidoscope-material.js js/lib/rdge/materials/linear-gradient-material.js js/lib/rdge/materials/mandel-material.js js/lib/rdge/materials/plasma-material.js js/lib/rdge/materials/pulse-material.js js/lib/rdge/materials/radial-blur-material.js js/lib/rdge/materials/radial-gradient-material.js js/lib/rdge/materials/relief-tunnel-material.js js/lib/rdge/materials/square-tunnel-material.js js/lib/rdge/materials/star-material.js js/lib/rdge/materials/taper-material.js js/lib/rdge/materials/tunnel-material.js js/lib/rdge/materials/twist-material.js js/lib/rdge/materials/twist-vert-material.js js/lib/rdge/materials/uber-material.js js/lib/rdge/materials/water-material.js js/lib/rdge/materials/z-invert-material.js js/preloader/Preloader.js
Diffstat (limited to 'node_modules/tools')
-rw-r--r--node_modules/tools/template-creator.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/node_modules/tools/template-creator.js b/node_modules/tools/template-creator.js
index 6b50cc1e..e312cd32 100644
--- a/node_modules/tools/template-creator.js
+++ b/node_modules/tools/template-creator.js
@@ -31,18 +31,19 @@ var TemplateCreator = exports.TemplateCreator = Montage.create(Template, /** @le
31 }, 31 },
32 32
33 initWithHeadAndBodyElements: { 33 initWithHeadAndBodyElements: {
34 value: function(head, body, montageJsPath) { 34 value: function(head, body, components, montageJsPath) {
35 var serializer = this.serializer, 35 var serializer = this.serializer,
36 objects = {}, 36 objects = {},
37 components = {}, 37 //components = {},
38 doc, 38 doc,
39 script, 39 script,
40 self = this; 40 self = this;
41 41
42 this._objectNamesIndex = {}; 42 this._objectNamesIndex = {};
43 doc = this._document = document.implementation.createHTMLDocument(""); 43 //doc = this._document = document.implementation.createHTMLDocument("");
44 44
45 function copyNode(sourceNode, targetNode, isRootNode) { 45 /*
46function copyNode(sourceNode, targetNode, isRootNode) {
46 var childNodes = sourceNode.childNodes, 47 var childNodes = sourceNode.childNodes,
47 childNode, 48 childNode,
48 targetChildNode, 49 targetChildNode,
@@ -54,7 +55,7 @@ var TemplateCreator = exports.TemplateCreator = Montage.create(Template, /** @le
54 label = self._generateLabelForComponent(component); 55 label = self._generateLabelForComponent(component);
55 targetNode.setAttribute("id", label); 56 targetNode.setAttribute("id", label);
56 component._element = targetNode; 57 component._element = targetNode;
57 components[label] = component; 58 //components[label] = component;
58 } else { 59 } else {
59 for (var i = 0; (childNode = childNodes[i]); i++) { 60 for (var i = 0; (childNode = childNodes[i]); i++) {
60 targetChildNode = targetNode.appendChild(childNode.cloneNode(false)); 61 targetChildNode = targetNode.appendChild(childNode.cloneNode(false));
@@ -62,8 +63,10 @@ var TemplateCreator = exports.TemplateCreator = Montage.create(Template, /** @le
62 } 63 }
63 } 64 }
64 } 65 }
66*/
65 67
66 if (head) { 68 /*
69if (head) {
67 doc.head.innerHTML = head.innerHTML; 70 doc.head.innerHTML = head.innerHTML;
68 } 71 }
69 if (montageJsPath) { 72 if (montageJsPath) {
@@ -82,11 +85,12 @@ var TemplateCreator = exports.TemplateCreator = Montage.create(Template, /** @le
82 // the first child is the title 85 // the first child is the title
83 doc.head.insertBefore(doc.createTextNode("\n "), doc.head.firstChild); 86 doc.head.insertBefore(doc.createTextNode("\n "), doc.head.firstChild);
84 } 87 }
88*/
85 89
86 copyNode(body, this._document.body, true); 90 //copyNode(body, this._document.body, true);
87 this._ownerSerialization = serializer.serialize(components); 91 this._ownerSerialization = serializer.serialize(components);
88 this._externalObjects = serializer.getExternalObjects(); 92 this._externalObjects = serializer.getExternalObjects();
89 93
90 return this; 94 return this;
91 } 95 }
92 }, 96 },