Files
lifeRestart/public/libs/laya/min/laya.device.min.js
Vick Scarlet 150c991648 Squashed commit of the following:
commit b421082374
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Fri Dec 31 20:26:20 2021 +0800

    update specialthanks

commit 765a69294b
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Tue Dec 14 19:10:03 2021 +0800

    fix ios goto

commit 8eb8c3ca72
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Tue Dec 14 19:03:37 2021 +0800

    add event grade

commit ab705dd46c
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Tue Dec 14 18:48:42 2021 +0800

    build version

commit a1e4232369
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Tue Dec 14 18:47:05 2021 +0800

    change talent replace before property allocate

commit f4d7b3ae3c
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Tue Dec 14 18:06:18 2021 +0800

    add event grade

commit 0567e40ddc
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Thu Dec 2 21:28:10 2021 +0800

    add particle

commit f17003925e
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Thu Dec 2 20:14:26 2021 +0800

    change ui

commit f8beda1d8f
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Thu Dec 2 19:08:30 2021 +0800

    change popup message ui

commit 915a2aa17d
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Thu Dec 2 18:34:29 2021 +0800

    new build

commit b5edabc104
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Thu Dec 2 18:18:46 2021 +0800

    add hint message

commit a143feadaf
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Thu Dec 2 17:57:31 2021 +0800

    fix copy bug

commit eab1975791
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Thu Dec 2 17:56:28 2021 +0800

    add save/load

commit acf9b92134
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Thu Dec 2 14:35:33 2021 +0800

    add theme switch

commit 488a6054ab
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Wed Dec 1 18:30:36 2021 +0800

    fix uiManager bug

commit f0317eaf14
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Wed Dec 1 16:07:03 2021 +0800

    add message popup

commit eb02d1ee6f
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sun Nov 28 21:22:54 2021 +0800

    change relocation

commit 60503eae47
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sun Nov 28 19:27:16 2021 +0800

    change ScaleButton -> Laya.runtime.ScaleButton

commit 52ef5909c1
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sun Nov 28 19:26:31 2021 +0800

    change ScaleButton -> Laya.runtime.ScaleButton

commit 0284f6aa71
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sun Nov 28 19:05:24 2021 +0800

    config webpack

commit 0e272ffd99
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sun Nov 28 13:17:41 2021 +0800

    add thanks

commit e1e2ab4701
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sun Nov 28 11:40:21 2021 +0800

    add light theme

commit 4f55c00f86
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sat Nov 27 22:27:39 2021 +0800

    fix bug

commit 1d07bdfc46
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sat Nov 27 21:48:47 2021 +0800

    daily update

commit 52d6a0ca8f
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Wed Nov 24 23:10:04 2021 +0800

    daily update

commit f8dd720d4d
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Wed Nov 24 19:08:13 2021 +0800

    daily update

commit d088c1a862
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sun Nov 21 21:41:46 2021 +0800

    remove useless

commit a711fcf3ed
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Tue Nov 16 00:53:05 2021 +0800

    add achievement popup
    add page adaptive
    add talent extends

commit 05e02de3db
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sat Nov 13 01:24:04 2021 +0800

    add github and discord

commit bff0109cc5
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sat Nov 13 00:30:01 2021 +0800

    add trajectory auto mode

commit 54c04f65c2
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Fri Nov 12 19:54:31 2021 +0800

    fix property judge negative number bug

commit 660739530b
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Fri Nov 12 19:48:58 2021 +0800

    update achievement

commit c94e9e7433
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Thu Nov 11 21:37:45 2021 +0800

    update daily

commit c06cd9ea62
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Tue Nov 9 00:08:05 2021 +0800

    update daily

commit 2666983f89
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sun Nov 7 23:00:22 2021 +0800

    add uiManager auto scan and load skin resource

commit 22fa5d755a
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sun Nov 7 22:17:04 2021 +0800

    update framework

commit f40698d63e
Author: Vick Scarlet <scarlet_vick@outlook.com>
Date:   Sun Oct 31 00:13:22 2021 +0800

    add laya
2021-12-31 20:31:26 +08:00

