PPML

Pixel Place Map Loader

2022/04/22のページです。最新版はこちら。

このスクリプトは単体で利用できません。右のようなメタデータを含むスクリプトから、ライブラリとして読み込まれます: // @require https://update.greasyfork.org/scripts/443803/1042792/PPML.js

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください。
作者
Exnonull
バージョン
1.1
作成日
2022/04/22
更新日
2022/04/22
大きさ
4.39KB
ライセンス
MIT

to make this lib working require CWSS



Variable: PPML || window.PPML

PPML.ws // WebSocket
PPML.emit(x,y,pixel) // undefined
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) {
        // ...
    }
});