Comments (7)
Very nice. There is a drawPolyStar for regular polygons with a tiny API of dp(). I guess something like pg() might work - anyone else have a thought? I know most draws start with d but not drawRoundRectComplex. Another option might be dg(). We could double up in the chart below with dp/pg.
Another thing that I have found that even if you cp() a the end - which may be done automatically under the hood, that the line corner does not take the same corner point setting. So I think on our version of createjs drawPolyStar for ZIM, we keep going for one more turn - we will check that out as we consider the addition.
from easeljs.
@hsk-kr - would you like to try a pull request? Also, note that the version 1 of CreateJS is ES5. If that is too much to ask, we can recode it. Also, when you do, I would suggest wrapping around beyond the end point to the second point again so that the bevel or miter on the polygon is consistent. Otherwise, even with cp() it is just straight line across. See #1046
from easeljs.
I haven't used CreateJS for a while because of my works. when I have some time, I'll try it.
Thanks for your suggestion.
from easeljs.
This has been committed - thanks @hsk-kr for the suggestion!
5366838
Not in the docs yet... so will leave this open until that happens.
from easeljs.
Here is an example of it working on the ZIM version of CreateJS - with same code as added to the repo here.
https://zimjs.com/explore/molnar.html
from easeljs.
@hsk-kr I coded this in es5. In ZIM we offer options for parameters like pass in [{x,y},}{x,y}] or [[x,y],[x,y]] or [x,y,x,y,x,y] or x,y,x,y,xy - it takes a few lines to test this and accommodate this. For createjs do we think it is best to offer one way for minimal size? It seems that way, so we will probably use one way. The question is... which way is consistent with the others. Graphics.BezierCurveTo ( cp1x, cp1y, cp2x, cp2y, x, y ) uses individual parameters. This I think is a little harder to use for a series of points - not so bad with the ES6 spread operator but annoying in ES5. I think the array of arrays is probably the most organized and basic way. That is the way that you chose and that seems based on other library implementations I presume.
I have yet to work out how to change the docs - but will add the code to the Graphics class and post here.
from easeljs.
I'm sorry. I couldn't give you a good advice.
Thanks for taking my opinion.
from easeljs.
Related Issues (20)
- sortChildren on Chrome not working - works in Firefox HOT 1
- Easel JS not working on codepen HOT 1
- Android text lineheight doesn't match Web or Windows HOT 2
- Memory leak when tween assigned HOT 1
- getBounds returns unexpected result after caching with a non-1 scale HOT 2
- can not cache with StageGL instance get "TypeError: Cannot create property 'width' on boolean" HOT 2
- Shadow "Stroke" appears on top of shape when using fill and strokestyle. HOT 4
- New touch issues on touch-screen boards with new Chrome HOT 4
- CreateJS touch 'pressmove' event
- Is it possible to make webgl mask work in animation? HOT 1
- Bitmap class - new createjs.Bitmap - SVG not loading at viewbox size HOT 1
- Text is still compressed when maxWidth is null HOT 1
- Mousemovement Performance improvement HOT 2
- Different Luminence values for Saturation vs Hue HOT 3
- Hit area detection on Samsung Internet Browser HOT 1
- When will you update createjs2.0? The current version of movieclip is incorrect, and stageGL cannot be used. HOT 4
- Multiple readback operations using getImageData are faster with the willReadFrequently attribute set to true HOT 6
- The Typescript Typings in DefinitelyTyped are missing Graphics.StrokeDash HOT 4
- Createjs website dose not work ! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easeljs.