Legacy support.

translate
cubism-dev 2018-12-06 18:02:52 +09:00
parent 47e93ff75e
commit ea80cee403
4 changed files with 12 additions and 4 deletions

View File

@ -179,8 +179,10 @@ export namespace Live2DCubismFramework
this._options.gravity
);
let destinationParameterIndex = currentOutput[i].destinationParameterIndex;
let outParameterValue = parameterValue.slice(destinationParameterIndex);
let destinationParameterIndex: number = currentOutput[i].destinationParameterIndex;
let outParameterValue: Float32Array = (!Float32Array.prototype.slice && 'subarray' in Float32Array.prototype)
? JSON.parse(JSON.stringify(parameterValue.subarray(destinationParameterIndex))) // 値渡しするため、JSON.parse, JSON.stringify
: parameterValue.slice(destinationParameterIndex);
updateOutputParameterValue(
outParameterValue,

View File

@ -11,9 +11,12 @@
このブラウザは
<code>&lt;canvas&lt;</code>要素をサポートしていません。
</canvas>
<!-- Promise-polyfill -->
<script src = "https://cdn.jsdelivr.net/npm/promise-polyfill@8/dist/polyfill.min.js "> </script>
<!-- Live2DCubismCore -->
<script src="../../../Core/live2dcubismcore.min.js"></script>
<script src = "../../../Core/live2dcubismcore.min.js"></script>
<!-- User's Script -->
<script src = "./dist/index.js"></script>

View File

@ -22,7 +22,6 @@ import {Live2DCubismFramework as cubismmotion} from "../../../../Framework/motio
import {Live2DCubismFramework as cubismmotionqueuemanager} from "../../../../Framework/motion/cubismmotionqueuemanager";
import {Live2DCubismFramework as csmstring} from "../../../../Framework/type/csmstring";
import {Live2DCubismFramework as csmrect } from "../../../../Framework/type/csmrectf";
import { Live2DCubismFramework as CubismRenderer_WebGL } from "../../../../Framework/rendering/cubismrenderer_WebGL";
import {CubismLogInfo} from "../../../../Framework/utils/cubismdebug";
import csmRect = csmrect.csmRect;
import csmString = csmstring.csmString;
@ -47,6 +46,7 @@ import CubismDefaultParameterId = cubismdefaultparameterid;
import {LAppDefine} from "./lappdefine";
import {LAppPal} from "./lapppal";
import { gl, canvas, frameBuffer} from "./lappdelegate";
import "whatwg-fetch";
function createBuffer(path: string, callBack: any): void
{

View File

@ -15,5 +15,8 @@
"webpack-cli": "^3.1.0",
"glob": "^7.1.2"
},
"dependencies": {
"whatwg-fetch": "^3.0.0"
},
"private": true
}