Posts

jit.gl.camera basics

Image
jit.gl.camera is the camera object. It starts off at position 0, 0, 2. That's 2 units "out towards the screen". Z positive is out of the screen towards you. You can set the position using the @position attribute with floats. Or, you can drive the camera using WASD, QZ and the mouse. The default speed is a bit crazy, so you should probably lower it to about 10.  @ui_listen lets you actively drive, @ease lets you tweak the easing of the motion. There are a few other parameters to tweak but these are the main ones. @tripod stops the camera from twisting on the Z axis. 

load texture using path

  This is supposed to be a fast and automated way of loading textures into the jit.gl.texture... Honestly... it would be far quicker to drag the images onto the object as mentioned in the previous post, but I guess it is worth mentioning the "this patcher" object which provides the path for where the patch has been saved (displayed using the message object). It seems like you have to pass it a "path" message for it to output the info. Next we use sprintf to add the rock/Rock..............etc to the end of the path. I believe the %s represents the string that you pass into the sprintf object, eg the path. The symout is present to process any symbols or spaces as text. Prepend adds the "read" message in front of the full path of the texture file, this gets piped into the jit.gl.texture and when banged the texture should be loaded in. You might find you have to click some of the upper bits of the path to trigger it all. I find this method a bit extra, but I d...