How to use the @pixi/core.Texture.WHITE function in @pixi/core

To help you get started, we’ve selected a few @pixi/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pixijs / pixi.js / packages / mesh-extras / src / SimplePlane.js View on Github external
constructor(texture, verticesX, verticesY)
    {
        const planeGeometry = new PlaneGeometry(texture.width, texture.height, verticesX, verticesY);
        const meshMaterial = new MeshMaterial(Texture.WHITE);

        super(planeGeometry, meshMaterial);

        // lets call the setter to ensure all necessary updates are performed
        this.texture = texture;
    }
github pixijs / pixi.js / packages / graphics / src / Graphics.js View on Github external
_renderSpriteRect(renderer)
    {
        const rect = this.graphicsData[0].shape;

        if (!this._spriteRect)
        {
            this._spriteRect = new Sprite(new Texture(Texture.WHITE));
        }

        const sprite = this._spriteRect;
        const fillColor = this.graphicsData[0].fillColor;

        if (this.tint === 0xffffff)
        {
            sprite.tint = fillColor;
        }
        else if (this.tint !== this._prevRectTint || fillColor !== this._prevRectFillColor)
        {
            const t1 = tempColor1;
            const t2 = tempColor2;

            hex2rgb(fillColor, t1);
            hex2rgb(this.tint, t2);
github pixijs / pixi.js / packages / graphics / src / Graphics.js View on Github external
lineStyle(width = 0, color = 0, alpha = 1, alignment = 0.5, native = false)
    {
        this.lineTextureStyle(width, Texture.WHITE, color, alpha, null, alignment, native);

        return this;
    }
github pixijs / pixi.js / packages / graphics / src / Graphics.js View on Github external
    lineTextureStyle(width = 0, texture = Texture.WHITE, color = 0xFFFFFF, alpha = 1,
        matrix = null, alignment = 0.5, native = false)
    {
        if (this.currentPath)
        {
            this.startPoly();
        }

        const visible = width > 0 && alpha > 0;

        if (!visible)
        {
            this._lineStyle.reset();
        }
        else
        {
            if (matrix)
github pixijs / pixi.js / packages / graphics / src / styles / FillStyle.js View on Github external
/**
         * The alpha value used when filling the Graphics object.
         *
         * @member {number}
         * @default 1
         */
        this.alpha = 1;

        /**
         * The texture to be used for the fill.
         *
         * @member {string}
         * @default 0
         */
        this.texture = Texture.WHITE;

        /**
         * The transform aplpied to the texture.
         *
         * @member {string}
         * @default 0
         */
        this.matrix = null;

        /**
         * If the current fill is visible.
         *
         * @member {boolean}
         * @default false
         */
        this.visible = false;
github pixijs / pixi.js / packages / graphics / src / Graphics.js View on Github external
beginFill(color = 0, alpha = 1)
    {
        return this.beginTextureFill(Texture.WHITE, color, alpha);
    }
github pixijs / pixi.js / packages / mesh-extras / src / NineSlicePlane.js View on Github external
constructor(texture, leftWidth, topHeight, rightWidth, bottomHeight)
    {
        super(Texture.WHITE, 4, 4);

        this._origWidth = texture.orig.width;
        this._origHeight = texture.orig.height;

        /**
         * The width of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane
         *
         * @member {number}
         * @override
         */
        this._width = this._origWidth;

        /**
         * The height of the NineSlicePlane, setting this will actually modify the vertices and UV's of this plane
         *
         * @member {number}