mirror of
https://ghfast.top/https://github.com/zsjy/halo-theme-dream2.0-plus.git
synced 2025-03-16 00:49:40 +08:00
1 line
141 KiB
JavaScript
1 line
141 KiB
JavaScript
![]() |
!function(i){function r(t){var e;return(o[t]||(e=o[t]={i:t,l:!1,exports:{}},i[t].call(e.exports,e,e.exports,r),e.l=!0,e)).exports}var o={};r.m=i,r.c=o,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=4)}([function(t,e,i){"use strict";function r(){this.live2DModel=null,this.modelMatrix=null,this.eyeBlink=null,this.physics=null,this.pose=null,this.debugMode=!1,this.initialized=!1,this.updating=!1,this.alpha=1,this.accAlpha=0,this.lipSync=!1,this.lipSyncValue=0,this.accelX=0,this.accelY=0,this.accelZ=0,this.dragX=0,this.dragY=0,this.startTimeMSec=null,this.mainMotionManager=new _,this.expressionManager=new _,this.motions={},this.expressions={},this.isTexLoaded=!1}function l(){AMotion.prototype.constructor.call(this),this.paramList=new Array}function $(){this.id="",this.type=-1,this.value=null}function o(){this.nextBlinkTime=null,this.stateStartTime=null,this.blinkIntervalMsec=null,this.eyeState=p.STATE_FIRST,this.blinkIntervalMsec=4e3,this.closingMotionMsec=100,this.closedMotionMsec=50,this.openingMotionMsec=150,this.closeIfZero=!0,this.eyeID_L="PARAM_EYE_L_OPEN",this.eyeID_R="PARAM_EYE_R_OPEN"}function n(){this.tr=new Float32Array(16),this.identity()}function s(t,e){n.prototype.constructor.call(this),this.width=t,this.height=e}function _(){MotionQueueManager.prototype.constructor.call(this),this.currentPriority=null,this.reservePriority=null,this.super=MotionQueueManager.prototype}function P(){this.physicsList=new Array,this.startTimeMSec=UtSystem.getUserTimeMSec()}function f(){this.lastTime=0,this.lastModel=null,this.partsGroups=new Array}function d(t){this.paramIndex=-1,this.partsIndex=-1,this.link=null,this.id=t}function a(){this.EPSILON=.01,this.faceTargetX=0,this.faceTargetY=0,this.faceX=0,this.faceY=0,this.faceVX=0,this.faceVY=0,this.lastTimeSec=0}function h(){n.prototype.constructor.call(this),this.screenLeft=null,this.screenRight=null,this.screenTop=null,this.screenBottom=null,this.maxLeft=null,this.maxRight=null,this.maxTop=null,this.maxBottom=null,this.max=Number.MAX_VALUE,this.min=0}function L(){}var u=0,p=(r.prototype.getModelMatrix=function(){return this.modelMatrix},r.prototype.setAlpha=function(t){this.alpha=t=(t=.999<t?1:t)<.001?0:t},r.prototype.getAlpha=function(){return this.alpha},r.prototype.isInitialized=function(){return this.initialized},r.prototype.setInitialized=function(t){this.initialized=t},r.prototype.isUpdating=function(){return this.updating},r.prototype.setUpdating=function(t){this.updating=t},r.prototype.getLive2DModel=function(){return this.live2DModel},r.prototype.setLipSync=function(t){this.lipSync=t},r.prototype.setLipSyncValue=function(t){this.lipSyncValue=t},r.prototype.setAccel=function(t,e,i){this.accelX=t,this.accelY=e,this.accelZ=i},r.prototype.setDrag=function(t,e){this.dragX=t,this.dragY=e},r.prototype.getMainMotionManager=function(){return this.mainMotionManager},r.prototype.getExpressionManager=function(){return this.expressionManager},r.prototype.loadModelData=function(t,e){var i=L.getPlatformManager(),r=(this.debugMode&&i.log("Load model : "+t),this);i.loadLive2DModel(t,function(t){r.live2DModel=t,r.live2DModel.saveParam(),0!=Live2D.getError()?console.error("Error : Failed to loadModelData()."):(r.modelMatrix=new s(r.live2DModel.getCanvasWidth(),r.live2DModel.getCanvasHeight()),r.modelMatrix.setWidth(2),r.modelMatrix.setCenterPosition(0,0),e(r.live2DModel))})},r.prototype.loadTexture=function(t,e,i){u++;var r=L.getPlatformManager(),o=(this.debugMode&&r.log("Load Texture : "+e),this);r.loadTexture(this.live2DModel,t,e,function(){0==--u&&(o.isTexLoaded=!0),"function"==typeof i&&i()})},r.prototype.loadMotion=function(e,t,i){var r,o=L.getPlatformManager(),n=(this.debugMode&&o.log("Load Motion : "+t),this);o.loadBytes(t,function(t){r=Live2DMotion.loadMotion(t),null!=e&&(n.motions[e]=r),i(r)})},r.prototype.loadExpression=function(e,t,i){var r=L.
|