Comments (4)
Here's the code reference for v8 filters assignment:
Because assigning filters
to []
means that internally hasFilters
is false
in that function. So this is called:
this.removeEffect(this._filters.effect);
returnFilterEffect(this._filters.effect);
this._filters.effect = null;
Then when you obj.filters.push(filter)
later, the effect is never getting set.
@GoodBoyDigital thoughts? Should the filters array be a Proxy object instead?
from pixijs.
this is a bit of a tricky one as generally! We want to not have to cause filters to break batching, so we check at the time of assignment if there are actually any filters. this is done to not have to check the whole scene graph for filter changes each frame.
this means currently the following:
container.filters = [] // no filters - s oskipped
container.filters.push(filter) // this is not watched, so still thinks there are no filters
this best way is to always assign the filters directly:
container.filters = [] // no filters
container.filters = [filter] // will add a filter
i know its a bit weird but, perf wise i know devs use this container.filters = []
syntax to null out filters.
from pixijs.
to add to that :)
container.filters = [filter] // will add a filter
container.filters.pop() // will not render filters, but still break the batches
from pixijs.
Two ideas how we could enforce this:
- Have
filters
getter type asreadonly Filters[]
type - Do
Object.freeze
on the setter input to keep users from manipulating the array at runtime
from pixijs.
Related Issues (20)
- Virus detected when I try to download PixiJS HOT 2
- Bug: [v8] Missing information on Migration guide for v8 or in the Blog post of v8 HOT 3
- Bug: [v8] Rollup export build error after upgrade to v8 - working on v7 HOT 4
- Bug: WEBGL: INVALID_VALUE: shaderSource: string not ASCII (Older chrome version) HOT 6
- Bug: BaseRenderTexture no longer exists in v8 HOT 1
- Bug: Graphics with only strokes that don't have a closePath, but an event is fired where a closePath would have been
- Bug: BindGroup setResource called with null HOT 2
- Bug: Reloading an Animated Sprite breaks rendering HOT 3
- Bug: Some link in https://pixijs.download/v8.0.1/docs/rendering.AutoDetectOptions.html not working HOT 1
- Bug: HTMLText does not render
- Bug: v8 migration guide missing key info about several changes from v7 HOT 2
- Bug: Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support HOT 3
- Bug: [v8 regression] initial text rendering much slower than in v7 HOT 3
- Bug: the demo links can't open
- Feature Request: caching bitmap fonts in client? HOT 11
- Bug: Cannot read property 'getExtension' of undefined
- Bug: [v8] `text.style.fill === null` when `TextStyle` is reused instead of `TextStyleOptions` HOT 2
- Bug: [v8] BpuBufferSystem.onBufferDestroy contains null gpuBuffer when destroying via react hook HOT 3
- Bug: [v8 regression] pointerevents can drastically cut performance HOT 2
- Is there a way to simulate 3d projection/rotation in Pixi v8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pixijs.