Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


BortelsBortels Mod
edited November 2011 in Suggestions Posts: 1,557

So - making a "Star Wars" text crawl (because, yes, I'm that kind of a dork)... I realized I can't do it the easy way.

We have translate, rotate, and scale - but no skew (or distort). Skew would make all sorts of pseudo-3D stuff much easier.

If you're in safari (even mobile safari!) - check it out (if you have a really new version of chrome, but not TOO new, it may work as well)

Either that or a matrix transformation, but those are seriously scary.


  • BortelsBortels Mod
    Posts: 1,557

    Meh - he used a "perspective" cheat.

    What I really want is to transform a square into a trapezoid. I mean - I can (and will!) do it mathematically. I'd just rather have a transform take care of it for me.

  • SimeonSimeon Admin Mod
    Posts: 5,782

    We can add shearX and shearY functions that mirror processing's. We might as well throw in applyMatrix() and overload rotate() to do axis-angle rotations.

    translate() already accepts a z parameter, it's just not documented.

  • BortelsBortels Mod
    Posts: 1,557

    The more you emulate of processing's API, the more I can steal from their example code. RAWR!

  • SimeonSimeon Admin Mod
    edited November 2011 Posts: 5,782

    Actually I just looked and you can call rotate as follows:

    rotate( angle, x, y, z )

    Where x, y, z are the axis to rotate around. I forgot I implemented this. (And it's not documented on purpose.)

  • BortelsBortels Mod
    Posts: 1,557

    !!! Neat! I have something to mess with tomorrow then! :-)

    (I had suspected that this might have been floating around in there - you've mentioned the graphics API is modeled after processing, so to have it missing was odd)

Sign In or Register to comment.