Skip to content

Commit

Permalink
Remove v6 deprecations (pixijs#8415)
Browse files Browse the repository at this point in the history
  • Loading branch information
bigtimebuddy committed Jun 21, 2022
1 parent 2399fdd commit fb15c78
Show file tree
Hide file tree
Showing 21 changed files with 92 additions and 520 deletions.
18 changes: 0 additions & 18 deletions packages/app/src/Application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { autoDetectRenderer, extensions, ExtensionType } from '@pixi/core';
import type { Rectangle } from '@pixi/math';
import type { IRendererOptionsAuto, IRenderer } from '@pixi/core';
import type { IDestroyOptions } from '@pixi/display';
import { deprecation } from '@pixi/utils';

/**
* Any plugin that's usable for Application should contain these methods.
Expand Down Expand Up @@ -110,23 +109,6 @@ export class Application
});
}

/**
* Use the {@link PIXI.extensions.add} API to register plugins.
* @deprecated since 6.5.0
* @static
* @param {PIXI.IApplicationPlugin} plugin - Plugin being installed
*/
static registerPlugin(plugin: IApplicationPlugin): void
{
// #if _DEBUG
deprecation('6.5.0', 'Application.registerPlugin() is deprecated, use extensions.add()');
// #endif
extensions.add({
type: ExtensionType.Application,
ref: plugin,
});
}

/** Render the current stage. */
public render(): void
{
Expand Down
28 changes: 6 additions & 22 deletions packages/canvas-renderer/src/CanvasObjectRendererSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Matrix } from '@pixi/math';
import type { CanvasRenderer } from './CanvasRenderer';
import { BaseRenderTexture, CanvasResource, IRendererRenderOptions, ISystem, RenderTexture } from '@pixi/core';
import { BLEND_MODES } from '@pixi/constants';
import { CanvasRenderTarget, deprecation, hex2string, rgb2hex } from '@pixi/utils';
import { CanvasRenderTarget, hex2string, rgb2hex } from '@pixi/utils';
import { DisplayObject } from 'pixi.js';
import { CrossPlatformCanvasRenderingContext2D } from './CanvasContextSystem';

Expand All @@ -30,7 +30,7 @@ export class CanvasObjectRendererSystem implements ISystem
* @param displayObject - The object to be rendered.
* @param options - the options to be passed to the renderer
*/
public render(displayObject: DisplayObject, options?: IRendererRenderOptions | RenderTexture | BaseRenderTexture): void
public render(displayObject: DisplayObject, options?: IRendererRenderOptions): void
{
const renderer = this.renderer;

Expand All @@ -48,26 +48,10 @@ export class CanvasObjectRendererSystem implements ISystem

if (options)
{
if (options instanceof RenderTexture || options instanceof BaseRenderTexture)
{
// #if _DEBUG
deprecation('6.0.0', 'CanvasRenderer#render arguments changed, use options instead.');
// #endif

/* eslint-disable prefer-rest-params */
renderTexture = options;
clear = arguments[2];
transform = arguments[3];
skipUpdateTransform = arguments[4];
/* eslint-enable prefer-rest-params */
}
else
{
renderTexture = options.renderTexture;
clear = options.clear;
transform = options.transform;
skipUpdateTransform = options.skipUpdateTransform;
}
renderTexture = options.renderTexture;
clear = options.clear;
transform = options.transform;
skipUpdateTransform = options.skipUpdateTransform;
}

// can be handy to know!
Expand Down

0 comments on commit fb15c78

Please sign in to comment.