[About macOS Ventura 13.0] (12/20/2022)
The currently released Live2D Cubism SDK is not guaranteed to work with macOS Ventura.
Please refrain from upgrading the macOS as they may not work properly.
The Cubism Editor license file may be lost after the macOS upgrade.
Please make sure to deactivate the Cubism Editor license before upgrading the macOS.
For more details[NOTICE]
About the support for Mac models
Cubism Editor is not supported with Apple M1 processors.
Please refer to
System Requirements for details.
We will not respond to any related inquiries with this message.
Manipulating L2DEyeBlink.cs
Hello,
Using the Simple.cs script, I was trying to create a L2DViewer like parameter list for integrating into Fungus.
The problem is that because the L2DEyeBlink script also uses the parameters of "PARAM_EYE_L_OPEN" and "PARAM_EYE_R_OPEN", only the latest function would only activate, limiting me to either have a nomal blinking or a steady stare.
e.g: this code would only display a blinking character without eye open control, putting the eyeBlink.setParam on top in turn would display a staring character but with eye open control.

I then went into the L2DEyeBlink script and noticed the function for the blink is :
public void updateParam(ALive2DModel model)
{
long time = UtSystem.getUserTimeMSec();
float eyeParamValue;
float t = 0;
switch (this.eyeState)
{
case EYE_STATE.STATE_CLOSING:
t = (time - stateStartTime) / (float)closingMotionMsec;
if (t >= 1)
{
t = 1;
this.eyeState = EYE_STATE.STATE_CLOSED;
this.stateStartTime = time;
}
eyeParamValue = 1 - t;
break;
case EYE_STATE.STATE_CLOSED:
t = (time - stateStartTime) / (float)closedMotionMsec;
if (t >= 1)
{
this.eyeState = EYE_STATE.STATE_OPENING;
this.stateStartTime = time;
}
eyeParamValue = 0;
break;
case EYE_STATE.STATE_OPENING:
t = (time - stateStartTime) / (float)openingMotionMsec;
if (t >= 1)
{
t = 1;
this.eyeState = EYE_STATE.STATE_INTERVAL;
this.nextBlinkTime = calcNextBlink();
}
eyeParamValue = t;
break;
case EYE_STATE.STATE_INTERVAL:
//
if (this.nextBlinkTime < time)
{
this.eyeState = EYE_STATE.STATE_CLOSING;
this.stateStartTime = time;
}
eyeParamValue = 1;
break;
case EYE_STATE.STATE_FIRST:
default:
this.eyeState = EYE_STATE.STATE_INTERVAL;
this.nextBlinkTime = calcNextBlink();
eyeParamValue = 1;
break;
}
The solution here was to change the 1's into the variable that holds the eyeopen value in my original script ( (float) (ea) ) in order to become the upper bound for blinking.
The problem is, the system does not allow me to execute a getComponent within this function so I could not send over the value.
Is there any way I could pass it into the function?
0 ·
Comments