Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/apis/game.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class Game extends EventEmitter {
}

#onframe(): void {
if (!this.#ready && window.input !== undefined) {
if (!this.#ready && _window.input !== undefined) {
this.#ready = true;
this.#onready();
}
Expand Down
2 changes: 1 addition & 1 deletion src/apis/gamepad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Gamepad {
});
this.connected = false;

window.navigator.getGamepads = new Proxy(window.navigator.getGamepads, {
_window.navigator.getGamepads = new Proxy(_window.navigator.getGamepads, {
apply: (target, thisArg, args) => {
if (this.connected) return [this.#toGamepad()];
return Reflect.apply(target, thisArg, args);
Expand Down
4 changes: 2 additions & 2 deletions src/apis/minimap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ class Minimap {
return Reflect.apply(target, thisArg, args);
}
if (
Math.abs(transform.a / transform.d - window.innerWidth / window.innerHeight) >
(window.innerWidth / window.innerHeight) * 0.000_05
Math.abs(transform.a / transform.d - _window.innerWidth / _window.innerHeight) >
(_window.innerWidth / _window.innerHeight) * 0.000_05
) {
return Reflect.apply(target, thisArg, args);
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/canvas_kit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class CanvasKit {
* The consumer will be called before.
*/
static hookRAF(consumer: () => void): void {
window.requestAnimationFrame = new Proxy(window.requestAnimationFrame, {
_window.requestAnimationFrame = new Proxy(_window.requestAnimationFrame, {
apply(target, thisArg, args) {
consumer();
return Reflect.apply(target, thisArg, args);
Expand Down