@scratch/scratch-render 12.0.0-react-18-face-sensing.2 → 12.1.0-localte-selection
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 +3 -53
- package/dist/node/scratch-render.js.map +1 -1
- package/dist/web/scratch-render.js +0 -50
- package/dist/web/scratch-render.js.map +1 -1
- package/dist/web/scratch-render.min.js +0 -50
- package/dist/web/scratch-render.min.js.map +1 -1
- package/package.json +11 -14
- package/src/RenderWebGL.js +0 -48
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scratch/scratch-render",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.1.0-localte-selection",
|
|
4
4
|
"description": "WebGL Renderer for Scratch 3.0",
|
|
5
5
|
"author": "Massachusetts Institute of Technology",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
|
@@ -33,10 +33,7 @@
|
|
|
33
33
|
"watch": "webpack --progress --watch --watch-poll"
|
|
34
34
|
},
|
|
35
35
|
"tap": {
|
|
36
|
-
"
|
|
37
|
-
"functions": 20,
|
|
38
|
-
"lines": 30,
|
|
39
|
-
"statements": 30
|
|
36
|
+
"allow-incomplete-coverage": true
|
|
40
37
|
},
|
|
41
38
|
"browserslist": [
|
|
42
39
|
"Chrome >= 63",
|
|
@@ -47,7 +44,7 @@
|
|
|
47
44
|
"iOS >= 8"
|
|
48
45
|
],
|
|
49
46
|
"dependencies": {
|
|
50
|
-
"@scratch/scratch-svg-renderer": "12.
|
|
47
|
+
"@scratch/scratch-svg-renderer": "12.1.0-localte-selection",
|
|
51
48
|
"grapheme-breaker": "0.3.2",
|
|
52
49
|
"hull.js": "0.2.10",
|
|
53
50
|
"ify-loader": "1.1.0",
|
|
@@ -60,11 +57,11 @@
|
|
|
60
57
|
"scratch-render-fonts": "^1.0.0"
|
|
61
58
|
},
|
|
62
59
|
"devDependencies": {
|
|
63
|
-
"@babel/core": "7.28.
|
|
64
|
-
"@babel/eslint-parser": "7.28.
|
|
60
|
+
"@babel/core": "7.28.4",
|
|
61
|
+
"@babel/eslint-parser": "7.28.4",
|
|
65
62
|
"@babel/polyfill": "7.12.1",
|
|
66
63
|
"@babel/preset-env": "7.28.3",
|
|
67
|
-
"@scratch/scratch-vm": "12.
|
|
64
|
+
"@scratch/scratch-vm": "12.1.0-localte-selection",
|
|
68
65
|
"babel-loader": "9.2.1",
|
|
69
66
|
"copy-webpack-plugin": "6.4.1",
|
|
70
67
|
"docdash": "0.4.0",
|
|
@@ -74,15 +71,15 @@
|
|
|
74
71
|
"html-webpack-plugin": "5.6.4",
|
|
75
72
|
"jsdoc": "3.6.11",
|
|
76
73
|
"json": "9.0.6",
|
|
77
|
-
"playwright-chromium": "1.
|
|
78
|
-
"scratch-render-fonts": "1.0.
|
|
74
|
+
"playwright-chromium": "1.55.0",
|
|
75
|
+
"scratch-render-fonts": "1.0.229",
|
|
79
76
|
"scratch-semantic-release-config": "3.0.0",
|
|
80
|
-
"scratch-storage": "4.0.
|
|
77
|
+
"scratch-storage": "4.0.227",
|
|
81
78
|
"scratch-webpack-configuration": "3.0.0",
|
|
82
79
|
"semantic-release": "19.0.5",
|
|
83
|
-
"tap": "
|
|
80
|
+
"tap": "21.1.0",
|
|
84
81
|
"terser-webpack-plugin": "5.3.14",
|
|
85
|
-
"webpack": "5.101.
|
|
82
|
+
"webpack": "5.101.3",
|
|
86
83
|
"webpack-cli": "5.1.4",
|
|
87
84
|
"webpack-dev-server": "5.2.2"
|
|
88
85
|
}
|
package/src/RenderWebGL.js
CHANGED
|
@@ -1069,54 +1069,6 @@ class RenderWebGL extends EventEmitter {
|
|
|
1069
1069
|
return false;
|
|
1070
1070
|
}
|
|
1071
1071
|
|
|
1072
|
-
/**
|
|
1073
|
-
* Determine if the drawable is touching a rectangle.
|
|
1074
|
-
*
|
|
1075
|
-
* @param {int} drawableID The ID of the drawable to check.
|
|
1076
|
-
* @param {int} left - The left X coordinate of the rectangle.
|
|
1077
|
-
* @param {int} top - The top Y coordinate of the rectangle.
|
|
1078
|
-
* @param {int} right - The right X coordinate of the rectangle.
|
|
1079
|
-
* @param {int} bottom - The bottom Y coordinate of the rectangle.
|
|
1080
|
-
* @returns {boolean} If the drawable has any pixels that would draw in the rectangle area
|
|
1081
|
-
*/
|
|
1082
|
-
drawableTouchingScratchRect (drawableID, left, top, right, bottom) {
|
|
1083
|
-
const drawable = this._allDrawables[drawableID];
|
|
1084
|
-
if (!drawable) {
|
|
1085
|
-
return false;
|
|
1086
|
-
}
|
|
1087
|
-
const bounds = new Rectangle();
|
|
1088
|
-
bounds.initFromBounds(left, right, bottom, top);
|
|
1089
|
-
const worldPos = twgl.v3.create();
|
|
1090
|
-
|
|
1091
|
-
drawable.updateCPURenderAttributes();
|
|
1092
|
-
|
|
1093
|
-
for (worldPos[1] = bounds.bottom; worldPos[1] <= bounds.top; worldPos[1]++) {
|
|
1094
|
-
for (worldPos[0] = bounds.left; worldPos[0] <= bounds.right; worldPos[0]++) {
|
|
1095
|
-
if (drawable.isTouching(worldPos)) {
|
|
1096
|
-
return true;
|
|
1097
|
-
}
|
|
1098
|
-
}
|
|
1099
|
-
}
|
|
1100
|
-
return false;
|
|
1101
|
-
}
|
|
1102
|
-
|
|
1103
|
-
/**
|
|
1104
|
-
* Determine if the drawable is touching a point in the Scratch coordinate system
|
|
1105
|
-
*
|
|
1106
|
-
* @param {int} drawableID The ID of the drawable to check.
|
|
1107
|
-
* @param {int} x The x coordinate of the point.
|
|
1108
|
-
* @param {int} y The y coordinate of the point.
|
|
1109
|
-
* @returns {boolean} If the drawable is touching the point
|
|
1110
|
-
*/
|
|
1111
|
-
drawableTouchingScratchPoint (drawableID, x, y) {
|
|
1112
|
-
const drawable = this._allDrawables[drawableID];
|
|
1113
|
-
if (!drawable) {
|
|
1114
|
-
return false;
|
|
1115
|
-
}
|
|
1116
|
-
drawable.updateCPURenderAttributes();
|
|
1117
|
-
return drawable.isTouching([x, y]);
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
1072
|
/**
|
|
1121
1073
|
* Detect which sprite, if any, is at the given location.
|
|
1122
1074
|
* This function will pick all drawables that are visible, unless specific
|