Overview
| Comment: | started moving around code in files to factor stuff. |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
1514d83c2900c9083ef9ecce78ed7165 |
| User & Date: | Derek on 2013-01-02 17:22:01.746 |
| Other Links: | manifest | tags |
Context
|
2013-01-03
| ||
| 20:26 | starting basic work on wireframe_model.js wrote some test cases in seperate page check-in: e9599cdacc user: Derek tags: trunk | |
|
2013-01-02
| ||
| 17:22 | started moving around code in files to factor stuff. check-in: 1514d83c29 user: Derek tags: trunk | |
|
2012-12-30
| ||
| 22:51 | got rotation of selected points to work check-in: e34dd1120f user: Jacob tags: trunk | |
Changes
Modified draw.html
from [2d990104f4]
to [00f152a683].
1 2 3 4 | <html> <script src='matrix_vector_lib.js' ></script> <script> | > | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | <html> <script src='matrix_vector_lib.js' ></script> <script src='wireframe_model.js'></script> <script> /* // TODO rotate selected points // TODO control with zoom rotate or pan means that action is only applied to the camera not the selected points. // TODO clicking and dragging on a line allows you to place a point somewhere on that line. Perhaps with the modifier key it would break up the existing line into line segments. // TODO when lines are deleted, readd the solo points to the solo_points list // TODO z for undo shift + z for redo. // TODO // TODO drop down minimalist menu in top right of canvas. |
| ︙ | ︙ | |||
26 27 28 29 30 31 32 | // even in future code changes, ie statically configured with an initial. // // var canvas; | | < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
// even in future code changes, ie statically configured with an initial.
//
//
var canvas;
var frame_rate = 20;
var saveTimeout = 10*1000;
var last_zoom_dist = 1;
var zoom_factor = 0.83;
// camera animation
var max_move_delta = 0.01;
var max_angle_delta = Math.PI;
var delta_horizontal_angle = 0;
var delta_vertical_angle = 0;
var delta_position = [0,0,0];
var selected_points = [];
var selected_lines = [];
var helpmsg = //"3D drawing tool\n\n" +
"Select Left Click\n" +
|
| ︙ | ︙ | |||
500 501 502 503 504 505 506 |
if(vertical_camera_rotation + theta < -Math.PI/2)
theta = -Math.PI/2 - vertical_camera_rotation;
vertical_camera_rotation += theta;
rotateView([1, 0, 0], theta, true); }
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 473 474 475 476 477 478 479 480 481 482 483 484 485 486 |
if(vertical_camera_rotation + theta < -Math.PI/2)
theta = -Math.PI/2 - vertical_camera_rotation;
vertical_camera_rotation += theta;
rotateView([1, 0, 0], theta, true); }
window.onload = function(){
// load localStorage saved state.
if(localStorage.points && localStorage.lines){
|
| ︙ | ︙ | |||
823 824 825 826 827 828 829 |
canvas.height = window.innerHeight - 20;
window.onresize = function(){
canvas.width = window.innerWidth - 20;
canvas.height = window.innerHeight - 20; }
| | < | 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 |
canvas.height = window.innerHeight - 20;
window.onresize = function(){
canvas.width = window.innerWidth - 20;
canvas.height = window.innerHeight - 20; }
function getRotationAngle(x, size, max, center_size){
if(!center_size) center_size = 0.05; // the proportional size of the area in which no rotation is effected by the mouse movement
if(!max) max = Math.PI/128;
// center does nothing
if(Math.abs(x) < size * center_size/2) x = 0;
|
| ︙ | ︙ | |||
984 985 986 987 988 989 990 |
var saveAction = function(){
localStorage.points = JSON.stringify(points);
localStorage.lines = JSON.stringify(lines);
}
setInterval(saveAction, saveTimeout);
}
| | | 654 655 656 657 658 659 660 661 662 663 664 665 666 667 |
var saveAction = function(){
localStorage.points = JSON.stringify(points);
localStorage.lines = JSON.stringify(lines);
}
setInterval(saveAction, saveTimeout);
}
*/
</script>
<body></body>
</html>
|
Added wireframe_model.js version [0b9640f7fc].