This wiki is archived and useful information is being migrated to the main bzflag.org website

Difference between revisions of "DynamicColor"

From BZFlagWiki
Jump to: navigation, search
(New page: === Code === {| | dynamicColor name example_dyncol red limits 0 1 green sinusoid 0.1 0 0.25 blue clampUp 0.1 0 0.75 ...)
 
(Code)
Line 1: Line 1:
 
=== Code ===
 
=== Code ===
 +
----
 
{|
 
{|
 
|
 
|
Line 12: Line 13:
 
|}
 
|}
 
The valid parameters for dynamicColor are:
 
The valid parameters for dynamicColor are:
# min/max limits
+
{|
# period, offset, weight
+
[channel] [command] [options]
# period, offset, width
+
|}
# period, offset, width
+
# period, offset, list of states
+
 
+
<properties>
+
 
Color Settings:
 
Color Settings:
+
<properties>
Channels: red, green, blue, alpha
+
channels=red, green, blue, alpha
- Commands: limits, sinusoid, clampUp, clampDown, sequence (repeatable, except "limits" and "sequence")
+
commands=limits, sinusoid, clampUp, clampDown, sequence (repeatable, except for "limits" and "sequence")
        # except for "limits" and "sequence", the commands are repeatable
+
        # if "sequence" used then clampUps/clampDowns have no effect
+
        # sequences can use three states (0, 1, 2).
+
        #  0 - equivalent to an active clampDown
+
        #  1 - equivalent to no clamps
+
        #  2 - equivalent to an active clampUp
+
        # if both clampUp and clampDown are active, the value is (min+max)/2
+
 
+
        # the sinusoid function starts at the max value
+
        # the sum of a channel's sinusoids is clamped between 0 and 1
+
 
</properties>
 
</properties>
 +
 +
if "sequence" uses clampUps and clampDowns together they will have no effect
 +
 +
"sequence" can use three states (0, 1, 2).
 +
 +
*0 = active clampDown
 +
*1 = no clamps
 +
*2 = active clampUp
 +
 +
if both clampUp and clampDown are active, the value is (min+max)/2
 +
 +
sinusoid function starts at the max value
 +
the sum of a channel's sinusoids is clamped between 0 and 1
 +
 +
Example syntax for use within dynanicColor:
 +
 +
* [channel] limits min/max limits
 +
* [channel] sinusoid period, offset, weight
 +
* [channel] clampUp period, offset, width
 +
* [channel] clampDown period, offset, width
 +
* [channel] sequence period, offset, list of states

Revision as of 05:41, 10 October 2007

Code


      dynamicColor
        name example_dyncol
        red limits 0 1               
        green sinusoid 0.1 0 0.25    
        blue clampUp 0.1 0 0.75      
        alpha clampDown 0.2 0.5 0.5  
        red sequence 0.0 0.0 2 0 1 1 2 0 ... 
      end

The valid parameters for dynamicColor are:

[channel] [command] [options]

Color Settings:

channels red, green, blue, alpha
commands limits, sinusoid, clampUp, clampDown, sequence (repeatable, except for "limits" and "sequence")


if "sequence" uses clampUps and clampDowns together they will have no effect

"sequence" can use three states (0, 1, 2).

  • 0 = active clampDown
  • 1 = no clamps
  • 2 = active clampUp

if both clampUp and clampDown are active, the value is (min+max)/2

sinusoid function starts at the max value the sum of a channel's sinusoids is clamped between 0 and 1

Example syntax for use within dynanicColor:

  • [channel] limits min/max limits
  • [channel] sinusoid period, offset, weight
  • [channel] clampUp period, offset, width
  • [channel] clampDown period, offset, width
  • [channel] sequence period, offset, list of states