This repository has been archived by the owner on Feb 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package pixi.filters.alpha; | ||
|
||
import pixi.core.renderers.webgl.filters.Filter; | ||
|
||
@:native("PIXI.filters.AlphaFilter") | ||
extern class AlphaFilter extends Filter { | ||
|
||
/** | ||
* Simplest filter - applies alpha | ||
* | ||
* Use this instead of Container's alpha property to avoid visual layering of individual elements. | ||
* AlphaFilter applies alpha evenly across the entire display object and any opaque elements it contains. | ||
* If elements are not opaque, they will blend with each other anyway. | ||
* | ||
* Very handy if you want to use common features of all filters: | ||
* | ||
* 1. Assign a blendMode to this filter, blend all elements inside display object with background. | ||
* | ||
* 2. To use clipping in display coordinates, assign a filterArea to the same container that has this filter. | ||
* | ||
* @class | ||
* @extends PIXI.Filter | ||
* @memberof PIXI.filters | ||
*/ | ||
|
||
/** | ||
* @param {Float} [alpha=1] Amount of alpha from 0 to 1, where 0 is transparent | ||
*/ | ||
function new(?alpha:Float); | ||
|
||
/** | ||
* Coefficient for alpha multiplication | ||
* | ||
* @member {Float} | ||
* @default 1 | ||
*/ | ||
var alpha:Float; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package pixi.filters.noise; | ||
|
||
import pixi.core.renderers.webgl.filters.Filter; | ||
|
||
@:native("PIXI.filters.NoiseFilter") | ||
extern class NoiseFilter extends Filter { | ||
|
||
|
||
/** | ||
* @author Vico @vicocotea | ||
* original filter: https://github.com/evanw/glfx.js/blob/master/src/filters/adjust/noise.js | ||
*/ | ||
|
||
/** | ||
* A Noise effect filter. | ||
* | ||
* @class | ||
* @extends PIXI.Filter | ||
* @memberof PIXI.filters | ||
*/ | ||
|
||
/** | ||
* @param {Float} noise - The noise intensity, should be a normalized value in the range [0, 1]. | ||
* @param {Float} seed - A random seed for the noise generation. Default is `Math.random()`. | ||
*/ | ||
function new(?noise:Float, ?seed:Float); | ||
|
||
/** | ||
* The amount of noise to apply, this value should be in the range (0, 1]. | ||
* | ||
* @member {Float} | ||
* @default 0.5 | ||
*/ | ||
var noise:Float; | ||
|
||
/** | ||
* A seed value to apply to the random noise generation. `Math.random()` is a good value to use. | ||
* | ||
* @member {Float} | ||
*/ | ||
var seed:Float; | ||
} |