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
(Code)
m (properties formatting)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
DynamicColor describes how a color channel will be dynamically updated. Mainly, it's a sum of sinusoid.
 +
 
=== Code ===
 
=== Code ===
 
----
 
----
Line 9: Line 11:
 
         blue clampUp 0.1 0 0.75       
 
         blue clampUp 0.1 0 0.75       
 
         alpha clampDown 0.2 0.5 0.5   
 
         alpha clampDown 0.2 0.5 0.5   
         red sequence 0.0 0.0 2 0 1 1 2 0 ...  
+
         red sequence 0.1 0.0 2 0 1 1 2 0 ...  
 
       end
 
       end
 
|}
 
|}
Line 17: Line 19:
 
|}
 
|}
 
Color Settings:
 
Color Settings:
<properties>
+
 
channels=red, green, blue, alpha
+
;channels: red, green, blue, alpha
functions=limits, sinusoid, clampUp, clampDown, sequence (repeatable, except for "limits" and "sequence")
+
;functions: limits, sinusoid, clampUp, clampDown, sequence (repeatable, except for "limits" and "sequence")
</properties>
+
  
 
===Functions===
 
===Functions===
Line 29: Line 30:
 
*2=active clampUp
 
*2=active clampUp
  
if both clampUp and clampDown are active, the value is (min+max)/2, if used with "sequence" they will have no effect
+
If both clampUp and clampDown are active, the value is (min+max)/2, if used with "sequence" they will have no effect.
  
 
'''sinusoid''' (starts at the max value)
 
'''sinusoid''' (starts at the max value)
  
the sum of a channel's sinusoids is clamped between 0 and 1
+
The sum of a channel's sinusoids is clamped between 0 and 1
  
 
Example syntax for use within dynamicColor:
 
Example syntax for use within dynamicColor:
Line 42: Line 43:
 
* [channel] clampDown [period] [offset] [width]
 
* [channel] clampDown [period] [offset] [width]
 
* [channel] sequence [period] [offset] [list of states...]
 
* [channel] sequence [period] [offset] [list of states...]
 +
 +
[[Category:Map Making]]
 +
[[Category:Map_Objects]]

Latest revision as of 03:08, 28 July 2012

DynamicColor describes how a color channel will be dynamically updated. Mainly, it's a sum of sinusoid.

Code[edit]


      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.1 0.0 2 0 1 1 2 0 ... 
      end

The valid parameters for dynamicColor are:

[channel] [function] [options]

Color Settings:

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

Functions[edit]

sequence (Can have three settings)

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

If both clampUp and clampDown are active, the value is (min+max)/2, if used with "sequence" they will have no effect.

sinusoid (starts at the max value)

The sum of a channel's sinusoids is clamped between 0 and 1

Example syntax for use within dynamicColor:

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