Packs an additive colour into the form the attribute expects.
red, 0 to 1
green, 0 to 1
blue, 0 to 1
how much to add to the sprite's own alpha, 0 to 1; usually 0
import { packColorAdd } from '@datamoc/mw_games/two-d/render';import { TintedSprite } from '@datamoc/mw_games/two-d/render';declare const rat: TintedSprite;rat.colorAdd = packColorAdd(0, 1, 0); // pull the sprite towards pure green Copy
import { packColorAdd } from '@datamoc/mw_games/two-d/render';import { TintedSprite } from '@datamoc/mw_games/two-d/render';declare const rat: TintedSprite;rat.colorAdd = packColorAdd(0, 1, 0); // pull the sprite towards pure green
Packs an additive colour into the form the attribute expects.