pxt-microbit 7.1.24 → 7.1.29
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/built/block-tests.js +1 -1
- package/built/common-sim.d.ts +16 -2
- package/built/common-sim.js +320 -4
- package/built/hexcache/{f254b35661aec9c97b86444b02fe17ed0fa65ad03b8ab65dd2ef6c66e74259fe.hex → 26bf3d28c9e047cf23ab30fdc58a2b08ffdff09a1d937217a0b9f0c6865e26f8.hex} +79 -79
- package/built/hexcache/{c5a9e0a8ad381a258b95357cf7aa140734c79ef987eb172003e8571d37bb6fbf.hex → 3ad12e3ab4375ab9cdc8878550a39c51482d2739970dc1ad4a9267c62badb7bd.hex} +82 -82
- package/built/hexcache/{f9d55de9d2511f3a9625351415d9c95513d63a475e4a4c9f23db905d22e80af0.hex → 4e84d0c0d59051e8b1bf3f71205b179a9ae1b51928292f2aea36016ecc49d896.hex} +79 -79
- package/built/hexcache/{55639532a88cab7365a995dd19138a4085b2435262f5783f2cc2204a1e210a6c.hex → 846508e18afd4c8d586be2b6e3ebd204e658a9531deed5cd3f0dbfaaeeeb8285.hex} +82 -82
- package/built/target.js +1 -1
- package/built/target.json +1 -1
- package/built/targetlight.js +1 -1
- package/built/targetlight.json +1 -1
- package/built/theme.json +1 -1
- package/built/web/blockly.css +1 -1
- package/built/web/react-common-authcode.css +1 -1
- package/built/web/react-common-multiplayer.css +1 -1
- package/built/web/react-common-skillmap.css +1 -1
- package/built/web/rtlblockly.css +1 -1
- package/built/web/rtlreact-common-authcode.css +1 -1
- package/built/web/rtlreact-common-multiplayer.css +1 -1
- package/built/web/rtlreact-common-skillmap.css +1 -1
- package/built/web/rtlsemantic.css +2 -2
- package/built/web/semantic.css +2 -2
- package/docs/courses.md +2 -2
- package/docs/extensions/extension-gallery.md +4 -0
- package/docs/microcode.md +4 -9
- package/docs/projects/SUMMARY.md +3 -4
- package/docs/projects/duct-tape-watch.md +0 -4
- package/docs/projects/heads-guess.md +11 -11
- package/docs/projects/rock-paper-scissors.md +1 -1
- package/docs/projects/spy/heads-guess.md +1 -1
- package/docs/projects/spy/micro-chat.md +2 -2
- package/docs/projects/spy/rock-paper-scissors.md +2 -2
- package/package.json +17 -3
- package/pxtarget.json +1 -0
- package/targetconfig.json +75 -1
package/built/common-sim.js
CHANGED
|
@@ -813,16 +813,42 @@ var pxsim;
|
|
|
813
813
|
Key[Key["PageDown"] = 34] = "PageDown";
|
|
814
814
|
Key[Key["End"] = 35] = "End";
|
|
815
815
|
Key[Key["Home"] = 36] = "Home";
|
|
816
|
+
Key[Key["LeftShift"] = 1016] = "LeftShift";
|
|
817
|
+
Key[Key["RightShift"] = 1017] = "RightShift";
|
|
818
|
+
Key[Key["LeftControl"] = 1018] = "LeftControl";
|
|
819
|
+
Key[Key["RightControl"] = 1019] = "RightControl";
|
|
820
|
+
Key[Key["Backspace"] = 8] = "Backspace";
|
|
821
|
+
Key[Key["Delete"] = 46] = "Delete";
|
|
816
822
|
})(Key = browserEvents.Key || (browserEvents.Key = {}));
|
|
817
823
|
function onKeyboardEvent(event, pressed) {
|
|
824
|
+
const eventValue = getValueForKey(event);
|
|
825
|
+
fireEvent(eventValue, pressed);
|
|
826
|
+
if (eventValue === Key.Shift) {
|
|
827
|
+
if (event.location === event.DOM_KEY_LOCATION_LEFT) {
|
|
828
|
+
fireEvent(Key.LeftShift, pressed);
|
|
829
|
+
}
|
|
830
|
+
else if (event.location === event.DOM_KEY_LOCATION_RIGHT) {
|
|
831
|
+
fireEvent(Key.RightShift, pressed);
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
if (eventValue === Key.Control) {
|
|
835
|
+
if (event.location === event.DOM_KEY_LOCATION_LEFT) {
|
|
836
|
+
fireEvent(Key.LeftControl, pressed);
|
|
837
|
+
}
|
|
838
|
+
else if (event.location === event.DOM_KEY_LOCATION_RIGHT) {
|
|
839
|
+
fireEvent(Key.RightControl, pressed);
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
browserEvents.onKeyboardEvent = onKeyboardEvent;
|
|
844
|
+
function fireEvent(key, pressed) {
|
|
818
845
|
if (pressed) {
|
|
819
|
-
pxsim.board().bus.queue(
|
|
846
|
+
pxsim.board().bus.queue(browserEvents.INTERNAL_KEY_DOWN, key);
|
|
820
847
|
}
|
|
821
848
|
else {
|
|
822
|
-
pxsim.board().bus.queue(
|
|
849
|
+
pxsim.board().bus.queue(browserEvents.INTERNAL_KEY_UP, key);
|
|
823
850
|
}
|
|
824
851
|
}
|
|
825
|
-
browserEvents.onKeyboardEvent = onKeyboardEvent;
|
|
826
852
|
function getValueForKey(event) {
|
|
827
853
|
switch (event.key) {
|
|
828
854
|
case "0":
|
|
@@ -998,6 +1024,10 @@ var pxsim;
|
|
|
998
1024
|
return Key.End;
|
|
999
1025
|
case "Home":
|
|
1000
1026
|
return Key.Home;
|
|
1027
|
+
case "Delete":
|
|
1028
|
+
return Key.Delete;
|
|
1029
|
+
case "Backspace":
|
|
1030
|
+
return Key.Backspace;
|
|
1001
1031
|
default:
|
|
1002
1032
|
return 0;
|
|
1003
1033
|
}
|
|
@@ -1010,6 +1040,10 @@ var pxsim;
|
|
|
1010
1040
|
var browserEvents;
|
|
1011
1041
|
(function (browserEvents) {
|
|
1012
1042
|
const THROTTLE_INTERVAL = 50;
|
|
1043
|
+
browserEvents.INTERNAL_KEY_DOWN = 6870;
|
|
1044
|
+
browserEvents.INTERNAL_KEY_UP = 6871;
|
|
1045
|
+
browserEvents.INTERNAL_POINTER_DOWN = 6868;
|
|
1046
|
+
browserEvents.INTERNAL_POINTER_UP = 6869;
|
|
1013
1047
|
class MouseState {
|
|
1014
1048
|
constructor() {
|
|
1015
1049
|
this.onMove = pxsim.U.throttle(() => {
|
|
@@ -1032,9 +1066,16 @@ var pxsim;
|
|
|
1032
1066
|
"pointerover",
|
|
1033
1067
|
"pointerout",
|
|
1034
1068
|
];
|
|
1069
|
+
let eventId = 6857 + events.indexOf(event.type);
|
|
1070
|
+
if (event.type === "pointerdown") {
|
|
1071
|
+
eventId = browserEvents.INTERNAL_POINTER_DOWN;
|
|
1072
|
+
}
|
|
1073
|
+
else if (event.type === "pointerup") {
|
|
1074
|
+
eventId = browserEvents.INTERNAL_POINTER_UP;
|
|
1075
|
+
}
|
|
1035
1076
|
// We add 1 to the button here because the left button is 0 and
|
|
1036
1077
|
// that's used as a wildcard in our event bus
|
|
1037
|
-
pxsim.board().bus.queue(
|
|
1078
|
+
pxsim.board().bus.queue(eventId, (event.button || 0) + 1);
|
|
1038
1079
|
}
|
|
1039
1080
|
onWheelEvent(dx, dy, dz) {
|
|
1040
1081
|
this.dx = dx;
|
|
@@ -4977,6 +5018,281 @@ var pxsim;
|
|
|
4977
5018
|
return false;
|
|
4978
5019
|
}
|
|
4979
5020
|
ImageMethods.blit = blit;
|
|
5021
|
+
const TWO_PI = 2 * Math.PI;
|
|
5022
|
+
const HALF_PI = Math.PI / 2;
|
|
5023
|
+
const THREE_HALF_PI = 3 * Math.PI / 2;
|
|
5024
|
+
const FX_ONE = 1;
|
|
5025
|
+
function fxMul(a, b) {
|
|
5026
|
+
return (a * b);
|
|
5027
|
+
}
|
|
5028
|
+
function fxDiv(a, b) {
|
|
5029
|
+
return a / b;
|
|
5030
|
+
}
|
|
5031
|
+
function fxToInt(v) {
|
|
5032
|
+
return v;
|
|
5033
|
+
}
|
|
5034
|
+
function fxFloor(v) {
|
|
5035
|
+
return v | 0;
|
|
5036
|
+
}
|
|
5037
|
+
function parseShearArgs(src, args, argIndex) {
|
|
5038
|
+
const parsed = {
|
|
5039
|
+
sx: 0,
|
|
5040
|
+
sy: 0,
|
|
5041
|
+
scaledWidth: 0,
|
|
5042
|
+
scaledHeight: 0,
|
|
5043
|
+
minX: 0,
|
|
5044
|
+
minY: 0,
|
|
5045
|
+
maxX: 0,
|
|
5046
|
+
maxY: 0,
|
|
5047
|
+
xShear: 0,
|
|
5048
|
+
yShear: 0,
|
|
5049
|
+
flip: false
|
|
5050
|
+
};
|
|
5051
|
+
const sx = (args.getAt(argIndex) * FX_ONE);
|
|
5052
|
+
const sy = (args.getAt(argIndex + 1) * FX_ONE);
|
|
5053
|
+
let angle = args.getAt(argIndex + 2);
|
|
5054
|
+
parsed.sx = sx;
|
|
5055
|
+
parsed.sy = sy;
|
|
5056
|
+
if (sx <= 0 || sy <= 0) {
|
|
5057
|
+
return parsed;
|
|
5058
|
+
}
|
|
5059
|
+
angle %= TWO_PI;
|
|
5060
|
+
if (angle < 0) {
|
|
5061
|
+
angle += TWO_PI;
|
|
5062
|
+
}
|
|
5063
|
+
let flip = false;
|
|
5064
|
+
if (angle > HALF_PI && angle <= THREE_HALF_PI) {
|
|
5065
|
+
flip = true;
|
|
5066
|
+
angle = (angle + Math.PI) % TWO_PI;
|
|
5067
|
+
}
|
|
5068
|
+
const xShear = (-Math.tan(angle / 2) * FX_ONE);
|
|
5069
|
+
const yShear = (Math.sin(angle) * FX_ONE);
|
|
5070
|
+
const scaledWidth = src._width * sx;
|
|
5071
|
+
const scaledHeight = src._height * sy;
|
|
5072
|
+
let shearedX = 0;
|
|
5073
|
+
let shearedY = 0;
|
|
5074
|
+
const SHEAR = (x, y) => {
|
|
5075
|
+
shearedX = fxFloor(x + fxMul(y, xShear));
|
|
5076
|
+
shearedY = fxFloor(y + fxMul(shearedX, yShear));
|
|
5077
|
+
shearedX = fxFloor(shearedX + fxMul(shearedY, xShear));
|
|
5078
|
+
};
|
|
5079
|
+
SHEAR(0, 0);
|
|
5080
|
+
let minX = shearedX;
|
|
5081
|
+
let minY = shearedY;
|
|
5082
|
+
let maxX = shearedX;
|
|
5083
|
+
let maxY = shearedY;
|
|
5084
|
+
SHEAR(scaledWidth - FX_ONE, 0);
|
|
5085
|
+
minX = Math.min(minX, shearedX);
|
|
5086
|
+
minY = Math.min(minY, shearedY);
|
|
5087
|
+
maxX = Math.max(maxX, shearedX);
|
|
5088
|
+
maxY = Math.max(maxY, shearedY);
|
|
5089
|
+
SHEAR(scaledWidth - FX_ONE, scaledHeight - FX_ONE);
|
|
5090
|
+
minX = Math.min(minX, shearedX);
|
|
5091
|
+
minY = Math.min(minY, shearedY);
|
|
5092
|
+
maxX = Math.max(maxX, shearedX);
|
|
5093
|
+
maxY = Math.max(maxY, shearedY);
|
|
5094
|
+
SHEAR(0, scaledHeight - FX_ONE);
|
|
5095
|
+
minX = Math.min(minX, shearedX);
|
|
5096
|
+
minY = Math.min(minY, shearedY);
|
|
5097
|
+
maxX = Math.max(maxX, shearedX);
|
|
5098
|
+
maxY = Math.max(maxY, shearedY);
|
|
5099
|
+
parsed.minX = minX;
|
|
5100
|
+
parsed.minY = minY;
|
|
5101
|
+
parsed.maxX = maxX;
|
|
5102
|
+
parsed.maxY = maxY;
|
|
5103
|
+
parsed.scaledWidth = scaledWidth;
|
|
5104
|
+
parsed.scaledHeight = scaledHeight;
|
|
5105
|
+
parsed.xShear = xShear;
|
|
5106
|
+
parsed.yShear = yShear;
|
|
5107
|
+
parsed.flip = flip;
|
|
5108
|
+
return parsed;
|
|
5109
|
+
}
|
|
5110
|
+
function _drawScaledRotatedImage(dst, src, args) {
|
|
5111
|
+
drawScaledRotatedImage(dst, src, args);
|
|
5112
|
+
}
|
|
5113
|
+
ImageMethods._drawScaledRotatedImage = _drawScaledRotatedImage;
|
|
5114
|
+
function drawScaledRotatedImage(dst, src, args) {
|
|
5115
|
+
const xDst = args.getAt(0);
|
|
5116
|
+
const yDst = args.getAt(1);
|
|
5117
|
+
if (xDst >= dst._width || yDst >= dst._height) {
|
|
5118
|
+
return;
|
|
5119
|
+
}
|
|
5120
|
+
const shearArgs = parseShearArgs(src, args, 2);
|
|
5121
|
+
if (shearArgs.sx <= 0 ||
|
|
5122
|
+
shearArgs.sy <= 0 ||
|
|
5123
|
+
xDst + fxToInt(shearArgs.maxX - shearArgs.minX) < 0 ||
|
|
5124
|
+
yDst + fxToInt(shearArgs.maxY - shearArgs.minY) < 0) {
|
|
5125
|
+
return;
|
|
5126
|
+
}
|
|
5127
|
+
let shearedX = 0;
|
|
5128
|
+
let shearedY = 0;
|
|
5129
|
+
const SHEAR = (x, y) => {
|
|
5130
|
+
shearedX = fxFloor(x + fxMul(y, shearArgs.xShear));
|
|
5131
|
+
shearedY = fxFloor(y + fxMul(shearedX, shearArgs.yShear));
|
|
5132
|
+
shearedX = fxFloor(shearedX + fxMul(shearedY, shearArgs.xShear));
|
|
5133
|
+
};
|
|
5134
|
+
dst.makeWritable();
|
|
5135
|
+
if (shearArgs.flip) {
|
|
5136
|
+
for (let y = 0; y < shearArgs.scaledHeight; y += FX_ONE) {
|
|
5137
|
+
for (let x = 0; x < shearArgs.scaledWidth; x += FX_ONE) {
|
|
5138
|
+
let color = getPixel(src, fxToInt(fxDiv((shearArgs.scaledWidth - x - FX_ONE), shearArgs.sx)), fxToInt(fxDiv((shearArgs.scaledHeight - y - FX_ONE), shearArgs.sy)));
|
|
5139
|
+
if (!color)
|
|
5140
|
+
continue;
|
|
5141
|
+
SHEAR(x, y);
|
|
5142
|
+
setPixel(dst, xDst + fxToInt(shearedX - shearArgs.minX), yDst + fxToInt(shearedY - shearArgs.minY), color);
|
|
5143
|
+
}
|
|
5144
|
+
}
|
|
5145
|
+
}
|
|
5146
|
+
else {
|
|
5147
|
+
for (let y = 0; y < shearArgs.scaledHeight; y += FX_ONE) {
|
|
5148
|
+
for (let x = 0; x < shearArgs.scaledWidth; x += FX_ONE) {
|
|
5149
|
+
let color = getPixel(src, fxToInt(fxDiv(x, shearArgs.sx)), fxToInt(fxDiv(y, shearArgs.sy)));
|
|
5150
|
+
if (!color)
|
|
5151
|
+
continue;
|
|
5152
|
+
SHEAR(x, y);
|
|
5153
|
+
setPixel(dst, xDst + fxToInt(shearedX - shearArgs.minX), yDst + fxToInt(shearedY - shearArgs.minY), color);
|
|
5154
|
+
}
|
|
5155
|
+
}
|
|
5156
|
+
}
|
|
5157
|
+
}
|
|
5158
|
+
ImageMethods.drawScaledRotatedImage = drawScaledRotatedImage;
|
|
5159
|
+
function _checkOverlapsScaledRotatedImage(dst, src, args) {
|
|
5160
|
+
const xDst = args.getAt(0);
|
|
5161
|
+
const yDst = args.getAt(1);
|
|
5162
|
+
if (xDst >= dst._width || yDst >= dst._height) {
|
|
5163
|
+
return false;
|
|
5164
|
+
}
|
|
5165
|
+
const shearArgs = parseShearArgs(src, args, 2);
|
|
5166
|
+
if (shearArgs.sx <= 0 ||
|
|
5167
|
+
shearArgs.sy <= 0 ||
|
|
5168
|
+
xDst + fxToInt(shearArgs.maxX - shearArgs.minX) < 0 ||
|
|
5169
|
+
yDst + fxToInt(shearArgs.maxY - shearArgs.minY) < 0) {
|
|
5170
|
+
return false;
|
|
5171
|
+
}
|
|
5172
|
+
let shearedX = 0;
|
|
5173
|
+
let shearedY = 0;
|
|
5174
|
+
const SHEAR = (x, y) => {
|
|
5175
|
+
shearedX = fxFloor(x + fxMul(y, shearArgs.xShear));
|
|
5176
|
+
shearedY = fxFloor(y + fxMul(shearedX, shearArgs.yShear));
|
|
5177
|
+
shearedX = fxFloor(shearedX + fxMul(shearedY, shearArgs.xShear));
|
|
5178
|
+
};
|
|
5179
|
+
if (shearArgs.flip) {
|
|
5180
|
+
for (let y = 0; y < shearArgs.scaledHeight; y += FX_ONE) {
|
|
5181
|
+
for (let x = 0; x < shearArgs.scaledWidth; x += FX_ONE) {
|
|
5182
|
+
let color = getPixel(src, fxToInt(fxDiv((shearArgs.scaledWidth - x - FX_ONE), shearArgs.sx)), fxToInt(fxDiv((shearArgs.scaledHeight - y - FX_ONE), shearArgs.sy)));
|
|
5183
|
+
if (!color)
|
|
5184
|
+
continue;
|
|
5185
|
+
SHEAR(x, y);
|
|
5186
|
+
if (getPixel(dst, xDst + fxToInt(shearedX - shearArgs.minX), yDst + fxToInt(shearedY - shearArgs.minY))) {
|
|
5187
|
+
return true;
|
|
5188
|
+
}
|
|
5189
|
+
}
|
|
5190
|
+
}
|
|
5191
|
+
}
|
|
5192
|
+
else {
|
|
5193
|
+
for (let y = 0; y < shearArgs.scaledHeight; y += FX_ONE) {
|
|
5194
|
+
for (let x = 0; x < shearArgs.scaledWidth; x += FX_ONE) {
|
|
5195
|
+
let color = getPixel(src, fxToInt(fxDiv(x, shearArgs.sx)), fxToInt(fxDiv(y, shearArgs.sy)));
|
|
5196
|
+
if (!color)
|
|
5197
|
+
continue;
|
|
5198
|
+
SHEAR(x, y);
|
|
5199
|
+
if (getPixel(dst, xDst + fxToInt(shearedX - shearArgs.minX), yDst + fxToInt(shearedY - shearArgs.minY))) {
|
|
5200
|
+
return true;
|
|
5201
|
+
}
|
|
5202
|
+
}
|
|
5203
|
+
}
|
|
5204
|
+
}
|
|
5205
|
+
return false;
|
|
5206
|
+
}
|
|
5207
|
+
ImageMethods._checkOverlapsScaledRotatedImage = _checkOverlapsScaledRotatedImage;
|
|
5208
|
+
function _checkOverlapsTwoScaledRotatedImages(dst, src, args) {
|
|
5209
|
+
const xDst = args.getAt(0);
|
|
5210
|
+
const yDst = args.getAt(1);
|
|
5211
|
+
const dstArgs = parseShearArgs(dst, args, 2);
|
|
5212
|
+
if (dstArgs.sx <= 0 ||
|
|
5213
|
+
dstArgs.sy <= 0 ||
|
|
5214
|
+
xDst >= dstArgs.maxX - dstArgs.minX ||
|
|
5215
|
+
yDst >= dstArgs.maxY - dstArgs.minY) {
|
|
5216
|
+
return false;
|
|
5217
|
+
}
|
|
5218
|
+
const srcArgs = parseShearArgs(src, args, 5);
|
|
5219
|
+
if (srcArgs.sx <= 0 ||
|
|
5220
|
+
srcArgs.sy <= 0 ||
|
|
5221
|
+
xDst + srcArgs.maxX - srcArgs.minX < 0 ||
|
|
5222
|
+
yDst + srcArgs.maxY - srcArgs.minY < 0) {
|
|
5223
|
+
return false;
|
|
5224
|
+
}
|
|
5225
|
+
let shearedX = 0;
|
|
5226
|
+
let shearedY = 0;
|
|
5227
|
+
let unshearedX = 0;
|
|
5228
|
+
let unshearedY = 0;
|
|
5229
|
+
const SHEAR = (x, y, xShear, yShear) => {
|
|
5230
|
+
shearedX = fxFloor(x + fxMul(y, xShear));
|
|
5231
|
+
shearedY = fxFloor(y + fxMul(shearedX, yShear));
|
|
5232
|
+
shearedX = fxFloor(shearedX + fxMul(shearedY, xShear));
|
|
5233
|
+
};
|
|
5234
|
+
const REVERSE_SHEAR = (x, y, xShear, yShear) => {
|
|
5235
|
+
unshearedX = fxFloor(x - fxMul(y, xShear));
|
|
5236
|
+
unshearedY = fxFloor(y - fxMul(unshearedX, yShear));
|
|
5237
|
+
unshearedX = fxFloor(unshearedX - fxMul(unshearedY, xShear));
|
|
5238
|
+
};
|
|
5239
|
+
if (srcArgs.flip) {
|
|
5240
|
+
for (let y = 0; y < srcArgs.scaledHeight; y += FX_ONE) {
|
|
5241
|
+
for (let x = 0; x < srcArgs.scaledWidth; x += FX_ONE) {
|
|
5242
|
+
let color = getPixel(src, fxToInt(fxDiv((srcArgs.scaledWidth - x - FX_ONE), srcArgs.sx)), fxToInt(fxDiv((srcArgs.scaledHeight - y - FX_ONE), srcArgs.sy)));
|
|
5243
|
+
if (!color)
|
|
5244
|
+
continue;
|
|
5245
|
+
SHEAR(x, y, srcArgs.xShear, srcArgs.yShear);
|
|
5246
|
+
const screenX = xDst + shearedX - srcArgs.minX;
|
|
5247
|
+
const screenY = yDst + shearedY - srcArgs.minY;
|
|
5248
|
+
if (screenX < 0 ||
|
|
5249
|
+
screenY < 0 ||
|
|
5250
|
+
screenX >= dstArgs.maxX - dstArgs.minX ||
|
|
5251
|
+
screenY >= dstArgs.maxY - dstArgs.minY) {
|
|
5252
|
+
continue;
|
|
5253
|
+
}
|
|
5254
|
+
REVERSE_SHEAR(screenX + dstArgs.minX, screenY + dstArgs.minY, dstArgs.xShear, dstArgs.yShear);
|
|
5255
|
+
if (dstArgs.flip) {
|
|
5256
|
+
if (getPixel(dst, fxToInt(fxDiv(dstArgs.scaledWidth - unshearedX - FX_ONE, dstArgs.sx)), fxToInt(fxDiv(dstArgs.scaledHeight - unshearedY - FX_ONE, dstArgs.sy)))) {
|
|
5257
|
+
return true;
|
|
5258
|
+
}
|
|
5259
|
+
}
|
|
5260
|
+
else if (getPixel(dst, fxToInt(fxDiv(unshearedX, dstArgs.sx)), fxToInt(fxDiv(unshearedY, dstArgs.sy)))) {
|
|
5261
|
+
return true;
|
|
5262
|
+
}
|
|
5263
|
+
}
|
|
5264
|
+
}
|
|
5265
|
+
}
|
|
5266
|
+
else {
|
|
5267
|
+
for (let y = 0; y < srcArgs.scaledHeight; y += FX_ONE) {
|
|
5268
|
+
for (let x = 0; x < srcArgs.scaledWidth; x += FX_ONE) {
|
|
5269
|
+
let color = getPixel(src, fxToInt(fxDiv(x, srcArgs.sx)), fxToInt(fxDiv(y, srcArgs.sy)));
|
|
5270
|
+
if (!color)
|
|
5271
|
+
continue;
|
|
5272
|
+
SHEAR(x, y, srcArgs.xShear, srcArgs.yShear);
|
|
5273
|
+
const screenX = xDst + shearedX - srcArgs.minX;
|
|
5274
|
+
const screenY = yDst + shearedY - srcArgs.minY;
|
|
5275
|
+
if (screenX < 0 ||
|
|
5276
|
+
screenY < 0 ||
|
|
5277
|
+
screenX >= dstArgs.maxX - dstArgs.minX ||
|
|
5278
|
+
screenY >= dstArgs.maxY - dstArgs.minY) {
|
|
5279
|
+
continue;
|
|
5280
|
+
}
|
|
5281
|
+
REVERSE_SHEAR(screenX + dstArgs.minX, screenY + dstArgs.minY, dstArgs.xShear, dstArgs.yShear);
|
|
5282
|
+
if (dstArgs.flip) {
|
|
5283
|
+
if (getPixel(dst, fxToInt(fxDiv(dstArgs.scaledWidth - unshearedX - FX_ONE, dstArgs.sx)), fxToInt(fxDiv(dstArgs.scaledHeight - unshearedY - FX_ONE, dstArgs.sy)))) {
|
|
5284
|
+
return true;
|
|
5285
|
+
}
|
|
5286
|
+
}
|
|
5287
|
+
else if (getPixel(dst, fxToInt(fxDiv(unshearedX, dstArgs.sx)), fxToInt(fxDiv(unshearedY, dstArgs.sy)))) {
|
|
5288
|
+
return true;
|
|
5289
|
+
}
|
|
5290
|
+
}
|
|
5291
|
+
}
|
|
5292
|
+
}
|
|
5293
|
+
return false;
|
|
5294
|
+
}
|
|
5295
|
+
ImageMethods._checkOverlapsTwoScaledRotatedImages = _checkOverlapsTwoScaledRotatedImages;
|
|
4980
5296
|
})(ImageMethods = pxsim.ImageMethods || (pxsim.ImageMethods = {}));
|
|
4981
5297
|
})(pxsim || (pxsim = {}));
|
|
4982
5298
|
(function (pxsim) {
|
|
@@ -12579,85 +12579,85 @@
|
|
|
12579
12579
|
:10310000F8BC08BC9E467047F8B5C046F8BC08BC81
|
|
12580
12580
|
:103110009E46704700000000000000000000000014
|
|
12581
12581
|
:103120000108010842424242010801083ED8E98DE7
|
|
12582
|
-
:
|
|
12583
|
-
:
|
|
12584
|
-
:
|
|
12585
|
-
:
|
|
12586
|
-
:
|
|
12587
|
-
:
|
|
12588
|
-
:
|
|
12589
|
-
:
|
|
12590
|
-
:
|
|
12591
|
-
:
|
|
12592
|
-
:
|
|
12593
|
-
:
|
|
12594
|
-
:
|
|
12595
|
-
:
|
|
12596
|
-
:
|
|
12597
|
-
:
|
|
12598
|
-
:
|
|
12599
|
-
:
|
|
12600
|
-
:
|
|
12601
|
-
:
|
|
12602
|
-
:
|
|
12603
|
-
:
|
|
12604
|
-
:
|
|
12605
|
-
:
|
|
12606
|
-
:
|
|
12607
|
-
:
|
|
12608
|
-
:
|
|
12609
|
-
:
|
|
12610
|
-
:
|
|
12611
|
-
:
|
|
12612
|
-
:
|
|
12613
|
-
:
|
|
12614
|
-
:
|
|
12615
|
-
:
|
|
12616
|
-
:
|
|
12617
|
-
:
|
|
12618
|
-
:
|
|
12619
|
-
:
|
|
12620
|
-
:
|
|
12621
|
-
:
|
|
12622
|
-
:
|
|
12623
|
-
:
|
|
12624
|
-
:
|
|
12625
|
-
:
|
|
12626
|
-
:
|
|
12627
|
-
:
|
|
12628
|
-
:
|
|
12629
|
-
:
|
|
12630
|
-
:
|
|
12631
|
-
:
|
|
12632
|
-
:
|
|
12633
|
-
:
|
|
12634
|
-
:
|
|
12635
|
-
:
|
|
12636
|
-
:
|
|
12637
|
-
:
|
|
12638
|
-
:
|
|
12639
|
-
:
|
|
12640
|
-
:
|
|
12641
|
-
:
|
|
12642
|
-
:
|
|
12643
|
-
:
|
|
12644
|
-
:
|
|
12645
|
-
:
|
|
12646
|
-
:
|
|
12647
|
-
:
|
|
12648
|
-
:
|
|
12649
|
-
:
|
|
12650
|
-
:
|
|
12651
|
-
:
|
|
12652
|
-
:
|
|
12653
|
-
:
|
|
12654
|
-
:
|
|
12655
|
-
:
|
|
12656
|
-
:
|
|
12657
|
-
:
|
|
12658
|
-
:
|
|
12659
|
-
:
|
|
12660
|
-
:
|
|
12582
|
+
:103130000000000061A7010027DB0200019B0100E5
|
|
12583
|
+
:10314000959C0100A19C0100B99C0100918E010099
|
|
12584
|
+
:10315000AD9C0100519B010097ED0200C19301005D
|
|
12585
|
+
:10316000A18E0100C3DD0200A99001006190010061
|
|
12586
|
+
:1031700065910100D58A01003DDC020049DC0200B6
|
|
12587
|
+
:10318000498C01008FDC02002DE10200CBE002003F
|
|
12588
|
+
:103190004D940100B1E3020041EB020043EB020059
|
|
12589
|
+
:1031A000A0380300EC3703003038030094390300E3
|
|
12590
|
+
:1031B00007EC020025EC02005DEF02007FEE02004A
|
|
12591
|
+
:1031C00049EB020045EB020047EB0200D5920100FB
|
|
12592
|
+
:1031D0005D92010053E2020065DD020079DD02002C
|
|
12593
|
+
:1031E000618F0100D58F010097DD0200ED8F010096
|
|
12594
|
+
:1031F00089DB0200CBDC0200DFDC0200E3DC020042
|
|
12595
|
+
:10320000EDDC0200FBDC020005DD020017DD020040
|
|
12596
|
+
:1032100021DD02002BDD02000DE2020037E2020098
|
|
12597
|
+
:103220001DEC0200A1ED02005D9D0100B59D0100B5
|
|
12598
|
+
:10323000B5880100C18801002189010075DB020009
|
|
12599
|
+
:103240007DDC02001D8C010029890100BFDB02002A
|
|
12600
|
+
:103250009D8B0100998A0100C3DB020029DC02007A
|
|
12601
|
+
:1032600037DC0200E1E10200CFDE0200F3DE020003
|
|
12602
|
+
:1032700017DF02005FDF02008DDF0200CBDD0200FE
|
|
12603
|
+
:103280005DDE0200E9DD020007DE02001FDE020053
|
|
12604
|
+
:1032900037DE020045DE020003E3020029E30200FC
|
|
12605
|
+
:1032A0004FE3020075E3020093E30200E9E102004C
|
|
12606
|
+
:1032B000FBE1020009E102001BE10200999101001B
|
|
12607
|
+
:1032C000B3DC0200DBDF02007BE002008BE00200E7
|
|
12608
|
+
:1032D0009BE00200ABE00200BBE002004192010073
|
|
12609
|
+
:1032E000BFDC0200C3DC0200A59A0100918E010040
|
|
12610
|
+
:1032F00035DD0200A18E01003BDD02003FDD020052
|
|
12611
|
+
:1033000043DD0200118F010057DD02004D8F0100E7
|
|
12612
|
+
:103310005FDD020005900100C1DD02001190010097
|
|
12613
|
+
:10332000F9930100BDE302006D9401009194010046
|
|
12614
|
+
:10333000E1940100D3E30200719F0100CDEE020091
|
|
12615
|
+
:103340008DA40100396802007D570200A5570200D4
|
|
12616
|
+
:10335000CD7B0200916E0200D976020061A70100C8
|
|
12617
|
+
:10336000B1810100DBD90200E3D90200D58101005F
|
|
12618
|
+
:10337000FD81010009DA02002D82010017DA020046
|
|
12619
|
+
:1033800035DA02005FDA020087DA02008DDA020025
|
|
12620
|
+
:1033900093DA0200A3DA0200B1DA020045A50100C7
|
|
12621
|
+
:1033A0006DA50100C5A50100D5A5010001A601007C
|
|
12622
|
+
:1033B00087EF02008FEF0200BFDA02009583010061
|
|
12623
|
+
:1033C000F5830100CDDA0200EDDA02001984010074
|
|
12624
|
+
:1033D0000DDB0200E184010029850100398501002F
|
|
12625
|
+
:1033E0004D8501005D8501008D850100E1850100AD
|
|
12626
|
+
:1033F000F5850100B7ED0200BFED0200CBED020044
|
|
12627
|
+
:10340000D3ED0200DBED0200E3ED0200E5ED02008A
|
|
12628
|
+
:10341000EFED020001EE0200F59D0100019E0100AA
|
|
12629
|
+
:103420000FEE02000D9E01001FEE02001D9E010026
|
|
12630
|
+
:1034300027EE020029EE02002D9E010039EE020067
|
|
12631
|
+
:103440003BEE02003D9E010031EB0200859A010037
|
|
12632
|
+
:10345000999A01003BEB02003DEB02006D820100F6
|
|
12633
|
+
:1034600081820100C9820100DD820100F182010038
|
|
12634
|
+
:1034700001830100118301002183010031830100D8
|
|
12635
|
+
:10348000418301005D83010059E9020061E9020006
|
|
12636
|
+
:10349000619501007595010069E902006BE9020080
|
|
12637
|
+
:1034A00073E9020083E9020097E90200A7E902003C
|
|
12638
|
+
:1034B000BBE90200CFE90200E9970100F3E902004D
|
|
12639
|
+
:1034C000F59701006DEA02006FEA0200159801000D
|
|
12640
|
+
:1034D00065980100B5980100C198010083EA0200D7
|
|
12641
|
+
:1034E000A3EA0200B3EA0200BFEA02002199010048
|
|
12642
|
+
:1034F00049990100C1EA020091990100D3EA020052
|
|
12643
|
+
:10350000E3EA0200059A0100F7EA020019EB020063
|
|
12644
|
+
:10351000659A01000D860100498601008D86010033
|
|
12645
|
+
:10352000C9860100F18601000D8701009D87010019
|
|
12646
|
+
:10353000E5870100F5870100158801002588010055
|
|
12647
|
+
:1035400025DB02002BE502002FE5020047E5020023
|
|
12648
|
+
:103550005BE5020063E5020079E502003DE8020058
|
|
12649
|
+
:1035600039E90200CBE50200CFE50200F5E50200F3
|
|
12650
|
+
:1035700019E6020089E602002595010097E602009F
|
|
12651
|
+
:1035800005E7020015E702003FE702004BE70200F3
|
|
12652
|
+
:103590004BEB02005BEB02006BEB02007BEB0200EB
|
|
12653
|
+
:1035A0008BEB02009BEB0200ABEB0200BBEB0200DB
|
|
12654
|
+
:1035B000E9E302000DE402001DE402002DE4020034
|
|
12655
|
+
:1035C0003DE402004DE402005DE402006DE402000F
|
|
12656
|
+
:1035D00085F00200A3F00200C7F00200B5950100DB
|
|
12657
|
+
:1035E000C5950100B59A0100759A01002FEB020004
|
|
12658
|
+
:1035F0008595010095950100A5950100359601007E
|
|
12659
|
+
:10360000599601007D960100B596010029970100A9
|
|
12660
|
+
:10361000519701007D97010099970100B59701002E
|
|
12661
12661
|
:1036200001000000000000000A000000000000008F
|
|
12662
12662
|
:103630006400000000000000E8030000000000003B
|
|
12663
12663
|
:103640001027000000000000A0860100000000001C
|