mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-31 12:41:20 -08:00
add index.esm.html
This commit is contained in:
1 parent
a64e13c9c1
commit
2a7e3d5e03
194 files changed
+11632
-371
No files matched your search
+4981
File diff suppressed because it is too large.
Load diff
+2
-2
@@ -2,7 +2,7 @@
|
||||
/*!
|
||||
* artplayer-plugin-danmuku-mask.js v1.0.0
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer
|
||||
* (c) 2017-2024 Harvey Zack
|
||||
* (c) 2017-2025 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(e,t,r,n,s){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},o="function"==typeof a[n]&&a[n],l=o.cache||{},i="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,r){if(!l[t]){if(!e[t]){var s="function"==typeof a[n]&&a[n];if(!r&&s)return s(t,!0);if(o)return o(t,!0);if(i&&"string"==typeof t)return i(t);var p=Error("Cannot find module '"+t+"'");throw p.code="MODULE_NOT_FOUND",p}d.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},d.cache={};var c=l[t]=new u.Module(t);e[t][0].call(c.exports,d,c,c.exports,this)}return l[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:u(t)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=l,u.parent=o,u.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(u,"root",{get:function(){return a[n]}}),a[n]=u;for(var p=0;p<t.length;p++)u(t[p]);if(r){var c=u(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define(function(){return c})}}({"3nz8g":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",()=>o);var s=e("@tensorflow/tfjs-core");e("@tensorflow/tfjs-backend-webgl"),e("@tensorflow/tfjs-backend-cpu");var a=e("@tensorflow-models/body-segmentation");function o(e={}){return t=>{let{template:{$player:r,$video:n,$danmuku:o}}=t,l=null,i=null,u=null,p=null,c=!1,d={solutionPath:e.solutionPath||"https://cdn.jsdelivr.net/npm/@mediapipe/selfie_segmentation",modelSelection:e.modelSelection||1,smoothSegmentation:void 0===e.smoothSegmentation||e.smoothSegmentation,minDetectionConfidence:e.minDetectionConfidence||.5,minTrackingConfidence:e.minTrackingConfidence||.5,selfieMode:e.selfieMode||!1,drawContour:e.drawContour||!1,foregroundThreshold:e.foregroundThreshold||.5,opacity:e.opacity||1,maskBlurAmount:e.maskBlurAmount||3};async function f(){try{await s.setBackend("webgl"),console.log("Using WebGL backend")}catch(e){console.warn("WebGL backend not available, falling back to CPU"),await s.setBackend("cpu")}}async function h(){await f();let e=a.SupportedModels.MediaPipeSelfieSegmentation,t={runtime:"mediapipe",modelType:"general",solutionPath:d.solutionPath,modelSelection:d.modelSelection,smoothSegmentation:d.smoothSegmentation,minDetectionConfidence:d.minDetectionConfidence,minTrackingConfidence:d.minTrackingConfidence,selfieMode:d.selfieMode};try{l=await a.createSegmenter(e,t),c=!0,console.log("Segmenter initialized successfully")}catch(e){console.error("Error initializing segmenter:",e),c=!1}}async function m(){if(!c||n.paused||n.ended){p=requestAnimationFrame(m);return}try{i.width=n.videoWidth,i.height=n.videoHeight;let e=await l.segmentPeople(n);if(!e||0===e.length){p=requestAnimationFrame(m);return}let t=await a.toBinaryMask(e,{r:255,g:255,b:255,a:255},{r:0,g:0,b:0,a:255},d.drawContour,d.foregroundThreshold);await a.drawMask(i,n,t,d.opacity,d.maskBlurAmount);let r=u.getImageData(0,0,i.width,i.height);u.putImageData(function(e){let t=e.data;for(let e=0;e<t.length;e+=4)t[e]>250&&t[e+1]>250&&t[e+2]>250&&(t[e+3]=0);return e}(r),0,0),o.style.maskImage=`url(${i.toDataURL()})`}catch(e){console.error("Error in segmentBody:",e)}p=requestAnimationFrame(m)}async function g(){c||await h(),i||(u=(i=document.createElement("canvas")).getContext("2d"),Object.assign(i.style,{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",pointerEvents:"none",opacity:"0"}),r.appendChild(i)),Object.assign(o.style,{maskMode:"alpha",maskSize:"contain",maskRepeat:"no-repeat",backgroundSize:"contain",backgroundRepeat:"no-repeat"}),m()}function x(){o.style.maskImage="none",p&&(cancelAnimationFrame(p),p=null)}return t.on("ready",g),t.on("destroy",x),{name:"artplayerPluginDanmukuMask",start:g,stop:x}}}"undefined"!=typeof window&&(window.artplayerPluginDanmukuMask=o)},{"@tensorflow/tfjs-core":"2nuhV","@tensorflow/tfjs-backend-webgl":"2cOos","@tensorflow/tfjs-backend-cpu":"61SaF","@tensorflow-models/body-segmentation":"79Ppz","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2nuhV":[function(e,t,r){/** * @license * Copyright 2017 Google LLC. All Rights Reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ============================================================================= */var n=e("@parcel/transformer-js/src/esmodule-helpers.js"Line truncated
|
||||
!function(e,t,r,n,s,a,o,l){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},p="function"==typeof i[n]&&i[n],u=p.i||{},c=p.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,r){if(!c[t]){if(!e[t]){if(s[t])return s[t];var a="function"==typeof i[n]&&i[n];if(!r&&a)return a(t,!0);if(p)return p(t,!0);if(d&&"string"==typeof t)return d(t);var o=Error("Cannot find module '"+t+"'");throw o.code="MODULE_NOT_FOUND",o}u.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},u.cache={};var l=c[t]=new f.Module(t);e[t][0].call(l.exports,u,l,l.exports,i)}return c[t].exports;function u(e){var t=u.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.require=d,this.exports={}},f.modules=e,f.cache=c,f.parent=p,f.distDir=void 0,f.publicUrl=void 0,f.devServer=void 0,f.i=u,f.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(f,"root",{get:function(){return i[n]}}),i[n]=f;for(var m=0;m<t.length;m++)f(t[m]);if(r){var h=f(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=h:"function"==typeof define&&define.amd&&define(function(){return h})}}({ecCzQ:[function(e,t,r,n){var s=e("@parcel/transformer-js/src/esmodule-helpers.js");s.defineInteropFlag(r),s.export(r,"default",()=>l);var a=e("@tensorflow/tfjs-core");e("@tensorflow/tfjs-backend-webgl"),e("@tensorflow/tfjs-backend-cpu");var o=e("@tensorflow-models/body-segmentation");function l(e={}){return t=>{let{template:{$video:r,$danmuku:n}}=t,s=null,l=null,i=null,p=null,u=!1,c={solutionPath:e.solutionPath||"https://cdn.jsdelivr.net/npm/@mediapipe/selfie_segmentation",modelSelection:e.modelSelection||1,smoothSegmentation:void 0===e.smoothSegmentation||e.smoothSegmentation,minDetectionConfidence:e.minDetectionConfidence||.5,minTrackingConfidence:e.minTrackingConfidence||.5,selfieMode:e.selfieMode||!1,drawContour:e.drawContour||!1,foregroundThreshold:e.foregroundThreshold||.5,opacity:e.opacity||1,maskBlurAmount:e.maskBlurAmount||3};async function d(){try{await a.setBackend("webgl")}catch(e){console.warn("WebGL backend not available, falling back to CPU"),await a.setBackend("cpu")}}async function f(){await d();let e=o.SupportedModels.MediaPipeSelfieSegmentation,t={runtime:"mediapipe",modelType:"general",solutionPath:c.solutionPath,modelSelection:c.modelSelection,smoothSegmentation:c.smoothSegmentation,minDetectionConfidence:c.minDetectionConfidence,minTrackingConfidence:c.minTrackingConfidence,selfieMode:c.selfieMode};try{s=await o.createSegmenter(e,t),console.log("Segmenter initialized:",s),u=!0}catch(e){console.error("Error initializing segmenter:",e),u=!1}}async function m(){if(!u||r.paused||r.ended){p=requestAnimationFrame(m);return}try{l.width=r.videoWidth,l.height=r.videoHeight;let e=await s.segmentPeople(r);if(!e||0===e.length){p=requestAnimationFrame(m);return}let t=await o.toBinaryMask(e,{r:255,g:255,b:255,a:255},{r:0,g:0,b:0,a:255},c.drawContour,c.foregroundThreshold);await o.drawMask(l,r,t,c.opacity,c.maskBlurAmount);let a=i.getImageData(0,0,l.width,l.height);i.putImageData(function(e){let t=e.data;for(let e=0;e<t.length;e+=4)t[e]>250&&t[e+1]>250&&t[e+2]>250&&(t[e+3]=0);return e}(a),0,0),n.style.maskImage=`url(${l.toDataURL()})`}catch(e){console.error("Error in segmentBody:",e)}p=requestAnimationFrame(m)}async function h(){u||await f(),l||(i=(l=document.createElement("canvas")).getContext("2d")),Object.assign(n.style,{maskMode:"alpha",maskSize:"contain",maskRepeat:"no-repeat",backgroundSize:"contain",backgroundRepeat:"no-repeat"}),m()}function g(){n.style.maskImage="none",p&&(cancelAnimationFrame(p),p=null)}return t.on("ready",h),t.on("destroy",g),{name:"artplayerPluginDanmukuMask",start:h,stop:g}}}"undefined"!=typeof window&&(window.artplayerPluginDanmukuMask=l)},{"@tensorflow/tfjs-core":"2Gtps","@tensorflow/tfjs-backend-webgl":"2ZcDF","@tensorflow/tfjs-backend-cpu":"b4yJT","@tensorflow-models/body-segmentation":"5Otso","@parcel/transformer-js/src/esmodule-helpers.js":"6ykb1"}],"2Gtps":[function(e,t,r,n){var s=e("@parcel/transformer-js/src/esmodule-helpers.js");s.defineInteropFlag(r),e("./base_side_effects");var a=e("./optimizers/register_optimizers"),o=e("./base");s.exportAll(o,r),(0,a.registerOptimizers)()},{"./base_side_effects":"2myjr","./optimizers/register_optimizers":"iq2z6","./base":"6xSpB","@parcel/transformer-js/src/esmodule-helpers.js":"6ykb1"}],"2myjr":[function(e,t,r,n){var s=e("./engine");e("./flags"),e("./platforms/platform_browser"),e("./platforms/platform_node");var a=e("./ops/buffer"),o=e("./ops/cast"),l=e("./ops/clone"),i=e("./ops/print"),p=e("./tensor");(0,s.getOrMakeEngine)();let u={buffer:a.buffer,cast:o.cast,clone:l.clone,print:i.print};(0,p.setOpHandler)(u)},{"./engine":"5aImO","./flags":"44Dje","./platforms/platform_browser":"5luux","./platforms/platform_node":"5A4CI","./ops/buffer":"avZau"Line truncated
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
/*!
|
||||
* artplayer-plugin-danmuku-mask.js v1.0.0
|
||||
* Github: https://github.com/zhw2590582/ArtPlayer
|
||||
* (c) 2017-2024 Harvey Zack
|
||||
* (c) 2017-2025 Harvey Zack
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
!function(e,r,t,n,a){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof o[n]&&o[n],i=s.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(r,t){if(!i[r]){if(!e[r]){var a="function"==typeof o[n]&&o[n];if(!t&&a)return a(r,!0);if(s)return s(r,!0);if(l&&"string"==typeof r)return l(r);var c=Error("Cannot find module '"+r+"'");throw c.code="MODULE_NOT_FOUND",c}f.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},f.cache={};var p=i[r]=new u.Module(r);e[r][0].call(p.exports,f,p,p.exports,this)}return i[r].exports;function f(e){var r=f.resolve(e);return!1===r?{}:u(r)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=i,u.parent=s,u.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(u,"root",{get:function(){return o[n]}}),o[n]=u;for(var c=0;c<r.length;c++)u(r[c]);if(t){var p=u(t);"object"==typeof exports&&"undefined"!=typeof module?module.exports=p:"function"==typeof define&&define.amd&&define(function(){return p})}}({laCzO:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"default",function(){return l});var a=e("@swc/helpers/_/_async_to_generator"),o=e("@swc/helpers/_/_ts_generator"),s=e("@tensorflow/tfjs-core");e("@tensorflow/tfjs-backend-webgl"),e("@tensorflow/tfjs-backend-cpu");var i=e("@tensorflow-models/body-segmentation");function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(r){var t=r.template,n=t.$player,l=t.$video,u=t.$danmuku,c=null,p=null,f=null,d=null,h=!1,m={solutionPath:e.solutionPath||"https://cdn.jsdelivr.net/npm/@mediapipe/selfie_segmentation",modelSelection:e.modelSelection||1,smoothSegmentation:void 0===e.smoothSegmentation||e.smoothSegmentation,minDetectionConfidence:e.minDetectionConfidence||.5,minTrackingConfidence:e.minTrackingConfidence||.5,selfieMode:e.selfieMode||!1,drawContour:e.drawContour||!1,foregroundThreshold:e.foregroundThreshold||.5,opacity:e.opacity||1,maskBlurAmount:e.maskBlurAmount||3};function g(){return(g=(0,a._)(function(){return(0,o._)(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,4]),[4,s.setBackend("webgl")];case 1:return e.sent(),console.log("Using WebGL backend"),[3,4];case 2:return e.sent(),console.warn("WebGL backend not available, falling back to CPU"),[4,s.setBackend("cpu")];case 3:return e.sent(),[3,4];case 4:return[2]}})})).apply(this,arguments)}function v(){return(v=(0,a._)(function(){var e,r;return(0,o._)(this,function(t){switch(t.label){case 0:return[4,function(){return g.apply(this,arguments)}()];case 1:t.sent(),e=i.SupportedModels.MediaPipeSelfieSegmentation,r={runtime:"mediapipe",modelType:"general",solutionPath:m.solutionPath,modelSelection:m.modelSelection,smoothSegmentation:m.smoothSegmentation,minDetectionConfidence:m.minDetectionConfidence,minTrackingConfidence:m.minTrackingConfidence,selfieMode:m.selfieMode},t.label=2;case 2:return t.trys.push([2,4,,5]),[4,i.createSegmenter(e,r)];case 3:return c=t.sent(),h=!0,console.log("Segmenter initialized successfully"),[3,5];case 4:return console.error("Error initializing segmenter:",t.sent()),h=!1,[3,5];case 5:return[2]}})})).apply(this,arguments)}function _(){return x.apply(this,arguments)}function x(){return(x=(0,a._)(function(){var e,r,t,n,a;return(0,o._)(this,function(o){switch(o.label){case 0:if(!h||l.paused||l.ended)return d=requestAnimationFrame(_),[2];o.label=1;case 1:return o.trys.push([1,5,,6]),p.width=l.videoWidth,p.height=l.videoHeight,[4,c.segmentPeople(l)];case 2:if(!(e=o.sent())||0===e.length)return d=requestAnimationFrame(_),[2];return r={r:255,g:255,b:255,a:255},t={r:0,g:0,b:0,a:255},[4,i.toBinaryMask(e,r,t,m.drawContour,m.foregroundThreshold)];case 3:return n=o.sent(),[4,i.drawMask(p,l,n,m.opacity,m.maskBlurAmount)];case 4:return o.sent(),a=f.getImageData(0,0,p.width,p.height),f.putImageData(function(e){for(var r=e.data,t=0;t<r.length;t+=4)r[t]>250&&r[t+1]>250&&r[t+2]>250&&(r[t+3]=0);return e}(a),0,0),u.style.maskImage="url(".concat(p.toDataURL(),")"),[3,6];case 5:return console.error("Error in segmentBody:",o.sent()),[3,6];case 6:return d=requestAnimationFrame(_),[2]}})})).apply(this,arguments)}function y(){return b.apply(this,arguments)}function b(){return(b=(0,a._)(function(){return(0,o._)(this,function(e){switch(e.label){case 0:if(h)return[3,2];return[4,function(){return v.apply(this,arguments)}()];case 1:e.sent(),e.label=2;case 2:return p||(f=(p=document.createElement("canvas")).getContext("2d"),Object.assign(p.style,{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",pointerEvents:"none",opacity:"0"}),n.appendChild(p)),Object.assign(u.style,{maskMode:"alpha",maskSize:"contain",maskRepeat:"no-repeat",backgroundSize:"contain",backgroundRepeat:"no-repeat"}),_(),[2]}})})).apply(this,arguments)}functLine truncated
|
||||
!function(e,t,r,n,a,o,s,i){var c="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof c[n]&&c[n],l=u.i||{},p=u.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,r){if(!p[t]){if(!e[t]){if(a[t])return a[t];var o="function"==typeof c[n]&&c[n];if(!r&&o)return o(t,!0);if(u)return u(t,!0);if(f&&"string"==typeof t)return f(t);var s=Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}l.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},l.cache={};var i=p[t]=new d.Module(t);e[t][0].call(i.exports,l,i,i.exports,c)}return p[t].exports;function l(e){var t=l.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.require=f,this.exports={}},d.modules=e,d.cache=p,d.parent=u,d.distDir=void 0,d.publicUrl=void 0,d.devServer=void 0,d.i=l,d.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(d,"root",{get:function(){return c[n]}}),c[n]=d;for(var h=0;h<t.length;h++)d(t[h]);if(r){var m=d(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=m:"function"==typeof define&&define.amd&&define(function(){return m})}}({"1FGEJ":[function(e,t,r,n){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",function(){return u});var o=e("@swc/helpers/cjs/_async_to_generator.cjs"),s=e("@swc/helpers/cjs/_ts_generator.cjs"),i=e("@tensorflow/tfjs-core");e("@tensorflow/tfjs-backend-webgl"),e("@tensorflow/tfjs-backend-cpu");var c=e("@tensorflow-models/body-segmentation");function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var r=t.template,n=r.$video,a=r.$danmuku,u=null,l=null,p=null,f=null,d=!1,h={solutionPath:e.solutionPath||"https://cdn.jsdelivr.net/npm/@mediapipe/selfie_segmentation",modelSelection:e.modelSelection||1,smoothSegmentation:void 0===e.smoothSegmentation||e.smoothSegmentation,minDetectionConfidence:e.minDetectionConfidence||.5,minTrackingConfidence:e.minTrackingConfidence||.5,selfieMode:e.selfieMode||!1,drawContour:e.drawContour||!1,foregroundThreshold:e.foregroundThreshold||.5,opacity:e.opacity||1,maskBlurAmount:e.maskBlurAmount||3};function m(){return(m=(0,o._)(function(){return(0,s._)(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,4]),[4,i.setBackend("webgl")];case 1:case 3:return e.sent(),[3,4];case 2:return e.sent(),console.warn("WebGL backend not available, falling back to CPU"),[4,i.setBackend("cpu")];case 4:return[2]}})})).apply(this,arguments)}function g(){return(g=(0,o._)(function(){var e,t;return(0,s._)(this,function(r){switch(r.label){case 0:return[4,function(){return m.apply(this,arguments)}()];case 1:r.sent(),e=c.SupportedModels.MediaPipeSelfieSegmentation,t={runtime:"mediapipe",modelType:"general",solutionPath:h.solutionPath,modelSelection:h.modelSelection,smoothSegmentation:h.smoothSegmentation,minDetectionConfidence:h.minDetectionConfidence,minTrackingConfidence:h.minTrackingConfidence,selfieMode:h.selfieMode},r.label=2;case 2:return r.trys.push([2,4,,5]),[4,c.createSegmenter(e,t)];case 3:return console.log("Segmenter initialized:",u=r.sent()),d=!0,[3,5];case 4:return console.error("Error initializing segmenter:",r.sent()),d=!1,[3,5];case 5:return[2]}})})).apply(this,arguments)}function v(){return _.apply(this,arguments)}function _(){return(_=(0,o._)(function(){var e,t,r,o,i;return(0,s._)(this,function(s){switch(s.label){case 0:if(!d||n.paused||n.ended)return f=requestAnimationFrame(v),[2];s.label=1;case 1:return s.trys.push([1,5,,6]),l.width=n.videoWidth,l.height=n.videoHeight,[4,u.segmentPeople(n)];case 2:if(!(e=s.sent())||0===e.length)return f=requestAnimationFrame(v),[2];return t={r:255,g:255,b:255,a:255},r={r:0,g:0,b:0,a:255},[4,c.toBinaryMask(e,t,r,h.drawContour,h.foregroundThreshold)];case 3:return o=s.sent(),[4,c.drawMask(l,n,o,h.opacity,h.maskBlurAmount)];case 4:return s.sent(),i=p.getImageData(0,0,l.width,l.height),p.putImageData(function(e){for(var t=e.data,r=0;r<t.length;r+=4)t[r]>250&&t[r+1]>250&&t[r+2]>250&&(t[r+3]=0);return e}(i),0,0),a.style.maskImage="url(".concat(l.toDataURL(),")"),[3,6];case 5:return console.error("Error in segmentBody:",s.sent()),[3,6];case 6:return f=requestAnimationFrame(v),[2]}})})).apply(this,arguments)}function x(){return y.apply(this,arguments)}function y(){return(y=(0,o._)(function(){return(0,s._)(this,function(e){switch(e.label){case 0:if(d)return[3,2];return[4,function(){return g.apply(this,arguments)}()];case 1:e.sent(),e.label=2;case 2:return l||(p=(l=document.createElement("canvas")).getContext("2d")),Object.assign(a.style,{maskMode:"alpha",maskSize:"contain",maskRepeat:"no-repeat",backgroundSize:"contain",backgroundRepeat:"no-repeat"}),v(),[2]}})})).apply(this,arguments)}function b(){a.style.maskImage="none",f&&(cancelAnimationFrame(f),f=null)}return t.on("ready",x),t.oLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"mappings":"C,A,S,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,E,I,E,A,a,O,W,W,A,a,O,K,K,A,a,O,O,O,A,a,O,O,O,C,E,E,A,Y,O,C,C,E,E,C,C,E,C,E,E,C,E,C,E,E,E,K,E,C,E,E,A,a,O,Q,A,Y,O,O,O,E,O,O,C,I,C,Q,S,E,C,C,C,E,G,C,C,C,E,C,C,G,C,C,C,E,C,C,G,C,C,E,C,O,C,C,E,C,I,E,A,Y,O,C,C,E,E,C,C,E,C,G,C,G,E,O,E,E,C,G,G,E,O,E,E,C,G,G,G,A,U,O,E,O,E,G,I,E,A,M,uB,E,I,O,E,I,C,mB,C,C,E,O,C,S,C,E,I,E,C,C,E,C,E,C,E,C,O,A,M,E,E,C,E,E,K,C,C,E,I,E,C,C,E,C,I,E,M,C,G,C,C,E,C,E,C,I,C,E,O,C,E,E,E,O,C,E,C,O,C,C,E,C,O,C,S,E,C,E,I,E,E,O,C,G,M,A,C,I,E,C,E,E,E,C,C,E,e,C,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EAMjB,IAAA,CAAA,aAAa,CAAG,EAGhB,IAAA,CAAA,WAAW,CAAG,EAId,IAAA,CAAA,UAAU,CAAiB,EAAE,CAK7B,IAAA,CAAA,iBAAiB,CAAa,EAAE,CAChC,IAAA,CAAA,WAAW,CAAG,EAEd,IAAA,CAAA,UAAU,CAAG,IAAI,QAOjB,IAAA,CAAA,SAAS,CAAG,CAAA,EACZ,IAAA,CAAA,aAAa,CAAgB,CAC3B,SAAU,EACV,WAAY,EACZ,UAAW,EACX,QAAS,EAAE,CACX,OAAQ,KACR,IAAI,aAAJ,CAEM,OAAO,MAAM,ILine truncated
|
||||
@@ -2,10 +2,16 @@
|
||||
"license": "MIT",
|
||||
"version": "1.0.0",
|
||||
"name": "artplayer-plugin-danmuku-mask",
|
||||
"types": "types/artplayer-plugin-danmuku-mask.d.ts",
|
||||
"description": "Danmuku mask plugin for ArtPlayer",
|
||||
"main": "dist/artplayer-plugin-danmuku-mask.js",
|
||||
"legacy": "dist/artplayer-plugin-danmuku-mask.legacy.js",
|
||||
"module": "dist/artplayer-plugin-danmuku-mask.esm.js",
|
||||
"types": "types/artplayer-plugin-danmuku-mask.d.ts",
|
||||
"exports": {
|
||||
"import": "./dist/artplayer-plugin-danmuku-mask.esm.js",
|
||||
"require": "./dist/artplayer-plugin-danmuku-mask.js",
|
||||
"default": "./dist/artplayer-plugin-danmuku-mask.js"
|
||||
},
|
||||
"author": "Harvey Zack <laozhaochaguan@gmail.com>",
|
||||
"browserslist": "last 1 Chrome version",
|
||||
"homepage": "https://artplayer.org",
|
||||
@@ -29,4 +35,4 @@
|
||||
"@tensorflow/tfjs-converter": "^4.21.0",
|
||||
"@tensorflow/tfjs-core": "^4.21.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user