PPML

Pixel Place Map Loader

As of 22.04.2022. See ბოლო ვერსია.

ეს სკრიპტი არ უნდა იყოს პირდაპირ დაინსტალირებული. ეს ბიბლიოთეკაა, სხვა სკრიპტებისთვის უნდა ჩართეთ მეტა-დირექტივაში // @require https://update.greasyfork.org/scripts/443803/1042800/PPML.js.

ავტორი
Exnonull
ვერსია
1.2
შექმნილია
22.04.2022
განახლებულია
22.04.2022
Size
4,7 KB
ლიცენზია
MIT

to make this lib working require CWSS and WorkerTimer



Variable: PPML || window.PPML

PPML.ws // WebSocket
PPML.safeEmit(x,y,pixel) // undefined
PPML.emit(x,y,pixel) // undefined / false / true
PPML.map
{
    pixels, // Uint8[]
    colors, // Uint32[]
    width, height, // number
    find(pixel) // index of pixels
    get(x,y) // pixel
    set(x,y,pixel) // undefined
}

PPML.setHook({
    priority: 0,
    init(map) {
        // ...
    }
});