Skip to content
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

Starling 2 #145

Open
teotigraphix opened this issue Feb 8, 2016 · 46 comments
Open

Starling 2 #145

teotigraphix opened this issue Feb 8, 2016 · 46 comments

Comments

@teotigraphix
Copy link

Just curious as when Starling 2 rolls out and Feathers, will this be compatible then?

@IonSwitz
Copy link
Member

IonSwitz commented Feb 8, 2016

I have started to look into rudimentary support for Starling 2.0, but it is not likely to be fully supported, no, unless I get help to implement it. To make it really good, I would have to spend time that I currently do not have.

I will do my best, however.

@teotigraphix
Copy link
Author

Totally understand. It was more that I have some apps I am releasing that use feathers 100% and was looking into using the drawing api. But when feathers updates, he is requiring 2.0 so I guess I will have to wait.

If I knew more about the low level of starling I would gladly help get it going but I don't think I know enough to be of help right now.

@ghost
Copy link

ghost commented Mar 1, 2016

+1

1 similar comment
@22Round
Copy link

22Round commented Mar 2, 2016

+1

@zenrobin
Copy link

zenrobin commented Mar 2, 2016

We fell in love with this extension when we first found it. Used RoundedRectangles all over the place, and still use it to draw some interesting shapes dynamically.

But beyond that, we didn't touch the rest of the functionality. Perhaps a survey of what people use most is in order. That way, we can identify the best features of this extension that are wholesale missing from Starling.

Also, for what it's worth, we ended up having major lost context issues with RoundedRectangle. Couldn't find a reliable way around it (especially on android). So we went with a set of scale 9 oval textures instead. They don't take much texture space and can be scaled to whatever size necessary with minimal quality sacrifice. We have oval outlines too to replace the need for strokes. The textures are all white -- we use starling color tinting to customize as needed.

Would love to know how others are using the extension and whether there are other Starling workarounds (because IonSwitz is very busy!!)

@teotigraphix
Copy link
Author

I ended up using the native Flash Graphics API and with Feathers I have invalidation. So in some of my really complex sequencers, I needed dynamic but "static" backgrounds of grids and such. So I just end up drawing all my new assets during a change for the component and create an atlas using Bitmap data draw(), then load those textures into Feather's Scale9 or Image components.

This seems to work really well performance wise, I am only drawing on invalidation. I just needed something to work when I switch to Feathers 3 and Starling 2.

@IonSwitz
Copy link
Member

IonSwitz commented Mar 2, 2016

I am hoping that the problem with lost context issues now have been fixed. The Program cache wasn't being cleared out properly. If you have code that didn't work before stored away somewhere, please get the latest sources and try again.

@meduhealth
Copy link

+1 👍

Is there any change it will be compatible with the release V2 of Starling ?

Thanks a LOT! ! & Keep up the good work.

@OneHalf3544c
Copy link

+1

@IonSwitz
Copy link
Member

IonSwitz commented May 5, 2016

Thanks for the support and desire to get this updated to 2.0, but I simply do not have the time. I don't know of anyone else of the maintainers of this extension who have the time either. This is very unfortunate, and I am really sorry about this.

@joefaron
Copy link

joefaron commented May 7, 2016

That's not good for me.. 👎

@joefaron
Copy link

joefaron commented May 7, 2016

For what it's worth.. was using it to also do rounded rectangles.. bye bye Shape()'s.

@matej-snivam
Copy link

+1

6 similar comments
@varadig
Copy link

varadig commented Sep 21, 2016

+1

@piratejet
Copy link

+1

@leefj
Copy link

leefj commented Oct 11, 2016

+1

@pSi-X
Copy link

pSi-X commented Oct 11, 2016

+1

@leefj
Copy link

leefj commented Nov 11, 2016

+1

@aviatek
Copy link

aviatek commented Nov 23, 2016

+1

@IonSwitz
Copy link
Member

Unfortunately, nothing has changed since my post on May 5th.

@22Round
Copy link

22Round commented Nov 25, 2016

@IonSwitz we never giving up
+1

@pautus
Copy link

pautus commented Dec 1, 2016

hey guys,

Here is a working version of Starling 2 graphics extension.
https://www.dropbox.com/s/o8vcjnv1zzgrff5/starling_display_ext.zip?dl=0

I'm not sure about pref since there is a dirty enterframe in Shape to keep the display alive...without it, for some reasons the shape appear for just a sec...
Also i'm not sure everything is working fine...let me know if you have trouble.
@IonSwitz maybe you have an idea on the enterFrame issue ?

Hope it helps.
Seb

@IonSwitz
Copy link
Member

IonSwitz commented Dec 2, 2016

That's great! Did you write this? :)

The enterFrame detail seems to be triggering a "setRequiresRedraw" which should not be solved by changing the x position like that :) I will see what I can do to investigate this.

Edit: From reading the code in DisplayObject of Starling 2.0, this seems to matter:

If the object needs to be redrawn just because it does not support the render cache,
call painter.excludeFromCache() in the object's render method instead.
That way, Starling's skipUnchangedFrames policy won't be disrupted.

So, the "painter.excludeFromCache()" method should be called in the Graphic objects render method, apparently.

Add "renderSupport.excludeFromCache()" after "if ( indices == null || indices.length < 3 ) return; " in the Graphic render() method, line 363.

@pautus

Ideally, the classes should support the render cache, but this seems to be a good solution so far.

@IonSwitz
Copy link
Member

