Skip to content

Commit

Permalink
Merge pull request #19 from Live2D/develop
Browse files Browse the repository at this point in the history
Update to Cubism 4 SDK for Web R6_1
  • Loading branch information
itoh-at-live2d-com authored Mar 10, 2023
2 parents 4a93cd5 + 2289dd0 commit c91fc7c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions src/model/cubismmoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c91fc7c

Please sign in to comment.