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 Skar

I also released a small entity plugin on pointofimpactjs.com. The main feature is to detect if the mouse is really over the entity by distinguish if the pointer is over an transparent or visible pixel of the entity sprite. Also the plugin comes with the possibility to create a simple hover effect and to listen to all common mouse events (onMouseOver, onMouseOut ...)

So here comes the link: Plugin: entityMouseSensitive

Feel free to report all bugs, inaccurate code, spelling mistakes, improvements or ideas you will stumble on. Enjoy!

1 decade ago by mimik

nice one :D

1 decade ago by Skar

Still making some improvements here and there. Think this selection feature will become a single rts-like plugin and there will be a 'effect' plugin to build more complicated effects (selectionBox or healthBar) ... but currently I relized that if you have more than one of the entity with the same image source on the map all of them get changed to the effected version, strange :/

1 decade ago by Skar

I just want you to know that I upload an update for the mouseSensitive plugin. It was really tricky to get the effect for only one entity per type working and needed some hacky changes to the impact core. So I decided to put the bullet proofed feature of manage all common mouse events to the nearest pixel in this plugin only. You can try to get your effects working by listen to the events 'onMouseOver' and 'onMouseOut' ...

Link is still the same as above. Cheers!

1 decade ago by riceje7

Can't seem to get this plugin to work. i keep getting this error:
Uncaught TypeError: Object #<HTMLImageElement> has no method 'getContext'

on line 111 of entityMouseSensetive

I'm using it exactly as the example at the point of impact site demonstrates. anyone else encounter this or know what might be wrong?

1 decade ago by bigJim

Hey Skar, Great plugin. Thanks. The Dropbox link you added to the plugin page is returning a 404 file not found error. Any chance we can see this fixed? Would be very much appreciated.

1 decade ago by Graphikos

Last activity from Skar was 8 months ago. You might try contacting him directly.

1 decade ago by crowbar_of_irony

Does anyone have a copy of this plugin and won't mind sharing it? The dropbox link on pointofimpact is dead.

1 decade ago by Joncom

The basic idea of this plugin is also available here:
https://github.com/quidmonkey/Per-Pixel-Collision-Detection
Page 1 of 1
« first « previous next › last »