AURA CLIENT Universal Wireframe

Adds a wireframe view mode to most unity games

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         AURA CLIENT Universal Wireframe
// @description  Adds a wireframe view mode to most unity games
// @author       AURA CLIENT
// @match        *://*deadshot.io/*
// @match        *://*cryzen.io/*
// @match        *://*kirka.io/*
// @match        *://*kour.io/*
// @match        *://*narrow.one/*
// @match        *://*.io/*
// @license      MIT
// @run-at       document-start
// @version 0.0.1.20250728180343
// @namespace https://greasyfork.org/users/1499252
// ==/UserScript==

const settings = {
    wireframe: false,
};


const WebGL = WebGL2RenderingContext.prototype;


HTMLCanvasElement.prototype.getContext = new Proxy(HTMLCanvasElement.prototype.getContext, {
    apply(target, thisArgs, args) {
        if (args[1]) {
            args[1].preserveDrawingBuffer = false;
        }
        return Reflect.apply(...arguments);
    }
});

const handler = {
    apply(target, thisArgs, args) {
        const program = thisArgs.getParameter(thisArgs.CURRENT_PROGRAM);
        args[0] = settings.wireframe && !program.isUIProgram && args[1] > 6 ? thisArgs.LINES : args[0];
        try {
            return Reflect.apply(...arguments);
        } catch (error) {
            console.error('Drawing elements failed:', error);
        }
    }
};

WebGL.drawElements = new Proxy(WebGL.drawElements, handler);
WebGL.drawElementsInstanced = new Proxy(WebGL.drawElementsInstanced, handler);

window.addEventListener('keyup', function (event) {
    if (document.activeElement && document.activeElement.value !== undefined) return;
    if (event.code === 'KeyQ') {
        settings.wireframe = !settings.wireframe;
    }
});