Copy link to clipboard
Copied
Hi!
I want to increase a dropzone success detection area from html5 code.
Teh working code is here:
root.check = function()
{
var spot = slots.getObjectUnderPoint(pieces.target.x, pieces.target.y);
if (!spot)
{
root.onMiss();
return;
}
root.slot = spot.parent;
if (root.slot)
{
if (pieces.target.name === root.slot.name)
{
root.onMatch();
if (pieces.count === pieces.children.length)
root.onWin();
}
else
root.onMiss();
root.slot = null;
}
else
root.onMiss();
};
How can i extend the sucess area, so that you don't have to throw it exactly right to succeed?
Thanx!
one way would be to extend the background (and you can use something with an alpha of 1) of the drop targets.
Copy link to clipboard
Copied
one way would be to extend the background (and you can use something with an alpha of 1) of the drop targets.
Copy link to clipboard
Copied
@kglad you saved me master! Its working like a charm!
Copy link to clipboard
Copied
excellent! (and thanks for the follow-up.)