aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rwxr-xr-xjs/components/tools-properties/tag-properties.reel/tag-properties.css18
-rwxr-xr-xjs/components/tools-properties/tag-properties.reel/tag-properties.html21
-rwxr-xr-xjs/components/tools-properties/tag-properties.reel/tag-properties.js21
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/MeshManager.js22
-rwxr-xr-xjs/helper-classes/RDGE/src/core/script/renderer.js4
-rwxr-xr-xjs/lib/NJUtils.js1
-rwxr-xr-xjs/lib/drawing/world.js30
-rwxr-xr-xjs/lib/geom/brush-stroke.js14
-rwxr-xr-xjs/lib/rdge/materials/material.js4
-rwxr-xr-xjs/tools/modifier-tool-base.js4
10 files changed, 119 insertions, 20 deletions
diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.css b/js/components/tools-properties/tag-properties.reel/tag-properties.css
index 9d6c37a7..99ddf8e6 100755
--- a/js/components/tools-properties/tag-properties.reel/tag-properties.css
+++ b/js/components/tools-properties/tag-properties.reel/tag-properties.css
@@ -28,3 +28,21 @@ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29POSSIBILITY OF SUCH DAMAGE. 29POSSIBILITY OF SUCH DAMAGE.
30</copyright> */ 30</copyright> */
31
32.tagRadioButtons select.nj-skinned {
33 visibility: visible;
34 position: relative;
35 margin-top: 1px;
36}
37
38.tag-position select.nj-skinned {
39 border-radius: 0px;
40 padding-left: 5px;
41 height: 18px;
42 width: 100px;
43 border-color: #181818;
44}
45
46input.tag-class {
47 border-color: #181818 !important;
48} \ No newline at end of file
diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.html b/js/components/tools-properties/tag-properties.reel/tag-properties.html
index 7db1b7cf..46568d8b 100755
--- a/js/components/tools-properties/tag-properties.reel/tag-properties.html
+++ b/js/components/tools-properties/tag-properties.reel/tag-properties.html
@@ -53,7 +53,9 @@ POSSIBILITY OF SUCH DAMAGE.
53 "classField": {"#": "className"}, 53 "classField": {"#": "className"},
54 54
55 "customName": {"#": "customTagCB"}, 55 "customName": {"#": "customTagCB"},
56 "customLabel": {"#": "customContainer"} 56 "customLabel": {"#": "customLabel"},
57
58 "elementPosition": {"#": "positionCB"}
57 } 59 }
58 } 60 }
59 } 61 }
@@ -76,12 +78,12 @@ POSSIBILITY OF SUCH DAMAGE.
76 <div class="toolColorChipContainer"><div data-montage-id="fillColorCtrl" class="toolColorChipCtrl"></div></div> 78 <div class="toolColorChipContainer"><div data-montage-id="fillColorCtrl" class="toolColorChipCtrl"></div></div>
77 <div class="nj-divider divider-vertical toolOptionsSpacer">&nbsp;</div> 79 <div class="nj-divider divider-vertical toolOptionsSpacer">&nbsp;</div>
78 80
79 <div id="classNameContainer"> 81 <div>
80 <label class="label"> Class:</label> 82 <label class="label"> Class:</label>
81 <input data-montage-id="className" type="text" name="ClassNameTextBox" class="textBox nj-skinned"/> 83 <input data-montage-id="className" type="text" name="ClassNameTextBox" class="textBox nj-skinned tag-class"/>
82 </div> 84 </div>
83 85
84 <div id="customContainer"> 86 <div data-montage-id="customLabel">
85 <label class="label"> Tag Name:</label> 87 <label class="label"> Tag Name:</label>
86 <select data-montage-id="customTagCB" class="nj-skinned"> 88 <select data-montage-id="customTagCB" class="nj-skinned">
87 <option>article</option> 89 <option>article</option>
@@ -90,14 +92,15 @@ POSSIBILITY OF SUCH DAMAGE.
90 </select> 92 </select>
91 </div> 93 </div>
92 94
93 <div id="positionContainer"> 95 <div class="tag-position">
94 <label class="label"> Position:</label> 96 <label class="label">Position:</label>
95 <select data-montage-id="positionCB" class="nj-skinned"> 97 <select data-montage-id="positionCB" class="nj-skinned">
96 <option>Static</option> 98 <option></option>
97 <option>Absolute</option> 99 <option selected>Absolute</option>
98 <option>Relative</option>
99 <option>Fixed</option> 100 <option>Fixed</option>
100 <option>Inherit</option> 101 <option>Inherit</option>
102 <option>Relative</option>
103 <option>Static</option>
101 </select> 104 </select>
102 </div> 105 </div>
103 </div> 106 </div>
diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.js b/js/components/tools-properties/tag-properties.reel/tag-properties.js
index 9ff23a41..603d8dbe 100755
--- a/js/components/tools-properties/tag-properties.reel/tag-properties.js
+++ b/js/components/tools-properties/tag-properties.reel/tag-properties.js
@@ -29,9 +29,8 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29POSSIBILITY OF SUCH DAMAGE. 29POSSIBILITY OF SUCH DAMAGE.
30</copyright> */ 30</copyright> */
31 31
32var Montage = require("montage/core/core").Montage; 32var Montage = require("montage/core/core").Montage,
33var Component = require("montage/ui/component").Component; 33 ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties;
34var ToolProperties = require("js/components/tools-properties/tool-properties").ToolProperties;
35 34
36var TagProperties = exports.TagProperties = Montage.create(ToolProperties, { 35var TagProperties = exports.TagProperties = Montage.create(ToolProperties, {
37 divElement: { 36 divElement: {
@@ -71,6 +70,11 @@ var TagProperties = exports.TagProperties = Montage.create(ToolProperties, {
71 } 70 }
72 }, 71 },
73 72
73 elementPosition: {
74 value: null,
75 serializable: true
76 },
77
74 _subPrepare: { 78 _subPrepare: {
75 value: function() { 79 value: function() {
76 this.customName.style["display"] = "none"; 80 this.customName.style["display"] = "none";
@@ -81,6 +85,8 @@ var TagProperties = exports.TagProperties = Montage.create(ToolProperties, {
81 this.videoElement.addEventListener("click", this, false); 85 this.videoElement.addEventListener("click", this, false);
82 this.canvasElement.addEventListener("click", this, false); 86 this.canvasElement.addEventListener("click", this, false);
83 this.customElement.addEventListener("click", this, false); 87 this.customElement.addEventListener("click", this, false);
88
89 this.elementPosition.disabled = true;
84 } 90 }
85 }, 91 },
86 92
@@ -107,7 +113,6 @@ var TagProperties = exports.TagProperties = Montage.create(ToolProperties, {
107 handleFillColorChange: { 113 handleFillColorChange: {
108 value: function (e) { 114 value: function (e) {
109 this.fill = e._event; 115 this.fill = e._event;
110// this.fill.webGlColor = this.application.ninja.colorController.colorModel.colorToWebGl(e._event.color);
111 } 116 }
112 }, 117 },
113 118
@@ -130,8 +135,12 @@ var TagProperties = exports.TagProperties = Montage.create(ToolProperties, {
130 }, 135 },
131 136
132 selectedElement: { 137 selectedElement: {
133 get: function() { return this._selectedElement;}, 138 get: function() {
134 set: function(value) { this._selectedElement = value; } 139 return this._selectedElement;
140 },
141 set: function(value) {
142 this._selectedElement = value;
143 }
135 } 144 }
136 145
137}); 146});
diff --git a/js/helper-classes/RDGE/src/core/script/MeshManager.js b/js/helper-classes/RDGE/src/core/script/MeshManager.js
index 4ff95cc4..f0600793 100755
--- a/js/helper-classes/RDGE/src/core/script/MeshManager.js
+++ b/js/helper-classes/RDGE/src/core/script/MeshManager.js
@@ -201,11 +201,31 @@ RDGE.MeshManager.prototype.onLoaded = function (meshName) {
201}; 201};
202 202
203RDGE.MeshManager.prototype.exportJSON = function () { 203RDGE.MeshManager.prototype.exportJSON = function () {
204
204 for (var m in this.modelMap) { 205 for (var m in this.modelMap) {
205 this.modelMap[m].primitive.built = false; 206 this.modelMap[m].primitive.built = false;
206 } 207 }
207 208
208 return JSON.stringify(this.modelMap); 209 function replacer(key, value) {
210 if (key === "bufferStreams")
211 {
212 var nStreams = value.length;
213 for (iStream=0; iStream<nStreams; iStream++)
214 {
215 var arr = value[iStream];
216 var n = arr.length;
217 for (var i=0; i<n; i++)
218 {
219 var val = arr[i];
220 arr[i] = val.toFixed ? Number(val.toFixed(4)) : val;
221 }
222 }
223 }
224
225 return value;
226 }
227