jPaq News

Removing Color.random() July 28th, 2011 @ 1:14:43

One of the things that I am removing from jPaq is Color.random(). The reason I am removing this is because I am adding hue, saturation, and lightness support. In addition, I am making it so that the r(...), g(...), b(...), a(...), h(...), s(...), and l(...) functions will accept a range of two numbers so that a random number in that range will be picked. With these updates on the horizon, anyone that currently uses Color.random() will find that these updates make this function a thing of the past.

Examples April 4th, 2011 @ 6:39:17

I am happy to announce that I finally have an examples section for this site.  As of right now, there are still some features that I would like to add, but I think the current layout will suffice for the time being.  On each example page you will find a description of the example and the code.  In many cases, the code will be accompanied by an execute button which will allow you to execute the code directly on the page.  If you would like to know how to use jPaq, please check out the examples page.

Next Version of jPaq March 31st, 2011 @ 7:25:33

I have been working hard for the past two months on thinking of what should be added to jPaq and how these things should be implemented.  I finally have most of the functions coded.  The next version of jPaq will definitely introduce cool functions that do a lot with a little bit of code.  In addition, I am going to try to add more DOM support to the next version.  In order to do this, I plan on using John Resig's Sizzle selector engine.  This is supposedly the same selector engine that jQuery runs on in order to select DOM elements by using CSS (1-3) selectors.  As of right now, the plan is to allow you (the user) to choose whether or not you want the Sizzle Selector Engine.  If selected, all of the additional DOM functions, such as the event handling functions and attribute functions will be attached to the instance of the jPaq class that will be returned from the selector function.  When everything is said and done, this version of jPaq will be what JXtension should have been.  As usual, what makes all of this even better is the fact that you will still be able to pick and choose which features you want in your version of jPaq.

Cloning Arrays March 12th, 2011 @ 7:02:27

The other day, I saw that someone posted a question about doing a deep copy in JavaScript.  Naturally, I thought I this would be very easy to do with the map function.  Just before I was about to say that the map function can be used with a one-line callback function, I noticed that someone else came up with a solution, but realized that it wouldn't work for a recursive array.  Therefore, I created a new version of Array.prototype.clone that will do a deep copy of the array if true is passed to it.  The benefit of this function is the fact that it does it can handle recursive arrays.  Unfortunately, I don't plan on just making a minor release with this addition and I haven't tested my other new features of jPaq enough to say that they are ready for the public.  Therefore, I have placed this code in JS Bin with an example just in case you are in desperate need of it.  As is stated in the comments, I still need to determine whether or not using recursion will prove beneficial.

Squares On A Checker Board March 7th, 2011 @ 9:48:33

Have you ever thought about how many squares are on a checker board?  Most people immediately come up with the number 64, but what about the bigger squares such as the entire board itself?  People usual think about the small one-by-one squares, but how about the two-by-two's and three-by-three's and so on?  In order to visually show how many squares are on a checker board or another type of rectangular game board, I wrote an example page and placed it on JS Bin at http://jsbin.com/checkerboard/2.  This example uses both jQuery and jPaq.  The following jPaq items were used: