Introducing the new PJS Object: PVector!

Well technically, I’ve already talked about this object a couple of times week alone.  There were some major issues with some of my code.  Mainly, certain parts just stopped working while I was trying to implement it from it’s lone source to the actual processing.js hub.  With a lot of help from Al (AKA F1LT3R),  I was able to debug most of my problems.  The resulting new processing.js library can be found in my repository.   The actual changes can be noted in the diff section.  Some of the additions in that section weren’t actually mine (I think they’re MinyXO’s; something about forking his repository) , but for some reason aren’t being seen by the repositories.  I’ve no clue how that happened but only the PVector part is what I’ve done (the big long green part at the bottom).

I do have some working demos; mostly just the examples given by the Processing reference page.

Add()   ver 1, ver 2
Sub()   ver 1, ver 2
Mult()  ver 1, ver 2
Div()   ver 1, ver 2

They’re definitely not as good as Andor’s 0.1 Release Demos.  I was looking for something more visual that would involve acceleration and velocity.  But, I wasn’t able to finish the whole object.  I’ve still got to work out on returning objects to be used.  Even with ideas from F1LT3R, returning objects is still giving me problems.

Earlier problems were resolved with the re-addition of “this”.  Sorry Dave, but it was simply easier to keep it in.  With the proper use of “this”, my functions started operating as normal again.

Looking ahead…

For 0.2, I’ve got to finish and work out the kinks out of PVector and I’ve also signed up for more.  Click here for the list of items that still need work.  When I finish PVector, I will probably focus on beginCamera(), camera(), and endCamera() functions.

Advertisements

2 Responses to Introducing the new PJS Object: PVector!

  1. F1LT3R says:

    Just re-checked your examples and it looks like you got things working before going to sleep? I’m getting three circles on both your vector functions…

    in…
    http://matrix.senecac.on.ca/~mnmedel/Processing-JS/pvector/pvector_add1.html
    &&
    http://matrix.senecac.on.ca/~mnmedel/Processing-JS/pvector/pvector_add2.html

  2. Pingback: Obsolete already?! « The Crazed Mind of an Aspiring Developer

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: