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

StaxeXL 0.12.x incompatibility #17

Open
elsassph opened this issue Jul 25, 2015 · 6 comments
Open

StaxeXL 0.12.x incompatibility #17

elsassph opened this issue Jul 25, 2015 · 6 comments
Assignees
Milestone

Comments

@elsassph
Copy link
Member

StageXL 0.12 introduces API breaking changes.

The toolkit (including v0.6) is compatible with StageXL 0.11.0.
You can update your pubspec.yaml file to use this specific version like this:

dependencies:
  stagexl: ^0.11.0

I'm looking to adapt the toolkit to 0.12.

@bp74
Copy link
Contributor

bp74 commented Jul 25, 2015

Thanks Philippe, that would be awesome! There is one important breaking change that may be important for the Toolkit. The default render engine is WebGL now, but Shapes/Graphics are still not supported with this renderer (it will be supported with the next version of StageXL).

For the time being, you can switch back the default renderer like this:

StageXL.stageOptions.renderEngine = RenderEngine.Canvas2D;

@elsassph
Copy link
Member Author

@bp74 Ha! I was about to report that graphics were not rendering in webGL :)

That said, something's strange with Graphics and Canvas2D - but maybe I'm just rusty with StageXL. I didn't expect to have to call beginPath/closePath when drawing multiple colors (without it, the last fill color applies to all the paths).

var test = new Shape();
test.graphics.circle(100, 100, 60);
test.graphics.fillColor(Color.Red);
test.graphics.strokeColor(Color.Black, 4);
test.graphics.beginPath();
test.graphics.rect(0,0,100,100);
test.graphics.fillColor(Color.Coral);
test.graphics.strokeColor(Color.White, 4);

@bp74
Copy link
Contributor

bp74 commented Jul 25, 2015

Yes that's right. It's not an invention of StageXL but the behavior of the Canvas drawing API. StageXL uses just a very thin wrapper over this API.

@elsassph
Copy link
Member Author

Do you have an idea when webGL graphics will work?

@bp74
Copy link
Contributor

bp74 commented Jul 25, 2015

I think i will take a few weeks. Currently i'm working on the basics and i can fill solid colors :) Next up are strokes/lines, the non-zero winding rule and after that gradients .. so still some things to do.

http://www.stagexl.org/temp/graphics_webgl/index.html

@elsassph
Copy link
Member Author

Nice, webGL even in IE11 :)

@elsassph elsassph added this to the 0.7 milestone Jul 26, 2015
@elsassph elsassph self-assigned this Jul 26, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants