You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone,
I am looking for an alternative/better performing MouseMovement method.
I read the following in another entry:
#977
I do recommend writing your own hit testing if you don't need pixel perfect hit interactions though!
So I assume the problem is in the hitTest method, which analyzes pixel perfect everything.
I still dared to modify the CreateJS lib.
Does anyone here have experience and can help me how to adjust which method?
Thank you!
The text was updated successfully, but these errors were encountered:
Hi @Matt-Maerz - you may want to check out the various hitTests in ZIM, a framework built on CreateJS. We do several types of hitTests that are not pixel based and even the pixel based ones we do a calculated bounds check first. May as well see if the bounds are hitting with an equation before testing pixels. This dramatically increases the efficiency of hitTests. ZIM is at https://zimjs.com and the tips page https://zimjs.com/tips.html#HITTEST. You can see the types of hitTests in the docs https://zimjs.com/docs.html under the methods section.
hitTestPoint() is the same as the CreateJS hitTest.
hitTestReg() same as above but tests against the registration point
hitTestBounds() is a fast calculation between bounds of objects
hitTestCircleRect() is a fast calculation between a circle and a rectangle
hitTestGrid() is a fast calculation for grid sections
hitTestRect() and hitTestCircle() test any shape against points around a rectangle or circle (slower as shape based)
etc.
Oh!!! Sorry, @Matt-Maerz - I just re-read the issue and it seems like you may have been talking about just rollovers in CreateJS using pixel based detection. Okay. I will leave the last response there in case you are wanting to do your own hitTests. We have been fine with mouseover speed in general and keep it turned on by default in ZIM. We then use mouseChildren and mouseEnabled false when objects do not need to be interacted with. We have simplified this with a mouse() and noMouse() methods available on all our DisplayObjects.
Hello everyone,
I am looking for an alternative/better performing MouseMovement method.
I read the following in another entry:
So I assume the problem is in the hitTest method, which analyzes pixel perfect everything.
I still dared to modify the CreateJS lib.
Does anyone here have experience and can help me how to adjust which method?
Thank you!
The text was updated successfully, but these errors were encountered: