Update to Cubism SDK for Web R4

This commit is contained in:
wada
2021-12-09 14:12:23 +09:00
parent 85b4313dbe
commit 13ba60d1b2
6 changed files with 29 additions and 16 deletions

View File

@ -26,7 +26,6 @@ export abstract class ACubismMotion {
*/
public static delete(motion: ACubismMotion): void {
motion.release();
motion = void 0;
motion = null;
}

View File

@ -11,7 +11,11 @@ import { CubismMath } from '../math/cubismmath';
import { CubismModel } from '../model/cubismmodel';
import { csmString } from '../type/csmstring';
import { csmVector } from '../type/csmvector';
import { CSM_ASSERT, CubismLogDebug } from '../utils/cubismdebug';
import {
CSM_ASSERT,
CubismLogDebug,
CubismLogWarning
} from '../utils/cubismdebug';
import { ACubismMotion, FinishedMotionCallback } from './acubismmotion';
import {
CubismMotionCurve,
@ -783,6 +787,10 @@ export class CubismMotion extends ACubismMotion {
) {
this._motionData.curves.at(curveCount).type =
CubismMotionCurveTarget.CubismMotionCurveTarget_PartOpacity;
} else {
CubismLogWarning(
'Warning : Unable to get segment type from Curve! The number of "CurveCount" may be incorrect!'
);
}
this._motionData.curves.at(curveCount).id = json.getMotionCurveId(

View File

@ -215,7 +215,7 @@ export class CubismMotionQueueEntry {
* @return フェードアウト開始するかどうか
*/
public isTriggeredFadeOut(): boolean {
return this._isTriggeredFadeOut && this._endTimeSeconds < 0.0;
return this._isTriggeredFadeOut;
}
/**

View File

@ -38,7 +38,6 @@ export class CubismMotionQueueManager {
for (let i = 0; i < this._motions.getSize(); ++i) {
if (this._motions.at(i)) {
this._motions.at(i).release();
this._motions.set(i, void 0);
this._motions.set(i, null);
}
}
@ -111,7 +110,6 @@ export class CubismMotionQueueManager {
if (motion == null) {
motionQueueEntry.release();
motionQueueEntry = void 0;
motionQueueEntry = null;
ite = this._motions.erase(ite); // 削除
continue;
@ -137,7 +135,6 @@ export class CubismMotionQueueManager {
public isFinishedByHandle(
motionQueueEntryNumber: CubismMotionQueueEntryHandle
): boolean {
// 既にモーションがあれば終了フラグを立てる
for (
let ite: iterator<CubismMotionQueueEntry> = this._motions.begin();
ite.notEqual(this._motions.end());
@ -181,7 +178,6 @@ export class CubismMotionQueueManager {
// ----- 終了済みの処理があれば削除する ------
motionQueueEntry.release();
motionQueueEntry = void 0;
motionQueueEntry = null;
ite = this._motions.erase(ite); // 削除
}
@ -198,7 +194,6 @@ export class CubismMotionQueueManager {
motionQueueEntryNumber: any
): CubismMotionQueueEntry {
//------- 処理を行う -------
// 既にモーションがあれば終了フラグを立てる
for (
let ite: iterator<CubismMotionQueueEntry> = this._motions.begin();
ite.notEqual(this._motions.end());
@ -262,7 +257,6 @@ export class CubismMotionQueueManager {
if (motion == null) {
motionQueueEntry.release();
motionQueueEntry = void 0;
motionQueueEntry = null;
ite = this._motions.erase(ite); // 削除
@ -289,7 +283,6 @@ export class CubismMotionQueueManager {
// ------ 終了済みの処理があれば削除する ------
if (motionQueueEntry.isFinished()) {
motionQueueEntry.release();
motionQueueEntry = void 0;
motionQueueEntry = null;
ite = this._motions.erase(ite); // 削除
} else {