Cubism Core API リファレンス

最終更新: 2023年8月17日

このページで公開されるCubism Core API リファレンスのPDFでは、

Live2D Cubism SDK for Native における Live2D Cubism Coreの役割、使用方法、APIの仕様について扱います。

対象者

  • Live2D Cubism SDK for Native の利用者
  • Core を他言語(JavaやPythonなど)から呼び出せるようにラッパーの実装を検討している者
  • ゲームエンジンなど他のプログラムやプラットフォームへ組み込むことを検討している者

CoreとFrameworkの機能分類

以下の図はApplication、Core、Frameworkの関係と機能の役割を示したものです。

CoreはApplicationからもFrameworkからも使用されます。

Coreとは

CoreはCubism 3以降のエディタを用いて作成されたモデル(.moc3ファイル)を扱うために必要なAPIを備えたライブラリです。特徴について下記に述べます。

  • APIはC言語から構成。
  • Core自身でメモリを確保・破棄しません。必要なメモリ量をCoreから要求されるため、利用する側で指定量を確保してCoreに渡す必要があります。
  • 描画機能は含みません。モデルのパラメータに応じて頂点情報を計算することがCoreの役目であり、利用する側は計算済みの頂点情報および描画に必要な情報(UVや不透明度など)をCoreから取得します。

上記特徴から、移植性の高くプラットフォームに依存しない設計になっています。

日本語版 PDFファイル

ダウンロード:日本語版 Cubism Core API リファレンス (2.85MB)

[最終更新日 2023/08/17 r12]

更新履歴

更新日 版数 種別 内容
2023/08/17 r12 追加 Cubism 5の情報を追加しました。
2023/03/10 r11 追加 MOC3を検証する機能の説明を追加しました。
2022/07/07 r10 追加 パラメータの種類を取得する機能の説明を追加しました。
追加 アートメッシュの親のパーツを取得する機能の説明を追加しました。
追加 「moc3のファイルバージョン」「csmGetMocVersion」に、取得できるバージョンについての記述を更新しました。
2022/05/19 r9 追加 乗算色・スクリーン色に関連した説明を追加しました。
パラメータに設定されたキーの情報の取得に関連した説明を追加しました。
2021/02/26 r8 修正 csmGetDrawableIndexCountsで個数0のDrawableが存在する説明を追加しました。
修正 csmGetDrawableIndicesで有効なアドレスが格納されないケースがある説明を追加しました。
2019/09/04 r7 修正 Cubism Core および Cubism SDKの表記を調整
2019/08/01 r6 追加 moc3ファイルバージョンの定数を追加
ConstantFlagの要素追加に伴うスニペットの追記
マスクの反転のフラグについて説明を追加
マスク反転機能の説明追加
個別のAPIに利用可能バージョンの項目を追加
修正 誤字修正
2019/02/12 r5 追加 ファイルバージョンを調べる方法について追加 
追加 csmGetLatestMocVersionのAPI説明を追加 
追加 csmGetMocVersionのAPI説明を追加 
追加 csmGetPartParentPartIndicesのAPIが追加された CoreVersionの表記を追加 
2018/12/20 r4 追加 「moc3ファイルのバージョンについて」を追加
追加 「パーツの親パーツを取得」を追加
追加 「csmGetPartParentPartIndices」のAPI説明を追加
修正 誤字、脱字修正。曖昧さ回避のための文言修正。
2018/07/11 r3 修正 誤字、脱字修正
修正 曖昧さの回避のための文言修正
修正 マスクの描画方法とそのアクセスに関して描画方法の指定を細かく修正
修正 APIリストで一部引数にconstが付いていた間違いを修正
2018/05/18 r2 修正 誤字修正
追記 csmGetDrawableVertexPositionsで得られる情報の特性について追加
2018/03/27 r1 新規作成 新規作成

English PDF File

Download : English Cubism Core API Reference(2.71MB)

[Last Update 2023/08/17 r12]

Change log

Update day Version Update Type Content
2023/08/17 r12 Added Added information on Cubism 5.
2023/03/10 r11 Added Added description of the function to validate MOC3.
2022/07/07 r10 Added Added description of the function to get parameter types.
Added Added description of the function to get parent parts of ArtMeshes.
Added Updated obtained versions in “File version of moc3” and “csmGetMocVersion”.
2022/05/19 r9 Added Added explanations related to multiply colors and screen colors.
Added explanations related to obtaining information on keys set in parameters.
2021/03/01 r8 Fixed Added an explanation for the existence of Drawables with a count of 0 in csmGetDrawableIndexCounts.
Fixed Added explanation of the case where csmGetDrawableIndices does not store valid addresses.
2019/09/04 r7 Fixed Adjusted notation of “Cubism Core” and “Cubism SDK”
2019/08/01 r6 Added Added a constant stands for moc3 file version
Added a snippet since the ConstantFlag element has added
Added a description of the Inverted Mask flag
Added a description of the Inverted Mask function
Added an item stands for the available version of each API
Fixed Typo fixes
2019/02/26 r5 Added Added “File version of moc3” 
Added Added “Getting the parent parts of the parts” 
Added Added the API description of csmGetLatestMocVersion
Added Added the API description of csmGetMocVersion
Added Added the API description of csmGetPartParentPartIndices 
2018/07/20 r3 Corrected Corrected errors of snipet
Corrected Corrected vague expression
Corrected Corrected omissions of letter in snipet
Corrected Corrected vague expression
Corrected Corrected mistake that const is included in notation of arguments.
Corrected Added more detailed explanation about rendering method of mask and how to access it
2018/06/14 r2 translation translation to English from Japanese
この記事はお役に立ちましたか?
はいいいえ
この記事に関するご意見・
ご要望をお聞かせください。