-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
Conversation
bbazukun123
commented
Feb 8, 2024
- 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @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 }'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (args[1]) options.alpha = args[1]; | |
if (args[1] !== undefined) options.alpha = args[1]; |
// eslint-disable-next-line camelcase | ||
import { Color, ColorSource, deprecation, Filter, GlProgram, GpuProgram, UniformGroup, v8_0_0 } from 'pixi.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// 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'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!