Comments (15)
@ivanpopelyshev I'm pretty new to PIXI so I'm trying. So far I've found that the invocation of PIXI.RenderTexture.create()
is not passing the right arguments, its currently passing:
this.renderTexture = PIXI.RenderTexture.create(width, height, resolution);
but according to the PIXI docs, resolution
is the 4th arg and the 3rd is SCALE_MODE
. I've updated the code to:
this.renderTexture = PIXI.RenderTexture.create(width, height, PIXI.settings.SCALE_MODE, resolution);
but the output is the same. Not sure where to go from here TBH
from layers.
You've done the ritual. I'm looking at it.
from layers.
Yeah, you've found whats wrong with pixi-layers, good job!
As for lights improvement, i'll do it after v5 release and after i move layers to v5. There'll be new demos!
Lights are experimental stuff, its very hard to add them as well as other experimental plugins: projections, heaven. @djmisterjon knows more than others about it. Do you want an invite to pixijs slack? send me an email if you want it.
from layers.
any ideas?
from layers.
what about autoResize, CSS set width/height, like pixi does it?
Or it could be something like InteractionManager.mapPositionToXXX doesn't work or something like that. Plugin overrides a few functions inside InteractionManager.
from layers.
OK, I put this in example, and it doesn't work:
var app = new PIXI.Application(WIDTH, HEIGHT, {resolution:2, autoResize:true});
I guess something is wrong with getRenderTexture()
for this plugin. Unfortunately, I do not have time to investigate it because I'm working on v5 release. As soon as v5 is released, I'm gonna start coding streams where I remake pixi-display and other plugins for v5.
I guess its something in https://github.com/pixijs/pixi-display/blob/layers/src/Layer.ts#L6
from layers.
@evgkfx did you ever find a work around to this issue? We're faving the same and would really like to us some nice lighting effects
from layers.
Still working on v5.
@TombolaShepless getRenderTexture() code is not that difficult, you can try to debug that stuff
from layers.
Step through it pretty much line-by-line and I can't for the life of me see what else could be wrong other than the above. Any more pointers in a general direction @ivanpopelyshev ?
from layers.
Thanks bud, I really appreciate the help. Sorry I couldn't be more use 😞
from layers.
Actually your fix works, @TombolaShepless . But it doesnt work with pixi-lights. Do you need it with pixi-lights?
from layers.
Yeah with pixi-lights. Do you know why it doesn't work?
@ivanpopelyshev I think its these two lines, here and here
Bu I'm not expert. It seems to fix the renderTexture size by multiplying by resolution however the light positions are not correct
from layers.
Of course! it has one uniform in light shader that means both "size in pixels" and "size in CSS" :)
from layers.
I have no idea what to change there - thats far beyond my knowledge and understanding lol
from layers.
Here, try change resolution in first line: https://pixijs.io/examples/#/layers/normals-drag.js
It uses https://pixijs.io/examples/pixi-plugins/pixi-lights.js and https://pixijs.io/examples/pixi-plugins/pixi-layers.js
I'll republish layers now, as for lights, we'll have to wait someone else.
from layers.
Related Issues (20)
- A bit confused about how to use HOT 3
- PIXI Events propagation bug with zOrder HOT 2
- Z-Index change has no effect HOT 1
- Masking don't work with pixi/layers
- Bug: PIXI Events not respecting zOrder hierarchy of PIXI Layers plugin HOT 2
- Uncaught TypeError: renderer.incDisplayOrder is not a function HOT 6
- InteractionCallback getting passed as null to pixi layers findHit, resulting in error HOT 1
- Objects disappear when setting clearing parentGroup/parentLayer
- TS error: Can't assign Layer to Container HOT 4
- Uncaught TypeError: this.applyRenderMixing is not a function HOT 4
- Calling InteractionManager.hitTest throws an exception HOT 3
- Layers cannot be masked ? HOT 9
- I've read through all the documentation / examples and still don't understand how to use this plugin. HOT 13
- how to use webpack pixi-layers HOT 3
- Renderer mixin not applied properly
- How to Set a Clear Colour
- Examples are not working
- After upgrade to v1.0.11, compile to commonjs modules no longer possible in tsConfig HOT 3
- No output with webworkers HOT 1
- support @pixi/events
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 layers.