Skip to content

Commit 05c6ead

Browse files
committed
ts compile
1 parent d23b891 commit 05c6ead

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

engine/binary.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ export class Reader {
208208
}
209209
i8() {
210210
const byte = this.bytes(1)[0];
211-
return (byte & 127) - (byte & 128);
211+
return (byte & 0b0111_1111) - (byte & 0b1000_0000);
212212
}
213213
bool() {
214214
return this.bytes(1)[0] > 0;
@@ -219,7 +219,7 @@ export class Reader {
219219
}
220220
i16() {
221221
const bytes = this.bytes(2);
222-
return (((bytes[0] & 127) << 8) + bytes[1]) - ((bytes[0] & 128) << 8);
222+
return (((bytes[0] & 0b0111_1111) << 8) + bytes[1]) - ((bytes[0] & 0b1000_0000) << 8);
223223
}
224224
i32() {
225225
return new Int32Array(this.bytes(4).buffer)[0];

ui/block_menu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function blockMenuPlugin(world) {
3636
})
3737
.class("block")
3838
.attribute("data-name", I18N[LANG.get()].BLOCKS[block.staticData.name])
39-
.addEventListener("mousedown", e => {
39+
.addEventListener("pointerdown", e => {
4040
deselectAll(world);
4141
dragging.inner = {
4242
type: "new",

ui/debug_view.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export function debugViewPlugin(world) {
153153
ctx.beginPath();
154154
ctx.arc(ptr.x, ptr.y, 40 + ((ptr.width + ptr.height) / 4), 0, Math.PI * 2);
155155
ctx.fill();
156-
ctx.fillText(`buttons: ${ptr.buttons}, type: ${ptr.pointerType}`, ptr.x + 100, ptr.y + 100);
156+
ctx.fillText(`${ptr.button}, buttons: ${ptr.buttons}, type: ${ptr.pointerType}`, ptr.x + 100, ptr.y + 100);
157157
}
158158
ctx.font = `20px "JetBrains Mono", monospace`;
159159
ctx.textAlign = "left";

0 commit comments

Comments
 (0)