Răsfoiți Sursa

Added blend mode to multiple pages of component docs

Björn Ritzl 5 ani în urmă
părinte
comite
4f1794f4b2

+ 14 - 3
docs/en/manuals/label.md

@@ -54,7 +54,7 @@ Note that the default material has shadow rendering disabled for performance rea
 : The pivot of the text. Use this to change text alignment (see below).
 
 *Blend Mode*
-: The blend mode to use when rendering this component.
+: The blend mode to use when rendering the label.
 
 *Line Break*
 : Text alignment follows the pivot setting and setting the this property allows the text to flow over several lines. The width of the component determines where the text will wrap. Note that there has to be a space in the text for it to break.
@@ -65,7 +65,19 @@ Note that the default material has shadow rendering disabled for performance rea
 *Material*
 : The material to use for rendering this label. Make sure to select a material that is created for the font type that you use (bitmap, distance field or BMFont).
 
-## Pivot and alignment
+### Blend modes
+The *Blend Mode* property defines how the sprite should be blended with the graphics behind it. These are the available blend modes and how they are calculated:
+
+Alpha
+: Normal blending: a~0~ * rgb~0~ + (1 - a~0~) * rgb~1~
+
+Add
+: Brighten the background with the color values of the corresponding sprite pixels: rgb~0~ + rgb~1~
+
+Multiply
+: Darken the background with values of the the corresponding sprite pixels: rgb~0~ * rgb~1~
+
+### Pivot and alignment
 
 By setting the *Pivot* property you can change the alignment mode for the text.
 
@@ -122,4 +134,3 @@ function init(self)
     go.set("#my_label", "scale.x", scale_x * 2)
 end
 ```
-

+ 13 - 0
docs/en/manuals/particlefx.md

@@ -120,6 +120,19 @@ Inherit Velocity
 Stretch With Velocity
 : Check to scale any particle stretch in the direction of movement.
 
+### Blend modes
+
+The *Blend Mode* property defines how the particles should be blended with the graphics behind it. These are the available blend modes and how they are calculated:
+
+Alpha
+: Normal blending: a~0~ * rgb~0~ + (1 - a~0~) * rgb~1~
+
+Add
+: Brighten the background with the color values of the corresponding particle pixels: rgb~0~ + rgb~1~
+
+Multiply
+: Darken the background with values of the the corresponding particle pixels: rgb~0~ * rgb~1~
+
 ## Keyable emitter properties
 
 These properties have two fields: a value and a spread. The spread is a variation which is applied randomly for each spawned particle. E.g. if the value is 50 and the spread is 3, each spawned particle will get a value between 47 and 53 (50 +/- 3).

+ 16 - 4
docs/en/manuals/sprite.md

@@ -16,16 +16,28 @@ The Sprite component can use either an [Atlas](/manuals/atlas) or a [Tile Source
 Apart from the properties *Id*, *Position* and *Rotation* the following component specific properties exist:
 
 *Image*
-: The atlas or tilesource resource to use for this sprite.
+: The atlas or tilesource resource to use for the sprite.
 
 *DefaultAnimation*
-: The animation to use for this sprite.
+: The animation to use for the sprite.
 
 *Material*
-: The material to use for rendering this sprite.
+: The material to use for rendering the sprite.
 
 *Blend Mode*
-: The blend mode to use when rendering this component.
+: The blend mode to use when rendering the sprite.
+
+### Blend modes
+The *Blend Mode* property defines how the sprite should be blended with the graphics behind it. These are the available blend modes and how they are calculated:
+
+Alpha
+: Normal blending: a~0~ * rgb~0~ + (1 - a~0~) * rgb~1~
+
+Add
+: Brighten the background with the color values of the corresponding sprite pixels: rgb~0~ + rgb~1~
+
+Multiply
+: Darken the background with values of the the corresponding sprite pixels: rgb~0~ * rgb~1~
 
 ## Runtime manipulation
 

+ 25 - 0
docs/en/manuals/tilemap.md

@@ -63,6 +63,31 @@ if tile == 2 then
 end
 ```
 
+## Tilemap properties
+
+Apart from the properties *Id*, *Position*, *Rotation* and *Scale* the following component specific properties exist:
+
+*Tile Source*
+: The tilesource resource to use for the tilemap.
+
+*Material*
+: The material to use for rendering the tilemap.
+
+*Blend Mode*
+: The blend mode to use when rendering the tilemap.
+
+### Blend modes
+The *Blend Mode* property defines how the sprite should be blended with the graphics behind it. These are the available blend modes and how they are calculated:
+
+Alpha
+: Normal blending: a~0~ * rgb~0~ + (1 - a~0~) * rgb~1~
+
+Add
+: Brighten the background with the color values of the corresponding sprite pixels: rgb~0~ + rgb~1~
+
+Multiply
+: Darken the background with values of the the corresponding sprite pixels: rgb~0~ * rgb~1~
+
 ### Changing properties
 
 A tilemap has a number of different properties that can be manipulated using `go.get()` and `go.set()`: