Commit 8fb43768 authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

rotation center on component

parent 4d9d7ade
......@@ -18,6 +18,7 @@ define(['underscore', 'cam', 'three'], function(_, cam, THREE){
this.isStatic = json.isStatic;
this.rotary = json.rotary;
this.motionVector = new THREE.Vector3();
if (json.centerOfRotation) this.centerOfRotation = new THREE.Vector3(json.centerOfRotation.x, json.centerOfRotation.y, json.centerOfRotation.z);
if (json.motionVector) this.motionVector.set(json.motionVector.x, json.motionVector.y, json.motionVector.z);
}
......@@ -219,7 +220,8 @@ define(['underscore', 'cam', 'three'], function(_, cam, THREE){
rotation: this.object3D.rotation,
isStatic: this.isStatic,
rotary: this.rotary,
motionVector: this.motionVector
motionVector: this.motionVector,
centerOfRotation: this.centerOfRotation
}
};
......
......@@ -44,11 +44,17 @@ Parent:   
<input id="isRotary" data-property="rotary" type="checkbox" <% if (thisComponent.rotary){ %> checked="checked"<% } %> value="" data-toggle="checkbox" class="component custom-checkbox">
<span class="icons"><span class="icon-unchecked"></span><span class="icon-checked"></span></span>
Rotary Axis (default is Linear)</label>
Vector (xyz):&nbsp;&nbsp;
Vector of Motion (xyz):<br/>
<input data-property="motionVector" data-key="x" value="<%= thisComponent.motionVector.x %>" placeholder="X" class="form-control floatInput component" type="text">&nbsp;
<input data-property="motionVector" data-key="y" value="<%= thisComponent.motionVector.y %>" placeholder="Y" class="form-control floatInput component" type="text">&nbsp;
<input data-property="motionVector" data-key="z" value="<%= thisComponent.motionVector.z %>" placeholder="Z" class="form-control floatInput component" type="text"><br/>
<!--Jog<br/>-->
<input data-property="motionVector" data-key="z" value="<%= thisComponent.motionVector.z %>" placeholder="Z" class="form-control floatInput component" type="text"><br/><br/>
<% if (thisComponent.rotary){ %>
Center of Rotation, relative to Origin (xyz):<br/>
<input data-property="centerOfRotation" data-key="x" value="<%= thisComponent.centerOfRotation.x %>" placeholder="X" class="form-control floatInput component" type="text">&nbsp;
<input data-property="centerOfRotation" data-key="y" value="<%= thisComponent.centerOfRotation.y %>" placeholder="Y" class="form-control floatInput component" type="text">&nbsp;
<input data-property="centerOfRotation" data-key="z" value="<%= thisComponent.centerOfRotation.z %>" placeholder="Z" class="form-control floatInput component" type="text"><br/><br/>
<% } %>
Jog: &nbsp;&nbsp;<br/>
<% } %>
<br/>
<a id="uploadStl" href="#" class="btn btn-block btn-lg btn-default">Upload STL</a><br/>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment