Check-in [17fe78b11b]
Not logged in
Overview
SHA1:17fe78b11be639451e6077c2217e7bbee4c1b863
Date: 2012-12-24 04:23:37
User: Derek
Comment:(no comment)
Timelines: family | ancestors | descendants | both | trunk
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2012-12-24
17:03
[d59b29f2f5] changed drawing of axes to provide more visual cues for perspective (user: Derek, tags: trunk)
04:23
[17fe78b11b] (no comment) (user: Derek, tags: trunk)
03:52
[7c222a4184] moved globals to beginning of draw.html added some null checking to matrix_vector_lib.js fixed small bugs (zooming in to much messes up axis draw) (user: Derek, tags: trunk)
Changes

Modified draw.html from [97f687849d] to [6762019ffe].

93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
...
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
var view_transform =
    [[1, 0, 0],
     [0, 1, 0],
     [0, 0, 1]];
    







            

var key_state = {};
var key_state_augmentation_timeout = 150; // the permissible time in milliseconds since the last key event to still allow the key state to augment instead of clearing.

function addKeyListener(keycode, func){
    if(!key_state[keycode]) key_state[keycode] = {};
    
    var key_obj = key_state[keycode];
................................................................................
					if(selected_points[i] == highlight_object){
					   selected_points.splice(i, 1); // deselect point
					   alreadySelected = true; 
					   break; }}}
			else{
				selected_points.length = 0;}
				
			if(!alreadySelected) selected_points.push(highlight_object); }

		else if(!key_state[16] || !key_state[16].state)
			selected_points.length = 0; }
		
		
	else if(lasts && mouse_dragging ){  // drag actions
		







<
<
<
<
<
<
<







 







|







93
94
95
96
97
98
99







100
101
102
103
104
105
106
...
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
var view_transform =
    [[1, 0, 0],
     [0, 1, 0],
     [0, 0, 1]];

            








var key_state = {};
var key_state_augmentation_timeout = 150; // the permissible time in milliseconds since the last key event to still allow the key state to augment instead of clearing.

function addKeyListener(keycode, func){
    if(!key_state[keycode]) key_state[keycode] = {};
    
    var key_obj = key_state[keycode];
................................................................................
					if(selected_points[i] == highlight_object){
					   selected_points.splice(i, 1); // deselect point
					   alreadySelected = true; 
					   break; }}}
			else{
				selected_points.length = 0;}
				
			if(!alreadySelected && highlight_object < points.length) selected_points.push(highlight_object); }

		else if(!key_state[16] || !key_state[16].state)
			selected_points.length = 0; }
		
		
	else if(lasts && mouse_dragging ){  // drag actions
		

Modified matrix_vector_lib.js from [0be33777c1] to [461a3190dc].

256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
//
// equation at:
// http://inside.mines.edu/~gmurray/ArbitraryAxisRotation/ArbitraryAxisRotation.html
// creates a rotation matrix about the given vector.
//
function vector_rotation(vector, s){
	if(!vector) throw "vector argument to vector_rotation missing";
	if(!s) throw "angle argument to vector_rotation missing";
	
    var len = Math.sqrt(vector[0]*vector[0]
                        + vector[1]*vector[1]
                        + vector[2]*vector[2]);

    var u = vector[0]/len;
    var v = vector[1]/len;







|







256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
//
// equation at:
// http://inside.mines.edu/~gmurray/ArbitraryAxisRotation/ArbitraryAxisRotation.html
// creates a rotation matrix about the given vector.
//
function vector_rotation(vector, s){
	if(!vector) throw "vector argument to vector_rotation missing";
	if(s === null || s === undefined) throw "angle argument to vector_rotation missing";
	
    var len = Math.sqrt(vector[0]*vector[0]
                        + vector[1]*vector[1]
                        + vector[2]*vector[2]);

    var u = vector[0]/len;
    var v = vector[1]/len;