1
0
Fork 0

Update to Cubism 4 SDK for Web R6_1

hfjnulyz-patch-1
wada 2023-03-10 21:37:45 +09:00
parent 00275677be
commit 2289dd088b
2 changed files with 17 additions and 0 deletions

View File

@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [4-r.6.1] - 2023-03-10
### Added
* Add function to validate MOC3 files.
## [4-r.6] - 2023-02-21
### Added
@ -148,6 +155,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
* Reformat code using Prettier and ESLint.
[4-r.6.1]: https://github.com/Live2D/CubismWebFramework/compare/4-r.6...4-r.6.1
[4-r.6]: https://github.com/Live2D/CubismWebFramework/compare/4-r.5...4-r.6
[4-r.5]: https://github.com/Live2D/CubismWebFramework/compare/4-r.5-beta.5...4-r.5
[4-r.5-beta.5]: https://github.com/Live2D/CubismWebFramework/compare/4-r.5-beta.4...4-r.5-beta.5

View File

@ -110,6 +110,15 @@ export class CubismMoc {
return this._mocVersion;
}
/**
* .moc3
*/
public static hasMocConsistency(mocBytes: ArrayBuffer): boolean {
const hasMocConsistency =
Live2DCubismCore.Moc.prototype.hasMocConsistency(mocBytes);
return hasMocConsistency === 1 ? true : false;
}
_moc: Live2DCubismCore.Moc; // Mocデータ
_modelCount: number; // Mocデータから作られたモデルの個数
_mocVersion: number; // 読み込んだモデルの.moc3 Version