Page 1 of 1

Celx objects

Posted: 17.03.2011, 19:28
by jan stegehuis
On my celestia space I wrote a page on scripting with objects. Objects are a specific kind of script that is highly reusable. You just put the code in some library file and you can (re)use it's functionality whereever you want. As an example, the page creates a celx color class that adds a color type to celx allowing to specify colors in the more common notations:

  • digital 8-bit rgb : red = rgb(255, 255, 0) and
  • hexadecimal rgb : red = "#FFFF00" or red = "red";
to store colors for later (re)use and to convert between notations. Arithmetic rgb - Celestia's default notation - is also supported.

You don't need to read and understand the page; you can just download the script and demo files and use them. They are available for download at the bottom of the page

There is also an object version available of the menu script.


There are at least two more objects comming up: a datetime object and a list object.
I'll announce them in this post when they are done.


Jan

Re: Celx objects

Posted: 15.04.2011, 16:34
by Marco Klunder
Jan,

I was just checking out the working of your colordemo, but I run into this error:

colordemo.jpg

Marco

Re: Celx objects

Posted: 17.04.2011, 13:00
by jan stegehuis
Thanks Marco,

Thought I could do this - nesting comment blocks - but I must have been mixing things up. :?
Changed color.celx so things should be running correctly now as version 1.1 on the objects page ( https://sites.google.com/site/jansceles ... /4-objects )

Kind regards
Jan