Skip to content

Commit

Permalink
Merge pull request #41 from TheVindicators/coord_updates
Browse files Browse the repository at this point in the history
coordinate updates
  • Loading branch information
Proplex authored Oct 25, 2017
2 parents 7827261 + d983e59 commit 6f38171
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 32 deletions.
4 changes: 3 additions & 1 deletion app/static/js/Editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,9 @@ Editor.prototype = {
z_max = geo.scale.z * z_max;
z_min = geo.scale.z * z_min;


var scale = z_max - z_min;
var newPos = new THREE.Vector3( scale , scale/2, scale );
this.execute( new SetPositionCommand( this.camera, newPos ) );

},

Expand Down
4 changes: 2 additions & 2 deletions app/static/js/Sidebar.Object.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Sidebar.Object = function ( editor ) {
objectRotationRow.add( new UI.Text( 'Rotation' ).setWidth( '90px' ) );
objectRotationRow.add( objectRotationZ, objectRotationX, objectRotationY );

container.add( objectRotationRow );
//container.add( objectRotationRow );

// scale

Expand All @@ -130,7 +130,7 @@ Sidebar.Object = function ( editor ) {
//objectScaleRow.add( objectScaleLock );
objectScaleRow.add( objectScaleZ, objectScaleX, objectScaleY ); // swap y and z axis

container.add( objectScaleRow );
//container.add( objectScaleRow );

// fov

Expand Down
103 changes: 74 additions & 29 deletions app/templates/editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,60 @@
<title>Vis - Web Visualizer</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
.modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}
.modal-content {
margin: 15% auto; /* 15% from the top and centered */
padding: 20px;
width: 20%; /* Could be more or less, depending on screen size */
}
.modal-content {
text-decoration: none;
}
.popup {
display: block;
position: fixed;
z-index: 1;
padding-top: 100px;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto;
background-color: rgb(0,0,0);
background-color: rgba(0,0,0,0.4);
}
.popup-content {
background-color: #fefefe;
margin: auto;
padding: 20px;
border: 1px solid #888;
width: 675px;
}
.close-win {
color: #aaaaaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.close-win:hover,
.close-win:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
</style>
</head>
<body ontouchstart="">
<link href="/static/css/bootstrap.min.css" rel="stylesheet" />
Expand Down Expand Up @@ -155,32 +209,6 @@
<script src="/static/js/libs/html2canvas.js"></script>
<script src="/static/js/libs/three.html.js"></script>

<style>
/* The Modal (background) */
.modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1; /* Sit on top */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0, 0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content/Box */
.modal-content {
margin: 15% auto; /* 15% from the top and centered */
padding: 20px;
width: 20%; /* Could be more or less, depending on screen size */
}

.modal-content a{
text-decoration: none;
}
</style>

<script>

Expand Down Expand Up @@ -467,10 +495,27 @@
<div id="saves" class="list-group">

</div>

</div>


</div>
<!--
<div id="readme" class="popup">
<div class="popup-content">
<span class="close-win">&times;</span>
<h2>Hello, and Welcome to Vis: Web Visualizer!</h2>
<p>Please read the following information before continuing:</p>
<ul>
<li>To load a previous session, click on File -> Load, then select from the popup box</li>
<li>To import a model, go to File -> Import</li>
<li>Once imported, adjust the aircraft dimensions on the right to match that of your selected model</li>
<li>To add an antenna, click on Add -> Antenna and then enter in the desired starting coordinates</li>
<li>To start a new visualization, press File -> New</li>
<li>When an object is selected, you can adjust various characteristics from 'Object' menu on the sidebar</li>
<li>You may also move an antenna along any axis by moving the axis arrows once it's selected</li>
</ul>
<p>If you do notice any issues with the application, please let us know on our github page. Enjoy!</p>
</div>
</div>
-->
</div>
</body>
</html>

0 comments on commit 6f38171

Please sign in to comment.