基本完成,还有点小毛病

master
孙羽 2023-10-24 09:36:44 +08:00
parent c688af1c31
commit 51822af78b
239 changed files with 1983 additions and 31576 deletions

24
.gitignore vendored Normal file
View File

@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

3
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar", "Vue.vscode-typescript-vue-plugin"]
}

7
README.md Normal file
View File

@ -0,0 +1,7 @@
# Vue 3 + Vite
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
## Recommended IDE Setup
- [VS Code](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=Vue.vscode-typescript-vue-plugin).

4
config.js Normal file
View File

@ -0,0 +1,4 @@
export const SERVER_ADDR="https://api.live2demo.mikesolar.cn/"
export const WAV_DISAPPEAR="mikudisappear.wav"
export const MP3_DISAPPEAR="mikudisappear.mp3"
export const MODEL="miku_sample_t04.model3.json"

14
index.html Normal file
View File

@ -0,0 +1,14 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + Vue</title>
<script src="live2dcubismcore.min.js"></script>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>

View File

@ -1,17 +0,0 @@
<script>
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/*每个页面公共css */
</style>

View File

@ -1,308 +0,0 @@
# Changelog
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/).
## 2023-08-17
### Added
* Enhance Blend Shape features.
* Please see [here](https://docs.live2d.com/en/cubism-editor-manual/blend-shape/).
### Changed
* Upgrade Core version to 05.00.0000.
## 2023-05-09
### Changed
* Change the GCC version of the library for Linux from 6.5.0 to 8.3.0.
## 2023-03-16
### Fixed
* Fix a case in which the index of the mask's drawable object was negative value for `csmGetDrawableMasks()`.
* Fix a problem in which `csmHasMocConsistency()` was returned as 0 even though the MOC3 file was in the correct format.
* This problem was occurring in some models using the blendshape weight limit settings.
* Fix a problem that could cause a crash if a MOC3 file that is not in the correct format is loaded with `csmHasMocConsistency()`.
### Changed
* Upgrade Core version to 04.02.0004.
## 2023-03-10
### Added
* Add the function `csmHasMocConsistency`.
* This function verifies that the `MOC3` file is valid.
### Changed
* Upgrade Core version to 04.02.0003.
## 2023-02-21
### Added
* [Web] Added classes related to `Memory`.
* Add the funciton `initializeAmountOfMemory()` to adjust the amount of memory at initialization.
## 2022-10-28
### Fixed
* [Java] Remove unnecessary methods.
## 2022-10-06
### Added
* [Java] Add AAR file for Android.
## 2022-09-08
### Added
* Add the multilingual supported documents.
* Support Visual Studio 2022.
## 2022-08-04
### Fixed
* [Web] Fix `csmGetMocVersion` function argument.
## 2022-07-07
### Added
* Add functions
* `csmGetParameterTypes`
* `csmGetDrawableParentPartIndices`
* Add type `csmMocVersion` and enum. This type is the return value of `csmGetMocVersion`, `csmGetLatestMocVersion`.
### Changed
* Upgrade Core version to 04.02.0002.
## 2022-06-02
### Changed
* Upgrade Core version to 04.02.0001.
### Fixed
* Fixed a bug that caused Multiply Color / Screen Color of different objects to be applied.
## 2022-05-19
### Added
* Support new Multiply Color / Screen Color features.
* Support new Blend Shape features.
### Changed
* Upgrade Core version to 04.02.0000. This upgrade is following Cubism Editor 4.2 features.
## 2022-02-10
### Added
* [Unity] Add bitcode library(.bc) for Emscripten latest version build.
### Changed
* [Unity] Change the bitcode file directory location.
* emsdk latest version build bitcode file in `latest` directory.
* emsdk 1.38.48 build bitcode file in `1_38_48` directory.
## 2021-12-09
### Added
* Add static library(.a) for Mac Catalyst.
## 2021-10-07
### Added
* Add `x86_64` library for Android.
* Add `arm64` library for macOS.
## 2021-03-09
### Added
* Add funtcions for Viewer.
* `csmGetParameterKeyCounts`
* `csmGetParameterKeyValues`
### Changed
* Update Core version to `04.01.0000`.
## 2020-01-30
### Added
* Add static library(.lib) for statically linking DLL.
* Add symbol file for Windows dynamic library (dll).
## 2019-11-19
### Fixed
* Fix linking static libraries for Windows (.lib).
## 2019-11-14
### Added
* Support Visual Studio 2019.
* Support macOS dynamic library (dylib).
### Changed
* Update Windows dynamic library: Use Visual Studio 2019 for building.
### Security
* Bundle certificate and notary ticket to macOS shared library.
## 2019-09-04
### Added
* Support new Inverted Masking features.
* Support ARM64 architecture for Universal Windows Platform.
### Changed
* Upgrade Core version to 04.00.0000 (67108864). This upgrade is following Cubism Editor 4.0 features.
* Add calling convention for *Windows/x86 DLL* only.
### Removed
* Remove bitcode binary due to suspension of *Cubism Bindings.*
## 2019-04-09
### Added
* Support Universal Windows Platform for Windows Store Application.
## 2019-01-31
### Added
* Add API to get the parent part of the specified part.
* Add API to get moc3 version.
## 2018-12-20
### Added
* [Native] Add new function: `csmGetPartParentPartIndices`.
* [Native, 3.3 Support] Support new Warp Deformer features.
### Changed
* Upgrade Core version to 03.03.0000 (50528256). This upgrade is following Cubism Editor 3.3 features.
## 2018-08-22
### Added
* [Native] Add support for Neon.
## 2018-05-14
### Added
* [Native] Add Windows **Visual C++ 2013** library.
* [Windows] Add runtime library choice `MT`, `MD`, `MTd`, `MDd`.
* [iOS] Add support for iPhone Simulator SDK.
### Fixed
* Fix an error occurred when linking libraries for Android `arm64-v8a`.
## 2017-11-17
### Fixed
* Fix processing of vertex index.
## 2017-10-05
### Added
* Provide bitcode for iOS.
## 2017-08-09
### Added
* [Native] Add Android *arm64-v8a* ABI library.
### Fixed
* Fix drawing order in certain scenarios.
## 2017-07-12
### Added
* Add experimental support for Emscripten.
* Add `CHANGELOG.md`.
### Fixed
* Fix access violation in certain scenarios.
* Fix update result in certain scenarios.
## 2017-05-02
### Added
* [Native] Add experimental support for Raspberry PI.
* Add `README.md`.

View File

@ -1,7 +0,0 @@
## Live2D Proprietary Software License
Live2D Cubism Core is available under Live2D Proprietary Software License.
* [Live2D Proprietary Software License Agreement](https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_en.html)
* [Live2D Proprietary Software 使用許諾契約書](https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_jp.html)
* [Live2D Proprietary Software 使用授权协议](https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_cn.html)

View File

@ -1,30 +0,0 @@
[English](README.md) / [日本語](README.ja.md)
---
# Live2D Cubism Core
このフォルダーには、JavaScriptまたはTypeScriptアプリケーションを開発するためのコアライブラリファイルが含まれています。
## ファイルリスト
### live2dcubismcore.d.ts
このファイルには、`live2dcubismcore.js`に関するTypeScriptの型情報が含まれています。
TypeScriptで開発する場合は、このファイルを`live2dcubismcore.js`とともに使用してください。
### live2dcubismcore.js
このファイルには、CubismCoreの機能といくつかのラッパーが含まれています。
JavaScriptで開発する場合は、このファイルを使用してください。
### live2dcubismcore.js.map
このファイルは、`live2dcubismcore.d.ts`と`live2dcubismcore.js`の間のソースマップです。
デバッグ時にこのファイルを使用します。
### live2dcubismcore.min.js
このファイルは、`live2dcubismcore.js`のminify版です。
このファイルを本番環境で使用します。

View File

@ -1,30 +0,0 @@
[English](README.md) / [日本語](README.ja.md)
---
# Live2D Cubism Core
This folder contains core library files for developing JavaScript or TypeScript applications.
## File List
### live2dcubismcore.d.ts
This file contains typescript type information about `live2dcubismcore.js`.
Use this file with `live2dcubismcore.js` when developing with TypeScript.
### live2dcubismcore.js
This file contains Cubism Core features and some wrapper features.
Use this file when developing with JavaScript.
### live2dcubismcore.js.map
This file is the source map between `live2dcubismcore.d.ts` and `live2dcubismcore.js`.
Use this file when debugging.
### live2dcubismcore.min.js
This file is the minified version of `live2dcubismcore.js`.
Use this file in production.

View File

@ -1,6 +0,0 @@
The following is a list of files available for redistribution
under the terms of the Live2D Proprietary Software License Agreement:
- live2dcubismcore.d.ts
- live2dcubismcore.js
- live2dcubismcore.min.js

View File

@ -1,367 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Proprietary Software license
* that can be found at https://www.live2d.com/eula/live2d-proprietary-software-license-agreement_en.html.
*/
declare namespace Live2DCubismCore {
/** Cubism version identifier. */
type csmVersion = number;
/** moc3 version identifier. */
type csmMocVersion = number;
/** Parameter type identifier. */
type csmParameterType = number;
/** Necessary alignment for mocs (in bytes). */
const AlignofMoc: number;
/** Necessary alignment for models (in bytes). */
const AlignofModel: number;
/** .moc3 file version Unknown */
const MocVersion_Unknown: number;
/** .moc3 file version 3.0.00 - 3.2.07 */
const MocVersion_30: number;
/** .moc3 file version 3.3.00 - 3.3.03 */
const MocVersion_33: number;
/** .moc3 file version 4.0.00 - 4.1.05 */
const MocVersion_40: number;
/** .moc3 file version 4.2.00 - 4.2.04 */
const MocVersion_42: number;
/** .moc3 file version 5.0.00 - */
const MocVersion_50: number;
/** Normal Parameter. */
const ParameterType_Normal: number;
/** Parameter for blend shape. */
const ParameterType_BlendShape: number;
/** Log handler.
*
* @param message Null-terminated string message to log.
*/
interface csmLogFunction {
(message: string): void;
}
/** Cubism version. */
class Version {
/**
* Queries Core version.
*
* @return Core version.
*/
static csmGetVersion(): csmVersion;
/**
* Gets Moc file supported latest version.
*
* @return Moc file latest format version.
*/
static csmGetLatestMocVersion(): csmMocVersion;
/**
* Gets Moc file format version.
*
* @param moc Moc
*
* @return csmMocVersion
*/
static csmGetMocVersion(moc: Moc, mocBytes: ArrayBuffer): csmMocVersion;
private constructor();
}
/** Cubism logging. */
class Logging {
private static logFunction;
/**
* Sets log handler.
*
* @param handler Handler to use.
*/
static csmSetLogFunction(handler: csmLogFunction): void;
/**
* Queries log handler.
*
* @return Log handler.
*/
static csmGetLogFunction(): csmLogFunction;
/**
* Wrap log function.
*
* @param messagePtr number
*
* @return string
*/
private static wrapLogFunction;
private constructor();
}
/** Cubism moc. */
class Moc {
/**
* Checks consistency of a moc.
*
* @param mocBytes Moc bytes.
*
* @returns '1' if Moc is valid; '0' otherwise.
*/
hasMocConsistency(mocBytes: ArrayBuffer): number;
/** Creates [[Moc]] from [[ArrayBuffer]].
*
* @param buffer Array buffer
*
* @return [[Moc]] on success; [[null]] otherwise.
*/
static fromArrayBuffer(buffer: ArrayBuffer): Moc;
/** Releases instance. */
_release(): void;
/** Native moc. */
_ptr: number;
/**
* Initializes instance.
*
* @param mocBytes Moc bytes.
*/
private constructor();
}
/** Cubism model. */
class Model {
/** Parameters. */
parameters: Parameters;
/** Parts. */
parts: Parts;
/** Drawables. */
drawables: Drawables;
/** Canvas information. */
canvasinfo: CanvasInfo;
/**
* Creates [[Model]] from [[Moc]].
*
* @param moc Moc
*
* @return [[Model]] on success; [[null]] otherwise.
*/
static fromMoc(moc: Moc): Model;
/** Updates instance. */
update(): void;
/** Releases instance. */
release(): void;
/** Native model. */
_ptr: number;
/**
* Initializes instance.
*
* @param moc Moc
*/
private constructor();
}
/** Canvas information interface. */
class CanvasInfo {
/** Width of native model canvas. */
CanvasWidth: number;
/** Height of native model canvas. */
CanvasHeight: number;
/** Coordinate origin of X axis. */
CanvasOriginX: number;
/** Coordinate origin of Y axis. */
CanvasOriginY: number;
/** Pixels per unit of native model. */
PixelsPerUnit: number;
/**
* Initializes instance.
*
* @param modelPtr Native model pointer.
*/
constructor(modelPtr: number);
}
/** Cubism model parameters */
class Parameters {
/** Parameter count. */
count: number;
/** Parameter IDs. */
ids: Array<string>;
/** Minimum parameter values. */
minimumValues: Float32Array;
/** Parameter types. */
types: Int32Array;
/** Maximum parameter values. */
maximumValues: Float32Array;
/** Default parameter values. */
defaultValues: Float32Array;
/** Parameter values. */
values: Float32Array;
/** Number of key values of each parameter. */
keyCounts: Int32Array;
/** Key values of each parameter. */
keyValues: Array<Float32Array>;
/**
* Initializes instance.
*
* @param modelPtr Native model.
*/
constructor(modelPtr: number);
}
/** Cubism model parts */
class Parts {
/** Part count. */
count: number;
/** Part IDs. */
ids: Array<string>;
/** Opacity values. */
opacities: Float32Array;
/** Part's parent part indices. */
parentIndices: Int32Array;
/**
* Initializes instance.
*
* @param modelPtr Native model.
*/
constructor(modelPtr: number);
}
/** Cubism model drawables */
class Drawables {
/** Drawable count. */
count: number;
/** Drawable IDs. */
ids: Array<string>;
/** Constant drawable flags. */
constantFlags: Uint8Array;
/** Dynamic drawable flags. */
dynamicFlags: Uint8Array;
/** Drawable texture indices. */
textureIndices: Int32Array;
/** Drawable draw orders. */
drawOrders: Int32Array;
/** Drawable render orders. */
renderOrders: Int32Array;
/** Drawable opacities. */
opacities: Float32Array;
/** Mask count for each drawable. */
maskCounts: Int32Array;
/** Masks for each drawable. */
masks: Array<Int32Array>;
/** Number of vertices of each drawable. */
vertexCounts: Int32Array;
/** 2D vertex position data of each drawable. */
vertexPositions: Array<Float32Array>;
/** 2D texture coordinate data of each drawables. */
vertexUvs: Array<Float32Array>;
/** Number of triangle indices for each drawable. */
indexCounts: Int32Array;
/** Triangle index data for each drawable. */
indices: Array<Uint16Array>;
/** Information multiply color. */
multiplyColors: Float32Array;
/** Information Screen color. */
screenColors: Float32Array;
/** Indices of drawables parent part. */
parentPartIndices: Int32Array;
/** Resets all dynamic drawable flags.. */
resetDynamicFlags(): void;
/** Native model. */
private _modelPtr;
/**
* Initializes instance.
*
* @param modelPtr Native model.
*/
constructor(modelPtr: number);
}
/** Utility functions. */
class Utils {
/**
* Checks whether flag is set in bitfield.
*
* @param bitfield Bitfield to query against.
*
* @return [[true]] if bit set; [[false]] otherwise
*/
static hasBlendAdditiveBit(bitfield: number): boolean;
/**
* Checks whether flag is set in bitfield.
*
* @param bitfield Bitfield to query against.
*
* @return [[true]] if bit set; [[false]] otherwise
*/
static hasBlendMultiplicativeBit(bitfield: number): boolean;
/**
* Checks whether flag is set in bitfield.
*
* @param bitfield Bitfield to query against.
*
* @return [[true]] if bit set; [[false]] otherwise
*/
static hasIsDoubleSidedBit(bitfield: number): boolean;
/**
* Checks whether flag is set in bitfield.
*
* @param bitfield Bitfield to query against.
*
* @return [[true]] if bit set; [[false]] otherwise
*/
static hasIsInvertedMaskBit(bitfield: number): boolean;
/**
* Checks whether flag is set in bitfield.
*
* @param bitfield Bitfield to query against.
*
* @return [[true]] if bit set; [[false]] otherwise
*/
static hasIsVisibleBit(bitfield: number): boolean;
/**
* Checks whether flag is set in bitfield.
*
* @param bitfield Bitfield to query against.
*
* @return [[true]] if bit set; [[false]] otherwise
*/
static hasVisibilityDidChangeBit(bitfield: number): boolean;
/**
* Checks whether flag is set in bitfield.
*
* @param bitfield Bitfield to query against.
*
* @return [[true]] if bit set; [[false]] otherwise
*/
static hasOpacityDidChangeBit(bitfield: number): boolean;
/**
* Checks whether flag is set in bitfield.
*
* @param bitfield Bitfield to query against.
*
* @return [[true]] if bit set; [[false]] otherwise
*/
static hasDrawOrderDidChangeBit(bitfield: number): boolean;
/**
* Checks whether flag is set in bitfield.
*
* @param bitfield Bitfield to query against.
*
* @return [[true]] if bit set; [[false]] otherwise
*/
static hasRenderOrderDidChangeBit(bitfield: number): boolean;
/**
* Checks whether flag is set in bitfield.
*
* @param bitfield Bitfield to query against.
*
* @return [[true]] if bit set; [[false]] otherwise
*/
static hasVertexPositionsDidChangeBit(bitfield: number): boolean;
/**
* Checks whether flag is set in bitfield.
*
* @param bitfield Bitfield to query against.
*
* @return [[true]] if bit set; [[false]] otherwise
*/
static hasBlendColorDidChangeBit(bitfield: number): boolean;
}
/** Memory functions. */
class Memory {
/**
* HACK:
* Extend memory size allocated during module initialization.
* If the specified size is less than or equal to 16777216(byte), the default of 16 MB is allocated.
*
* @see https://github.com/emscripten-core/emscripten/blob/main/src/settings.js#L161
*
* @param size allocated memory size [byte(s)]
*/
static initializeAmountOfMemory(size: number): void;
private constructor();
}
/** Emscripten Cubism Core module. */
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,63 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
/**
* @brief ID<br>
* <br>
* https://docs.live2d.com/cubism-editor-manual/standard-parametor-list/
*/
export declare const CubismDefaultParameterId: Readonly<Record<string, string>>;
export declare namespace Live2DCubismFramework {
const HitAreaBody: string;
const HitAreaHead: string;
const HitAreaPrefix: string;
const ParamAngleX: string;
const ParamAngleY: string;
const ParamAngleZ: string;
const ParamArmLA: string;
const ParamArmLB: string;
const ParamArmRA: string;
const ParamArmRB: string;
const ParamBaseX: string;
const ParamBaseY: string;
const ParamBodyAngleX: string;
const ParamBodyAngleY: string;
const ParamBodyAngleZ: string;
const ParamBreath: string;
const ParamBrowLAngle: string;
const ParamBrowLForm: string;
const ParamBrowLX: string;
const ParamBrowLY: string;
const ParamBrowRAngle: string;
const ParamBrowRForm: string;
const ParamBrowRX: string;
const ParamBrowRY: string;
const ParamBustX: string;
const ParamBustY: string;
const ParamCheek: string;
const ParamEyeBallForm: string;
const ParamEyeBallX: string;
const ParamEyeBallY: string;
const ParamEyeLOpen: string;
const ParamEyeLSmile: string;
const ParamEyeROpen: string;
const ParamEyeRSmile: string;
const ParamHairBack: string;
const ParamHairFluffy: string;
const ParamHairFront: string;
const ParamHairSide: string;
const ParamHandL: string;
const ParamHandR: string;
const ParamMouthForm: string;
const ParamMouthOpenY: string;
const ParamNONE: string;
const ParamShoulderY: string;
const PartsArmLPrefix: string;
const PartsArmPrefix: string;
const PartsArmRPrefix: string;
const PartsIdCore: string;
}
//# sourceMappingURL=cubismdefaultparameterid.d.ts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismdefaultparameterid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,QAA4C,CAAC;IACjE,MAAM,aAAa,QAA2C,CAAC;IAC/D,MAAM,eAAe,QAA6C,CAAC;IACnE,MAAM,cAAc,QAA4C,CAAC;IACjE,MAAM,aAAa,QAA2C,CAAC;IAC/D,MAAM,UAAU,QAAwC,CAAC;IACzD,MAAM,UAAU,QAAwC,CAAC;IACzD,MAAM,cAAc,QAA4C,CAAC;IACjE,MAAM,eAAe,QAA6C,CAAC;IACnE,MAAM,SAAS,QAAuC,CAAC;IACvD,MAAM,cAAc,QAA4C,CAAC;IACjE,MAAM,eAAe,QAA6C,CAAC;IACnE,MAAM,cAAc,QAA4C,CAAC;IACjE,MAAM,eAAe,QAA6C,CAAC;IACnE,MAAM,WAAW,QAAyC,CAAC;CACnE"}

View File

@ -1,144 +0,0 @@
"use strict";
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Live2DCubismFramework = exports.CubismDefaultParameterId = void 0;
/**
* @brief パラメータIDのデフォルト値を保持する定数<br>
* デフォルト値の仕様は以下のマニュアルに基づく<br>
* https://docs.live2d.com/cubism-editor-manual/standard-parametor-list/
*/
exports.CubismDefaultParameterId = Object.freeze({
// パーツID
HitAreaPrefix: 'HitArea',
HitAreaHead: 'Head',
HitAreaBody: 'Body',
PartsIdCore: 'Parts01Core',
PartsArmPrefix: 'Parts01Arm_',
PartsArmLPrefix: 'Parts01ArmL_',
PartsArmRPrefix: 'Parts01ArmR_',
// パラメータID
ParamAngleX: 'ParamAngleX',
ParamAngleY: 'ParamAngleY',
ParamAngleZ: 'ParamAngleZ',
ParamEyeLOpen: 'ParamEyeLOpen',
ParamEyeLSmile: 'ParamEyeLSmile',
ParamEyeROpen: 'ParamEyeROpen',
ParamEyeRSmile: 'ParamEyeRSmile',
ParamEyeBallX: 'ParamEyeBallX',
ParamEyeBallY: 'ParamEyeBallY',
ParamEyeBallForm: 'ParamEyeBallForm',
ParamBrowLY: 'ParamBrowLY',
ParamBrowRY: 'ParamBrowRY',
ParamBrowLX: 'ParamBrowLX',
ParamBrowRX: 'ParamBrowRX',
ParamBrowLAngle: 'ParamBrowLAngle',
ParamBrowRAngle: 'ParamBrowRAngle',
ParamBrowLForm: 'ParamBrowLForm',
ParamBrowRForm: 'ParamBrowRForm',
ParamMouthForm: 'ParamMouthForm',
ParamMouthOpenY: 'ParamMouthOpenY',
ParamCheek: 'ParamCheek',
ParamBodyAngleX: 'ParamBodyAngleX',
ParamBodyAngleY: 'ParamBodyAngleY',
ParamBodyAngleZ: 'ParamBodyAngleZ',
ParamBreath: 'ParamBreath',
ParamArmLA: 'ParamArmLA',
ParamArmRA: 'ParamArmRA',
ParamArmLB: 'ParamArmLB',
ParamArmRB: 'ParamArmRB',
ParamHandL: 'ParamHandL',
ParamHandR: 'ParamHandR',
ParamHairFront: 'ParamHairFront',
ParamHairSide: 'ParamHairSide',
ParamHairBack: 'ParamHairBack',
ParamHairFluffy: 'ParamHairFluffy',
ParamShoulderY: 'ParamShoulderY',
ParamBustX: 'ParamBustX',
ParamBustY: 'ParamBustY',
ParamBaseX: 'ParamBaseX',
ParamBaseY: 'ParamBaseY',
ParamNONE: 'NONE:'
});
// Namespace definition for compatibility.
var $ = __importStar(require("./cubismdefaultparameterid"));
// eslint-disable-next-line @typescript-eslint/no-namespace
var Live2DCubismFramework;
(function (Live2DCubismFramework) {
Live2DCubismFramework.HitAreaBody = $.CubismDefaultParameterId.HitAreaBody;
Live2DCubismFramework.HitAreaHead = $.CubismDefaultParameterId.HitAreaHead;
Live2DCubismFramework.HitAreaPrefix = $.CubismDefaultParameterId.HitAreaPrefix;
Live2DCubismFramework.ParamAngleX = $.CubismDefaultParameterId.ParamAngleX;
Live2DCubismFramework.ParamAngleY = $.CubismDefaultParameterId.ParamAngleY;
Live2DCubismFramework.ParamAngleZ = $.CubismDefaultParameterId.ParamAngleZ;
Live2DCubismFramework.ParamArmLA = $.CubismDefaultParameterId.ParamArmLA;
Live2DCubismFramework.ParamArmLB = $.CubismDefaultParameterId.ParamArmLB;
Live2DCubismFramework.ParamArmRA = $.CubismDefaultParameterId.ParamArmRA;
Live2DCubismFramework.ParamArmRB = $.CubismDefaultParameterId.ParamArmRB;
Live2DCubismFramework.ParamBaseX = $.CubismDefaultParameterId.ParamBaseX;
Live2DCubismFramework.ParamBaseY = $.CubismDefaultParameterId.ParamBaseY;
Live2DCubismFramework.ParamBodyAngleX = $.CubismDefaultParameterId.ParamBodyAngleX;
Live2DCubismFramework.ParamBodyAngleY = $.CubismDefaultParameterId.ParamBodyAngleY;
Live2DCubismFramework.ParamBodyAngleZ = $.CubismDefaultParameterId.ParamBodyAngleZ;
Live2DCubismFramework.ParamBreath = $.CubismDefaultParameterId.ParamBreath;
Live2DCubismFramework.ParamBrowLAngle = $.CubismDefaultParameterId.ParamBrowLAngle;
Live2DCubismFramework.ParamBrowLForm = $.CubismDefaultParameterId.ParamBrowLForm;
Live2DCubismFramework.ParamBrowLX = $.CubismDefaultParameterId.ParamBrowLX;
Live2DCubismFramework.ParamBrowLY = $.CubismDefaultParameterId.ParamBrowLY;
Live2DCubismFramework.ParamBrowRAngle = $.CubismDefaultParameterId.ParamBrowRAngle;
Live2DCubismFramework.ParamBrowRForm = $.CubismDefaultParameterId.ParamBrowRForm;
Live2DCubismFramework.ParamBrowRX = $.CubismDefaultParameterId.ParamBrowRX;
Live2DCubismFramework.ParamBrowRY = $.CubismDefaultParameterId.ParamBrowRY;
Live2DCubismFramework.ParamBustX = $.CubismDefaultParameterId.ParamBustX;
Live2DCubismFramework.ParamBustY = $.CubismDefaultParameterId.ParamBustY;
Live2DCubismFramework.ParamCheek = $.CubismDefaultParameterId.ParamCheek;
Live2DCubismFramework.ParamEyeBallForm = $.CubismDefaultParameterId.ParamEyeBallForm;
Live2DCubismFramework.ParamEyeBallX = $.CubismDefaultParameterId.ParamEyeBallX;
Live2DCubismFramework.ParamEyeBallY = $.CubismDefaultParameterId.ParamEyeBallY;
Live2DCubismFramework.ParamEyeLOpen = $.CubismDefaultParameterId.ParamEyeLOpen;
Live2DCubismFramework.ParamEyeLSmile = $.CubismDefaultParameterId.ParamEyeLSmile;
Live2DCubismFramework.ParamEyeROpen = $.CubismDefaultParameterId.ParamEyeROpen;
Live2DCubismFramework.ParamEyeRSmile = $.CubismDefaultParameterId.ParamEyeRSmile;
Live2DCubismFramework.ParamHairBack = $.CubismDefaultParameterId.ParamHairBack;
Live2DCubismFramework.ParamHairFluffy = $.CubismDefaultParameterId.ParamHairFluffy;
Live2DCubismFramework.ParamHairFront = $.CubismDefaultParameterId.ParamHairFront;
Live2DCubismFramework.ParamHairSide = $.CubismDefaultParameterId.ParamHairSide;
Live2DCubismFramework.ParamHandL = $.CubismDefaultParameterId.ParamHandL;
Live2DCubismFramework.ParamHandR = $.CubismDefaultParameterId.ParamHandR;
Live2DCubismFramework.ParamMouthForm = $.CubismDefaultParameterId.ParamMouthForm;
Live2DCubismFramework.ParamMouthOpenY = $.CubismDefaultParameterId.ParamMouthOpenY;
Live2DCubismFramework.ParamNONE = $.CubismDefaultParameterId.ParamNONE;
Live2DCubismFramework.ParamShoulderY = $.CubismDefaultParameterId.ParamShoulderY;
Live2DCubismFramework.PartsArmLPrefix = $.CubismDefaultParameterId.PartsArmLPrefix;
Live2DCubismFramework.PartsArmPrefix = $.CubismDefaultParameterId.PartsArmPrefix;
Live2DCubismFramework.PartsArmRPrefix = $.CubismDefaultParameterId.PartsArmRPrefix;
Live2DCubismFramework.PartsIdCore = $.CubismDefaultParameterId.PartsIdCore;
})(Live2DCubismFramework || (exports.Live2DCubismFramework = Live2DCubismFramework = {}));
//# sourceMappingURL=cubismdefaultparameterid.js.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismdefaultparameterid.js","sourceRoot":"","sources":["../src/cubismdefaultparameterid.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH;;;;GAIG;AACU,QAAA,wBAAwB,GAAG,MAAM,CAAC,MAAM,CAAyB;IAC5E,QAAQ;IACR,aAAa,EAAE,SAAS;IACxB,WAAW,EAAE,MAAM;IACnB,WAAW,EAAE,MAAM;IACnB,WAAW,EAAE,aAAa;IAC1B,cAAc,EAAE,aAAa;IAC7B,eAAe,EAAE,cAAc;IAC/B,eAAe,EAAE,cAAc;IAC/B,UAAU;IACV,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,aAAa,EAAE,eAAe;IAC9B,cAAc,EAAE,gBAAgB;IAChC,aAAa,EAAE,eAAe;IAC9B,cAAc,EAAE,gBAAgB;IAChC,aAAa,EAAE,eAAe;IAC9B,aAAa,EAAE,eAAe;IAC9B,gBAAgB,EAAE,kBAAkB;IACpC,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,eAAe,EAAE,iBAAiB;IAClC,eAAe,EAAE,iBAAiB;IAClC,cAAc,EAAE,gBAAgB;IAChC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D,mCAAa,GAAG,CAAC,CAAC,wBAAwB,CAAC,aAAa,CAAC;IACzD,oCAAc,GAAG,CAAC,CAAC,wBAAwB,CAAC,cAAc,CAAC;IAC3D,mCAAa,GAAG,CAAC,CAAC,wBAAwB,CAAC,aAAa,CAAC;IACzD,oCAAc,GAAG,CAAC,CAAC,wBAAwB,CAAC,cAAc,CAAC;IAC3D,mCAAa,GAAG,CAAC,CAAC,wBAAwB,CAAC,aAAa,CAAC;IACzD,qCAAe,GAAG,CAAC,CAAC,wBAAwB,CAAC,eAAe,CAAC;IAC7D,oCAAc,GAAG,CAAC,CAAC,wBAAwB,CAAC,cAAc,CAAC;IAC3D,mCAAa,GAAG,CAAC,CAAC,wBAAwB,CAAC,aAAa,CAAC;IACzD,gCAAU,GAAG,CAAC,CAAC,wBAAwB,CAAC,UAAU,CAAC;IACnD,gCAAU,GAAG,CAAC,CAAC,wBAAwB,CAAC,UAAU,CAAC;IACnD,oCAAc,GAAG,CAAC,CAAC,wBAAwB,CAAC,cAAc,CAAC;IAC3D,qCAAe,GAAG,CAAC,CAAC,wBAAwB,CAAC,eAAe,CAAC;IAC7D,+BAAS,GAAG,CAAC,CAAC,wBAAwB,CAAC,SAAS,CAAC;IACjD,oCAAc,GAAG,CAAC,CAAC,wBAAwB,CAAC,cAAc,CAAC;IAC3D,qCAAe,GAAG,CAAC,CAAC,wBAAwB,CAAC,eAAe,CAAC;IAC7D,oCAAc,GAAG,CAAC,CAAC,wBAAwB,CAAC,cAAc,CAAC;IAC3D,qCAAe,GAAG,CAAC,CAAC,wBAAwB,CAAC,eAAe,CAAC;IAC7D,iCAAW,GAAG,CAAC,CAAC,wBAAwB,CAAC,WAAW,CAAC;AACpE,CAAC,EAjDgB,qBAAqB,qCAArB,qBAAqB,QAiDrC"}

View File

@ -1,20 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
export declare const CSM_LOG_LEVEL_VERBOSE = 0;
export declare const CSM_LOG_LEVEL_DEBUG = 1;
export declare const CSM_LOG_LEVEL_INFO = 2;
export declare const CSM_LOG_LEVEL_WARNING = 3;
export declare const CSM_LOG_LEVEL_ERROR = 4;
export declare const CSM_LOG_LEVEL_OFF = 5;
/**
*
*
*
* CSM_LOG_LEVEL_VERBOSE CSM_LOG_LEVEL_OFF
*/
export declare const CSM_LOG_LEVEL: number;
//# sourceMappingURL=cubismframeworkconfig.d.ts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismframeworkconfig.d.ts","sourceRoot":"","sources":["../src/cubismframeworkconfig.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,eAAO,MAAM,mBAAmB,IAAI,CAAC;AAErC,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,MAA8B,CAAC"}

View File

@ -1,33 +0,0 @@
"use strict";
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.CSM_LOG_LEVEL = exports.CSM_LOG_LEVEL_OFF = exports.CSM_LOG_LEVEL_ERROR = exports.CSM_LOG_LEVEL_WARNING = exports.CSM_LOG_LEVEL_INFO = exports.CSM_LOG_LEVEL_DEBUG = exports.CSM_LOG_LEVEL_VERBOSE = void 0;
//========================================================
// ログ出力関数の設定
//========================================================
//---------- ログ出力レベル 選択項目 定義 ----------
// 詳細ログ出力設定
exports.CSM_LOG_LEVEL_VERBOSE = 0;
// デバッグログ出力設定
exports.CSM_LOG_LEVEL_DEBUG = 1;
// Infoログ出力設定
exports.CSM_LOG_LEVEL_INFO = 2;
// 警告ログ出力設定
exports.CSM_LOG_LEVEL_WARNING = 3;
// エラーログ出力設定
exports.CSM_LOG_LEVEL_ERROR = 4;
// ログ出力オフ設定
exports.CSM_LOG_LEVEL_OFF = 5;
/**
* ログ出力レベル設定
*
* 強制的にログ出力レベルを変える時に定義を有効にする
* CSM_LOG_LEVEL_VERBOSE CSM_LOG_LEVEL_OFF を選択する
*/
exports.CSM_LOG_LEVEL = exports.CSM_LOG_LEVEL_VERBOSE;
//# sourceMappingURL=cubismframeworkconfig.js.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismframeworkconfig.js","sourceRoot":"","sources":["../src/cubismframeworkconfig.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,0DAA0D;AAC1D,aAAa;AACb,0DAA0D;AAE1D,uCAAuC;AACvC,WAAW;AACE,QAAA,qBAAqB,GAAG,CAAC,CAAC;AACvC,aAAa;AACA,QAAA,mBAAmB,GAAG,CAAC,CAAC;AACrC,aAAa;AACA,QAAA,kBAAkB,GAAG,CAAC,CAAC;AACpC,WAAW;AACE,QAAA,qBAAqB,GAAG,CAAC,CAAC;AACvC,YAAY;AACC,QAAA,mBAAmB,GAAG,CAAC,CAAC;AACrC,WAAW;AACE,QAAA,iBAAiB,GAAG,CAAC,CAAC;AAEnC;;;;;GAKG;AACU,QAAA,aAAa,GAAW,6BAAqB,CAAC"}

View File

@ -1,278 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
import { ICubismModelSetting } from './icubismmodelsetting';
import { CubismIdHandle } from './id/cubismid';
import { csmMap } from './type/csmmap';
import { CubismJson } from './utils/cubismjson';
/**
* Model3Json
*
* model3.json
*/
export declare class CubismModelSettingJson extends ICubismModelSetting {
/**
*
*
* @param buffer Model3Json
* @param size Model3Json
*/
constructor(buffer: ArrayBuffer, size: number);
/**
*
*/
release(): void;
/**
* CubismJson
*
* @return CubismJson
*/
GetJson(): CubismJson;
/**
* Moc
* @return Moc
*/
getModelFileName(): string;
/**
* 使
*
*/
getTextureCount(): number;
/**
*
* @return
*/
getTextureDirectory(): string;
/**
* 使
* @param index
* @return
*/
getTextureFileName(index: number): string;
/**
*
* @return
*/
getHitAreasCount(): number;
/**
* ID
*
* @param index index
* @return ID
*/
getHitAreaId(index: number): CubismIdHandle;
/**
*
* @param index
* @return
*/
getHitAreaName(index: number): string;
/**
*
* @return
*/
getPhysicsFileName(): string;
/**
*
* @return
*/
getPoseFileName(): string;
/**
*
* @return
*/
getExpressionCount(): number;
/**
*
* @param index
* @return
*/
getExpressionName(index: number): string;
/**
*
* @param index
* @return
*/
getExpressionFileName(index: number): string;
/**
*
* @return
*/
getMotionGroupCount(): number;
/**
*
* @param index
* @return
*/
getMotionGroupName(index: number): string;
/**
*
* @param groupName
* @return
*/
getMotionCount(groupName: string): number;
/**
*
* @param groupName
* @param index
* @return
*/
getMotionFileName(groupName: string, index: number): string;
/**
*
* @param groupName
* @param index
* @return
*/
getMotionSoundFileName(groupName: string, index: number): string;
/**
*
* @param groupName
* @param index
* @return []
*/
getMotionFadeInTimeValue(groupName: string, index: number): number;
/**
*
* @param groupName
* @param index
* @return []
*/
getMotionFadeOutTimeValue(groupName: string, index: number): number;
/**
*
* @return
*/
getUserDataFile(): string;
/**
*
* @param outLayoutMap csmMap
* @return true
* @return false
*/
getLayoutMap(outLayoutMap: csmMap<string, number>): boolean;
/**
*
* @return
*/
getEyeBlinkParameterCount(): number;
/**
* ID
* @param index
* @return ID
*/
getEyeBlinkParameterId(index: number): CubismIdHandle;
/**
*
* @return
*/
getLipSyncParameterCount(): number;
/**
*
* @param index
* @return ID
*/
getLipSyncParameterId(index: number): CubismIdHandle;
/**
*
* @return true
* @return false
*/
private isExistModelFile;
/**
*
* @return true
* @return false
*/
private isExistTextureFiles;
/**
*
* @return true
* @return false
*/
private isExistHitAreas;
/**
*
* @return true
* @return false
*/
private isExistPhysicsFile;
/**
*
* @return true
* @return false
*/
private isExistPoseFile;
/**
*
* @return true
* @return false
*/
private isExistExpressionFile;
/**
*
* @return true
* @return false
*/
private isExistMotionGroups;
/**
*
* @param groupName
* @return true
* @return false
*/
private isExistMotionGroupName;
/**
*
* @param groupName
* @param index
* @return true
* @return false
*/
private isExistMotionSoundFile;
/**
*
* @param groupName
* @param index
* @return true
* @return false
*/
private isExistMotionFadeIn;
/**
*
* @param groupName
* @param index
* @return true
* @return false
*/
private isExistMotionFadeOut;
/**
* UserData
* @return true
* @return false
*/
private isExistUserDataFile;
/**
*
* @return true
* @return false
*/
private isExistEyeBlinkParameters;
/**
*
* @return true
* @return false
*/
private isExistLipSyncParameters;
private _json;
private _jsonValue;
}
import * as $ from './cubismmodelsettingjson';
export declare namespace Live2DCubismFramework {
const CubismModelSettingJson: typeof $.CubismModelSettingJson;
type CubismModelSettingJson = $.CubismModelSettingJson;
}
//# sourceMappingURL=cubismmodelsettingjson.d.ts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismmodelsettingjson.d.ts","sourceRoot":"","sources":["../src/cubismmodelsettingjson.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,EAAE,MAAM,EAAY,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAS,MAAM,oBAAoB,CAAC;AAkEvD;;;;GAIG;AACH,qBAAa,sBAAuB,SAAQ,mBAAmB;IAC7D;;;;;OAKG;gBACgB,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM;IAiDpD;;OAEG;IACI,OAAO,IAAI,IAAI;IAMtB;;;;OAIG;IACI,OAAO,IAAI,UAAU;IAI5B;;;OAGG;IACI,gBAAgB,IAAI,MAAM;IAO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O;IAyBlE;;;OAGG;IACI,yBAAyB,IAAI,MAAM;IA2B1C;;;;OAIG;IACI,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc;IA0B5D;;;OAGG;IACI,wBAAwB,IAAI,MAAM;IA2BzC;;;;OAIG;IACI,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc;IA0B3D;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAKxB;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAK3B;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAKvB;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IAK1B;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAKvB;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IAO7B;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAK3B;;;;;OAKG;IACH,OAAO,CAAC,sBAAsB;IAO9B;;;;;;OAMG;IACH,OAAO,CAAC,sBAAsB;IAS9B;;;;;;OAMG;IACH,OAAO,CAAC,mBAAmB;IAS3B;;;;;;OAMG;IACH,OAAO,CAAC,oBAAoB;IAS5B;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAQ3B;;;;OAIG;IACH,OAAO,CAAC,yBAAyB;IA2BjC;;;;OAIG;IACH,OAAO,CAAC,wBAAwB;IAyBhC,OAAO,CAAC,KAAK,CAAa;IAC1B,OAAO,CAAC,UAAU,CAAmB;CACtC;AAGD,OAAO,KAAK,CAAC,MAAM,0BAA0B,CAAC;AAE9C,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,sBAAsB,iCAA2B,CAAC;IAC/D,KAAY,sBAAsB,GAAG,CAAC,CAAC,sBAAsB,CAAC;CAC/D"}

View File

@ -1,731 +0,0 @@
"use strict";
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Live2DCubismFramework = exports.CubismModelSettingJson = void 0;
var icubismmodelsetting_1 = require("./icubismmodelsetting");
var live2dcubismframework_1 = require("./live2dcubismframework");
var csmvector_1 = require("./type/csmvector");
var cubismjson_1 = require("./utils/cubismjson");
/**
* Model3Jsonのキー文字列
*/
// JSON Keys
var Version = 'Version';
var FileReferences = 'FileReferences';
var Groups = 'Groups';
var Layout = 'Layout';
var HitAreas = 'HitAreas';
var Moc = 'Moc';
var Textures = 'Textures';
var Physics = 'Physics';
var Pose = 'Pose';
var Expressions = 'Expressions';
var Motions = 'Motions';
var UserData = 'UserData';
var Name = 'Name';
var FilePath = 'File';
var Id = 'Id';
var Ids = 'Ids';
var Target = 'Target';
// Motions
var Idle = 'Idle';
var TapBody = 'TapBody';
var PinchIn = 'PinchIn';
var PinchOut = 'PinchOut';
var Shake = 'Shake';
var FlickHead = 'FlickHead';
var Parameter = 'Parameter';
var SoundPath = 'Sound';
var FadeInTime = 'FadeInTime';
var FadeOutTime = 'FadeOutTime';
// Layout
var CenterX = 'CenterX';
var CenterY = 'CenterY';
var X = 'X';
var Y = 'Y';
var Width = 'Width';
var Height = 'Height';
var LipSync = 'LipSync';
var EyeBlink = 'EyeBlink';
var InitParameter = 'init_param';
var InitPartsVisible = 'init_parts_visible';
var Val = 'val';
var FrequestNode;
(function (FrequestNode) {
FrequestNode[FrequestNode["FrequestNode_Groups"] = 0] = "FrequestNode_Groups";
FrequestNode[FrequestNode["FrequestNode_Moc"] = 1] = "FrequestNode_Moc";
FrequestNode[FrequestNode["FrequestNode_Motions"] = 2] = "FrequestNode_Motions";
FrequestNode[FrequestNode["FrequestNode_Expressions"] = 3] = "FrequestNode_Expressions";
FrequestNode[FrequestNode["FrequestNode_Textures"] = 4] = "FrequestNode_Textures";
FrequestNode[FrequestNode["FrequestNode_Physics"] = 5] = "FrequestNode_Physics";
FrequestNode[FrequestNode["FrequestNode_Pose"] = 6] = "FrequestNode_Pose";
FrequestNode[FrequestNode["FrequestNode_HitAreas"] = 7] = "FrequestNode_HitAreas"; // getRoot().getValueByString(HitAreas)
})(FrequestNode || (FrequestNode = {}));
/**
* Model3Jsonパーサー
*
* model3.jsonファイルをパースして値を取得する
*/
var CubismModelSettingJson = /** @class */ (function (_super) {
__extends(CubismModelSettingJson, _super);
/**
* 引数付きコンストラクタ
*
* @param buffer Model3Jsonをバイト配列として読み込んだデータバッファ
* @param size Model3Jsonのデータサイズ
*/
function CubismModelSettingJson(buffer, size) {
var _this = _super.call(this) || this;
_this._json = cubismjson_1.CubismJson.create(buffer, size);
if (_this._json) {
_this._jsonValue = new csmvector_1.csmVector();
// 順番はenum FrequestNodeと一致させる
_this._jsonValue.pushBack(_this._json.getRoot().getValueByString(Groups));
_this._jsonValue.pushBack(_this._json
.getRoot()
.getValueByString(FileReferences)
.getValueByString(Moc));
_this._jsonValue.pushBack(_this._json
.getRoot()
.getValueByString(FileReferences)
.getValueByString(Motions));
_this._jsonValue.pushBack(_this._json
.getRoot()
.getValueByString(FileReferences)
.getValueByString(Expressions));
_this._jsonValue.pushBack(_this._json
.getRoot()
.getValueByString(FileReferences)
.getValueByString(Textures));
_this._jsonValue.pushBack(_this._json
.getRoot()
.getValueByString(FileReferences)
.getValueByString(Physics));
_this._jsonValue.pushBack(_this._json
.getRoot()
.getValueByString(FileReferences)
.getValueByString(Pose));
_this._jsonValue.pushBack(_this._json.getRoot().getValueByString(HitAreas));
}
return _this;
}
/**
* デストラクタ相当の処理
*/
CubismModelSettingJson.prototype.release = function () {
cubismjson_1.CubismJson.delete(this._json);
this._jsonValue = null;
};
/**
* CubismJsonオブジェクトを取得する
*
* @return CubismJson
*/
CubismModelSettingJson.prototype.GetJson = function () {
return this._json;
};
/**
* Mocファイルの名前を取得する
* @return Mocファイルの名前
*/
CubismModelSettingJson.prototype.getModelFileName = function () {
if (!this.isExistModelFile()) {
return '';
}
return this._jsonValue.at(FrequestNode.FrequestNode_Moc).getRawString();
};
/**
* モデルが使用するテクスチャの数を取得する
* テクスチャの数
*/
CubismModelSettingJson.prototype.getTextureCount = function () {
if (!this.isExistTextureFiles()) {
return 0;
}
return this._jsonValue.at(FrequestNode.FrequestNode_Textures).getSize();
};
/**
* テクスチャが配置されたディレクトリの名前を取得する
* @return テクスチャが配置されたディレクトリの名前
*/
CubismModelSettingJson.prototype.getTextureDirectory = function () {
var texturePath = this._jsonValue
.at(FrequestNode.FrequestNode_Textures)
.getValueByIndex(0)
.getRawString();
var pathArray = texturePath.split('/');
// 最後の要素はテクスチャ名なので不要
var arrayLength = pathArray.length - 1;
var textureDirectoryStr = '';
// 分割したパスを結合
for (var i = 0; i < arrayLength; i++) {
textureDirectoryStr += pathArray[i];
if (i < arrayLength - 1) {
textureDirectoryStr += '/';
}
}
return textureDirectoryStr;
};
/**
* モデルが使用するテクスチャの名前を取得する
* @param index 配列のインデックス値
* @return テクスチャの名前
*/
CubismModelSettingJson.prototype.getTextureFileName = function (index) {
return this._jsonValue
.at(FrequestNode.FrequestNode_Textures)
.getValueByIndex(index)
.getRawString();
};
/**
* モデルに設定された当たり判定の数を取得する
* @return モデルに設定された当たり判定の数
*/
CubismModelSettingJson.prototype.getHitAreasCount = function () {
if (!this.isExistHitAreas()) {
return 0;
}
return this._jsonValue.at(FrequestNode.FrequestNode_HitAreas).getSize();
};
/**
* 当たり判定に設定されたIDを取得する
*
* @param index 配列のindex
* @return 当たり判定に設定されたID
*/
CubismModelSettingJson.prototype.getHitAreaId = function (index) {
return live2dcubismframework_1.CubismFramework.getIdManager().getId(this._jsonValue
.at(FrequestNode.FrequestNode_HitAreas)
.getValueByIndex(index)
.getValueByString(Id)
.getRawString());
};
/**
* 当たり判定に設定された名前を取得する
* @param index 配列のインデックス値
* @return 当たり判定に設定された名前
*/
CubismModelSettingJson.prototype.getHitAreaName = function (index) {
return this._jsonValue
.at(FrequestNode.FrequestNode_HitAreas)
.getValueByIndex(index)
.getValueByString(Name)
.getRawString();
};
/**
* 物理演算設定ファイルの名前を取得する
* @return 物理演算設定ファイルの名前
*/
CubismModelSettingJson.prototype.getPhysicsFileName = function () {
if (!this.isExistPhysicsFile()) {
return '';
}
return this._jsonValue.at(FrequestNode.FrequestNode_Physics).getRawString();
};
/**
* パーツ切り替え設定ファイルの名前を取得する
* @return パーツ切り替え設定ファイルの名前
*/
CubismModelSettingJson.prototype.getPoseFileName = function () {
if (!this.isExistPoseFile()) {
return '';
}
return this._jsonValue.at(FrequestNode.FrequestNode_Pose).getRawString();
};
/**
* 表情設定ファイルの数を取得する
* @return 表情設定ファイルの数
*/
CubismModelSettingJson.prototype.getExpressionCount = function () {
if (!this.isExistExpressionFile()) {
return 0;
}
return this._jsonValue.at(FrequestNode.FrequestNode_Expressions).getSize();
};
/**
* 表情設定ファイルを識別する名前別名を取得する
* @param index 配列のインデックス値
* @return 表情の名前
*/
CubismModelSettingJson.prototype.getExpressionName = function (index) {
return this._jsonValue
.at(FrequestNode.FrequestNode_Expressions)
.getValueByIndex(index)
.getValueByString(Name)
.getRawString();
};
/**
* 表情設定ファイルの名前を取得する
* @param index 配列のインデックス値
* @return 表情設定ファイルの名前
*/
CubismModelSettingJson.prototype.getExpressionFileName = function (index) {
return this._jsonValue
.at(FrequestNode.FrequestNode_Expressions)
.getValueByIndex(index)
.getValueByString(FilePath)
.getRawString();
};
/**
* モーショングループの数を取得する
* @return モーショングループの数
*/
CubismModelSettingJson.prototype.getMotionGroupCount = function () {
if (!this.isExistMotionGroups()) {
return 0;
}
return this._jsonValue
.at(FrequestNode.FrequestNode_Motions)
.getKeys()
.getSize();
};
/**
* モーショングループの名前を取得する
* @param index 配列のインデックス値
* @return モーショングループの名前
*/
CubismModelSettingJson.prototype.getMotionGroupName = function (index) {
if (!this.isExistMotionGroups()) {
return null;
}
return this._jsonValue
.at(FrequestNode.FrequestNode_Motions)
.getKeys()
.at(index);
};
/**
* モーショングループに含まれるモーションの数を取得する
* @param groupName モーショングループの名前
* @return モーショングループの数
*/
CubismModelSettingJson.prototype.getMotionCount = function (groupName) {
if (!this.isExistMotionGroupName(groupName)) {
return 0;
}
return this._jsonValue
.at(FrequestNode.FrequestNode_Motions)
.getValueByString(groupName)
.getSize();
};
/**
* グループ名とインデックス値からモーションファイル名を取得する
* @param groupName モーショングループの名前
* @param index 配列のインデックス値
* @return モーションファイルの名前
*/
CubismModelSettingJson.prototype.getMotionFileName = function (groupName, index) {
if (!this.isExistMotionGroupName(groupName)) {
return '';
}
return this._jsonValue
.at(FrequestNode.FrequestNode_Motions)
.getValueByString(groupName)
.getValueByIndex(index)
.getValueByString(FilePath)
.getRawString();
};
/**
* モーションに対応するサウンドファイルの名前を取得する
* @param groupName モーショングループの名前
* @param index 配列のインデックス値
* @return サウンドファイルの名前
*/
CubismModelSettingJson.prototype.getMotionSoundFileName = function (groupName, index) {
if (!this.isExistMotionSoundFile(groupName, index)) {
return '';
}
return this._jsonValue
.at(FrequestNode.FrequestNode_Motions)
.getValueByString(groupName)
.getValueByIndex(index)
.getValueByString(SoundPath)
.getRawString();
};
/**
* モーション開始時のフェードイン処理時間を取得する
* @param groupName モーショングループの名前
* @param index 配列のインデックス値
* @return フェードイン処理時間[]
*/
CubismModelSettingJson.prototype.getMotionFadeInTimeValue = function (groupName, index) {
if (!this.isExistMotionFadeIn(groupName, index)) {
return -1.0;
}
return this._jsonValue
.at(FrequestNode.FrequestNode_Motions)
.getValueByString(groupName)
.getValueByIndex(index)
.getValueByString(FadeInTime)
.toFloat();
};
/**
* モーション終了時のフェードアウト処理時間を取得する
* @param groupName モーショングループの名前
* @param index 配列のインデックス値
* @return フェードアウト処理時間[]
*/
CubismModelSettingJson.prototype.getMotionFadeOutTimeValue = function (groupName, index) {
if (!this.isExistMotionFadeOut(groupName, index)) {
return -1.0;
}
return this._jsonValue
.at(FrequestNode.FrequestNode_Motions)
.getValueByString(groupName)
.getValueByIndex(index)
.getValueByString(FadeOutTime)
.toFloat();
};
/**
* ユーザーデータのファイル名を取得する
* @return ユーザーデータのファイル名
*/
CubismModelSettingJson.prototype.getUserDataFile = function () {
if (!this.isExistUserDataFile()) {
return '';
}
return this._json
.getRoot()
.getValueByString(FileReferences)
.getValueByString(UserData)
.getRawString();
};
/**
* レイアウト情報を取得する
* @param outLayoutMap csmMapクラスのインスタンス
* @return true レイアウト情報が存在する
* @return false レイアウト情報が存在しない
*/
CubismModelSettingJson.prototype.getLayoutMap = function (outLayoutMap) {
// 存在しない要素にアクセスするとエラーになるためValueがnullの場合はnullを代入する
var map = this._json
.getRoot()
.getValueByString(Layout)
.getMap();
if (map == null) {
return false;
}
var ret = false;
for (var ite = map.begin(); ite.notEqual(map.end()); ite.preIncrement()) {
outLayoutMap.setValue(ite.ptr().first, ite.ptr().second.toFloat());
ret = true;
}
return ret;
};
/**
* 目パチに関連付けられたパラメータの数を取得する
* @return 目パチに関連付けられたパラメータの数
*/
CubismModelSettingJson.prototype.getEyeBlinkParameterCount = function () {
if (!this.isExistEyeBlinkParameters()) {
return 0;
}
var num = 0;
for (var i = 0; i < this._jsonValue.at(FrequestNode.FrequestNode_Groups).getSize(); i++) {
var refI = this._jsonValue
.at(FrequestNode.FrequestNode_Groups)
.getValueByIndex(i);
if (refI.isNull() || refI.isError()) {
continue;
}
if (refI.getValueByString(Name).getRawString() == EyeBlink) {
num = refI.getValueByString(Ids).getVector().getSize();
break;
}
}
return num;
};
/**
* 目パチに関連付けられたパラメータのIDを取得する
* @param index 配列のインデックス値
* @return パラメータID
*/
CubismModelSettingJson.prototype.getEyeBlinkParameterId = function (index) {
if (!this.isExistEyeBlinkParameters()) {
return null;
}
for (var i = 0; i < this._jsonValue.at(FrequestNode.FrequestNode_Groups).getSize(); i++) {
var refI = this._jsonValue
.at(FrequestNode.FrequestNode_Groups)
.getValueByIndex(i);
if (refI.isNull() || refI.isError()) {
continue;
}
if (refI.getValueByString(Name).getRawString() == EyeBlink) {
return live2dcubismframework_1.CubismFramework.getIdManager().getId(refI.getValueByString(Ids).getValueByIndex(index).getRawString());
}
}
return null;
};
/**
* リップシンクに関連付けられたパラメータの数を取得する
* @return リップシンクに関連付けられたパラメータの数
*/
CubismModelSettingJson.prototype.getLipSyncParameterCount = function () {
if (!this.isExistLipSyncParameters()) {
return 0;
}
var num = 0;
for (var i = 0; i < this._jsonValue.at(FrequestNode.FrequestNode_Groups).getSize(); i++) {
var refI = this._jsonValue
.at(FrequestNode.FrequestNode_Groups)
.getValueByIndex(i);
if (refI.isNull() || refI.isError()) {
continue;
}
if (refI.getValueByString(Name).getRawString() == LipSync) {
num = refI.getValueByString(Ids).getVector().getSize();
break;
}
}
return num;
};
/**
* リップシンクに関連付けられたパラメータの数を取得する
* @param index 配列のインデックス値
* @return パラメータID
*/
CubismModelSettingJson.prototype.getLipSyncParameterId = function (index) {
if (!this.isExistLipSyncParameters()) {
return null;
}
for (var i = 0; i < this._jsonValue.at(FrequestNode.FrequestNode_Groups).getSize(); i++) {
var refI = this._jsonValue
.at(FrequestNode.FrequestNode_Groups)
.getValueByIndex(i);
if (refI.isNull() || refI.isError()) {
continue;
}
if (refI.getValueByString(Name).getRawString() == LipSync) {
return live2dcubismframework_1.CubismFramework.getIdManager().getId(refI.getValueByString(Ids).getValueByIndex(index).getRawString());
}
}
return null;
};
/**
* モデルファイルのキーが存在するかどうかを確認する
* @return true キーが存在する
* @return false キーが存在しない
*/
CubismModelSettingJson.prototype.isExistModelFile = function () {
var node = this._jsonValue.at(FrequestNode.FrequestNode_Moc);
return !node.isNull() && !node.isError();
};
/**
* テクスチャファイルのキーが存在するかどうかを確認する
* @return true キーが存在する
* @return false キーが存在しない
*/
CubismModelSettingJson.prototype.isExistTextureFiles = function () {
var node = this._jsonValue.at(FrequestNode.FrequestNode_Textures);
return !node.isNull() && !node.isError();
};
/**
* 当たり判定のキーが存在するかどうかを確認する
* @return true キーが存在する
* @return false キーが存在しない
*/
CubismModelSettingJson.prototype.isExistHitAreas = function () {
var node = this._jsonValue.at(FrequestNode.FrequestNode_HitAreas);
return !node.isNull() && !node.isError();
};
/**
* 物理演算ファイルのキーが存在するかどうかを確認する
* @return true キーが存在する
* @return false キーが存在しない
*/
CubismModelSettingJson.prototype.isExistPhysicsFile = function () {
var node = this._jsonValue.at(FrequestNode.FrequestNode_Physics);
return !node.isNull() && !node.isError();
};
/**
* ポーズ設定ファイルのキーが存在するかどうかを確認する
* @return true キーが存在する
* @return false キーが存在しない
*/
CubismModelSettingJson.prototype.isExistPoseFile = function () {
var node = this._jsonValue.at(FrequestNode.FrequestNode_Pose);
return !node.isNull() && !node.isError();
};
/**
* 表情設定ファイルのキーが存在するかどうかを確認する
* @return true キーが存在する
* @return false キーが存在しない
*/
CubismModelSettingJson.prototype.isExistExpressionFile = function () {
var node = this._jsonValue.at(FrequestNode.FrequestNode_Expressions);
return !node.isNull() && !node.isError();
};
/**
* モーショングループのキーが存在するかどうかを確認する
* @return true キーが存在する
* @return false キーが存在しない
*/
CubismModelSettingJson.prototype.isExistMotionGroups = function () {
var node = this._jsonValue.at(FrequestNode.FrequestNode_Motions);
return !node.isNull() && !node.isError();
};
/**
* 引数で指定したモーショングループのキーが存在するかどうかを確認する
* @param groupName グループ名
* @return true キーが存在する
* @return false キーが存在しない
*/
CubismModelSettingJson.prototype.isExistMotionGroupName = function (groupName) {
var node = this._jsonValue
.at(FrequestNode.FrequestNode_Motions)
.getValueByString(groupName);
return !node.isNull() && !node.isError();
};
/**
* 引数で指定したモーションに対応するサウンドファイルのキーが存在するかどうかを確認する
* @param groupName グループ名
* @param index 配列のインデックス値
* @return true キーが存在する
* @return false キーが存在しない
*/
CubismModelSettingJson.prototype.isExistMotionSoundFile = function (groupName, index) {
var node = this._jsonValue
.at(FrequestNode.FrequestNode_Motions)
.getValueByString(groupName)
.getValueByIndex(index)
.getValueByString(SoundPath);
return !node.isNull() && !node.isError();
};
/**
* 引数で指定したモーションに対応するフェードイン時間のキーが存在するかどうかを確認する
* @param groupName グループ名
* @param index 配列のインデックス値
* @return true キーが存在する
* @return false キーが存在しない
*/
CubismModelSettingJson.prototype.isExistMotionFadeIn = function (groupName, index) {
var node = this._jsonValue
.at(FrequestNode.FrequestNode_Motions)
.getValueByString(groupName)
.getValueByIndex(index)
.getValueByString(FadeInTime);
return !node.isNull() && !node.isError();
};
/**
* 引数で指定したモーションに対応するフェードアウト時間のキーが存在するかどうかを確認する
* @param groupName グループ名
* @param index 配列のインデックス値
* @return true キーが存在する
* @return false キーが存在しない
*/
CubismModelSettingJson.prototype.isExistMotionFadeOut = function (groupName, index) {
var node = this._jsonValue
.at(FrequestNode.FrequestNode_Motions)
.getValueByString(groupName)
.getValueByIndex(index)
.getValueByString(FadeOutTime);
return !node.isNull() && !node.isError();
};
/**
* UserDataのファイル名が存在するかどうかを確認する
* @return true キーが存在する
* @return false キーが存在しない
*/
CubismModelSettingJson.prototype.isExistUserDataFile = function () {
var node = this._json
.getRoot()
.getValueByString(FileReferences)
.getValueByString(UserData);
return !node.isNull() && !node.isError();
};
/**
* 目ぱちに対応付けられたパラメータが存在するかどうかを確認する
* @return true キーが存在する
* @return false キーが存在しない
*/
CubismModelSettingJson.prototype.isExistEyeBlinkParameters = function () {
if (this._jsonValue.at(FrequestNode.FrequestNode_Groups).isNull() ||
this._jsonValue.at(FrequestNode.FrequestNode_Groups).isError()) {
return false;
}
for (var i = 0; i < this._jsonValue.at(FrequestNode.FrequestNode_Groups).getSize(); ++i) {
if (this._jsonValue
.at(FrequestNode.FrequestNode_Groups)
.getValueByIndex(i)
.getValueByString(Name)
.getRawString() == EyeBlink) {
return true;
}
}
return false;
};
/**
* リップシンクに対応付けられたパラメータが存在するかどうかを確認する
* @return true キーが存在する
* @return false キーが存在しない
*/
CubismModelSettingJson.prototype.isExistLipSyncParameters = function () {
if (this._jsonValue.at(FrequestNode.FrequestNode_Groups).isNull() ||
this._jsonValue.at(FrequestNode.FrequestNode_Groups).isError()) {
return false;
}
for (var i = 0; i < this._jsonValue.at(FrequestNode.FrequestNode_Groups).getSize(); ++i) {
if (this._jsonValue
.at(FrequestNode.FrequestNode_Groups)
.getValueByIndex(i)
.getValueByString(Name)
.getRawString() == LipSync) {
return true;
}
}
return false;
};
return CubismModelSettingJson;
}(icubismmodelsetting_1.ICubismModelSetting));
exports.CubismModelSettingJson = CubismModelSettingJson;
// Namespace definition for compatibility.
var $ = __importStar(require("./cubismmodelsettingjson"));
// eslint-disable-next-line @typescript-eslint/no-namespace
var Live2DCubismFramework;
(function (Live2DCubismFramework) {
Live2DCubismFramework.CubismModelSettingJson = $.CubismModelSettingJson;
})(Live2DCubismFramework || (exports.Live2DCubismFramework = Live2DCubismFramework = {}));
//# sourceMappingURL=cubismmodelsettingjson.js.map

File diff suppressed because one or more lines are too long

View File

@ -1,74 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
import { CubismIdHandle } from '../id/cubismid';
import { CubismModel } from '../model/cubismmodel';
import { csmVector } from '../type/csmvector';
/**
*
*
*
*/
export declare class CubismBreath {
/**
*
*/
static create(): CubismBreath;
/**
*
* @param instance CubismBreath
*/
static delete(instance: CubismBreath): void;
/**
*
* @param breathParameters
*/
setParameters(breathParameters: csmVector<BreathParameterData>): void;
/**
*
* @return
*/
getParameters(): csmVector<BreathParameterData>;
/**
*
* @param model
* @param deltaTimeSeconds []
*/
updateParameters(model: CubismModel, deltaTimeSeconds: number): void;
/**
*
*/
constructor();
_breathParameters: csmVector<BreathParameterData>;
_currentTime: number;
}
/**
*
*/
export declare class BreathParameterData {
/**
*
* @param parameterId ID
* @param offset
* @param peak
* @param cycle
* @param weight
*/
constructor(parameterId?: CubismIdHandle, offset?: number, peak?: number, cycle?: number, weight?: number);
parameterId: CubismIdHandle;
offset: number;
peak: number;
cycle: number;
weight: number;
}
import * as $ from './cubismbreath';
export declare namespace Live2DCubismFramework {
const BreathParameterData: typeof $.BreathParameterData;
type BreathParameterData = $.BreathParameterData;
const CubismBreath: typeof $.CubismBreath;
type CubismBreath = $.CubismBreath;
}
//# sourceMappingURL=cubismbreath.d.ts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismbreath.d.ts","sourceRoot":"","sources":["../../src/effect/cubismbreath.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C;;;;GAIG;AACH,qBAAa,YAAY;IACvB;;OAEG;WACW,MAAM,IAAI,YAAY;IAIpC;;;OAGG;WACW,MAAM,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI;IAMlD;;;OAGG;IACI,aAAa,CAAC,gBAAgB,EAAE,SAAS,CAAC,mBAAmB,CAAC,GAAG,IAAI;IAI5E;;;OAGG;IACI,aAAa,IAAI,SAAS,CAAC,mBAAmB,CAAC;IAItD;;;;OAIG;IACI,gBAAgB,CAAC,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,GAAG,IAAI;IAgB3E;;OAEG;;IAKH,iBAAiB,EAAE,SAAS,CAAC,mBAAmB,CAAC,CAAC;IAClD,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,qBAAa,mBAAmB;IAC9B;;;;;;;OAOG;gBAED,WAAW,CAAC,EAAE,cAAc,EAC5B,MAAM,CAAC,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,MAAM,EACb,KAAK,CAAC,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM;IASjB,WAAW,EAAE,cAAc,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAGD,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AAEpC,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,mBAAmB,8BAAwB,CAAC;IACzD,KAAY,mBAAmB,GAAG,CAAC,CAAC,mBAAmB,CAAC;IACjD,MAAM,YAAY,uBAAiB,CAAC;IAC3C,KAAY,YAAY,GAAG,CAAC,CAAC,YAAY,CAAC;CAC3C"}

View File

@ -1,120 +0,0 @@
"use strict";
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Live2DCubismFramework = exports.BreathParameterData = exports.CubismBreath = void 0;
/**
* 呼吸機能
*
* 呼吸機能を提供する
*/
var CubismBreath = /** @class */ (function () {
/**
* コンストラクタ
*/
function CubismBreath() {
this._currentTime = 0.0;
}
/**
* インスタンスの作成
*/
CubismBreath.create = function () {
return new CubismBreath();
};
/**
* インスタンスの破棄
* @param instance 対象のCubismBreath
*/
CubismBreath.delete = function (instance) {
if (instance != null) {
instance = null;
}
};
/**
* 呼吸のパラメータの紐づけ
* @param breathParameters 呼吸を紐づけたいパラメータのリスト
*/
CubismBreath.prototype.setParameters = function (breathParameters) {
this._breathParameters = breathParameters;
};
/**
* 呼吸に紐づいているパラメータの取得
* @return 呼吸に紐づいているパラメータのリスト
*/
CubismBreath.prototype.getParameters = function () {
return this._breathParameters;
};
/**
* モデルのパラメータの更新
* @param model 対象のモデル
* @param deltaTimeSeconds デルタ時間[]
*/
CubismBreath.prototype.updateParameters = function (model, deltaTimeSeconds) {
this._currentTime += deltaTimeSeconds;
var t = this._currentTime * 2.0 * 3.14159;
for (var i = 0; i < this._breathParameters.getSize(); ++i) {
var data = this._breathParameters.at(i);
model.addParameterValueById(data.parameterId, data.offset + data.peak * Math.sin(t / data.cycle), data.weight);
}
};
return CubismBreath;
}());
exports.CubismBreath = CubismBreath;
/**
* 呼吸のパラメータ情報
*/
var BreathParameterData = /** @class */ (function () {
/**
* コンストラクタ
* @param parameterId 呼吸をひもづけるパラメータID
* @param offset 呼吸を正弦波としたときの波のオフセット
* @param peak 呼吸を正弦波としたときの波の高さ
* @param cycle 呼吸を正弦波としたときの波の周期
* @param weight パラメータへの重み
*/
function BreathParameterData(parameterId, offset, peak, cycle, weight) {
this.parameterId = parameterId == undefined ? null : parameterId;
this.offset = offset == undefined ? 0.0 : offset;
this.peak = peak == undefined ? 0.0 : peak;
this.cycle = cycle == undefined ? 0.0 : cycle;
this.weight = weight == undefined ? 0.0 : weight;
}
return BreathParameterData;
}());
exports.BreathParameterData = BreathParameterData;
// Namespace definition for compatibility.
var $ = __importStar(require("./cubismbreath"));
// eslint-disable-next-line @typescript-eslint/no-namespace
var Live2DCubismFramework;
(function (Live2DCubismFramework) {
Live2DCubismFramework.BreathParameterData = $.BreathParameterData;
Live2DCubismFramework.CubismBreath = $.CubismBreath;
})(Live2DCubismFramework || (exports.Live2DCubismFramework = Live2DCubismFramework = {}));
//# sourceMappingURL=cubismbreath.js.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismbreath.js","sourceRoot":"","sources":["../../src/effect/cubismbreath.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;AAMH;;;;GAIG;AACH;IAuDE;;OAEG;IACH;QACE,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC;IAC1B,CAAC;IA3DD;;OAEG;IACW,mBAAM,GAApB;QACE,OAAO,IAAI,YAAY,EAAE,CAAC;IAC5B,CAAC;IAED;;;OAGG;IACW,mBAAM,GAApB,UAAqB,QAAsB;QACzC,IAAI,QAAQ,IAAI,IAAI,EAAE;YACpB,QAAQ,GAAG,IAAI,CAAC;SACjB;IACH,CAAC;IAED;;;OAGG;IACI,oCAAa,GAApB,UAAqB,gBAAgD;QACnE,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CA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CAAC,CAAC,CAAC,KAAK,CAAC;QAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;IACnD,CAAC;IAOH,0BAAC;AAAD,CAAC,AA5BD,IA4BC;AA5BY,kDAAmB;AA8BhC,0CAA0C;AAC1C,gDAAoC;AACpC,2DAA2D;AAC3D,IAAiB,qBAAqB,CAKrC;AALD,WAAiB,qBAAqB;IACvB,yCAAmB,GAAG,CAAC,CAAC,mBAAmB,CAAC;IAE5C,kCAAY,GAAG,CAAC,CAAC,YAAY,CAAC;AAE7C,CAAC,EALgB,qBAAqB,qCAArB,qBAAqB,QAKrC"}

View File

@ -1,101 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
import { ICubismModelSetting } from '../icubismmodelsetting';
import { CubismIdHandle } from '../id/cubismid';
import { CubismModel } from '../model/cubismmodel';
import { csmVector } from '../type/csmvector';
/**
*
*
*
*/
export declare class CubismEyeBlink {
/**
*
* @param modelSetting
* @return
* @note NULLID
*/
static create(modelSetting?: ICubismModelSetting): CubismEyeBlink;
/**
*
* @param eyeBlink CubismEyeBlink
*/
static delete(eyeBlink: CubismEyeBlink): void;
/**
*
* @param blinkingInterval []
*/
setBlinkingInterval(blinkingInterval: number): void;
/**
*
* @param closing []
* @param closed []
* @param opening []
*/
setBlinkingSetting(closing: number, closed: number, opening: number): void;
/**
* ID
* @param parameterIds ID
*/
setParameterIds(parameterIds: csmVector<CubismIdHandle>): void;
/**
* ID
* @return ID
*/
getParameterIds(): csmVector<CubismIdHandle>;
/**
*
* @param model
* @param deltaTimeSeconds []
*/
updateParameters(model: CubismModel, deltaTimeSeconds: number): void;
/**
*
* @param modelSetting
*/
constructor(modelSetting: ICubismModelSetting);
/**
*
*
* @return []
*/
determinNextBlinkingTiming(): number;
_blinkingState: number;
_parameterIds: csmVector<CubismIdHandle>;
_nextBlinkingTime: number;
_stateStartTimeSeconds: number;
_blinkingIntervalSeconds: number;
_closingSeconds: number;
_closedSeconds: number;
_openingSeconds: number;
_userTimeSeconds: number;
/**
* ID0 true 1 false
*/
static readonly CloseIfZero: boolean;
}
/**
*
*
*
*/
export declare enum EyeState {
EyeState_First = 0,
EyeState_Interval = 1,
EyeState_Closing = 2,
EyeState_Closed = 3,
EyeState_Opening = 4
}
import * as $ from './cubismeyeblink';
export declare namespace Live2DCubismFramework {
const CubismEyeBlink: typeof $.CubismEyeBlink;
type CubismEyeBlink = $.CubismEyeBlink;
const EyeState: typeof $.EyeState;
type EyeState = $.EyeState;
}
//# sourceMappingURL=cubismeyeblink.d.ts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismeyeblink.d.ts","sourceRoot":"","sources":["../../src/effect/cubismeyeblink.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C;;;;GAIG;AACH,qBAAa,cAAc;IACzB;;;;;OAKG;WACW,MAAM,CAClB,YAAY,GAAE,mBAA0B,GACvC,cAAc;IAIjB;;;OAGG;WACW,MAAM,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IAMpD;;;OAGG;IACI,mBAAmB,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI;IAI1D;;;;;OAKG;IACI,kBAAkB,CACvB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,IAAI;IAMP;;;OAGG;IACI,eAAe,CAAC,YAAY,EAAE,SAAS,CAAC,cAAc,CAAC,GAAG,IAAI;IAIrE;;;OAGG;IACI,eAAe,IAAI,SAAS,CAAC,cAAc,CAAC;IAInD;;;;OAIG;IACI,gBAAgB,CAAC,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,GAAG,IAAI;IA0E3E;;;OAGG;gBACgB,YAAY,EAAE,mBAAmB;IAoBpD;;;;OAIG;IACI,0BAA0B,IAAI,MAAM;IAO3C,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACzC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,wBAAwB,EAAE,MAAM,CAAC;IACjC,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAQ;CAC7C;AAED;;;;GAIG;AACH,oBAAY,QAAQ;IAClB,cAAc,IAAI;IAClB,iBAAiB,IAAA;IACjB,gBAAgB,IAAA;IAChB,eAAe,IAAA;IACf,gBAAgB,IAAA;CACjB;AAGD,OAAO,KAAK,CAAC,MAAM,kBAAkB,CAAC;AAEtC,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,cAAc,yBAAmB,CAAC;IAC/C,KAAY,cAAc,GAAG,CAAC,CAAC,cAAc,CAAC;IACvC,MAAM,QAAQ,mBAAa,CAAC;IACnC,KAAY,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC;CACnC"}

View File

@ -1,212 +0,0 @@
"use strict";
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Live2DCubismFramework = exports.EyeState = exports.CubismEyeBlink = void 0;
var csmvector_1 = require("../type/csmvector");
/**
* 自動まばたき機能
*
* 自動まばたき機能を提供する
*/
var CubismEyeBlink = /** @class */ (function () {
/**
* コンストラクタ
* @param modelSetting モデルの設定情報
*/
function CubismEyeBlink(modelSetting) {
this._blinkingState = EyeState.EyeState_First;
this._nextBlinkingTime = 0.0;
this._stateStartTimeSeconds = 0.0;
this._blinkingIntervalSeconds = 4.0;
this._closingSeconds = 0.1;
this._closedSeconds = 0.05;
this._openingSeconds = 0.15;
this._userTimeSeconds = 0.0;
this._parameterIds = new csmvector_1.csmVector();
if (modelSetting == null) {
return;
}
for (var i = 0; i < modelSetting.getEyeBlinkParameterCount(); ++i) {
this._parameterIds.pushBack(modelSetting.getEyeBlinkParameterId(i));
}
}
/**
* インスタンスを作成する
* @param modelSetting モデルの設定情報
* @return 作成されたインスタンス
* @note 引数がNULLの場合パラメータIDが設定されていない空のインスタンスを作成する
*/
CubismEyeBlink.create = function (modelSetting) {
if (modelSetting === void 0) { modelSetting = null; }
return new CubismEyeBlink(modelSetting);
};
/**
* インスタンスの破棄
* @param eyeBlink 対象のCubismEyeBlink
*/
CubismEyeBlink.delete = function (eyeBlink) {
if (eyeBlink != null) {
eyeBlink = null;
}
};
/**
* まばたきの間隔の設定
* @param blinkingInterval まばたきの間隔の時間[]
*/
CubismEyeBlink.prototype.setBlinkingInterval = function (blinkingInterval) {
this._blinkingIntervalSeconds = blinkingInterval;
};
/**
* まばたきのモーションの詳細設定
* @param closing まぶたを閉じる動作の所要時間[]
* @param closed まぶたを閉じている動作の所要時間[]
* @param opening まぶたを開く動作の所要時間[]
*/
CubismEyeBlink.prototype.setBlinkingSetting = function (closing, closed, opening) {
this._closingSeconds = closing;
this._closedSeconds = closed;
this._openingSeconds = opening;
};
/**
* まばたきさせるパラメータIDのリストの設定
* @param parameterIds パラメータのIDのリスト
*/
CubismEyeBlink.prototype.setParameterIds = function (parameterIds) {
this._parameterIds = parameterIds;
};
/**
* まばたきさせるパラメータIDのリストの取得
* @return パラメータIDのリスト
*/
CubismEyeBlink.prototype.getParameterIds = function () {
return this._parameterIds;
};
/**
* モデルのパラメータの更新
* @param model 対象のモデル
* @param deltaTimeSeconds デルタ時間[]
*/
CubismEyeBlink.prototype.updateParameters = function (model, deltaTimeSeconds) {
this._userTimeSeconds += deltaTimeSeconds;
var parameterValue;
var t = 0.0;
switch (this._blinkingState) {
case EyeState.EyeState_Closing:
t =
(this._userTimeSeconds - this._stateStartTimeSeconds) /
this._closingSeconds;
if (t >= 1.0) {
t = 1.0;
this._blinkingState = EyeState.EyeState_Closed;
this._stateStartTimeSeconds = this._userTimeSeconds;
}
parameterValue = 1.0 - t;
break;
case EyeState.EyeState_Closed:
t =
(this._userTimeSeconds - this._stateStartTimeSeconds) /
this._closedSeconds;
if (t >= 1.0) {
this._blinkingState = EyeState.EyeState_Opening;
this._stateStartTimeSeconds = this._userTimeSeconds;
}
parameterValue = 0.0;
break;
case EyeState.EyeState_Opening:
t =
(this._userTimeSeconds - this._stateStartTimeSeconds) /
this._openingSeconds;
if (t >= 1.0) {
t = 1.0;
this._blinkingState = EyeState.EyeState_Interval;
this._nextBlinkingTime = this.determinNextBlinkingTiming();
}
parameterValue = t;
break;
case EyeState.EyeState_Interval:
if (this._nextBlinkingTime < this._userTimeSeconds) {
this._blinkingState = EyeState.EyeState_Closing;
this._stateStartTimeSeconds = this._userTimeSeconds;
}
parameterValue = 1.0;
break;
case EyeState.EyeState_First:
default:
this._blinkingState = EyeState.EyeState_Interval;
this._nextBlinkingTime = this.determinNextBlinkingTiming();
parameterValue = 1.0;
break;
}
if (!CubismEyeBlink.CloseIfZero) {
parameterValue = -parameterValue;
}
for (var i = 0; i < this._parameterIds.getSize(); ++i) {
model.setParameterValueById(this._parameterIds.at(i), parameterValue);
}
};
/**
* 次の瞬きのタイミングの決定
*
* @return 次のまばたきを行う時刻[]
*/
CubismEyeBlink.prototype.determinNextBlinkingTiming = function () {
var r = Math.random();
return (this._userTimeSeconds + r * (2.0 * this._blinkingIntervalSeconds - 1.0));
};
/**
* IDで指定された目のパラメータが0のときに閉じるなら true 1の時に閉じるなら false
*/
CubismEyeBlink.CloseIfZero = true;
return CubismEyeBlink;
}());
exports.CubismEyeBlink = CubismEyeBlink;
/**
* まばたきの状態
*
* まばたきの状態を表す列挙型
*/
var EyeState;
(function (EyeState) {
EyeState[EyeState["EyeState_First"] = 0] = "EyeState_First";
EyeState[EyeState["EyeState_Interval"] = 1] = "EyeState_Interval";
EyeState[EyeState["EyeState_Closing"] = 2] = "EyeState_Closing";
EyeState[EyeState["EyeState_Closed"] = 3] = "EyeState_Closed";
EyeState[EyeState["EyeState_Opening"] = 4] = "EyeState_Opening"; // まぶたが開いていく途中の状態
})(EyeState || (exports.EyeState = EyeState = {}));
// Namespace definition for compatibility.
var $ = __importStar(require("./cubismeyeblink"));
// eslint-disable-next-line @typescript-eslint/no-namespace
var Live2DCubismFramework;
(function (Live2DCubismFramework) {
Live2DCubismFramework.CubismEyeBlink = $.CubismEyeBlink;
Live2DCubismFramework.EyeState = $.EyeState;
})(Live2DCubismFramework || (exports.Live2DCubismFramework = Live2DCubismFramework = {}));
//# sourceMappingURL=cubismeyeblink.js.map

View File

@ -1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EAAE;YACrD,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,cAAc,CAAC,CAAC;SACvE;IACH,CAAC;IA0BD;;;;OAIG;IACI,mDAA0B,GAAjC;QACE,IAAM,CAAC,GAAW,IAAI,CAAC,MAAM,EAAE,CAAC;QAChC,OAAO,CACL,IAAI,CAAC,gBAAgB,GAAG,CAAC,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,wBAAwB,GAAG,GAAG,CAAC,CACxE,CAAC;IACJ,CAAC;IAYD;;OAEG;IACa,0BAAW,GAAY,IAAI,CAAC;IAC9C,qBAAC;CAAA,AAhMD,IAgMC;AAhMY,wCAAc;AAkM3B;;;;GAIG;AACH,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,2DAAkB,CAAA;IAClB,iEAAiB,CAAA;IACjB,+DAAgB,CAAA;IAChB,6DAAe,CAAA;IACf,+DAAgB,CAAA,CAAC,iBAAiB;AACpC,CAAC,EANW,QAAQ,wBAAR,QAAQ,QAMnB;AAED,0CAA0C;AAC1C,kDAAsC;AACtC,2DAA2D;AAC3D,IAAiB,qBAAqB,CAKrC;AALD,WAAiB,qBAAqB;IACvB,oCAAc,GAAG,CAAC,CAAC,cAAc,CAAC;IAElC,8BAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC;AAErC,CAAC,EALgB,qBAAqB,qCAArB,qBAAqB,QAKrC"}

View File

@ -1,96 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
import { CubismIdHandle } from '../id/cubismid';
import { CubismModel } from '../model/cubismmodel';
import { csmVector } from '../type/csmvector';
/**
*
*
*
*/
export declare class CubismPose {
/**
*
* @param pose3json pose3.json
* @param size pose3.json[byte]
* @return
*/
static create(pose3json: ArrayBuffer, size: number): CubismPose;
/**
*
* @param pose CubismPose
*/
static delete(pose: CubismPose): void;
/**
*
* @param model
* @param deltaTimeSeconds []
*/
updateParameters(model: CubismModel, deltaTimeSeconds: number): void;
/**
*
* @param model
* @note 0
*/
reset(model: CubismModel): void;
/**
*
*
* @param model
*/
copyPartOpacities(model: CubismModel): void;
/**
*
* @param model
* @param deltaTimeSeconds []
* @param beginIndex
* @param partGroupCount
*/
doFade(model: CubismModel, deltaTimeSeconds: number, beginIndex: number, partGroupCount: number): void;
/**
*
*/
constructor();
_partGroups: csmVector<PartData>;
_partGroupCounts: csmVector<number>;
_fadeTimeSeconds: number;
_lastModel: CubismModel;
}
/**
*
*/
export declare class PartData {
/**
*
*/
constructor(v?: PartData);
/**
* =
*/
assignment(v: PartData): PartData;
/**
*
* @param model 使
*/
initialize(model: CubismModel): void;
/**
*
*/
clone(): PartData;
partId: CubismIdHandle;
parameterIndex: number;
partIndex: number;
link: csmVector<PartData>;
}
import * as $ from './cubismpose';
export declare namespace Live2DCubismFramework {
const CubismPose: typeof $.CubismPose;
type CubismPose = $.CubismPose;
const PartData: typeof $.PartData;
type PartData = $.PartData;
}
//# sourceMappingURL=cubismpose.d.ts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismpose.d.ts","sourceRoot":"","sources":["../../src/effect/cubismpose.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAY,MAAM,mBAAmB,CAAC;AAYxD;;;;GAIG;AACH,qBAAa,UAAU;IACrB;;;;;OAKG;WACW,MAAM,CAAC,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU;IAiEtE;;;OAGG;WACW,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAM5C;;;;OAIG;IACI,gBAAgB,CAAC,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,GAAG,IAAI;IA2B3E;;;;OAIG;IACI,KAAK,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IA4BtC;;;;OAIG;IACI,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAgClD;;;;;;OAMG;IACI,MAAM,CACX,KAAK,EAAE,WAAW,EAClB,gBAAgB,EAAE,MAAM,EACxB,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,GACrB,IAAI;IAqEP;;OAEG;;IAQH,WAAW,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;IACjC,gBAAgB,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IACpC,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,WAAW,CAAC;CACzB;AAED;;GAEG;AACH,qBAAa,QAAQ;IACnB;;OAEG;gBACS,CAAC,CAAC,EAAE,QAAQ;IAkBxB;;OAEG;IACI,UAAU,CAAC,CAAC,EAAE,QAAQ,GAAG,QAAQ;IAcxC;;;OAGG;IACI,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAO3C;;OAEG;IACI,KAAK,IAAI,QAAQ;IAmBxB,MAAM,EAAE,cAAc,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;CAC3B;AAGD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAElC,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,UAAU,qBAAe,CAAC;IACvC,KAAY,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC;IAC/B,MAAM,QAAQ,mBAAa,CAAC;IACnC,KAAY,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC;CACnC"}

View File

@ -1,317 +0,0 @@
"use strict";
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Live2DCubismFramework = exports.PartData = exports.CubismPose = void 0;
var live2dcubismframework_1 = require("../live2dcubismframework");
var csmvector_1 = require("../type/csmvector");
var cubismjson_1 = require("../utils/cubismjson");
var Epsilon = 0.001;
var DefaultFadeInSeconds = 0.5;
// Pose.jsonのタグ
var FadeIn = 'FadeInTime';
var Link = 'Link';
var Groups = 'Groups';
var Id = 'Id';
/**
* パーツの不透明度の設定
*
* パーツの不透明度の管理と設定を行う
*/
var CubismPose = /** @class */ (function () {
/**
* コンストラクタ
*/
function CubismPose() {
this._fadeTimeSeconds = DefaultFadeInSeconds;
this._lastModel = null;
this._partGroups = new csmvector_1.csmVector();
this._partGroupCounts = new csmvector_1.csmVector();
}
/**
* インスタンスの作成
* @param pose3json pose3.jsonのデータ
* @param size pose3.jsonのデータのサイズ[byte]
* @return 作成されたインスタンス
*/
CubismPose.create = function (pose3json, size) {
var ret = new CubismPose();
var json = cubismjson_1.CubismJson.create(pose3json, size);
var root = json.getRoot();
// フェード時間の指定
if (!root.getValueByString(FadeIn).isNull()) {
ret._fadeTimeSeconds = root
.getValueByString(FadeIn)
.toFloat(DefaultFadeInSeconds);
if (ret._fadeTimeSeconds <= 0.0) {
ret._fadeTimeSeconds = DefaultFadeInSeconds;
}
}
// パーツグループ
var poseListInfo = root.getValueByString(Groups);
var poseCount = poseListInfo.getSize();
for (var poseIndex = 0; poseIndex < poseCount; ++poseIndex) {
var idListInfo = poseListInfo.getValueByIndex(poseIndex);
var idCount = idListInfo.getSize();
var groupCount = 0;
for (var groupIndex = 0; groupIndex < idCount; ++groupIndex) {
var partInfo = idListInfo.getValueByIndex(groupIndex);
var partData = new PartData();
var parameterId = live2dcubismframework_1.CubismFramework.getIdManager().getId(partInfo.getValueByString(Id).getRawString());
partData.partId = parameterId;
// リンクするパーツの設定
if (!partInfo.getValueByString(Link).isNull()) {
var linkListInfo = partInfo.getValueByString(Link);
var linkCount = linkListInfo.getSize();
for (var linkIndex = 0; linkIndex < linkCount; ++linkIndex) {
var linkPart = new PartData();
var linkId = live2dcubismframework_1.CubismFramework.getIdManager().getId(linkListInfo.getValueByIndex(linkIndex).getString());
linkPart.partId = linkId;
partData.link.pushBack(linkPart);
}
}
ret._partGroups.pushBack(partData.clone());
++groupCount;
}
ret._partGroupCounts.pushBack(groupCount);
}
cubismjson_1.CubismJson.delete(json);
return ret;
};
/**
* インスタンスを破棄する
* @param pose 対象のCubismPose
*/
CubismPose.delete = function (pose) {
if (pose != null) {
pose = null;
}
};
/**
* モデルのパラメータの更新
* @param model 対象のモデル
* @param deltaTimeSeconds デルタ時間[]
*/
CubismPose.prototype.updateParameters = function (model, deltaTimeSeconds) {
// 前回のモデルと同じでない場合は初期化が必要
if (model != this._lastModel) {
// パラメータインデックスの初期化
this.reset(model);
}
this._lastModel = model;
// 設定から時間を変更すると、経過時間がマイナスになる事があるので、経過時間0として対応
if (deltaTimeSeconds < 0.0) {
deltaTimeSeconds = 0.0;
}
var beginIndex = 0;
for (var i = 0; i < this._partGroupCounts.getSize(); i++) {
var partGroupCount = this._partGroupCounts.at(i);
this.doFade(model, deltaTimeSeconds, beginIndex, partGroupCount);
beginIndex += partGroupCount;
}
this.copyPartOpacities(model);
};
/**
* 表示を初期化
* @param model 対象のモデル
* @note 不透明度の初期値が0でないパラメータは不透明度を1に設定する
*/
CubismPose.prototype.reset = function (model) {
var beginIndex = 0;
for (var i = 0; i < this._partGroupCounts.getSize(); ++i) {
var groupCount = this._partGroupCounts.at(i);
for (var j = beginIndex; j < beginIndex + groupCount; ++j) {
this._partGroups.at(j).initialize(model);
var partsIndex = this._partGroups.at(j).partIndex;
var paramIndex = this._partGroups.at(j).parameterIndex;
if (partsIndex < 0) {
continue;
}
model.setPartOpacityByIndex(partsIndex, j == beginIndex ? 1.0 : 0.0);
model.setParameterValueByIndex(paramIndex, j == beginIndex ? 1.0 : 0.0);
for (var k = 0; k < this._partGroups.at(j).link.getSize(); ++k) {
this._partGroups.at(j).link.at(k).initialize(model);
}
}
beginIndex += groupCount;
}
};
/**
* パーツの不透明度をコピー
*
* @param model 対象のモデル
*/
CubismPose.prototype.copyPartOpacities = function (model) {
for (var groupIndex = 0; groupIndex < this._partGroups.getSize(); ++groupIndex) {
var partData = this._partGroups.at(groupIndex);
if (partData.link.getSize() == 0) {
continue; // 連動するパラメータはない
}
var partIndex = this._partGroups.at(groupIndex).partIndex;
var opacity = model.getPartOpacityByIndex(partIndex);
for (var linkIndex = 0; linkIndex < partData.link.getSize(); ++linkIndex) {
var linkPart = partData.link.at(linkIndex);
var linkPartIndex = linkPart.partIndex;
if (linkPartIndex < 0) {
continue;
}
model.setPartOpacityByIndex(linkPartIndex, opacity);
}
}
};
/**
* パーツのフェード操作を行う
* @param model 対象のモデル
* @param deltaTimeSeconds デルタ時間[]
* @param beginIndex フェード操作を行うパーツグループの先頭インデックス
* @param partGroupCount フェード操作を行うパーツグループの個数
*/
CubismPose.prototype.doFade = function (model, deltaTimeSeconds, beginIndex, partGroupCount) {
var visiblePartIndex = -1;
var newOpacity = 1.0;
var phi = 0.5;
var backOpacityThreshold = 0.15;
// 現在、表示状態になっているパーツを取得
for (var i = beginIndex; i < beginIndex + partGroupCount; ++i) {
var partIndex = this._partGroups.at(i).partIndex;
var paramIndex = this._partGroups.at(i).parameterIndex;
if (model.getParameterValueByIndex(paramIndex) > Epsilon) {
if (visiblePartIndex >= 0) {
break;
}
visiblePartIndex = i;
newOpacity = model.getPartOpacityByIndex(partIndex);
// 新しい不透明度を計算
newOpacity += deltaTimeSeconds / this._fadeTimeSeconds;
if (newOpacity > 1.0) {
newOpacity = 1.0;
}
}
}
if (visiblePartIndex < 0) {
visiblePartIndex = 0;
newOpacity = 1.0;
}
// 表示パーツ、非表示パーツの不透明度を設定する
for (var i = beginIndex; i < beginIndex + partGroupCount; ++i) {
var partsIndex = this._partGroups.at(i).partIndex;
// 表示パーツの設定
if (visiblePartIndex == i) {
model.setPartOpacityByIndex(partsIndex, newOpacity); // 先に設定
}
// 非表示パーツの設定
else {
var opacity = model.getPartOpacityByIndex(partsIndex);
var a1 = // 計算によって求められる不透明度
void 0; // 計算によって求められる不透明度
if (newOpacity < phi) {
a1 = (newOpacity * (phi - 1)) / phi + 1.0; // (0,1),(phi,phi)を通る直線式
}
else {
a1 = ((1 - newOpacity) * phi) / (1.0 - phi); // (1,0),(phi,phi)を通る直線式
}
// 背景の見える割合を制限する場合
var backOpacity = (1.0 - a1) * (1.0 - newOpacity);
if (backOpacity > backOpacityThreshold) {
a1 = 1.0 - backOpacityThreshold / (1.0 - newOpacity);
}
if (opacity > a1) {
opacity = a1; // 計算の不透明度よりも大きければ(濃ければ)不透明度を上げる
}
model.setPartOpacityByIndex(partsIndex, opacity);
}
}
};
return CubismPose;
}());
exports.CubismPose = CubismPose;
/**
* パーツにまつわるデータを管理
*/
var PartData = /** @class */ (function () {
/**
* コンストラクタ
*/
function PartData(v) {
this.parameterIndex = 0;
this.partIndex = 0;
this.link = new csmvector_1.csmVector();
if (v != undefined) {
this.partId = v.partId;
for (var ite = v.link.begin(); ite.notEqual(v.link.end()); ite.preIncrement()) {
this.link.pushBack(ite.ptr().clone());
}
}
}
/**
* =演算子のオーバーロード
*/
PartData.prototype.assignment = function (v) {
this.partId = v.partId;
for (var ite = v.link.begin(); ite.notEqual(v.link.end()); ite.preIncrement()) {
this.link.pushBack(ite.ptr().clone());
}
return this;
};
/**
* 初期化
* @param model 初期化に使用するモデル
*/
PartData.prototype.initialize = function (model) {
this.parameterIndex = model.getParameterIndex(this.partId);
this.partIndex = model.getPartIndex(this.partId);
model.setParameterValueByIndex(this.parameterIndex, 1);
};
/**
* オブジェクトのコピーを生成する
*/
PartData.prototype.clone = function () {
var clonePartData = new PartData();
clonePartData.partId = this.partId;
clonePartData.parameterIndex = this.parameterIndex;
clonePartData.partIndex = this.partIndex;
clonePartData.link = new csmvector_1.csmVector();
for (var ite = this.link.begin(); ite.notEqual(this.link.end()); ite.increment()) {
clonePartData.link.pushBack(ite.ptr().clone());
}
return clonePartData;
};
return PartData;
}());
exports.PartData = PartData;
// Namespace definition for compatibility.
var $ = __importStar(require("./cubismpose"));
// eslint-disable-next-line @typescript-eslint/no-namespace
var Live2DCubismFramework;
(function (Live2DCubismFramework) {
Live2DCubismFramework.CubismPose = $.CubismPose;
Live2DCubismFramework.PartData = $.PartData;
})(Live2DCubismFramework || (exports.Live2DCubismFramework = Live2DCubismFramework = {}));
//# sourceMappingURL=cubismpose.js.map

File diff suppressed because one or more lines are too long

View File

@ -1,45 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
/**
*
*
*
*
*/
export declare abstract class ICubismAllocator {
/**
*
*
* @param size
* @return '0'
*/
abstract allocate(size: number): any;
/**
*
*
* @param memory
*/
abstract deallocate(memory: any): void;
/**
*
* @param size
* @param alignment
* @return '0'
*/
abstract allocateAligned(size: number, alignment: number): any;
/**
*
* @param alignedMemory
*/
abstract deallocateAligned(alignedMemory: any): void;
}
import * as $ from './icubismallcator';
export declare namespace Live2DCubismFramework {
const ICubismAllocator: typeof $.ICubismAllocator;
type ICubismAllocator = $.ICubismAllocator;
}
//# sourceMappingURL=icubismallcator.d.ts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"icubismallcator.d.ts","sourceRoot":"","sources":["../src/icubismallcator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;GAKG;AACH,8BAAsB,gBAAgB;IACpC;;;;;OAKG;aACa,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG;IAE3C;;;;OAIG;aACa,UAAU,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI;IAE7C;;;;;OAKG;aACa,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,GAAG;IAErE;;;OAGG;aACa,iBAAiB,CAAC,aAAa,EAAE,GAAG,GAAG,IAAI;CAC5D;AAGD,OAAO,KAAK,CAAC,MAAM,mBAAmB,CAAC;AAEvC,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,gBAAgB,2BAAqB,CAAC;IACnD,KAAY,gBAAgB,GAAG,CAAC,CAAC,gBAAgB,CAAC;CACnD"}

View File

@ -1,52 +0,0 @@
"use strict";
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Live2DCubismFramework = exports.ICubismAllocator = void 0;
/**
* メモリアロケーションを抽象化したクラス
*
* メモリ確保解放処理をプラットフォーム側で実装して
* フレームワークから呼び出すためのインターフェース
*/
var ICubismAllocator = /** @class */ (function () {
function ICubismAllocator() {
}
return ICubismAllocator;
}());
exports.ICubismAllocator = ICubismAllocator;
// Namespace definition for compatibility.
var $ = __importStar(require("./icubismallcator"));
// eslint-disable-next-line @typescript-eslint/no-namespace
var Live2DCubismFramework;
(function (Live2DCubismFramework) {
Live2DCubismFramework.ICubismAllocator = $.ICubismAllocator;
})(Live2DCubismFramework || (exports.Live2DCubismFramework = Live2DCubismFramework = {}));
//# sourceMappingURL=icubismallcator.js.map

View File

@ -1 +0,0 @@
{"version":3,"file":"icubismallcator.js","sourceRoot":"","sources":["../src/icubismallcator.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH;;;;;GAKG;AACH;IAAA;IA6BA,CAAC;IAAD,uBAAC;AAAD,CAAC,AA7BD,IA6BC;AA7BqB,4CAAgB;AA+BtC,0CAA0C;AAC1C,mDAAuC;AACvC,2DAA2D;AAC3D,IAAiB,qBAAqB,CAGrC;AAHD,WAAiB,qBAAqB;IACvB,sCAAgB,GAAG,CAAC,CAAC,gBAAgB,CAAC;AAErD,CAAC,EAHgB,qBAAqB,qCAArB,qBAAqB,QAGrC"}

View File

@ -1,166 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
import { CubismIdHandle } from './id/cubismid';
import { csmMap } from './type/csmmap';
/**
*
*
*
*/
export declare abstract class ICubismModelSetting {
/**
* Moc
* @return Moc
*/
abstract getModelFileName(): string;
/**
* 使
*
*/
abstract getTextureCount(): number;
/**
*
* @return
*/
abstract getTextureDirectory(): string;
/**
* 使
* @param index
* @return
*/
abstract getTextureFileName(index: number): string;
/**
*
* @return
*/
abstract getHitAreasCount(): number;
/**
* ID
*
* @param index index
* @return ID
*/
abstract getHitAreaId(index: number): CubismIdHandle;
/**
*
* @param index
* @return
*/
abstract getHitAreaName(index: number): string;
/**
*
* @return
*/
abstract getPhysicsFileName(): string;
/**
*
* @return
*/
abstract getPoseFileName(): string;
/**
*
* @return
*/
abstract getExpressionCount(): number;
/**
*
* @param index
* @return
*/
abstract getExpressionName(index: number): string;
/**
*
* @param index
* @return
*/
abstract getExpressionFileName(index: number): string;
/**
*
* @return
*/
abstract getMotionGroupCount(): number;
/**
*
* @param index
* @return
*/
abstract getMotionGroupName(index: number): string;
/**
*
* @param groupName
* @return
*/
abstract getMotionCount(groupName: string): number;
/**
*
* @param groupName
* @param index
* @return
*/
abstract getMotionFileName(groupName: string, index: number): string;
/**
*
* @param groupName
* @param index
* @return
*/
abstract getMotionSoundFileName(groupName: string, index: number): string;
/**
*
* @param groupName
* @param index
* @return []
*/
abstract getMotionFadeInTimeValue(groupName: string, index: number): number;
/**
*
* @param groupName
* @param index
* @return []
*/
abstract getMotionFadeOutTimeValue(groupName: string, index: number): number;
/**
*
* @return
*/
abstract getUserDataFile(): string;
/**
*
* @param outLayoutMap csmMap
* @return true
* @return false
*/
abstract getLayoutMap(outLayoutMap: csmMap<string, number>): boolean;
/**
*
* @return
*/
abstract getEyeBlinkParameterCount(): number;
/**
* ID
* @param index
* @return ID
*/
abstract getEyeBlinkParameterId(index: number): CubismIdHandle;
/**
*
* @return
*/
abstract getLipSyncParameterCount(): number;
/**
*
* @param index
* @return ID
*/
abstract getLipSyncParameterId(index: number): CubismIdHandle;
}
import * as $ from './icubismmodelsetting';
export declare namespace Live2DCubismFramework {
const ICubismModelSetting: typeof $.ICubismModelSetting;
type ICubismModelSetting = $.ICubismModelSetting;
}
//# sourceMappingURL=icubismmodelsetting.d.ts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"icubismmodelsetting.d.ts","sourceRoot":"","sources":["../src/icubismmodelsetting.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC;;;;GAIG;AACH,8BAAsB,mBAAmB;IACvC;;;OAGG;aACa,gBAAgB,IAAI,MAAM;IAE1C;;;OAGG;aACa,eAAe,IAAI,MAAM;IAEzC;;;OAGG;aACa,mBAAmB,IAAI,MAAM;IAE7C;;;;OAIG;aACa,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAEzD;;;OAGG;aACa,gBAAgB,IAAI,MAAM;IAE1C;;;;;OAKG;aACa,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc;IAE3D;;;;OAIG;aACa,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAErD;;;OAGG;aACa,kBAAkB,IAAI,MAAM;IAE5C;;;OAGG;aACa,eAAe,IAAI,MAAM;IAEzC;;;OAGG;aACa,kBAAkB,IAAI,MAAM;IAE5C;;;;OAIG;aACa,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAExD;;;;OAIG;aACa,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAE5D;;;OAGG;aACa,mBAAmB,IAAI,MAAM;IAE7C;;;;OAIG;aACa,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAEzD;;;;OAIG;aACa,cAAc,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAEzD;;;;;OAKG;aACa,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IAE3E;;;;;OAKG;aACa,sBAAsB,CACpC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GACZ,MAAM;IAET;;;;;OAKG;aACa,wBAAwB,CACtC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GACZ,MAAM;IAET;;;;;OAKG;aACa,yBAAyB,CACvC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,GACZ,MAAM;IAET;;;OAGG;aACa,eAAe,IAAI,MAAM;IAEzC;;;;;OAKG;aACa,YAAY,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO;IAE3E;;;OAGG;aACa,yBAAyB,IAAI,MAAM;IAEnD;;;;OAIG;aACa,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc;IAErE;;;OAGG;aACa,wBAAwB,IAAI,MAAM;IAElD;;;;OAIG;aACa,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc;CACrE;AAGD,OAAO,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAE3C,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,mBAAmB,8BAAwB,CAAC;IACzD,KAAY,mBAAmB,GAAG,CAAC,CAAC,mBAAmB,CAAC;CACzD"}

View File

@ -1,51 +0,0 @@
"use strict";
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Live2DCubismFramework = exports.ICubismModelSetting = void 0;
/**
* モデル設定情報を取り扱う関数を宣言した純粋仮想クラス
*
* このクラスを継承することでモデル設定情報を取り扱うクラスになる
*/
var ICubismModelSetting = /** @class */ (function () {
function ICubismModelSetting() {
}
return ICubismModelSetting;
}());
exports.ICubismModelSetting = ICubismModelSetting;
// Namespace definition for compatibility.
var $ = __importStar(require("./icubismmodelsetting"));
// eslint-disable-next-line @typescript-eslint/no-namespace
var Live2DCubismFramework;
(function (Live2DCubismFramework) {
Live2DCubismFramework.ICubismModelSetting = $.ICubismModelSetting;
})(Live2DCubismFramework || (exports.Live2DCubismFramework = Live2DCubismFramework = {}));
//# sourceMappingURL=icubismmodelsetting.js.map

View File

@ -1 +0,0 @@
{"version":3,"file":"icubismmodelsetting.js","sourceRoot":"","sources":["../src/icubismmodelsetting.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;AAKH;;;;GAIG;AACH;IAAA;IAmLA,CAAC;IAAD,0BAAC;AAAD,CAAC,AAnLD,IAmLC;AAnLqB,kDAAmB;AAqLzC,0CAA0C;AAC1C,uDAA2C;AAC3C,2DAA2D;AAC3D,IAAiB,qBAAqB,CAGrC;AAHD,WAAiB,qBAAqB;IACvB,yCAAmB,GAAG,CAAC,CAAC,mBAAmB,CAAC;AAE3D,CAAC,EAHgB,qBAAqB,qCAArB,qBAAqB,QAGrC"}

View File

@ -1,57 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
import { csmString } from '../type/csmstring';
/**
* Drawable
*
* Drawable
*
* @note IDCubismId
* CubismIdManager().getId(id)使
*/
export declare class CubismId {
/**
* 使CubismId
*
* @param id ID
* @returns CubismId
* @note IDCubismId
* CubismIdManager().getId(id)使
*/
static _createIdInternal(id: string | csmString): CubismId;
/**
* ID
*/
getString(): csmString;
/**
* id
* @param c id
* @return true,false
*/
isEqual(c: string | csmString | CubismId): boolean;
/**
* id
* @param c id
* @return true,false
*/
isNotEqual(c: string | csmString | CubismId): boolean;
/**
*
*
* @note
*/
private constructor();
private _id;
}
export declare type CubismIdHandle = CubismId;
import * as $ from './cubismid';
export declare namespace Live2DCubismFramework {
const CubismId: typeof $.CubismId;
type CubismId = $.CubismId;
type CubismIdHandle = $.CubismIdHandle;
}
//# sourceMappingURL=cubismid.d.ts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismid.d.ts","sourceRoot":"","sources":["../../src/id/cubismid.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C;;;;;;;GAOG;AACH,qBAAa,QAAQ;IACnB;;;;;;;OAOG;WACW,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS;IAItD;;OAEG;IACI,SAAS,IAAI,SAAS;IAI7B;;;;OAIG;IACI,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO;IAWzD;;;;OAIG;IACI,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO;IAW5D;;;;OAIG;IACH,OAAO;IASP,OAAO,CAAC,GAAG,CAAY;CACxB;AAED,MAAM,CAAC,OAAO,MAAM,cAAc,GAAG,QAAQ,CAAC;AAG9C,OAAO,KAAK,CAAC,MAAM,YAAY,CAAC;AAEhC,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,QAAQ,mBAAa,CAAC;IACnC,KAAY,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC;IAClC,KAAY,cAAc,GAAG,CAAC,CAAC,cAAc,CAAC;CAC/C"}

View File

@ -1,116 +0,0 @@
"use strict";
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Live2DCubismFramework = exports.CubismId = void 0;
var csmstring_1 = require("../type/csmstring");
/**
* パラメータ名パーツ名Drawable名を保持
*
* パラメータ名パーツ名Drawable名を保持するクラス
*
* @note 指定したID文字列からCubismIdを取得する際はこのクラスの生成メソッドを呼ばず
* CubismIdManager().getId(id)を使用してください
*/
var CubismId = /** @class */ (function () {
/**
* プライベートコンストラクタ
*
* @note ユーザーによる生成は許可しません
*/
function CubismId(id) {
if (typeof id === 'string') {
this._id = new csmstring_1.csmString(id);
return;
}
this._id = id;
}
/**
* 内部で使用するCubismIdクラス生成メソッド
*
* @param id ID文字列
* @returns CubismId
* @note 指定したID文字列からCubismIdを取得する際は
* CubismIdManager().getId(id)を使用してください
*/
CubismId._createIdInternal = function (id) {
return new CubismId(id);
};
/**
* ID名を取得する
*/
CubismId.prototype.getString = function () {
return this._id;
};
/**
* idを比較
* @param c 比較するid
* @return 同じならばtrue,異なっていればfalseを返す
*/
CubismId.prototype.isEqual = function (c) {
if (typeof c === 'string') {
return this._id.isEqual(c);
}
else if (c instanceof csmstring_1.csmString) {
return this._id.isEqual(c.s);
}
else if (c instanceof CubismId) {
return this._id.isEqual(c._id.s);
}
return false;
};
/**
* idを比較
* @param c 比較するid
* @return 同じならばtrue,異なっていればfalseを返す
*/
CubismId.prototype.isNotEqual = function (c) {
if (typeof c == 'string') {
return !this._id.isEqual(c);
}
else if (c instanceof csmstring_1.csmString) {
return !this._id.isEqual(c.s);
}
else if (c instanceof CubismId) {
return !this._id.isEqual(c._id.s);
}
return false;
};
return CubismId;
}());
exports.CubismId = CubismId;
// Namespace definition for compatibility.
var $ = __importStar(require("./cubismid"));
// eslint-disable-next-line @typescript-eslint/no-namespace
var Live2DCubismFramework;
(function (Live2DCubismFramework) {
Live2DCubismFramework.CubismId = $.CubismId;
})(Live2DCubismFramework || (exports.Live2DCubismFramework = Live2DCubismFramework = {}));
//# sourceMappingURL=cubismid.js.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismid.js","sourceRoot":"","sources":["../../src/id/cubismid.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+CAA8C;AAE9C;;;;;;;GAOG;AACH;IAoDE;;;;OAIG;IACH,kBAAoB,EAAsB;QACxC,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE;YAC1B,IAAI,CAAC,GAAG,GAAG,IAAI,qBAAS,CAAC,EAAE,CAAC,CAAC;YAC7B,OAAO;SACR;QAED,IAAI,CAAC,GAAG,GAAG,EAAE,CAAC;IAChB,CAAC;IA/DD;;;;;;;OAOG;IACW,0BAAiB,GAA/B,UAAgC,EAAsB;QACpD,OAAO,IAAI,QAAQ,CAAC,EAAE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rC,CAAC,EAJgB,qBAAqB,qCAArB,qBAAqB,QAIrC"}

View File

@ -1,63 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
import { csmString } from '../type/csmstring';
import { CubismId } from './cubismid';
/**
* ID
*
* ID
*/
export declare class CubismIdManager {
/**
*
*/
constructor();
/**
*
*/
release(): void;
/**
* ID
*
* @param ids ID
* @param count ID
*/
registerIds(ids: string[] | csmString[]): void;
/**
* ID
*
* @param id ID
*/
registerId(id: string | csmString): CubismId;
/**
* IDID
*
* @param id ID
*/
getId(id: csmString | string): CubismId;
/**
* IDID
*
* @return true
* @return false
*/
isExist(id: csmString | string): boolean;
/**
* IDID
*
* @param id ID
* @return IDNULL
*/
private findId;
private _ids;
}
import * as $ from './cubismidmanager';
export declare namespace Live2DCubismFramework {
const CubismIdManager: typeof $.CubismIdManager;
type CubismIdManager = $.CubismIdManager;
}
//# sourceMappingURL=cubismidmanager.d.ts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismidmanager.d.ts","sourceRoot":"","sources":["../../src/id/cubismidmanager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;GAIG;AACH,qBAAa,eAAe;IAC1B;;OAEG;;IAKH;;OAEG;IACI,OAAO,IAAI,IAAI;IAOtB;;;;;OAKG;IACI,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,SAAS,EAAE,GAAG,IAAI;IAMrD;;;;OAIG;IACI,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,QAAQ;IAiBnD;;;;OAIG;IACI,KAAK,CAAC,EAAE,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ;IAI9C;;;;;OAKG;IACI,OAAO,CAAC,EAAE,EAAE,SAAS,GAAG,MAAM,GAAG,OAAO;IAO/C;;;;;OAKG;IACH,OAAO,CAAC,MAAM;IAUd,OAAO,CAAC,IAAI,CAAsB;CACnC;AAGD,OAAO,KAAK,CAAC,MAAM,mBAAmB,CAAC;AAEvC,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,eAAe,0BAAoB,CAAC;IACjD,KAAY,eAAe,GAAG,CAAC,CAAC,eAAe,CAAC;CACjD"}

View File

@ -1,130 +0,0 @@
"use strict";
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Live2DCubismFramework = exports.CubismIdManager = void 0;
var csmvector_1 = require("../type/csmvector");
var cubismid_1 = require("./cubismid");
/**
* ID名の管理
*
* ID名を管理する
*/
var CubismIdManager = /** @class */ (function () {
/**
* コンストラクタ
*/
function CubismIdManager() {
this._ids = new csmvector_1.csmVector();
}
/**
* デストラクタ相当の処理
*/
CubismIdManager.prototype.release = function () {
for (var i = 0; i < this._ids.getSize(); ++i) {
this._ids.set(i, void 0);
}
this._ids = null;
};
/**
* ID名をリストから登録
*
* @param ids ID名リスト
* @param count IDの個数
*/
CubismIdManager.prototype.registerIds = function (ids) {
for (var i = 0; i < ids.length; i++) {
this.registerId(ids[i]);
}
};
/**
* ID名を登録
*
* @param id ID名
*/
CubismIdManager.prototype.registerId = function (id) {
var result = null;
if ('string' == typeof id) {
if ((result = this.findId(id)) != null) {
return result;
}
result = cubismid_1.CubismId._createIdInternal(id);
this._ids.pushBack(result);
}
else {
return this.registerId(id.s);
}
return result;
};
/**
* ID名からIDを取得する
*
* @param id ID名
*/
CubismIdManager.prototype.getId = function (id) {
return this.registerId(id);
};
/**
* ID名からIDの確認
*
* @return true 存在する
* @return false 存在しない
*/
CubismIdManager.prototype.isExist = function (id) {
if ('string' == typeof id) {
return this.findId(id) != null;
}
return this.isExist(id.s);
};
/**
* ID名からIDを検索する
*
* @param id ID名
* @return 登録されているIDなければNULL
*/
CubismIdManager.prototype.findId = function (id) {
for (var i = 0; i < this._ids.getSize(); ++i) {
if (this._ids.at(i).getString().isEqual(id)) {
return this._ids.at(i);
}
}
return null;
};
return CubismIdManager;
}());
exports.CubismIdManager = CubismIdManager;
// Namespace definition for compatibility.
var $ = __importStar(require("./cubismidmanager"));
// eslint-disable-next-line @typescript-eslint/no-namespace
var Live2DCubismFramework;
(function (Live2DCubismFramework) {
Live2DCubismFramework.CubismIdManager = $.CubismIdManager;
})(Live2DCubismFramework || (exports.Live2DCubismFramework = Live2DCubismFramework = {}));
//# sourceMappingURL=cubismidmanager.js.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismidmanager.js","sourceRoot":"","sources":["../../src/id/cubismidmanager.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,+CAA8C;AAC9C,uCAAsC;AAEtC;;;;GAIG;AACH;IACE;;OAEG;IACH;QACE,IAAI,CAAC,IAAI,GAAG,IAAI,qBAA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EAAE;YACzB,OAAO,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC;SAChC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IAED;;;;;OAKG;IACK,gCAAM,GAAd,UAAe,EAAU;QACvB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,EAAE,CAAC,EAAE;YAC5C,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,EAAE;gBAC3C,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;aACxB;SACF;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAGH,sBAAC;AAAD,CAAC,AA3FD,IA2FC;AA3FY,0CAAe;AA6F5B,0CAA0C;AAC1C,mDAAuC;AACvC,2DAA2D;AAC3D,IAAiB,qBAAqB,CAGrC;AAHD,WAAiB,qBAAqB;IACvB,qCAAe,GAAG,CAAC,CAAC,eAAe,CAAC;AAEnD,CAAC,EAHgB,qBAAqB,qCAArB,qBAAqB,QAGrC"}

View File

@ -1,105 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
import { CubismIdManager } from './id/cubismidmanager';
export declare function strtod(s: string, endPtr: string[]): number;
/**
* Framework使
*/
export declare const Constant: Readonly<Record<string, number>>;
export declare function csmDelete<T>(address: T): void;
/**
* Live2D Cubism SDK Original Workflow SDK
* CubismFramework.initialize()CubismFramework.dispose()
*/
export declare class CubismFramework {
/**
* Cubism FrameworkAPI使
* API
*
*
* @param option Option
*
* @return true
*/
static startUp(option?: Option): boolean;
/**
* StartUp()CubismFramework
* Dispose()CubismFramework
*/
static cleanUp(): void;
/**
* Cubism Framework<br>
* Initialize()Dispose()
*
* @param memorySize [byte(s)]
* 使
* 1024*1024*16 byte(16MB)
* 1024*1024*16 byte
*/
static initialize(memorySize?: number): void;
/**
* Cubism Framework
*
*
*/
static dispose(): void;
/**
* Cubism FrameworkAPI使
* @return API使true
*/
static isStarted(): boolean;
/**
* Cubism Framework
* @return true
*/
static isInitialized(): boolean;
/**
* Core API
*
* @praram message
*/
static coreLogFunction(message: string): void;
/**
*
*
* @return
*/
static getLoggingLevel(): LogLevel;
/**
* ID
* @return CubismManager
*/
static getIdManager(): CubismIdManager;
/**
* 使
*
*/
private constructor();
}
export declare class Option {
logFunction: Live2DCubismCore.csmLogFunction;
loggingLevel: LogLevel;
}
/**
*
*/
export declare enum LogLevel {
LogLevel_Verbose = 0,
LogLevel_Debug = 1,
LogLevel_Info = 2,
LogLevel_Warning = 3,
LogLevel_Error = 4,
LogLevel_Off = 5
}
import * as $ from './live2dcubismframework';
export declare namespace Live2DCubismFramework {
const Constant: Readonly<Record<string, number>>;
const csmDelete: typeof $.csmDelete;
const CubismFramework: typeof $.CubismFramework;
type CubismFramework = $.CubismFramework;
}
//# sourceMappingURL=live2dcubismframework.d.ts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"live2dcubismframework.d.ts","sourceRoot":"","sources":["../src/live2dcubismframework.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AASvD,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CA4B1D;AASD;;GAEG;AACH,eAAO,MAAM,QAAQ,kCAGnB,CAAC;AAEH,wBAAgB,SAAS,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,CAM7C;AAED;;;GAGG;AACH,qBAAa,eAAe;IAC1B;;;;;;;;OAQG;WACW,OAAO,CAAC,MAAM,GAAE,MAAa,GAAG,OAAO;IAoCrD;;;OAGG;WACW,OAAO,IAAI,IAAI;IAO7B;;;;;;;;OAQG;WACW,UAAU,CAAC,UAAU,SAAI,GAAG,IAAI;IAiC9C;;;;OAIG;WACW,OAAO,IAAI,IAAI;IA4B7B;;;OAGG;WACW,SAAS,IAAI,OAAO;IAIlC;;;OAGG;WACW,aAAa,IAAI,OAAO;IAItC;;;;OAIG;WACW,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IASpD;;;;OAIG;WACW,eAAe,IAAI,QAAQ;IAOzC;;;OAGG;WACW,YAAY,IAAI,eAAe;IAI7C;;;OAGG;IACH,OAAO;CACR;AAED,qBAAa,MAAM;IACjB,WAAW,EAAE,gBAAgB,CAAC,cAAc,CAAC;IAC7C,YAAY,EAAE,QAAQ,CAAC;CACxB;AAED;;GAEG;AACH,oBAAY,QAAQ;IAClB,gBAAgB,IAAI;IACpB,cAAc,IAAA;IACd,aAAa,IAAA;IACb,gBAAgB,IAAA;IAChB,cAAc,IAAA;IACd,YAAY,IAAA;CACb;AAGD,OAAO,KAAK,CAAC,MAAM,yBAAyB,CAAC;AAE7C,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,QAAQ,kCAAa,CAAC;IAC5B,MAAM,SAAS,oBAAc,CAAC;IAC9B,MAAM,eAAe,0BAAoB,CAAC;IACjD,KAAY,eAAe,GAAG,CAAC,CAAC,eAAe,CAAC;CACjD"}

View File

@ -1,268 +0,0 @@
"use strict";
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Live2DCubismFramework = exports.LogLevel = exports.Option = exports.CubismFramework = exports.csmDelete = exports.Constant = exports.strtod = void 0;
var cubismidmanager_1 = require("./id/cubismidmanager");
var cubismrenderer_1 = require("./rendering/cubismrenderer");
var cubismdebug_1 = require("./utils/cubismdebug");
var cubismjson_1 = require("./utils/cubismjson");
function strtod(s, endPtr) {
var index = 0;
for (var i = 1;; i++) {
var testC = s.slice(i - 1, i);
// 指数・マイナスの可能性があるのでスキップする
if (testC == 'e' || testC == '-' || testC == 'E') {
continue;
} // 文字列の範囲を広げていく
var test = s.substring(0, i);
var number = Number(test);
if (isNaN(number)) {
// 数値として認識できなくなったので終了
break;
} // 最後に数値としてできたindexを格納しておく
index = i;
}
var d = parseFloat(s); // パースした数値
if (isNaN(d)) {
// 数値として認識できなくなったので終了
d = NaN;
}
endPtr[0] = s.slice(index); // 後続の文字列
return d;
}
exports.strtod = strtod;
// ファイルスコープの変数を初期化
var s_isStarted = false;
var s_isInitialized = false;
var s_option = null;
var s_cubismIdManager = null;
/**
* Framework内で使う定数の宣言
*/
exports.Constant = Object.freeze({
vertexOffset: 0,
vertexStep: 2 // メッシュ頂点のステップ値
});
function csmDelete(address) {
if (!address) {
return;
}
address = void 0;
}
exports.csmDelete = csmDelete;
/**
* Live2D Cubism SDK Original Workflow SDKのエントリポイント
* 利用開始時はCubismFramework.initialize()を呼びCubismFramework.dispose()で終了する
*/
var CubismFramework = /** @class */ (function () {
/**
* 静的クラスとして使用する
* インスタンス化させない
*/
function CubismFramework() {
}
/**
* Cubism FrameworkのAPIを使用可能にする
* APIを実行する前に必ずこの関数を実行すること
* 一度準備が完了して以降は再び実行しても内部処理がスキップされます
*
* @param option Optionクラスのインスタンス
*
* @return 準備処理が完了したらtrueが返ります
*/
CubismFramework.startUp = function (option) {
if (option === void 0) { option = null; }
if (s_isStarted) {
(0, cubismdebug_1.CubismLogInfo)('CubismFramework.startUp() is already done.');
return s_isStarted;
}
s_option = option;
if (s_option != null) {
Live2DCubismCore.Logging.csmSetLogFunction(s_option.logFunction);
}
s_isStarted = true;
// Live2D Cubism Coreバージョン情報を表示
if (s_isStarted) {
var version = Live2DCubismCore.Version.csmGetVersion();
var major = (version & 0xff000000) >> 24;
var minor = (version & 0x00ff0000) >> 16;
var patch = version & 0x0000ffff;
var versionNumber = version;
(0, cubismdebug_1.CubismLogInfo)("Live2D Cubism Core version: {0}.{1}.{2} ({3})", ('00' + major).slice(-2), ('00' + minor).slice(-2), ('0000' + patch).slice(-4), versionNumber);
}
(0, cubismdebug_1.CubismLogInfo)('CubismFramework.startUp() is complete.');
return s_isStarted;
};
/**
* StartUp()で初期化したCubismFrameworkの各パラメータをクリアします
* Dispose()したCubismFrameworkを再利用する際に利用してください
*/
CubismFramework.cleanUp = function () {
s_isStarted = false;
s_isInitialized = false;
s_option = null;
s_cubismIdManager = null;
};
/**
* Cubism Framework内のリソースを初期化してモデルを表示可能な状態にします<br>
* 再度Initialize()するには先にDispose()を実行する必要があります
*
* @param memorySize 初期化時メモリ量 [byte(s)]
* 複数モデル表示時などにモデルが更新されない際に使用してください
* 指定する際は必ず1024*1024*16 byte(16MB)以上の値を指定してください
* それ以外はすべて1024*1024*16 byteに丸めます
*/
CubismFramework.initialize = function (memorySize) {
if (memorySize === void 0) { memorySize = 0; }
(0, cubismdebug_1.CSM_ASSERT)(s_isStarted);
if (!s_isStarted) {
(0, cubismdebug_1.CubismLogWarning)('CubismFramework is not started.');
return;
}
// --- s_isInitializedによる連続初期化ガード ---
// 連続してリソース確保が行われないようにする。
// 再度Initialize()するには先にDispose()を実行する必要がある。
if (s_isInitialized) {
(0, cubismdebug_1.CubismLogWarning)('CubismFramework.initialize() skipped, already initialized.');
return;
}
//---- static 初期化 ----
cubismjson_1.Value.staticInitializeNotForClientCall();
s_cubismIdManager = new cubismidmanager_1.CubismIdManager();
// --- HACK: 初期化時メモリ量の拡張(単位byte) ---
// 複数モデル表示時などにモデルが更新されない際に使用してください。
// 指定する際は必ず1024*1024*16 byte(16MB)以上の値を指定してください。
// それ以外はすべて1024*1024*16 byteに丸めます。
Live2DCubismCore.Memory.initializeAmountOfMemory(memorySize);
s_isInitialized = true;
(0, cubismdebug_1.CubismLogInfo)('CubismFramework.initialize() is complete.');
};
/**
* Cubism Framework内の全てのリソースを解放します
* ただし外部で確保されたリソースについては解放しません
* 外部で適切に破棄する必要があります
*/
CubismFramework.dispose = function () {
(0, cubismdebug_1.CSM_ASSERT)(s_isStarted);
if (!s_isStarted) {
(0, cubismdebug_1.CubismLogWarning)('CubismFramework is not started.');
return;
}
// --- s_isInitializedによる未初期化解放ガード ---
// dispose()するには先にinitialize()を実行する必要がある。
if (!s_isInitialized) {
// false...リソース未確保の場合
(0, cubismdebug_1.CubismLogWarning)('CubismFramework.dispose() skipped, not initialized.');
return;
}
cubismjson_1.Value.staticReleaseNotForClientCall();
s_cubismIdManager.release();
s_cubismIdManager = null;
// レンダラの静的リソース(シェーダプログラム他)を解放する
cubismrenderer_1.CubismRenderer.staticRelease();
s_isInitialized = false;
(0, cubismdebug_1.CubismLogInfo)('CubismFramework.dispose() is complete.');
};
/**
* Cubism FrameworkのAPIを使用する準備が完了したかどうか
* @return APIを使用する準備が完了していればtrueが返ります
*/
CubismFramework.isStarted = function () {
return s_isStarted;
};
/**
* Cubism Frameworkのリソース初期化がすでに行われているかどうか
* @return リソース確保が完了していればtrueが返ります
*/
CubismFramework.isInitialized = function () {
return s_isInitialized;
};
/**
* Core APIにバインドしたログ関数を実行する
*
* @praram message ログメッセージ
*/
CubismFramework.coreLogFunction = function (message) {
// Return if logging not possible.
if (!Live2DCubismCore.Logging.csmGetLogFunction()) {
return;
}
Live2DCubismCore.Logging.csmGetLogFunction()(message);
};
/**
* 現在のログ出力レベル設定の値を返す
*
* @return 現在のログ出力レベル設定の値
*/
CubismFramework.getLoggingLevel = function () {
if (s_option != null) {
return s_option.loggingLevel;
}
return LogLevel.LogLevel_Off;
};
/**
* IDマネージャのインスタンスを取得する
* @return CubismManagerクラスのインスタンス
*/
CubismFramework.getIdManager = function () {
return s_cubismIdManager;
};
return CubismFramework;
}());
exports.CubismFramework = CubismFramework;
var Option = /** @class */ (function () {
function Option() {
}
return Option;
}());
exports.Option = Option;
/**
* ログ出力のレベル
*/
var LogLevel;
(function (LogLevel) {
LogLevel[LogLevel["LogLevel_Verbose"] = 0] = "LogLevel_Verbose";
LogLevel[LogLevel["LogLevel_Debug"] = 1] = "LogLevel_Debug";
LogLevel[LogLevel["LogLevel_Info"] = 2] = "LogLevel_Info";
LogLevel[LogLevel["LogLevel_Warning"] = 3] = "LogLevel_Warning";
LogLevel[LogLevel["LogLevel_Error"] = 4] = "LogLevel_Error";
LogLevel[LogLevel["LogLevel_Off"] = 5] = "LogLevel_Off"; // ログ出力無効
})(LogLevel || (exports.LogLevel = LogLevel = {}));
// Namespace definition for compatibility.
var $ = __importStar(require("./live2dcubismframework"));
// eslint-disable-next-line @typescript-eslint/no-namespace
var Live2DCubismFramework;
(function (Live2DCubismFramework) {
Live2DCubismFramework.Constant = $.Constant;
Live2DCubismFramework.csmDelete = $.csmDelete;
Live2DCubismFramework.CubismFramework = $.CubismFramework;
})(Live2DCubismFramework || (exports.Live2DCubismFramework = Live2DCubismFramework = {}));
//# sourceMappingURL=live2dcubismframework.js.map

View File

@ -1 +0,0 @@
{"version":3,"file":"live2dcubismframework.js","sourceRoot":"","sources":["../src/live2dcubismframework.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;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C7C,2DAA2D;AAC3D,IAAiB,qBAAqB,CAKrC;AALD,WAAiB,qBAAqB;IACvB,8BAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC;IACtB,+BAAS,GAAG,CAAC,CAAC,SAAS,CAAC;IACxB,qCAAe,GAAG,CAAC,CAAC,eAAe,CAAC;AAEnD,CAAC,EALgB,qBAAqB,qCAArB,qBAAqB,QAKrC"}

View File

@ -1,149 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
import { CubismVector2 } from './cubismvector2';
/**
* 使
*/
export declare class CubismMath {
static readonly Epsilon: number;
/**
*
*
* @param value
* @param min
* @param max
* @return
*/
static range(value: number, min: number, max: number): number;
/**
*
*
* @param x
* @return sin(x)
*/
static sin(x: number): number;
/**
*
*
* @param x ()
* @return cos(x)
*/
static cos(x: number): number;
/**
*
*
* @param x
* @return
*/
static abs(x: number): number;
/**
* ()
* @param x ->
* @return
*/
static sqrt(x: number): number;
/**
*
* @param x ->
* @return
*/
static cbrt(x: number): number;
/**
*
*
*
* @param value
* @return
*/
static getEasingSine(value: number): number;
/**
*
*
* @param left
* @param right
* @return
*/
static max(left: number, right: number): number;
/**
*
*
* @param left
* @param right
* @return
*/
static min(left: number, right: number): number;
/**
*
*
* @param degrees
* @return
*/
static degreesToRadian(degrees: number): number;
/**
*
*
* @param radian
* @return
*/
static radianToDegrees(radian: number): number;
/**
*
*
* @param from
* @param to
* @return
*/
static directionToRadian(from: CubismVector2, to: CubismVector2): number;
/**
*
*
* @param from
* @param to
* @return
*/
static directionToDegrees(from: CubismVector2, to: CubismVector2): number;
/**
*
*
* @param totalAngle
* @return
*/
static radianToDirection(totalAngle: number): CubismVector2;
/**
* 0
* a * x^2 + b * x + c = 0
*
* @param a ->
* @param b ->
* @param c ->
* @return
*/
static quadraticEquation(a: number, b: number, c: number): number;
/**
* t
* 0.01.0
*
* a * x^3 + b * x^2 + c * x + d = 0
*
* @param a ->
* @param b ->
* @param c ->
* @param d ->
* @return 0.01.0
*/
static cardanoAlgorithmForBezier(a: number, b: number, c: number, d: number): number;
/**
*
*/
private constructor();
}
import * as $ from './cubismmath';
export declare namespace Live2DCubismFramework {
const CubismMath: typeof $.CubismMath;
type CubismMath = $.CubismMath;
}
//# sourceMappingURL=cubismmath.d.ts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismmath.d.ts","sourceRoot":"","sources":["../../src/math/cubismmath.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD;;GAEG;AACH,qBAAa,UAAU;IACrB,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAW;IAE1C;;;;;;;OAOG;IACH,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM;IAU7D;;;;;OAKG;IACH,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;IAI7B;;;;;OAKG;IACH,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;IAI7B;;;;;OAKG;IACH,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;IAI7B;;;;OAIG;IACH,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;IAI9B;;;;OAIG;IACH,MAAM,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;IAsB9B;;;;;;OAMG;IACH,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAU3C;;;;;;OAMG;IACH,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IAI/C;;;;;;OAMG;IACH,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM;IAI/C;;;;;OAKG;IACH,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAI/C;;;;;OAKG;IACH,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAI9C;;;;;;OAMG;IACH,MAAM,CAAC,iBAAiB,CAAC,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,GAAG,MAAM;IAiBxE;;;;;;OAMG;IACH,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAAE,aAAa,EAAE,EAAE,EAAE,aAAa,GAAG,MAAM;IAWzE;;;;;OAKG;IAEH,MAAM,CAAC,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa;IAS3D;;;;;;;;OAQG;IACH,MAAM,CAAC,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM;IAWjE;;;;;;;;;;;OAWG;IACH,MAAM,CAAC,yBAAyB,CAC9B,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,EACT,CAAC,EAAE,MAAM,GACR,MAAM;IAoET;;OAEG;IACH,OAAO;CACR;AAGD,OAAO,KAAK,CAAC,MAAM,cAAc,CAAC;AAElC,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,UAAU,qBAAe,CAAC;IACvC,KAAY,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC;CACvC"}

View File

@ -1,315 +0,0 @@
"use strict";
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Live2DCubismFramework = exports.CubismMath = void 0;
var cubismvector2_1 = require("./cubismvector2");
/**
* 数値計算などに使用するユーティリティクラス
*/
var CubismMath = /** @class */ (function () {
/**
* コンストラクタ
*/
function CubismMath() {
}
/**
* 第一引数の値を最小値と最大値の範囲に収めた値を返す
*
* @param value 収められる値
* @param min 範囲の最小値
* @param max 範囲の最大値
* @return 最小値と最大値の範囲に収めた値
*/
CubismMath.range = function (value, min, max) {
if (value < min) {
value = min;
}
else if (value > max) {
value = max;
}
return value;
};
/**
* サイン関数の値を求める
*
* @param x 角度値ラジアン
* @return サイン関数sin(x)の値
*/
CubismMath.sin = function (x) {
return Math.sin(x);
};
/**
* コサイン関数の値を求める
*
* @param x 角度値(ラジアン)
* @return コサイン関数cos(x)の値
*/
CubismMath.cos = function (x) {
return Math.cos(x);
};
/**
* 値の絶対値を求める
*
* @param x 絶対値を求める値
* @return 値の絶対値
*/
CubismMath.abs = function (x) {
return Math.abs(x);
};
/**
* 平方根(ルート)を求める
* @param x -> 平方根を求める値
* @return 値の平方根
*/
CubismMath.sqrt = function (x) {
return Math.sqrt(x);
};
/**
* 立方根を求める
* @param x -> 立方根を求める値
* @return 値の立方根
*/
CubismMath.cbrt = function (x) {
if (x === 0) {
return x;
}
var cx = x;
var isNegativeNumber = cx < 0;
if (isNegativeNumber) {
cx = -cx;
}
var ret;
if (cx === Infinity) {
ret = Infinity;
}
else {
ret = Math.exp(Math.log(cx) / 3);
ret = (cx / (ret * ret) + 2 * ret) / 3;
}
return isNegativeNumber ? -ret : ret;
};
/**
* イージング処理されたサインを求める
* フェードインアウト時のイージングに利用できる
*
* @param value イージングを行う値
* @return イージング処理されたサイン値
*/
CubismMath.getEasingSine = function (value) {
if (value < 0.0) {
return 0.0;
}
else if (value > 1.0) {
return 1.0;
}
return 0.5 - 0.5 * this.cos(value * Math.PI);
};
/**
* 大きい方の値を返す
*
* @param left 左辺の値
* @param right 右辺の値
* @return 大きい方の値
*/
CubismMath.max = function (left, right) {
return left > right ? left : right;
};
/**
* 小さい方の値を返す
*
* @param left 左辺の値
* @param right 右辺の値
* @return 小さい方の値
*/
CubismMath.min = function (left, right) {
return left > right ? right : left;
};
/**
* 角度値をラジアン値に変換する
*
* @param degrees 角度値
* @return 角度値から変換したラジアン値
*/
CubismMath.degreesToRadian = function (degrees) {
return (degrees / 180.0) * Math.PI;
};
/**
* ラジアン値を角度値に変換する
*
* @param radian ラジアン値
* @return ラジアン値から変換した角度値
*/
CubismMath.radianToDegrees = function (radian) {
return (radian * 180.0) / Math.PI;
};
/**
* 2つのベクトルからラジアン値を求める
*
* @param from 始点ベクトル
* @param to 終点ベクトル
* @return ラジアン値から求めた方向ベクトル
*/
CubismMath.directionToRadian = function (from, to) {
var q1 = Math.atan2(to.y, to.x);
var q2 = Math.atan2(from.y, from.x);
var ret = q1 - q2;
while (ret < -Math.PI) {
ret += Math.PI * 2.0;
}
while (ret > Math.PI) {
ret -= Math.PI * 2.0;
}
return ret;
};
/**
* 2つのベクトルから角度値を求める
*
* @param from 始点ベクトル
* @param to 終点ベクトル
* @return 角度値から求めた方向ベクトル
*/
CubismMath.directionToDegrees = function (from, to) {
var radian = this.directionToRadian(from, to);
var degree = this.radianToDegrees(radian);
if (to.x - from.x > 0.0) {
degree = -degree;
}
return degree;
};
/**
* ラジアン値を方向ベクトルに変換する
*
* @param totalAngle ラジアン値
* @return ラジアン値から変換した方向ベクトル
*/
CubismMath.radianToDirection = function (totalAngle) {
var ret = new cubismvector2_1.CubismVector2();
ret.x = this.sin(totalAngle);
ret.y = this.cos(totalAngle);
return ret;
};
/**
* 三次方程式の三次項の係数が0になったときに補欠的に二次方程式の解をもとめる
* a * x^2 + b * x + c = 0
*
* @param a -> 二次項の係数値
* @param b -> 一次項の係数値
* @param c -> 定数項の値
* @return 二次方程式の解
*/
CubismMath.quadraticEquation = function (a, b, c) {
if (this.abs(a) < CubismMath.Epsilon) {
if (this.abs(b) < CubismMath.Epsilon) {
return -c;
}
return -c / b;
}
return -(b + this.sqrt(b * b - 4.0 * a * c)) / (2.0 * a);
};
/**
* カルダの公式によってベジェのt値に該当する次方程式の解を求める
* 重解になったときには0.01.0の値になる解を返す
*
* a * x^3 + b * x^2 + c * x + d = 0
*
* @param a -> 三次項の係数値
* @param b -> 二次項の係数値
* @param c -> 一次項の係数値
* @param d -> 定数項の値
* @return 0.01.0の間にある解
*/
CubismMath.cardanoAlgorithmForBezier = function (a, b, c, d) {
if (this.sqrt(a) < CubismMath.Epsilon) {
return this.range(this.quadraticEquation(b, c, d), 0.0, 1.0);
}
var ba = b / a;
var ca = c / a;
var da = d / a;
var p = (3.0 * ca - ba * ba) / 3.0;
var p3 = p / 3.0;
var q = (2.0 * ba * ba * ba - 9.0 * ba * ca + 27.0 * da) / 27.0;
var q2 = q / 2.0;
var discriminant = q2 * q2 + p3 * p3 * p3;
var center = 0.5;
var threshold = center + 0.01;
if (discriminant < 0.0) {
var mp3 = -p / 3.0;
var mp33 = mp3 * mp3 * mp3;
var r = this.sqrt(mp33);
var t = -q / (2.0 * r);
var cosphi = this.range(t, -1.0, 1.0);
var phi = Math.acos(cosphi);
var crtr = this.cbrt(r);
var t1 = 2.0 * crtr;
var root1_1 = t1 * this.cos(phi / 3.0) - ba / 3.0;
if (this.abs(root1_1 - center) < threshold) {
return this.range(root1_1, 0.0, 1.0);
}
var root2 = t1 * this.cos((phi + 2.0 * Math.PI) / 3.0) - ba / 3.0;
if (this.abs(root2 - center) < threshold) {
return this.range(root2, 0.0, 1.0);
}
var root3 = t1 * this.cos((phi + 4.0 * Math.PI) / 3.0) - ba / 3.0;
return this.range(root3, 0.0, 1.0);
}
if (discriminant == 0.0) {
var u1_1;
if (q2 < 0.0) {
u1_1 = this.cbrt(-q2);
}
else {
u1_1 = -this.cbrt(q2);
}
var root1_2 = 2.0 * u1_1 - ba / 3.0;
if (this.abs(root1_2 - center) < threshold) {
return this.range(root1_2, 0.0, 1.0);
}
var root2 = -u1_1 - ba / 3.0;
return this.range(root2, 0.0, 1.0);
}
var sd = this.sqrt(discriminant);
var u1 = this.cbrt(sd - q2);
var v1 = this.cbrt(sd + q2);
var root1 = u1 - v1 - ba / 3.0;
return this.range(root1, 0.0, 1.0);
};
CubismMath.Epsilon = 0.00001;
return CubismMath;
}());
exports.CubismMath = CubismMath;
// Namespace definition for compatibility.
var $ = __importStar(require("./cubismmath"));
// eslint-disable-next-line @typescript-eslint/no-namespace
var Live2DCubismFramework;
(function (Live2DCubismFramework) {
Live2DCubismFramework.CubismMath = $.CubismMath;
})(Live2DCubismFramework || (exports.Live2DCubismFramework = Live2DCubismFramework = {}));
//# sourceMappingURL=cubismmath.js.map

File diff suppressed because one or more lines are too long

View File

@ -1,147 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
/**
* 4x4
*
* 4x4便
*/
export declare class CubismMatrix44 {
/**
*
*/
constructor();
/**
*
*
* @param a a
* @param b b
* @return
*/
static multiply(a: Float32Array, b: Float32Array, dst: Float32Array): void;
/**
*
*/
loadIdentity(): void;
/**
*
*
* @param tr 164x4
*/
setMatrix(tr: Float32Array): void;
/**
*
*
* @return 164x4
*/
getArray(): Float32Array;
/**
* X
* @return X
*/
getScaleX(): number;
/**
* Y
*
* @return Y
*/
getScaleY(): number;
/**
* X
* @return X
*/
getTranslateX(): number;
/**
* Y
* @return Y
*/
getTranslateY(): number;
/**
* X
*
* @param src X
* @return X
*/
transformX(src: number): number;
/**
* Y
*
* @param src Y
* @return Y
*/
transformY(src: number): number;
/**
* X
*/
invertTransformX(src: number): number;
/**
* Y
*/
invertTransformY(src: number): number;
/**
*
*
*
*
* @param x X
* @param y Y
*/
translateRelative(x: number, y: number): void;
/**
*
*
*
*
* @param x X
* @param y y
*/
translate(x: number, y: number): void;
/**
* X
*
* @param x X
*/
translateX(x: number): void;
/**
* Y
*
* @param y Y
*/
translateY(y: number): void;
/**
*
*
* @param x X
* @param y Y
*/
scaleRelative(x: number, y: number): void;
/**
*
*
* @param x X
* @param y Y
*/
scale(x: number, y: number): void;
/**
*
* () * ()
*
* @note
* @param m
*/
multiplyByMatrix(m: CubismMatrix44): void;
/**
*
*/
clone(): CubismMatrix44;
protected _tr: Float32Array;
}
import * as $ from './cubismmatrix44';
export declare namespace Live2DCubismFramework {
const CubismMatrix44: typeof $.CubismMatrix44;
type CubismMatrix44 = $.CubismMatrix44;
}
//# sourceMappingURL=cubismmatrix44.d.ts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismmatrix44.d.ts","sourceRoot":"","sources":["../../src/math/cubismmatrix44.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;GAIG;AACH,qBAAa,cAAc;IACzB;;OAEG;;IAMH;;;;;;OAMG;WACW,QAAQ,CACpB,CAAC,EAAE,YAAY,EACf,CAAC,EAAE,YAAY,EACf,GAAG,EAAE,YAAY,GAChB,IAAI;IAqBP;;OAEG;IACI,YAAY,IAAI,IAAI;IAS3B;;;;OAIG;IACI,SAAS,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI;IAMxC;;;;OAIG;IACI,QAAQ,IAAI,YAAY;IAI/B;;;OAGG;IACI,SAAS,IAAI,MAAM;IAI1B;;;;OAIG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.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Live2DCubismFramework = exports.CubismMatrix44 = void 0;
/**
* 4x4の行列
*
* 4x4行列の便利クラス
*/
var CubismMatrix44 = /** @class */ (function () {
/**
* コンストラクタ
*/
function CubismMatrix44() {
this._tr = new Float32Array(16); // 4 * 4のサイズ
this.loadIdentity();
}
/**
* 受け取った2つの行列の乗算を行う
*
* @param a 行列a
* @param b 行列b
* @return 乗算結果の行列
*/
CubismMatrix44.multiply = function (a, b, dst) {
var c = new Float32Array([
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0
]);
var n = 4;
for (var i = 0; i < n; ++i) {
for (var j = 0; j < n; ++j) {
for (var k = 0; k < n; ++k) {
c[j + i * 4] += a[k + i * 4] * b[j + k * 4];
}
}
}
for (var i = 0; i < 16; ++i) {
dst[i] = c[i];
}
};
/**
* 単位行列に初期化する
*/
CubismMatrix44.prototype.loadIdentity = function () {
var c = new Float32Array([
1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0,
1.0
]);
this.setMatrix(c);
};
/**
* 行列を設定
*
* @param tr 16個の浮動小数点数で表される4x4の行列
*/
CubismMatrix44.prototype.setMatrix = function (tr) {
for (var i = 0; i < 16; ++i) {
this._tr[i] = tr[i];
}
};
/**
* 行列を浮動小数点数の配列で取得
*
* @return 16個の浮動小数点数で表される4x4の行列
*/
CubismMatrix44.prototype.getArray = function () {
return this._tr;
};
/**
* X軸の拡大率を取得
* @return X軸の拡大率
*/
CubismMatrix44.prototype.getScaleX = function () {
return this._tr[0];
};
/**
* Y軸の拡大率を取得する
*
* @return Y軸の拡大率
*/
CubismMatrix44.prototype.getScaleY = function () {
return this._tr[5];
};
/**
* X軸の移動量を取得
* @return X軸の移動量
*/
CubismMatrix44.prototype.getTranslateX = function () {
return this._tr[12];
};
/**
* Y軸の移動量を取得
* @return Y軸の移動量
*/
CubismMatrix44.prototype.getTranslateY = function () {
return this._tr[13];
};
/**
* X軸の値を現在の行列で計算
*
* @param src X軸の値
* @return 現在の行列で計算されたX軸の値
*/
CubismMatrix44.prototype.transformX = function (src) {
return this._tr[0] * src + this._tr[12];
};
/**
* Y軸の値を現在の行列で計算
*
* @param src Y軸の値
* @return 現在の行列で計算されたY軸の値
*/
CubismMatrix44.prototype.transformY = function (src) {
return this._tr[5] * src + this._tr[13];
};
/**
* X軸の値を現在の行列で逆計算
*/
CubismMatrix44.prototype.invertTransformX = function (src) {
return (src - this._tr[12]) / this._tr[0];
};
/**
* Y軸の値を現在の行列で逆計算
*/
CubismMatrix44.prototype.invertTransformY = function (src) {
return (src - this._tr[13]) / this._tr[5];
};
/**
* 現在の行列の位置を起点にして移動
*
* 現在の行列の位置を起点にして相対的に移動する
*
* @param x X軸の移動量
* @param y Y軸の移動量
*/
CubismMatrix44.prototype.translateRelative = function (x, y) {
var tr1 = new Float32Array([
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
x,
y,
0.0,
1.0
]);
CubismMatrix44.multiply(tr1, this._tr, this._tr);
};
/**
* 現在の行列の位置を移動
*
* 現在の行列の位置を指定した位置へ移動する
*
* @param x X軸の移動量
* @param y y軸の移動量
*/
CubismMatrix44.prototype.translate = function (x, y) {
this._tr[12] = x;
this._tr[13] = y;
};
/**
* 現在の行列のX軸の位置を指定した位置へ移動する
*
* @param x X軸の移動量
*/
CubismMatrix44.prototype.translateX = function (x) {
this._tr[12] = x;
};
/**
* 現在の行列のY軸の位置を指定した位置へ移動する
*
* @param y Y軸の移動量
*/
CubismMatrix44.prototype.translateY = function (y) {
this._tr[13] = y;
};
/**
* 現在の行列の拡大率を相対的に設定する
*
* @param x X軸の拡大率
* @param y Y軸の拡大率
*/
CubismMatrix44.prototype.scaleRelative = function (x, y) {
var tr1 = new Float32Array([
x,
0.0,
0.0,
0.0,
0.0,
y,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0
]);
CubismMatrix44.multiply(tr1, this._tr, this._tr);
};
/**
* 現在の行列の拡大率を指定した倍率に設定する
*
* @param x X軸の拡大率
* @param y Y軸の拡大率
*/
CubismMatrix44.prototype.scale = function (x, y) {
this._tr[0] = x;
this._tr[5] = y;
};
/**
* 引数で与えられた行列にこの行列を乗算する
* (引数で与えられた行列) * (この行列)
*
* @note 関数名と実際の計算内容に乖離があるため今後計算順が修正される可能性があります
* @param m 行列
*/
CubismMatrix44.prototype.multiplyByMatrix = function (m) {
CubismMatrix44.multiply(m.getArray(), this._tr, this._tr);
};
/**
* オブジェクトのコピーを生成する
*/
CubismMatrix44.prototype.clone = function () {
var cloneMatrix = new CubismMatrix44();
for (var i = 0; i < this._tr.length; i++) {
cloneMatrix._tr[i] = this._tr[i];
}
return cloneMatrix;
};
return CubismMatrix44;
}());
exports.CubismMatrix44 = CubismMatrix44;
// Namespace definition for compatibility.
var $ = __importStar(require("./cubismmatrix44"));
// eslint-disable-next-line @typescript-eslint/no-namespace
var Live2DCubismFramework;
(function (Live2DCubismFramework) {
Live2DCubismFramework.CubismMatrix44 = $.CubismMatrix44;
})(Live2DCubismFramework || (exports.Live2DCubismFramework = Live2DCubismFramework = {}));
//# sourceMappingURL=cubismmatrix44.js.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismmatrix44.js","sourceRoot":"","sources":["../../src/math/cubismmatrix44.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH;;;;GAIG;AACH;IACE;;OAEG;IACH;QACE,IAAI,CAAC,GAAG,GAAG,IAAI,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY;QAC7C,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAED;;;;;;OAMG;IACW,uBAAQ,GAAtB,UACE,CAAe,EACf,CAAe,EACf,GAAiB;QAEjB,IAAM,CAAC,GAAiB,IAAI,YAAY,CAAC;YACvC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;YACzE,GAAG;SACJ,CAAC,CAAC;QAEH,IAAM,CAAC,GAAG,CAAC,CAAC;QAEZ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE;YAC1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE;gBAC1B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE;oBAC1B,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,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AAc,EAAE,CAAC;QAEzD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACxC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SAClC;QAED,OAAO,WAAW,CAAC;IACrB,CAAC;IAGH,qBAAC;AAAD,CAAC,AA3QD,IA2QC;AA3QY,wCAAc;AA6Q3B,0CAA0C;AAC1C,kDAAsC;AACtC,2DAA2D;AAC3D,IAAiB,qBAAqB,CAGrC;AAHD,WAAiB,qBAAqB;IACvB,oCAAc,GAAG,CAAC,CAAC,cAAc,CAAC;AAEjD,CAAC,EAHgB,qBAAqB,qCAArB,qBAAqB,QAGrC"}

View File

@ -1,111 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
import { csmMap } from '../type/csmmap';
import { CubismMatrix44 } from './cubismmatrix44';
/**
* 4x4
*
* 4x4
*/
export declare class CubismModelMatrix extends CubismMatrix44 {
/**
*
*
* @param w
* @param h
*/
constructor(w?: number, h?: number);
/**
*
*
* @param w
*/
setWidth(w: number): void;
/**
*
* @param h
*/
setHeight(h: number): void;
/**
*
*
* @param x X
* @param y Y
*/
setPosition(x: number, y: number): void;
/**
*
*
* @param x X
* @param y Y
*
* @note widthheight
*/
setCenterPosition(x: number, y: number): void;
/**
*
*
* @param y Y
*/
top(y: number): void;
/**
*
*
* @param y Y
*/
bottom(y: number): void;
/**
*
*
* @param x X
*/
left(x: number): void;
/**
*
*
* @param x X
*/
right(x: number): void;
/**
* X
*
* @param x X
*/
centerX(x: number): void;
/**
* X
*
* @param x X
*/
setX(x: number): void;
/**
* Y
*
* @param y Y
*/
centerY(y: number): void;
/**
* Y
*
* @param y Y
*/
setY(y: number): void;
/**
*
*
* @param layout
*/
setupFromLayout(layout: csmMap<string, number>): void;
private _width;
private _height;
}
import * as $ from './cubismmodelmatrix';
export declare namespace Live2DCubismFramework {
const CubismModelMatrix: typeof $.CubismModelMatrix;
type CubismModelMatrix = $.CubismModelMatrix;
}
//# sourceMappingURL=cubismmodelmatrix.d.ts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismmodelmatrix.d.ts","sourceRoot":"","sources":["../../src/math/cubismmodelmatrix.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAY,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,cAAc;IACnD;;;;;OAKG;gBACS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM;IASlC;;;;OAIG;IACI,QAAQ,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAMhC;;;OAGG;IACI,SAAS,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAMjC;;;;;OAKG;IACI,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IAI9C;;;;;;;OAOG;IACI,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;IAK7C;;;;OAIG;IACI,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAI3B;;;;OAIG;IACI,MAAM,CAAC,CAAC,EAAE,MAAM;IAMvB;;;;OAIG;IACI,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAI5B;;;;OAIG;IACI,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAM7B;;;;OAIG;IACI,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAM/B;;;;OAIG;IACI,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAI5B;;;;OAIG;IACI,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAM/B;;;;OAIG;IACI,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI;IAI5B;;;;OAIG;IACI,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;IAuD5D,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAS;CACzB;AAGD,OAAO,KAAK,CAAC,MAAM,qBAAqB,CAAC;AAEzC,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,iBAAiB,4BAAsB,CAAC;IACrD,KAAY,iBAAiB,GAAG,CAAC,CAAC,iBAAiB,CAAC;CACrD"}

View File

@ -1,242 +0,0 @@
"use strict";
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Live2DCubismFramework = exports.CubismModelMatrix = void 0;
var cubismmatrix44_1 = require("./cubismmatrix44");
/**
* モデル座標設定用の4x4行列
*
* モデル座標設定用の4x4行列クラス
*/
var CubismModelMatrix = /** @class */ (function (_super) {
__extends(CubismModelMatrix, _super);
/**
* コンストラクタ
*
* @param w 横幅
* @param h 縦幅
*/
function CubismModelMatrix(w, h) {
var _this = _super.call(this) || this;
_this._width = w !== undefined ? w : 0.0;
_this._height = h !== undefined ? h : 0.0;
_this.setHeight(2.0);
return _this;
}
/**
* 横幅を設定
*
* @param w 横幅
*/
CubismModelMatrix.prototype.setWidth = function (w) {
var scaleX = w / this._width;
var scaleY = scaleX;
this.scale(scaleX, scaleY);
};
/**
* 縦幅を設定
* @param h 縦幅
*/
CubismModelMatrix.prototype.setHeight = function (h) {
var scaleX = h / this._height;
var scaleY = scaleX;
this.scale(scaleX, scaleY);
};
/**
* 位置を設定
*
* @param x X軸の位置
* @param y Y軸の位置
*/
CubismModelMatrix.prototype.setPosition = function (x, y) {
this.translate(x, y);
};
/**
* 中心位置を設定
*
* @param x X軸の中心位置
* @param y Y軸の中心位置
*
* @note widthかheightを設定したあとでないと拡大率が正しく取得できないためずれる
*/
CubismModelMatrix.prototype.setCenterPosition = function (x, y) {
this.centerX(x);
this.centerY(y);
};
/**
* 上辺の位置を設定する
*
* @param y 上辺のY軸位置
*/
CubismModelMatrix.prototype.top = function (y) {
this.setY(y);
};
/**
* 下辺の位置を設定する
*
* @param y 下辺のY軸位置
*/
CubismModelMatrix.prototype.bottom = function (y) {
var h = this._height * this.getScaleY();
this.translateY(y - h);
};
/**
* 左辺の位置を設定
*
* @param x 左辺のX軸位置
*/
CubismModelMatrix.prototype.left = function (x) {
this.setX(x);
};
/**
* 右辺の位置を設定
*
* @param x 右辺のX軸位置
*/
CubismModelMatrix.prototype.right = function (x) {
var w = this._width * this.getScaleX();
this.translateX(x - w);
};
/**
* X軸の中心位置を設定
*
* @param x X軸の中心位置
*/
CubismModelMatrix.prototype.centerX = function (x) {
var w = this._width * this.getScaleX();
this.translateX(x - w / 2.0);
};
/**
* X軸の位置を設定
*
* @param x X軸の位置
*/
CubismModelMatrix.prototype.setX = function (x) {
this.translateX(x);
};
/**
* Y軸の中心位置を設定
*
* @param y Y軸の中心位置
*/
CubismModelMatrix.prototype.centerY = function (y) {
var h = this._height * this.getScaleY();
this.translateY(y - h / 2.0);
};
/**
* Y軸の位置を設定する
*
* @param y Y軸の位置
*/
CubismModelMatrix.prototype.setY = function (y) {
this.translateY(y);
};
/**
* レイアウト情報から位置を設定
*
* @param layout レイアウト情報
*/
CubismModelMatrix.prototype.setupFromLayout = function (layout) {
var keyWidth = 'width';
var keyHeight = 'height';
var keyX = 'x';
var keyY = 'y';
var keyCenterX = 'center_x';
var keyCenterY = 'center_y';
var keyTop = 'top';
var keyBottom = 'bottom';
var keyLeft = 'left';
var keyRight = 'right';
for (var ite = layout.begin(); ite.notEqual(layout.end()); ite.preIncrement()) {
var key = ite.ptr().first;
var value = ite.ptr().second;
if (key == keyWidth) {
this.setWidth(value);
}
else if (key == keyHeight) {
this.setHeight(value);
}
}
for (var ite = layout.begin(); ite.notEqual(layout.end()); ite.preIncrement()) {
var key = ite.ptr().first;
var value = ite.ptr().second;
if (key == keyX) {
this.setX(value);
}
else if (key == keyY) {
this.setY(value);
}
else if (key == keyCenterX) {
this.centerX(value);
}
else if (key == keyCenterY) {
this.centerY(value);
}
else if (key == keyTop) {
this.top(value);
}
else if (key == keyBottom) {
this.bottom(value);
}
else if (key == keyLeft) {
this.left(value);
}
else if (key == keyRight) {
this.right(value);
}
}
};
return CubismModelMatrix;
}(cubismmatrix44_1.CubismMatrix44));
exports.CubismModelMatrix = CubismModelMatrix;
// Namespace definition for compatibility.
var $ = __importStar(require("./cubismmodelmatrix"));
// eslint-disable-next-line @typescript-eslint/no-namespace
var Live2DCubismFramework;
(function (Live2DCubismFramework) {
Live2DCubismFramework.CubismModelMatrix = $.CubismModelMatrix;
})(Live2DCubismFramework || (exports.Live2DCubismFramework = Live2DCubismFramework = {}));
//# sourceMappingURL=cubismmodelmatrix.js.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismmodelmatrix.js","sourceRoot":"","sources":["../../src/math/cubismmodelmatrix.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGH,mDAAkD;AAElD;;;;GAIG;AACH;IAAuC,qCAAc;IACnD;;;;;OAKG;IACH,2BAAY,CAAU,EAAE,CAAU;QAAlC,YACE,iBAAO,SAMR;QAJC,KAAI,CAAC,MAAM,GAAG,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QACxC,KAAI,CAAC,OAAO,GAAG,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAEzC,KAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;;IACtB,CAAC;IAED;;;;OAIG;IACI,oCAAQ,GAAf,UAAgB,CAAS;QACvB,IAAM,MAAM,GAAW,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;QACvC,IAAM,MAAM,GAAW,MAAM,CAAC;QAC9B,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACI,qCAAS,GAAhB,UAAiB,CAAS;QACxB,IAAM,MAAM,GAAW,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC;QACxC,IAAM,MAAM,GAAW,MAAM,CAAC;QAC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D,WAAiB,qBAAqB;IACvB,uCAAiB,GAAG,CAAC,CAAC,iBAAiB,CAAC;AAEvD,CAAC,EAHgB,qBAAqB,qCAArB,qBAAqB,QAGrC"}

View File

@ -1,54 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
/**
*
*
*
*/
export declare class CubismTargetPoint {
/**
*
*/
constructor();
/**
*
*/
update(deltaTimeSeconds: number): void;
/**
* X
*
* @return X-1.0 ~ 1.0
*/
getX(): number;
/**
* Y
*
* @return Y-1.0 ~ 1.0
*/
getY(): number;
/**
*
*
* @param x X-1.0 ~ 1.0
* @param y Y-1.0 ~ 1.0
*/
set(x: number, y: number): void;
private _faceTargetX;
private _faceTargetY;
private _faceX;
private _faceY;
private _faceVX;
private _faceVY;
private _lastTimeSeconds;
private _userTimeSeconds;
}
import * as $ from './cubismtargetpoint';
export declare namespace Live2DCubismFramework {
const CubismTargetPoint: typeof $.CubismTargetPoint;
type CubismTargetPoint = $.CubismTargetPoint;
}
//# sourceMappingURL=cubismtargetpoint.d.ts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismtargetpoint.d.ts","sourceRoot":"","sources":["../../src/math/cubismtargetpoint.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH;;;;GAIG;AACH,qBAAa,iBAAiB;IAC5B;;OAEG;;IAYH;;OAEG;IACI,MAAM,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI;IAwF7C;;;;OAIG;IACI,IAAI,IAAI,MAAM;IAIrB;;;;OAIG;IACI,IAAI,IAAI,MAAM;IAIrB;;;;;OAKG;IACI,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IAKtC,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,gBAAgB,CAAS;IACjC,OAAO,CAAC,gBAAgB,CAAS;CAClC;AAGD,OAAO,KAAK,CAAC,MAAM,qBAAqB,CAAC;AAEzC,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,iBAAiB,4BAAsB,CAAC;IACrD,KAAY,iBAAiB,GAAG,CAAC,CAAC,iBAAiB,CAAC;CACrD"}

View File

@ -1,161 +0,0 @@
"use strict";
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Live2DCubismFramework = exports.CubismTargetPoint = void 0;
var cubismmath_1 = require("./cubismmath");
var FrameRate = 30;
var Epsilon = 0.01;
/**
* 顔の向きの制御機能
*
* 顔の向きの制御機能を提供するクラス
*/
var CubismTargetPoint = /** @class */ (function () {
/**
* コンストラクタ
*/
function CubismTargetPoint() {
this._faceTargetX = 0.0;
this._faceTargetY = 0.0;
this._faceX = 0.0;
this._faceY = 0.0;
this._faceVX = 0.0;
this._faceVY = 0.0;
this._lastTimeSeconds = 0.0;
this._userTimeSeconds = 0.0;
}
/**
* 更新処理
*/
CubismTargetPoint.prototype.update = function (deltaTimeSeconds) {
// デルタ時間を加算する
this._userTimeSeconds += deltaTimeSeconds;
// 首を中央から左右に振るときの平均的な速さは 秒速度。加速・減速を考慮して、その2倍を最高速度とする
// 顔の振り具合を、中央0.0)から、左右は(+-1.0)とする
var faceParamMaxV = 40.0 / 10.0; // 7.5秒間に40分移動(5.3/sc)
var maxV = (faceParamMaxV * 1.0) / FrameRate; // 1frameあたりに変化できる速度の上限
if (this._lastTimeSeconds == 0.0) {
this._lastTimeSeconds = this._userTimeSeconds;
return;
}
var deltaTimeWeight = (this._userTimeSeconds - this._lastTimeSeconds) * FrameRate;
this._lastTimeSeconds = this._userTimeSeconds;
// 最高速度になるまでの時間を
var timeToMaxSpeed = 0.15;
var frameToMaxSpeed = timeToMaxSpeed * FrameRate; // sec * frame/sec
var maxA = (deltaTimeWeight * maxV) / frameToMaxSpeed; // 1frameあたりの加速度
// 目指す向きは、dx, dy方向のベクトルとなる
var dx = this._faceTargetX - this._faceX;
var dy = this._faceTargetY - this._faceY;
if (cubismmath_1.CubismMath.abs(dx) <= Epsilon && cubismmath_1.CubismMath.abs(dy) <= Epsilon) {
return; // 変化なし
}
// 速度の最大よりも大きい場合は、速度を落とす
var d = cubismmath_1.CubismMath.sqrt(dx * dx + dy * dy);
// 進行方向の最大速度ベクトル
var vx = (maxV * dx) / d;
var vy = (maxV * dy) / d;
// 現在の速度から、新規速度への変化(加速度)を求める
var ax = vx - this._faceVX;
var ay = vy - this._faceVY;
var a = cubismmath_1.CubismMath.sqrt(ax * ax + ay * ay);
// 加速のとき
if (a < -maxA || a > maxA) {
ax *= maxA / a;
ay *= maxA / a;
}
// 加速度を元の速度に足して、新速度とする
this._faceVX += ax;
this._faceVY += ay;
// 目的の方向に近づいたとき、滑らかに減速するための処理
// 設定された加速度で止まる事の出来る距離と速度の関係から
// 現在とりうる最高速度を計算し、それ以上の時は速度を落とす
// ※本来、人間は筋力で力(加速度)を調整できるため、より自由度が高いが、簡単な処理で済ませている
{
// 加速度、速度、距離の関係式。
// 2 6 2 3
// sqrt(a t + 16 a h t - 8 a h) - a t
// v = --------------------------------------
// 2
// 4 t - 2
// (t=1)
// 時刻tは、あらかじめ加速度、速度を1/60(フレームレート、単位なし)で
// 考えているので、tとして消してよい※未検証
var maxV_1 = 0.5 *
(cubismmath_1.CubismMath.sqrt(maxA * maxA + 16.0 * maxA * d - 8.0 * maxA * d) -
maxA);
var curV = cubismmath_1.CubismMath.sqrt(this._faceVX * this._faceVX + this._faceVY * this._faceVY);
if (curV > maxV_1) {
// 現在の速度 > 最高速度のとき、最高速度まで減速
this._faceVX *= maxV_1 / curV;
this._faceVY *= maxV_1 / curV;
}
}
this._faceX += this._faceVX;
this._faceY += this._faceVY;
};
/**
* X軸の顔の向きの値を取得
*
* @return X軸の顔の向きの値-1.0 ~ 1.0
*/
CubismTargetPoint.prototype.getX = function () {
return this._faceX;
};
/**
* Y軸の顔の向きの値を取得
*
* @return Y軸の顔の向きの値-1.0 ~ 1.0
*/
CubismTargetPoint.prototype.getY = function () {
return this._faceY;
};
/**
* 顔の向きの目標値を設定
*
* @param x X軸の顔の向きの値-1.0 ~ 1.0
* @param y Y軸の顔の向きの値-1.0 ~ 1.0
*/
CubismTargetPoint.prototype.set = function (x, y) {
this._faceTargetX = x;
this._faceTargetY = y;
};
return CubismTargetPoint;
}());
exports.CubismTargetPoint = CubismTargetPoint;
// Namespace definition for compatibility.
var $ = __importStar(require("./cubismtargetpoint"));
// eslint-disable-next-line @typescript-eslint/no-namespace
var Live2DCubismFramework;
(function (Live2DCubismFramework) {
Live2DCubismFramework.CubismTargetPoint = $.CubismTargetPoint;
})(Live2DCubismFramework || (exports.Live2DCubismFramework = Live2DCubismFramework = {}));
//# sourceMappingURL=cubismtargetpoint.js.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismtargetpoint.js","sourceRoot":"","sources":["../../src/math/cubismtargetpoint.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,2CAA0C;AAE1C,IAAM,SAAS,GAAG,EAAE,CAAC;AACrB,IAAM,OAAO,GAAG,IAAI,CAAC;AAErB;;;;GAIG;AACH;IACE;;OAEG;IACH;QACE,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC;QACxB,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC;QACxB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;QAClB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;QAClB,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC;QACnB,IAAI,CAAC,gBAAgB,GAAG,GAAG,CAAC;QAC5B,IAAI,CAAC,gBAAgB,GAAG,GAAG,CAAC;IAC9B,CAAC;IAED;;OAEG;IACI,kCAAM,GAAb,UAAc,gBAAwB;QACpC,aAAa;QACb,IAAI,CAAC,gBAAgB,IAAI,gBAAgB,CAAC;QAE1C,oDAAoD;QACpD,kCAAkC;QAClC,IAAM,aAAa,GAAW,IAAI,GAAG,IAAI,CAAC,CAAC,sBAAsB;QACjE,IAAM,IAAI,GAAW,CAAC,aAAa,GAAG,GAAG,CAAC,GAAG,SAAS,CAAC,CAAC,uBAAuB;QAE/E,IAAI,IAAI,CAAC,gBAAgB,IAAI,GAAG,EAAE;YAChC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC;YAC9C,OAAO;SACR;QAED,IAAM,eAAe,GACnB,CAAC,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC,GAAG,SAAS,CAAC;QAC9D,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAE9C,gBAAgB;QAChB,IAAM,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;AA/IY,8CAAiB;AAiJ9B,0CAA0C;AAC1C,qDAAyC;AACzC,2DAA2D;AAC3D,IAAiB,qBAAqB,CAGrC;AAHD,WAAiB,qBAAqB;IACvB,uCAAiB,GAAG,CAAC,CAAC,iBAAiB,CAAC;AAEvD,CAAC,EAHgB,qBAAqB,qCAArB,qBAAqB,QAGrC"}

View File

@ -1,111 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
/**
* 2
*
* 2
*/
export declare class CubismVector2 {
x?: number;
y?: number;
/**
*
*/
constructor(x?: number, y?: number);
/**
*
*
* @param vector2
* @return
*/
add(vector2: CubismVector2): CubismVector2;
/**
*
*
* @param vector2
* @return
*/
substract(vector2: CubismVector2): CubismVector2;
/**
*
*
* @param vector2
* @return
*/
multiply(vector2: CubismVector2): CubismVector2;
/**
* ()
*
* @param scalar
* @return
*/
multiplyByScaler(scalar: number): CubismVector2;
/**
*
*
* @param vector2
* @return
*/
division(vector2: CubismVector2): CubismVector2;
/**
* ()
*
* @param scalar
* @return
*/
divisionByScalar(scalar: number): CubismVector2;
/**
*
*
* @return
*/
getLength(): number;
/**
*
*
* @param a
* @return
*/
getDistanceWith(a: CubismVector2): number;
/**
*
*
* @param a
* @return
*/
dot(a: CubismVector2): number;
/**
*
*/
normalize(): void;
/**
*
*
*
*
* @param rhs
* @return true
* @return false
*/
isEqual(rhs: CubismVector2): boolean;
/**
*
*
*
*
* @param rhs
* @return true
* @return false
*/
isNotEqual(rhs: CubismVector2): boolean;
}
import * as $ from './cubismvector2';
export declare namespace Live2DCubismFramework {
const CubismVector2: typeof $.CubismVector2;
type CubismVector2 = $.CubismVector2;
}
//# sourceMappingURL=cubismvector2.d.ts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismvector2.d.ts","sourceRoot":"","sources":["../../src/math/cubismvector2.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;GAIG;AACH,qBAAa,aAAa;IAKf,CAAC,CAAC,EAAE,MAAM;IACV,CAAC,CAAC,EAAE,MAAM;IALnB;;OAEG;gBAEM,CAAC,CAAC,EAAE,MAAM,EACV,CAAC,CAAC,EAAE,MAAM;IAOnB;;;;;OAKG;IACI,GAAG,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa;IAOjD;;;;;OAKG;IACI,SAAS,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa;IAOvD;;;;;OAKG;IACI,QAAQ,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa;IAOtD;;;;;OAKG;IACI,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa;IAItD;;;;;OAKG;IACI,QAAQ,CAAC,OAAO,EAAE,aAAa,GAAG,aAAa;IAOtD;;;;;OAKG;IACI,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa;IAItD;;;;OAIG;IACI,SAAS,IAAI,MAAM;IAI1B;;;;;OAKG;IACI,eAAe,CAAC,CAAC,EAAE,aAAa,GAAG,MAAM;IAMhD;;;;;OAKG;IACI,GAAG,CAAC,CAAC,EAAE,aAAa,GAAG,MAAM;IAIpC;;OAEG;IACI,SAAS,IAAI,IAAI;IAOxB;;;;;;;;OAQG;IACI,OAAO,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO;IAI3C;;;;;;;;OAQG;IACI,UAAU,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO;CAG/C;AAGD,OAAO,KAAK,CAAC,MAAM,iBAAiB,CAAC;AAErC,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,aAAa,wBAAkB,CAAC;IAC7C,KAAY,aAAa,GAAG,CAAC,CAAC,aAAa,CAAC;CAC7C"}

View File

@ -1,182 +0,0 @@
"use strict";
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Live2DCubismFramework = exports.CubismVector2 = void 0;
/**
* 2次元ベクトル型
*
* 2次元ベクトル型の機能を提供する
*/
var CubismVector2 = /** @class */ (function () {
/**
* コンストラクタ
*/
function CubismVector2(x, y) {
this.x = x;
this.y = y;
this.x = x == undefined ? 0.0 : x;
this.y = y == undefined ? 0.0 : y;
}
/**
* ベクトルの加算
*
* @param vector2 加算するベクトル値
* @return 加算結果 ベクトル値
*/
CubismVector2.prototype.add = function (vector2) {
var ret = new CubismVector2(0.0, 0.0);
ret.x = this.x + vector2.x;
ret.y = this.y + vector2.y;
return ret;
};
/**
* ベクトルの減算
*
* @param vector2 減算するベクトル値
* @return 減算結果 ベクトル値
*/
CubismVector2.prototype.substract = function (vector2) {
var ret = new CubismVector2(0.0, 0.0);
ret.x = this.x - vector2.x;
ret.y = this.y - vector2.y;
return ret;
};
/**
* ベクトルの乗算
*
* @param vector2 乗算するベクトル値
* @return 乗算結果 ベクトル値
*/
CubismVector2.prototype.multiply = function (vector2) {
var ret = new CubismVector2(0.0, 0.0);
ret.x = this.x * vector2.x;
ret.y = this.y * vector2.y;
return ret;
};
/**
* ベクトルの乗算(スカラー)
*
* @param scalar 乗算するスカラー値
* @return 乗算結果 ベクトル値
*/
CubismVector2.prototype.multiplyByScaler = function (scalar) {
return this.multiply(new CubismVector2(scalar, scalar));
};
/**
* ベクトルの除算
*
* @param vector2 除算するベクトル値
* @return 除算結果 ベクトル値
*/
CubismVector2.prototype.division = function (vector2) {
var ret = new CubismVector2(0.0, 0.0);
ret.x = this.x / vector2.x;
ret.y = this.y / vector2.y;
return ret;
};
/**
* ベクトルの除算(スカラー)
*
* @param scalar 除算するスカラー値
* @return 除算結果 ベクトル値
*/
CubismVector2.prototype.divisionByScalar = function (scalar) {
return this.division(new CubismVector2(scalar, scalar));
};
/**
* ベクトルの長さを取得する
*
* @return ベクトルの長さ
*/
CubismVector2.prototype.getLength = function () {
return Math.sqrt(this.x * this.x + this.y * this.y);
};
/**
* ベクトルの距離の取得
*
* @param a
* @return ベクトルの距離
*/
CubismVector2.prototype.getDistanceWith = function (a) {
return Math.sqrt((this.x - a.x) * (this.x - a.x) + (this.y - a.y) * (this.y - a.y));
};
/**
* ドット積の計算
*
* @param a
* @return 結果
*/
CubismVector2.prototype.dot = function (a) {
return this.x * a.x + this.y * a.y;
};
/**
* 正規化の適用
*/
CubismVector2.prototype.normalize = function () {
var length = Math.pow(this.x * this.x + this.y * this.y, 0.5);
this.x = this.x / length;
this.y = this.y / length;
};
/**
* 等しさの確認等しいか
*
* 値が等しいか
*
* @param rhs 確認する値
* @return true 値は等しい
* @return false 値は等しくない
*/
CubismVector2.prototype.isEqual = function (rhs) {
return this.x == rhs.x && this.y == rhs.y;
};
/**
* 等しさの確認等しくないか
*
* 値が等しくないか
*
* @param rhs 確認する値
* @return true 値は等しくない
* @return false 値は等しい
*/
CubismVector2.prototype.isNotEqual = function (rhs) {
return !this.isEqual(rhs);
};
return CubismVector2;
}());
exports.CubismVector2 = CubismVector2;
// Namespace definition for compatibility.
var $ = __importStar(require("./cubismvector2"));
// eslint-disable-next-line @typescript-eslint/no-namespace
var Live2DCubismFramework;
(function (Live2DCubismFramework) {
Live2DCubismFramework.CubismVector2 = $.CubismVector2;
})(Live2DCubismFramework || (exports.Live2DCubismFramework = Live2DCubismFramework = {}));
//# sourceMappingURL=cubismvector2.js.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismvector2.js","sourceRoot":"","sources":["../../src/math/cubismvector2.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH;;;;GAIG;AACH;IACE;;OAEG;IACH,uBACS,CAAU,EACV,CAAU;QADV,MAAC,GAAD,CAAC,CAAS;QACV,MAAC,GAAD,CAAC,CAAS;QAEjB,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAElC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACpC,CAAC;IAED;;;;;OAKG;IACI,2BAAG,GAAV,UAAW,OAAsB;QAC/B,IAAM,GAAG,GAAkB,IAAI,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACvD,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;QAC3B,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;QAC3B,OAAO,GAAG,CAAC;IACb,CAAC;IAED;;;;;OAKG;IACI,iCAAS,GAAhB,UAAiB,OAAsB;QACrC,IAAM,GAAG,GAAkB,IAAI,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;QACvD,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;QAC3B,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;QAC3B,OA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GAAG,CAAC,CAAC,aAAa,CAAC;AAE/C,CAAC,EAHgB,qBAAqB,qCAArB,qBAAqB,QAGrC"}

View File

@ -1,140 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
import { CubismMatrix44 } from './cubismmatrix44';
/**
* 使便4x4
*
* 使便4x4
*/
export declare class CubismViewMatrix extends CubismMatrix44 {
/**
*
*/
constructor();
/**
* 調
*
* @param x X
* @param y Y
*/
adjustTranslate(x: number, y: number): void;
/**
* 調
*
* @param cx X
* @param cy Y
* @param scale
*/
adjustScale(cx: number, cy: number, scale: number): void;
/**
*
*
* @param left X
* @param right X
* @param bottom Y
* @param top Y
*/
setScreenRect(left: number, right: number, bottom: number, top: number): void;
/**
*
* @param left X
* @param right X
* @param bottom Y
* @param top Y
*/
setMaxScreenRect(left: number, right: number, bottom: number, top: number): void;
/**
*
* @param maxScale
*/
setMaxScale(maxScale: number): void;
/**
*
* @param minScale
*/
setMinScale(minScale: number): void;
/**
*
* @return
*/
getMaxScale(): number;
/**
*
* @return
*/
getMinScale(): number;
/**
*
*
* @return true
* @return false
*/
isMaxScale(): boolean;
/**
*
*
* @return true
* @return false
*/
isMinScale(): boolean;
/**
*
* @return X
*/
getScreenLeft(): number;
/**
*
* @return X
*/
getScreenRight(): number;
/**
* Y
* @return Y
*/
getScreenBottom(): number;
/**
* Y
* @return Y
*/
getScreenTop(): number;
/**
* X
* @return X
*/
getMaxLeft(): number;
/**
* X
* @return X
*/
getMaxRight(): number;
/**
* Y
* @return Y
*/
getMaxBottom(): number;
/**
* Y
* @return Y
*/
getMaxTop(): number;
private _screenLeft;
private _screenRight;
private _screenTop;
private _screenBottom;
private _maxLeft;
private _maxRight;
private _maxTop;
private _maxBottom;
private _maxScale;
private _minScale;
}
import * as $ from './cubismviewmatrix';
export declare namespace Live2DCubismFramework {
const CubismViewMatrix: typeof $.CubismViewMatrix;
type CubismViewMatrix = $.CubismViewMatrix;
}
//# sourceMappingURL=cubismviewmatrix.d.ts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismviewmatrix.d.ts","sourceRoot":"","sources":["../../src/math/cubismviewmatrix.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,cAAc;IAClD;;OAEG;;IAeH;;;;;OAKG;IACI,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI;IA0ClD;;;;;;OAMG;IACI,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IA8E/D;;;;;;;OAOG;IACI,aAAa,CAClB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,GACV,IAAI;IAOP;;;;;;OAMG;IACI,gBAAgB,CACrB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,GACV,IAAI;IAOP;;;OAGG;IACI,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAI1C;;;OAGG;IACI,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAI1C;;;OAGG;IACI,WAAW,IAAI,MAAM;IAI5B;;;OAGG;IACI,WAAW,IAAI,MAAM;IAI5B;;;;;OAKG;IACI,UAAU,IAAI,OAAO;IAI5B;;;;;OAKG;IACI,UAAU,IAAI,OAAO;IAI5B;;;OAGG;IACI,aAAa,IAAI,MAAM;IAI9B;;;OAGG;IACI,cAAc,IAAI,MAAM;IAI/B;;;OAGG;IACI,eAAe,IAAI,MAAM;IAIhC;;;OAGG;IACI,YAAY,IAAI,MAAM;IAI7B;;;OAGG;IACI,UAAU,IAAI,MAAM;IAI3B;;;OAGG;IACI,WAAW,IAAI,MAAM;IAI5B;;;OAGG;IACI,YAAY,IAAI,MAAM;IAI7B;;;OAGG;IACI,SAAS,IAAI,MAAM;IAI1B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,SAAS,CAAS;CAC3B;AAGD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AAExC,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,gBAAgB,2BAAqB,CAAC;IACnD,KAAY,gBAAgB,GAAG,CAAC,CAAC,gBAAgB,CAAC;CACnD"}

View File

@ -1,331 +0,0 @@
"use strict";
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Live2DCubismFramework = exports.CubismViewMatrix = void 0;
var cubismmatrix44_1 = require("./cubismmatrix44");
/**
* カメラの位置変更に使うと便利な4x4行列
*
* カメラの位置変更に使うと便利な4x4行列のクラス
*/
var CubismViewMatrix = /** @class */ (function (_super) {
__extends(CubismViewMatrix, _super);
/**
* コンストラクタ
*/
function CubismViewMatrix() {
var _this = _super.call(this) || this;
_this._screenLeft = 0.0;
_this._screenRight = 0.0;
_this._screenTop = 0.0;
_this._screenBottom = 0.0;
_this._maxLeft = 0.0;
_this._maxRight = 0.0;
_this._maxTop = 0.0;
_this._maxBottom = 0.0;
_this._maxScale = 0.0;
_this._minScale = 0.0;
return _this;
}
/**
* 移動を調整
*
* @param x X軸の移動量
* @param y Y軸の移動量
*/
CubismViewMatrix.prototype.adjustTranslate = function (x, y) {
if (this._tr[0] * this._maxLeft + (this._tr[12] + x) > this._screenLeft) {
x = this._screenLeft - this._tr[0] * this._maxLeft - this._tr[12];
}
if (this._tr[0] * this._maxRight + (this._tr[12] + x) < this._screenRight) {
x = this._screenRight - this._tr[0] * this._maxRight - this._tr[12];
}
if (this._tr[5] * this._maxTop + (this._tr[13] + y) < this._screenTop) {
y = this._screenTop - this._tr[5] * this._maxTop - this._tr[13];
}
if (this._tr[5] * this._maxBottom + (this._tr[13] + y) >
this._screenBottom) {
y = this._screenBottom - this._tr[5] * this._maxBottom - this._tr[13];
}
var tr1 = new Float32Array([
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
x,
y,
0.0,
1.0
]);
cubismmatrix44_1.CubismMatrix44.multiply(tr1, this._tr, this._tr);
};
/**
* 拡大率を調整
*
* @param cx 拡大を行うX軸の中心位置
* @param cy 拡大を行うY軸の中心位置
* @param scale 拡大率
*/
CubismViewMatrix.prototype.adjustScale = function (cx, cy, scale) {
var maxScale = this.getMaxScale();
var minScale = this.getMinScale();
var targetScale = scale * this._tr[0];
if (targetScale < minScale) {
if (this._tr[0] > 0.0) {
scale = minScale / this._tr[0];
}
}
else if (targetScale > maxScale) {
if (this._tr[0] > 0.0) {
scale = maxScale / this._tr[0];
}
}
var tr1 = new Float32Array([
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
cx,
cy,
0.0,
1.0
]);
var tr2 = new Float32Array([
scale,
0.0,
0.0,
0.0,
0.0,
scale,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0
]);
var tr3 = new Float32Array([
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
0.0,
0.0,
0.0,
1.0,
0.0,
-cx,
-cy,
0.0,
1.0
]);
cubismmatrix44_1.CubismMatrix44.multiply(tr3, this._tr, this._tr);
cubismmatrix44_1.CubismMatrix44.multiply(tr2, this._tr, this._tr);
cubismmatrix44_1.CubismMatrix44.multiply(tr1, this._tr, this._tr);
};
/**
* デバイスに対応する論理座養生の範囲の設定
*
* @param left 左辺のX軸の位置
* @param right 右辺のX軸の位置
* @param bottom 下辺のY軸の位置
* @param top 上辺のY軸の位置
*/
CubismViewMatrix.prototype.setScreenRect = function (left, right, bottom, top) {
this._screenLeft = left;
this._screenRight = right;
this._screenBottom = bottom;
this._screenTop = top;
};
/**
* デバイスに対応する論理座標上の移動可能範囲の設定
* @param left 左辺のX軸の位置
* @param right 右辺のX軸の位置
* @param bottom 下辺のY軸の位置
* @param top 上辺のY軸の位置
*/
CubismViewMatrix.prototype.setMaxScreenRect = function (left, right, bottom, top) {
this._maxLeft = left;
this._maxRight = right;
this._maxTop = top;
this._maxBottom = bottom;
};
/**
* 最大拡大率の設定
* @param maxScale 最大拡大率
*/
CubismViewMatrix.prototype.setMaxScale = function (maxScale) {
this._maxScale = maxScale;
};
/**
* 最小拡大率の設定
* @param minScale 最小拡大率
*/
CubismViewMatrix.prototype.setMinScale = function (minScale) {
this._minScale = minScale;
};
/**
* 最大拡大率の取得
* @return 最大拡大率
*/
CubismViewMatrix.prototype.getMaxScale = function () {
return this._maxScale;
};
/**
* 最小拡大率の取得
* @return 最小拡大率
*/
CubismViewMatrix.prototype.getMinScale = function () {
return this._minScale;
};
/**
* 拡大率が最大になっているかを確認する
*
* @return true 拡大率は最大
* @return false 拡大率は最大ではない
*/
CubismViewMatrix.prototype.isMaxScale = function () {
return this.getScaleX() >= this._maxScale;
};
/**
* 拡大率が最小になっているかを確認する
*
* @return true 拡大率は最小
* @return false 拡大率は最小ではない
*/
CubismViewMatrix.prototype.isMinScale = function () {
return this.getScaleX() <= this._minScale;
};
/**
* デバイスに対応する論理座標の左辺のX軸位置を取得する
* @return デバイスに対応する論理座標の左辺のX軸位置
*/
CubismViewMatrix.prototype.getScreenLeft = function () {
return this._screenLeft;
};
/**
* デバイスに対応する論理座標の右辺のX軸位置を取得する
* @return デバイスに対応する論理座標の右辺のX軸位置
*/
CubismViewMatrix.prototype.getScreenRight = function () {
return this._screenRight;
};
/**
* デバイスに対応する論理座標の下辺のY軸位置を取得する
* @return デバイスに対応する論理座標の下辺のY軸位置
*/
CubismViewMatrix.prototype.getScreenBottom = function () {
return this._screenBottom;
};
/**
* デバイスに対応する論理座標の上辺のY軸位置を取得する
* @return デバイスに対応する論理座標の上辺のY軸位置
*/
CubismViewMatrix.prototype.getScreenTop = function () {
return this._screenTop;
};
/**
* 左辺のX軸位置の最大値の取得
* @return 左辺のX軸位置の最大値
*/
CubismViewMatrix.prototype.getMaxLeft = function () {
return this._maxLeft;
};
/**
* 右辺のX軸位置の最大値の取得
* @return 右辺のX軸位置の最大値
*/
CubismViewMatrix.prototype.getMaxRight = function () {
return this._maxRight;
};
/**
* 下辺のY軸位置の最大値の取得
* @return 下辺のY軸位置の最大値
*/
CubismViewMatrix.prototype.getMaxBottom = function () {
return this._maxBottom;
};
/**
* 上辺のY軸位置の最大値の取得
* @return 上辺のY軸位置の最大値
*/
CubismViewMatrix.prototype.getMaxTop = function () {
return this._maxTop;
};
return CubismViewMatrix;
}(cubismmatrix44_1.CubismMatrix44));
exports.CubismViewMatrix = CubismViewMatrix;
// Namespace definition for compatibility.
var $ = __importStar(require("./cubismviewmatrix"));
// eslint-disable-next-line @typescript-eslint/no-namespace
var Live2DCubismFramework;
(function (Live2DCubismFramework) {
Live2DCubismFramework.CubismViewMatrix = $.CubismViewMatrix;
})(Live2DCubismFramework || (exports.Live2DCubismFramework = Live2DCubismFramework = {}));
//# sourceMappingURL=cubismviewmatrix.js.map

File diff suppressed because one or more lines are too long

View File

@ -1,63 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
import { CubismModel } from './cubismmodel';
/**
* Moc
*
* Moc
*/
export declare class CubismMoc {
/**
* Moc
*/
static create(mocBytes: ArrayBuffer, shouldCheckMocConsistency: boolean): CubismMoc;
/**
* Moc
*
* Moc
*/
static delete(moc: CubismMoc): void;
/**
*
*
* @return Moc
*/
createModel(): CubismModel;
/**
*
*/
deleteModel(model: CubismModel): void;
/**
*
*/
private constructor();
/**
*
*/
release(): void;
/**
* .moc3 Version
*/
getLatestMocVersion(): number;
/**
* .moc3 Version
*/
getMocVersion(): number;
/**
* .moc3
*/
static hasMocConsistency(mocBytes: ArrayBuffer): boolean;
_moc: Live2DCubismCore.Moc;
_modelCount: number;
_mocVersion: number;
}
import * as $ from './cubismmoc';
export declare namespace Live2DCubismFramework {
const CubismMoc: typeof $.CubismMoc;
type CubismMoc = $.CubismMoc;
}
//# sourceMappingURL=cubismmoc.d.ts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismmoc.d.ts","sourceRoot":"","sources":["../../src/model/cubismmoc.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;GAIG;AACH,qBAAa,SAAS;IACpB;;OAEG;WACW,MAAM,CAClB,QAAQ,EAAE,WAAW,EACrB,yBAAyB,EAAE,OAAO,GACjC,SAAS;IA4BZ;;;;OAIG;WACW,MAAM,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI;IAM1C;;;;OAIG;IACH,WAAW,IAAI,WAAW;IAiB1B;;OAEG;IACH,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAQrC;;OAEG;IACH,OAAO;IAMP;;OAEG;IACI,OAAO,IAAI,IAAI;IAOtB;;OAEG;IACI,mBAAmB,IAAI,MAAM;IAIpC;;OAEG;IACI,aAAa,IAAI,MAAM;IAI9B;;OAEG;WACW,iBAAiB,CAAC,QAAQ,EAAE,WAAW,GAAG,OAAO;IAM/D,IAAI,EAAE,gBAAgB,CAAC,GAAG,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAGD,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,SAAS,oBAAc,CAAC;IACrC,KAAY,SAAS,GAAG,CAAC,CAAC,SAAS,CAAC;CACrC"}

View File

@ -1,142 +0,0 @@
"use strict";
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Live2DCubismFramework = exports.CubismMoc = void 0;
var cubismdebug_1 = require("../utils/cubismdebug");
var cubismmodel_1 = require("./cubismmodel");
/**
* Mocデータの管理
*
* Mocデータの管理を行うクラス
*/
var CubismMoc = /** @class */ (function () {
/**
* コンストラクタ
*/
function CubismMoc(moc) {
this._moc = moc;
this._modelCount = 0;
this._mocVersion = 0;
}
/**
* Mocデータの作成
*/
CubismMoc.create = function (mocBytes, shouldCheckMocConsistency) {
var cubismMoc = null;
if (shouldCheckMocConsistency) {
// .moc3の整合性を確認
var consistency = this.hasMocConsistency(mocBytes);
if (!consistency) {
// 整合性が確認できなければ処理しない
(0, cubismdebug_1.CubismLogError)("Inconsistent MOC3.");
return cubismMoc;
}
}
var moc = Live2DCubismCore.Moc.fromArrayBuffer(mocBytes);
if (moc) {
cubismMoc = new CubismMoc(moc);
cubismMoc._mocVersion = Live2DCubismCore.Version.csmGetMocVersion(moc, mocBytes);
}
return cubismMoc;
};
/**
* Mocデータを削除
*
* Mocデータを削除する
*/
CubismMoc.delete = function (moc) {
moc._moc._release();
moc._moc = null;
moc = null;
};
/**
* モデルを作成する
*
* @return Mocデータから作成されたモデル
*/
CubismMoc.prototype.createModel = function () {
var cubismModel = null;
var model = Live2DCubismCore.Model.fromMoc(this._moc);
if (model) {
cubismModel = new cubismmodel_1.CubismModel(model);
cubismModel.initialize();
++this._modelCount;
}
return cubismModel;
};
/**
* モデルを削除する
*/
CubismMoc.prototype.deleteModel = function (model) {
if (model != null) {
model.release();
model = null;
--this._modelCount;
}
};
/**
* デストラクタ相当の処理
*/
CubismMoc.prototype.release = function () {
(0, cubismdebug_1.CSM_ASSERT)(this._modelCount == 0);
this._moc._release();
this._moc = null;
};
/**
* 最新の.moc3 Versionを取得
*/
CubismMoc.prototype.getLatestMocVersion = function () {
return Live2DCubismCore.Version.csmGetLatestMocVersion();
};
/**
* 読み込んだモデルの.moc3 Versionを取得
*/
CubismMoc.prototype.getMocVersion = function () {
return this._mocVersion;
};
/**
* .moc3 の整合性を検証する
*/
CubismMoc.hasMocConsistency = function (mocBytes) {
var isConsistent = Live2DCubismCore.Moc.prototype.hasMocConsistency(mocBytes);
return isConsistent === 1 ? true : false;
};
return CubismMoc;
}());
exports.CubismMoc = CubismMoc;
// Namespace definition for compatibility.
var $ = __importStar(require("./cubismmoc"));
// eslint-disable-next-line @typescript-eslint/no-namespace
var Live2DCubismFramework;
(function (Live2DCubismFramework) {
Live2DCubismFramework.CubismMoc = $.CubismMoc;
})(Live2DCubismFramework || (exports.Live2DCubismFramework = Live2DCubismFramework = {}));
//# sourceMappingURL=cubismmoc.js.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismmoc.js","sourceRoot":"","sources":["../../src/model/cubismmoc.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,oDAAkE;AAClE,6CAA4C;AAE5C;;;;GAIG;AACH;IA+EE;;OAEG;IACH,mBAAoB,GAAyB;QAC3C,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;QAChB,IAAI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CAAC;IACrB,CAAC;IAED;;OAEG;IACH,+BAAW,GAAX,UAAY,KAAkB;QAC5B,IAAI,KAAK,IAAI,IAAI,EAAE;YACjB,KAAK,CAAC,OAAO,EAAE,CAAC;YAChB,KAAK,GAAG,IAAI,CAAC;YACb,EAAE,IAAI,CAAC,WAAW,CAAC;SACpB;IACH,CAAC;IAWD;;OAEG;IACI,2BAAO,GAAd;QACE,IAAA,wBAAU,EAAC,IAAI,CAAC,WAAW,IAAI,CAAC,CAAC,CAAC;QAElC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED;;OAEG;IACI,uCAAmB,GAA1B;QACE,OAAO,gBAAgB,CAAC,OAAO,CAAC,sBAAsB,EAAE,CAAC;IAC3D,CAAC;IAED;;OAEG;IACI,iCAAa,GAApB;QACE,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED;;OAEG;IACW,2BAAiB,GAA/B,UAAgC,QAAqB;QACnD,IAAM,YAAY,GAChB,gBAAgB,CAAC,GAAG,CAAC,SAAS,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;QAC7D,OAAO,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IAC3C,CAAC;IAKH,gBAAC;AAAD,CAAC,AA5HD,IA4HC;AA5HY,8BAAS;AA8HtB,0CAA0C;AAC1C,6CAAiC;AACjC,2DAA2D;AAC3D,IAAiB,qBAAqB,CAGrC;AAHD,WAAiB,qBAAqB;IACvB,+BAAS,GAAG,CAAC,CAAC,SAAS,CAAC;AAEvC,CAAC,EAHgB,qBAAqB,qCAArB,qBAAqB,QAGrC"}

View File

@ -1,679 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
import { CubismIdHandle } from '../id/cubismid';
import { CubismBlendMode, CubismTextureColor } from '../rendering/cubismrenderer';
import { csmVector } from '../type/csmvector';
/**
* SDKDrawable
*
*/
export declare class DrawableColorData {
constructor(isOverwritten?: boolean, color?: CubismTextureColor);
isOverwritten: boolean;
Color: CubismTextureColor;
}
/**
* @brief RGBA
*/
export declare class PartColorData {
constructor(isOverwritten?: boolean, color?: CubismTextureColor);
isOverwritten: boolean;
Color: CubismTextureColor;
}
/**
*
*/
export declare class DrawableCullingData {
/**
*
*
* @param isOverwritten
* @param isCulling
*/
constructor(isOverwritten?: boolean, isCulling?: boolean);
isOverwritten: boolean;
isCulling: boolean;
}
/**
*
*
* Moc
*/
export declare class CubismModel {
/**
*
*/
update(): void;
/**
* PixelsPerUnit
* @returns PixelsPerUnit
*/
getPixelsPerUnit(): number;
/**
*
*/
getCanvasWidth(): number;
/**
*
*/
getCanvasHeight(): number;
/**
*
*/
saveParameters(): void;
/**
*
* @param index Drawables
* @returns drawable(RGBA)
*/
getMultiplyColor(index: number): CubismTextureColor;
/**
*
* @param index Drawables
* @returns drawable(RGBA)
*/
getScreenColor(index: number): CubismTextureColor;
/**
*
* @param index Drawables
* @param color (CubismTextureColor)
*/
setMultiplyColorByTextureColor(index: number, color: CubismTextureColor): void;
/**
*
* @param index Drawables
* @param r R
* @param g G
* @param b B
* @param a A
*/
setMultiplyColorByRGBA(index: number, r: number, g: number, b: number, a?: number): void;
/**
*
* @param index Drawables
* @param color (CubismTextureColor)
*/
setScreenColorByTextureColor(index: number, color: CubismTextureColor): void;
/**
*
* @param index Drawables
* @param r R
* @param g G
* @param b B
* @param a A
*/
setScreenColorByRGBA(index: number, r: number, g: number, b: number, a?: number): void;
/**
* part
* @param partIndex part
* @returns part
*/
getPartMultiplyColor(partIndex: number): CubismTextureColor;
/**
* part
* @param partIndex part
* @returns part
*/
getPartScreenColor(partIndex: number): CubismTextureColor;
/**
* partOverwriteColor setter
* @param partIndex part
* @param r R
* @param g G
* @param b B
* @param a A
* @param partColors part
* @param drawableColors partDrawable
*/
setPartColor(partIndex: number, r: number, g: number, b: number, a: number, partColors: csmVector<PartColorData>, drawableColors: csmVector<DrawableColorData>): void;
/**
*
* @param partIndex part
* @param color (CubismTextureColor)
*/
setPartMultiplyColorByTextureColor(partIndex: number, color: CubismTextureColor): void;
/**
*
* @param partIndex part
* @param r R
* @param g G
* @param b B
* @param a A
*/
setPartMultiplyColorByRGBA(partIndex: number, r: number, g: number, b: number, a: number): void;
/**
*
* @param partIndex part
* @param color (CubismTextureColor)
*/
setPartScreenColorByTextureColor(partIndex: number, color: CubismTextureColor): void;
/**
*
* @param partIndex part
* @param r R
* @param g G
* @param b B
* @param a A
*/
setPartScreenColorByRGBA(partIndex: number, r: number, g: number, b: number, a: number): void;
/**
* SDK
* @returns true -> SDK
* false -> 使
*/
getOverwriteFlagForModelMultiplyColors(): boolean;
/**
* SDK
* @returns true -> SDK
* false -> 使
*/
getOverwriteFlagForModelScreenColors(): boolean;
/**
* SDK
* @param value true -> SDK
* false -> 使
*/
setOverwriteFlagForModelMultiplyColors(value: boolean): void;
/**
* SDK
* @param value true -> SDK
* false -> 使
*/
setOverwriteFlagForModelScreenColors(value: boolean): void;
/**
* SDKDrawableIndex
* @returns true -> SDK
* false -> 使
*/
getOverwriteFlagForDrawableMultiplyColors(drawableindex: number): boolean;
/**
* SDKDrawableIndex
* @returns true -> SDK
* false -> 使
*/
getOverwriteFlagForDrawableScreenColors(drawableindex: number): boolean;
/**
* SDKDrawableIndex
* @param value true -> SDK
* false -> 使
*/
setOverwriteFlagForDrawableMultiplyColors(drawableindex: number, value: boolean): void;
/**
* SDKDrawableIndex
* @param value true -> SDK
* false -> 使
*/
setOverwriteFlagForDrawableScreenColors(drawableindex: number, value: boolean): void;
/**
* SDKpart
* @param partIndex part
* @returns true -> SDK
* false -> 使
*/
getOverwriteColorForPartMultiplyColors(partIndex: number): boolean;
/**
* SDKpart
* @param partIndex part
* @returns true -> SDK
* false -> 使
*/
getOverwriteColorForPartScreenColors(partIndex: number): boolean;
/**
* partOverwriteFlag setter
* @param partIndex part
* @param value true -> SDK
* false -> 使
* @param partColors part
* @param drawableColors partDrawable
*/
setOverwriteColorForPartColors(partIndex: number, value: boolean, partColors: csmVector<PartColorData>, drawableColors: csmVector<DrawableColorData>): void;
/**
* SDKpart
* @param partIndex part
* @param value true -> SDK
* false -> 使
*/
setOverwriteColorForPartMultiplyColors(partIndex: number, value: boolean): void;
/**
* SDKpart
* @param partIndex part
* @param value true -> SDK
* false -> 使
*/
setOverwriteColorForPartScreenColors(partIndex: number, value: boolean): void;
/**
* Drawable
*
* @param drawableIndex Drawable
* @return Drawable
*/
getDrawableCulling(drawableIndex: number): boolean;
/**
* Drawable
*
* @param drawableIndex Drawable
* @param isCulling
*/
setDrawableCulling(drawableIndex: number, isCulling: boolean): void;
/**
* SDK
*
* @retval true -> SDK使
* @retval false -> 使
*/
getOverwriteFlagForModelCullings(): boolean;
/**
* SDK
*
* @param isOverwrittenCullings SDK使true使false
*/
setOverwriteFlagForModelCullings(isOverwrittenCullings: boolean): void;
/**
*
* @param drawableIndex Drawable
* @retval true -> SDK使
* @retval false -> 使
*/
getOverwriteFlagForDrawableCullings(drawableIndex: number): boolean;
/**
*
* @param drawableIndex Drawable
* @param isOverwrittenCullings SDK使true使false
*/
setOverwriteFlagForDrawableCullings(drawableIndex: number, isOverwrittenCullings: boolean): void;
/**
*
*
* @returns
*/
getModelOapcity(): number;
/**
*
*
* @param value
*/
setModelOapcity(value: number): void;
/**
*
*/
getModel(): Live2DCubismCore.Model;
/**
*
* @param partId ID
* @return
*/
getPartIndex(partId: CubismIdHandle): number;
/**
* ID
*
* @param partIndex
* @return ID
*/
getPartId(partIndex: number): CubismIdHandle;
/**
*
* @return
*/
getPartCount(): number;
/**
* (Index)
* @param partIndex
* @param opacity
*/
setPartOpacityByIndex(partIndex: number, opacity: number): void;
/**
* (Id)
* @param partId ID
* @param opacity
*/
setPartOpacityById(partId: CubismIdHandle, opacity: number): void;
/**
* (index)
* @param partIndex
* @return
*/
getPartOpacityByIndex(partIndex: number): number;
/**
* (id)
* @param partId
* @return
*/
getPartOpacityById(partId: CubismIdHandle): number;
/**
*
* @param ID
* @return
*/
getParameterIndex(parameterId: CubismIdHandle): number;
/**
*
* @return
*/
getParameterCount(): number;
/**
*
* @param parameterIndex
* @return csmParameterType_Normal ->
* csmParameterType_BlendShape ->
*/
getParameterType(parameterIndex: number): Live2DCubismCore.csmParameterType;
/**
*
* @param parameterIndex
* @return
*/
getParameterMaximumValue(parameterIndex: number): number;
/**
*
* @param parameterIndex
* @return
*/
getParameterMinimumValue(parameterIndex: number): number;
/**
*
* @param parameterIndex
* @return
*/
getParameterDefaultValue(parameterIndex: number): number;
/**
* indexID
*
* @param parameterIndex
* @returns ID
*/
getParameterId(parameterIndex: number): CubismIdHandle;
/**
*
* @param parameterIndex
* @return
*/
getParameterValueByIndex(parameterIndex: number): number;
/**
*
* @param parameterId ID
* @return
*/
getParameterValueById(parameterId: CubismIdHandle): number;
/**
*
* @param parameterIndex
* @param value
* @param weight
*/
setParameterValueByIndex(parameterIndex: number, value: number, weight?: number): void;
/**
*
* @param parameterId ID
* @param value
* @param weight
*/
setParameterValueById(parameterId: CubismIdHandle, value: number, weight?: number): void;
/**
* (index)
* @param parameterIndex
* @param value
* @param weight
*/
addParameterValueByIndex(parameterIndex: number, value: number, weight?: number): void;
/**
* (id)
* @param parameterId
* @param value
* @param weight
*/
addParameterValueById(parameterId: any, value: number, weight?: number): void;
/**
*
* @param parameterId ID
* @param value
* @param weight
*/
multiplyParameterValueById(parameterId: CubismIdHandle, value: number, weight?: number): void;
/**
*
* @param parameterIndex
* @param value
* @param weight
*/
multiplyParameterValueByIndex(parameterIndex: number, value: number, weight?: number): void;
/**
* Drawable
* @param drawableId DrawableID
* @return Drawable
*/
getDrawableIndex(drawableId: CubismIdHandle): number;
/**
* Drawable
* @return drawable
*/
getDrawableCount(): number;
/**
* DrawableID
* @param drawableIndex Drawable
* @return drawableID
*/
getDrawableId(drawableIndex: number): CubismIdHandle;
/**
* Drawable
* @return Drawable
*/
getDrawableRenderOrders(): Int32Array;
/**
* @deprecated
* getDrawableTextureIndex
*
* Drawable
* @param drawableIndex Drawable
* @return drawable
*/
getDrawableTextureIndices(drawableIndex: number): number;
/**
* Drawable
* @param drawableIndex Drawable
* @return drawable
*/
getDrawableTextureIndex(drawableIndex: number): number;
/**
* DrawableVertexPositions
*
* CubismModel.updateDrawable
*
* @param drawableIndex Drawable
* @retval true DrawableCubismModel.update
* @retval false DrawableCubismModel.update
*/
getDrawableDynamicFlagVertexPositionsDidChange(drawableIndex: number): boolean;
/**
* Drawable
* @param drawableIndex Drawable
* @return drawable
*/
getDrawableVertexIndexCount(drawableIndex: number): number;
/**
* Drawable
* @param drawableIndex Drawable
* @return drawable
*/
getDrawableVertexCount(drawableIndex: number): number;
/**
* Drawable
* @param drawableIndex drawable
* @return drawable
*/
getDrawableVertices(drawableIndex: number): Float32Array;
/**
* Drawable
* @param drawableIndex Drawable
* @return drawable
*/
getDrawableVertexIndices(drawableIndex: number): Uint16Array;
/**
* Drawable
* @param drawableIndex Drawable
* @return drawable
*/
getDrawableVertexPositions(drawableIndex: number): Float32Array;
/**
* DrawableUV
* @param drawableIndex Drawable
* @return drawableUV
*/
getDrawableVertexUvs(drawableIndex: number): Float32Array;
/**
* Drawable
* @param drawableIndex Drawable
* @return drawable
*/
getDrawableOpacity(drawableIndex: number): number;
/**
* Drawable
* @param drawableIndex Drawable
* @return drawable(RGBA)
* RGBAA0
*/
getDrawableMultiplyColor(drawableIndex: number): CubismTextureColor;
/**
* Drawable
* @param drawableIndex Drawable
* @return drawable(RGBA)
* RGBAA0
*/
getDrawableScreenColor(drawableIndex: number): CubismTextureColor;
/**
* Drawable
* @param drawableIndex Drawable
* @return drawable
*/
getDrawableParentPartIndex(drawableIndex: number): number;
/**
* Drawable
* @param drawableIndex Drawable
* @return drawable
*/
getDrawableBlendMode(drawableIndex: number): CubismBlendMode;
/**
* Drawable使
*
* Drawable使
* 使
*
* @param drawableIndex Drawable
* @return Drawable
*/
getDrawableInvertedMaskBit(drawableIndex: number): boolean;
/**
* Drawable
* @return Drawable
*/
getDrawableMasks(): Int32Array[];
/**
* Drawable
* @return Drawable
*/
getDrawableMaskCounts(): Int32Array;
/**
* 使
*
* @return true 使
* @return false 使
*/
isUsingMasking(): boolean;
/**
* Drawable
*
* @param drawableIndex Drawable
* @return true Drawable
* @return false Drawable
*/
getDrawableDynamicFlagIsVisible(drawableIndex: number): boolean;
/**
* DrawableDrawOrder
*
* CubismModel.updatedrawabledrawOrder
* drawOrderartMesh01000
* @param drawableIndex drawable
* @return true drawableCubismModel.update
* @return false drawableCubismModel.update
*/
getDrawableDynamicFlagVisibilityDidChange(drawableIndex: number): boolean;
/**
* Drawable
*
* CubismModel.updatedrawable
*
* @param drawableIndex drawable
* @return true DrawableCubismModel.update
* @return false DrawableCubismModel.update
*/
getDrawableDynamicFlagOpacityDidChange(drawableIndex: number): boolean;
/**
* Drawable
*
* CubismModel.updateDrawable
*
* @param drawableIndex Drawable
* @return true DrawableCubismModel.update
* @return false DrawableCubismModel.update
*/
getDrawableDynamicFlagRenderOrderDidChange(drawableIndex: number): boolean;
/**
* Drawable
*
* CubismModel.updateDrawable
*
* @param drawableIndex Drawable
* @return true DrawableCubismModel.update
* @return false DrawableCubismModel.update
*/
getDrawableDynamicFlagBlendColorDidChange(drawableIndex: number): boolean;
/**
*
*/
loadParameters(): void;
/**
*
*/
initialize(): void;
/**
*
* @param model
*/
constructor(model: Live2DCubismCore.Model);
/**
*
*/
release(): void;
private _notExistPartOpacities;
private _notExistPartId;
private _notExistParameterValues;
private _notExistParameterId;
private _savedParameters;
private _isOverwrittenModelMultiplyColors;
private _isOverwrittenModelScreenColors;
private _userMultiplyColors;
private _userScreenColors;
private _userPartScreenColors;
private _userPartMultiplyColors;
private _partChildDrawables;
private _model;
private _parameterValues;
private _parameterMaximumValues;
private _parameterMinimumValues;
private _partOpacities;
private _modelOpacity;
private _parameterIds;
private _partIds;
private _drawableIds;
private _isOverwrittenCullings;
private _userCullings;
}
import * as $ from './cubismmodel';
export declare namespace Live2DCubismFramework {
const CubismModel: typeof $.CubismModel;
type CubismModel = $.CubismModel;
}
//# sourceMappingURL=cubismmodel.d.ts.map

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,73 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
import { CubismIdHandle } from '../id/cubismid';
import { csmString } from '../type/csmstring';
import { csmVector } from '../type/csmvector';
/**
*
*
* Json
*/
export declare class CubismModelUserDataNode {
targetType: CubismIdHandle;
targetId: CubismIdHandle;
value: csmString;
}
/**
*
*
*
*/
export declare class CubismModelUserData {
/**
*
*
* @param buffer userdata3.json
* @param size
* @return
*/
static create(buffer: ArrayBuffer, size: number): CubismModelUserData;
/**
*
*
* @param modelUserData
*/
static delete(modelUserData: CubismModelUserData): void;
/**
* ArtMesh
*
* @return
*/
getArtMeshUserDatas(): csmVector<CubismModelUserDataNode>;
/**
* userdata3.json
*
* @param buffer userdata3.json
* @param size
*/
parseUserData(buffer: ArrayBuffer, size: number): void;
/**
*
*/
constructor();
/**
*
*
*
*/
release(): void;
private _userDataNodes;
private _artMeshUserDataNode;
}
import * as $ from './cubismmodeluserdata';
export declare namespace Live2DCubismFramework {
const CubismModelUserData: typeof $.CubismModelUserData;
type CubismModelUserData = $.CubismModelUserData;
const CubismModelUserDataNode: typeof $.CubismModelUserDataNode;
type CubismModelUserDataNode = $.CubismModelUserDataNode;
}
//# sourceMappingURL=cubismmodeluserdata.d.ts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismmodeluserdata.d.ts","sourceRoot":"","sources":["../../src/model/cubismmodeluserdata.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAK9C;;;;GAIG;AACH,qBAAa,uBAAuB;IAClC,UAAU,EAAE,cAAc,CAAC;IAC3B,QAAQ,EAAE,cAAc,CAAC;IACzB,KAAK,EAAE,SAAS,CAAC;CAClB;AAED;;;;GAIG;AACH,qBAAa,mBAAmB;IAC9B;;;;;;OAMG;WACW,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,mBAAmB;IAQ5E;;;;OAIG;WACW,MAAM,CAAC,aAAa,EAAE,mBAAmB,GAAG,IAAI;IAO9D;;;;OAIG;IACI,mBAAmB,IAAI,SAAS,CAAC,uBAAuB,CAAC;IAIhE;;;;;OAKG;IACI,aAAa,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IA4B7D;;OAEG;;IAMH;;;;OAIG;IACI,OAAO,IAAI,IAAI;IAQtB,OAAO,CAAC,cAAc,CAAqC;IAC3D,OAAO,CAAC,oBAAoB,CAAqC;CAClE;AAGD,OAAO,KAAK,CAAC,MAAM,uBAAuB,CAAC;AAE3C,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,mBAAmB,8BAAwB,CAAC;IACzD,KAAY,mBAAmB,GAAG,CAAC,CAAC,mBAAmB,CAAC;IACjD,MAAM,uBAAuB,kCAA4B,CAAC;IACjE,KAAY,uBAAuB,GAAG,CAAC,CAAC,uBAAuB,CAAC;CACjE"}

View File

@ -1,138 +0,0 @@
"use strict";
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Live2DCubismFramework = exports.CubismModelUserData = exports.CubismModelUserDataNode = void 0;
var live2dcubismframework_1 = require("../live2dcubismframework");
var csmstring_1 = require("../type/csmstring");
var csmvector_1 = require("../type/csmvector");
var cubismmodeluserdatajson_1 = require("./cubismmodeluserdatajson");
var ArtMesh = 'ArtMesh';
/**
* ユーザーデータインターフェース
*
* Jsonから読み込んだユーザーデータを記録しておくための構造体
*/
var CubismModelUserDataNode = /** @class */ (function () {
function CubismModelUserDataNode() {
}
return CubismModelUserDataNode;
}());
exports.CubismModelUserDataNode = CubismModelUserDataNode;
/**
* ユーザデータの管理クラス
*
* ユーザデータをロード管理検索インターフェイス解放までを行う
*/
var CubismModelUserData = /** @class */ (function () {
/**
* コンストラクタ
*/
function CubismModelUserData() {
this._userDataNodes = new csmvector_1.csmVector();
this._artMeshUserDataNode = new csmvector_1.csmVector();
}
/**
* インスタンスの作成
*
* @param buffer userdata3.jsonが読み込まれているバッファ
* @param size バッファのサイズ
* @return 作成されたインスタンス
*/
CubismModelUserData.create = function (buffer, size) {
var ret = new CubismModelUserData();
ret.parseUserData(buffer, size);
return ret;
};
/**
* インスタンスを破棄する
*
* @param modelUserData 破棄するインスタンス
*/
CubismModelUserData.delete = function (modelUserData) {
if (modelUserData != null) {
modelUserData.release();
modelUserData = null;
}
};
/**
* ArtMeshのユーザーデータのリストの取得
*
* @return ユーザーデータリスト
*/
CubismModelUserData.prototype.getArtMeshUserDatas = function () {
return this._artMeshUserDataNode;
};
/**
* userdata3.jsonのパース
*
* @param buffer userdata3.jsonが読み込まれているバッファ
* @param size バッファのサイズ
*/
CubismModelUserData.prototype.parseUserData = function (buffer, size) {
var json = new cubismmodeluserdatajson_1.CubismModelUserDataJson(buffer, size);
var typeOfArtMesh = live2dcubismframework_1.CubismFramework.getIdManager().getId(ArtMesh);
var nodeCount = json.getUserDataCount();
for (var i = 0; i < nodeCount; i++) {
var addNode = new CubismModelUserDataNode();
addNode.targetId = json.getUserDataId(i);
addNode.targetType = live2dcubismframework_1.CubismFramework.getIdManager().getId(json.getUserDataTargetType(i));
addNode.value = new csmstring_1.csmString(json.getUserDataValue(i));
this._userDataNodes.pushBack(addNode);
if (addNode.targetType == typeOfArtMesh) {
this._artMeshUserDataNode.pushBack(addNode);
}
}
json.release();
json = void 0;
};
/**
* デストラクタ相当の処理
*
* ユーザーデータ構造体配列を解放する
*/
CubismModelUserData.prototype.release = function () {
for (var i = 0; i < this._userDataNodes.getSize(); ++i) {
this._userDataNodes.set(i, null);
}
this._userDataNodes = null;
};
return CubismModelUserData;
}());
exports.CubismModelUserData = CubismModelUserData;
// Namespace definition for compatibility.
var $ = __importStar(require("./cubismmodeluserdata"));
// eslint-disable-next-line @typescript-eslint/no-namespace
var Live2DCubismFramework;
(function (Live2DCubismFramework) {
Live2DCubismFramework.CubismModelUserData = $.CubismModelUserData;
Live2DCubismFramework.CubismModelUserDataNode = $.CubismModelUserDataNode;
})(Live2DCubismFramework || (exports.Live2DCubismFramework = Live2DCubismFramework = {}));
//# sourceMappingURL=cubismmodeluserdata.js.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismmodeluserdata.js","sourceRoot":"","sources":["../../src/model/cubismmodeluserdata.ts"],"names":[],"mappings":";AAAA;;;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c. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
import { CubismIdHandle } from '../id/cubismid';
export declare class CubismModelUserDataJson {
/**
*
* @param buffer userdata3.json
* @param size
*/
constructor(buffer: ArrayBuffer, size: number);
/**
*
*/
release(): void;
/**
*
* @return
*/
getUserDataCount(): number;
/**
*
*
* @return
*/
getTotalUserDataSize(): number;
/**
*
*
* @return
*/
getUserDataTargetType(i: number): string;
/**
* ID
*
* @param i
* @return ID
*/
getUserDataId(i: number): CubismIdHandle;
/**
*
*
* @param i
* @return
*/
getUserDataValue(i: number): string;
private _json;
}
import * as $ from './cubismmodeluserdatajson';
export declare namespace Live2DCubismFramework {
const CubismModelUserDataJson: typeof $.CubismModelUserDataJson;
type CubismModelUserDataJson = $.CubismModelUserDataJson;
}
//# sourceMappingURL=cubismmodeluserdatajson.d.ts.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismmodeluserdatajson.d.ts","sourceRoot":"","sources":["../../src/model/cubismmodeluserdatajson.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAYhD,qBAAa,uBAAuB;IAClC;;;;OAIG;gBACgB,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM;IAIpD;;OAEG;IACI,OAAO,IAAI,IAAI;IAItB;;;OAGG;IACI,gBAAgB,IAAI,MAAM;IAQjC;;;;OAIG;IACI,oBAAoB,IAAI,MAAM;IAQrC;;;;OAIG;IACI,qBAAqB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;IAS/C;;;;;OAKG;IACI,aAAa,CAAC,CAAC,EAAE,MAAM,GAAG,cAAc;IAW/C;;;;;OAKG;IACI,gBAAgB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM;IAS1C,OAAO,CAAC,KAAK,CAAa;CAC3B;AAGD,OAAO,KAAK,CAAC,MAAM,2BAA2B,CAAC;AAE/C,yBAAiB,qBAAqB,CAAC;IAC9B,MAAM,uBAAuB,kCAA4B,CAAC;IACjE,KAAY,uBAAuB,GAAG,CAAC,CAAC,uBAAuB,CAAC;CACjE"}

View File

@ -1,131 +0,0 @@
"use strict";
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Live2DCubismFramework = exports.CubismModelUserDataJson = void 0;
var live2dcubismframework_1 = require("../live2dcubismframework");
var cubismjson_1 = require("../utils/cubismjson");
var Meta = 'Meta';
var UserDataCount = 'UserDataCount';
var TotalUserDataSize = 'TotalUserDataSize';
var UserData = 'UserData';
var Target = 'Target';
var Id = 'Id';
var Value = 'Value';
var CubismModelUserDataJson = /** @class */ (function () {
/**
* コンストラクタ
* @param buffer userdata3.jsonが読み込まれているバッファ
* @param size バッファのサイズ
*/
function CubismModelUserDataJson(buffer, size) {
this._json = cubismjson_1.CubismJson.create(buffer, size);
}
/**
* デストラクタ相当の処理
*/
CubismModelUserDataJson.prototype.release = function () {
cubismjson_1.CubismJson.delete(this._json);
};
/**
* ユーザーデータ個数の取得
* @return ユーザーデータの個数
*/
CubismModelUserDataJson.prototype.getUserDataCount = function () {
return this._json
.getRoot()
.getValueByString(Meta)
.getValueByString(UserDataCount)
.toInt();
};
/**
* ユーザーデータ総文字列数の取得
*
* @return ユーザーデータ総文字列数
*/
CubismModelUserDataJson.prototype.getTotalUserDataSize = function () {
return this._json
.getRoot()
.getValueByString(Meta)
.getValueByString(TotalUserDataSize)
.toInt();
};
/**
* ユーザーデータのタイプの取得
*
* @return ユーザーデータのタイプ
*/
CubismModelUserDataJson.prototype.getUserDataTargetType = function (i) {
return this._json
.getRoot()
.getValueByString(UserData)
.getValueByIndex(i)
.getValueByString(Target)
.getRawString();
};
/**
* ユーザーデータのターゲットIDの取得
*
* @param i インデックス
* @return ユーザーデータターゲットID
*/
CubismModelUserDataJson.prototype.getUserDataId = function (i) {
return live2dcubismframework_1.CubismFramework.getIdManager().getId(this._json
.getRoot()
.getValueByString(UserData)
.getValueByIndex(i)
.getValueByString(Id)
.getRawString());
};
/**
* ユーザーデータの文字列の取得
*
* @param i インデックス
* @return ユーザーデータ
*/
CubismModelUserDataJson.prototype.getUserDataValue = function (i) {
return this._json
.getRoot()
.getValueByString(UserData)
.getValueByIndex(i)
.getValueByString(Value)
.getRawString();
};
return CubismModelUserDataJson;
}());
exports.CubismModelUserDataJson = CubismModelUserDataJson;
// Namespace definition for compatibility.
var $ = __importStar(require("./cubismmodeluserdatajson"));
// eslint-disable-next-line @typescript-eslint/no-namespace
var Live2DCubismFramework;
(function (Live2DCubismFramework) {
Live2DCubismFramework.CubismModelUserDataJson = $.CubismModelUserDataJson;
})(Live2DCubismFramework || (exports.Live2DCubismFramework = Live2DCubismFramework = {}));
//# sourceMappingURL=cubismmodeluserdatajson.js.map

View File

@ -1 +0,0 @@
{"version":3,"file":"cubismmodeluserdatajson.js","sourceRoot":"","sources":["../../src/model/cubismmodeluserdatajson.ts"],"names":[],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CAAS;QAC5B,OAAO,uCAAe,CAAC,YAAY,EAAE,CAAC,KAAK,CACzC,IAAI,CAAC,KAAK;aACP,OAAO,EAAE;aACT,gBAAgB,CAAC,QAAQ,CAAC;aAC1B,eAAe,CAAC,CAAC,CAAC;aAClB,gBAAgB,CAAC,EAAE,CAAC;aACpB,YAAY,EAAE,CAClB,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACI,kDAAgB,GAAvB,UAAwB,CAAS;QAC/B,OAAO,IAAI,CAAC,KAAK;aACd,OAAO,EAAE;aACT,gBAAgB,CAAC,QAAQ,CAAC;aAC1B,eAAe,CAAC,CAAC,CAAC;aAClB,gBAAgB,CAAC,KAAK,CAAC;aACvB,YAAY,EAAE,CAAC;IACpB,CAAC;IAGH,8BAAC;AAAD,CAAC,AAzFD,IAyFC;AAzFY,0DAAuB;AA2FpC,0CAA0C;AAC1C,2DAA+C;AAC/C,2DAA2D;AAC3D,IAAiB,qBAAqB,CAGrC;AAHD,WAAiB,qBAAqB;IACvB,6CAAuB,GAAG,CAAC,CAAC,uBAAuB,CAAC;AAEnE,CAAC,EAHgB,qBAAqB,qCAArB,qBAAqB,QAGrC"}

View File

@ -1,219 +0,0 @@
/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
import { CubismBreath } from '../effect/cubismbreath';
import { CubismEyeBlink } from '../effect/cubismeyeblink';
import { CubismPose } from '../effect/cubismpose';
import { CubismIdHandle } from '../id/cubismid';
import { CubismModelMatrix } from '../math/cubismmodelmatrix';
import { CubismTargetPoint } from '../math/cubismtargetpoint';
import { ACubismMotion, FinishedMotionCallback } from '../motion/acubismmotion';
import { CubismExpressionMotionManager } from '../motion/cubismexpressionmotionmanager';
import { CubismMotion } from '../motion/cubismmotion';
import { CubismMotionManager } from '../motion/cubismmotionmanager';
import { CubismMotionQueueManager } from '../motion/cubismmotionqueuemanager';
import { CubismPhysics } from '../physics/cubismphysics';
import { CubismRenderer_WebGL } from '../rendering/cubismrenderer_webgl';
import { csmString } from '../type/csmstring';
import { CubismMoc } from './cubismmoc';
import { CubismModel } from './cubismmodel';
import { CubismModelUserData } from './cubismmodeluserdata';
/**
* 使
*
* 使
*/
export declare class CubismUserModel {
/**
*
*
*
*
* @return true
* @return false
*/
isInitialized(): boolean;
/**
*
*
*
*
* @param v
*/
setInitialized(v: boolean): void;
/**
*
*
*
*
* @return true
* @return false
*/
isUpdating(): boolean;
/**
*
*
*
*
* @param v
*/
setUpdating(v: boolean): void;
/**
*
* @param X
* @param Y
*/
setDragging(x: number, y: number): void;
/**
*
* @param x X
* @param y Y
* @param z Z
*/
setAcceleration(x: number, y: number, z: number): void;
/**
*
* @return
*/
getModelMatrix(): CubismModelMatrix;
/**
*
* @param a
*/
setOpacity(a: number): void;
/**
*
* @return
*/
getOpacity(): number;
/**
*
*
* @param buffer moc3
*/
loadModel(buffer: ArrayBuffer, shouldCheckMocConsistency?: boolean): void;
/**
*
* @param buffer motion3.json
* @param size
* @param name
* @param onFinishedMotionHandler
* @return
*/
loadMotion: (buffer: ArrayBuffer, size: number, name: string, onFinishedMotionHandler?: FinishedMotionCallback) => CubismMotion;
/**
*
* @param buffer exp
* @param size
* @param name
*/
loadExpression(buffer: ArrayBuffer, size: number, name: string): ACubismMotion;
/**
*
* @param buffer pose3.json
* @param size
*/
loadPose(buffer: ArrayBuffer, size: number): void;
/**
*
* @param buffer userdata3.json
* @param size
*/
loadUserData(buffer: ArrayBuffer, size: number): void;
/**
*
* @param buffer physics3.json
* @param size
*/
loadPhysics(buffer: ArrayBuffer, size: number): void;
/**
*
* @param drawableId DrawableID
* @param pointX X
* @param pointY Y
* @return true
* @return false
*/
isHit(drawableId: CubismIdHandle, pointX: number, pointY: number): boolean;
/**
*
* @return
*/
getModel(): CubismModel;
/**
*
* @return
*/
getRenderer(): CubismRenderer_WebGL;
/**
*
* @param maskBufferCount
*/
createRenderer(maskBufferCount?: number): void;
/**
*
*/
deleteRenderer(): void;
/**
*
*
* Event
*
*
*
* @param eventValue
*/
motionEventFired(eventValue: csmString): void;
/**
*
*
* CubismMotionQueueManagerCallback
* CubismUserModelEventFired
*
* @param caller
* @param eventValue
* @param customData CubismUserModel
*/
static cubismDefaultMotionEventCallback(caller: CubismMotionQueueManager, eventValue: csmString, customData: CubismUserModel): void;
/**
*
*/
constructor();
/**
*
*/
release(): void;
protected _moc: CubismMoc;
protected _model: CubismModel;
protected _motionManager: CubismMotionManager;
protected _expressionManager: CubismExpressionMotionManager;
protected _eyeBlink: CubismEyeBlink;
protected _breath: CubismBreath;
protected _modelMatrix: CubismModelMatrix;
protected _pose: CubismPose;
protected _dragManager: CubismTargetPoint;
protected _physics: CubismPhysics;
protected _modelUserData: CubismModelUserData;
protected _initialized: boolean;
protected _updating: boolean;
protected _opacity: number;
protected _lipsync: boolean;
protected _lastLipSyncValue: number;
protected _dragX: number;
protected _dragY: number;
protected _accelerationX: number;
protected _accelerationY: number;
protected _accelerationZ: number;
protected _mocConsistency: boolean;
protected _debugMode: boolean;
private _renderer;
}
import * as $ from './cubismusermodel';
export declare namespace Live2DCubismFramework {
const CubismUserModel: typeof $.CubismUserModel;
type CubismUserModel = $.CubismUserModel;
}
//# sourceMappingURL=cubismusermodel.d.ts.map

Some files were not shown because too many files have changed in this diff Show More