1 line
17 KiB
JavaScript

!function(o){o.un,o.uns;var i=o.static,r=o.class,s=o.getset,n=(o.__newvec,laya.resource.Bitmap),l=laya.utils.Browser,a=(laya.events.Event,laya.events.EventDispatcher),c=(laya.utils.Handler,laya.maths.Rectangle,laya.renders.Render),t=laya.display.Sprite,d=(laya.display.Stage,laya.resource.Texture),h=laya.utils.Utils,e=laya.webgl.WebGL,u=laya.webgl.WebGLContext;r(v,"laya.device.geolocation.Geolocation"),v.getCurrentPosition=function(t,n){v.navigator.geolocation.getCurrentPosition(function(e){v.position.setPosition(e),t.runWith(v.position)},function(e){n.runWith(e)},{enableHighAccuracy:laya.device.geolocation.Geolocation.enableHighAccuracy,timeout:laya.device.geolocation.Geolocation.timeout,maximumAge:laya.device.geolocation.Geolocation.maximumAge})},v.watchPosition=function(t,n){return v.navigator.geolocation.watchPosition(function(e){v.position.setPosition(e),t.runWith(v.position)},function(e){n.runWith(e)},{enableHighAccuracy:v.enableHighAccuracy,timeout:v.timeout,maximumAge:v.maximumAge})},v.clearWatch=function(e){v.navigator.geolocation.clearWatch(e)},v.PERMISSION_DENIED=1,v.POSITION_UNAVAILABLE=2,v.TIMEOUT=3,v.enableHighAccuracy=!1,v.maximumAge=0,i(v,["navigator",function(){return this.navigator=l.window.navigator},"position",function(){return this.position=new m},"supported",function(){return this.supported=!!v.navigator.geolocation},"timeout",function(){return this.timeout=1e10}]);function v(){}var m=function(){function e(){this.pos=null,this.coords=null}r(e,"laya.device.geolocation.GeolocationInfo");var t=e.prototype;return t.setPosition=function(e){this.pos=e,this.coords=e.coords},s(0,t,"heading",function(){return this.coords.heading}),s(0,t,"latitude",function(){return this.coords.latitude}),s(0,t,"altitudeAccuracy",function(){return this.coords.altitudeAccuracy}),s(0,t,"longitude",function(){return this.coords.longitude}),s(0,t,"altitude",function(){return this.coords.altitude}),s(0,t,"accuracy",function(){return this.coords.accuracy}),s(0,t,"speed",function(){return this.coords.speed}),s(0,t,"timestamp",function(){return this.pos.timestamp}),e}(),g=(r(f,"laya.device.media.Media"),f.supported=function(){return!!l.window.navigator.getUserMedia},f.getMedia=function(e,t,n){l.window.navigator.getUserMedia&&l.window.navigator.getUserMedia(e,function(e){t.runWith(l.window.URL.createObjectURL(e))},function(e){n.runWith(e)})},f.__init$=function(){navigator.getUserMedia=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia},f);function f(){}var p=(r(y,"laya.device.motion.AccelerationInfo"),y);function y(){this.x=NaN,this.y=NaN,this.z=NaN}var E=(r(L,"laya.device.motion.RotationInfo"),L);function L(){this.absolute=!1,this.alpha=NaN,this.beta=NaN,this.gamma=NaN,this.compassAccuracy=NaN}var w=function(a){function n(e){n.__super.call(this),this.onDeviceOrientationChange=this.onDeviceOrientationChange.bind(this)}r(n,"laya.device.motion.Accelerator",a);var e=n.prototype;return e.on=function(e,t,n,i){return a.prototype.on.call(this,e,t,n,i),l.window.addEventListener("devicemotion",this.onDeviceOrientationChange),this},e.off=function(e,t,n,i){return void 0===i&&(i=!1),this.hasListener(e)||l.window.removeEventListener("devicemotion",this.onDeviceOrientationChange),a.prototype.off.call(this,e,t,n,i)},e.onDeviceOrientationChange=function(e){var t=e.interval;n.acceleration.x=e.acceleration.x,n.acceleration.y=e.acceleration.y,n.acceleration.z=e.acceleration.z,n.accelerationIncludingGravity.x=e.accelerationIncludingGravity.x,n.accelerationIncludingGravity.y=e.accelerationIncludingGravity.y,n.accelerationIncludingGravity.z=e.accelerationIncludingGravity.z,n.rotationRate.alpha=-1*e.rotationRate.gamma,n.rotationRate.beta=-1*e.rotationRate.alpha,n.rotationRate.gamma=e.rotationRate.beta,l.onAndroid?(n.onChrome&&(n.rotationRate.alpha*=180/Math.PI,n.rotationRate.beta*=180/Math.PI,n.rotationRate.gamma*=180/Math.PI),n.acceleration.x*=-1,n.accelerationIncludingGravity.x*=-1):l.onIOS&&(n.acceleration.y*=-1,n.acceleration.z*=-1,n.accelerationIncludingGravity.y*=-1,n.accelerationIncludingGravity.z*=-1,t*=1e3),this.event("change",[n.acceleration,n.accelerationIncludingGravity,n.rotationRate,t])},s(1,n,"instance",function(){return n._instance=n._instance||new n(0),n._instance},laya.events.EventDispatcher._$SET_instance),n.getTransformedAcceleration=function(e){n.transformedAcceleration=n.transformedAcceleration||new p,n.transformedAcceleration.z=e.z,90==l.window.orientation?(n.transformedAcceleration.x=e.y,n.transformedAcceleration.y=-e.x):-90==l.window.orientation?(n.transformedAcceleration.x=-e.y,n.transformedAcceleration.y=e.x):l.window.orientation?180==l.window.orientation&&(n.transformedAcceleration.x=-e.x,n.transformedAcceleration.y=-e.y):(n.transformedAcceleration.x=e.x,n.transformedAcceleration.y=e.y);e=NaN;return-90==o.stage.canvasDegree?(e=n.transformedAcceleration.x,n.transformedAcceleration.x=-n.transformedAcceleration.y,n.transformedAcceleration.y=e):90==o.stage.canvasDegree&&(e=n.transformedAcceleration.x,n.transformedAcceleration.x=n.transformedAcceleration.y,n.transformedAcceleration.y=-e),n.transformedAcceleration},n._instance=null,n.transformedAcceleration=null,i(n,["acceleration",function(){return this.acceleration=new p},"accelerationIncludingGravity",function(){return this.accelerationIncludingGravity=new p},"rotationRate",function(){return this.rotationRate=new E},"onChrome",function(){return this.onChrome=-1<l.userAgent.indexOf("Chrome")}]),n}(a),x=(function(a){function t(e){t.__super.call(this),this.onDeviceOrientationChange=this.onDeviceOrientationChange.bind(this)}r(t,"laya.device.motion.Gyroscope",a);var e=t.prototype;e.on=function(e,t,n,i){return a.prototype.on.call(this,e,t,n,i),l.window.addEventListener("deviceorientation",this.onDeviceOrientationChange),this},e.off=function(e,t,n,i){return void 0===i&&(i=!1),this.hasListener(e)||l.window.removeEventListener("deviceorientation",this.onDeviceOrientationChange),a.prototype.off.call(this,e,t,n,i)},e.onDeviceOrientationChange=function(e){t.info.alpha=e.alpha,t.info.beta=e.beta,t.info.gamma=e.gamma,e.webkitCompassHeading&&(t.info.alpha=-1*e.webkitCompassHeading,t.info.compassAccuracy=e.webkitCompassAccuracy),this.event("change",[e.absolute,t.info])},s(1,t,"instance",function(){return t._instance=t._instance||new t(0),t._instance},laya.events.EventDispatcher._$SET_instance),t._instance=null,i(t,["info",function(){return this.info=new E}])}(a),function(){function e(){this.throushold=0,this.shakeInterval=0,this.callback=null,this.lastX=NaN,this.lastY=NaN,this.lastZ=NaN,this.lastMillSecond=NaN,e.__super.call(this)}r(e,"laya.device.Shake",a);var t=e.prototype;t.start=function(e,t){this.throushold=e,this.shakeInterval=t,this.lastX=this.lastY=this.lastZ=NaN,w.instance.on("change",this,this.onShake)},t.stop=function(){w.instance.off("change",this,this.onShake)},t.onShake=function(e,t,n,i){if(isNaN(this.lastX))return this.lastX=t.x,this.lastY=t.y,this.lastZ=t.z,void(this.lastMillSecond=l.now());var a=Math.abs(this.lastX-t.x),o=Math.abs(this.lastY-t.y),r=Math.abs(this.lastZ-t.z);this.isShaked(a,o,r)&&l.now()-this.lastMillSecond>this.shakeInterval&&(this.event("change"),this.lastMillSecond=l.now()),this.lastX=t.x,this.lastY=t.y,this.lastZ=t.z},t.isShaked=function(e,t,n){return e>this.throushold&&t>this.throushold||e>this.throushold&&n>this.throushold||t>this.throushold&&n>this.throushold},s(1,e,"instance",function(){return e._instance=e._instance||new e,e._instance},laya.events.EventDispatcher._$SET_instance),e._instance=null}(),function(n){function i(e,t){this.htmlVideo=null,this.videoElement=null,this.internalTexture=null,void 0===e&&(e=320),void 0===t&&(t=240),i.__super.call(this),c.isWebGL?this.htmlVideo=new b:this.htmlVideo=new T,this.videoElement=this.htmlVideo.getVideo(),(this.videoElement.layaTarget=this).internalTexture=new d(this.htmlVideo),this.videoElement.addEventListener("abort",i.onAbort),this.videoElement.addEventListener("canplay",i.onCanplay),this.videoElement.addEventListener("canplaythrough",i.onCanplaythrough),this.videoElement.addEventListener("durationchange",i.onDurationchange),this.videoElement.addEventListener("emptied",i.onEmptied),this.videoElement.addEventListener("error",i.onError),this.videoElement.addEventListener("loadeddata",i.onLoadeddata),this.videoElement.addEventListener("loadedmetadata",i.onLoadedmetadata),this.videoElement.addEventListener("loadstart",i.onLoadstart),this.videoElement.addEventListener("pause",i.onPause),this.videoElement.addEventListener("play",i.onPlay),this.videoElement.addEventListener("playing",i.onPlaying),this.videoElement.addEventListener("progress",i.onProgress),this.videoElement.addEventListener("ratechange",i.onRatechange),this.videoElement.addEventListener("seeked",i.onSeeked),this.videoElement.addEventListener("seeking",i.onSeeking),this.videoElement.addEventListener("stalled",i.onStalled),this.videoElement.addEventListener("suspend",i.onSuspend),this.videoElement.addEventListener("timeupdate",i.onTimeupdate),this.videoElement.addEventListener("volumechange",i.onVolumechange),this.videoElement.addEventListener("waiting",i.onWaiting),this.videoElement.addEventListener("ended",this.onPlayComplete.bind(this)),this.size(e,t),l.onMobile&&(this.onDocumentClick=this.onDocumentClick.bind(this),l.document.addEventListener("touchend",this.onDocumentClick))}r(i,"laya.device.media.Video",n);var e=i.prototype;return e.onPlayComplete=function(e){o.timer.clear(this,this.renderCanvas),this.event("ended")},e.load=function(e){0==e.indexOf("blob:")?this.videoElement.src=e:this.htmlVideo.setSource(e,laya.device.media.Video.MP4)},e.play=function(){this.videoElement.play(),o.timer.frameLoop(1,this,this.renderCanvas)},e.pause=function(){this.videoElement.pause(),o.timer.clear(this,this.renderCanvas)},e.reload=function(){this.videoElement.load()},e.canPlayType=function(e){var t;switch(e){case laya.device.media.Video.MP4:t="video/mp4";break;case laya.device.media.Video.OGG:t="video/ogg";break;case laya.device.media.Video.WEBM:t="video/webm"}return this.videoElement.canPlayType(t)},e.renderCanvas=function(){0!==this.readyState&&(c.isWebGL&&this.htmlVideo.updateTexture(),this.graphics.clear(),this.graphics.drawTexture(this.internalTexture,0,0,this.width,this.height))},e.onDocumentClick=function(){this.videoElement.play(),this.videoElement.pause(),l.document.removeEventListener("touchend",this.onDocumentClick)},e.size=function(e,t){return n.prototype.size.call(this,e,t),this.videoElement.width=e/l.pixelRatio,this.paused&&this.renderCanvas(),this},e.destroy=function(e){n.prototype.destroy.call(this,e=void 0===e?!0:e),this.videoElement.removeEventListener("abort",i.onAbort),this.videoElement.removeEventListener("canplay",i.onCanplay),this.videoElement.removeEventListener("canplaythrough",i.onCanplaythrough),this.videoElement.removeEventListener("durationchange",i.onDurationchange),this.videoElement.removeEventListener("emptied",i.onEmptied),this.videoElement.removeEventListener("error",i.onError),this.videoElement.removeEventListener("loadeddata",i.onLoadeddata),this.videoElement.removeEventListener("loadedmetadata",i.onLoadedmetadata),this.videoElement.removeEventListener("loadstart",i.onLoadstart),this.videoElement.removeEventListener("pause",i.onPause),this.videoElement.removeEventListener("play",i.onPlay),this.videoElement.removeEventListener("playing",i.onPlaying),this.videoElement.removeEventListener("progress",i.onProgress),this.videoElement.removeEventListener("ratechange",i.onRatechange),this.videoElement.removeEventListener("seeked",i.onSeeked),this.videoElement.removeEventListener("seeking",i.onSeeking),this.videoElement.removeEventListener("stalled",i.onStalled),this.videoElement.removeEventListener("suspend",i.onSuspend),this.videoElement.removeEventListener("timeupdate",i.onTimeupdate),this.videoElement.removeEventListener("volumechange",i.onVolumechange),this.videoElement.removeEventListener("waiting",i.onWaiting),this.videoElement.removeEventListener("ended",this.onPlayComplete),this.pause(),this.videoElement=null},e.syncVideoPosition=function(){var e=o.stage,t=h.getGlobalPosAndScale(this),n=e._canvasTransform.a,i=e._canvasTransform.d,n=t.x*e.clientScaleX*n+e.offset.x,e=t.y*e.clientScaleY*i+e.offset.y;this.videoElement.style.left=n+"px",this.videoElement.style.top=e+"px",this.videoElement.width=this.width/l.pixelRatio,this.videoElement.height=this.height/l.pixelRatio},s(0,e,"buffered",function(){return this.videoElement.buffered}),s(0,e,"videoWidth",function(){return this.videoElement.videoWidth}),s(0,e,"currentSrc",function(){return this.videoElement.currentSrc}),s(0,e,"currentTime",function(){return this.videoElement.currentTime},function(e){this.videoElement.currentTime=e,this.renderCanvas()}),s(0,e,"ended",function(){return this.videoElement.ended}),s(0,e,"volume",function(){return this.videoElement.volume},function(e){this.videoElement.volume=e}),s(0,e,"videoHeight",function(){return this.videoElement.videoHeight}),s(0,e,"readyState",function(){return this.videoElement.readyState}),s(0,e,"duration",function(){return this.videoElement.duration}),s(0,e,"error",function(){return this.videoElement.error}),s(0,e,"loop",function(){return this.videoElement.loop},function(e){this.videoElement.loop=e}),s(0,e,"playbackRate",function(){return this.videoElement.playbackRate},function(e){this.videoElement.playbackRate=e}),s(0,e,"muted",function(){return this.videoElement.muted},function(e){this.videoElement.muted=e}),s(0,e,"paused",function(){return this.videoElement.paused}),s(0,e,"preload",function(){return this.videoElement.preload},function(e){this.videoElement.preload=e}),s(0,e,"seekable",function(){return this.videoElement.seekable}),s(0,e,"seeking",function(){return this.videoElement.seeking}),s(0,e,"height",n.prototype._$get_height,function(e){o.superSet(t,this,"height",e),this.paused&&this.renderCanvas()}),s(0,e,"width",n.prototype._$get_width,function(e){this.videoElement.width=this.width/l.pixelRatio,o.superSet(t,this,"width",e),this.paused&&this.renderCanvas()}),i.onAbort=function(e){e.target.layaTarget.event("abort")},i.onCanplay=function(e){e.target.layaTarget.event("canplay")},i.onCanplaythrough=function(e){e.target.layaTarget.event("canplaythrough")},i.onDurationchange=function(e){e.target.layaTarget.event("durationchange")},i.onEmptied=function(e){e.target.layaTarget.event("emptied")},i.onError=function(e){e.target.layaTarget.event("error")},i.onLoadeddata=function(e){e.target.layaTarget.event("loadeddata")},i.onLoadedmetadata=function(e){e.target.layaTarget.event("loadedmetadata")},i.onLoadstart=function(e){e.target.layaTarget.event("loadstart")},i.onPause=function(e){e.target.layaTarget.event("pause")},i.onPlay=function(e){e.target.layaTarget.event("play")},i.onPlaying=function(e){e.target.layaTarget.event("playing")},i.onProgress=function(e){e.target.layaTarget.event("progress")},i.onRatechange=function(e){e.target.layaTarget.event("ratechange")},i.onSeeked=function(e){e.target.layaTarget.event("seeked")},i.onSeeking=function(e){e.target.layaTarget.event("seeking")},i.onStalled=function(e){e.target.layaTarget.event("stalled")},i.onSuspend=function(e){e.target.layaTarget.event("suspend")},i.onTimeupdate=function(e){e.target.layaTarget.event("timeupdate")},i.onVolumechange=function(e){e.target.layaTarget.event("volumechange")},i.onWaiting=function(e){e.target.layaTarget.event("waiting")},i.MP4=1,i.OGG=2,i.CAMERA=4,i.WEBM=8,i.SUPPORT_PROBABLY="probably",i.SUPPORT_MAYBY="maybe",i.SUPPORT_NO="",i}(t)),T=function(){function e(){this.video=null,e.__super.call(this),this._w=1,this._h=1,this.createDomElement()}r(e,"laya.device.media.HtmlVideo",n);var t=e.prototype;return t.createDomElement=function(){var e=this;this._source=this.video=l.createElement("video");var t=this.video.style;t.position="absolute",t.top="0px",t.left="0px",this.video.addEventListener("loadedmetadata",function(){this._w=e.video.videoWidth,this._h=e.video.videoHeight}.bind(this))},t.setSource=function(e,t){for(;this.video.childElementCount;)this.video.firstChild.remove();t&x.MP4&&this.appendSource(e,"video/mp4"),t&x.OGG&&this.appendSource(e+".ogg","video/ogg")},t.appendSource=function(e,t){var n=l.createElement("source");n.src=e,n.type=t,this.video.appendChild(n)},t.getVideo=function(){return this.video},e.create=function(){return new e},e}(),b=(r(_,"laya.device.media.WebGLVideo",T),_.prototype.updateTexture=function(){l.onIPhone||(u.bindTexture(this.gl,3553,this._source),this.gl.texImage2D(3553,0,6407,6407,5121,this.video))},_);function _(){this.gl=null,this.preTarget=null,this.preTexture=null,_.__super.call(this),l.onIPhone||(this.gl=e.mainContext,this._source=this.gl.createTexture(),this.preTarget=u.curBindTexTarget,this.preTexture=u.curBindTexValue,u.bindTexture(this.gl,3553,this._source),this.gl.texParameteri(3553,10242,33071),this.gl.texParameteri(3553,10243,33071),this.gl.texParameteri(3553,10240,9729),this.gl.texParameteri(3553,10241,9729),this.preTarget&&this.preTexture&&u.bindTexture(this.gl,this.preTarget,this.preTexture))}o.__init([g])}((window,document,Laya)),"function"==typeof define&&define.amd&&define("laya.core",["require","exports"],function(e,t){"use strict";for(var n in Object.defineProperty(t,"__esModule",{value:!0}),Laya){var i=Laya[n];i&&i.__isclass&&(t[n]=i)}});