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

Add graphics API for drawing #1010

Open
alevys opened this issue Nov 28, 2017 · 12 comments
Open

Add graphics API for drawing #1010

alevys opened this issue Nov 28, 2017 · 12 comments
Labels

Comments

@alevys
Copy link

alevys commented Nov 28, 2017

Really need the ability to draw lines as in classic flash. Need native capability of the library. External libraries like starling-extension-graphics is already abandoned and will not be updated to match the current development of the Starling.

@PrimaryFeather PrimaryFeather changed the title Add graphics API for drawing lines, the same Flash API. Add graphics API for drawing Nov 29, 2017
@PrimaryFeather
Copy link
Contributor

It's definitely not a straightforward feature to add, but I know it would be super useful, and it's been on the back of my mind for a long time. Thanks for adding the issue!

I changed the title a little since I'd be adding lines as part of a more general drawing API, and I wouldn't force myself to stick 100% with the Flash API.

@alevys
Copy link
Author

alevys commented Nov 29, 2017

Do not have to repeat the flash API, the main thing that it were possible to draw. Very, very'll wait for this feature. :)

@22Round
Copy link

22Round commented Dec 1, 2017

+1

1 similar comment
@hardcoremore
Copy link

+1

@matrix3d
Copy link

http://blog.bwhiting.co.uk/?p=423

@soimy
Copy link

soimy commented Dec 13, 2017

@alevys Actually, there is a usable starling-extension-graphics for starling v2 which will be working after some minor tweaks. ( And here is my fork)

I believe there are more effective ways to do vector triangulation, and no Ex-version ( editable vector ). But at least it's working.

Below is what I've done with the help of this extension:
Gear&Chain Simulator

@Dima107
Copy link

Dima107 commented Sep 10, 2019

@alevys Actually, there is a usable starling-extension-graphics for starling v2 which will be working after some minor tweaks. ( And here is my fork)

I believe there are more effective ways to do vector triangulation, and no Ex-version ( editable vector ). But at least it's working.

Below is what I've done with the help of this extension:
Gear&Chain Simulator

I need starling grpahics extention too. But It looks like "beginTextureFill" and "lineTexture" doesn't works in oringal and your fork of graphic.
Can you help me with it?

@hardcoremore
Copy link

Yes texture fill does not work as well. I would like to have that but don't know how to implement it. I also have my own port here https://bitbucket.org/hardcoremore/starlinggraphicsextension/src/master/

@Fancy2209
Copy link
Contributor

Fancy2209 commented May 10, 2024

@alevys Actually, there is a usable starling-extension-graphics for starling v2 which will be working after some minor tweaks. ( And here is my fork)

I believe there are more effective ways to do vector triangulation, and no Ex-version ( editable vector ). But at least it's working.

Below is what I've done with the help of this extension:
Gear&Chain Simulator

Is the code you used to triangulate the vectors available anywhere? I've been looking into trying to allow HW Vectors in flash/starling and I'd love to see how other people have done it for ideas

@hardcoremore
Copy link

hardcoremore commented May 10, 2024

Just want to add in my fork: https://bitbucket.org/hardcoremore/starlinggraphicsextension/src/master/

Texture fill is working. Also you can draw lines with texture. I have also implemented miter, bevel and round joint types. I have fixed many bugs and added features. But still there are some things to be fixed.

@PrimaryFeather
Copy link
Contributor

Great to see an update on this, @hardcoremore! 😄 Thanks for sharing!

@hardcoremore
Copy link

Well I am trying to fix one more bug which is when line is too thick and angle between two segments is too sharp. Hope I can fix it. I need it for my game as well. 😄

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

No branches or pull requests

8 participants