How to use the @pixi/utils.deprecation function in @pixi/utils

To help you get started, we’ve selected a few @pixi/utils 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 / core / src / AbstractRenderer.js View on Github external
constructor(system, options)
    {
        super();

        // Add the default render options
        options = Object.assign({}, settings.RENDER_OPTIONS, options);

        // Deprecation notice for renderer roundPixels option
        if (options.roundPixels)
        {
            settings.ROUND_PIXELS = options.roundPixels;
            deprecation('5.0.0', 'Renderer roundPixels option is deprecated, please use PIXI.settings.ROUND_PIXELS', 2);
        }

        /**
         * The supplied constructor options.
         *
         * @member {Object}
         * @readOnly
         */
        this.options = options;

        /**
         * The type of the renderer.
         *
         * @member {number}
         * @default PIXI.RENDERER_TYPE.UNKNOWN
         * @see PIXI.RENDERER_TYPE
github pixijs / pixi.js / bundles / pixi.js / src / useDeprecated.js View on Github external
get()
            {
                deprecation(v5, 'PIXI.extras.BitmapText class has moved to PIXI.BitmapText');

                return PIXI.BitmapText;
            },
        },
github pixijs / pixi.js / bundles / pixi.js / src / useDeprecated.js View on Github external
PIXI.Loader.addPixiMiddleware = function addPixiMiddleware(middleware)
    {
        deprecation(v5,
            'PIXI.loaders.Loader.addPixiMiddleware function is deprecated, use PIXI.loaders.Loader.registerPlugin'
        );

        return PIXI.loaders.Loader.registerPlugin({ use: middleware() });
    };
github pixijs / pixi.js / bundles / pixi.js / src / useDeprecated.js View on Github external
get()
            {
                deprecation('5.2.0', 'PIXI.GroupD8 namespace has moved to PIXI.groupD8');

                return PIXI.groupD8;
            },
        },
github pixijs / pixi.js / bundles / pixi.js / src / useDeprecated.js View on Github external
PIXI.Container.prototype.renderAdvancedWebGL = function renderAdvancedWebGL(renderer)
    {
        deprecation(v5, 'PIXI.Container.renderAdvancedWebGL method has moved to PIXI.Container.renderAdvanced');

        this.renderAdvanced(renderer);
    };
github pixijs / pixi.js / bundles / pixi.js / src / useDeprecated.js View on Github external
get()
            {
                deprecation(v5, 'PIXI.utils.SVG_SIZE property has moved to PIXI.resources.SVGResource.SVG_SIZE');

                return PIXI.SVGResource.SVG_SIZE;
            },
        },
github pixijs / pixi.js / bundles / pixi.js / src / useDeprecated.js View on Github external
BaseTexture.fromImage = function fromImage(canvas, crossorigin, scaleMode, scale)
    {
        deprecation(v5, 'PIXI.BaseTexture.fromImage method has been replaced with PIXI.BaseTexture.from');

        const resourceOptions = { scale, crossorigin };

        return BaseTexture.from(canvas, { scaleMode, resourceOptions });
    };
github pixijs / pixi.js / bundles / pixi.js / src / useDeprecated.js View on Github external
get()
            {
                deprecation(v5, 'PIXI.loaders.parseBitmapFontData function has moved to PIXI.BitmapFontLoader.parse');

                return PIXI.BitmapFontLoader.parse;
            },
        },
github pixijs / pixi.js / bundles / pixi.js / src / useDeprecated.js View on Github external
get()
            {
                deprecation(v5, 'PIXI.TRANSFORM_MODE property has been removed');

                return { STATIC: 0, DYNAMIC: 1 };
            },
        },
github pixijs / pixi.js / bundles / pixi.js / src / useDeprecated.js View on Github external
get()
            {
                deprecation(v5, 'PIXI.extras.AnimatedSprite class has moved to PIXI.AnimatedSprite');

                return PIXI.AnimatedSprite;
            },
        },