These are chat archives for pixijs/pixi.js

22nd
Dec 2017
rainkolwa
@RainKolwa
Dec 22 2017 12:34
Hi,there,i thought i came up with a problem about the trigger area of a spite, if this sprite is in a transformed(rotated) dom container,here is an example, https://jsfiddle.net/r3fktwkk/ searching for help,thank you very much
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 12:35
dont do CSS transforms on canvas
either override it in type
PIXI.interaction.InteractionManager.prototype.xxx = function() {}
either override it in particular instance
renderer.plugins.interaction.xxx = function() {}
this one :)
@RainKolwa hope it helps.
Charles Forman
@setpixel
Dec 22 2017 13:34
hi!
rainkolwa
@RainKolwa
Dec 22 2017 13:37
@ivanpopelyshev Thanks for your quick response,I will give it a try.
Charles Forman
@setpixel
Dec 22 2017 13:43
I have a question re: erasing on a rendertexture.. I've read the forum posts. I just wanted to see if there is a more updated way to implement erasing
Brenwell
@brenwell
Dec 22 2017 13:50
Hello guys, I am working on a plugin for pixi for sizing text to fit a container. I believe I found a bug, where letterSpacing and dropShadows are not included in the TextMetrics.wordWrap() method. I have filed and issue, but I didn’t get any feedback. So I was just curious, in theory should TextMetrics account for letterSpacing and dropShadows ?
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 14:42
its @themoonrat problem, i dont know why doesnt he answer that
ok, pinged two possible reviewers
it seems that i work like a tech support operator. Why do i have to answer on every issue and post in forum? i dont know )
there's pixijs slack if you want to poke him personally
do you want an invite?
Brenwell
@brenwell
Dec 22 2017 14:45
OK thanks a lot
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 14:45
Brenwell
@brenwell
Dec 22 2017 14:45
Yeah sure, if it helps you stay uninvolved
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 14:46
there's no email in your github profile
Brenwell
@brenwell
Dec 22 2017 14:46
No?
oh
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 14:46
I'd like to help but Text is not my expertise ;)
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 14:47
done. dont forget to join #show-and-tell
Brenwell
@brenwell
Dec 22 2017 14:47
cheers
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 14:48
There's another text issue that is waiting for his input
pixijs/pixi.js#4550
Brenwell
@brenwell
Dec 22 2017 14:48
Maybe he's just busy for the holiday season
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 14:48
may be he's on holidays
your PR looks good
Brenwell
@brenwell
Dec 22 2017 14:53
Cheers
after gettting halfway through I thought maybe it intentionally ignores letterSpacing and dropShadow, so perhaps I ma fixing something that is not an actual problem
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 14:56
Text is a difficult part. Code for text and for other features in pixi is radically different
text is more feature-based, everything else favors good code and performance over features
Brenwell
@brenwell
Dec 22 2017 14:56
Good point
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 14:57
if you coded in ActionScript before, can you please check if Flash takes care of that thing?
Brenwell
@brenwell
Dec 22 2017 14:57
Never did flash (thank god)
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 14:57
if any good text API takes care of letterSpacing and dropShadow, then we have to do it
Flash has good API's, all those 2d engines are based on flash
Brenwell
@brenwell
Dec 22 2017 14:58
well adding support for letterSpacing and dropShadow is pretty simple in comparison to the actual text measuring
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 14:59
"Flash is dead", "OpenFL emulates Flash", but no one covered Flash Text API
Its not possible to kill flash before someone covers 100% of it usability.
Brenwell
@brenwell
Dec 22 2017 15:00
thats a lot of catch-up
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 15:01
because companies favor fast projects and not fundamental things
"X is dead, use Y or Z" - "but how to do A and what to do with a good parts of legacy" - "we dont know, we'll reinvent it later"
Mark Knol
@markknol
Dec 22 2017 15:03
The Flash Text API wasnt that great from what I remembered.
Charles Forman
@setpixel
Dec 22 2017 15:06
@ivanpopelyshev you are appreciated greatly!
you're the reason I'm using pixi!
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 15:06
@markknol other APIs in flash arent genius too
the idea is that its a standard and its tied to great tools
so some decisions are due to "We add X because it was in flash"
better to look at all other 2d renderers too: cocos2d libgdx, e.t.c.
apple api's
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 15:11
if something exists in several API's , that's a good choice to add it here too
to kill flash one needs to majorate all of its features
text like in flash or better than that, filters like in flash or better, e.t.c.
events like in flash, we just found out that Flash had priority in events and PIXI doesnt have it
Brenwell
@brenwell
Dec 22 2017 15:15
priority?
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 15:18
yep, EventDispatcher has priorities
EventEmitter doesn't. Signal does but we added signal only in a few places
Brenwell
@brenwell
Dec 22 2017 15:19
gotcha
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 15:19
PIXI.GRaphics cant do everything that flash does, no BitmalFill
also, Bitmap. Bitmap is good but it cant be made in WebGL engine properly
that means we need something better than Bitmap
but RenderTexture covers only a part of it
there's not good enough API that allows people to store generated images.
also, ColorTransform
Flash ColorTransform is almost equal to Spine dark-light tint
phaser v3 will have something like that, pixi v5 doesnt have it, and i dont know of other renderers who have it
there is ColorMatrixFilter which is filter and that's why it sucks.
same goes for language
TypeScript doesn't have UInts and Ints
and, its not possible to do "instanceof Interface", no runtime interfaces
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 15:25
Flash will be dead because Adobe seriously fucked up, not because its old and everything is better than that
Its sad when good tech dies :(
There's my question about Shumway in replies
Mark Knol
@markknol
Dec 22 2017 15:27
I use Haxe with pixi.js, that works great (I prefer it over typescript)
Then you have Float/Int
I sometimes wish there was a pixi version written in Haxe instead of using externs :)
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 15:33
i have pixi made in TS
customized
found some bugs in original while i was making it ))
i rewrote EVERYTHING
its not my first big fork
and every fork gives something to the main branch :)_
I'm waiting when Kotlin matures enough, and I'll do pixi in kotlin, for all three platforms: JVM, native, js
Mark Knol
@markknol
Dec 22 2017 15:39
with haxe you can have even more targets but then you basically have openfl :)
btw I thought you made pixi in ES6
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 15:40
I have multiple forks
Mark Knol
@markknol
Dec 22 2017 15:40
where is the typescript fork?
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 15:40
there's TS pixi that is used in proprietary project
it work in progress
some things are experimental there
its not ready for usage, doesnt have docs. But for particular project it shows unreal FPS :)
Mark Knol
@markknol
Dec 22 2017 15:43
If I would create engine I would do (120 + Math.random()*20) + "fps" :p
That looks impressive
How exactly does that work, workflow wise? You create an swf in flash, and that is rendered runtime ?
Ivan Vodopiviz
@ivodopiviz
Dec 22 2017 16:12
don't know about this particular case but I've done that before using OpenFL
it's not bad actually, you artist can use Flash, you just hook up events on your MovieClips and then do whatever you want
back then openfl HTML5 performance was not, however, good enough
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 16:19
@markknol we have our own exporter that makes binary format, and very efficient renderer, it shows good FPS on old intel HD cards :)
but I want to actually resurrect mozilla shumway
Ivan Vodopiviz
@ivodopiviz
Dec 22 2017 16:22
that sounds good
need a hand?
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 16:32
I'll when i get something in the open :) I started to move modules to latest typescript and adding tsconfig-s https://github.com/ivanpopelyshev/shumway/tree/big-refactor
then i'll change the architecture that way it doesnt have those AVM bindings all over the code, also dont need that binary channel between multiple iframes
I want to make it as clear as pixi
Ivan Vodopiviz
@ivodopiviz
Dec 22 2017 16:34
well, if you ever get to a point where you can take pull requests just let me know
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 16:34
ok, one more point for Flash Text : it seems that iOS has problems with certain fonts.
Ivan Vodopiviz
@ivodopiviz
Dec 22 2017 16:34
there's a ton of flash content that I'd like to preserve
Ivan Popelyshev
@ivanpopelyshev
Dec 22 2017 16:34
@ivodopiviz ok :)
i need real example, the problem is that their stuff is 500 lines minimal and requires a number of shaman dances
Ivan Vodopiviz
@ivodopiviz
Dec 22 2017 16:36
I worked on some swf games for cartoon network, nothing too complex
but should be way more representative than feronato's tutorial