Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Color Overlay Filter Deprecations #418

Merged
merged 3 commits into from
Feb 14, 2024

Conversation

bbazukun123
Copy link
Collaborator

  • Add deprecations for the Color Overlay filter.
  • Use GpuProgram.from and GlProgram.from for caching.

constructor(options: ColorOverlayFilterOptions = {})
constructor(options?: ColorOverlayFilterOptions);
/**
* @deprecated since 8.0.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @deprecated since 8.0.0
* @deprecated since 6.0.0

if (typeof options === 'number' || Array.isArray(options) || options instanceof Float32Array)
{
// eslint-disable-next-line max-len
deprecation(v8_0_0, 'ColorOverlayFilter constructor params are now options object. See params: { color, alpha }');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
deprecation(v8_0_0, 'ColorOverlayFilter constructor params are now options object. See params: { color, alpha }');
deprecation('6.0.0', 'ColorOverlayFilter constructor params are now options object. See params: { color, alpha }');


options = { color: options };

if (args[1]) options.alpha = args[1];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (args[1]) options.alpha = args[1];
if (args[1] !== undefined) options.alpha = args[1];

Comment on lines 1 to 2
// eslint-disable-next-line camelcase
import { Color, ColorSource, deprecation, Filter, GlProgram, GpuProgram, UniformGroup, v8_0_0 } from 'pixi.js';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// eslint-disable-next-line camelcase
import { Color, ColorSource, deprecation, Filter, GlProgram, GpuProgram, UniformGroup, v8_0_0 } from 'pixi.js';
import { Color, ColorSource, deprecation, Filter, GlProgram, GpuProgram, UniformGroup } from 'pixi.js';

Copy link
Member

@bigtimebuddy bigtimebuddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bigtimebuddy bigtimebuddy merged commit 0b900f0 into main Feb 14, 2024
2 checks passed
@bigtimebuddy bigtimebuddy deleted the chore-deprecation-color-overlay branch February 14, 2024 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants