mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-28 22:14:15 +00:00
fixed
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
"role_group": ["donor", "staff"]
|
||||
},
|
||||
"evan": {
|
||||
"pattern": "AQAYAAcABQAAAJ7ESIIkWY7kaQIjSR4jSQAAAA==",
|
||||
"pattern": "AQAYAAcABAAAAJ7ESIIkWY7kaQIjSR4jSQAAAA==",
|
||||
"role_group": ["staff"]
|
||||
},
|
||||
"diagonal_stripe": {
|
||||
@@ -69,7 +69,7 @@
|
||||
"role_group": ["donor", "staff"]
|
||||
},
|
||||
"openfront": {
|
||||
"pattern": "AQBCAAoABQAAAAAAAAAAAAAAAAAAAACAw/GJ8Hk4og+RSGBCIBKZCEQigQqBSKQiEHk8MjwekYxAJBCIEChEIgKRQCBCIBGJCDgCnwiBiCMiAAAAAAAAAAAA",
|
||||
"pattern": "AQBCAAoABAAAAAAAAAAAAAAAAAAAAACAw/GJ8Hk4og+RSGBCIBKZCEQigQqBSKQiEHk8MjwekYxAJBCIEChEIgKRQCBCIBGJCDgCnwiBiCMiAAAAAAAAAAAA",
|
||||
"role_group": ["staff"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,8 +52,9 @@ export class PatternDecoder {
|
||||
|
||||
isSet(x: number, y: number): boolean {
|
||||
const norm = (v: number, mod: number) => (v + mod) % mod;
|
||||
const px = norm((x / this.scale) | 0, this.tileWidth);
|
||||
const py = norm((y / this.scale) | 0, this.tileHeight);
|
||||
const shift = Math.log2(this.scale);
|
||||
const px = norm(x >> shift, this.tileWidth);
|
||||
const py = norm(y >> shift, this.tileHeight);
|
||||
const idx = py * this.tileWidth + px;
|
||||
const byteIndex = idx >> 3;
|
||||
const bitIndex = idx & 7;
|
||||
|
||||
Reference in New Issue
Block a user