Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

BlendModes consistency #131

Merged
merged 2 commits into from
Jul 4, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
docs.xml
node_modules/
samples/output/
.haxelib/
23 changes: 0 additions & 23 deletions src/pixi/core/display/BlendMode.hx

This file was deleted.

3 changes: 2 additions & 1 deletion src/pixi/core/graphics/Graphics.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package pixi.core.graphics;

import pixi.core.Pixi.BlendModes;
import pixi.core.textures.Texture;
import pixi.core.math.Point;
import pixi.core.math.shapes.Polygon;
Expand Down Expand Up @@ -75,7 +76,7 @@ extern class Graphics extends Container {
* @member {Int}
* @default CONST.BLEND_MODES.NORMAL;
*/
var blendMode:Int;
var blendMode:BlendModes;

/**
* Whether this shape is being used as a mask.
Expand Down
6 changes: 4 additions & 2 deletions src/pixi/core/renderers/canvas/CanvasRenderer.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package pixi.core.renderers.canvas;

import pixi.core.Pixi.BlendModes;
import pixi.core.Pixi.ScaleModes;
import pixi.core.renderers.canvas.utils.CanvasMaskManager;
import js.html.CanvasRenderingContext2D;

Expand Down Expand Up @@ -66,12 +68,12 @@ extern class CanvasRenderer extends SystemRenderer {
*
* @member {SCALE_MODE}
*/
var currentScaleMode:Int;
var currentScaleMode:ScaleModes;

/**
* Tracks the active blend mode for this renderer.
*
* @member {BLEND_MODES}
*/
var currentBlendMode:Int;
var currentBlendMode:BlendModes;
}
3 changes: 2 additions & 1 deletion src/pixi/core/renderers/webgl/WebGLRenderer.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package pixi.core.renderers.webgl;

import pixi.core.Pixi.BlendModes;
import pixi.core.display.Transform;
import pixi.core.renderers.webgl.utils.RenderTarget;
import pixi.core.textures.Texture;
Expand Down Expand Up @@ -101,7 +102,7 @@ extern class WebGLRenderer extends SystemRenderer {
*
* @param {Int} blendMode - the desired blend mode
*/
function setBlendMode(blendMode:Int):Void;
function setBlendMode(blendMode:BlendModes):Void;

/**
* Erases the active render target and fills the drawing area with a colour
Expand Down
3 changes: 2 additions & 1 deletion src/pixi/core/renderers/webgl/managers/BlendModeManager.hx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package pixi.core.renderers.webgl.managers;
import pixi.core.Pixi.BlendModes;

extern class BlendModeManager extends WebGLManager {

Expand All @@ -15,5 +16,5 @@ extern class BlendModeManager extends WebGLManager {
*
* @param blendMode {number} the blendMode, should be a Pixi const, such as BlendModes.ADD
*/
function setBlendMode(blendMode:Int):Void;
function setBlendMode(blendMode:BlendModes):Void;
}
4 changes: 2 additions & 2 deletions src/pixi/core/sprites/Sprite.hx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package pixi.core.sprites;

import pixi.core.Pixi.BlendModes;
import pixi.core.renderers.webgl.filters.Filter;
import js.html.VideoElement;
import js.html.CanvasElement;
import pixi.core.textures.BaseTexture;
import pixi.core.math.ObservablePoint;
import haxe.extern.EitherType;
import pixi.core.display.BlendMode;
import pixi.core.math.Point;
import pixi.core.textures.Texture;
import pixi.core.display.Container;
Expand Down Expand Up @@ -61,7 +61,7 @@ extern class Sprite extends Container {
* @member {Int}
* @default CONST.blendModes.NORMAL;
*/
var blendMode:BlendMode;
var blendMode:BlendModes;

/**
* The shader that will be used to render the sprite. Set to null to remove a current shader.
Expand Down
3 changes: 2 additions & 1 deletion src/pixi/mesh/Mesh.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package pixi.mesh;

import pixi.core.Pixi.BlendModes;
import pixi.core.math.Point;
import js.html.Uint16Array;
import pixi.core.Shader;
Expand Down Expand Up @@ -121,7 +122,7 @@ extern class Mesh extends Container {
* @member {Int}
* @default CONST.BLEND_MODES.NORMAL;
*/
var blendMode:Int;
var blendMode:BlendModes;

/**
* Triangles in canvas mode are automatically antialiased, use var value to force triangles to overlap a bit with each other.
Expand Down
3 changes: 2 additions & 1 deletion src/pixi/particles/ParticleContainer.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package pixi.particles;

import pixi.core.Pixi.BlendModes;
import pixi.core.textures.BaseTexture;
import pixi.core.display.Container;

Expand Down Expand Up @@ -57,7 +58,7 @@ extern class ParticleContainer extends Container {
* @default PIXI.BLEND_MODES.NORMAL
* @see PIXI.BLEND_MODES
*/
var blendMode:Int;
var blendMode:BlendModes;

/**
* Used for canvas renderering. If true then the elements will be positioned at the
Expand Down
3 changes: 2 additions & 1 deletion src/pixi/plugins/spine/core/SlotData.hx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package pixi.plugins.spine.core;

import pixi.core.Pixi.BlendModes;
import pixi.plugins.spine.core.utils.Color;

@:native("PIXI.spine.core.SlotData")
Expand All @@ -10,7 +11,7 @@ extern class SlotData {
var boneData:BoneData;
var color:Color;
var attachmentName:String;
var blendMode:Int;
var blendMode:BlendModes;

function new(index:Int, name:String, boneData:BoneData);
}