@scratch/scratch-render 11.6.0-face-sensing → 11.6.0-react-18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/node/scratch-render.js +0 -30
- package/dist/node/scratch-render.js.map +1 -1
- package/dist/web/scratch-render.js +0 -30
- package/dist/web/scratch-render.js.map +1 -1
- package/dist/web/scratch-render.min.js +0 -30
- package/dist/web/scratch-render.min.js.map +1 -1
- package/package.json +6 -6
- package/src/RenderWebGL.js +0 -30
|
@@ -193352,36 +193352,6 @@ var RenderWebGL = /*#__PURE__*/function (_EventEmitter) {
|
|
|
193352
193352
|
}
|
|
193353
193353
|
return false;
|
|
193354
193354
|
}
|
|
193355
|
-
}, {
|
|
193356
|
-
key: "drawableTouchingScratchRect",
|
|
193357
|
-
value: function drawableTouchingScratchRect(drawableID, left, top, right, bottom) {
|
|
193358
|
-
var drawable = this._allDrawables[drawableID];
|
|
193359
|
-
if (!drawable) {
|
|
193360
|
-
return false;
|
|
193361
|
-
}
|
|
193362
|
-
var bounds = new Rectangle();
|
|
193363
|
-
bounds.initFromBounds(left, right, bottom, top);
|
|
193364
|
-
var worldPos = twgl.v3.create();
|
|
193365
|
-
drawable.updateCPURenderAttributes();
|
|
193366
|
-
for (worldPos[1] = bounds.bottom; worldPos[1] <= bounds.top; worldPos[1]++) {
|
|
193367
|
-
for (worldPos[0] = bounds.left; worldPos[0] <= bounds.right; worldPos[0]++) {
|
|
193368
|
-
if (drawable.isTouching(worldPos)) {
|
|
193369
|
-
return true;
|
|
193370
|
-
}
|
|
193371
|
-
}
|
|
193372
|
-
}
|
|
193373
|
-
return false;
|
|
193374
|
-
}
|
|
193375
|
-
}, {
|
|
193376
|
-
key: "drawableTouchingScratchPoint",
|
|
193377
|
-
value: function drawableTouchingScratchPoint(drawableID, x, y) {
|
|
193378
|
-
var drawable = this._allDrawables[drawableID];
|
|
193379
|
-
if (!drawable) {
|
|
193380
|
-
return false;
|
|
193381
|
-
}
|
|
193382
|
-
drawable.updateCPURenderAttributes();
|
|
193383
|
-
return drawable.isTouching([x, y]);
|
|
193384
|
-
}
|
|
193385
193355
|
|
|
193386
193356
|
/**
|
|
193387
193357
|
* Detect which sprite, if any, is at the given location.
|