IonSwitz commented Dec 2, 2016

@pautus I got this to work just fine now, adding the "renderSupport.excludeFromCache(this) as mentioned above, and removing the onEnterFrame event in Shape.

If it is ok with you, I'd like to add this to GitHub as part of the StarlingGraphics Organization. Basically it would appear as a second repository next to Starling-Extension-Graphics. The reason for this is that the code paths have diverged a bit, it seems your excellent fix for 2.0 isn't built upon the "latest" of the Starling-Extension-Graphics code path, which makes diffing a bit tricky, (at least for me, as I am NOT a comfortable Git user )

@pautus
Copy link

pautus commented Dec 2, 2016

Hey @IonSwitz thanks for your kind answer ! Yeahhhh ! just tested the excludeFromCache() working just fine here too ! That's great news, I guess a lot of people will be happy, including me :)
Was not proud of that EnterFrame awful thing, but I was kind of in a rush :p
To be very honest with you i was very close to fix it by myself but i had just a last thing with the blendMode that get me in trouble and then i found the solution in a russian forum ^^ As you can see lots of people around the world need this extension ;)
I'm totally ok with a release, go ahead and do what's the best for you ! :)

@IonSwitz
Copy link
Member

IonSwitz commented Dec 2, 2016

I have currently added this code to "extension2.0" in this repository. I'm a terrible GitHub user, but I wanted to get the code up and made public, so I just slammed the code into the repository.

Thanks for your work. I will see if I can find the time to add some of the more up to date stuff I added to the extension to the 2.0 branch, but this helps a LOT. Excellent work!

@IonSwitz
Copy link
Member

IonSwitz commented Dec 2, 2016

@pautus Also, there is a class called "Button.as" in the repository now, that seems like something that shouldnt be in this extension, or am I missing something?

@pautus
Copy link

pautus commented Dec 2, 2016

My very pleasure :)
Oups, yes the Button class is for one of my project...i just forget to removed it, my bad sorry.

@teotigraphix
Copy link
Author

teotigraphix commented Dec 2, 2016

@pautus Curious, I coned the repo and used extension2.0-scr in a Library project. 2 things won't compile, Graphics_bak and TriangleUtils doesn't have the correct package.

I take it you are not using this as a swc, so you don't get these errors?

@teotigraphix
Copy link
Author

One other thing, in TriangleUtils, import starling.core.RenderSupport could not be found.

I got this all to compile obviously but, might make it easier for others if the code did compile in a library project. :) Thanks for this will be trying it out today.

@pautus
Copy link

pautus commented Dec 2, 2016

@teotigraphix this is class and import i forgot to clean. sorry about that.

@teotigraphix
Copy link
Author

No problem, I didn't mean anything other than constructive. You have done a great thing with this code, thanks so much. Down the road I might get into it more to see if I can help, now that it's "into" Starling 2 code base.

@pautus
Copy link

pautus commented Dec 2, 2016

@teotigraphix ;) this is a great plugin, good to have it back ! Hope we'll find great new features all togheter !

@22Round
Copy link

22Round commented Dec 2, 2016

@IonSwitz would be nice if you create new repository for starling2

@IonSwitz
Copy link
Member

IonSwitz commented Dec 2, 2016

@22Round Yeah, it would be nice. I agree that the current situation isn't awesome.

Unfortunately, I am not a "owner" of the StarlingGraphics Organization here on GitHub, only a contributor, so I can't start a new Repository on the StarlingGraphics Organization page here: https://github.com/StarlingGraphics

Maybe @robsilv or @jonathanrpace could bump me up to "owner" status, and I'd try to set it up.

I could also start a second Organization to host it, but that seems just silly. :)

@IonSwitz
Copy link
Member

IonSwitz commented Dec 2, 2016

@pautus Have you tried doing any work with textures, and gotten it to work?

Currently, I can't see them working when doing a textureFill...

@robsilv
Copy link
Member

robsilv commented Dec 3, 2016

@IonSwitz have upgraded you to an owner! :-)

@pautus
Copy link

pautus commented Dec 5, 2016

@IonSwitz not i did not...it's also a matter of time here, end of the year will be very busy :/ I will check it as soon as possible.

@yooni126
Copy link

can we use GradientTexture in starling 2?

@IonSwitz
Copy link
Member

No textures are working, as far as I can see. So, no, not yet.

@yooni126
Copy link

yooni126 commented Jan 4, 2017

How long we must stay to access all of features of this extenstion for starling 2?

@IonSwitz
Copy link
Member

IonSwitz commented Jan 4, 2017

I have no time to develop the Starling Graphics Extension further. If @pautus keeps working on it, that would be great, but as of now, I don't see that there will be any progress made here.

Maybe Daniel will start working on it to integrate it into the main Starling framework, I know he has expressed a desire for it, but it seems unlikely.

@yooni126
Copy link

yooni126 commented Jan 4, 2017

ok thank u :(

@pautus
Copy link

pautus commented Jan 27, 2017

@IonSwitz @yooni126 I'm so sorry, i can't work on that part for now... :/ too much to manage. I'll try to take a look soon, but do you have a sample of code with textures please ?

@yooni126
Copy link

@pautus where are you?
can u help us to upgrade this extension with all properties like gradiant to starling 2?

@pautus
Copy link

pautus commented Feb 27, 2018

@yooni126 sorry guys have so much things to manage (personal and work)...do you have any code sample that is not working so i can make a quick check ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests