bp74 / StageXL

A fast and universal 2D rendering engine for HTML5 and Dart.
http://www.stagexl.org
Other
880 stars 82 forks source link

Can contains function from Polygon.dart be used without importing 'dart:html' ? #322

Open Sacchid opened 5 years ago

Sacchid commented 5 years ago

As, StageXL imports 'dart:html', it can not be used in console application or in aqueduct back-end.

As to check if point is present in polygon doesn't need 'dart:html', so is there any way this method be used in console application or in aqueduct back-end code?

Can a separate library for with above mentioned logic be created? or can logic/code of contains method be used there?

bp74 commented 5 years ago

have you tried to import the stagexl.geom library instead of the big stagexl library? https://github.com/bp74/StageXL/blob/master/lib/src/geom.dart