/**
 * 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 { CubismVector2 } from '../math/cubismvector2' ; import { csmVector } from '../type/csmvector' ; /**
 * 物理演算の適用先の種類
 */ export enum CubismPhysicsTargetType { CubismPhysicsTargetType_Parameter } /**
 * 物理演算の入力の種類
 */ export enum CubismPhysicsSource { CubismPhysicsSource_X , CubismPhysicsSource_Y , CubismPhysicsSource_Angle } brief export class PhysicsJsonEffectiveForces { constructor ( ) { this . gravity = new CubismVector2 ( 0 , 0 ) ; this . wind = new CubismVector2 ( 0 , 0 ) ; } gravity : CubismVector2 ; wind : CubismVector2 ; } /**
 * 物理演算のパラメータ情報
 */ export class CubismPhysicsParameter { id : CubismIdHandle ; targetType : CubismPhysicsTargetType ; } /**
 * 物理演算の正規化情報
 */ export class CubismPhysicsNormalization { minimum : number ; maximum : number ; defalut : number ; } /**
 * 物理演算の演算委使用する物理点の情報
 */ export class CubismPhysicsParticle { constructor ( ) { this . initialPosition = new CubismVector2 ( 0 , 0 ) ; this . position = new CubismVector2 ( 0 , 0 ) ; this . lastPosition = new CubismVector2 ( 0 , 0 ) ; this . lastGravity = new CubismVector2 ( 0 , 0 ) ; this . force = new CubismVector2 ( 0 , 0 ) ; this . velocity = new CubismVector2 ( 0 , 0 ) ; } initialPosition : CubismVector2 ; mobility : number ; delay : number ; acceleration : number ; radius : number ; position : CubismVector2 ; lastPosition : CubismVector2 ; lastGravity : CubismVector2 ; force : CubismVector2 ; velocity : CubismVector2 ; } /**
 * 物理演算の物理点の管理
 */ export class CubismPhysicsSubRig { constructor ( ) { this . normalizationPosition = new CubismPhysicsNormalization ( ) ; this . normalizationAngle = new CubismPhysicsNormalization ( ) ; } inputCount : number ; outputCount : number ; particleCount : number ; baseInputIndex : number ; baseOutputIndex : number ; baseParticleIndex : number ; normalizationPosition : CubismPhysicsNormalization ; normalizationAngle : CubismPhysicsNormalization ; } param targetTranslation param targetAngle param value param parameterMinimunValue param parameterMaximumValue param parameterDefaultValue param normalizationPosition param normalizationAngle param isInverted param weight export interface normalizedPhysicsParameterValueGetter { ( targetTranslation , targetAngle , value , parameterMinimunValue , parameterMaximumValue , parameterDefaultValue , normalizationPosition , normalizationAngle , isInverted , weight ) : void ; } param translation param particles param isInverted param parentGravity return export interface physicsValueGetter { ( translation , particles , particleIndex , isInverted , parentGravity ) : number ; } param translationScale param angleScale return export interface physicsScaleGetter { ( translationScale , angleScale ) : number ; } /**
 * 物理演算の入力情報
 */ export class CubismPhysicsInput { constructor ( ) { this . source = new CubismPhysicsParameter ( ) ; } source : CubismPhysicsParameter ; sourceParameterIndex : number ; weight : number ; type : number ; reflect : boolean ; getNormalizedParameterValue : normalizedPhysicsParameterValueGetter ; } brief export class CubismPhysicsOutput { constructor ( ) { this . destination = new CubismPhysicsParameter ( ) ; this . translationScale = new CubismVector2 ( 0 , 0 ) ; } destination : CubismPhysicsParameter ; destinationParameterIndex : number ; vertexIndex : number ; translationScale : CubismVector2 ; angleScale : number ; weight : number ; type : CubismPhysicsSource ; reflect : boolean ; valueBelowMinimum : number ; valueExceededMaximum : number ; getValue : physicsValueGetter ; getScale : physicsScaleGetter ; } brief export class CubismPhysicsRig { constructor ( ) { this . settings = new csmVector < CubismPhysicsSubRig > ( ) ; this . inputs = new csmVector < CubismPhysicsInput > ( ) ; this . outputs = new csmVector < CubismPhysicsOutput > ( ) ; this . particles = new csmVector < CubismPhysicsParticle > ( ) ; this . gravity = new CubismVector2 ( 0 , 0 ) ; this . wind = new CubismVector2 ( 0 , 0 ) ; } subRigCount : number ; settings : csmVector < CubismPhysicsSubRig > ; inputs : csmVector < CubismPhysicsInput > ; outputs : csmVector < CubismPhysicsOutput > ; particles : csmVector < CubismPhysicsParticle > ; gravity : CubismVector2 ; wind : CubismVector2 ; } import * as $ from './cubismphysicsinternal' ; export namespace Live2DCubismFramework { export const CubismPhysicsInput = $ . CubismPhysicsInput ; export type CubismPhysicsInput = $ . CubismPhysicsInput ; export const CubismPhysicsNormalization = $ . CubismPhysicsNormalization ; export type CubismPhysicsNormalization = $ . CubismPhysicsNormalization ; export const CubismPhysicsOutput = $ . CubismPhysicsOutput ; export type CubismPhysicsOutput = $ . CubismPhysicsOutput ; export const CubismPhysicsParameter = $ . CubismPhysicsParameter ; export type CubismPhysicsParameter = $ . CubismPhysicsParameter ; export const CubismPhysicsParticle = $ . CubismPhysicsParticle ; export type CubismPhysicsParticle = $ . CubismPhysicsParticle ; export const CubismPhysicsRig = $ . CubismPhysicsRig ; export type CubismPhysicsRig = $ . CubismPhysicsRig ; export const CubismPhysicsSource = $ . CubismPhysicsSource ; export type CubismPhysicsSource = $ . CubismPhysicsSource ; export const CubismPhysicsSubRig = $ . CubismPhysicsSubRig ; export type CubismPhysicsSubRig = $ . CubismPhysicsSubRig ; export const CubismPhysicsTargetType = $ . CubismPhysicsTargetType ; export type CubismPhysicsTargetType = $ . CubismPhysicsTargetType ; export const PhysicsJsonEffectiveForces = $ . PhysicsJsonEffectiveForces ; export type PhysicsJsonEffectiveForces = $ . PhysicsJsonEffectiveForces ; export type normalizedPhysicsParameterValueGetter = $ . normalizedPhysicsParameterValueGetter ; export type physicsScaleGetter = $ . physicsScaleGetter ; export type physicsValueGetter = $ . physicsValueGetter ; }