Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by Karnot

Hi!
i'm learning impact/HTML5 programming, and I want to know if there is an easy way i can access all the graphic and animations features of canvas. Can I use something like Ai->Canvas (http://visitmix.com/labs/ai2canvas/) with Impact? Are there any only canvas library i can use with Impact?

Thanks

1 decade ago by Graphikos

I was looking at Ai->Canvas just yesterday.

To answer your question, yes, it is easy to access the Impact's canvas context with ig.system.context.

However incorporating a different library might have some challenges as both products are meant to standalone. Ai->Canvas is writing the code to handle the frame refresh, clearing, etc. etc. which is going to directly duplicate what Impact is already doing. If you use the code with the direct context interaction and point it at ig.system.context it might work. You'd have to deal with all the variables and functions it writes also. Looking at the sample code ( here) it might be possible. You'd have to do a lot of manual rewriting... but still might be possible.

So you have to ask, is it worth it? ;)

You could, depending on what you had in mind, stack an Ai->Canvas on top of the Impact canvas. Like if you wanted to use Ai->Canvas for cut scenes or something you could have Impact pause or go to black and then start the animation/drawing in the other canvas. Then you wouldn't have to do much mangling of code and only have control triggers from each.

Good luck!
Page 1 of 1
« first « previous next › last »