mirror of
https://github.com/eugene-serb/wavelovers.git
synced 2023-09-09 23:41:16 +03:00
2 lines
4.1 KiB
JavaScript
2 lines
4.1 KiB
JavaScript
|
"use strict";(self["webpackChunkwavelovers"]=self["webpackChunkwavelovers"]||[]).push([[807],{3913:function(t,a,e){var n=e(2482);class s{constructor(t,a,e,s){(0,n.Z)(this,"startDelay",void 0),(0,n.Z)(this,"duration",void 0),(0,n.Z)(this,"weakMagnitude",void 0),(0,n.Z)(this,"strongMagnitude",void 0),this.startDelay=t,this.duration=a,this.weakMagnitude=e,this.strongMagnitude=s}}a["Z"]=s},6259:function(t,a,e){e.d(a,{Z:function(){return u}});var n=e(3396),s=e(1746),i=(0,n.aZ)({name:"ComputedGamepads",data:()=>({timestamp:0,interval:0}),computed:{gamepads:function(){const t=this.timestamp,a=s.Z.getters.gamepads;return a.forEach((a=>{a.interval=t})),a}},methods:{updateComputed:function(){this.timestamp=Date.now()}},mounted(){this.interval=setInterval(this.updateComputed,1)},unmounted(){clearInterval(this.interval)}});const d=i;var u=d},6807:function(t,a,e){e.r(a),e.d(a,{default:function(){return D}});var n=e(3396);const s=(0,n._)("h1",{class:"visually-hidden"},"Wavelovers <20> Manual",-1);function i(t,a,e,i,d,u){const o=(0,n.up)("AppManual");return(0,n.wg)(),(0,n.iD)(n.HY,null,[s,(0,n.Wm)(o)],64)}var d=e(9242);const u={class:"content-item app-manual"},o={class:"manual-form__input"},p=(0,n._)("span",null,"Weak Magnitude",-1),r={class:"manual-form__input"},l=(0,n._)("span",null,"Strong Magnitude",-1),h=(0,n.uE)('<div class="manual-controls"><div><kbd>RT</kbd><span> – Vibrate</span></div><div><kbd>A</kbd><span> – Combined Mode</span></div><div><kbd>X</kbd><span> – Strong Mode</span></div><div><kbd>Y</kbd><span> – Light Mode</span></div><div><kbd>B</kbd><span> – Lock Intensity</span></div></div>',1),m=(0,n.Uk)("Press any gamepad button or connect a new gamepad to vibrate.");function g(t,a,e,s,i,g){const c=(0,n.up)("NavigationList"),v=(0,n.up)("GamepadList"),k=(0,n.up)("MessageItem");return(0,n.wg)(),(0,n.iD)(n.HY,null,[(0,n.Wm)(c),(0,n._)("div",u,[(0,n._)("label",o,[p,(0,n.wy)((0,n._)("input",{"onUpdate:modelValue":a[0]||(a[0]=a=>t.weakMagnitude=a),type:"range",required:"",disabled:"",min:"0.0",max:"1.0",step:"0.01"},null,512),[[d.nr,t.weakMagnitude]])]),(0,n._)("label",r,[l,(0,n.wy)((0,n._)("input",{"onUpdate:modelValue":a[1]||(a[1]=a=>t.strongMagnitude=a),type:"range",required:"",disabled:"",min:"0.0",max:"1.0",step:"0.01"},null,512),[[d.nr,t.strongMagnitude]])]),h]),t.gamepads.length>0?((0,n.wg)(),(0,n.j4)(v,{key:0,gamepads:t.gamepads},null,8,["gamepads"])):((0,n.wg)(),(0,n.j4)(k,{key:1},{default:(0,n.w5)((()=>[m])),_:1}))],64)}var c=e(1746),v=e(4246),k=e(3375),M=e(9808),b=e(6259),w=e(3913),f=(0,n.aZ)({name:"AppCustom",mixins:[b.Z],components:{NavigationList:v.Z,GamepadList:k.Z,MessageItem:M.Z},data:()=>({mode:0,lock:!1,startDelay:0,duration:260,weakMagnitude:0,strongMagnitude:0}),methods:{start:function(){const t=new w.Z(this.startDelay,this.duration,this.weakMagnitude,this.strongMagnitude);c.Z.dispatch("vibrate",t)},stop:function(){c.Z.dispatch("setIsActive",!1),c.Z.dispatch("setMode",0),c.Z.dispatch("reset")},eventLoop:function(){this.updateComputed(),this.updateMode(),this.updatePattern(),this.handle()},updateMode:function(){this.gamepads.length>0&&(!0===this.gamepads[0].unit.buttons[1].pressed&&(this.lock=!this.lock),!1===this.lock&&(!0===this.gamepads[0].unit.buttons[0].pressed&&(this.mode=0),!0===this.gamepads[0].unit.buttons[2].pressed&&(this.mode=1),!0===this.gamepads[0].unit.buttons[3].pressed&&(this.mode=2)))},updatePattern:function(){this.gamepads.length>0&&!1===this.lock&&(0===this.mode&&(this.weakMagnitude=this.gamepads[0].unit.buttons[7].value,this.strongMagnitude=this.gamepads[0].unit.buttons[7].value),1===this.mode&&(this.weakMagnitude=0,this.strongMagnitude=this.gamepads[0].unit.buttons[7].value),2===this.mode&&(this.weakMagnitude=this.gamepads[0].unit.buttons[7].value,this.strongMagnitude=0))},handle:function(){this.gamepads.length>0&&this.gamepads.forEach((t=>{t.unit.buttons[7].value>0||!0===this.lock?this.start():this.stop()}))}},mounted(){this.interval=setInterval(this.eventLoop,250)}}),Z=e(89);const y=(0,Z.Z)(f,[["render",g]]);var _=y,C=(0,n.aZ)({name:"ManualView",components:{AppManual:_}});cons
|
|||
|
//# sourceMappingURL=807.369d563e.js.map
|