These are chat archives for pixijs/pixi.js

4th
Jan 2016
Ivan Popelyshev
@ivanpopelyshev
Jan 04 2016 11:11
@englercj just found out about git submodules
cant we use them for some things in pixi? like your resource loader
Bar Ziony
@bartzy
Jan 04 2016 14:38
Is pixi.js updated regularly on npm ?
Ivan Popelyshev
@ivanpopelyshev
Jan 04 2016 14:54
yep. but i dont know if @GoodBoyDigital or @englercj updated 3.0.9 in npm
@Bartzy how are you doing, pal?
Bar Ziony
@bartzy
Jan 04 2016 15:11
so where should I install in general? I use JSPM
Bower is updated most of the time?
@ivanpopelyshev Took some time off from this project, now I started again to actually write the production code and not just a demo
:)
Ivan Popelyshev
@ivanpopelyshev
Jan 04 2016 15:17
:)
i dont know about bower
@englercj Im summoning you!!!
we have http://www.html5gamedevs.com/topic/19632-global-hitarea/ which is major problem for interactiveManager reported N-th time already
Bar Ziony
@bartzy
Jan 04 2016 16:07
@ivanpopelyshev How do you install it on projects?
Ivan Popelyshev
@ivanpopelyshev
Jan 04 2016 16:38
i just copy latest bin/pixi.js
for everything else, wait @englercj answer
Olav Lindekleiv
@oal
Jan 04 2016 16:48
I use npm
Chad Engler
@englercj
Jan 04 2016 16:49
Updated npm to 3.0.9, sorry about that
git submodules are not appropriate for how we treat dependencies
we don't want or need the full repository of those modules, we want the distributed package.
Ivan Popelyshev
@ivanpopelyshev
Jan 04 2016 16:57
ok
its not mine area of competence ;)
@englercj please look at that interaction issue. That's N-th time i see it
Chad Engler
@englercj
Jan 04 2016 16:58
I am looking into it, by rewriting the interaction manager for v4
Ivan Popelyshev
@ivanpopelyshev
Jan 04 2016 16:59
no, something easy must work
it'll also work for culling stuff
like "test the basic shape, if its ok then look in children"
Chad Engler
@englercj
Jan 04 2016 16:59
That isn't quite the issue, but feel free to look into it yourself
Ivan Popelyshev
@ivanpopelyshev
Jan 04 2016 17:00
it will work in cases like "we have spine objects with huge number of vertices and we dont want to test each of them"
Chad Engler
@englercj
Jan 04 2016 17:00
I don't have time to develop a workaround right now, and also write the new one
Ivan Popelyshev
@ivanpopelyshev
Jan 04 2016 17:00
something like interactionMaskShape? i dont know how to call that
just spend few minutes to give me your opinion please :)
I can implement it different ways
boundingShape ?
Chad Engler
@englercj
Jan 04 2016 17:01
hitArea is already implemented
the problem is global events
stage-level events
Ivan Popelyshev
@ivanpopelyshev
Jan 04 2016 17:01
hitArea is bad, it works for this object, not for children
we need something that works recursively
Chad Engler
@englercj
Jan 04 2016 17:02
That is a redesign of the interaction manager
I'm not comfortable putting in a ahack for a few months before it gets rewritten
Ivan Popelyshev
@ivanpopelyshev
Jan 04 2016 17:03
that thing is needed in production. I need it for spine objects to
we use shapes so its not AABB, not boundingBox and not boundingSphere, may be boundingShape
but masks work with graphics, and we can actually add something like boundingMask :)
or interactionMask
i think that's best name - interactionMask
ok, I'll make a PR myself
Olav Lindekleiv
@oal
Jan 04 2016 18:09
Is there an example for making and using custom shaders? I've got filters working, but not shaders
Ivan Popelyshev
@ivanpopelyshev
Jan 04 2016 18:12
@oal what do you want from shaders? :)
you have to understand how (renderer,shader) pair works
1) you have to register it in the system
2) you have to specify that you want to use it for particlecontainer or sprite ".shader" field
3) your shader have to be compatible with current sprite shader
if your uniforms and attributes differs from standart shader you'll have to implement your own renderer plugin
pixi-tilemap has both custom shaders and renderers
tell me what exactly do you want and I tell you where to look
Olav Lindekleiv
@oal
Jan 04 2016 18:23
I'll have a look at pixi-tilemap
I think I had shaders working during the pixi 3 pre releases
Olav Lindekleiv
@oal
Jan 04 2016 18:32
it works*
Never mind, its assigning a filter as a shader
I have a question about the Typescript definitions for Pixi. Are any of the contributors using this channel?
Specifically, it's an error with the Typescript definitions to specify an AbstractFilter as a shader, even though it works just fine. So maybe it should be Shader | AbstractFilter in the definitions
Olav Lindekleiv
@oal
Jan 04 2016 18:54
I opened a ticket: pixijs/pixi-typescript#27
hmmpf, issue.
Ivan Popelyshev
@ivanpopelyshev
Jan 04 2016 19:16
AbstractFilter is not a shader, right?
hm, interesting
Olav Lindekleiv
@oal
Jan 04 2016 19:22
Using an AbstractFilter as a base I created my custom shader in five lines of code, no need to initialize with the shader manager etc
And it works just fine :)
Ivan Popelyshev
@ivanpopelyshev
Jan 04 2016 19:23
:)))
nice
But i doubt it works for sprites
if it works for them then its a coincidence
look a TextureShader
may be you just need it as a parent :)
Olav Lindekleiv
@oal
Jan 04 2016 19:25
Well, I use it on a sprite
Ivan Popelyshev
@ivanpopelyshev
Jan 04 2016 19:25
but yeah, you have to initialize it with renderer.shaderManager
Olav Lindekleiv
@oal
Jan 04 2016 19:26
I only do "sprite.shader = new TileFilter();" and it works
Ivan Popelyshev
@ivanpopelyshev
Jan 04 2016 20:21
whats a tilefilter?
do you try to clamp coordinates of texture?
I have that thing too :)
Olav Lindekleiv
@oal
Jan 04 2016 20:22
Utvalg_041.png
No, it looks like this
Ivan Popelyshev
@ivanpopelyshev
Jan 04 2016 20:22
???
what exactly does that filter?
Olav Lindekleiv
@oal
Jan 04 2016 20:23
I have a lot of "tiles" and apply custom textures based on a set of colors. Texture splatting I think it's called
The source tiles are only in shades of red, then in the fragment shader, I look up values on another texture to get the result above
In the end I'm aiming for something like this game (which is probably my favorite game of all time) http://clonk.de/gallery.php?lng=en&sec=cr&img=western_flag.jpg :)
Ivan Popelyshev
@ivanpopelyshev
Jan 04 2016 21:01
nice