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].

    90     90   	
    91     91   
    92     92   
    93     93   var view_transform =
    94     94       [[1, 0, 0],
    95     95        [0, 1, 0],
    96     96        [0, 0, 1]];
    97         -    
    98         -
    99         -
   100         -
   101         -
   102         -
   103         -
   104     97   
   105     98               
   106     99   
   107    100   var key_state = {};
   108    101   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.
   109    102   
   110    103   function addKeyListener(keycode, func){
................................................................................
   337    330   					if(selected_points[i] == highlight_object){
   338    331   					   selected_points.splice(i, 1); // deselect point
   339    332   					   alreadySelected = true; 
   340    333   					   break; }}}
   341    334   			else{
   342    335   				selected_points.length = 0;}
   343    336   				
   344         -			if(!alreadySelected) selected_points.push(highlight_object); }
          337  +			if(!alreadySelected && highlight_object < points.length) selected_points.push(highlight_object); }
   345    338   
   346    339   		else if(!key_state[16] || !key_state[16].state)
   347    340   			selected_points.length = 0; }
   348    341   		
   349    342   		
   350    343   	else if(lasts && mouse_dragging ){  // drag actions
   351    344   		

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

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