Skip to content

Instantly share code, notes, and snippets.

View MV Plugin Interface.js
/**
*
* before -> (default / insteadOf) -> afterReturning -> after
* の順
*/
Game_Player.before.update = function(){
//updateが呼ばれる前に実行される
};
@liply
liply / liply_memoryleak_patch.js
Last active Jun 21, 2016
prallax, battleback leak patch: 遠景、戦闘背景に対するリークパッチ
View liply_memoryleak_patch.js
//=============================================================================
// liply_memoryleak_patch.js
// ----------------------------------------------------------------------------
// Copyright (c) 2015 liply
// This plugin is released under the MIT License.
// http://opensource.org/licenses/mit-license.php
// ----------------------------------------------------------------------------
// 2016/02/01 Canvasモード起動時や特定状況で落ちるバグを修正
// 2015/12/05 初版
// ----------------------------------------------------------------------------
@liply
liply / dispatch.js
Last active Mar 14, 2016
reactive array
View dispatch.js
import * as Rx from '@reactivex/rxjs'
function dispatch(key, dispatcher){
let map = {};
let newMap = {};
let subscription = null;
let extractId = (typeof key === 'string')? (v)=>v[key]: key;
function createChannel(x){
let subject = new Rx.BehaviorSubject(x);
@liply
liply / aa-sample.js
Last active Mar 17, 2016
ステートフルおじさん用のvdomを使ったフレームワーク作成中。その使用コードの一部
View aa-sample.js
async function chooseFile(){
const ev = await F.on('#chooser', 'change');
const files = Array.prototype.slice.call(ev.target.files, 0);
const imageFiles = files.filter((f)=>f.type.match('image.*'));
if(imageFiles.length !== 0) {
const imagePromises = imageFiles.map(readAsDataURL);
const images = (await Promise.all(imagePromises)).map((i)=>i.target.result);
@liply
liply / liply_WinChrome_scroll_patch.js
Last active Apr 14, 2016
windows chrome scroll patch
View liply_WinChrome_scroll_patch.js
/*:
* @plugindesc Windows Chrome scroll patch
* @author liply
*
* @help There is rendering problem on 2016/4/6 Windows Chrome.
* MV Core creates large canvas garbage. This patch fix it.
*
* Special Thanks
* @o_ggy
* This plugin is released under the MIT License.
@liply
liply / TerraxLighting.js
Last active Jul 10, 2016
TerraxLighting modified (works on Android Chrome)
View TerraxLighting.js
// TerraxLighting.js (works on Android Chrome)
// modified by liply
// license: MIT
//=============================================================================
// Terrax Plugins - Lighting system
// TerraxLighting.js
// Version: 1.1.1
//=============================================================================
//
View index.html
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<script>
function createSelectionBox(id, fruits, selected, masterFruits){
var html = '<select id="select' + id + '">';
@liply
liply / liply_ios8_patch.js
Created Jun 24, 2016
MV patch for iOS8 (~ v1.2.0)
View liply_ios8_patch.js
//=============================================================================
// liply_ios8_patch.js
//=============================================================================
/*:
* @plugindesc patch for iOS8 ~ v1.2.0 (run [Playtest] before publish)
* @author liply
*
* @help
*
@liply
liply / liply_onBitmapLoad_patch.js
Created Jun 24, 2016
EnemyBookで落ちるバグ対処
View liply_onBitmapLoad_patch.js
//License: MIT
Sprite.prototype._onBitmapLoad = function() {
if (!!this._bitmap && this._frame.width === 0 && this._frame.height === 0) {
this._frame.width = this._bitmap.width;
this._frame.height = this._bitmap.height;
}
this._refresh();
};
@liply
liply / liply_SceneCache.js
Last active Aug 8, 2016
fix memory bloat patch
View liply_SceneCache.js
/*:
* @plugindesc Scene Cache System
* @author liply(support at liply.net)
*
* @param WebGL
* @desc Force WebGL (1 for on, 0 for off)
* @default 0
*
* @param Report Memory
* @default 0
You can’t perform that action at this time.