Merge pull request #24 from Live2D/feature/fix_json_parse

Fix json parsing.
translate
ono-at-live2d-com 2019-03-19 13:43:48 +09:00 committed by GitHub
commit 6f92f0d58e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 23 deletions

View File

@ -203,10 +203,10 @@ export namespace Live2DCubismFramework
Value.staticReleaseNotForClientCall();
s_cubismIdManager.release();
s_cubismIdManager = void 0;
s_cubismIdManager = null;
// レンダラの静的リソース(シェーダプログラム他)を解放する
CubismRenderer.StaticRelease();
CubismRenderer.staticRelease();
s_isInitialized = false;

View File

@ -34,18 +34,9 @@ export namespace Live2DCubismFramework
*/
public static delete(renderer: CubismRenderer): void
{
renderer = void 0;
renderer = null;
}
/**
*
*/
public static StaticRelease(): void
{
//CubismRenderer_WebGL.doStaticRelease();
}
/**
*
*
@ -251,11 +242,16 @@ export namespace Live2DCubismFramework
indexArray: Uint16Array, vertexArray: Float32Array, uvArray: Float32Array,
opacity: number, colorBlendMode: CubismBlendMode): void;
/**
*
*/
public static staticRelease: Function;
protected _mvpMatrix4x4: CubismMatrix44; // Model-View-Projection 行列
protected _modelColor: CubismTextureColor; // モデル自体のカラーRGBA
protected _modelColor: CubismTextureColor; // モデル自体のカラーRGBA
protected _isCulling: boolean; // カリングが有効ならtrue
protected _isPremultipliedAlpha: boolean; // 乗算済みαならtrue
protected _anisortopy: any; // テクスチャの異方性フィルタリングのパラメータ
protected _anisortopy: any; // テクスチャの異方性フィルタリングのパラメータ
protected _model: CubismModel; // レンダリング対象のモデル
}

View File

@ -816,7 +816,6 @@ export namespace Live2DCubismFramework
if(s_instance)
{
s_instance.release();
s_instance = void 0;
s_instance = null;
}
}
@ -1717,4 +1716,11 @@ export namespace Live2DCubismFramework
gl: WebGLRenderingContext; // webglコンテキスト
}
/**
*
*/
CubismRenderer.staticRelease = (): void =>
{
CubismRenderer_WebGL.doStaticRelease();
}
}

View File

@ -212,7 +212,7 @@ export namespace Live2DCubismFramework
*/
public setErrorNotForClientCall(errorStr: string): Value
{
return Value.errorValue;
return JsonError.errorValue;
}
/**
@ -234,11 +234,11 @@ export namespace Live2DCubismFramework
*/
public static staticReleaseNotForClientCall(): void
{
JsonBoolean.trueValue = void 0;
JsonBoolean.falseValue = void 0;
JsonError.errorValue = void 0;
Value.nullValue = void 0;
Value.s_dummyKeys = void 0;
JsonBoolean.trueValue = null;
JsonBoolean.falseValue = null;
JsonError.errorValue = null;
Value.nullValue = null;
Value.s_dummyKeys = null;
JsonBoolean.trueValue = null;
JsonBoolean.falseValue = null;
@ -296,7 +296,6 @@ export namespace Live2DCubismFramework
if(!succeeded)
{
CubismJson.delete(json);
console.log("parseBytes is failed");
return null;
}
else
@ -312,7 +311,6 @@ export namespace Live2DCubismFramework
*/
public static delete(instance: CubismJson)
{
instance = void 0;
instance = null;
}
@ -369,7 +367,6 @@ export namespace Live2DCubismFramework
if(this._error)
{
console.log(this._error);
let strbuf: string = '\0';
strbuf = "Json parse error : @line " + (this._lineCount + 1) + "\n";
this._root = new JsonString(strbuf);