Function
Static Public Summary | ||
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
|
|
public |
L2DModelMatrix(w: *, h: *) |
|
public |
|
|
public |
L2DPartsParam(id: *) |
|
public |
|
|
public |
L2DPose() |
|
public |
|
|
public |
|
|
public |
|
|
public |
A matrix stack releated to draw the model |
|
public |
ModelSettingJson(null: *): Structure return the struct of ModelSettingJson |
|
public |
PlatformManager(null: *): Structure Define the variable type of PlatformManager |
|
public |
cManager(eventemitter: *) |
|
public |
cModel() |
|
public |
captureFrame(callback: Function): null Capture current frame to png file |
|
public |
configApplyer(userConfig: Object): null Apply users function, make the full settings |
|
public |
Create the canvas and styles using DOM |
|
public |
Get current script path |
|
public |
theRealInit(emitter: *): null Main function of live2d-widget |
Static Public
public L2DExpressionMotion() source
import {L2DExpressionMotion} from 'live2d-widget/src/lib/Live2DFramework.js'
public L2DExpressionParam() source
import {L2DExpressionParam} from 'live2d-widget/src/lib/Live2DFramework.js'
public L2DModelMatrix(w: *, h: *) source
import {L2DModelMatrix} from 'live2d-widget/src/lib/Live2DFramework.js'
Params:
Name | Type | Attribute | Description |
w | * | ||
h | * |
public L2DMotionManager() source
import {L2DMotionManager} from 'live2d-widget/src/lib/Live2DFramework.js'
public L2DPartsParam(id: *) source
import {L2DPartsParam} from 'live2d-widget/src/lib/Live2DFramework.js'
Params:
Name | Type | Attribute | Description |
id | * |
public L2DTargetPoint() source
import {L2DTargetPoint} from 'live2d-widget/src/lib/Live2DFramework.js'
public L2DViewMatrix() source
import {L2DViewMatrix} from 'live2d-widget/src/lib/Live2DFramework.js'
public Live2DFramework() source
import {Live2DFramework} from 'live2d-widget/src/lib/Live2DFramework.js'
public MatrixStack() source
import {MatrixStack} from 'live2d-widget/src/utils/MatrixStack.js'
A matrix stack releated to draw the model
public ModelSettingJson(null: *): Structure source
import {ModelSettingJson} from 'live2d-widget/src/utils/ModelSettingJson.js'
return the struct of ModelSettingJson
Params:
Name | Type | Attribute | Description |
null | * |
Return:
Structure | ModelSettingJson |
public PlatformManager(null: *): Structure source
import {PlatformManager} from 'live2d-widget/src/PlatformManager.js'
Define the variable type of PlatformManager
Params:
Name | Type | Attribute | Description |
null | * |
Return:
Structure | PlatformManager |
public cManager(eventemitter: *) source
import {cManager} from 'live2d-widget/src/cManager.js'
Params:
Name | Type | Attribute | Description |
eventemitter | * |
public captureFrame(callback: Function): null source
import {captureFrame} from 'live2d-widget/src/cLive2DApp.js'
Capture current frame to png file
Params:
Name | Type | Attribute | Description |
callback | Function | The callback function which will receive the current frame |
Example:
You can use codes below to let the user download the current frame
L2Dwidget.captureFrame(
function(e){
let link = document.createElement('a');
document.body.appendChild(link);
link.setAttribute('type', 'hidden');
link.href = e;
link.download = 'live2d.png';
link.click();
}
);
public configApplyer(userConfig: Object): null source
import {configApplyer} from 'live2d-widget/src/config/configMgr.js'
Apply users function, make the full settings
Params:
Name | Type | Attribute | Description |
userConfig | Object |
|
User's custom config |
public createElement(): null source
import {createElement} from 'live2d-widget/src/elementMgr.js'
Create the canvas and styles using DOM
public getCurrentPath(): String source
import {getCurrentPath} from 'live2d-widget/src/wpPublicPath.js'
Get current script path
Example:
get 'file:///C:/git/live2d-widget/dev/bundle.js' or 'https://www.host.com/test/js/bundle.js'
public theRealInit(emitter: *): null source
import {theRealInit} from 'live2d-widget/src/cLive2DApp.js'
Main function of live2d-widget
Params:
Name | Type | Attribute | Description |
emitter | * |