[Last update: 07/07/2022]

To make the model breathe in OW, use CubismBreath.
Since the parameters can be made to operate cyclically, they can be applied to a variety of things, not just breathing.

The parameters to be applied can be specified arbitrarily.
It is also possible to specify for each parameter the period, the range of values for the parameter, and the Weight value at which the value is applied.


Using CubismBreath

Creation of CubismBreath instance

To create a CubismBreath instance, use the Native (C++) CubismBreath::Create function or the Web (TypeScript) CubismBreath.create function.



Parameter Specification

To specify parameters to set the breath, use the Native(C++) CubismBreath::BreathParameterData structure or the Web(TypeScript) BreathParameterData class.
The parameter ID to be set is passed as the first argument, of type CubismId*.
The second argument is the offset value of the periodic operation. The value of the cyclic motion of respiration is set from a sine wave and specifies its starting position.
The third argument sets the maximum value of the sine wave.
The fourth argument sets the period of the sine wave.
The fifth argument sets the weight to which the value is applied to the parameter.



Apply values to the model.

To apply the breath, use the Native (C++) CubismBreath::UpdateParameters function or the Web (TypeScript) CubismBreath.updateParameters function.
The first argument is the target model and the second argument is the difference time since the last update.



Destroy CubismBreath

The CubismBreath instance must also be destroyed at the time the model is released.

© 2010 - 2022 Live2D Inc.