Use bilinear filtering unless the Drawable is angled by a multiple of 90
degrees and is either a raster image (like a BitmapSkin) or is around
its native resoluion. This makes both bitmaps and vectors look better in
most cases. This is roughly the same logic that Scratch 2.0 used; we may
want to tweak it over time to see if we can make it even better.
Use Drawable.isTouching and Skin.isTouching to implement pick and
_getConvexHullPointsForDrawable to emulate rendering the drawable's
silhouette and determining what is picked or the points for a convex
hull.
On Windows and Cygwin the path to JS source files may contain
backslashes, forward slashes, or a mix. The regex used to test whether
or not to use `ify-loader` contains path separators; this change allows
either slash instead of requiring only forward slashes.
EffectTransform transforms a point based on a Drawable's effect uniform
values mimicking the texcoord0 transformation in the shader. This way a
point in the Drawable space can know if its touching its silhouette
when the Drawable has effects active.
Silhouette emulates silhouette rendering. Performing tests like
RenderWebGL.pick can use Silhouette in place of reading a silhouette
rendering from the GPU.
Silhouette.isTouching(vec) takes a texture coordinate vector and checks
if the corresponding location is opaque or not for the underlying
information.
So the issue is simple... We start by filling the detector canvas with
the color white, then layer over this the costumes we are want to detect
white colors in (but clip to the shape of the costumre we are detecting
against) then the areas that were clipped will still be white (the
background fill color). So we detect white no matter what.
`Skin._rotationCenter` is a twgl vector or said another way a
Float32Array. JavaScript casts values stored in this array as 32 bit
floats instead of JavaScript's standard 64 bit floats. Comparing the
equality, like `setRotationCenter` does, of a 64 bit float against a
value stored in a 32 bit container will virtually always be false.
Truncating the new value into a 32 bit (losing precision) will give a
more useful comparison and remove a lot of current false positives.