viernes, 25 de octubre de 2013

Keys.bind Ejemplos. En particular salir y detener las simulaciones

//<- copy form here

//  [Esc] for Exit. 
Keys.bind("escape",{System.exit});

//  [Pause] for pause simulation 
Keys.bind("pause",{Sim.running = false}); 

//  [Enter] (in ten key) for resume simulation 
Keys.bind("enter",{Sim.running = true});

//  [menu] Toggle characters (menu opaqueness). 
Keys.bind("menu",{GUI.opaqueness = 0.9 - GUI.opaqueness}); //

//  [F7] for off the [F5], [F6], and [F8] 
Keys.bind("f7",{App.drawVertices = false; App.drawBodyCenters = false; App.drawCollisions = false;});  

//  [i] for "Drow inside object" ON (Inside) 
Keys.bind("i",{App.GUI.drawInside = true}); 

//  [o] for "Drow inside object" OFF (Outside only) 
Keys.bind("o",{App.GUI.drawInside = false}); 

//  [v] for the size of [F5], [F6] 1 <-> 2 <-> 4  (Vertices and points)
Keys.bind("v",{App.pointSize = ((((0 - 7) * App.pointSize) * App.pointSize) + ((33 * App.pointSize) - 14)) / 6});

//  [l (L)] for the width of Brush tool and [F8] red lines 1 <-> 2 <-> 4 (Lines) 
Keys.bind("l",{App.lineWidth = ((((0 - 7) * App.lineWidth) * App.lineWidth) + ((33 * App.lineWidth) - 14)) / 6});

//  <-copy end



de  

8-06-11 08:48:42

No hay comentarios:

Publicar un comentario