Dienstag, 10. April 2012

hot fixes:

-transformation matrices
-object handling

in overall i had to do some parts new. ;) so i had in mind to change the entire object handling. and the mission was successful. ;)

now you are really able to change the translation, scaling and rotation anywhere in your code. ;)

thats the way you should go:

at first you need to call your liked vertex buffer, which can store (planes, any meshes, particles and so on) :

plane = initVERT_buffer();


as next you need to say the model where it should stay, how big it is and giving any rotation if you want to.

planeOBJ = createOBJECT(pos,scale,rot);


if you want to change the transformation you need to say, in this case:


var pos = [0.0,0.0,-10.0];
var rot = [0.0,0.0,0.0];
var  scale = [0.0,0.0,0.0];
transform(pos,scale,rot, planeOBJ  );


and last but not least, the rendering (this should stay in the draw function or in any related ones, of course you could either write that in the loop function):

render( plane,texture, planeOBJ );


http://www.aries-lenov.com/projekte/webgl/dev/LSDX/LSD01.php

http://www.aries-lenov.com/projekte/webgl/dev/LSDX/LSD.zip

perhaps im going to activate with tomorrow the new gpu particle system...

stay tuned...
greetz
dirk








Keine Kommentare:

Kommentar veröffentlichen