JXtension 1.1 - Changes In Store

A place for comments, questions and concerns about the new JavaScript Archive, JXtension.

JXtension 1.1 - Changes In Store

Postby westc » December 16th, 2009, 5:09 pm

Now that the semester is almost over, I can finally begin focusing on fixing the problems that I was encountering with JXtension. Don't worry, the problems that I was having are virtually transparent to the end users and programmers that looked at the JXDocs. On the other hand, I want to remove all the issues that I have with JXtension. Therefore, JXtension 1.1 will do the one thing that I hate about many programming languages; it will mark the end of quite a few object and function names.

Many people have advised me to not pollute the JavaScript variable space with various names. Therefore, many of the standalone function names and the $_GET object will now be part of the JX object. Oh, by the way, the JXtension object itself has been renamed to JX in version 1.1.
westc
Site Admin
 
Posts: 27
Joined: April 2nd, 2009, 12:34 am

Minor Update for v1.1.2

Postby westc » January 27th, 2010, 11:01 am

I have come to realize that JavaScript's random number generator doesn't appear to be that random when it comes to creating colors (especially in Internet Explorer). That said, I will be modifying the Color.random() function so that the color produced is a bit more "random". The code for Color.random() is currently as follows:
Code: Select all
Color.random = function()
{
   return new Color(Math.random() * 255, Math.random() * 255, Math.random() * 255);
};


For JXtension version 1.1.2, I will be changing it to the following:
Code: Select all
Color.random = function()
{
   return new Color(("00000" + Math.round(Math.random() * 16777215).toString(16))
      .slice(-6));
};


As far as I can tell, this will produce better results but other web developers may have a different opinion. If you do, please do not hesitate to speak up and tell me what course of action you would take.
westc
Site Admin
 
Posts: 27
Joined: April 2nd, 2009, 12:34 am


Return to JXtension

Who is online

Users browsing this forum: No registered users and 1 guest

cron