• Increase font size
  • Default font size
  • Decrease font size
Welcome, Guest
Username Password: Remember me

Physions 'ToolBox'. Info.
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Physions 'ToolBox'. Info.

Physions 'ToolBox'. Info. 6 years, 3 months ago #679

Just a note to people, about some features, that are possibly not really grasped, or you even knew was there! and it does not seem to be documented much.
(Things seem quiet, and I have more time on my hands now).

Dimitris, (the creator of Physion), has thrown together a bunch of usable Functions to
make certain tasks easier, without having to re-invent the wheel, if needed. When you
install, & load ,Physion, there is a '.script' file that is automatically loaded, and as such,
is placed in the ''...\Physion\data\scripts\autoload\' directory, off where Physion resides.
It is called 'ToolBox.script'. When you run Physion, these Functions are pre-loaded.

NOTE: If you saw a recent post of mine...
You will remember, (or find now), that viewing that script-file with something like
Windows-Notepad, will result in a messy hard-to-decipher view of the code.
However, using a proper code-editor makes things look & behave very well !

This coding adds additional 'functionality' excuse the pun, to your normal coding.
Have a look at the code within that script ! It will help you to adapt your own ideas !
I will explain just a few of the Functions within that script, to get you started.
For example, (there are many within)....

[1] Say you wanted a 'Rounded Corner Rectangle'. Start by creating a 'Rectangle' for eg. Now enter in the Command-Line under the Console....
createRoundedRect(item10, .4, .4);

Assuming it was 'item10'. A new shape is superimposed on top, but note that this
new shape is now a multi-pointed polygon. (See moving tools, to move out the way).

[2] This example, behaves differently ! (and there are others like it !).
This one automatically adds text (code) to an objects 'OnUpdate' event !
Say you want an object to be cyclically fading in an out, (sort of blinking)...
Create an object, like a Rectangle or Circle, for example. Noting it's item number.
Now type in the command-line...

Substituting the actual item-number ! Run the simulation & see what happens !
Now stop the simulation, and look at that object's 'OnUpdate' event. This was auto-
created by the Function (setBlinking()). Try changing the parameters now !

There are many Functions added by the 'Toolbox'. Check the code, and play with it.
Then you will realize, "Hey, I can make my own code, to do such-and-such",
and add to it.

Note also, that this very simple explanation mentions typing (entering) these various
functions into the 'Command-Line' interpreter, but you can use all these Functions,
by referring to them within your own coding.

Have a good day.
1x1 square diag = root-2. Cube diag = root-3. Beautiful !
Last Edit: 6 years, 3 months ago by Glenn555.
  • Page:
  • 1
Moderators: Lynxx, Glenn555
Time to create page: 0.09 seconds