Cool! At some point I’d love to get this kind of stuff working in Canvas as well.
BTW, I like your domain name. :-) Harbs > On Dec 10, 2019, at 9:12 AM, Greg Dove <greg.d...@gmail.com> wrote: > > This is player level emulation of [1], supporting (as much as possible) > direct use of legacy flash player-level (i.e. no graphics lib) drawing > code. So it is more the flash.display.* stuff that relates to drawing, and > it's not going to be the right solution for everyone (even the client that > wants it, I will try to move them to svg, but for now this is a good > option, and I think it will help others. I also think I can get some > 'flash' people interested in the project who never used Flex in the past). > > I'm also making sure it emulates the various quirks in the flash drawing > api, which sometimes can be relied upon (negative widths, negative corner > radii etc) > I have the gradient and solid colors working, Currently no bitmapData, but > I plan to add that. > > Here's how I am testing across machines [1]. If you want to test arbitrary > code, you can go into the console and simply type in 'graphics' and > 'Matrix' commands from javascript, it will run them in both flash and > javascript at the same time. I have it to the point where (partly because > Adobe Animate timeline as3 is a bit more loosely typed) I can paste between > the js console and Adobe Animate and it works in both, which has been > helpful for testing various things. > Don't try this on a mobile device, I really only built it for desktop > without any thought for mobile, you need a FHD+ monitor for the side by > side view to be practical. If you see any issues please let me know. > > > > 1. > https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/display/Graphics.html > > 2. > http://interactionscript.com/royale/swf-graphics/index.html?defaultTest=2,0 > > On Tue, Dec 10, 2019 at 7:44 PM Harbs <harbs.li...@gmail.com> wrote: > >> How is the work different than the current Graphics project and the svg >> package in Basic? >> >> Thanks, >> Harbs >> >>> On Dec 10, 2019, at 4:51 AM, Greg Dove <greg.d...@gmail.com> wrote: >>> >>> Just some early advice that I expect to have a very close emulation of >> the >>> flash graphics API available by early January at the latest. I had a >> client >>> express a need for this, and I have quite a lot of progress already. >>> I know we have various graphics support already in Graphics and MXRoyale, >>> but the emphasis for this will be on the closest match to swf that I can >>> reasonably achieve. I'm reasonably familiar with this stuff from things I >>> have done in the past (although much of that was 10-12 years ago now). >>> >>> There are some things that, while technically possible may not be >>> 'practical' to emulate based on how heavy the code would be to achieve >> that >>> in JS. One of these is the miter joint implementation in flash which is >> not >>> currently available in a similar way in svg. Unfortunately it seems that >>> will not be available in svg 2.0 even though it was intended to be. >>> Also some browser/OS combinations seem to not handle certain gradients >> very >>> well. In general windows is better than mac for these, and Safari on Mac >>> seems to be the most problematic so far. I did not focus a lot on mobile, >>> but things were working quite good in a 2013 Galaxy Tablet, for example. >>> >>> Anyhow I just wanted to let others know I was working on this, and hope >> to >>> share progress soon. >>> >>> -Greg >> >>