@galacean/effects-threejs 1.6.8 → 1.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/dist/index.min.js +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects runtime threejs plugin for the web
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
|
|
6
|
-
* Version: v1.6.
|
|
6
|
+
* Version: v1.6.10
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
@@ -27524,7 +27524,7 @@ Geometry.create = function (engine, options) {
|
|
|
27524
27524
|
Mesh.create = function (engine, props) {
|
|
27525
27525
|
return new ThreeMesh(engine, props);
|
|
27526
27526
|
};
|
|
27527
|
-
var version = "1.6.
|
|
27527
|
+
var version = "1.6.10";
|
|
27528
27528
|
logger.info('THREEJS plugin version: ' + version);
|
|
27529
27529
|
|
|
27530
27530
|
exports.AbstractPlugin = AbstractPlugin;
|
package/dist/index.min.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects runtime threejs plugin for the web
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
|
|
6
|
-
* Version: v1.6.
|
|
6
|
+
* Version: v1.6.10
|
|
7
7
|
*/
|
|
8
8
|
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("three")):"function"==typeof define&&define.amd?define(["exports","three"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).ge=t.ge||{},t.ge.three={}),t.THREE)}(this,(function(t,e){"use strict";function r(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(r){if("default"!==r){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:function(){return t[r]}})}})),e.default=t,Object.freeze(e)}var i=r(e),n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},n(t,e)};function o(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var a=function(){return a=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},a.apply(this,arguments)};function s(t,e,r,i){return new(r||(r=Promise))((function(n,o){function a(t){try{u(i.next(t))}catch(t){o(t)}}function s(t){try{u(i.throw(t))}catch(t){o(t)}}function u(t){t.done?n(t.value):function(t){return t instanceof r?t:new r((function(e){e(t)}))}(t.value).then(a,s)}u((i=i.apply(t,e||[])).next())}))}function u(t,e){var r,i,n,o,a={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(u){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,i&&(n=2&s[0]?i.return:s[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,s[1])).done)return n;switch(i=0,n&&(s=[2&s[0],n.value]),s[0]){case 0:case 1:n=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(n=a.trys,(n=n.length>0&&n[n.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!n||s[1]>n[0]&&s[1]<n[3])){a.label=s[1];break}if(6===s[0]&&a.label<n[1]){a.label=n[1],n=s;break}if(n&&a.label<n[2]){a.label=n[2],a.ops.push(s);break}n[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(t){s=[6,t],i=0}finally{r=n=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function c(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],i=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,n,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return a}function h(t,e,r){if(r||2===arguments.length)for(var i,n=0,o=e.length;n<o;n++)!i&&n in e||(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var f=6,p="PRE_COLOR_0",d="PRE_COLOR_SIZE_0",m="PRE_MAIN_COLOR_0",v="PRE_MAIN_COLOR_SIZE_0",y="editor",x="none",g={"Filter not imported":"https://galacean.antgroup.com/effects/#/user/gasrv4ka5sacrwpg","Item duration can't be less than 0":"https://galacean.antgroup.com/effects/#/user/gasrv4ka5sacrwpg"};var T=[],E={};function S(){"function"==typeof WebGL2RenderingContext?b(WebGL2RenderingContext):"undefined"!=typeof WebGLRenderingContext?(b(WebGLRenderingContext),b(WebGLRenderingContext.prototype)):T.push("iOS16 lockdown mode, WebGL Constants not in global"),T.length||"HALF_FLOAT"in E||(E.HALF_FLOAT=5131)}function b(t){for(var e in t)/^[A-Z_]/.test(e)&&(E[e]=t[e])}T.length||S();var R,_,A,C,w,O,M,L,I,P,V,F,N={},z={};function D(t,e,r){t in N&&console.error("Filter ".concat(t," registered twice.")),N[t]=e,z[t]=r}function U(t){Object.keys(t).forEach((function(e){var r=l(t[e],2);D(e,r[0],r[1])}))}function B(t){var e=z[t.name];if(!e)throw Error("Filter ".concat(t.name," not imported, see ").concat(g["Filter not imported"]));return e(t)}function k(t,e){var r=N[t.name];if(!r)throw Error("Filter ".concat(t.name," not imported, see ").concat(g["Filter not imported"]));var i=r(t,e);return i.passSplitOptions||(i.passSplitOptions={attachments:[{texture:{format:E.RGBA}}]}),i}function G(t,e){return t.includes(e)||t.push(e),t}function X(t,e){var r=t.indexOf(e);return r>-1&&t.splice(r,1),t}function H(t,e,r,i){if(void 0===i&&(i=!1),!t.includes(e)&&(t.push(e),1!==t.length)){var n=t.length-1;if(n){var o=t[n];if(i)for(;t[n-1][r]<o[r]&&(t[n]=t[n-1],0!=--n););else for(;t[n-1][r]>o[r]&&(t[n]=t[n-1],0!=--n););t[n]=o}}}function Y(t,e,r,i){if(void 0===r&&(r=1),t.buffer.byteLength<t.BYTES_PER_ELEMENT*e){var n=Math.ceil(e*r);isNaN(i)||(n=Math.min(n,i));var o=new ArrayBuffer(t.BYTES_PER_ELEMENT*n),a=new t.constructor(o);return a.set(t),a}return t}function j(t,e){var r=[0,0,0,0];if(rr(t)){t=t.replace(/[\s\t\r\n]/g,"");var i=/rgba?\(([.\d]+),([.\d]+),([.\d]+),?([.\d]+)?\)/.exec(t);if(i){var n=+i[4];r=[+i[1],+i[2],+i[3],isNaN(n)?255:255*n]}else/^#[a-f\d]{3}$/i.test(t)?r=[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16),255]:(i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t))&&(r=[parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16),255]||[0,0,0,255])}else t instanceof Array&&(r=[t[0],t[1],t[2],isNaN(t[3])?255:t[3]]);if(e)for(var o=0;o<4;o++)r[o]/=255;return r}function W(t,e,r){if(t.length){for(var i=void 0,n=1;n<=t.length-1;n++){var o=t[n-1],a=t[n];if(o.stop<=e&&e<=a.stop){i=q(o.color,a.color,(e-o.stop)/(a.stop-o.stop));break}}return i||(i=t[t.length-1].color),r?i.map((function(t){return t/255})):i}return[0,0,0,0]}function Z(t){var e=[];if(t instanceof Array?t.forEach((function(t){var r=l(t,5),i=r[0],n=r[1],o=r[2],a=r[3],s=r[4];e.push({stop:Q(i),color:[n,o,a,s]})})):Object.keys(t).forEach((function(r){var i=j(t[r]);e.push({stop:Q(r),color:i})})),(e=e.sort((function(t,e){return t.stop-e.stop}))).length){0!==e[0].stop&&e.unshift({stop:0,color:e[0].color.slice()});var r=e[e.length-1];1!==r.stop&&e.push({stop:1,color:r.color.slice()})}return e}function q(t,e,r,i){var n=[],o=1-r;if(i)for(var a=0;a<4;a++)n[a]=t[a]*o+e[a]*r;else{for(a=0;a<3;a++)n[a]=Math.round(Math.sqrt(t[a]*t[a]*o+e[a]*e[a]*r));n[3]=Math.round(t[3]*o+e[3]*r)}return n}function Q(t){var e=/^(-)?([\d+.]+)%$/.exec(t);return e?+e[2]/100*(e[1]?-1:1):+t}function K(){return/\b[Aa]ndroid\b/.test(navigator.userAgent)}function J(){return K()||/\b(iPad|iPhone|iPod)\b/.test(navigator.userAgent)}function $(t){var e=128,r={width:e,height:1,data:new Uint8Array(512)},i=r.data,n=Z(t);if(n.length){i.set(n[0].color,0);for(var o=1;o<127;o++){for(var a=o/e,s=void 0,u=void 0,c=0;c<n.length&&(s=n[c],u=n[c+1],!(s.stop<=a&&u.stop>a));c++);var l=q(s.color,u.color,(a-s.stop)/(u.stop-s.stop));i.set(l,4*o)}i.set(n[n.length-1].color,508)}return r}function tt(e,r){void 0===r&&(r=t.OrderType.ascending);var i=e.length;if(i<=1||r===t.OrderType.none)return e;if(i<=30){for(var n=1;n<i;n++)rt(e,n,r);return e}return it(e,r)}function et(e,r,i){return void 0===i&&(i=t.OrderType.ascending),e.includes(r)?e:(e.push(r),1===e.length||i!==t.OrderType.none&&rt(e,e.length-1,i),e)}function rt(e,r,i){var n=e[r];if(i!==t.OrderType.ascending)for(;r>=1&&e[r-1].priority<n.priority&&(e[r]=e[r-1],0!=--r););else for(;r>=1&&e[r-1].priority>n.priority&&(e[r]=e[r-1],0!=--r););e[r]=n}function it(e,r,i,n){var o,a;if(void 0===i&&(i=0),void 0===n&&(n=e.length-1),i>=n)return e;for(var s=e[i],u=i,c=n;u<c;){if(r===t.OrderType.ascending){for(;e[c].priority>s.priority&&c>=u;)c--;for(;e[u].priority<=s.priority&&u<c;)u++}else{for(;e[c].priority<s.priority&&c>=u;)c--;for(;e[u].priority>=s.priority&&u<c;)u++}o=l([e[c],e[u]],2),e[u]=o[0],e[c]=o[1]}return a=l([e[u],e[i]],2),e[i]=a[0],e[u]=a[1],it(e,r,i,u-1),it(e,r,c+1,n),e}function nt(t,e){if(void 0===e&&(e="item doesn't exist"),null==t)throw new Error(e)}function ot(t){return/^[^\d.][\w-]*$/.test(t)}
|
|
9
9
|
/*!
|
|
@@ -17,5 +17,5 @@
|
|
|
17
17
|
* Description: Galacean Effects JSON Specification
|
|
18
18
|
* Author: Ant Group CO., Ltd.
|
|
19
19
|
* Version: v1.3.0
|
|
20
|
-
*/!function(t){t.S="S",t.APlus="A+",t.A="A",t.BPlus="B+",t.B="B"}(cs||(cs={})),function(t){t[t.ALPHA=0]="ALPHA",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.BRIGHTNESS=3]="BRIGHTNESS",t[t.SUBTRACTION=4]="SUBTRACTION",t[t.STRONG_LIGHT=5]="STRONG_LIGHT",t[t.WEAK_LIGHT=6]="WEAK_LIGHT",t[t.SUPERPOSITION=7]="SUPERPOSITION"}(ls||(ls={})),function(t){t[t.DOUBLE=1032]="DOUBLE",t[t.FRONT=1028]="FRONT",t[t.BACK=1029]="BACK"}(hs||(hs={})),function(t){t[t.NONE=0]="NONE",t[t.MASK=1]="MASK",t[t.OBSCURED=2]="OBSCURED",t[t.REVERSE_OBSCURED=3]="REVERSE_OBSCURED"}(fs||(fs={})),function(t){t[t.NONE=0]="NONE",t[t.SPHERE=1]="SPHERE",t[t.CONE=2]="CONE",t[t.HEMISPHERE=3]="HEMISPHERE",t[t.CIRCLE=4]="CIRCLE",t[t.DONUT=5]="DONUT",t[t.RECTANGLE=6]="RECTANGLE",t[t.RECTANGLE_EDGE=7]="RECTANGLE_EDGE",t[t.EDGE=8]="EDGE",t[t.TEXTURE=9]="TEXTURE"}(ps||(ps={})),function(t){t[t.GYROSCOPE=0]="GYROSCOPE",t[t.SPINE=1]="SPINE"}(ds||(ds={})),function(t){t[t.CLICK=0]="CLICK",t[t.MESSAGE=1]="MESSAGE",t[t.DRAG=2]="DRAG"}(ms||(ms={})),function(t){t[t.NONE=0]="NONE",t[t.NOTIFY=1]="NOTIFY",t[t.RESUME_PLAYER=2]="RESUME_PLAYER",t[t.REMOVE=3]="REMOVE",t[t.PAUSE=4]="PAUSE"}(vs||(vs={})),function(t){t.base="0",t.sprite="1",t.particle="2",t.null="3",t.interact="4",t.plugin="5",t.camera="6",t.composition="7",t.filter="8",t.spine="spine",t.mesh="mesh",t.tree="tree",t.text="text",t.light="light",t.skybox="skybox"}(ys||(ys={})),function(t){t[t.BILLBOARD=0]="BILLBOARD",t[t.MESH=1]="MESH",t[t.VERTICAL_BILLBOARD=2]="VERTICAL_BILLBOARD",t[t.HORIZONTAL_BILLBOARD=3]="HORIZONTAL_BILLBOARD"}(xs||(xs={})),function(t){t[t.PARTICLE_ORIGIN_CENTER=0]="PARTICLE_ORIGIN_CENTER",t[t.PARTICLE_ORIGIN_LEFT_TOP=1]="PARTICLE_ORIGIN_LEFT_TOP",t[t.PARTICLE_ORIGIN_LEFT_CENTER=2]="PARTICLE_ORIGIN_LEFT_CENTER",t[t.PARTICLE_ORIGIN_LEFT_BOTTOM=3]="PARTICLE_ORIGIN_LEFT_BOTTOM",t[t.PARTICLE_ORIGIN_CENTER_TOP=4]="PARTICLE_ORIGIN_CENTER_TOP",t[t.PARTICLE_ORIGIN_CENTER_BOTTOM=5]="PARTICLE_ORIGIN_CENTER_BOTTOM",t[t.PARTICLE_ORIGIN_RIGHT_TOP=6]="PARTICLE_ORIGIN_RIGHT_TOP",t[t.PARTICLE_ORIGIN_RIGHT_CENTER=7]="PARTICLE_ORIGIN_RIGHT_CENTER",t[t.PARTICLE_ORIGIN_RIGHT_BOTTOM=8]="PARTICLE_ORIGIN_RIGHT_BOTTOM"}(gs||(gs={}));var Es,Ss,bs,Rs,_s,As,Cs,ws,Os,Ms,Ls,Is,Ps,Vs,Fs,Ns,zs,Ds,Us=0;!function(t){t[t.portrait=1]="portrait",t[t.landscape=Us]="landscape"}(Es||(Es={})),function(t){t[t.destroy=0]="destroy",t[t.pause=1]="pause",t[t.restart=5]="restart",t[t.forward=2]="forward",t[t.pause_destroy=3]="pause_destroy"}(Ss||(Ss={})),function(t){t.video="video",t.image="image"}(bs||(bs={})),function(t){t[t.CONSTANT=0]="CONSTANT",t[t.CONSTANT_VEC2=1]="CONSTANT_VEC2",t[t.CONSTANT_VEC3=2]="CONSTANT_VEC3",t[t.CONSTANT_VEC4=3]="CONSTANT_VEC4",t[t.RANDOM=4]="RANDOM",t[t.LINE=5]="LINE",t[t.CURVE=6]="CURVE",t[t.BEZIER_PATH=7]="BEZIER_PATH",t[t.RGBA_COLOR=8]="RGBA_COLOR",t[t.GRADIENT_COLOR=9]="GRADIENT_COLOR",t[t.SHAPE_POINTS=10]="SHAPE_POINTS",t[t.SHAPE_SPLITS=11]="SHAPE_SPLITS",t[t.LINEAR_PATH=12]="LINEAR_PATH",t[t.COLORS=13]="COLORS",t[t.BINARY=20]="BINARY",t[t.BEZIER_CURVE=21]="BEZIER_CURVE",t[t.BEZIER_CURVE_PATH=22]="BEZIER_CURVE_PATH"}(Rs||(Rs={})),function(t){t[t.AUTO=0]="AUTO",t[t.EASE=1]="EASE",t[t.EASE_IN=2]="EASE_IN",t[t.EASE_OUT=3]="EASE_OUT",t[t.LINE=4]="LINE",t[t.HOLD=5]="HOLD",t[t.LINE_OUT=6]="LINE_OUT"}(_s||(_s={})),function(t){t[t.destroy=0]="destroy",t[t.loop=5]="loop",t[t.freeze=4]="freeze"}(As||(As={})),function(t){t[t.destroyChildren=6]="destroyChildren"}(Cs||(Cs={})),function(t){t[t.none=0]="none",t[t.removeParticle=1]="removeParticle"}(ws||(ws={})),function(t){t[t.RANDOM=0]="RANDOM",t[t.UNIDIRECTIONAL_CYCLE=1]="UNIDIRECTIONAL_CYCLE",t[t.BIDIRECTIONAL_CYCLE=2]="BIDIRECTIONAL_CYCLE",t[t.UNIFORM_BURST=3]="UNIFORM_BURST"}(Os||(Os={})),function(t){t[t.box=2]="box",t[t.sphere=3]="sphere"}(Ms||(Ms={})),function(t){t.unlit="unlit",t.pbr="pbr",t.hair="hair"}(Ls||(Ls={})),function(t){t[t.opaque=100]="opaque",t[t.masked=101]="masked",t[t.translucent=102]="translucent",t[t.additive=103]="additive"}(Is||(Is={})),function(t){t.none="none",t.uv="uv",t.normal="normal",t.basecolor="basecolor",t.alpha="alpha",t.metallic="metallic",t.roughness="roughness",t.ao="ao",t.emissive="emissive"}(Ps||(Ps={})),function(t){t[t.display=0]="display",t[t.clip=1]="clip",t[t.ellipsis=2]="ellipsis"}(Vs||(Vs={})),function(t){t[t.top=0]="top",t[t.middle=1]="middle",t[t.bottom=2]="bottom"}(Fs||(Fs={})),function(t){t[t.left=0]="left",t[t.middle=1]="middle",t[t.right=2]="right"}(Ns||(Ns={})),function(t){t.normal="normal",t.bold="bold",t.lighter="lighter"}(zs||(zs={})),function(t){t.normal="normal",t.italic="italic",t.oblique="oblique"}(Ds||(Ds={}));var Bs=function(){return Bs=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},Bs.apply(this,arguments)};function ks(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],i=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Gs(t,e){if(!t.includes(e))return t.push(e),!0}function Xs(t,e,r){if(t)for(var i in t)Object.hasOwnProperty.call(t,i)&&e.call(r,t[i],i);return t}function Hs(t){if(Number.isFinite(t))return[Rs.CONSTANT,t];if(t){var e=t[0],r=t[1];if(Array.isArray(e))return;if("static"===e||e===Rs.CONSTANT)return[Rs.CONSTANT,t[1]];if("lines"===e)return[Rs.LINE,t[1]];if(e===Rs.LINE){var i=r.map((function(t){return[_s.LINE,t]}));return[Rs.BEZIER_CURVE,i]}return"curve"===e||e===Rs.CURVE?[Rs.BEZIER_CURVE,au(r)]:t}}function Ys(t,e){return Array.isArray(t)&&"random"===t[0]?[Rs.CONSTANT,t[1][e]]:Hs(t)}function js(t){return t&&"color"===t[0]?Qs(t[1],!0):[1,1,1,1]}function Ws(t,e){if(t)return"colors"===t[0]?[Rs.COLORS,t[1].map((function(t){return Qs(t,e)}))]:"gradient"===t[0]?qs(t[1],e):"color"===t[0]?[Rs.RGBA_COLOR,Qs(t[1],e)]:t}function Zs(t){return t&&"random"===t[0]?[Rs.RANDOM,t[1]]:Hs(t)}function qs(t,e){if(t){var r=[];return Object.getOwnPropertyNames(t).forEach((function(i){var n=function(t){var e=/^(-)?([\d+.]+)%$/.exec(t);if(e)return+e[2]/100*(e[1]?-1:1);return+t}(i),o=Qs(t[i],e);r.push([n,o[0],o[1],o[2],o[3]])})),r=r.sort((function(t,e){return t[0]-e[0]})),[Rs.GRADIENT_COLOR,r]}}function Qs(t,e){var r;if("string"==typeof t){t=t.replace(/[\s\t\r\n]/g,"");var i=/rgba?\(([.\d]+),([.\d]+),([.\d]+),?([.\d]+)?\)/.exec(t);if(i){var n=+i[4];r=[+i[1],+i[2],+i[3],isNaN(n)?255:Math.round(255*n)]}else/^#[a-f\d]{3}$/i.test(t)?r=[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16),255]:(i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t))&&(r=[parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16),255]||[0,0,0,255])}else t instanceof Array&&(r=[t[0],t[1],t[2],isNaN(t[3])?255:Math.round(255*t[3])]);return e&&(r=function(t){if(Array.isArray(t))return t.map((function(t){return Number.isFinite(t/255)?Number((t/255).toFixed(6)):0}))}(r)),r}function Ks(t,e){return Array.isArray(t)?t[0]===Rs.GRADIENT_COLOR?t:("gradient"===t[0]||"color"===t[0])&&qs(t[1],e):qs(t,e)}function Js(t){if(t){if(3===t.length)return[Rs.CONSTANT_VEC3,t];var e=t[0];if("path"===e||"bezier"===e||e===Rs.BEZIER_PATH||e===Rs.LINEAR_PATH){var r=t[1],i=r[0],n=r[1],o=r[2],a=au(i);if(!o){o=[];for(var s=0;s<n.length;s++){var u=n[s].slice();0===s?o.push(u):s<n.length-1?(o.push(u),o.push(u)):o.push(u)}}return[Rs.BEZIER_CURVE_PATH,[a,n,o]]}return t}}function $s(t){var e,r;try{for(var i=ks(Object.keys(t)),n=i.next();!n.done;n=i.next()){var o=n.value;t[o]=Number(t[o])}}catch(t){e={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return t}function tu(t){var e,r;try{for(var i=ks(Object.keys(t)),n=i.next();!n.done;n=i.next()){var o=n.value;void 0===t[o]&&delete t[o]}}catch(t){e={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return t}"function"==typeof SuppressedError&&SuppressedError;var eu=Math.cos,ru=Math.sin,iu=Math.PI/180,nu=180/Math.PI;function ou(t,e,r,i){var n=r[0],o=r[1],a=i[0],s=a-n;return[[n+(a-n)/3,o+(t*=s)/3],[a-(a-n)/3,i[1]-(e*=s)/3]]}function au(t){for(var e=-1e6,r=1e6,i=0;i<t.length;i++)e=Math.max(e,t[i][1]),r=Math.min(r,t[i][1]);var n=[[t[0][0],t[0][1]]];for(i=0;i<t.length-1;i++){var o=t[i][3]*(e-r),a=t[i+1][2]*(e-r),s=[t[i][0],t[i][1]],u=[t[i+1][0],t[i+1][1]];if(s[0]!=u[0]){var c=ou(o,a,s,u),l=c[0],h=c[1];n[n.length-1].push(l[0]),n[n.length-1].push(l[1]),n.push([h[0],h[1],u[0],u[1]])}else n[n.length-1].push(u[0]),n[n.length-1].push(u[1])}return n.map((function(t,e){return 0===e?[_s.EASE_OUT,t]:e===n.length-1?[_s.EASE_IN,t]:[_s.EASE,t]}))}function su(t){var e,r=t.options,i=t.transform,n={type:ps.NONE};if(t.shape){var o=null===(e=t.shape.shape)||void 0===e?void 0:e.replace(/([A-Z])/g,"_$1").toUpperCase().replace(/^_/,"");if(n=Bs(Bs({},t.shape),{type:ps[o]}),t.shape.upDirection){var a=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,n,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return a}(t.shape.upDirection,3),s=a[0],u=a[1],c=a[2];0===s&&0===u&&0===c&&delete n.upDirection}}r.startTurbulence&&(n.turbulenceX=Zs(r.turbulenceX),n.turbulenceY=Zs(r.turbulenceY),n.turbulenceZ=Zs(r.turbulenceZ));var l=t.emission;l.bursts&&l.bursts.length>0&&(l.bursts=l.bursts.map((function(t){return $s(t)}))),l.burstOffsets&&l.burstOffsets.length>0&&(l.burstOffsets=l.burstOffsets.map((function(t){return $s(t)}))),l.rateOverTime&&(l.rateOverTime=Zs(l.rateOverTime));var h={renderer:t.renderer,shape:n,splits:t.splits,emission:l,options:{startLifetime:Zs(r.startLifetime),start3DSize:!!r.start3DSize,startSize:Zs(r.startSize),startSizeX:Zs(r.startSizeX),startSizeY:Zs(r.startSizeY),sizeAspect:Zs(r.sizeAspect),maxCount:r.maxCount,startDelay:Zs(r.startDelay),startColor:Ws(r.startColor,!0),startRotationZ:Zs(r.startRotation||r.startRotationZ),particleFollowParent:r.particleFollowParent}};if(r.start3DRotation&&(h.options.startRotationX=Zs(r.startRotationX),h.options.startRotationY=Zs(r.startRotationY)),t.filter){var f={};Xs(t.filter,(function(t,e){var r;f[e]=(r=t,Array.isArray(r)&&"string"==typeof r[0]&&(Zs(r)||Js(r)||Ws(r))||r)})),h.filter=f}i&&i.path&&(h.emitterTransform={path:Js(i.path)});var p=t.sizeOverLifetime;p&&(p.separateAxes?h.sizeOverLifetime={separateAxes:!0,x:Zs(p.x),y:Zs(p.y)}:h.sizeOverLifetime={size:Zs(p.size)});var d=t.velocityOverLifetime||{},m=d.speedOverLifetime;m=m?Hs(m):void 0,h.positionOverLifetime={gravity:r.gravity,gravityOverLifetime:Hs(r.gravityModifier),startSpeed:Zs(r.startSpeed),speedOverLifetime:m,asMovement:d.asMovement,linearX:Zs(d.linearX),linearY:Zs(d.linearY),linearZ:Zs(d.linearZ),asRotation:d.asRotation,orbCenter:d.orbCenter,orbitalX:Zs(d.orbitalX),orbitalY:Zs(d.orbitalY),orbitalZ:Zs(d.orbitalZ),forceTarget:d.forceTarget,target:d.target,forceCurve:Hs(d.forceCurve)},tu(h.positionOverLifetime);var v=t.rotationOverLifetime;v&&(h.rotationOverLifetime={separateAxes:v.separateAxes,asRotation:v.asRotation,z:Zs(v.separateAxes?v.z:v.angularVelocity)},v.separateAxes&&(h.rotationOverLifetime.y=Hs(v.y),h.rotationOverLifetime.x=Hs(v.x)));var y=t.colorOverLifetime;if(y){var x=h.colorOverLifetime={opacity:Hs(y.opacity)};y.color&&(x.color=Ks(y.color))}var g=t.textureSheetAnimation;g&&(h.textureSheetAnimation={row:g.row,col:g.col,total:g.total,animate:g.animate,cycles:Hs(g.cycles),animationDelay:Ys(g.animationDelay,0),animationDuration:Ys(g.animationDuration,0)});var T=t.trails;T&&(h.trails={lifetime:Zs(T.lifetime),dieWithParticles:T.dieWithParticles,maxPointPerTrail:T.maxPointPerTrail,minimumVertexDistance:T.minimumVertexDistance,widthOverTrail:Hs(T.widthOverTrail),colorOverTrail:T.colorOverTrail&&Ks(T.colorOverTrail,!1),blending:T.blending,colorOverLifetime:T.colorOverLifetime&&Ks(T.colorOverLifetime,!1),inheritParticleColor:T.inheritParticleColor,occlusion:T.occlusion,transparentOcclusion:T.transparentOcclusion,orderOffset:T.orderOffset,sizeAffectsLifetime:T.sizeAffectsLifetime,sizeAffectsWidth:T.sizeAffectsWidth,texture:T.texture,parentAffectsPosition:T.parentAffectsPosition,opacityOverLifetime:Zs(T.opacityOverLifetime)}),h.trails&&tu(h.trails);var E=t.interaction;return E&&(h.interaction={behavior:E.behavior,radius:E.radius,multiple:E.multiple}),h}function uu(t,e){var r,i=t.options,n=t.velocityOverLifetime||{},o={path:Js(null===(r=t.transform)||void 0===r?void 0:r.path),gravity:i.gravity,gravityOverLifetime:Hs(i.gravityModifier),direction:i.direction,startSpeed:i.startSpeed,asMovement:n.asMovement,linearX:Hs(n.linearX),linearY:Hs(n.linearY),linearZ:Hs(n.linearZ),asRotation:n.asRotation,orbCenter:n.orbCenter,orbitalX:Hs(n.orbitalX),orbitalY:Hs(n.orbitalY),orbitalZ:Hs(n.orbitalZ),speedOverLifetime:Hs(n.speedOverLifetime)};tu(o);var a={options:{startColor:js(i.startColor)},positionOverLifetime:o};i.startSize&&(e.scale=[i.startSize,i.startSize/(i.sizeAspect||1),1]),i.startRotation&&(e.rotation?e.rotation[2]+=i.startRotation:e.rotation=[0,0,i.startRotation]);var s=t.rotationOverLifetime;if(s){var u=a.rotationOverLifetime={separateAxes:s.separateAxes,asRotation:s.asRotation};u.separateAxes?(u.x=Hs(s.x),u.y=Hs(s.y),u.z=Hs(s.z)):u.z=Hs(s.angularVelocity)}var c=t.colorOverLifetime;if(c){var l=a.colorOverLifetime={opacity:Hs(c.opacity)};c.color&&(l.color=Ks(c.color))}var h=t.sizeOverLifetime;return h&&(a.sizeOverLifetime={separateAxes:h.separateAxes,size:Hs(h.size),x:Hs(h.x),y:Hs(h.y),z:Hs(h.z)}),a}function cu(t,e){var r=uu(t,e),i=t.textureSheetAnimation;return i&&(r.textureSheetAnimation={row:i.row,col:i.col,total:i.total||void 0,animate:i.animate}),r.renderer=t.renderer,t.splits&&(r.splits=t.splits),t.interaction&&(r.interaction=t.interaction),r}var lu=["strength","bloomAddon","colorAddon","period","waveMovement","colorThreshold","xOpacity","yOpacity","feather"],hu=["path","position"];function fu(t){return t.compositions.forEach((function(t){t.items.forEach((function(t){t.type===ys.null&&t.endBehavior===As.destroy&&(t.endBehavior=As.freeze)}))})),t.version="2.1",t}function pu(t){var e,r;if(t)try{for(var i=ks(Object.keys(t)),n=i.next();!n.done;n=i.next()){var o=n.value,a=t[o],s=Array.isArray(a);s&&2===a.length&&Array.isArray(a[1])?t[o]="path"===o?Js(a):Hs(a):s||"object"!=typeof a||pu(a)}}catch(t){e={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}}var du=/^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/,mu=/^(\d+)\.(\d+)$/,vu=!1;function yu(t){var e;if(!t||"object"!=typeof t)throw Error("expect a json object");if(function(t){var e,r=null===(e=t.version)||void 0===e?void 0:e.split(".");!r||Number(r[0])>2||2===Number(r[0])&&Number(r[1])>=2||t.compositions.forEach((function(t){t.items.forEach((function(t){t.type!==ys.mesh&&t.type!==ys.light||(t.endBehavior=1===t.endBehavior?As.destroy:t.endBehavior)}))}))}(t),du.test(t.version))return vu="0"===(null===(e=/^(\d+)/.exec(t.version))||void 0===e?void 0:e[0]),fu(function(t){var e,r;xu="1.0";var i=t.plugins||[];(null===(e=t.bins)||void 0===e?void 0:e.length)&&(xu="1.3");var n=(t.requires||[]).slice(),o=t.images.map((function(e,r){return gu(e,r,t.imageTags||[])})),a=t.textures||o.map((function(t,e){return{source:e,flipY:!0}})),s={plugins:i,shapes:t.shapes||[],type:"ge",version:xu,playerVersion:null!==(r=t.playerVersion)&&void 0!==r?r:{web:"",native:""},compositionId:t.compositionId+"",compositions:t.compositions.map((function(t){return Tu(t,{plugins:i,requires:n})})),images:o,imgUsage:t._imgs,binUsage:t.binUsage,spines:t.spines,requires:t.requires,textures:a,bins:(t.bins||[]).slice()};t._textures&&(s._textures=t._textures);return s}(t));var r=mu.exec(t.version)||[],i=Number(r[1]),n=Number(r[2]);if(i)return(i<2||2===i&&n<4)&&function(t){t.compositions.map((function(t){var e,r;try{for(var i=ks(t.items),n=i.next();!n.done;n=i.next())pu(n.value.content)}catch(t){e={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}}))}(t),i<2?fu(t):t;throw Error("invalid json version "+t.version)}var xu="1.0";function gu(t,e,r){var i=r[e],n=t.oriY;if("string"==typeof t)return{renderLevel:i,url:t,oriY:n};if(t.template)return{url:t.url,template:t.template,webp:t.webp,renderLevel:i,oriY:n};if(t.compressed)return{url:t.url,oriY:n,compressed:{astc:t.compressed.android,pvrtc:t.compressed.iOS},webp:t.webp,renderLevel:i};if(t.url)return{url:t.url,webp:t.webp,renderLevel:i,oriY:n};if(t&&t.sourceType)return t;throw Error("invalid image type")}function Tu(t,e){var r;void 0===e&&(e={});var i={id:t.id+"",camera:Object.assign({clipMode:Us},t.camera),duration:t.duration,endBehavior:t.endBehavior,items:t.items.map((function(t){return Ru(t,e)})),name:t.name},n=t.startTime||t.st;n&&(i.startTime=n);var o=null===(r=t.meta)||void 0===r?void 0:r.previewSize;return o&&o[0]===o[1]&&0===o[0]&&(o=void 0),o&&(i.previewSize=o),i}var Eu,Su=[0,0,0,1],bu=.5;function Ru(t,e){var r,i,n;void 0===e&&(e={});var o,a,s,u,c,l,h=ys.base,f=t.endBehavior,p=NaN;if(t.content?(h=t.type||ys.plugin,l=t.pn,c=t.pluginName,s=t.content,a=t.content,isNaN(l)&&!c&&(c=s.options.type),t.duration&&(p=t.duration),o=t.transform||y(a.transform),h===ys.filter&&(xu<"1.1"&&(xu="1.1"),(s=cu(a,o)).filter=function(t){var e={};return Xs(t,(function(t,r){lu.includes(r)?e[r]=Hs(t):hu.includes(r)?e[r]=Js(t):e[r]=t})),e}(a.filter))):t.particle?(h=ys.particle,o=y((a=t.particle).transform,vu,!0),s=su(a)):t.sprite?(h=ys.sprite,s=cu(a=t.sprite,o=y(a.transform,!1,!0))):t.cal?(h=ys.null,s=uu(a=t.cal,o=y(a.transform,!1,!0))):t.ui?(h=ys.interact,o=y((a=t.ui).transform),s=function(t){var e,r=t.options;switch(r.type){case"click":e={type:ms.CLICK,showPreview:r.showPreview,previewColor:r.previewColor&&js(r.previewColor),behavior:r.behavior||vs.NOTIFY};break;case"drag":e={type:ms.DRAG,enableInEditor:!!r.enableInEditor,dxRange:r.dxRange,dyRange:r.dyRange,target:r.target};break;case"message":e={type:ms.MESSAGE}}return{options:e}}(a),o.scale=[a.options.width||1,a.options.height||1,1]):t.model&&(a=t.model,1===t.model.options.type&&(h=ys.camera,o=y(a.transform),s=function(t){var e,r,i=t.options,n={options:{fov:i.fov,far:i.far,near:i.near,clipMode:i.clipMode}},o=t.velocityOverLifetime;if(o||(null===(e=t.transform)||void 0===e?void 0:e.path)){var a={path:Js(null===(r=t.transform)||void 0===r?void 0:r.path),linearX:Hs(null==o?void 0:o.translateX),linearY:Hs(null==o?void 0:o.translateY),linearZ:Hs(null==o?void 0:o.translateZ)};tu(a),n.positionOverLifetime=a}var s=t.rotationOverLifetime;if(s){var u={separateAxes:s.separateAxes,x:Hs(null==s?void 0:s.rotateX),y:Hs(null==s?void 0:s.rotateY),z:s.separateAxes?Hs(null==s?void 0:s.rotateZ):Hs(s.rotation)};tu(u),n.rotationOverLifetime=u}return n}(a))),null===(r=s.renderer)||void 0===r?void 0:r.anchor){var d=new Float32Array(s.renderer.anchor);d[0]==bu&&d[1]==bu?delete s.renderer.anchor:e.requires&&Gs(e.requires,"anchor")}if(a){var m=null===(i=a.options)||void 0===i?void 0:i.looping;f=m?Array.isArray(m)?m[1]?As.loop:As.destroy:As.loop:f||(null===(n=null==a?void 0:a.options)||void 0===n?void 0:n.endBehavior)||As.destroy,a.options.renderLevel&&(u=a.options.renderLevel),isNaN(p)&&(p=a.options.duration)}var v={type:h,name:t.name,delay:t.delay,duration:p,id:t.id+"",transform:o,endBehavior:f,renderLevel:u,content:s};return c?e.plugins?(Gs(e.plugins,c),v.pn=e.plugins.indexOf(c)):v.pluginName=c:Number.isInteger(l)&&(v.pn=l),t.parentId&&(v.parentId=t.parentId+""),v;function y(t,e,r){if(t){var i={},n=t.rotation;if(n&&(i.rotation=e?[-n[0],-n[1],-n[2]]:[n[0],n[1],n[2]],r)){var o=(a=Su,s=i.rotation[0],u=i.rotation[1],c=i.rotation[2],l=eu(s*iu/2),h=eu(u*iu/2),f=eu(c*iu/2),p=ru(s*iu/2),d=ru(u*iu/2),m=ru(c*iu/2),a[0]=p*h*f+l*d*m,a[1]=l*d*f-p*h*m,a[2]=l*h*m+p*d*f,a[3]=l*h*f-p*d*m,a);i.rotation=function(t,e){var r,i,n,o=e[0],a=e[1],s=e[2],u=e[3],c=o+o,l=a+a,h=s+s,f=o*c,p=a*c,d=a*l,m=s*h,v=u*h,y=1-d-m,x=p-v,g=p+v,T=1-f-m,E=s*c-u*l,S=s*l+u*c,b=1-f-d;return t[1]=Math.asin((i=-1,(r=-E)>(n=1)?n:r<i?i:r))*nu,Math.abs(E)<.9999999?(t[0]=Math.atan2(S,b)*nu,t[2]=Math.atan2(g,y)*nu):(t[0]=0,t[2]=Math.atan2(-x,T)*nu),t}([],o)}return t.position&&(i.position=t.position),Array.isArray(t.scale)&&(i.scale=[t.scale[0]||1,t.scale[1]||1,t.scale[2]||1]),i}var a,s,u,c,l,h,f,p,d,m;return{}}}var _u=((Eu={})[_.S]=[_.S,_.BPlus,_.APlus],Eu[_.A]=[_.A,_.BPlus,_.APlus],Eu[_.B]=[_.B,_.BPlus],Eu);function Au(t,e){if(!t||!e)return!0;var r=_u[e];return!!r&&r.includes(t)}var Cu=0,wu=function(){function t(t,e){var r,i;this.refCompositions=new Map,this.refCompositionProps=new Map,this.mask=0;var n=t.jsonScene,o=t.renderLevel,a=t.textureOptions,s=t.pluginSystem,u=t.totalTime,l=n.compositions,h=n.imgUsage,f=n.compositionId;if(!a)throw new Error("scene.textures expected");var p=a.map((function(t){return t&&(t instanceof Kr?t:Kr.create(e,t))}));t.textureOptions=p,null==p||p.forEach((function(t){return null==t?void 0:t.initialize()}));try{for(var d=c(l),m=d.next();!m.done;m=d.next()){var v=m.value;v.id===f?this.composition=v:this.refCompositions.set(v.id,v)}}catch(t){r={error:t}}finally{try{m&&!m.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}if(!this.composition)throw new Error("Invalid composition id: "+f);this.jsonScene=n,this.renderLevel=o,this.pluginSystem=s,this.totalTime=null!=u?u:0,this.imgUsage=null!=h?h:{},this.textures=p,Cu=0,this.textureOptions=a,this.sourceContent=this.getContent(this.composition)}return t.prototype.getContent=function(t){var e=t.id,r=t.duration,i=t.name,n=t.endBehavior,o=t.camera,a=t.globalVolume,s=t.startTime,u=void 0===s?0:s,c=this.assembleItems(t);return{id:e,duration:r,name:i,endBehavior:isNaN(n)?1:n,items:c,camera:o,startTime:u,globalVolume:a}},t.prototype.assembleItems=function(t){var e=this,r=[];return t.items.forEach((function(t){var i,n={},o=t.visible,s=t.renderLevel,u=t.type;if(!1!==o){var c=a({},t.content);if(c&&(n.content=a({},c),Au(s,e.renderLevel))){var l=n.content;if(n.type=u,l.renderer){l.renderer=e.changeTex(l.renderer),e.processMask(l.renderer);var h=l.splits&&!l.textureSheetAnimation&&l.splits[0];Number.isInteger(l.renderer.shape)?l.renderer.shape=jo(null===(i=e.jsonScene)||void 0===i?void 0:i.shapes[l.renderer.shape],h):l.renderer.shape&&or(l.renderer.shape)&&(l.renderer.shape=jo(l.renderer.shape,h))}else n.content.renderer={order:0};l.trails&&(l.trails=e.changeTex(l.trails)),l.filter&&(l.filter=a({},l.filter));var f=t.name,p=t.delay,d=void 0===p?0:p,m=t.id,v=t.parentId,y=t.duration,x=t.endBehavior,g=t.pluginName,T=t.pn,E=t.transform,S=t.refCount,b=e.jsonScene.plugins,R=void 0===b?[]:b;if(n.name=f,n.delay=d,n.id=m,v&&(n.parentId=v),n.refCount=S,n.duration=y,n.listIndex=Cu++,n.endBehavior=x,g?n.pluginName=g:void 0!==T&&Number.isInteger(T)&&(n.pluginName=R[T]),E&&(n.transform=E),n.type===P.composition){e.mask++;var _=t.content.options.refId;if(!e.refCompositions.get(_))throw new Error("Invalid Ref Composition id: "+_);var A=e.getContent(e.refCompositions.get(_));e.refCompositionProps.has(_)||e.refCompositionProps.set(_,A),A.items.forEach((function(t){e.processMask(t.content)})),n.items=A.items}r.push(n)}}})),r},t.prototype.changeTex=function(t){var e=t.texture,r=a({},t);return void 0!==e&&(r.texture=this.addTextureUsage(e)||e),r},t.prototype.addTextureUsage=function(t){var e,r;if(Number.isInteger(t)){var i=null===(e=this.textures)||void 0===e?void 0:e[t],n=null==i?void 0:i.id,o=null!==(r=this.imgUsage)&&void 0!==r?r:{};if(n&&o)return o.hasOwnProperty(n)||(o[n]=0),o[n]++,i}},t.prototype.processMask=function(t){if(t.maskMode!==w.NONE&&!t.mask){var e=t.maskMode;e===w.MASK?t.mask=++this.mask:e!==w.OBSCURED&&e!==w.REVERSE_OBSCURED||(t.mask=this.mask)}},t.prototype.dispose=function(){this.textureOptions=[],this.textures=[],this.composition=void 0,this.jsonScene=void 0,this.totalTime=0,this.pluginSystem=void 0,this.sourceContent=void 0,this.refCompositions.clear(),this.refCompositionProps.clear()},t}();function Ou(t){return or(t)&&"jsonScene"in t}var Mu=1,Lu=function(){function e(t,e){void 0===t&&(t={}),void 0===e&&(e=new Gr),this.options=t,this.downloader=e,this.assets={},this.id=Mu++,this.timers=[],this.updateOptions(t)}return e.prototype.updateOptions=function(t){void 0===t&&(t={}),this.options=t,t.pluginData||(t.pluginData={});var e=t.timeout,r=void 0===e?10:e;this.timeout=r},e.prototype.updateSceneData=function(t){var e=this.options.variables;return!e||Object.keys(e).length<=0||t.forEach((function(t){t.items.forEach((function(t){if(t.type===P.text){var r=e[t.name];r&&(t.content.options.text=r)}}))})),t},e.prototype.loadScene=function(t,e,r){var i,n,o;return s(this,void 0,void 0,(function(){var c,h,f,p,d,m,v,y,x,g,T,E,S,b=this;return u(this,(function(R){return h=rr(t)?t:this.id,f=performance.now(),p=[],d=null==e?void 0:e.engine.gpuCapability,m=null!==(n=null===(i=null==d?void 0:d.detail)||void 0===i?void 0:i.asyncShaderCompile)&&void 0!==n&&n,v=null!==(o=null==d?void 0:d.detail.compressedTexture)&&void 0!==o?o:0,y={},g=!1,T=new Promise((function(t,e){x=window.setTimeout((function(){g=!0,b.removeTimer(x);var t=performance.now()-f;e("Load time out: totalTime: ".concat(t.toFixed(4),"ms ").concat(p.join(" "),", url: ").concat(h))}),1e3*b.timeout),b.timers.push(x)})),E=function(t,e){return s(b,void 0,void 0,(function(){var r,i,n,o;return u(this,(function(a){switch(a.label){case 0:if(g)return[3,4];r=performance.now(),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,e()];case 2:return i=a.sent(),n=performance.now()-r,p.push("[".concat(t,": ").concat(n.toFixed(2),"]")),y[t]=n,[2,i];case 3:throw o=a.sent(),new Error("load error in ".concat(t,", ").concat(o));case 4:throw new Error("load canceled.")}}))}))},S=function(){return s(b,void 0,void 0,(function(){var i,n,o,s,d,g,T,S,b,R,_,A,C,w,O,M,L,I,P,V=this;return u(this,(function(u){switch(u.label){case 0:return or(t)?(c=t,this.baseUrl=location.href,[3,3]):[3,1];case 1:return t=new URL(t,location.href).href,this.baseUrl=t,[4,E("loadJSON",(function(){return V.loadJSON(t)}))];case 2:c=u.sent(),u.label=3;case 3:if(!Ou(c))return[3,6];if(i=a({},c),!this.options||!this.options.variables||0===Object.keys(this.options.variables).length)return[3,5];for(n=c.jsonScene.images,o=i.images,d=0;d<n.length;d++)o[d]instanceof HTMLCanvasElement&&(o[d]=n[d]);return s=i,[4,E("processImages",(function(){return V.processImages(o,i.usedImages,v)}))];case 4:for(s.images=u.sent(),d=0;d<i.images.length;d++)i.textureOptions[d].image=i.images[d];i.jsonScene.compositions=this.updateSceneData(i.jsonScene.compositions),u.label=5;case 5:return[3,12];case 6:return[4,E("processJSON",(function(){return V.processJSON(c)}))];case 7:return g=u.sent(),T=g.usedImages,S=g.jsonScene,b=g.pluginSystem,R=S.bins,_=void 0===R?[]:R,A=S.images,C=S.compositions,w=S.fonts,[4,Promise.all([E("processBins",(function(){return V.processBins(_)})),E("processImages",(function(){return V.processImages(A,T,v)})),E("".concat(m?"async":"sync","Compile"),(function(){return V.precompile(C,b,e,r)}))])];case 8:return O=l.apply(void 0,[u.sent(),2]),M=O[0],L=O[1],[4,E("processFontURL",(function(){return V.processFontURL(w)}))];case 9:return u.sent(),[4,E("processTextures",(function(){return V.processTextures(L,M,S)}))];case 10:return I=u.sent(),S.compositions=this.updateSceneData(S.compositions),i={timeInfos:y,url:t,renderLevel:this.options.renderLevel,storage:{},pluginSystem:b,jsonScene:S,usedImages:T,images:L,textureOptions:I,bins:M},[4,E("processPlugins",(function(){return b.loadResources(i,V.options)}))];case 11:u.sent(),u.label=12;case 12:return P=performance.now()-f,tr.info("Load asset: totalTime: ".concat(P.toFixed(4),"ms ").concat(p.join(" "),", url: ").concat(h)),window.clearTimeout(x),this.removeTimer(x),i.totalTime=P,i.startTime=f,i.timeInfos=y,[2,i]}}))}))},[2,Promise.race([T,S()])]}))}))},e.prototype.precompile=function(t,e,r,i){return s(this,void 0,void 0,(function(){var n;return u(this,(function(o){switch(o.label){case 0:return r&&r.getShaderLibrary()?(n=null==r?void 0:r.getShaderLibrary(),[4,null==e?void 0:e.precompile(t,r,i)]):[2];case 1:return o.sent(),[4,new Promise((function(t){n.compileAllShaders((function(){t(null)}))}))];case 2:return o.sent(),[2]}}))}))},e.prototype.processJSON=function(t){return s(this,void 0,void 0,(function(){var e,r,i,n,o,a,s,c,l;return u(this,(function(u){switch(u.label){case 0:return e=yu(t),t.compositions.forEach((function(t,r){t.globalVolume&&(e.compositions[r].globalVolume=t.globalVolume)})),r=e.plugins,i=void 0===r?[]:r,n=e.compositions,o=e.imgUsage,a=e.images,[4,(s=new xr(i)).processRawJSON(e,this.options)];case 1:return u.sent(),c=this.options.renderLevel,l={},o?function(t,e,r,i,n){for(var o=0;o<e.length;o++){var a=r[e[o].id];if(a)for(var s=0;s<a.length;s++){var u=a[s];Au(i[u].renderLevel,n)&&(t[u]=!0)}}}(l,n,o,a,c):null==a||a.forEach((function(t,e){l[e]=!0})),[2,{usedImages:l,jsonScene:e,pluginSystem:s}]}}))}))},e.prototype.processBins=function(t){return s(this,void 0,void 0,(function(){var e,r,i,n=this;return u(this,(function(o){return e=this.options.renderLevel,r=this.baseUrl,i=t.map((function(i){if(i instanceof ArrayBuffer)return i;if(Au(i.renderLevel,e))return n.loadBins(new URL(i.url,r).href);throw new Error("Invalid bins source: ".concat(JSON.stringify(t)))})),[2,Promise.all(i)]}))}))},e.prototype.processFontURL=function(t){return s(this,void 0,void 0,(function(){var r,i=this;return u(this,(function(n){return t?(r=t.map((function(t){return s(i,void 0,void 0,(function(){var r,i,n;return u(this,(function(o){switch(o.label){case 0:if(!t.fontURL||e.fonts.has(t.fontFamily))return[3,4];ot(t.fontFamily)||console.warn("Risky font family: ".concat(t.fontFamily)),o.label=1;case 1:return o.trys.push([1,3,,4]),r=new URL(t.fontURL,this.baseUrl).href,[4,(i=new FontFace(null!==(n=t.fontFamily)&&void 0!==n?n:"","url("+r+")")).load()];case 2:return o.sent(),document.fonts.add(i),e.fonts.add(t.fontFamily),[3,4];case 3:return o.sent(),tr.warn("Invalid font family or font source: ".concat(JSON.stringify(t.fontURL))),[3,4];case 4:return[2]}}))}))})),[2,Promise.all(r)]):[2]}))}))},e.prototype.processImages=function(e,r,i){return s(this,void 0,void 0,(function(){var n,o,a,c,l,h=this;return u(this,(function(f){return n=this.options,o=n.useCompressedTexture,a=n.variables,c=this.baseUrl,l=e.map((function(e,n){return s(h,void 0,void 0,(function(){var s,l,h,f,p,d,m,v,y,x,g,T,E,S,b,R,_,A;return u(this,(function(u){switch(u.label){case 0:if(!r[n])return[2,void 0];if(s=e.url,l=e.webp,h=new URL(s,c).href,f=l&&new URL(l,c).href,!("template"in e))return[3,13];if(p=e.template,d="v"in p&&2===p.v&&p.background,m=d?p.background:void 0,!d||!m)return[3,8];v=ka(p,a),y=m.type===ut.video,x=m&&y?Wr:Yr,u.label=1;case 1:return u.trys.push([1,6,,7]),[4,Ga(v,x)];case 2:return(T=u.sent())instanceof HTMLVideoElement?[2,T]:[3,3];case 3:return m&&Array.isArray(v)&&a&&(a[m.name]=T.src),[4,ja(T,p,a,this.options,-1===e.oriY)];case 4:return[2,u.sent()];case 5:return[3,7];case 6:throw g=u.sent(),new Error("Failed to load. Check the template or if the URL is ".concat(y?"video":"image"," type, URL: ").concat(v,", Error: ").concat(g.message));case 7:return[3,12];case 8:return u.trys.push([8,11,,12]),[4,Hr(h,f)];case 9:return[4,ja((T=u.sent()).image,p,a,this.options,-1===e.oriY)];case 10:return[2,u.sent()];case 11:throw u.sent(),new Error("Failed to load. Check the template, URL: ".concat(h,"."));case 12:return[3,14];case 13:if("type"in e&&"video"===e.type)return console.warn("The video element is deprecated. Use template BackgroundType.video instead."),[2,Wr(e.url)];if("compressed"in e&&o&&i){if(E=e.compressed,S=void 0,i===Sn.ASTC?S=E.astc:i===Sn.PVRTC&&(S=E.pvrtc),S)return b=new URL(S,c).href,this.assets[n]={url:b,type:t.TextureSourceType.compressed},[2,this.loadBins(b)]}else{if("sourceType"in e)return[2,e];if(e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof Kr)return[2,e]}u.label=14;case 14:return[4,Hr(h,f)];case 15:return R=u.sent(),_=R.url,A=R.image,this.assets[n]={url:_,type:t.TextureSourceType.image},[2,A]}}))}))})),[2,Promise.all(l)]}))}))},e.prototype.processTextures=function(e,r,i){var n;return s(this,void 0,void 0,(function(){var o,s,c=this;return u(this,(function(u){return o=null!==(n=i.textures)&&void 0!==n?n:e.map((function(t,e){return{source:e}})),s=o.map((function(n,o){if(n instanceof Kr)return n;if("mipmaps"in n)try{return Zr(n,r,i.bins)}catch(t){throw new Error("load texture ".concat(o," fails, error message: ").concat(t))}var s=n.source,u=e[s];if(u){var l=function(e,r){if(e instanceof Kr)return e.source;if(e instanceof HTMLImageElement||function(t){var e;return"object"==typeof t&&null!==t&&"CANVAS"===(null===(e=t.tagName)||void 0===e?void 0:e.toUpperCase())}(e))return{image:e,sourceType:t.TextureSourceType.image,sourceFrom:r,keepImageSource:!0,minFilter:E.LINEAR,magFilter:E.LINEAR};if(e instanceof HTMLVideoElement)return{sourceType:t.TextureSourceType.video,video:e,minFilter:E.LINEAR,magFilter:E.LINEAR};if(e instanceof ArrayBuffer)return a(a({},ti(e)),{sourceFrom:r});if("width"in e&&"height"in e&&"data"in e)return{sourceType:t.TextureSourceType.data,data:e,wrapS:E.CLAMP_TO_EDGE,wrapT:E.CLAMP_TO_EDGE,minFilter:E.NEAREST,magFilter:E.NEAREST};throw new Error("Invalid texture options")}(u,c.assets[o]);return l.sourceType===t.TextureSourceType.compressed?l:a(a({},l),n)}throw new Error("Invalid texture source: ".concat(s))})),[2,Promise.all(s)]}))}))},e.prototype.loadJSON=function(t){return s(this,void 0,void 0,(function(){var e=this;return u(this,(function(r){return[2,new Promise((function(r,i){e.downloader.downloadJSON(t,r,(function(e,r){i("Couldn't load JSON ".concat(JSON.stringify(t),": status ").concat(e,", ").concat(r))}))}))]}))}))},e.prototype.loadBins=function(t){return s(this,void 0,void 0,(function(){var e=this;return u(this,(function(r){return[2,new Promise((function(r,i){e.downloader.downloadBinary(t,r,(function(e,r){i("Couldn't load bins ".concat(JSON.stringify(t),": status ").concat(e,", ").concat(r))}))}))]}))}))},e.prototype.removeTimer=function(t){var e=this.timers.indexOf(t);-1!==e&&this.timers.splice(e,1)},e.prototype.dispose=function(){var t;for(var e in this.timers.length&&this.timers.map((function(t){return window.clearTimeout(t)})),this.assets){var r=this.assets[e];null===(t=null==r?void 0:r.dispose)||void 0===t||t.call(r)}this.assets={},this.timers=[]},e.fonts=new Set,e}();var Iu,Pu,Vu,Fu,Nu=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.items=[],t.itemTree=[],t.itemCacheMap=new Map,t.itemsToRemove=[],t.tempQueue=[],t}return o(r,e),Object.defineProperty(r.prototype,"type",{get:function(){return P.composition},enumerable:!1,configurable:!0}),r.prototype.onConstructed=function(t){var e=t.items,r=void 0===e?[]:e,i=t.startTime,n=void 0===i?0:i,o=t.content,a=t.refId;this.refId=a,this.itemProps=r,this.contentProps=o;var s=this.endBehavior;5!==s&&1!==s&&3!==s||(this.freezeOnEnd=!0),this.startTime=n,this.startTimeInms=Math.round(1e3*this.startTime)},r.prototype.createContent=function(){if(!this.items.length&&this.composition)for(var e=0;e<this.itemProps.length;e++){var i=void 0,n=this.itemProps[e];if(t.Item.isComposition(n)){var o=n.content.options.refId;(i=new r(a({refId:o},n),this.composition)).contentProps=n.content,i.transform.parentTransform=this.transform,this.composition.refContent.push(i),5===i.endBehavior&&(this.composition.autoRefTex=!1),i.createContent()}else(i=pr(this.itemProps[e],this.composition)).transform.parentTransform=fr.isCamera(i)?new hr:this.transform;fr.isExtraCamera(i)&&(this.extraCamera=i),this.items.push(i),this.tempQueue.push(i)}!this.content&&this.contentProps&&(this._content=this.doCreateContent())},r.prototype.doCreateContent=function(){var t=new jn(this.contentProps,this);return t.renderData=t.getRenderData(0,!0),t},r.prototype.onLifetimeBegin=function(){var t;null===(t=this.items)||void 0===t||t.forEach((function(t){t.start(),t.createContent()})),this.buildItemTree()},r.prototype.doStop=function(){this.items&&this.items.forEach((function(t){return t.stop()}))},r.prototype.onItemUpdate=function(t,e){var r,i,n=this;if(this.content&&(this.content.updateTime(this.time),this.content.getRenderData(this.content.time)),this.items){null===(r=this.composition)||void 0===r||r.updatePluginLoaders(t);var o=[];this.itemsToRemove.length&&(this.itemsToRemove.forEach((function(t){var e,r,i=n.itemCacheMap.get(t.id);if(i){var o=i.children;if(i.parentId){var a=n.itemCacheMap.get(i.parentId);a?(a.children.splice(a.children.indexOf(i),1),o.forEach((function(t){return n.setItemParent(t.item,a.item)}))):(o.forEach((function(t){return n.setItemParent(t.item,void 0)})),(e=n.itemTree).push.apply(e,h([],l(o),!1)))}else(r=n.itemTree).splice.apply(r,h([n.itemTree.indexOf(i),1],l(o),!1)),o.forEach((function(t){return n.setItemParent(t.item,void 0)}));n.itemCacheMap.delete(t.id),n.items.splice(n.items.indexOf(t),1)}})),this.itemsToRemove.length=0);for(var a=0;a<this.itemTree.length;a++){if((u=this.itemTree[a])&&u.item){var s=u.item;fr.isComposition(s)&&s.ended&&5===s.endBehavior?s.restart():s.onUpdate(t),o.push.apply(o,h([],l(u.children),!1))}}for(;o.length;){var u;if((u=o.shift())&&u.item)(s=u.item).onUpdate(t),o.push.apply(o,h([],l(u.children),!1)),s.composition||G(this.itemsToRemove,s)}null===(i=this.extraCamera)||void 0===i||i.onUpdate(t)}},r.prototype.onItemRemoved=function(t){this.items&&(this.items.forEach((function(t){return t.dispose()})),this.items.length=0,this.itemTree.length=0,this.itemCacheMap.clear())},r.prototype.reset=function(){e.prototype.reset.call(this),this.itemTree=[],this.itemCacheMap.clear(),this.tempQueue.length=0,this.itemsToRemove.length=0},r.prototype.handleVisibleChanged=function(t){this.items.forEach((function(e){return e.setVisible(t)}))},r.prototype.setScale=function(t,e,r){this.content&&(this.content.startSize=new Vt(t,e,r))},r.prototype.scale=function(t,e,r){if(this.content){var i=this.content.startSize.clone();this.content.startSize=new Vt(t*i.x,e*i.y,r*i.z)}},r.prototype.getUpdateTime=function(t){var e=this.startTimeInms,r=this.timeInms;if(t<0&&r+t<e)return e-r;if(this.freezeOnEnd){var i=this.durInms-r;if(i<t)return i}return t},r.prototype.removeItem=function(t){var e,r=this;if(this.items.indexOf(t)>-1){if(G(this.itemsToRemove,t),fr.isTree(t)||fr.isNull(t)){var i=6===t.endBehavior,n=fr.isNull(t)&&!!this.itemCacheMap.get(t.id);((null===(e=this.itemCacheMap.get(t.id))||void 0===e?void 0:e.children)||[]).forEach((function(t){n||r.setItemParent(t.item,void 0),i&&r.removeItem(t.item)}))}return!0}return this.items.forEach((function(e){if(fr.isComposition(e)&&e.items.indexOf(t)>-1)return e.removeItem(t),!0})),!1},r.prototype.setItemParent=function(t,e){var r=this.itemCacheMap.get(t.id);if(r)if(e){var i=this.itemCacheMap.get(e.id);if(r.parentId){var n=this.itemCacheMap.get(r.parentId);n.children.splice(n.children.indexOf(r),1)}t.parent=e,r.parentId=e.id,i.children.push(r),t.transform.parentTransform=e.transform}else r.parentId=void 0,t.parent=void 0,t.transform.parentTransform=fr.isExtraCamera(t)?new hr:this.transform;else console.error("item has been remove, please set item's parent in valid lifetime")},r.prototype.getItemCurrentParent=function(t){var e=t.id,r=this.itemCacheMap.get(e);if(r){var i=r.parentId;if(i){var n=this.itemCacheMap.get(i);return i&&n?n.item:void 0}}},r.prototype.getItemByName=function(t){var e,r,i=[];try{for(var n=c(this.items),o=n.next();!o.done;o=n.next()){var a=o.value;a.name===t?i.push(a):fr.isComposition(a)&&i.push.apply(i,h([],l(a.getItemByName(t)),!1))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return i},r.prototype.hitTest=function(e,r,i,n,o,a){for(var s=[],u=(null==a?void 0:a.stop)||er,c=(null==a?void 0:a.skip)||er,l=(null==a?void 0:a.maxCount)||this.items.length,h=0;h<this.items.length&&n.length<l;h++){var f=this.items[h];if(f.lifetime>=0&&f.lifetime<=1&&!fr.isComposition(f)&&!c(f)){var p=f.getHitTestParams(o);if(p){var d=!1,m=new Vt;if(p.type===t.HitTestType.triangle)for(var v=p.triangles,y=p.backfaceCulling,x=0;x<v.length;x++){var g=v[x];if(e.intersectTriangle(g,m,y)){d=!0,s.push(m);break}}else if(p.type===t.HitTestType.box){var T=p.center,E=p.size,S=T.clone().addScaledVector(E,.5),b=T.clone().addScaledVector(E,-.5);e.intersectBox({min:S,max:b},m)&&(d=!0,s.push(m))}else if(p.type===t.HitTestType.sphere){T=p.center;var R=p.radius;e.intersectSphere({center:T,radius:R},m)&&(d=!0,s.push(m))}else if(p.type===t.HitTestType.custom){var _=p.collect(e,new Pt(r,i));_&&_.length>0&&(_.forEach((function(t){s.push(t)})),d=!0)}if(d){var A={compContent:this,id:f.id,name:f.name,position:s[s.length-1],parentId:f.parentId,hitPositions:s,behavior:p.behavior};if(n.push(A),u(A))return n}}}}return n},r.prototype.isEnded=function(t){return t>=this.durInms},r.prototype.buildItemTree=function(){if(!this.itemTree.length&&this.composition){this.itemTree=[];for(var t=this.itemCacheMap,e=this.tempQueue,r=function(){var r=e.shift();if(void 0===r.parentId){var n={id:r.id,item:r,children:[]};i.itemTree.push(n),t.set(r.id,n)}else{var o=i.getParentIdWithoutSuffix(r.parentId),a=t.get(o);if(a){n={id:r.id,parentId:o,item:r,children:[]};r.parent=a.item,r.transform.parentTransform=a.item.getNodeTransform(r.parentId),a.children.push(n),t.set(r.id,n)}else{if(-1===i.items.findIndex((function(t){return t.id===o})))throw Error("元素引用了不存在的元素,请检查数据");e.push(r)}}},i=this;e.length;)r()}},r.prototype.getParentIdWithoutSuffix=function(t){var e=t.lastIndexOf("^");return e>-1?t.substring(0,e):t},r.prototype.restart=function(){this.reset(),this.createContent(),this.start()},r}(fr),zu=1,Du=function(){function e(t,e){var r,i;this.speed=1,this.loaderData={},this.refContent=[],this.refCompositionProps=new Map,this.assigned=!1,this.destroyed=!1,this.paused=!1,this.lastVideoUpdateTime=0,this.postLoaders=[];var n=t.reusable,o=void 0!==n&&n,s=t.speed,u=void 0===s?1:s,c=t.baseRenderOrder,l=void 0===c?0:c,h=t.renderer,f=t.onPlayerPause,p=t.onMessageItem,d=t.onEnd,m=t.event,v=t.width,y=t.height;this.compositionSourceManager=new wu(e,h.engine),e.jsonScene.imgUsage=void 0,o&&(this.keepResource=!0,e.textures=void 0,e.consumed=!0);var x=this.compositionSourceManager,g=x.sourceContent,T=x.pluginSystem,E=x.imgUsage,S=x.totalTime,b=x.renderLevel,R=x.refCompositionProps;nt(g),this.refCompositionProps=R;var _=new Nu(g,this),A=!o&&E;this.transform=new hr({name:this.name}),_.transform=this.transform,this.globalVolume=g.globalVolume,this.width=v,this.height=y,this.renderOrder=l,this.id=zu++,this.renderer=h,this.texInfo=null!=A?A:{},this.event=m,this.statistic={loadTime:null!=S?S:0,loadStart:null!==(r=e.startTime)&&void 0!==r?r:0,firstFrameTime:0,precompileTime:null!==(i=e.timeInfos.asyncCompile)&&void 0!==i?i:e.timeInfos.syncCompile},this.reusable=o,this.speed=u,this.renderLevel=b,this.autoRefTex=!this.keepResource&&A&&5!==_.endBehavior,this.content=_,this.name=_.name,this.pluginSystem=T,this.pluginSystem.initializeComposition(this,e),this.camera=new us(this.name,a(a({},null==g?void 0:g.camera),{aspect:v/y})),this.url=e.url,this.assigned=!0,this.interactive=!0,this.onPlayerPause=f,this.onMessageItem=p,this.onEnd=d,this.createRenderFrame(),this.reset()}return Object.defineProperty(e.prototype,"handleEnd",{set:function(t){console.warn("The handleEnd property is deprecated. Use onEnd instead."),this.onEnd=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textures",{get:function(){return this.compositionSourceManager.textures},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this.content.items},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startTime",{get:function(){var t;return null!==(t=this.content.startTime)&&void 0!==t?t:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"time",{get:function(){return this.content.timeInms/1e3},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDestroyed",{get:function(){return this.destroyed},enumerable:!1,configurable:!0}),e.prototype.getDuration=function(){return this.content.duration},e.prototype.restart=function(){this.content.reset(),this.prepareRender(),this.reset(),this.transform.setValid(!0),this.content.start(),this.forwardTime(this.startTime),this.content.onUpdate(0),this.loaderData.spriteGroup.onUpdate(0)},e.prototype.setIndex=function(t){this.renderOrder=t},e.prototype.getIndex=function(){return this.renderOrder},e.prototype.setSpeed=function(t){this.speed=t},e.prototype.getSpeed=function(){return this.speed},e.prototype.play=function(){this.content.ended&&this.reusable&&this.restart(),this.content.started?this.gotoAndPlay(this.time-this.startTime):this.gotoAndPlay(0)},e.prototype.pause=function(){this.paused=!0},e.prototype.resume=function(){this.paused=!1},e.prototype.gotoAndPlay=function(t){this.resume(),this.content.started||this.content.start(),this.forwardTime(t+this.startTime)},e.prototype.gotoAndStop=function(t){this.gotoAndPlay(t),this.pause()},e.prototype.createRenderFrame=function(){this.renderFrame=new fn({camera:this.camera,renderer:this.renderer,keepColorBuffer:this.keepColorBuffer,globalVolume:this.globalVolume}),this.renderFrame.cachedTextures=this.textures},e.prototype.setTime=function(t){var e=this.paused;e&&this.resume(),this.content.started||this.content.start(),this.forwardTime(t+this.startTime,!0),e&&this.pause()},e.prototype.forwardTime=function(t,e){void 0===e&&(e=!1);for(var r=1e3*t-this.content.timeInms,i=r<0,n=Math.abs(r),o=i?-15:15;n>15;n-=15)this.update(o,e);this.update(i?-n:n,e)},e.prototype.reset=function(){var t=this;this.rendererOptions=null,this.pluginSystem.plugins.forEach((function(e){return e.onCompositionWillReset(t,t.renderFrame)})),this.content.createContent(),this.content.onEnd=function(){window.setTimeout((function(){var e;null===(e=t.onEnd)||void 0===e||e.call(t,t)}),0)},this.pluginSystem.resetComposition(this,this.renderFrame)},e.prototype.prepareRender=function(){var t=this,e=this.renderFrame;this.postLoaders.length=0,this.pluginSystem.plugins.forEach((function(r){r.prepareRenderFrame(t,e)&&t.postLoaders.push(r)})),this.postLoaders.forEach((function(r){return r.postProcessFrame(t,e)}))},e.prototype.shouldRestart=function(){var t=this.content,e=t.ended,r=t.endBehavior;return e&&5===r},e.prototype.shouldDispose=function(){if(this.reusable)return!1;var t=this.content,e=t.ended,r=t.endBehavior;return e&&(!r||3===r)},e.prototype.update=function(t,e){if(void 0===e&&(e=!1),this.assigned&&!this.paused){this.shouldRestart()&&this.restart();var r=this.content.getUpdateTime(t*this.speed);this.updateVideo(),this.content.onUpdate(r),this.loaderData.spriteGroup.onUpdate(r),this.updateCamera(),this.shouldDispose()?this.dispose():e||this.prepareRender()}},e.prototype.updateVideo=function(){var t,e=performance.now();e-this.lastVideoUpdateTime>33&&((null!==(t=this.textures)&&void 0!==t?t:[]).forEach((function(t){return null==t?void 0:t.uploadCurrentVideoFrame()})),this.lastVideoUpdateTime=e)},e.prototype.updateCamera=function(){this.camera.updateMatrix()},e.prototype.updatePluginLoaders=function(t){var e=this;this.pluginSystem.plugins.forEach((function(r){return r.onCompositionUpdate(e,t)}))},e.prototype.getItemByName=function(t,e){if(this.content&&this.content.items)return this.content.getItemByName(t)[0]},e.prototype.getItemByID=function(t){return this.content&&this.content.items&&this.content.itemCacheMap.has(t)?this.content.itemCacheMap.get(t).item:null},e.prototype.getItemCurrentParent=function(t){return this.content.getItemCurrentParent(t)},e.prototype.itemLifetimeEvent=function(t,e){var r=this,i=e?function(e){return e.onCompositionItemLifeBegin(r,t)}:function(e){return e.onCompositionItemLifeEnd(r,t)};this.pluginSystem.plugins.forEach(i)},e.prototype.getHitTestRay=function(t,e){var r=this.renderFrame.editorTransform,i=r.x,n=r.y;return he((t-r.z)/i,(e-r.w)/n,this.camera)},e.prototype.getEngine=function(){var t;return null===(t=this.renderer)||void 0===t?void 0:t.engine},e.prototype.hitTest=function(t,e,r,i){if(this.isDestroyed||!this.interactive)return[];var n=[],o=this.getHitTestRay(t,e);return this.content.hitTest(o,t,e,n,r,i),this.refContent.forEach((function(a){a.hitTest(o,t,e,n,r,i)})),n},e.prototype.addInteractiveItem=function(t,e){var r;if(e===L.MESSAGE)return null===(r=this.onMessageItem)||void 0===r||r.call(this,{name:t.name,phrase:2,id:t.id,compositionId:this.id}),t.id},e.prototype.removeInteractiveItem=function(t,e){var r;e===L.MESSAGE&&(null===(r=this.onMessageItem)||void 0===r||r.call(this,{name:t.name,phrase:1,id:t.id,compositionId:this.id}))},e.prototype.destroyTextures=function(e){for(var r,i=0;i<e.length;i++){var n=e[i];if(n)if(n.sourceType!==t.TextureSourceType.data||this.texInfo[n.id]){if(this.autoRefTex)--this.texInfo[n.id]||n.dispose()}else n!==(null===(r=this.rendererOptions)||void 0===r?void 0:r.emptyTexture)&&n!==this.renderFrame.transparentTexture&&n.dispose()}},e.prototype.destroyItem=function(t){var e=this;t.type==P.composition?4!==t.endBehavior&&t.items.forEach((function(t){return e.pluginSystem.plugins.forEach((function(r){return r.onCompositionItemRemoved(e,t)}))})):(this.content.removeItem(t),this.refContent.forEach((function(e){return e.removeItem(t)})),this.pluginSystem.plugins.forEach((function(r){return r.onCompositionItemRemoved(e,t)})))},e.prototype.lost=function(t){this.videoState=this.textures.map((function(t){if("video"in t.source)return t.source.video.pause(),t.source.video.currentTime})),this.textures.map((function(t){return t.dispose()})),this.dispose()},e.prototype.dispose=function(){var t,e,r=this;if(!this.destroyed){this.destroyed=!0;var i={},n=this.textures;n&&(this.keepResource?n.forEach((function(t){(null==t?void 0:t.dispose)&&(i[t.id]=t.dispose,t.dispose=er)})):n.forEach((function(t){return t&&t.dispose()}))),this.content.dispose(),this.renderFrame.dispose(),null===(t=this.rendererOptions)||void 0===t||t.emptyTexture.dispose(),null===(e=this.pluginSystem)||void 0===e||e.destroyComposition(this),this.update=function(){tr.error("Update disposed composition: ".concat(r.name,"."))},this.onPlayerPause=er,this.dispose=er,n&&this.keepResource&&n.forEach((function(t){return t.dispose=i[t.id]})),this.compositionSourceManager.dispose(),this.refCompositionProps.clear()}},e.prototype.setEditorTransform=function(t,e,r){this.renderFrame.editorTransform.set(t,t,e,r)},e.prototype.translateByPixel=function(t,e){this.renderer?this.content.translateByPixel(t,e):console.warn("Can not translate position when container not assigned")},e.prototype.translate=function(t,e,r){this.content.translate(t,e,r)},e.prototype.setPosition=function(t,e,r){this.content.setPosition(t,e,r)},e.prototype.rotate=function(t,e,r){this.content.rotate(t,e,r)},e.prototype.setRotation=function(t,e,r){this.content.setRotation(t,e,r)},e.prototype.scale=function(t,e,r){this.content.scale(t,e,r)},e.prototype.setScale=function(t,e,r){this.content.setScale(t,e,r)},e.prototype.offloadTexture=function(){this.textureOffloaded||(this.textures.forEach((function(t){return t&&t.offloadData()})),this.textureOffloaded=!0)},e.prototype.getRendererOptions=function(){return this.rendererOptions||(this.rendererOptions={emptyTexture:this.renderFrame.emptyTexture,cachePrefix:"-"}),this.rendererOptions},e.prototype.reloadTexture=function(){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return this.textureOffloaded?[4,Promise.all(this.textures.map((function(t){return null==t?void 0:t.reloadData()})))]:[3,2];case 1:t.sent(),this.textureOffloaded=!1,t.label=2;case 2:return[2]}}))}))},e}(),Uu=function(){function t(){this.destroyed=!1,this.textures=[],this.materials=[],this.geometries=[],this.meshes=[],this.renderPasses=[],this.renderErrors=new Set}return t.prototype.addTexture=function(t){this.destroyed||G(this.textures,t)},t.prototype.removeTexture=function(t){this.destroyed||X(this.textures,t)},t.prototype.addMaterial=function(t){this.destroyed||G(this.materials,t)},t.prototype.removeMaterial=function(t){this.destroyed||X(this.materials,t)},t.prototype.addGeometry=function(t){this.destroyed||G(this.geometries,t)},t.prototype.removeGeometry=function(t){this.destroyed||X(this.geometries,t)},t.prototype.addMesh=function(t){this.destroyed||G(this.meshes,t)},t.prototype.removeMesh=function(t){this.destroyed||X(this.meshes,t)},t.prototype.addRenderPass=function(t){this.destroyed||G(this.renderPasses,t)},t.prototype.removeRenderPass=function(t){this.destroyed||X(this.renderPasses,t)},Object.defineProperty(t.prototype,"isDestroyed",{get:function(){return this.destroyed},enumerable:!1,configurable:!0}),t.prototype.getShaderLibrary=function(){return this.renderer.getShaderLibrary()},t.prototype.dispose=function(){if(!this.destroyed){this.destroyed=!0;var t=[];this.renderPasses.length>0&&t.push("Pass ".concat(this.renderPasses.length)),this.meshes.length>0&&t.push("Mesh ".concat(this.meshes.length)),this.geometries.length>0&&t.push("Geom ".concat(this.geometries.length)),this.textures.length>0&&t.push("Tex ".concat(this.textures.length)),t.length>0&&tr.warn("Release GPU memory: ".concat(t.join(", "))),this.renderPasses.forEach((function(t){t.dispose()})),this.meshes.forEach((function(t){t.dispose()})),this.geometries.forEach((function(t){t.dispose()})),this.materials.forEach((function(t){t.dispose()})),this.textures.forEach((function(t){t.dispose()})),this.textures=[],this.materials=[],this.geometries=[],this.meshes=[],this.renderPasses=[],this.renderer=null}},t}(),Bu=function(){function t(t){void 0===t&&(t=60),this.paused=!0,this.lastTime=0,this.setFPS(t),this.tickers=[]}return t.prototype.getFPS=function(){return this.targetFPS},t.prototype.setFPS=function(t){this.targetFPS=Lt(t,1,120),this.interval=Math.floor(1e3/t)-2},t.prototype.getPaused=function(){return this.paused},t.prototype.start=function(){var t=this;if(this.paused=!1,!this.intervalId){this.lastTime=performance.now();var e=requestAnimationFrame||function(t){return window.setTimeout(t,16.7)},r=function(){t.intervalId=e(r),t.paused||t.tick()};r()}},t.prototype.stop=function(){(cancelAnimationFrame||window.clearTimeout)(this.intervalId),this.intervalId=0,this.lastTime=0,this.paused=!0,this.tickers=[]},t.prototype.pause=function(){this.paused=!0},t.prototype.resume=function(){this.paused=!1},t.prototype.tick=function(){if(!this.paused){var t=performance.now(),e=t-this.lastTime;if(e>=this.interval){this.lastTime=t,this.resetTickers&&(this.tickers=this.tickers.filter((function(t){return t})),this.resetTickers=!1);for(var r=0,i=this.tickers.length;r<i;r++){(0,this.tickers[r])(e)}}}},t.prototype.add=function(t){if("function"!=typeof t)throw new Error("Ticker: The tick object must implement the tick method.");this.tickers.push(t)},t}();yr("camera",br,Rr,!0),yr("sprite",Xn,Qn,!0),yr("particle",ba,ma,!0),yr("cal",Ra,_a,!0),yr("interact",Mn,wn,!0),yr("filter",Xn,Jn,!0),yr("text",Qa,qa,!0),U(Ts);var ku=((Iu={})[E.ONE]=i.OneFactor,Iu[E.ZERO]=i.ZeroFactor,Iu[E.SRC_COLOR]=i.SrcColorFactor,Iu[E.SRC_ALPHA]=i.SrcAlphaFactor,Iu[E.ONE_MINUS_SRC_COLOR]=i.OneMinusSrcColorFactor,Iu[E.ONE_MINUS_SRC_ALPHA]=i.OneMinusSrcAlphaFactor,Iu[E.DST_COLOR]=i.DstColorFactor,Iu[E.DST_ALPHA]=i.DstAlphaFactor,Iu[E.ONE_MINUS_DST_COLOR]=i.OneMinusDstColorFactor,Iu[E.ONE_MINUS_DST_ALPHA]=i.OneMinusDstAlphaFactor,Iu),Gu=((Pu={})[E.NEVER]=i.NeverStencilFunc,Pu[E.EQUAL]=i.EqualStencilFunc,Pu[E.LESS]=i.LessStencilFunc,Pu[E.LEQUAL]=i.LessEqualStencilFunc,Pu[E.ALWAYS]=i.AlwaysStencilFunc,Pu[E.NOTEQUAL]=i.NotEqualStencilFunc,Pu[E.GREATER]=i.GreaterStencilFunc,Pu[E.GEQUAL]=i.GreaterEqualStencilFunc,Pu),Xu=((Vu={})[E.KEEP]=i.KeepStencilOp,Vu[E.ZERO]=i.ZeroStencilOp,Vu[E.REPLACE]=i.ReplaceStencilOp,Vu[E.INCR]=i.IncrementStencilOp,Vu[E.DECR]=i.DecrementStencilOp,Vu[E.INCR_WRAP]=i.IncrementWrapStencilOp,Vu[E.DECR_WRAP]=i.IncrementWrapStencilOp,Vu[E.INVERT]=i.InvertStencilOp,Vu),Hu=((Fu={})[E.NEVER]=i.NeverDepth,Fu[E.ALWAYS]=i.AlwaysDepth,Fu[E.EQUAL]=i.EqualDepth,Fu[E.LESS]=i.LessDepth,Fu[E.LEQUAL]=i.LessEqualDepth,Fu[E.GREATER]=i.GreaterDepth,Fu[E.GEQUAL]=i.GreaterEqualDepth,Fu[E.NOTEQUAL]=i.NotEqualDepth,Fu);function Yu(t,e,r){t[e]?t[e].value=r:t[e]=new i.Uniform(r)}var ju=["uMaskTex","uSampler0","uSampler1","uSampler2","uSampler3","uSampler4","uSampler5","uSampler6","uSampler7","uSampler8","uSampler9","uSampler10","uSampler11","uSampler12","uSampler13","uSampler14","uSampler15","uColorOverLifetime","uColorOverTrail"],Wu=function(e){function r(r,n){var o=e.call(this,n)||this;o.textures={},o.material=new i.RawShaderMaterial,o.uniforms={};for(var a=n.shader,s=r.gpuCapability.level,u=0;u<t.maxSpriteMeshItemCount;u++)o.uniforms["uSampler".concat(u)]=new i.Uniform(null);return o.uniforms.uEditorTransform=new i.Uniform([1,1,0,0]),o.uniforms.effects_ObjectToWorld=new i.Uniform((new i.Matrix4).identity()),o.uniforms.effects_MatrixInvV=new i.Uniform([1,0,0,0,0,1,0,0,0,0,1,0,0,0,8,1]),o.uniforms.effects_MatrixVP=new i.Uniform([1,0,0,0,0,1,0,0,0,0,1,0,0,0,-8,1]),o.uniforms.effects_MatrixV=new i.Uniform([1,0,0,0,0,1,0,0,0,0,1,0,0,0,8,1]),o.material=new i.RawShaderMaterial({vertexShader:a.vertex,fragmentShader:a.fragment,alphaToCoverage:!1,depthFunc:i.LessDepth,polygonOffsetFactor:i.ZeroFactor,polygonOffsetUnits:i.ZeroFactor,polygonOffset:!1,uniforms:o.uniforms}),o.material.glslVersion=1===s?i.GLSL1:i.GLSL3,o}return o(r,e),r.prototype.onSetUniformValue=function(t,e){var r;ju.includes(t)&&(r=e.texture),this.material.uniforms[t]?this.material.uniforms[t].value=r||e:this.material.uniforms[t]=new i.Uniform(r||e)},r.prototype.onRemoveUniformValue=function(t){this.material.uniforms[t]&&(this.material.uniforms[t].value=null)},Object.defineProperty(r.prototype,"blending",{get:function(){return this.material.blending!==i.NoBlending},set:function(t){this.material.blending=t?i.CustomBlending:i.NoBlending},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"blendFunction",{get:function(){var t=this.material,e=t.blendSrc,r=t.blendDst;return[e,r,t.blendSrcAlpha||e,t.blendDstAlpha||r]},set:function(t){if(t){var e=l(t,4),r=e[0],i=e[1],n=e[2],o=e[3];this.material.blendSrc=ku[r],this.material.blendDst=ku[i],this.material.blendSrcAlpha=ku[n],this.material.blendDstAlpha=ku[o]}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"blendEquation",{get:function(){var t=this.material,e=t.blendEquation;return[e,t.blendEquationAlpha||e]},set:function(t){if(t){var e=l(t,2),r=e[0],i=e[1];this.material.blendEquation=r,this.material.blendEquationAlpha=i}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"depthTest",{get:function(){return this.material.depthTest},set:function(t){this.material.depthTest=!!t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"depthMask",{get:function(){return this.material.depthWrite},set:function(t){this.material.depthWrite=!!t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"depthFunc",{get:function(){return this.material.depthFunc},set:function(t){void 0!==t&&(this.material.depthFunc=Hu[t])},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"polygonOffsetFill",{get:function(){return this.material.polygonOffset},set:function(t){this.material.polygonOffset=!!t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"polygonOffset",{get:function(){return[this.material.polygonOffsetFactor,this.material.polygonOffsetUnits]},set:function(t){if(t){var e=l(t,2),r=e[0],i=e[1];this.material.polygonOffsetFactor=r,this.material.polygonOffsetUnits=i}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"sampleAlphaToCoverage",{get:function(){return this.material.alphaToCoverage},set:function(t){this.material.alphaToCoverage=!!t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"stencilTest",{get:function(){return this.material.stencilWrite},set:function(t){this.material.stencilWrite=!!t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"stencilMask",{get:function(){return[this.material.stencilWriteMask,this.material.stencilWriteMask]},set:function(t){t&&(this.material.stencilWriteMask=t[0])},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"stencilRef",{get:function(){return[this.material.stencilRef,this.material.stencilRef]},set:function(t){t&&(this.material.stencilRef=t[0])},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"stencilFunc",{get:function(){return[this.material.stencilFunc,this.material.stencilFunc]},set:function(t){t&&(this.material.stencilFunc=Gu[t[0]])},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"stencilOpFail",{get:function(){return[this.material.stencilFail,this.material.stencilZFail]},set:function(t){t&&(this.material.stencilFail=Xu[t[0]])},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"stencilOpZFail",{get:function(){return[this.material.stencilZFail,this.material.stencilZFail]},set:function(t){t&&(this.material.stencilZFail=Xu[t[0]])},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"stencilOpZPass",{get:function(){return[this.material.stencilZPass,this.material.stencilZPass]},set:function(t){t&&(this.material.stencilZPass=Xu[t[0]])},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"culling",{get:function(){return this.material.side!==i.DoubleSide},set:function(t){this.material.side=t?i.FrontSide:i.DoubleSide},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"cullFace",{get:function(){return this.material.side},set:function(t){t===C.FRONT?this.material.side=i.FrontSide:t===C.BACK&&(this.material.side=i.BackSide)},enumerable:!1,configurable:!0}),r.prototype.getTexture=function(t){return this.textures[t]},r.prototype.setTexture=function(t,e){this.setUniform(t,e.texture),this.textures[t]=e},r.prototype.getVector4Array=function(t){return this.uniforms[t].value},r.prototype.setVector4Array=function(t,e){var r,i,n=[];try{for(var o=c(e),a=o.next();!a.done;a=o.next()){var s=a.value;n=n.concat(s.toArray())}}catch(t){r={error:t}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}this.setUniform(t,n)},r.prototype.getMatrixArray=function(t){return this.uniforms[t].value},r.prototype.setMatrixArray=function(t,e){var r,i,n=[];try{for(var o=c(e),a=o.next();!a.done;a=o.next()){var s=a.value;n=n.concat(s.elements)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}this.setUniform(t,n)},r.prototype.setMatrixNumberArray=function(t,e){this.setUniform(t,e)},r.prototype.getMatrix=function(t){return this.uniforms[t].value},r.prototype.setMatrix=function(t,e){this.setUniform(t,e)},r.prototype.setMatrix3=function(t,e){this.setUniform(t,e)},r.prototype.getVector2=function(t){return this.uniforms[t].value},r.prototype.setVector2=function(t,e){this.setUniform(t,e)},r.prototype.getVector3=function(t){return this.uniforms[t].value},r.prototype.setVector3=function(t,e){this.setUniform(t,e)},r.prototype.getVector4=function(t){return this.uniforms[t].value},r.prototype.setVector4=function(t,e){this.setUniform(t,e)},r.prototype.getQuaternion=function(t){return this.uniforms[t].value},r.prototype.setQuaternion=function(t,e){this.setUniform(t,e)},r.prototype.getFloat=function(t){return this.uniforms[t].value},r.prototype.setFloat=function(t,e){this.setUniform(t,e)},r.prototype.getFloats=function(t){return this.uniforms[t].value},r.prototype.setFloats=function(t,e){this.setUniform(t,e)},r.prototype.getInt=function(t){return this.uniforms[t].value},r.prototype.setInt=function(t,e){this.setUniform(t,e)},r.prototype.hasUniform=function(t){return!!this.uniforms[t]},r.prototype.setUniform=function(t,e){var r=new i.Uniform(e);this.uniforms[t]=this.material.uniforms[t]=r},r.prototype.enableKeyword=function(t){throw new Error("Method not implemented.")},r.prototype.disableKeyword=function(t){throw new Error("Method not implemented.")},r.prototype.isKeywordEnabled=function(t){throw new Error("Method not implemented.")},r.prototype.clone=function(t){throw new Error("Method not implemented.")},r.prototype.cloneUniforms=function(t){throw new Error("Method not implemented.")},r.prototype.dispose=function(t){this.destroyed&&(this.material.dispose(),this.destroyed=!0)},r}(ci),Zu=function(t){function e(e){var r=t.call(this,e)||this;return r.semantics.setSemantic(p),r.semantics.setSemantic(d),r.semantics.setSemantic(m),r.semantics.setSemantic(v),r}return o(e,t),e.prototype.setRenderPasses=function(t){this._renderPasses=tt(t.slice())},e.prototype.addRenderPass=function(t){et(this._renderPasses,t)},e.prototype.createResource=function(){this.resource={}},e.prototype.createCopyMesh=function(t){},e.prototype.addMeshToDefaultRenderPass=function(t){var e,r=t.material.material,n=r.uniforms,o=t.material.uniformSemantics;if(this.threeCamera){var a=this.threeCamera,s=(new i.Matrix4).multiplyMatrices(a.projectionMatrix,a.matrixWorldInverse);e={effects_ObjectToWorld:t.mesh.matrixWorld,effects_MatrixV:a.matrixWorldInverse,effects_MatrixVP:s,effects_MatrixInvV:a.matrixWorld}}else{a=this.camera;e={effects_ObjectToWorld:t.worldMatrix.toArray(),effects_MatrixV:a.getViewMatrix().toArray(),effects_MatrixVP:a.getViewProjectionMatrix().toArray(),effects_MatrixInvV:a.getInverseViewMatrix().toArray()}}Object.keys(o).forEach((function(t){e[t]&&Yu(n,t,e[t])})),r.uniformsNeedUpdate=!0,this.group.add(t.mesh)},e.prototype.removeMeshFromDefaultRenderPass=function(t){this.group.remove(t.mesh)},e.prototype.updateMatrix=function(){var t=this.group,e=this.threeCamera;e&&t.children.forEach((function(t){var r=t.material,n=r.uniforms,o=(new i.Matrix4).multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse);Yu(n,"effects_ObjectToWorld",t.matrixWorld),Yu(n,"effects_MatrixVP",o),r.uniformsNeedUpdate=!0}))},e.prototype.updateUniform=function(){var t=this.group,e=this.camera;t.children.forEach((function(t){var r=t.material;Yu(r.uniforms,"effects_MatrixInvV",e.getInverseViewMatrix().toArray()),Yu(r.uniforms,"effects_MatrixVP",e.getViewProjectionMatrix().toArray()),Yu(r.uniforms,"effects_MatrixV",e.getViewMatrix().toArray()),r.uniformsNeedUpdate=!0}))},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.group&&this.group.clear()},e}(fn),qu=function(e){function r(r,i){void 0===i&&(i={});var n=e.call(this)||this;if(r){var o=r.width,s=void 0===o?1:o,u=r.height,c=void 0===u?1:u;n.texture=n.createTextureByType(a(a({},i),{sourceType:t.TextureSourceType.data,data:r})),n.width=s,n.height=c}else n.texture=n.createTextureByType(i);return n.texture.needsUpdate=!0,n}return o(r,e),r.toThreeJsTextureFilter=function(t){return t===E.LINEAR?i.LinearFilter:i.NearestFilter},r.toThreeJsTextureWrap=function(t){switch(t){case E.MIRRORED_REPEAT:return i.MirroredRepeatWrapping;case E.REPEAT:return i.RepeatWrapping;default:return i.ClampToEdgeWrapping}},r.prototype.updateSource=function(t){this.texture.dispose(),this.texture=this.createTextureByType(t),this.texture.needsUpdate=!0},r.prototype.startVideo=function(){return s(this,void 0,void 0,(function(){var e;return u(this,(function(r){switch(r.label){case 0:return this.sourceType!==t.TextureSourceType.video?[3,2]:(e=this.texture.source.data).paused?[4,e.play()]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}}))}))},r.prototype.assembleOptions=function(e){var n=e.target,o=void 0===n?E.TEXTURE_2D:n;return e.sourceType||(e.sourceType="image"in e?t.TextureSourceType.image:"data"in e?t.TextureSourceType.data:"video"in e?t.TextureSourceType.video:t.TextureSourceType.none),a(a({target:o,format:i.RGBAFormat,type:i.UnsignedByteType},e),{minFilter:r.toThreeJsTextureFilter(e.minFilter),magFilter:r.toThreeJsTextureFilter(e.magFilter),wrapS:r.toThreeJsTextureWrap(e.wrapS),wrapT:r.toThreeJsTextureWrap(e.wrapT)})},r.prototype.dispose=function(){this.texture.dispose()},r.prototype.createTextureByType=function(e){var r,n,o=this.assembleOptions(e),a=o.flipY,s=o.type,u=o.wrapS,c=o.wrapT,l=o.minFilter,h=o.magFilter,f=o.sourceType,p=i.UVMapping,d=o.format,m=void 0;if(this.sourceType=f,f===t.TextureSourceType.data){var v=e.data;m=new i.DataTexture(v.data,v.width,v.height,d,s,p,u,c,h,l),this.width=v.width,this.height=v.height}else if(f===t.TextureSourceType.image){var y=e.image;m=new i.Texture(y,p,u,c,h,l,d,s),this.width=y.width,this.height=y.height}else if(f===t.TextureSourceType.compressed){var x=0,g=0,T=e.mipmaps.map((function(t){var e=t.data,r=t.width,i=t.height;return x=x<r?r:x,g=g<i?i:g,{data:e,width:r,height:i,colorSpace:"srgb"}}));d=i.RGBA_ASTC_4x4_Format,m=new i.CompressedTexture(T,x,g,d,s,p,u,c,h,l),this.width=x,this.height=g}else if(f===t.TextureSourceType.video)m=new i.VideoTexture(e.video,p,u,c,h,l,d,s);else if(f===t.TextureSourceType.framebuffer){if(v=e.data){var E=null!==(r=v.width)&&void 0!==r?r:0,S=null!==(n=v.height)&&void 0!==n?n:0;m=new i.FramebufferTexture(E,S,d),this.width=E,this.height=S}}else f===t.TextureSourceType.none&&((m=new i.DataTexture(new Uint8Array(4).fill(255),1,1)).wrapS=i.MirroredRepeatWrapping,m.wrapT=i.MirroredRepeatWrapping,this.width=this.height=1);if(m)return m.flipY=!!a,m;throw new Error("使用未知的数据类型创建纹理")},r}(Kr),Qu=function(t){function e(r,i){var n,o=t.call(this,r,i)||this;return null===(n=o.compositionSourceManager.sourceContent)||void 0===n||n.items.forEach((function(t){var r=t.content.renderer.shape;r&&Object.keys(r).forEach((function(t){var i=r[t];e.shape[t]||(e.shape[t]=0),e.shape[t]+=i.length}))})),o.content.start(),o}return o(e,t),e.prototype.createRenderFrame=function(){this.renderFrame=new Zu({camera:this.camera,keepColorBuffer:this.keepColorBuffer,renderer:this.renderer})},e.prototype.updateVideo=function(){this.textures.map((function(t){return t.startVideo()}))},e.prototype.updateCamera=function(){var t=this.renderFrame;t.threeCamera?t.updateMatrix():t.updateUniform()},e.prototype.getRendererOptions=function(){var t=qu.createWithData(this.renderer.engine,{data:new Uint8Array(4).fill(255),width:1,height:1});return t.texture.needsUpdate=!0,this.rendererOptions||(this.rendererOptions={emptyTexture:t,cachePrefix:"-"}),this.rendererOptions},e.shape={},e}(Du),Ku=1,Ju=function(t){function e(e,r){var n=this,o=r.drawStart,a=void 0===o?0:o,s=r.drawCount,u=r.indices,c=r.mode,l=r.name,h=void 0===l?"effectsGeometry:".concat(Ku++):l;(n=t.call(this,h)||this).attributes={},n.destroyed=!1,n.attributesName=[],n.mode=null!=c?c:E.TRIANGLES;var f=[],p={},d=new i.BufferGeometry;return Object.keys(r.attributes).forEach((function(t){var e=r.attributes[t];if("dataSource"in e){var o=e.dataSource;if(o){void 0===p[o]&&n.setAttributeType(o,e,d,p,r.maxVertex);var a=e.size,s=e.offset,u=e.normalize,c=p[o],l=c.buffer,h=c.dataLength,m=new i.InterleavedBufferAttribute(l,a,(null!=s?s:0)/h,u);d.setAttribute(t,m),p[t]={buffer:l,attribute:m,type:c.type,dataLength:h}}}else n.setAttributeType(t,e,d,p,r.maxVertex);f.push(t)})),u&&u.data&&d.setIndex(new i.BufferAttribute(u.data,1)),n.geometry=d,n.attributes=p,n.attributesName=f,n.drawStart=a,n.drawCount=null!=s?s:0,n}return o(e,t),Object.defineProperty(e.prototype,"drawCount",{get:function(){return this.geometry.drawRange.count},set:function(t){this.geometry.drawRange.count=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drawStart",{get:function(){return this.geometry.drawRange.start},set:function(t){this.geometry.drawRange.start=t},enumerable:!1,configurable:!0}),e.prototype.getAttributeData=function(t){if(null!=this.attributes[t])return this.attributes[t].buffer.array},e.prototype.setAttributeData=function(t,e){if(null!=this.attributes[t]){var r=this.attributes[t].buffer;r.updateRange.count=e.length,r.updateRange.offset=0,r.set(e,0),this.geometry.attributes[t].needsUpdate=!0}},e.prototype.setAttributeSubData=function(t,e,r){null!=this.attributes[t]&&(this.attributes[t].buffer.set(r,e),this.geometry.attributes[t].needsUpdate=!0)},e.prototype.getAttributeStride=function(t){var e=this.attributes[t];return e.buffer.stride*Si[e.type]},e.prototype.getAttributeNames=function(){return this.attributesName},e.prototype.getIndexData=function(){var t=this.geometry.getIndex();return null===t?void 0:t.array},e.prototype.setIndexData=function(t){t&&(this.geometry.setIndex(new i.BufferAttribute(t,1)),this.geometry.index.needsUpdate=!0)},e.prototype.setIndexSubData=function(t,e){var r=this.geometry.getIndex();if(null!==r){var i=t,n=t+e.length;if(r.count<n){var o=new e.constructor(end);o.set(r.array),r.array=o}r.array.set(e,i),this.geometry.index.needsUpdate=!0}},e.prototype.setDrawStart=function(t){this.drawStart=t},e.prototype.getDrawStart=function(){return this.drawStart},e.prototype.setDrawCount=function(t){this.drawCount=t},e.prototype.getDrawCount=function(){return this.drawCount},e.prototype.dispose=function(){this.destroyed||(this.geometry.dispose(),this.destroyed=!0)},e.prototype.setAttributeType=function(t,e,r,n,o){var a,s=e,u=s.size,c=s.offset,l=s.normalize,h=s.type,f=void 0===h?E.FLOAT:h,p=e,d=p.stride,m=p.data;if(f&&!m&&(m=Ri(f)),m){d="aSprite"===t?12:null!=d?d:0;var v=m instanceof Float32Array?Float32Array.BYTES_PER_ELEMENT:Uint16Array.BYTES_PER_ELEMENT,y=d/v;if(o){var x=o*d+(null!==(a=Qu.shape[t])&&void 0!==a?a:0);0===m.length&&(m=m instanceof Float32Array?new Float32Array(x):new Uint16Array(x))}var g=new i.InterleavedBuffer(m,y),T=new i.InterleavedBufferAttribute(g,u,(null!=c?c:0)/v,l);r.setAttribute(t,T),n[t]={buffer:g,attribute:T,type:f,dataLength:v}}},e}(bi),$u=function(e){function r(t,r){var n=this,o=r.material,a=r.geometry,s=r.priority,u=void 0===s?0:s;return(n=e.call(this,t,r)||this).geometry=a,n.material=o,a.mode===E.LINES?n.mesh=new i.LineSegments(a.geometry,o.material):n.mesh=new i.Mesh(a.geometry,o.material),n.worldMatrix=n.mesh.matrixWorld,n.priority=u,n}return o(r,e),Object.defineProperty(r.prototype,"priority",{get:function(){return this.mesh.renderOrder},set:function(t){this.mesh&&(this.mesh.renderOrder=t)},enumerable:!1,configurable:!0}),r.prototype.setVisible=function(t){this.mesh.visible=t},r.prototype.getVisible=function(){return this.mesh.visible},r.prototype.firstGeometry=function(){return this.geometry},r.prototype.setMaterial=function(e,r){r!==t.DestroyOptions.keep&&this.material.dispose(r),this.material=e,this.mesh.material=e.material},r.prototype.restore=function(){},r.prototype.dispose=function(t){this.destroyed||(this.mesh.clear(),this.destroyed=!0)},r}(Ii),tc=function(t){function e(e){var r=t.call(this)||this;return r.gpuCapability=new xn(e),r}return o(e,t),e}(Uu),ec=function(t){function e(e){var r=t.call(this)||this;return r.engine=new tc(e),r}return o(e,t),e}(_n),rc=function(t){function e(e,r){var i=t.call(this)||this,n=r.width,o=r.height,a=r.camera;return i.renderer=new ec(e),i.width=n,i.height=o,i.camera=a,i}return o(e,t),Object.defineProperty(e.prototype,"currentComposition",{get:function(){return this.compositions[0]},enumerable:!1,configurable:!0}),e.prototype.loadScene=function(t,e){return s(this,void 0,void 0,(function(){var e,r;return u(this,(function(i){switch(i.label){case 0:return[4,new Lu({}).loadScene(t)];case 1:return e=i.sent(),(r=new Qu({renderer:this.renderer,width:this.width,height:this.height},e)).renderFrame.group=this,r.renderFrame.threeCamera=this.camera,this.compositions=[r],[2]}}))}))},e.prototype.update=function(t){this.compositions.forEach((function(e){e.update(t)}))},e}(i.Group);Dn(8),Kr.create=function(t,e){return new qu(void 0,e)},Kr.createWithData=function(t,e,r){return new qu(e,r)},ci.create=function(t,e){return new Wu(t,e)},bi.create=function(t,e){return new Ju(t,e)},Ii.create=function(t,e){return new $u(t,e)};var ic="1.6.8";tr.info("THREEJS plugin version: "+ic),t.AbstractPlugin=Er,t.AssetManager=Lu,t.BYTES_TYPE_MAP=Si,t.BezierCurve=De,t.BezierCurvePath=Ue,t.COMPRESSED_TEXTURE=Sn,t.CONSTANT_MAP_BLEND=ku,t.CONSTANT_MAP_DEPTH=Hu,t.CONSTANT_MAP_STENCIL_FUNC=Gu,t.CONSTANT_MAP_STENCIL_OP=Xu,t.COPY_FRAGMENT_SHADER=mi,t.COPY_MESH_SHADER_ID=pi,t.COPY_VERTEX_SHADER=di,t.CalculateItem=jn,t.CalculateLoader=Ra,t.CalculateVFXItem=_a,t.Camera=us,t.CameraController=Sr,t.CameraVFXItem=Rr,t.CameraVFXItemLoader=br,t.Composition=Du,t.CompositionSourceManager=wu,t.DEFAULT_FONTS=Na,t.Downloader=Gr,t.EFFECTS_COPY_MESH_NAME=fi,t.EVENT_TYPE_CLICK=Cr,t.EVENT_TYPE_TOUCH_END=Mr,t.EVENT_TYPE_TOUCH_MOVE=Or,t.EVENT_TYPE_TOUCH_START=wr,t.Engine=Uu,t.EventSystem=Ir,t.FILTER_NAME_NONE=x,t.FilterSpriteVFXItem=Jn,t.Float16ArrayWrapper=Jt,t.FrameBuffer=Rn,t.GPUCapability=xn,t.Geometry=bi,t.GlobalUniforms=mn,t.GradientValue=Ne,t.HELP_LINK=g,t.InteractBehavior=Lr,t.InteractItem=Ln,t.InteractLoader=Mn,t.InteractMesh=Cn,t.InteractVFXItem=wn,t.KTXTexture=$r,t.LineSegments=ze,t.LinearValue=Fe,t.Material=ci,t.MaterialDataBlock=ni,t.Mesh=Ii,t.PLAYER_OPTIONS_ENV_EDITOR=y,t.POST_PROCESS_SETTINGS="post_process_settings",t.ParticleLoader=ba,t.ParticleMesh=ya,t.ParticleSystem=ia,t.ParticleVFXItem=ma,t.PassTextureCache=Ti,t.PluginSystem=xr,t.QCanvasViewer=La,t.QText=Ma,t.RENDER_PASS_NAME_PREFIX=ln,t.RENDER_PREFER_LOOKUP_TEXTURE=_i,t.RUNTIME_ENV="runtime_env",t.RandomSetValue=Ie,t.RandomValue=Pe,t.RandomVectorValue=Ve,t.RenderBuffer=vn,t.RenderFrame=fn,t.RenderPass=zi,t.RenderPassPriorityNormal=Pi,t.RenderPassPriorityPostprocess=3e3,t.RenderPassPriorityPrepare=0,t.RenderTargetHandle=Fi,t.Renderer=_n,t.SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_0=m,t.SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_SIZE_0=v,t.SEMANTIC_PRE_COLOR_ATTACHMENT_0=p,t.SEMANTIC_PRE_COLOR_ATTACHMENT_SIZE_0=d,t.SPRITE_VERTEX_STRIDE=f,t.SemanticMap=Ei,t.Shader=hi,t.SpriteItem=qn,t.SpriteLoader=Xn,t.SpriteMesh=Pn,t.SpriteVFXItem=Qn,t.StaticValue=Le,t.TEMPLATE_USE_OFFSCREEN_CANVAS=Ai,t.TEXTURE_UNIFORM_MAP=ju,t.TextItem=Za,t.TextLoader=Qa,t.TextMesh=Aa,t.TextVFXItem=qa,t.Texture=Kr,t.TextureFactory=ri,t.ThreeComposition=Qu,t.ThreeDisplayObject=rc,t.ThreeMaterial=Wu,t.ThreeTexture=qu,t.Ticker=Bu,t.TimelineComponent=Qe,t.Transform=hr,t.VFXItem=fr,t.ValueGetter=Me,t.addByOrder=et,t.addItem=G,t.addItemWithOrder=H,t.alphaFrameFrag=Hi,t.alphaMaskFrag=Yi,t.assertExist=nt,t.asserts=function(t,e){if(void 0===e&&(e="asserts failed"),!t)throw new Error(e)},t.blend="vec4 blendColor(vec4 color,vec4 vc,float mode){vec4 ret=color*vc;\n#ifdef PRE_MULTIPLY_ALPHA\nfloat alpha=vc.a;\n#else\nfloat alpha=ret.a;\n#endif\nif(mode==1.){ret.rgb*=alpha;}else if(mode==2.){ret.rgb*=alpha;ret.a=dot(ret.rgb,vec3(0.33333333));}else if(mode==3.){alpha=color.r*alpha;ret=vec4(vc.rgb*alpha,alpha);}return ret;}",t.bloomMixVert=Qi,t.bloomThresholdVert=Ki,t.calculateTranslation=re,t.cameraMoveFrag="uniform vec2 uMoveTexSize;uniform sampler2D uFilterSource;\n#define INTERPOLATION 1\nvec4 filterMain(vec2 texCoord,sampler2D tex){\n#ifdef INTERPOLATION\nvec2 texInPixel=texCoord*uMoveTexSize;vec2 coordMin=floor(texInPixel);vec2 pp=texInPixel-coordMin;vec4 fCoord=vec4(coordMin/uMoveTexSize,(coordMin+vec2(1.))/uMoveTexSize);vec4 cLT=texture2D(uFilterSource,vec2(fCoord.x,fCoord.w));vec4 cLB=texture2D(uFilterSource,vec2(fCoord.x,fCoord.y));vec4 cRT=texture2D(uFilterSource,vec2(fCoord.z,fCoord.w));vec4 cRB=texture2D(uFilterSource,vec2(fCoord.z,fCoord.y));vec4 cB=mix(cLB,cRB,pp.x);vec4 cT=mix(cLT,cRT,pp.x);return mix(cB,cT,pp.y);\n#else\nreturn texture2D(uFilterSource,texCoord);\n#endif\n}",t.cameraMoveVert=ji,t.canvasPool=Ba,t.colorGradingFrag=$i,t.colorStopsFromGradient=Z,t.colorToArr=j,t.combineImageTemplate=ja,t.combineImageTemplate1=Pa,t.combineImageTemplate1Async=function(t,e,r,i,n){return s(this,void 0,void 0,(function(){return u(this,(function(o){return console.warn("The combineImageTemplate1Async function is deprecated. Use combineImageTemplate1 instead."),[2,Pa(t,e,r,i,n)]}))}))},t.combineImageTemplate2=Ya,t.combineImageTemplate2Async=function(t,e,r,i,n){return s(this,void 0,void 0,(function(){return u(this,(function(o){return console.warn("The combineImageTemplate2Async function is deprecated. Use combineImageTemplate2 instead."),[2,Ya(t,e,r,i,n)]}))}))},t.combineImageTemplateAsync=function(t,e,r,i,n){return s(this,void 0,void 0,(function(){return u(this,(function(o){return console.warn("The combineImageTemplateAsync function is deprecated. Use combineImageTemplate instead."),[2,ja(t,e,r,i,n)]}))}))},t.compatibleFrag="#version 300 es\n#ifdef WEBGL2\n#define texture2D texture\n#define textureCube texture\n#define textureCubeLodEXT textureLod\nlayout(location=0)out vec4 fragColor;\n#else\n#define fragColor gl_FragColor\n#endif\n",t.compatibleVert="#version 300 es\n#ifdef WEBGL2\n#define texture2D texture\n#else\n#endif\n",t.convertAnchor=ce,t.copyFrag=li,t.createCopyShader=vi,t.createFilter=k,t.createFilterShaders=B,t.createGLContext=function(t,e,r){var i;if(void 0===e&&(e="webgl"),"webgl2"===e&&((i=t.getContext("webgl2",r))||console.debug("WebGL2 context retrieval failed, falling back to WebGL context.")),i&&"webgl"!==e||(i=t.getContext("webgl",r)),!i)throw new Error("This browser does not support WebGL or the WebGL version is incorrect. Please check your WebGL version.");return i},t.createKeyFrameMeta=Ye,t.createShaderWithMarcos=Dr,t.createShape=yo,t.createVFXItem=pr,t.createValueGetter=ke,t.decimalEqual=pe,t.deepClone=function t(e){if(ir(e))return e.map(t);if(e&&"object"==typeof e){if(ArrayBuffer.isView(e))return e.slice();for(var r={},i=Object.keys(e),n=0;n<i.length;n++){var o=i[n];r[o]=t(e[o])}return r}return e},t.defaultGlobalVolume=cn,t.defaultPlugins=mr,t.delayFrag=Wi,t.deserializeMipmapTexture=Zr,t.distortionFrag=Zi,t.distortionVert=qi,t.earcut=Bo,t.enlargeBuffer=Y,t.ensureVec3=ie,t.filters=Ts,t.findPreviousRenderPass=function(t,e){var r=t.indexOf(e);return t[r-1]},t.gaussianDownFrag="precision highp float;varying vec2 uv;uniform sampler2D _MainTex;uniform vec2 _TextureSize;float GaussWeight2D(float x,float y,float sigma){float PI=3.14159265358;float E=2.71828182846;float sigma_2=pow(sigma,2.0);float a=-(x*x+y*y)/(2.0*sigma_2);return pow(E,a)/(2.0*PI*sigma_2);}vec3 GaussNxN(sampler2D tex,vec2 uv,vec2 stride,float sigma){vec3 color=vec3(0.,0.,0.);const int r=5/2;float weight=0.0;for(int i=-r;i<=r;i++){for(int j=-r;j<=r;j++){float w=GaussWeight2D(float(i),float(j),sigma);vec2 coord=uv+vec2(i,j)*stride;color+=texture2D(tex,coord).rgb*w;weight+=w;}}color/=weight;return color;}void main(){vec4 mainColor=texture2D(_MainTex,uv);vec3 color=mainColor.rgb;color=GaussNxN(_MainTex,uv,1.0/_TextureSize,1.0);gl_FragColor=vec4(color,1.0);}",t.gaussianDownHFrag=tn,t.gaussianDownVFrag=en,t.gaussianUpFrag=rn,t.generateEmptyTypedArray=Ri,t.generateHalfFloatTexture=Jr,t.getBackgroundImage=ka,t.getColorFromGradientStops=W,t.getConfig=wi,t.getDefaultTemplateCanvasPool=function(){return Ba},t.getDefaultTextureFactory=function(){return ei||(ei=new ri),ei},t.getGeometryByShape=jo,t.getGeometryTriangles=Yo,t.getImageItemRenderInfo=Vn,t.getKTXTextureOptions=ti,t.getKeyFrameMetaByRawValue=He,t.getParticleMeshShader=Ta,t.getPixelRatio=function(){if("object"==typeof screen&&"object"==typeof document){var t=Math.max(document.documentElement.clientWidth,window.innerWidth||0),e=screen.width/t;return Math.min(2*e,2)}return 1},t.getPreMultiAlpha=Vr,t.getStandardComposition=Tu,t.getStandardImage=gu,t.getStandardItem=Ru,t.getStandardJSON=yu,t.getTextureSize=pn,t.glContext=E,t.gpuTimer=function(t){var e=this,r=t.getExtension("EXT_disjoint_timer_query_webgl2");if(r){var i=t.createQuery(),n=function(){return s(e,void 0,void 0,(function(){return u(this,(function(e){return[2,new Promise((function(e,o){if(i){var a=t.getQueryParameter(i,t.QUERY_RESULT_AVAILABLE),s=t.getParameter(r.GPU_DISJOINT_EXT);if(a&&!s){var u=t.getQueryParameter(i,t.QUERY_RESULT);e(u/1e3/1e3)}(a||s)&&(t.deleteQuery(i),i=null),null!==a&&i&&window.setTimeout((function(){n().then(e).catch}),1)}}))]}))}))};if(!i)return;return{begin:function(){i&&t.beginQuery(r.TIME_ELAPSED_EXT,i)},end:function(){t.endQuery(r.TIME_ELAPSED_EXT)},getTime:n}}},t.imageDataFromColor=function(t){rr(t)&&(t=j(t));for(var e=t,r={width:1,height:1,data:new Uint8Array(4)},i=r.data,n=0;n<4;n++)i[n]=e[n];return r},t.imageDataFromGradient=$,t.initErrors=T,t.initGLContext=S,t.integrate="float calculateMovement(float t,vec2 p1,vec2 p2,vec2 p3,vec2 p4){float movement=0.0;float h=(t-p1.x)*0.05;for(int i=0;i<=20;i++){float t=float(i)*h;float nt=binarySearchT(t,p1.x,p2.x,p3.x,p4.x);float y=cubicBezier(nt,p1.y,p2.y,p3.y,p4.y);float weight=(i==0||i==20)? 1.0 :(mod(float(i),2.)!=0.)? 4.0 : 2.0;movement+=weight*y;}movement*=h/3.;return movement;}float integrateFromBezierCurveFrames(float time,float frameStart,float frameCount){int start=int(frameStart);int count=int(frameCount-1.);float ret=0.;for(int i=0;i<ITR_END;i+=2){vec4 k0=lookup_curve(i+start);vec4 k1=lookup_curve(i+1+start);if(i==0&&time<k0.x){return ret;}vec2 p1=vec2(k0.x,k0.y);vec2 p2=vec2(k0.z,k0.w);vec2 p3=vec2(k1.z,k1.w);vec2 p4=vec2(k1.x,k1.y);if(time>=k1.x){ret+=calculateMovement(k1.x,p1,p2,p3,p4);}if(time>=k0.x&&time<k1.x){return ret+calculateMovement(time,p1,p2,p3,p4);}}return ret;}float integrateByTimeLineSeg(float t,vec2 p0,vec2 p1){float t0=p0.x;float t1=p1.x;float y0=p0.y;float y1=p1.y;vec4 tSqr=vec4(t,t,t0,t0);tSqr=tSqr*tSqr;vec4 a=vec4(2.*t,3.,-t0,3.)*tSqr;float t1y0=t1*y0;vec4 b=vec4(y0-y1,t0*y1-t1y0,2.*y0+y1,t1y0);float r=dot(a,b);return r/(t0-t1)*0.16666667;}float integrateLineSeg(float time,vec2 p0,vec2 p1){float h=time-p0.x;float y0=p0.y;return(y0+y0+(p1.y-y0)*h/(p1.x-p0.x))*h/2.;}float integrateFromLineSeg(float time,float frameStart,float frameCount){if(time==0.){return 0.;}int start=int(frameStart);int count=int(frameCount-1.);float ret=0.;for(int i=0;i<ITR_END;i++){if(i>count){return ret;}vec4 ks=lookup_curve(i+start);vec2 k0=ks.xy;vec2 k1=ks.zw;if(time>k0.x&&time<=k1.x){return ret+integrateLineSeg(time,k0,k1);}ret+=integrateLineSeg(k1.x,k0,k1);vec2 k2=lookup_curve(i+start+1).xy;if(time>k1.x&&time<=k2.x){return ret+integrateLineSeg(time,k1,k2);}ret+=integrateLineSeg(k2.x,k1,k2);}return ret;}float integrateByTimeFromLineSeg(float time,float frameStart,float frameCount){if(time==0.){return 0.;}int start=int(frameStart);int count=int(frameCount-1.);float ret=0.;for(int i=0;i<ITR_END;i++){if(i>count){return ret;}vec4 ks=lookup_curve(i+start);vec2 k0=ks.xy;vec2 k1=ks.zw;if(time>k0.x&&time<=k1.x){return ret+integrateByTimeLineSeg(time,k0,k1);}ret+=integrateByTimeLineSeg(k1.x,k0,k1);vec2 k2=lookup_curve(i+start+1).xy;if(time>k1.x&&time<=k2.x){return ret+integrateByTimeLineSeg(time,k1,k2);}ret+=integrateByTimeLineSeg(k2.x,k1,k2);}return ret;}float getIntegrateFromTime0(float t1,vec4 value){float type=value.x;if(type==0.){return value.y*t1;}if(type==1.){vec2 p0=vec2(0.,value.y);vec2 p1=vec2(value.w,value.z);return integrateLineSeg(t1,p0,p1);}if(type==3.){return integrateFromLineSeg(t1,value.y,value.z);}if(type==4.){return mix(value.y,value.z,aSeed)*t1;}if(type==5.){return integrateFromBezierCurveFrames(t1,value.z,value.w);}return 0.;}float getIntegrateByTimeFromTime(float t0,float t1,vec4 value){float type=value.x;if(type==0.){return value.y*(t1*t1-t0*t0)/2.;}else if(type==1.){vec2 p0=vec2(0.,value.y);vec2 p1=vec2(value.w,value.z);return integrateByTimeLineSeg(t1,p0,p1)-integrateByTimeLineSeg(t0,p0,p1);}if(type==3.){return integrateByTimeFromLineSeg(t1,value.y,value.z)-integrateByTimeFromLineSeg(t0,value.y,value.z);}if(type==4.){return mix(value.y,value.z,aSeed)*(t1*t1-t0*t0)/2.;}if(type==5.){return integrateFromBezierCurveFrames(t1,value.z,value.w)-integrateFromBezierCurveFrames(t0,value.z,value.w);}return 0.;}",t.interpolateColor=q,t.isAlipayMiniApp=function(){return"undefined"!=typeof my&&"web"===(null===my||void 0===my?void 0:my.renderTarget)},t.isAndroid=K,t.isArray=ir,t.isFunction=nr,t.isIOS=function(){return!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform)},t.isObject=or,t.isScene=Ou,t.isSimulatorCellPhone=J,t.isString=rr,t.isUniformStruct=oi,t.isUniformStructArray=function(t){return t&&void 0!==t.length&&oi(t[0])},t.isValidFontFamily=ot,t.isWebGL2=function(t){return"undefined"!=typeof WebGL2RenderingContext&&"WebGL2RenderingContext"===t.constructor.name},t.itemFrag=Bi,t.itemFrameFrag=Di,t.itemVert=Ui,t.loadBinary=jr,t.loadBlob=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,new Promise((function(e,r){(new Gr).downloadBlob(t,e,(function(e,i){r("Couldn't load blob ".concat(t,": status ").concat(e,", ").concat(i))}))}))]}))}))},t.loadImage=Yr,t.loadMedia=Ga,t.loadVideo=Wr,t.loadWebPOptional=Hr,t.logger=tr,t.math=Qt,t.modifyMaxKeyframeShader=Ea,t.nearestPowerOfTwo=le,t.noop=er,t.numberToFix=de,t.parsePercent=Q,t.particleFrag=ki,t.particleOriginTranslateMap=ue,t.particleUniformTypeMap=va,t.particleVert=Gi,t.pluginLoaderMap=dr,t.pointOnLine=function(t,e,r,i,n,o){var a=t*i+e*n+r*o-n*i-o*t-r*e;return a>-.001&&a<.001},t.random=ar,t.registerFilter=D,t.registerFilters=U,t.registerPlugin=yr,t.removeItem=X,t.requestAsync=Ia,t.rotateVec2=Wo,t.screenMeshVert=Ji,t.setBlendMode=Ur,t.setConfig=function(t,e){return Ci[t]=e},t.setDefaultTextureFactory=function(t){ei=t},t.setMaskMode=kr,t.setMaxSpriteMeshItemCount=Dn,t.setRayFromCamera=he,t.setSideMode=Br,t.setSpriteMeshMaxFragmentTextures=function(e){t.maxSpriteTextureCount=e},t.setSpriteMeshMaxItemCountByGPU=function(e){return t.maxSpriteTextureCount=Math.min(e.maxFragmentTextures,16),e.maxVertexUniforms>=256?t.maxSpriteMeshItemCount=32:e.maxVertexUniforms>=128?t.maxSpriteMeshItemCount=16:void(t.maxSpriteTextureCount=8)},t.setUniformValue=Yu,t.sortByOrder=tt,t.spec=Rt,t.spriteMeshShaderFromFilter=Fn,t.spriteMeshShaderFromRenderInfo=zn,t.spriteMeshShaderIdFromRenderInfo=Nn,t.thresholdFrag=nn,t.throwDestroyedError=sr,t.trailVert=Xi,t.translatePoint=function(t,e){for(var r=[-.5,.5,-.5,-.5,.5,.5,.5,-.5],i=0;i<8;i+=2)r[i]+=t,r[i+1]+=e;return r},t.trianglesFromRect=fe,t.unregisterPlugin=function(t){delete vr[t],delete dr[t],X(mr,t)},t.valIfUndefined=function(t,e){return null==t?e:t},t.value="#ifdef SHADER_VERTEX\n#define CURVE_VALUE_TEXTURE uVCurveValueTexture\n#define CURVE_VALUE_ARRAY uVCurveValues\n#define CURVE_VALUE_COUNT VERT_CURVE_VALUE_COUNT\n#define FRAG_CURVE_VALUE_COUNT 0\n#else\n#define CURVE_VALUE_TEXTURE uFCurveValueTexture\n#define CURVE_VALUE_ARRAY uFCurveValues\n#define CURVE_VALUE_COUNT FRAG_CURVE_VALUE_COUNT\n#define VERT_CURVE_VALUE_COUNT 0\n#endif\n#if CURVE_VALUE_COUNT > 0\n#if LOOKUP_TEXTURE_CURVE\nuniform sampler2D CURVE_VALUE_TEXTURE;const float uCurveCount=1./float(CURVE_VALUE_COUNT);\n#define lookup_curve(i) texture2D(CURVE_VALUE_TEXTURE,vec2(float(i) * uCurveCount,0.))\n#else\nuniform vec4 CURVE_VALUE_ARRAY[CURVE_VALUE_COUNT];\n#define lookup_curve(i) CURVE_VALUE_ARRAY[i]\n#endif\n#else\n#define lookup_curve(i) vec4(0.)\n#endif\n#ifdef WEBGL2\n#define ITR_END (count + 1)\n#else\n#define ITR_END MAX_C\n#endif\n#define NONE_CONST_INDEX 1\n#ifdef SHADER_VERTEX\nin float aSeed;out float vSeed;\n#endif\n#ifdef SHADER_VERTEX\n#define MAX_C VERT_MAX_KEY_FRAME_COUNT\n#else\n#define MAX_C FRAG_MAX_KEY_FRAME_COUNT\n#endif\nmat4 cubicBezierMatrix=mat4(1.0,-3.0,3.0,-1.0,0.0,3.0,-6.0,3.0,0.0,0.0,3.0,-3.0,0.0,0.0,0.0,1.0);float cubicBezier(float t,float y1,float y2,float y3,float y4){vec4 tVec=vec4(1.0,t,t*t,t*t*t);vec4 yVec=vec4(y1,y2,y3,y4);vec4 result=tVec*cubicBezierMatrix*yVec;return result.x+result.y+result.z+result.w;}float binarySearchT(float x,float x1,float x2,float x3,float x4){float left=0.0;float right=1.0;float mid=0.0;float computedX;for(int i=0;i<8;i++){mid=(left+right)*0.5;computedX=cubicBezier(mid,x1,x2,x3,x4);if(abs(computedX-x)<0.0001){break;}else if(computedX>x){right=mid;}else{left=mid;}}return mid;}float valueFromBezierCurveFrames(float time,float frameStart,float frameCount){int start=int(frameStart);int count=int(frameCount-1.);for(int i=0;i<ITR_END;i+=2){if(i>=count){break;}vec4 k0=lookup_curve(i+start);vec4 k1=lookup_curve(i+1+start);if(i==0&&time<k0.x){return k0.y;}if(i==int(frameCount-2.)&&time>=k1.x){return k1.y;}if(time>=k0.x&&time<=k1.x){float t=(time-k0.x)/(k1.x-k0.x);float nt=binarySearchT(time,k0.x,k0.z,k1.z,k1.x);return cubicBezier(nt,k0.y,k0.w,k1.w,k1.y);}}}float evaluteLineSeg(float t,vec2 p0,vec2 p1){return p0.y+(p1.y-p0.y)*(t-p0.x)/(p1.x-p0.x);}float valueFromLineSegs(float time,float frameStart,float frameCount){int start=int(frameStart);int count=int(frameCount-1.);int end=start+count;for(int i=0;i<ITR_END;i++){if(i>count){return lookup_curve(i).w;}vec4 seg=lookup_curve(i+start);vec2 p0=seg.xy;vec2 p1=seg.zw;if(time>=p0.x&&time<=p1.x){return evaluteLineSeg(time,p0,p1);}vec2 p2=lookup_curve(i+start+1).xy;if(time>p1.x&&time<=p2.x){return evaluteLineSeg(time,p1,p2);}}return lookup_curve(0).y;}float getValueFromTime(float time,vec4 value){float type=value.x;if(type==0.){return value.y;}if(type==1.){return mix(value.y,value.z,time/value.w);}if(type==3.){return valueFromLineSegs(time,value.y,value.z);}if(type==4.){return mix(value.y,value.z,aSeed);}if(type==5.){return valueFromBezierCurveFrames(time,value.z,value.w);}return 0.;}",t.valueDefine="#ifdef SHADER_VERTEX\n#define CURVE_VALUE_TEXTURE uVCurveValueTexture\n#define CURVE_VALUE_ARRAY uVCurveValues\n#define CURVE_VALUE_COUNT VERT_CURVE_VALUE_COUNT\n#define FRAG_CURVE_VALUE_COUNT 0\n#else\n#define CURVE_VALUE_TEXTURE uFCurveValueTexture\n#define CURVE_VALUE_ARRAY uFCurveValues\n#define CURVE_VALUE_COUNT FRAG_CURVE_VALUE_COUNT\n#define VERT_CURVE_VALUE_COUNT 0\n#endif\n#if CURVE_VALUE_COUNT > 0\n#if LOOKUP_TEXTURE_CURVE\nuniform sampler2D CURVE_VALUE_TEXTURE;const float uCurveCount=1./float(CURVE_VALUE_COUNT);\n#define lookup_curve(i) texture2D(CURVE_VALUE_TEXTURE,vec2(float(i) * uCurveCount,0.))\n#else\nuniform vec4 CURVE_VALUE_ARRAY[CURVE_VALUE_COUNT];\n#define lookup_curve(i) CURVE_VALUE_ARRAY[i]\n#endif\n#else\n#define lookup_curve(i) vec4(0.)\n#endif\n#ifdef WEBGL2\n#define ITR_END (count + 1)\n#else\n#define ITR_END MAX_C\n#endif\n",t.vecAssign=oe,t.vecFill=ne,t.vecMulCombine=se,t.vecNormalize=ae,t.version=ic,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
20
|
+
*/!function(t){t.S="S",t.APlus="A+",t.A="A",t.BPlus="B+",t.B="B"}(cs||(cs={})),function(t){t[t.ALPHA=0]="ALPHA",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.BRIGHTNESS=3]="BRIGHTNESS",t[t.SUBTRACTION=4]="SUBTRACTION",t[t.STRONG_LIGHT=5]="STRONG_LIGHT",t[t.WEAK_LIGHT=6]="WEAK_LIGHT",t[t.SUPERPOSITION=7]="SUPERPOSITION"}(ls||(ls={})),function(t){t[t.DOUBLE=1032]="DOUBLE",t[t.FRONT=1028]="FRONT",t[t.BACK=1029]="BACK"}(hs||(hs={})),function(t){t[t.NONE=0]="NONE",t[t.MASK=1]="MASK",t[t.OBSCURED=2]="OBSCURED",t[t.REVERSE_OBSCURED=3]="REVERSE_OBSCURED"}(fs||(fs={})),function(t){t[t.NONE=0]="NONE",t[t.SPHERE=1]="SPHERE",t[t.CONE=2]="CONE",t[t.HEMISPHERE=3]="HEMISPHERE",t[t.CIRCLE=4]="CIRCLE",t[t.DONUT=5]="DONUT",t[t.RECTANGLE=6]="RECTANGLE",t[t.RECTANGLE_EDGE=7]="RECTANGLE_EDGE",t[t.EDGE=8]="EDGE",t[t.TEXTURE=9]="TEXTURE"}(ps||(ps={})),function(t){t[t.GYROSCOPE=0]="GYROSCOPE",t[t.SPINE=1]="SPINE"}(ds||(ds={})),function(t){t[t.CLICK=0]="CLICK",t[t.MESSAGE=1]="MESSAGE",t[t.DRAG=2]="DRAG"}(ms||(ms={})),function(t){t[t.NONE=0]="NONE",t[t.NOTIFY=1]="NOTIFY",t[t.RESUME_PLAYER=2]="RESUME_PLAYER",t[t.REMOVE=3]="REMOVE",t[t.PAUSE=4]="PAUSE"}(vs||(vs={})),function(t){t.base="0",t.sprite="1",t.particle="2",t.null="3",t.interact="4",t.plugin="5",t.camera="6",t.composition="7",t.filter="8",t.spine="spine",t.mesh="mesh",t.tree="tree",t.text="text",t.light="light",t.skybox="skybox"}(ys||(ys={})),function(t){t[t.BILLBOARD=0]="BILLBOARD",t[t.MESH=1]="MESH",t[t.VERTICAL_BILLBOARD=2]="VERTICAL_BILLBOARD",t[t.HORIZONTAL_BILLBOARD=3]="HORIZONTAL_BILLBOARD"}(xs||(xs={})),function(t){t[t.PARTICLE_ORIGIN_CENTER=0]="PARTICLE_ORIGIN_CENTER",t[t.PARTICLE_ORIGIN_LEFT_TOP=1]="PARTICLE_ORIGIN_LEFT_TOP",t[t.PARTICLE_ORIGIN_LEFT_CENTER=2]="PARTICLE_ORIGIN_LEFT_CENTER",t[t.PARTICLE_ORIGIN_LEFT_BOTTOM=3]="PARTICLE_ORIGIN_LEFT_BOTTOM",t[t.PARTICLE_ORIGIN_CENTER_TOP=4]="PARTICLE_ORIGIN_CENTER_TOP",t[t.PARTICLE_ORIGIN_CENTER_BOTTOM=5]="PARTICLE_ORIGIN_CENTER_BOTTOM",t[t.PARTICLE_ORIGIN_RIGHT_TOP=6]="PARTICLE_ORIGIN_RIGHT_TOP",t[t.PARTICLE_ORIGIN_RIGHT_CENTER=7]="PARTICLE_ORIGIN_RIGHT_CENTER",t[t.PARTICLE_ORIGIN_RIGHT_BOTTOM=8]="PARTICLE_ORIGIN_RIGHT_BOTTOM"}(gs||(gs={}));var Es,Ss,bs,Rs,_s,As,Cs,ws,Os,Ms,Ls,Is,Ps,Vs,Fs,Ns,zs,Ds,Us=0;!function(t){t[t.portrait=1]="portrait",t[t.landscape=Us]="landscape"}(Es||(Es={})),function(t){t[t.destroy=0]="destroy",t[t.pause=1]="pause",t[t.restart=5]="restart",t[t.forward=2]="forward",t[t.pause_destroy=3]="pause_destroy"}(Ss||(Ss={})),function(t){t.video="video",t.image="image"}(bs||(bs={})),function(t){t[t.CONSTANT=0]="CONSTANT",t[t.CONSTANT_VEC2=1]="CONSTANT_VEC2",t[t.CONSTANT_VEC3=2]="CONSTANT_VEC3",t[t.CONSTANT_VEC4=3]="CONSTANT_VEC4",t[t.RANDOM=4]="RANDOM",t[t.LINE=5]="LINE",t[t.CURVE=6]="CURVE",t[t.BEZIER_PATH=7]="BEZIER_PATH",t[t.RGBA_COLOR=8]="RGBA_COLOR",t[t.GRADIENT_COLOR=9]="GRADIENT_COLOR",t[t.SHAPE_POINTS=10]="SHAPE_POINTS",t[t.SHAPE_SPLITS=11]="SHAPE_SPLITS",t[t.LINEAR_PATH=12]="LINEAR_PATH",t[t.COLORS=13]="COLORS",t[t.BINARY=20]="BINARY",t[t.BEZIER_CURVE=21]="BEZIER_CURVE",t[t.BEZIER_CURVE_PATH=22]="BEZIER_CURVE_PATH"}(Rs||(Rs={})),function(t){t[t.AUTO=0]="AUTO",t[t.EASE=1]="EASE",t[t.EASE_IN=2]="EASE_IN",t[t.EASE_OUT=3]="EASE_OUT",t[t.LINE=4]="LINE",t[t.HOLD=5]="HOLD",t[t.LINE_OUT=6]="LINE_OUT"}(_s||(_s={})),function(t){t[t.destroy=0]="destroy",t[t.loop=5]="loop",t[t.freeze=4]="freeze"}(As||(As={})),function(t){t[t.destroyChildren=6]="destroyChildren"}(Cs||(Cs={})),function(t){t[t.none=0]="none",t[t.removeParticle=1]="removeParticle"}(ws||(ws={})),function(t){t[t.RANDOM=0]="RANDOM",t[t.UNIDIRECTIONAL_CYCLE=1]="UNIDIRECTIONAL_CYCLE",t[t.BIDIRECTIONAL_CYCLE=2]="BIDIRECTIONAL_CYCLE",t[t.UNIFORM_BURST=3]="UNIFORM_BURST"}(Os||(Os={})),function(t){t[t.box=2]="box",t[t.sphere=3]="sphere"}(Ms||(Ms={})),function(t){t.unlit="unlit",t.pbr="pbr",t.hair="hair"}(Ls||(Ls={})),function(t){t[t.opaque=100]="opaque",t[t.masked=101]="masked",t[t.translucent=102]="translucent",t[t.additive=103]="additive"}(Is||(Is={})),function(t){t.none="none",t.uv="uv",t.normal="normal",t.basecolor="basecolor",t.alpha="alpha",t.metallic="metallic",t.roughness="roughness",t.ao="ao",t.emissive="emissive"}(Ps||(Ps={})),function(t){t[t.display=0]="display",t[t.clip=1]="clip",t[t.ellipsis=2]="ellipsis"}(Vs||(Vs={})),function(t){t[t.top=0]="top",t[t.middle=1]="middle",t[t.bottom=2]="bottom"}(Fs||(Fs={})),function(t){t[t.left=0]="left",t[t.middle=1]="middle",t[t.right=2]="right"}(Ns||(Ns={})),function(t){t.normal="normal",t.bold="bold",t.lighter="lighter"}(zs||(zs={})),function(t){t.normal="normal",t.italic="italic",t.oblique="oblique"}(Ds||(Ds={}));var Bs=function(){return Bs=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},Bs.apply(this,arguments)};function ks(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],i=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Gs(t,e){if(!t.includes(e))return t.push(e),!0}function Xs(t,e,r){if(t)for(var i in t)Object.hasOwnProperty.call(t,i)&&e.call(r,t[i],i);return t}function Hs(t){if(Number.isFinite(t))return[Rs.CONSTANT,t];if(t){var e=t[0],r=t[1];if(Array.isArray(e))return;if("static"===e||e===Rs.CONSTANT)return[Rs.CONSTANT,t[1]];if("lines"===e)return[Rs.LINE,t[1]];if(e===Rs.LINE){var i=r.map((function(t){return[_s.LINE,t]}));return[Rs.BEZIER_CURVE,i]}return"curve"===e||e===Rs.CURVE?[Rs.BEZIER_CURVE,au(r)]:t}}function Ys(t,e){return Array.isArray(t)&&"random"===t[0]?[Rs.CONSTANT,t[1][e]]:Hs(t)}function js(t){return t&&"color"===t[0]?Qs(t[1],!0):[1,1,1,1]}function Ws(t,e){if(t)return"colors"===t[0]?[Rs.COLORS,t[1].map((function(t){return Qs(t,e)}))]:"gradient"===t[0]?qs(t[1],e):"color"===t[0]?[Rs.RGBA_COLOR,Qs(t[1],e)]:t}function Zs(t){return t&&"random"===t[0]?[Rs.RANDOM,t[1]]:Hs(t)}function qs(t,e){if(t){var r=[];return Object.getOwnPropertyNames(t).forEach((function(i){var n=function(t){var e=/^(-)?([\d+.]+)%$/.exec(t);if(e)return+e[2]/100*(e[1]?-1:1);return+t}(i),o=Qs(t[i],e);r.push([n,o[0],o[1],o[2],o[3]])})),r=r.sort((function(t,e){return t[0]-e[0]})),[Rs.GRADIENT_COLOR,r]}}function Qs(t,e){var r;if("string"==typeof t){t=t.replace(/[\s\t\r\n]/g,"");var i=/rgba?\(([.\d]+),([.\d]+),([.\d]+),?([.\d]+)?\)/.exec(t);if(i){var n=+i[4];r=[+i[1],+i[2],+i[3],isNaN(n)?255:Math.round(255*n)]}else/^#[a-f\d]{3}$/i.test(t)?r=[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16),255]:(i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t))&&(r=[parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16),255]||[0,0,0,255])}else t instanceof Array&&(r=[t[0],t[1],t[2],isNaN(t[3])?255:Math.round(255*t[3])]);return e&&(r=function(t){if(Array.isArray(t))return t.map((function(t){return Number.isFinite(t/255)?Number((t/255).toFixed(6)):0}))}(r)),r}function Ks(t,e){return Array.isArray(t)?t[0]===Rs.GRADIENT_COLOR?t:("gradient"===t[0]||"color"===t[0])&&qs(t[1],e):qs(t,e)}function Js(t){if(t){if(3===t.length)return[Rs.CONSTANT_VEC3,t];var e=t[0];if("path"===e||"bezier"===e||e===Rs.BEZIER_PATH||e===Rs.LINEAR_PATH){var r=t[1],i=r[0],n=r[1],o=r[2],a=au(i);if(!o){o=[];for(var s=0;s<n.length;s++){var u=n[s].slice();0===s?o.push(u):s<n.length-1?(o.push(u),o.push(u)):o.push(u)}}return[Rs.BEZIER_CURVE_PATH,[a,n,o]]}return t}}function $s(t){var e,r;try{for(var i=ks(Object.keys(t)),n=i.next();!n.done;n=i.next()){var o=n.value;t[o]=Number(t[o])}}catch(t){e={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return t}function tu(t){var e,r;try{for(var i=ks(Object.keys(t)),n=i.next();!n.done;n=i.next()){var o=n.value;void 0===t[o]&&delete t[o]}}catch(t){e={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}return t}"function"==typeof SuppressedError&&SuppressedError;var eu=Math.cos,ru=Math.sin,iu=Math.PI/180,nu=180/Math.PI;function ou(t,e,r,i){var n=r[0],o=r[1],a=i[0],s=a-n;return[[n+(a-n)/3,o+(t*=s)/3],[a-(a-n)/3,i[1]-(e*=s)/3]]}function au(t){for(var e=-1e6,r=1e6,i=0;i<t.length;i++)e=Math.max(e,t[i][1]),r=Math.min(r,t[i][1]);var n=[[t[0][0],t[0][1]]];for(i=0;i<t.length-1;i++){var o=t[i][3]*(e-r),a=t[i+1][2]*(e-r),s=[t[i][0],t[i][1]],u=[t[i+1][0],t[i+1][1]];if(s[0]!=u[0]){var c=ou(o,a,s,u),l=c[0],h=c[1];n[n.length-1].push(l[0]),n[n.length-1].push(l[1]),n.push([h[0],h[1],u[0],u[1]])}else n[n.length-1].push(u[0]),n[n.length-1].push(u[1])}return n.map((function(t,e){return 0===e?[_s.EASE_OUT,t]:e===n.length-1?[_s.EASE_IN,t]:[_s.EASE,t]}))}function su(t){var e,r=t.options,i=t.transform,n={type:ps.NONE};if(t.shape){var o=null===(e=t.shape.shape)||void 0===e?void 0:e.replace(/([A-Z])/g,"_$1").toUpperCase().replace(/^_/,"");if(n=Bs(Bs({},t.shape),{type:ps[o]}),t.shape.upDirection){var a=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,n,o=r.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)a.push(i.value)}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return a}(t.shape.upDirection,3),s=a[0],u=a[1],c=a[2];0===s&&0===u&&0===c&&delete n.upDirection}}r.startTurbulence&&(n.turbulenceX=Zs(r.turbulenceX),n.turbulenceY=Zs(r.turbulenceY),n.turbulenceZ=Zs(r.turbulenceZ));var l=t.emission;l.bursts&&l.bursts.length>0&&(l.bursts=l.bursts.map((function(t){return $s(t)}))),l.burstOffsets&&l.burstOffsets.length>0&&(l.burstOffsets=l.burstOffsets.map((function(t){return $s(t)}))),l.rateOverTime&&(l.rateOverTime=Zs(l.rateOverTime));var h={renderer:t.renderer,shape:n,splits:t.splits,emission:l,options:{startLifetime:Zs(r.startLifetime),start3DSize:!!r.start3DSize,startSize:Zs(r.startSize),startSizeX:Zs(r.startSizeX),startSizeY:Zs(r.startSizeY),sizeAspect:Zs(r.sizeAspect),maxCount:r.maxCount,startDelay:Zs(r.startDelay),startColor:Ws(r.startColor,!0),startRotationZ:Zs(r.startRotation||r.startRotationZ),particleFollowParent:r.particleFollowParent}};if(r.start3DRotation&&(h.options.startRotationX=Zs(r.startRotationX),h.options.startRotationY=Zs(r.startRotationY)),t.filter){var f={};Xs(t.filter,(function(t,e){var r;f[e]=(r=t,Array.isArray(r)&&"string"==typeof r[0]&&(Zs(r)||Js(r)||Ws(r))||r)})),h.filter=f}i&&i.path&&(h.emitterTransform={path:Js(i.path)});var p=t.sizeOverLifetime;p&&(p.separateAxes?h.sizeOverLifetime={separateAxes:!0,x:Zs(p.x),y:Zs(p.y)}:h.sizeOverLifetime={size:Zs(p.size)});var d=t.velocityOverLifetime||{},m=d.speedOverLifetime;m=m?Hs(m):void 0,h.positionOverLifetime={gravity:r.gravity,gravityOverLifetime:Hs(r.gravityModifier),startSpeed:Zs(r.startSpeed),speedOverLifetime:m,asMovement:d.asMovement,linearX:Zs(d.linearX),linearY:Zs(d.linearY),linearZ:Zs(d.linearZ),asRotation:d.asRotation,orbCenter:d.orbCenter,orbitalX:Zs(d.orbitalX),orbitalY:Zs(d.orbitalY),orbitalZ:Zs(d.orbitalZ),forceTarget:d.forceTarget,target:d.target,forceCurve:Hs(d.forceCurve)},tu(h.positionOverLifetime);var v=t.rotationOverLifetime;v&&(h.rotationOverLifetime={separateAxes:v.separateAxes,asRotation:v.asRotation,z:Zs(v.separateAxes?v.z:v.angularVelocity)},v.separateAxes&&(h.rotationOverLifetime.y=Hs(v.y),h.rotationOverLifetime.x=Hs(v.x)));var y=t.colorOverLifetime;if(y){var x=h.colorOverLifetime={opacity:Hs(y.opacity)};y.color&&(x.color=Ks(y.color))}var g=t.textureSheetAnimation;g&&(h.textureSheetAnimation={row:g.row,col:g.col,total:g.total,animate:g.animate,cycles:Hs(g.cycles),animationDelay:Ys(g.animationDelay,0),animationDuration:Ys(g.animationDuration,0)});var T=t.trails;T&&(h.trails={lifetime:Zs(T.lifetime),dieWithParticles:T.dieWithParticles,maxPointPerTrail:T.maxPointPerTrail,minimumVertexDistance:T.minimumVertexDistance,widthOverTrail:Hs(T.widthOverTrail),colorOverTrail:T.colorOverTrail&&Ks(T.colorOverTrail,!1),blending:T.blending,colorOverLifetime:T.colorOverLifetime&&Ks(T.colorOverLifetime,!1),inheritParticleColor:T.inheritParticleColor,occlusion:T.occlusion,transparentOcclusion:T.transparentOcclusion,orderOffset:T.orderOffset,sizeAffectsLifetime:T.sizeAffectsLifetime,sizeAffectsWidth:T.sizeAffectsWidth,texture:T.texture,parentAffectsPosition:T.parentAffectsPosition,opacityOverLifetime:Zs(T.opacityOverLifetime)}),h.trails&&tu(h.trails);var E=t.interaction;return E&&(h.interaction={behavior:E.behavior,radius:E.radius,multiple:E.multiple}),h}function uu(t,e){var r,i=t.options,n=t.velocityOverLifetime||{},o={path:Js(null===(r=t.transform)||void 0===r?void 0:r.path),gravity:i.gravity,gravityOverLifetime:Hs(i.gravityModifier),direction:i.direction,startSpeed:i.startSpeed,asMovement:n.asMovement,linearX:Hs(n.linearX),linearY:Hs(n.linearY),linearZ:Hs(n.linearZ),asRotation:n.asRotation,orbCenter:n.orbCenter,orbitalX:Hs(n.orbitalX),orbitalY:Hs(n.orbitalY),orbitalZ:Hs(n.orbitalZ),speedOverLifetime:Hs(n.speedOverLifetime)};tu(o);var a={options:{startColor:js(i.startColor)},positionOverLifetime:o};i.startSize&&(e.scale=[i.startSize,i.startSize/(i.sizeAspect||1),1]),i.startRotation&&(e.rotation?e.rotation[2]+=i.startRotation:e.rotation=[0,0,i.startRotation]);var s=t.rotationOverLifetime;if(s){var u=a.rotationOverLifetime={separateAxes:s.separateAxes,asRotation:s.asRotation};u.separateAxes?(u.x=Hs(s.x),u.y=Hs(s.y),u.z=Hs(s.z)):u.z=Hs(s.angularVelocity)}var c=t.colorOverLifetime;if(c){var l=a.colorOverLifetime={opacity:Hs(c.opacity)};c.color&&(l.color=Ks(c.color))}var h=t.sizeOverLifetime;return h&&(a.sizeOverLifetime={separateAxes:h.separateAxes,size:Hs(h.size),x:Hs(h.x),y:Hs(h.y),z:Hs(h.z)}),a}function cu(t,e){var r=uu(t,e),i=t.textureSheetAnimation;return i&&(r.textureSheetAnimation={row:i.row,col:i.col,total:i.total||void 0,animate:i.animate}),r.renderer=t.renderer,t.splits&&(r.splits=t.splits),t.interaction&&(r.interaction=t.interaction),r}var lu=["strength","bloomAddon","colorAddon","period","waveMovement","colorThreshold","xOpacity","yOpacity","feather"],hu=["path","position"];function fu(t){return t.compositions.forEach((function(t){t.items.forEach((function(t){t.type===ys.null&&t.endBehavior===As.destroy&&(t.endBehavior=As.freeze)}))})),t.version="2.1",t}function pu(t){var e,r;if(t)try{for(var i=ks(Object.keys(t)),n=i.next();!n.done;n=i.next()){var o=n.value,a=t[o],s=Array.isArray(a);s&&2===a.length&&Array.isArray(a[1])?t[o]="path"===o?Js(a):Hs(a):s||"object"!=typeof a||pu(a)}}catch(t){e={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}}var du=/^(\d+)\.(\d+)\.(\d+)(-(\w+)\.\d+)?$/,mu=/^(\d+)\.(\d+)$/,vu=!1;function yu(t){var e;if(!t||"object"!=typeof t)throw Error("expect a json object");if(function(t){var e,r=null===(e=t.version)||void 0===e?void 0:e.split(".");!r||Number(r[0])>2||2===Number(r[0])&&Number(r[1])>=2||t.compositions.forEach((function(t){t.items.forEach((function(t){t.type!==ys.mesh&&t.type!==ys.light||(t.endBehavior=1===t.endBehavior?As.destroy:t.endBehavior)}))}))}(t),du.test(t.version))return vu="0"===(null===(e=/^(\d+)/.exec(t.version))||void 0===e?void 0:e[0]),fu(function(t){var e,r;xu="1.0";var i=t.plugins||[];(null===(e=t.bins)||void 0===e?void 0:e.length)&&(xu="1.3");var n=(t.requires||[]).slice(),o=t.images.map((function(e,r){return gu(e,r,t.imageTags||[])})),a=t.textures||o.map((function(t,e){return{source:e,flipY:!0}})),s={plugins:i,shapes:t.shapes||[],type:"ge",version:xu,playerVersion:null!==(r=t.playerVersion)&&void 0!==r?r:{web:"",native:""},compositionId:t.compositionId+"",compositions:t.compositions.map((function(t){return Tu(t,{plugins:i,requires:n})})),images:o,imgUsage:t._imgs,binUsage:t.binUsage,spines:t.spines,requires:t.requires,textures:a,bins:(t.bins||[]).slice()};t._textures&&(s._textures=t._textures);return s}(t));var r=mu.exec(t.version)||[],i=Number(r[1]),n=Number(r[2]);if(i)return(i<2||2===i&&n<4)&&function(t){t.compositions.map((function(t){var e,r;try{for(var i=ks(t.items),n=i.next();!n.done;n=i.next())pu(n.value.content)}catch(t){e={error:t}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}}))}(t),i<2?fu(t):t;throw Error("invalid json version "+t.version)}var xu="1.0";function gu(t,e,r){var i=r[e],n=t.oriY;if("string"==typeof t)return{renderLevel:i,url:t,oriY:n};if(t.template)return{url:t.url,template:t.template,webp:t.webp,renderLevel:i,oriY:n};if(t.compressed)return{url:t.url,oriY:n,compressed:{astc:t.compressed.android,pvrtc:t.compressed.iOS},webp:t.webp,renderLevel:i};if(t.url)return{url:t.url,webp:t.webp,renderLevel:i,oriY:n};if(t&&t.sourceType)return t;throw Error("invalid image type")}function Tu(t,e){var r;void 0===e&&(e={});var i={id:t.id+"",camera:Object.assign({clipMode:Us},t.camera),duration:t.duration,endBehavior:t.endBehavior,items:t.items.map((function(t){return Ru(t,e)})),name:t.name},n=t.startTime||t.st;n&&(i.startTime=n);var o=null===(r=t.meta)||void 0===r?void 0:r.previewSize;return o&&o[0]===o[1]&&0===o[0]&&(o=void 0),o&&(i.previewSize=o),i}var Eu,Su=[0,0,0,1],bu=.5;function Ru(t,e){var r,i,n;void 0===e&&(e={});var o,a,s,u,c,l,h=ys.base,f=t.endBehavior,p=NaN;if(t.content?(h=t.type||ys.plugin,l=t.pn,c=t.pluginName,s=t.content,a=t.content,isNaN(l)&&!c&&(c=s.options.type),t.duration&&(p=t.duration),o=t.transform||y(a.transform),h===ys.filter&&(xu<"1.1"&&(xu="1.1"),(s=cu(a,o)).filter=function(t){var e={};return Xs(t,(function(t,r){lu.includes(r)?e[r]=Hs(t):hu.includes(r)?e[r]=Js(t):e[r]=t})),e}(a.filter))):t.particle?(h=ys.particle,o=y((a=t.particle).transform,vu,!0),s=su(a)):t.sprite?(h=ys.sprite,s=cu(a=t.sprite,o=y(a.transform,!1,!0))):t.cal?(h=ys.null,s=uu(a=t.cal,o=y(a.transform,!1,!0))):t.ui?(h=ys.interact,o=y((a=t.ui).transform),s=function(t){var e,r=t.options;switch(r.type){case"click":e={type:ms.CLICK,showPreview:r.showPreview,previewColor:r.previewColor&&js(r.previewColor),behavior:r.behavior||vs.NOTIFY};break;case"drag":e={type:ms.DRAG,enableInEditor:!!r.enableInEditor,dxRange:r.dxRange,dyRange:r.dyRange,target:r.target};break;case"message":e={type:ms.MESSAGE}}return{options:e}}(a),o.scale=[a.options.width||1,a.options.height||1,1]):t.model&&(a=t.model,1===t.model.options.type&&(h=ys.camera,o=y(a.transform),s=function(t){var e,r,i=t.options,n={options:{fov:i.fov,far:i.far,near:i.near,clipMode:i.clipMode}},o=t.velocityOverLifetime;if(o||(null===(e=t.transform)||void 0===e?void 0:e.path)){var a={path:Js(null===(r=t.transform)||void 0===r?void 0:r.path),linearX:Hs(null==o?void 0:o.translateX),linearY:Hs(null==o?void 0:o.translateY),linearZ:Hs(null==o?void 0:o.translateZ)};tu(a),n.positionOverLifetime=a}var s=t.rotationOverLifetime;if(s){var u={separateAxes:s.separateAxes,x:Hs(null==s?void 0:s.rotateX),y:Hs(null==s?void 0:s.rotateY),z:s.separateAxes?Hs(null==s?void 0:s.rotateZ):Hs(s.rotation)};tu(u),n.rotationOverLifetime=u}return n}(a))),null===(r=s.renderer)||void 0===r?void 0:r.anchor){var d=new Float32Array(s.renderer.anchor);d[0]==bu&&d[1]==bu?delete s.renderer.anchor:e.requires&&Gs(e.requires,"anchor")}if(a){var m=null===(i=a.options)||void 0===i?void 0:i.looping;f=m?Array.isArray(m)?m[1]?As.loop:As.destroy:As.loop:f||(null===(n=null==a?void 0:a.options)||void 0===n?void 0:n.endBehavior)||As.destroy,a.options.renderLevel&&(u=a.options.renderLevel),isNaN(p)&&(p=a.options.duration)}var v={type:h,name:t.name,delay:t.delay,duration:p,id:t.id+"",transform:o,endBehavior:f,renderLevel:u,content:s};return c?e.plugins?(Gs(e.plugins,c),v.pn=e.plugins.indexOf(c)):v.pluginName=c:Number.isInteger(l)&&(v.pn=l),t.parentId&&(v.parentId=t.parentId+""),v;function y(t,e,r){if(t){var i={},n=t.rotation;if(n&&(i.rotation=e?[-n[0],-n[1],-n[2]]:[n[0],n[1],n[2]],r)){var o=(a=Su,s=i.rotation[0],u=i.rotation[1],c=i.rotation[2],l=eu(s*iu/2),h=eu(u*iu/2),f=eu(c*iu/2),p=ru(s*iu/2),d=ru(u*iu/2),m=ru(c*iu/2),a[0]=p*h*f+l*d*m,a[1]=l*d*f-p*h*m,a[2]=l*h*m+p*d*f,a[3]=l*h*f-p*d*m,a);i.rotation=function(t,e){var r,i,n,o=e[0],a=e[1],s=e[2],u=e[3],c=o+o,l=a+a,h=s+s,f=o*c,p=a*c,d=a*l,m=s*h,v=u*h,y=1-d-m,x=p-v,g=p+v,T=1-f-m,E=s*c-u*l,S=s*l+u*c,b=1-f-d;return t[1]=Math.asin((i=-1,(r=-E)>(n=1)?n:r<i?i:r))*nu,Math.abs(E)<.9999999?(t[0]=Math.atan2(S,b)*nu,t[2]=Math.atan2(g,y)*nu):(t[0]=0,t[2]=Math.atan2(-x,T)*nu),t}([],o)}return t.position&&(i.position=t.position),Array.isArray(t.scale)&&(i.scale=[t.scale[0]||1,t.scale[1]||1,t.scale[2]||1]),i}var a,s,u,c,l,h,f,p,d,m;return{}}}var _u=((Eu={})[_.S]=[_.S,_.BPlus,_.APlus],Eu[_.A]=[_.A,_.BPlus,_.APlus],Eu[_.B]=[_.B,_.BPlus],Eu);function Au(t,e){if(!t||!e)return!0;var r=_u[e];return!!r&&r.includes(t)}var Cu=0,wu=function(){function t(t,e){var r,i;this.refCompositions=new Map,this.refCompositionProps=new Map,this.mask=0;var n=t.jsonScene,o=t.renderLevel,a=t.textureOptions,s=t.pluginSystem,u=t.totalTime,l=n.compositions,h=n.imgUsage,f=n.compositionId;if(!a)throw new Error("scene.textures expected");var p=a.map((function(t){return t&&(t instanceof Kr?t:Kr.create(e,t))}));t.textureOptions=p,null==p||p.forEach((function(t){return null==t?void 0:t.initialize()}));try{for(var d=c(l),m=d.next();!m.done;m=d.next()){var v=m.value;v.id===f?this.composition=v:this.refCompositions.set(v.id,v)}}catch(t){r={error:t}}finally{try{m&&!m.done&&(i=d.return)&&i.call(d)}finally{if(r)throw r.error}}if(!this.composition)throw new Error("Invalid composition id: "+f);this.jsonScene=n,this.renderLevel=o,this.pluginSystem=s,this.totalTime=null!=u?u:0,this.imgUsage=null!=h?h:{},this.textures=p,Cu=0,this.textureOptions=a,this.sourceContent=this.getContent(this.composition)}return t.prototype.getContent=function(t){var e=t.id,r=t.duration,i=t.name,n=t.endBehavior,o=t.camera,a=t.globalVolume,s=t.startTime,u=void 0===s?0:s,c=this.assembleItems(t);return{id:e,duration:r,name:i,endBehavior:isNaN(n)?1:n,items:c,camera:o,startTime:u,globalVolume:a}},t.prototype.assembleItems=function(t){var e=this,r=[];return t.items.forEach((function(t){var i,n={},o=t.visible,s=t.renderLevel,u=t.type;if(!1!==o){var c=a({},t.content);if(c&&(n.content=a({},c),Au(s,e.renderLevel))){var l=n.content;if(n.type=u,l.renderer){l.renderer=e.changeTex(l.renderer),e.processMask(l.renderer);var h=l.splits&&!l.textureSheetAnimation&&l.splits[0];Number.isInteger(l.renderer.shape)?l.renderer.shape=jo(null===(i=e.jsonScene)||void 0===i?void 0:i.shapes[l.renderer.shape],h):l.renderer.shape&&or(l.renderer.shape)&&(l.renderer.shape=jo(l.renderer.shape,h))}else n.content.renderer={order:0};l.trails&&(l.trails=e.changeTex(l.trails)),l.filter&&(l.filter=a({},l.filter));var f=t.name,p=t.delay,d=void 0===p?0:p,m=t.id,v=t.parentId,y=t.duration,x=t.endBehavior,g=t.pluginName,T=t.pn,E=t.transform,S=t.refCount,b=e.jsonScene.plugins,R=void 0===b?[]:b;if(n.name=f,n.delay=d,n.id=m,v&&(n.parentId=v),n.refCount=S,n.duration=y,n.listIndex=Cu++,n.endBehavior=x,g?n.pluginName=g:void 0!==T&&Number.isInteger(T)&&(n.pluginName=R[T]),E&&(n.transform=E),n.type===P.composition){e.mask++;var _=t.content.options.refId;if(!e.refCompositions.get(_))throw new Error("Invalid Ref Composition id: "+_);var A=e.getContent(e.refCompositions.get(_));e.refCompositionProps.has(_)||e.refCompositionProps.set(_,A),A.items.forEach((function(t){e.processMask(t.content)})),n.items=A.items}r.push(n)}}})),r},t.prototype.changeTex=function(t){var e=t.texture,r=a({},t);return void 0!==e&&(r.texture=this.addTextureUsage(e)||e),r},t.prototype.addTextureUsage=function(t){var e,r;if(Number.isInteger(t)){var i=null===(e=this.textures)||void 0===e?void 0:e[t],n=null==i?void 0:i.id,o=null!==(r=this.imgUsage)&&void 0!==r?r:{};if(n&&o)return o.hasOwnProperty(n)||(o[n]=0),o[n]++,i}},t.prototype.processMask=function(t){if(t.maskMode!==w.NONE&&!t.mask){var e=t.maskMode;e===w.MASK?t.mask=++this.mask:e!==w.OBSCURED&&e!==w.REVERSE_OBSCURED||(t.mask=this.mask)}},t.prototype.dispose=function(){this.textureOptions=[],this.textures=[],this.composition=void 0,this.jsonScene=void 0,this.totalTime=0,this.pluginSystem=void 0,this.sourceContent=void 0,this.refCompositions.clear(),this.refCompositionProps.clear()},t}();function Ou(t){return or(t)&&"jsonScene"in t}var Mu=1,Lu=function(){function e(t,e){void 0===t&&(t={}),void 0===e&&(e=new Gr),this.options=t,this.downloader=e,this.assets={},this.id=Mu++,this.timers=[],this.updateOptions(t)}return e.prototype.updateOptions=function(t){void 0===t&&(t={}),this.options=t,t.pluginData||(t.pluginData={});var e=t.timeout,r=void 0===e?10:e;this.timeout=r},e.prototype.updateSceneData=function(t){var e=this.options.variables;return!e||Object.keys(e).length<=0||t.forEach((function(t){t.items.forEach((function(t){if(t.type===P.text){var r=e[t.name];r&&(t.content.options.text=r)}}))})),t},e.prototype.loadScene=function(t,e,r){var i,n,o;return s(this,void 0,void 0,(function(){var c,h,f,p,d,m,v,y,x,g,T,E,S,b=this;return u(this,(function(R){return h=rr(t)?t:this.id,f=performance.now(),p=[],d=null==e?void 0:e.engine.gpuCapability,m=null!==(n=null===(i=null==d?void 0:d.detail)||void 0===i?void 0:i.asyncShaderCompile)&&void 0!==n&&n,v=null!==(o=null==d?void 0:d.detail.compressedTexture)&&void 0!==o?o:0,y={},g=!1,T=new Promise((function(t,e){x=window.setTimeout((function(){g=!0,b.removeTimer(x);var t=performance.now()-f;e("Load time out: totalTime: ".concat(t.toFixed(4),"ms ").concat(p.join(" "),", url: ").concat(h))}),1e3*b.timeout),b.timers.push(x)})),E=function(t,e){return s(b,void 0,void 0,(function(){var r,i,n,o;return u(this,(function(a){switch(a.label){case 0:if(g)return[3,4];r=performance.now(),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,e()];case 2:return i=a.sent(),n=performance.now()-r,p.push("[".concat(t,": ").concat(n.toFixed(2),"]")),y[t]=n,[2,i];case 3:throw o=a.sent(),new Error("load error in ".concat(t,", ").concat(o));case 4:throw new Error("load canceled.")}}))}))},S=function(){return s(b,void 0,void 0,(function(){var i,n,o,s,d,g,T,S,b,R,_,A,C,w,O,M,L,I,P,V=this;return u(this,(function(u){switch(u.label){case 0:return or(t)?(c=t,this.baseUrl=location.href,[3,3]):[3,1];case 1:return t=new URL(t,location.href).href,this.baseUrl=t,[4,E("loadJSON",(function(){return V.loadJSON(t)}))];case 2:c=u.sent(),u.label=3;case 3:if(!Ou(c))return[3,6];if(i=a({},c),!this.options||!this.options.variables||0===Object.keys(this.options.variables).length)return[3,5];for(n=c.jsonScene.images,o=i.images,d=0;d<n.length;d++)o[d]instanceof HTMLCanvasElement&&(o[d]=n[d]);return s=i,[4,E("processImages",(function(){return V.processImages(o,i.usedImages,v)}))];case 4:for(s.images=u.sent(),d=0;d<i.images.length;d++)i.textureOptions[d].image=i.images[d];i.jsonScene.compositions=this.updateSceneData(i.jsonScene.compositions),u.label=5;case 5:return[3,12];case 6:return[4,E("processJSON",(function(){return V.processJSON(c)}))];case 7:return g=u.sent(),T=g.usedImages,S=g.jsonScene,b=g.pluginSystem,R=S.bins,_=void 0===R?[]:R,A=S.images,C=S.compositions,w=S.fonts,[4,Promise.all([E("processBins",(function(){return V.processBins(_)})),E("processImages",(function(){return V.processImages(A,T,v)})),E("".concat(m?"async":"sync","Compile"),(function(){return V.precompile(C,b,e,r)}))])];case 8:return O=l.apply(void 0,[u.sent(),2]),M=O[0],L=O[1],[4,E("processFontURL",(function(){return V.processFontURL(w)}))];case 9:return u.sent(),[4,E("processTextures",(function(){return V.processTextures(L,M,S)}))];case 10:return I=u.sent(),S.compositions=this.updateSceneData(S.compositions),i={timeInfos:y,url:t,renderLevel:this.options.renderLevel,storage:{},pluginSystem:b,jsonScene:S,usedImages:T,images:L,textureOptions:I,bins:M},[4,E("processPlugins",(function(){return b.loadResources(i,V.options)}))];case 11:u.sent(),u.label=12;case 12:return P=performance.now()-f,tr.info("Load asset: totalTime: ".concat(P.toFixed(4),"ms ").concat(p.join(" "),", url: ").concat(h)),window.clearTimeout(x),this.removeTimer(x),i.totalTime=P,i.startTime=f,i.timeInfos=y,[2,i]}}))}))},[2,Promise.race([T,S()])]}))}))},e.prototype.precompile=function(t,e,r,i){return s(this,void 0,void 0,(function(){var n;return u(this,(function(o){switch(o.label){case 0:return r&&r.getShaderLibrary()?(n=null==r?void 0:r.getShaderLibrary(),[4,null==e?void 0:e.precompile(t,r,i)]):[2];case 1:return o.sent(),[4,new Promise((function(t){n.compileAllShaders((function(){t(null)}))}))];case 2:return o.sent(),[2]}}))}))},e.prototype.processJSON=function(t){return s(this,void 0,void 0,(function(){var e,r,i,n,o,a,s,c,l;return u(this,(function(u){switch(u.label){case 0:return e=yu(t),t.compositions.forEach((function(t,r){t.globalVolume&&(e.compositions[r].globalVolume=t.globalVolume)})),r=e.plugins,i=void 0===r?[]:r,n=e.compositions,o=e.imgUsage,a=e.images,[4,(s=new xr(i)).processRawJSON(e,this.options)];case 1:return u.sent(),c=this.options.renderLevel,l={},o?function(t,e,r,i,n){for(var o=0;o<e.length;o++){var a=r[e[o].id];if(a)for(var s=0;s<a.length;s++){var u=a[s];Au(i[u].renderLevel,n)&&(t[u]=!0)}}}(l,n,o,a,c):null==a||a.forEach((function(t,e){l[e]=!0})),[2,{usedImages:l,jsonScene:e,pluginSystem:s}]}}))}))},e.prototype.processBins=function(t){return s(this,void 0,void 0,(function(){var e,r,i,n=this;return u(this,(function(o){return e=this.options.renderLevel,r=this.baseUrl,i=t.map((function(i){if(i instanceof ArrayBuffer)return i;if(Au(i.renderLevel,e))return n.loadBins(new URL(i.url,r).href);throw new Error("Invalid bins source: ".concat(JSON.stringify(t)))})),[2,Promise.all(i)]}))}))},e.prototype.processFontURL=function(t){return s(this,void 0,void 0,(function(){var r,i=this;return u(this,(function(n){return t?(r=t.map((function(t){return s(i,void 0,void 0,(function(){var r,i,n;return u(this,(function(o){switch(o.label){case 0:if(!t.fontURL||e.fonts.has(t.fontFamily))return[3,4];ot(t.fontFamily)||console.warn("Risky font family: ".concat(t.fontFamily)),o.label=1;case 1:return o.trys.push([1,3,,4]),r=new URL(t.fontURL,this.baseUrl).href,[4,(i=new FontFace(null!==(n=t.fontFamily)&&void 0!==n?n:"","url("+r+")")).load()];case 2:return o.sent(),document.fonts.add(i),e.fonts.add(t.fontFamily),[3,4];case 3:return o.sent(),tr.warn("Invalid font family or font source: ".concat(JSON.stringify(t.fontURL))),[3,4];case 4:return[2]}}))}))})),[2,Promise.all(r)]):[2]}))}))},e.prototype.processImages=function(e,r,i){return s(this,void 0,void 0,(function(){var n,o,a,c,l,h=this;return u(this,(function(f){return n=this.options,o=n.useCompressedTexture,a=n.variables,c=this.baseUrl,l=e.map((function(e,n){return s(h,void 0,void 0,(function(){var s,l,h,f,p,d,m,v,y,x,g,T,E,S,b,R,_,A;return u(this,(function(u){switch(u.label){case 0:if(!r[n])return[2,void 0];if(s=e.url,l=e.webp,h=new URL(s,c).href,f=l&&new URL(l,c).href,!("template"in e))return[3,13];if(p=e.template,d="v"in p&&2===p.v&&p.background,m=d?p.background:void 0,!d||!m)return[3,8];v=ka(p,a),y=m.type===ut.video,x=m&&y?Wr:Yr,u.label=1;case 1:return u.trys.push([1,6,,7]),[4,Ga(v,x)];case 2:return(T=u.sent())instanceof HTMLVideoElement?[2,T]:[3,3];case 3:return m&&Array.isArray(v)&&a&&(a[m.name]=T.src),[4,ja(T,p,a,this.options,-1===e.oriY)];case 4:return[2,u.sent()];case 5:return[3,7];case 6:throw g=u.sent(),new Error("Failed to load. Check the template or if the URL is ".concat(y?"video":"image"," type, URL: ").concat(v,", Error: ").concat(g.message));case 7:return[3,12];case 8:return u.trys.push([8,11,,12]),[4,Hr(h,f)];case 9:return[4,ja((T=u.sent()).image,p,a,this.options,-1===e.oriY)];case 10:return[2,u.sent()];case 11:throw u.sent(),new Error("Failed to load. Check the template, URL: ".concat(h,"."));case 12:return[3,14];case 13:if("type"in e&&"video"===e.type)return console.warn("The video element is deprecated. Use template BackgroundType.video instead."),[2,Wr(e.url)];if("compressed"in e&&o&&i){if(E=e.compressed,S=void 0,i===Sn.ASTC?S=E.astc:i===Sn.PVRTC&&(S=E.pvrtc),S)return b=new URL(S,c).href,this.assets[n]={url:b,type:t.TextureSourceType.compressed},[2,this.loadBins(b)]}else{if("sourceType"in e)return[2,e];if(e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof Kr)return[2,e]}u.label=14;case 14:return[4,Hr(h,f)];case 15:return R=u.sent(),_=R.url,A=R.image,this.assets[n]={url:_,type:t.TextureSourceType.image},[2,A]}}))}))})),[2,Promise.all(l)]}))}))},e.prototype.processTextures=function(e,r,i){var n;return s(this,void 0,void 0,(function(){var o,s,c=this;return u(this,(function(u){return o=null!==(n=i.textures)&&void 0!==n?n:e.map((function(t,e){return{source:e}})),s=o.map((function(n,o){if(n instanceof Kr)return n;if("mipmaps"in n)try{return Zr(n,r,i.bins)}catch(t){throw new Error("load texture ".concat(o," fails, error message: ").concat(t))}var s=n.source,u=e[s];if(u){var l=function(e,r){if(e instanceof Kr)return e.source;if(e instanceof HTMLImageElement||function(t){var e;return"object"==typeof t&&null!==t&&"CANVAS"===(null===(e=t.tagName)||void 0===e?void 0:e.toUpperCase())}(e))return{image:e,sourceType:t.TextureSourceType.image,sourceFrom:r,keepImageSource:!0,minFilter:E.LINEAR,magFilter:E.LINEAR};if(e instanceof HTMLVideoElement)return{sourceType:t.TextureSourceType.video,video:e,minFilter:E.LINEAR,magFilter:E.LINEAR};if(e instanceof ArrayBuffer)return a(a({},ti(e)),{sourceFrom:r});if("width"in e&&"height"in e&&"data"in e)return{sourceType:t.TextureSourceType.data,data:e,wrapS:E.CLAMP_TO_EDGE,wrapT:E.CLAMP_TO_EDGE,minFilter:E.NEAREST,magFilter:E.NEAREST};throw new Error("Invalid texture options")}(u,c.assets[o]);return l.sourceType===t.TextureSourceType.compressed?l:a(a({},l),n)}throw new Error("Invalid texture source: ".concat(s))})),[2,Promise.all(s)]}))}))},e.prototype.loadJSON=function(t){return s(this,void 0,void 0,(function(){var e=this;return u(this,(function(r){return[2,new Promise((function(r,i){e.downloader.downloadJSON(t,r,(function(e,r){i("Couldn't load JSON ".concat(JSON.stringify(t),": status ").concat(e,", ").concat(r))}))}))]}))}))},e.prototype.loadBins=function(t){return s(this,void 0,void 0,(function(){var e=this;return u(this,(function(r){return[2,new Promise((function(r,i){e.downloader.downloadBinary(t,r,(function(e,r){i("Couldn't load bins ".concat(JSON.stringify(t),": status ").concat(e,", ").concat(r))}))}))]}))}))},e.prototype.removeTimer=function(t){var e=this.timers.indexOf(t);-1!==e&&this.timers.splice(e,1)},e.prototype.dispose=function(){var t;for(var e in this.timers.length&&this.timers.map((function(t){return window.clearTimeout(t)})),this.assets){var r=this.assets[e];null===(t=null==r?void 0:r.dispose)||void 0===t||t.call(r)}this.assets={},this.timers=[]},e.fonts=new Set,e}();var Iu,Pu,Vu,Fu,Nu=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.items=[],t.itemTree=[],t.itemCacheMap=new Map,t.itemsToRemove=[],t.tempQueue=[],t}return o(r,e),Object.defineProperty(r.prototype,"type",{get:function(){return P.composition},enumerable:!1,configurable:!0}),r.prototype.onConstructed=function(t){var e=t.items,r=void 0===e?[]:e,i=t.startTime,n=void 0===i?0:i,o=t.content,a=t.refId;this.refId=a,this.itemProps=r,this.contentProps=o;var s=this.endBehavior;5!==s&&1!==s&&3!==s||(this.freezeOnEnd=!0),this.startTime=n,this.startTimeInms=Math.round(1e3*this.startTime)},r.prototype.createContent=function(){if(!this.items.length&&this.composition)for(var e=0;e<this.itemProps.length;e++){var i=void 0,n=this.itemProps[e];if(t.Item.isComposition(n)){var o=n.content.options.refId;(i=new r(a({refId:o},n),this.composition)).contentProps=n.content,i.transform.parentTransform=this.transform,this.composition.refContent.push(i),5===i.endBehavior&&(this.composition.autoRefTex=!1),i.createContent()}else(i=pr(this.itemProps[e],this.composition)).transform.parentTransform=fr.isCamera(i)?new hr:this.transform;fr.isExtraCamera(i)&&(this.extraCamera=i),this.items.push(i),this.tempQueue.push(i)}!this.content&&this.contentProps&&(this._content=this.doCreateContent())},r.prototype.doCreateContent=function(){var t=new jn(this.contentProps,this);return t.renderData=t.getRenderData(0,!0),t},r.prototype.onLifetimeBegin=function(){var t;null===(t=this.items)||void 0===t||t.forEach((function(t){t.start(),t.createContent()})),this.buildItemTree()},r.prototype.doStop=function(){this.items&&this.items.forEach((function(t){return t.stop()}))},r.prototype.onItemUpdate=function(t,e){var r,i,n=this;if(this.content&&(this.content.updateTime(this.time),this.content.getRenderData(this.content.time)),this.items){null===(r=this.composition)||void 0===r||r.updatePluginLoaders(t);var o=[];this.itemsToRemove.length&&(this.itemsToRemove.forEach((function(t){var e,r,i=n.itemCacheMap.get(t.id);if(i){var o=i.children;if(i.parentId){var a=n.itemCacheMap.get(i.parentId);a?(a.children.splice(a.children.indexOf(i),1),o.forEach((function(t){return n.setItemParent(t.item,a.item)}))):(o.forEach((function(t){return n.setItemParent(t.item,void 0)})),(e=n.itemTree).push.apply(e,h([],l(o),!1)))}else(r=n.itemTree).splice.apply(r,h([n.itemTree.indexOf(i),1],l(o),!1)),o.forEach((function(t){return n.setItemParent(t.item,void 0)}));n.itemCacheMap.delete(t.id),n.items.splice(n.items.indexOf(t),1)}})),this.itemsToRemove.length=0);for(var a=0;a<this.itemTree.length;a++){if((u=this.itemTree[a])&&u.item){var s=u.item;fr.isComposition(s)&&s.ended&&5===s.endBehavior?s.restart():s.onUpdate(t),o.push.apply(o,h([],l(u.children),!1))}}for(;o.length;){var u;if((u=o.shift())&&u.item)(s=u.item).onUpdate(t),o.push.apply(o,h([],l(u.children),!1)),s.composition||G(this.itemsToRemove,s)}null===(i=this.extraCamera)||void 0===i||i.onUpdate(t)}},r.prototype.onItemRemoved=function(t){this.items&&(this.items.forEach((function(t){return t.dispose()})),this.items.length=0,this.itemTree.length=0,this.itemCacheMap.clear())},r.prototype.reset=function(){e.prototype.reset.call(this),this.itemTree=[],this.itemCacheMap.clear(),this.tempQueue.length=0,this.itemsToRemove.length=0},r.prototype.handleVisibleChanged=function(t){this.items.forEach((function(e){return e.setVisible(t)}))},r.prototype.setScale=function(t,e,r){this.content&&(this.content.startSize=new Vt(t,e,r))},r.prototype.scale=function(t,e,r){if(this.content){var i=this.content.startSize.clone();this.content.startSize=new Vt(t*i.x,e*i.y,r*i.z)}},r.prototype.getUpdateTime=function(t){var e=this.startTimeInms,r=this.timeInms;if(t<0&&r+t<e)return e-r;if(this.freezeOnEnd){var i=this.durInms-r;if(i<t)return i}return t},r.prototype.removeItem=function(t){var e,r=this;if(this.items.indexOf(t)>-1){if(G(this.itemsToRemove,t),fr.isTree(t)||fr.isNull(t)){var i=6===t.endBehavior,n=fr.isNull(t)&&!!this.itemCacheMap.get(t.id);((null===(e=this.itemCacheMap.get(t.id))||void 0===e?void 0:e.children)||[]).forEach((function(t){n||r.setItemParent(t.item,void 0),i&&r.removeItem(t.item)}))}return!0}return this.items.forEach((function(e){if(fr.isComposition(e)&&e.items.indexOf(t)>-1)return e.removeItem(t),!0})),!1},r.prototype.setItemParent=function(t,e){var r=this.itemCacheMap.get(t.id);if(r)if(e){var i=this.itemCacheMap.get(e.id);if(r.parentId){var n=this.itemCacheMap.get(r.parentId);n.children.splice(n.children.indexOf(r),1)}t.parent=e,r.parentId=e.id,i.children.push(r),t.transform.parentTransform=e.transform}else r.parentId=void 0,t.parent=void 0,t.transform.parentTransform=fr.isExtraCamera(t)?new hr:this.transform;else console.error("item has been remove, please set item's parent in valid lifetime")},r.prototype.getItemCurrentParent=function(t){var e=t.id,r=this.itemCacheMap.get(e);if(r){var i=r.parentId;if(i){var n=this.itemCacheMap.get(i);return i&&n?n.item:void 0}}},r.prototype.getItemByName=function(t){var e,r,i=[];try{for(var n=c(this.items),o=n.next();!o.done;o=n.next()){var a=o.value;a.name===t?i.push(a):fr.isComposition(a)&&i.push.apply(i,h([],l(a.getItemByName(t)),!1))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}return i},r.prototype.hitTest=function(e,r,i,n,o,a){for(var s=[],u=(null==a?void 0:a.stop)||er,c=(null==a?void 0:a.skip)||er,l=(null==a?void 0:a.maxCount)||this.items.length,h=0;h<this.items.length&&n.length<l;h++){var f=this.items[h];if(f.lifetime>=0&&f.lifetime<=1&&!fr.isComposition(f)&&!c(f)){var p=f.getHitTestParams(o);if(p){var d=!1,m=new Vt;if(p.type===t.HitTestType.triangle)for(var v=p.triangles,y=p.backfaceCulling,x=0;x<v.length;x++){var g=v[x];if(e.intersectTriangle(g,m,y)){d=!0,s.push(m);break}}else if(p.type===t.HitTestType.box){var T=p.center,E=p.size,S=T.clone().addScaledVector(E,.5),b=T.clone().addScaledVector(E,-.5);e.intersectBox({min:S,max:b},m)&&(d=!0,s.push(m))}else if(p.type===t.HitTestType.sphere){T=p.center;var R=p.radius;e.intersectSphere({center:T,radius:R},m)&&(d=!0,s.push(m))}else if(p.type===t.HitTestType.custom){var _=p.collect(e,new Pt(r,i));_&&_.length>0&&(_.forEach((function(t){s.push(t)})),d=!0)}if(d){var A={compContent:this,id:f.id,name:f.name,position:s[s.length-1],parentId:f.parentId,hitPositions:s,behavior:p.behavior};if(n.push(A),u(A))return n}}}}return n},r.prototype.isEnded=function(t){return t>=this.durInms},r.prototype.buildItemTree=function(){if(!this.itemTree.length&&this.composition){this.itemTree=[];for(var t=this.itemCacheMap,e=this.tempQueue,r=function(){var r=e.shift();if(void 0===r.parentId){var n={id:r.id,item:r,children:[]};i.itemTree.push(n),t.set(r.id,n)}else{var o=i.getParentIdWithoutSuffix(r.parentId),a=t.get(o);if(a){n={id:r.id,parentId:o,item:r,children:[]};r.parent=a.item,r.transform.parentTransform=a.item.getNodeTransform(r.parentId),a.children.push(n),t.set(r.id,n)}else{if(-1===i.items.findIndex((function(t){return t.id===o})))throw Error("元素引用了不存在的元素,请检查数据");e.push(r)}}},i=this;e.length;)r()}},r.prototype.getParentIdWithoutSuffix=function(t){var e=t.lastIndexOf("^");return e>-1?t.substring(0,e):t},r.prototype.restart=function(){this.reset(),this.createContent(),this.start()},r}(fr),zu=1,Du=function(){function e(t,e){var r,i;this.speed=1,this.loaderData={},this.refContent=[],this.refCompositionProps=new Map,this.assigned=!1,this.destroyed=!1,this.paused=!1,this.lastVideoUpdateTime=0,this.postLoaders=[];var n=t.reusable,o=void 0!==n&&n,s=t.speed,u=void 0===s?1:s,c=t.baseRenderOrder,l=void 0===c?0:c,h=t.renderer,f=t.onPlayerPause,p=t.onMessageItem,d=t.onEnd,m=t.event,v=t.width,y=t.height;this.compositionSourceManager=new wu(e,h.engine),e.jsonScene.imgUsage=void 0,o&&(this.keepResource=!0,e.textures=void 0,e.consumed=!0);var x=this.compositionSourceManager,g=x.sourceContent,T=x.pluginSystem,E=x.imgUsage,S=x.totalTime,b=x.renderLevel,R=x.refCompositionProps;nt(g),this.refCompositionProps=R;var _=new Nu(g,this),A=!o&&E;this.transform=new hr({name:this.name}),_.transform=this.transform,this.globalVolume=g.globalVolume,this.width=v,this.height=y,this.renderOrder=l,this.id=zu++,this.renderer=h,this.texInfo=null!=A?A:{},this.event=m,this.statistic={loadTime:null!=S?S:0,loadStart:null!==(r=e.startTime)&&void 0!==r?r:0,firstFrameTime:0,precompileTime:null!==(i=e.timeInfos.asyncCompile)&&void 0!==i?i:e.timeInfos.syncCompile},this.reusable=o,this.speed=u,this.renderLevel=b,this.autoRefTex=!this.keepResource&&A&&5!==_.endBehavior,this.content=_,this.name=_.name,this.pluginSystem=T,this.pluginSystem.initializeComposition(this,e),this.camera=new us(this.name,a(a({},null==g?void 0:g.camera),{aspect:v/y})),this.url=e.url,this.assigned=!0,this.interactive=!0,this.onPlayerPause=f,this.onMessageItem=p,this.onEnd=d,this.createRenderFrame(),this.reset()}return Object.defineProperty(e.prototype,"handleEnd",{set:function(t){console.warn("The handleEnd property is deprecated. Use onEnd instead."),this.onEnd=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textures",{get:function(){return this.compositionSourceManager.textures},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"items",{get:function(){return this.content.items},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"startTime",{get:function(){var t;return null!==(t=this.content.startTime)&&void 0!==t?t:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"time",{get:function(){return this.content.timeInms/1e3},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDestroyed",{get:function(){return this.destroyed},enumerable:!1,configurable:!0}),e.prototype.getDuration=function(){return this.content.duration},e.prototype.restart=function(){this.content.reset(),this.prepareRender(),this.reset(),this.transform.setValid(!0),this.content.start(),this.forwardTime(this.startTime),this.content.onUpdate(0),this.loaderData.spriteGroup.onUpdate(0)},e.prototype.setIndex=function(t){this.renderOrder=t},e.prototype.getIndex=function(){return this.renderOrder},e.prototype.setSpeed=function(t){this.speed=t},e.prototype.getSpeed=function(){return this.speed},e.prototype.play=function(){this.content.ended&&this.reusable&&this.restart(),this.content.started?this.gotoAndPlay(this.time-this.startTime):this.gotoAndPlay(0)},e.prototype.pause=function(){this.paused=!0},e.prototype.resume=function(){this.paused=!1},e.prototype.gotoAndPlay=function(t){this.resume(),this.content.started||this.content.start(),this.forwardTime(t+this.startTime)},e.prototype.gotoAndStop=function(t){this.gotoAndPlay(t),this.pause()},e.prototype.createRenderFrame=function(){this.renderFrame=new fn({camera:this.camera,renderer:this.renderer,keepColorBuffer:this.keepColorBuffer,globalVolume:this.globalVolume}),this.renderFrame.cachedTextures=this.textures},e.prototype.setTime=function(t){var e=this.paused;e&&this.resume(),this.content.started||this.content.start(),this.forwardTime(t+this.startTime,!0),e&&this.pause()},e.prototype.forwardTime=function(t,e){void 0===e&&(e=!1);for(var r=1e3*t-this.content.timeInms,i=r<0,n=Math.abs(r),o=i?-15:15;n>15;n-=15)this.update(o,e);this.update(i?-n:n,e)},e.prototype.reset=function(){var t=this;this.rendererOptions=null,this.pluginSystem.plugins.forEach((function(e){return e.onCompositionWillReset(t,t.renderFrame)})),this.content.createContent(),this.content.onEnd=function(){window.setTimeout((function(){var e;null===(e=t.onEnd)||void 0===e||e.call(t,t)}),0)},this.pluginSystem.resetComposition(this,this.renderFrame)},e.prototype.prepareRender=function(){var t=this,e=this.renderFrame;this.postLoaders.length=0,this.pluginSystem.plugins.forEach((function(r){r.prepareRenderFrame(t,e)&&t.postLoaders.push(r)})),this.postLoaders.forEach((function(r){return r.postProcessFrame(t,e)}))},e.prototype.shouldRestart=function(){var t=this.content,e=t.ended,r=t.endBehavior;return e&&5===r},e.prototype.shouldDispose=function(){if(this.reusable)return!1;var t=this.content,e=t.ended,r=t.endBehavior;return e&&(!r||3===r)},e.prototype.update=function(t,e){if(void 0===e&&(e=!1),this.assigned&&!this.paused){this.shouldRestart()&&this.restart();var r=this.content.getUpdateTime(t*this.speed);this.updateVideo(),this.content.onUpdate(r),this.loaderData.spriteGroup.onUpdate(r),this.updateCamera(),this.shouldDispose()?this.dispose():e||this.prepareRender()}},e.prototype.updateVideo=function(){var t,e=performance.now();e-this.lastVideoUpdateTime>33&&((null!==(t=this.textures)&&void 0!==t?t:[]).forEach((function(t){return null==t?void 0:t.uploadCurrentVideoFrame()})),this.lastVideoUpdateTime=e)},e.prototype.updateCamera=function(){this.camera.updateMatrix()},e.prototype.updatePluginLoaders=function(t){var e=this;this.pluginSystem.plugins.forEach((function(r){return r.onCompositionUpdate(e,t)}))},e.prototype.getItemByName=function(t,e){if(this.content&&this.content.items)return this.content.getItemByName(t)[0]},e.prototype.getItemByID=function(t){return this.content&&this.content.items&&this.content.itemCacheMap.has(t)?this.content.itemCacheMap.get(t).item:null},e.prototype.getItemCurrentParent=function(t){return this.content.getItemCurrentParent(t)},e.prototype.itemLifetimeEvent=function(t,e){var r=this,i=e?function(e){return e.onCompositionItemLifeBegin(r,t)}:function(e){return e.onCompositionItemLifeEnd(r,t)};this.pluginSystem.plugins.forEach(i)},e.prototype.getHitTestRay=function(t,e){var r=this.renderFrame.editorTransform,i=r.x,n=r.y;return he((t-r.z)/i,(e-r.w)/n,this.camera)},e.prototype.getEngine=function(){var t;return null===(t=this.renderer)||void 0===t?void 0:t.engine},e.prototype.hitTest=function(t,e,r,i){if(this.isDestroyed||!this.interactive)return[];var n=[],o=this.getHitTestRay(t,e);return this.content.hitTest(o,t,e,n,r,i),this.refContent.forEach((function(a){a.hitTest(o,t,e,n,r,i)})),n},e.prototype.addInteractiveItem=function(t,e){var r;if(e===L.MESSAGE)return null===(r=this.onMessageItem)||void 0===r||r.call(this,{name:t.name,phrase:2,id:t.id,compositionId:this.id}),t.id},e.prototype.removeInteractiveItem=function(t,e){var r;e===L.MESSAGE&&(null===(r=this.onMessageItem)||void 0===r||r.call(this,{name:t.name,phrase:1,id:t.id,compositionId:this.id}))},e.prototype.destroyTextures=function(e){for(var r,i=0;i<e.length;i++){var n=e[i];if(n)if(n.sourceType!==t.TextureSourceType.data||this.texInfo[n.id]){if(this.autoRefTex)--this.texInfo[n.id]||n.dispose()}else n!==(null===(r=this.rendererOptions)||void 0===r?void 0:r.emptyTexture)&&n!==this.renderFrame.transparentTexture&&n.dispose()}},e.prototype.destroyItem=function(t){var e=this;t.type==P.composition?4!==t.endBehavior&&t.items.forEach((function(t){return e.pluginSystem.plugins.forEach((function(r){return r.onCompositionItemRemoved(e,t)}))})):(this.content.removeItem(t),this.refContent.forEach((function(e){return e.removeItem(t)})),this.pluginSystem.plugins.forEach((function(r){return r.onCompositionItemRemoved(e,t)})))},e.prototype.lost=function(t){this.videoState=this.textures.map((function(t){if("video"in t.source)return t.source.video.pause(),t.source.video.currentTime})),this.textures.map((function(t){return t.dispose()})),this.dispose()},e.prototype.dispose=function(){var t,e,r=this;if(!this.destroyed){this.destroyed=!0;var i={},n=this.textures;n&&(this.keepResource?n.forEach((function(t){(null==t?void 0:t.dispose)&&(i[t.id]=t.dispose,t.dispose=er)})):n.forEach((function(t){return t&&t.dispose()}))),this.content.dispose(),this.renderFrame.dispose(),null===(t=this.rendererOptions)||void 0===t||t.emptyTexture.dispose(),null===(e=this.pluginSystem)||void 0===e||e.destroyComposition(this),this.update=function(){tr.error("Update disposed composition: ".concat(r.name,"."))},this.onPlayerPause=er,this.dispose=er,n&&this.keepResource&&n.forEach((function(t){return t.dispose=i[t.id]})),this.compositionSourceManager.dispose(),this.refCompositionProps.clear()}},e.prototype.setEditorTransform=function(t,e,r){this.renderFrame.editorTransform.set(t,t,e,r)},e.prototype.translateByPixel=function(t,e){this.renderer?this.content.translateByPixel(t,e):console.warn("Can not translate position when container not assigned")},e.prototype.translate=function(t,e,r){this.content.translate(t,e,r)},e.prototype.setPosition=function(t,e,r){this.content.setPosition(t,e,r)},e.prototype.rotate=function(t,e,r){this.content.rotate(t,e,r)},e.prototype.setRotation=function(t,e,r){this.content.setRotation(t,e,r)},e.prototype.scale=function(t,e,r){this.content.scale(t,e,r)},e.prototype.setScale=function(t,e,r){this.content.setScale(t,e,r)},e.prototype.offloadTexture=function(){this.textureOffloaded||(this.textures.forEach((function(t){return t&&t.offloadData()})),this.textureOffloaded=!0)},e.prototype.getRendererOptions=function(){return this.rendererOptions||(this.rendererOptions={emptyTexture:this.renderFrame.emptyTexture,cachePrefix:"-"}),this.rendererOptions},e.prototype.reloadTexture=function(){return s(this,void 0,void 0,(function(){return u(this,(function(t){switch(t.label){case 0:return this.textureOffloaded?[4,Promise.all(this.textures.map((function(t){return null==t?void 0:t.reloadData()})))]:[3,2];case 1:t.sent(),this.textureOffloaded=!1,t.label=2;case 2:return[2]}}))}))},e}(),Uu=function(){function t(){this.destroyed=!1,this.textures=[],this.materials=[],this.geometries=[],this.meshes=[],this.renderPasses=[],this.renderErrors=new Set}return t.prototype.addTexture=function(t){this.destroyed||G(this.textures,t)},t.prototype.removeTexture=function(t){this.destroyed||X(this.textures,t)},t.prototype.addMaterial=function(t){this.destroyed||G(this.materials,t)},t.prototype.removeMaterial=function(t){this.destroyed||X(this.materials,t)},t.prototype.addGeometry=function(t){this.destroyed||G(this.geometries,t)},t.prototype.removeGeometry=function(t){this.destroyed||X(this.geometries,t)},t.prototype.addMesh=function(t){this.destroyed||G(this.meshes,t)},t.prototype.removeMesh=function(t){this.destroyed||X(this.meshes,t)},t.prototype.addRenderPass=function(t){this.destroyed||G(this.renderPasses,t)},t.prototype.removeRenderPass=function(t){this.destroyed||X(this.renderPasses,t)},Object.defineProperty(t.prototype,"isDestroyed",{get:function(){return this.destroyed},enumerable:!1,configurable:!0}),t.prototype.getShaderLibrary=function(){return this.renderer.getShaderLibrary()},t.prototype.dispose=function(){if(!this.destroyed){this.destroyed=!0;var t=[];this.renderPasses.length>0&&t.push("Pass ".concat(this.renderPasses.length)),this.meshes.length>0&&t.push("Mesh ".concat(this.meshes.length)),this.geometries.length>0&&t.push("Geom ".concat(this.geometries.length)),this.textures.length>0&&t.push("Tex ".concat(this.textures.length)),t.length>0&&tr.warn("Release GPU memory: ".concat(t.join(", "))),this.renderPasses.forEach((function(t){t.dispose()})),this.meshes.forEach((function(t){t.dispose()})),this.geometries.forEach((function(t){t.dispose()})),this.materials.forEach((function(t){t.dispose()})),this.textures.forEach((function(t){t.dispose()})),this.textures=[],this.materials=[],this.geometries=[],this.meshes=[],this.renderPasses=[],this.renderer=null}},t}(),Bu=function(){function t(t){void 0===t&&(t=60),this.paused=!0,this.lastTime=0,this.setFPS(t),this.tickers=[]}return t.prototype.getFPS=function(){return this.targetFPS},t.prototype.setFPS=function(t){this.targetFPS=Lt(t,1,120),this.interval=Math.floor(1e3/t)-2},t.prototype.getPaused=function(){return this.paused},t.prototype.start=function(){var t=this;if(this.paused=!1,!this.intervalId){this.lastTime=performance.now();var e=requestAnimationFrame||function(t){return window.setTimeout(t,16.7)},r=function(){t.intervalId=e(r),t.paused||t.tick()};r()}},t.prototype.stop=function(){(cancelAnimationFrame||window.clearTimeout)(this.intervalId),this.intervalId=0,this.lastTime=0,this.paused=!0,this.tickers=[]},t.prototype.pause=function(){this.paused=!0},t.prototype.resume=function(){this.paused=!1},t.prototype.tick=function(){if(!this.paused){var t=performance.now(),e=t-this.lastTime;if(e>=this.interval){this.lastTime=t,this.resetTickers&&(this.tickers=this.tickers.filter((function(t){return t})),this.resetTickers=!1);for(var r=0,i=this.tickers.length;r<i;r++){(0,this.tickers[r])(e)}}}},t.prototype.add=function(t){if("function"!=typeof t)throw new Error("Ticker: The tick object must implement the tick method.");this.tickers.push(t)},t}();yr("camera",br,Rr,!0),yr("sprite",Xn,Qn,!0),yr("particle",ba,ma,!0),yr("cal",Ra,_a,!0),yr("interact",Mn,wn,!0),yr("filter",Xn,Jn,!0),yr("text",Qa,qa,!0),U(Ts);var ku=((Iu={})[E.ONE]=i.OneFactor,Iu[E.ZERO]=i.ZeroFactor,Iu[E.SRC_COLOR]=i.SrcColorFactor,Iu[E.SRC_ALPHA]=i.SrcAlphaFactor,Iu[E.ONE_MINUS_SRC_COLOR]=i.OneMinusSrcColorFactor,Iu[E.ONE_MINUS_SRC_ALPHA]=i.OneMinusSrcAlphaFactor,Iu[E.DST_COLOR]=i.DstColorFactor,Iu[E.DST_ALPHA]=i.DstAlphaFactor,Iu[E.ONE_MINUS_DST_COLOR]=i.OneMinusDstColorFactor,Iu[E.ONE_MINUS_DST_ALPHA]=i.OneMinusDstAlphaFactor,Iu),Gu=((Pu={})[E.NEVER]=i.NeverStencilFunc,Pu[E.EQUAL]=i.EqualStencilFunc,Pu[E.LESS]=i.LessStencilFunc,Pu[E.LEQUAL]=i.LessEqualStencilFunc,Pu[E.ALWAYS]=i.AlwaysStencilFunc,Pu[E.NOTEQUAL]=i.NotEqualStencilFunc,Pu[E.GREATER]=i.GreaterStencilFunc,Pu[E.GEQUAL]=i.GreaterEqualStencilFunc,Pu),Xu=((Vu={})[E.KEEP]=i.KeepStencilOp,Vu[E.ZERO]=i.ZeroStencilOp,Vu[E.REPLACE]=i.ReplaceStencilOp,Vu[E.INCR]=i.IncrementStencilOp,Vu[E.DECR]=i.DecrementStencilOp,Vu[E.INCR_WRAP]=i.IncrementWrapStencilOp,Vu[E.DECR_WRAP]=i.IncrementWrapStencilOp,Vu[E.INVERT]=i.InvertStencilOp,Vu),Hu=((Fu={})[E.NEVER]=i.NeverDepth,Fu[E.ALWAYS]=i.AlwaysDepth,Fu[E.EQUAL]=i.EqualDepth,Fu[E.LESS]=i.LessDepth,Fu[E.LEQUAL]=i.LessEqualDepth,Fu[E.GREATER]=i.GreaterDepth,Fu[E.GEQUAL]=i.GreaterEqualDepth,Fu[E.NOTEQUAL]=i.NotEqualDepth,Fu);function Yu(t,e,r){t[e]?t[e].value=r:t[e]=new i.Uniform(r)}var ju=["uMaskTex","uSampler0","uSampler1","uSampler2","uSampler3","uSampler4","uSampler5","uSampler6","uSampler7","uSampler8","uSampler9","uSampler10","uSampler11","uSampler12","uSampler13","uSampler14","uSampler15","uColorOverLifetime","uColorOverTrail"],Wu=function(e){function r(r,n){var o=e.call(this,n)||this;o.textures={},o.material=new i.RawShaderMaterial,o.uniforms={};for(var a=n.shader,s=r.gpuCapability.level,u=0;u<t.maxSpriteMeshItemCount;u++)o.uniforms["uSampler".concat(u)]=new i.Uniform(null);return o.uniforms.uEditorTransform=new i.Uniform([1,1,0,0]),o.uniforms.effects_ObjectToWorld=new i.Uniform((new i.Matrix4).identity()),o.uniforms.effects_MatrixInvV=new i.Uniform([1,0,0,0,0,1,0,0,0,0,1,0,0,0,8,1]),o.uniforms.effects_MatrixVP=new i.Uniform([1,0,0,0,0,1,0,0,0,0,1,0,0,0,-8,1]),o.uniforms.effects_MatrixV=new i.Uniform([1,0,0,0,0,1,0,0,0,0,1,0,0,0,8,1]),o.material=new i.RawShaderMaterial({vertexShader:a.vertex,fragmentShader:a.fragment,alphaToCoverage:!1,depthFunc:i.LessDepth,polygonOffsetFactor:i.ZeroFactor,polygonOffsetUnits:i.ZeroFactor,polygonOffset:!1,uniforms:o.uniforms}),o.material.glslVersion=1===s?i.GLSL1:i.GLSL3,o}return o(r,e),r.prototype.onSetUniformValue=function(t,e){var r;ju.includes(t)&&(r=e.texture),this.material.uniforms[t]?this.material.uniforms[t].value=r||e:this.material.uniforms[t]=new i.Uniform(r||e)},r.prototype.onRemoveUniformValue=function(t){this.material.uniforms[t]&&(this.material.uniforms[t].value=null)},Object.defineProperty(r.prototype,"blending",{get:function(){return this.material.blending!==i.NoBlending},set:function(t){this.material.blending=t?i.CustomBlending:i.NoBlending},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"blendFunction",{get:function(){var t=this.material,e=t.blendSrc,r=t.blendDst;return[e,r,t.blendSrcAlpha||e,t.blendDstAlpha||r]},set:function(t){if(t){var e=l(t,4),r=e[0],i=e[1],n=e[2],o=e[3];this.material.blendSrc=ku[r],this.material.blendDst=ku[i],this.material.blendSrcAlpha=ku[n],this.material.blendDstAlpha=ku[o]}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"blendEquation",{get:function(){var t=this.material,e=t.blendEquation;return[e,t.blendEquationAlpha||e]},set:function(t){if(t){var e=l(t,2),r=e[0],i=e[1];this.material.blendEquation=r,this.material.blendEquationAlpha=i}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"depthTest",{get:function(){return this.material.depthTest},set:function(t){this.material.depthTest=!!t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"depthMask",{get:function(){return this.material.depthWrite},set:function(t){this.material.depthWrite=!!t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"depthFunc",{get:function(){return this.material.depthFunc},set:function(t){void 0!==t&&(this.material.depthFunc=Hu[t])},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"polygonOffsetFill",{get:function(){return this.material.polygonOffset},set:function(t){this.material.polygonOffset=!!t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"polygonOffset",{get:function(){return[this.material.polygonOffsetFactor,this.material.polygonOffsetUnits]},set:function(t){if(t){var e=l(t,2),r=e[0],i=e[1];this.material.polygonOffsetFactor=r,this.material.polygonOffsetUnits=i}},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"sampleAlphaToCoverage",{get:function(){return this.material.alphaToCoverage},set:function(t){this.material.alphaToCoverage=!!t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"stencilTest",{get:function(){return this.material.stencilWrite},set:function(t){this.material.stencilWrite=!!t},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"stencilMask",{get:function(){return[this.material.stencilWriteMask,this.material.stencilWriteMask]},set:function(t){t&&(this.material.stencilWriteMask=t[0])},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"stencilRef",{get:function(){return[this.material.stencilRef,this.material.stencilRef]},set:function(t){t&&(this.material.stencilRef=t[0])},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"stencilFunc",{get:function(){return[this.material.stencilFunc,this.material.stencilFunc]},set:function(t){t&&(this.material.stencilFunc=Gu[t[0]])},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"stencilOpFail",{get:function(){return[this.material.stencilFail,this.material.stencilZFail]},set:function(t){t&&(this.material.stencilFail=Xu[t[0]])},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"stencilOpZFail",{get:function(){return[this.material.stencilZFail,this.material.stencilZFail]},set:function(t){t&&(this.material.stencilZFail=Xu[t[0]])},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"stencilOpZPass",{get:function(){return[this.material.stencilZPass,this.material.stencilZPass]},set:function(t){t&&(this.material.stencilZPass=Xu[t[0]])},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"culling",{get:function(){return this.material.side!==i.DoubleSide},set:function(t){this.material.side=t?i.FrontSide:i.DoubleSide},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"cullFace",{get:function(){return this.material.side},set:function(t){t===C.FRONT?this.material.side=i.FrontSide:t===C.BACK&&(this.material.side=i.BackSide)},enumerable:!1,configurable:!0}),r.prototype.getTexture=function(t){return this.textures[t]},r.prototype.setTexture=function(t,e){this.setUniform(t,e.texture),this.textures[t]=e},r.prototype.getVector4Array=function(t){return this.uniforms[t].value},r.prototype.setVector4Array=function(t,e){var r,i,n=[];try{for(var o=c(e),a=o.next();!a.done;a=o.next()){var s=a.value;n=n.concat(s.toArray())}}catch(t){r={error:t}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}this.setUniform(t,n)},r.prototype.getMatrixArray=function(t){return this.uniforms[t].value},r.prototype.setMatrixArray=function(t,e){var r,i,n=[];try{for(var o=c(e),a=o.next();!a.done;a=o.next()){var s=a.value;n=n.concat(s.elements)}}catch(t){r={error:t}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(r)throw r.error}}this.setUniform(t,n)},r.prototype.setMatrixNumberArray=function(t,e){this.setUniform(t,e)},r.prototype.getMatrix=function(t){return this.uniforms[t].value},r.prototype.setMatrix=function(t,e){this.setUniform(t,e)},r.prototype.setMatrix3=function(t,e){this.setUniform(t,e)},r.prototype.getVector2=function(t){return this.uniforms[t].value},r.prototype.setVector2=function(t,e){this.setUniform(t,e)},r.prototype.getVector3=function(t){return this.uniforms[t].value},r.prototype.setVector3=function(t,e){this.setUniform(t,e)},r.prototype.getVector4=function(t){return this.uniforms[t].value},r.prototype.setVector4=function(t,e){this.setUniform(t,e)},r.prototype.getQuaternion=function(t){return this.uniforms[t].value},r.prototype.setQuaternion=function(t,e){this.setUniform(t,e)},r.prototype.getFloat=function(t){return this.uniforms[t].value},r.prototype.setFloat=function(t,e){this.setUniform(t,e)},r.prototype.getFloats=function(t){return this.uniforms[t].value},r.prototype.setFloats=function(t,e){this.setUniform(t,e)},r.prototype.getInt=function(t){return this.uniforms[t].value},r.prototype.setInt=function(t,e){this.setUniform(t,e)},r.prototype.hasUniform=function(t){return!!this.uniforms[t]},r.prototype.setUniform=function(t,e){var r=new i.Uniform(e);this.uniforms[t]=this.material.uniforms[t]=r},r.prototype.enableKeyword=function(t){throw new Error("Method not implemented.")},r.prototype.disableKeyword=function(t){throw new Error("Method not implemented.")},r.prototype.isKeywordEnabled=function(t){throw new Error("Method not implemented.")},r.prototype.clone=function(t){throw new Error("Method not implemented.")},r.prototype.cloneUniforms=function(t){throw new Error("Method not implemented.")},r.prototype.dispose=function(t){this.destroyed&&(this.material.dispose(),this.destroyed=!0)},r}(ci),Zu=function(t){function e(e){var r=t.call(this,e)||this;return r.semantics.setSemantic(p),r.semantics.setSemantic(d),r.semantics.setSemantic(m),r.semantics.setSemantic(v),r}return o(e,t),e.prototype.setRenderPasses=function(t){this._renderPasses=tt(t.slice())},e.prototype.addRenderPass=function(t){et(this._renderPasses,t)},e.prototype.createResource=function(){this.resource={}},e.prototype.createCopyMesh=function(t){},e.prototype.addMeshToDefaultRenderPass=function(t){var e,r=t.material.material,n=r.uniforms,o=t.material.uniformSemantics;if(this.threeCamera){var a=this.threeCamera,s=(new i.Matrix4).multiplyMatrices(a.projectionMatrix,a.matrixWorldInverse);e={effects_ObjectToWorld:t.mesh.matrixWorld,effects_MatrixV:a.matrixWorldInverse,effects_MatrixVP:s,effects_MatrixInvV:a.matrixWorld}}else{a=this.camera;e={effects_ObjectToWorld:t.worldMatrix.toArray(),effects_MatrixV:a.getViewMatrix().toArray(),effects_MatrixVP:a.getViewProjectionMatrix().toArray(),effects_MatrixInvV:a.getInverseViewMatrix().toArray()}}Object.keys(o).forEach((function(t){e[t]&&Yu(n,t,e[t])})),r.uniformsNeedUpdate=!0,this.group.add(t.mesh)},e.prototype.removeMeshFromDefaultRenderPass=function(t){this.group.remove(t.mesh)},e.prototype.updateMatrix=function(){var t=this.group,e=this.threeCamera;e&&t.children.forEach((function(t){var r=t.material,n=r.uniforms,o=(new i.Matrix4).multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse);Yu(n,"effects_ObjectToWorld",t.matrixWorld),Yu(n,"effects_MatrixVP",o),r.uniformsNeedUpdate=!0}))},e.prototype.updateUniform=function(){var t=this.group,e=this.camera;t.children.forEach((function(t){var r=t.material;Yu(r.uniforms,"effects_MatrixInvV",e.getInverseViewMatrix().toArray()),Yu(r.uniforms,"effects_MatrixVP",e.getViewProjectionMatrix().toArray()),Yu(r.uniforms,"effects_MatrixV",e.getViewMatrix().toArray()),r.uniformsNeedUpdate=!0}))},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.group&&this.group.clear()},e}(fn),qu=function(e){function r(r,i){void 0===i&&(i={});var n=e.call(this)||this;if(r){var o=r.width,s=void 0===o?1:o,u=r.height,c=void 0===u?1:u;n.texture=n.createTextureByType(a(a({},i),{sourceType:t.TextureSourceType.data,data:r})),n.width=s,n.height=c}else n.texture=n.createTextureByType(i);return n.texture.needsUpdate=!0,n}return o(r,e),r.toThreeJsTextureFilter=function(t){return t===E.LINEAR?i.LinearFilter:i.NearestFilter},r.toThreeJsTextureWrap=function(t){switch(t){case E.MIRRORED_REPEAT:return i.MirroredRepeatWrapping;case E.REPEAT:return i.RepeatWrapping;default:return i.ClampToEdgeWrapping}},r.prototype.updateSource=function(t){this.texture.dispose(),this.texture=this.createTextureByType(t),this.texture.needsUpdate=!0},r.prototype.startVideo=function(){return s(this,void 0,void 0,(function(){var e;return u(this,(function(r){switch(r.label){case 0:return this.sourceType!==t.TextureSourceType.video?[3,2]:(e=this.texture.source.data).paused?[4,e.play()]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}}))}))},r.prototype.assembleOptions=function(e){var n=e.target,o=void 0===n?E.TEXTURE_2D:n;return e.sourceType||(e.sourceType="image"in e?t.TextureSourceType.image:"data"in e?t.TextureSourceType.data:"video"in e?t.TextureSourceType.video:t.TextureSourceType.none),a(a({target:o,format:i.RGBAFormat,type:i.UnsignedByteType},e),{minFilter:r.toThreeJsTextureFilter(e.minFilter),magFilter:r.toThreeJsTextureFilter(e.magFilter),wrapS:r.toThreeJsTextureWrap(e.wrapS),wrapT:r.toThreeJsTextureWrap(e.wrapT)})},r.prototype.dispose=function(){this.texture.dispose()},r.prototype.createTextureByType=function(e){var r,n,o=this.assembleOptions(e),a=o.flipY,s=o.type,u=o.wrapS,c=o.wrapT,l=o.minFilter,h=o.magFilter,f=o.sourceType,p=i.UVMapping,d=o.format,m=void 0;if(this.sourceType=f,f===t.TextureSourceType.data){var v=e.data;m=new i.DataTexture(v.data,v.width,v.height,d,s,p,u,c,h,l),this.width=v.width,this.height=v.height}else if(f===t.TextureSourceType.image){var y=e.image;m=new i.Texture(y,p,u,c,h,l,d,s),this.width=y.width,this.height=y.height}else if(f===t.TextureSourceType.compressed){var x=0,g=0,T=e.mipmaps.map((function(t){var e=t.data,r=t.width,i=t.height;return x=x<r?r:x,g=g<i?i:g,{data:e,width:r,height:i,colorSpace:"srgb"}}));d=i.RGBA_ASTC_4x4_Format,m=new i.CompressedTexture(T,x,g,d,s,p,u,c,h,l),this.width=x,this.height=g}else if(f===t.TextureSourceType.video)m=new i.VideoTexture(e.video,p,u,c,h,l,d,s);else if(f===t.TextureSourceType.framebuffer){if(v=e.data){var E=null!==(r=v.width)&&void 0!==r?r:0,S=null!==(n=v.height)&&void 0!==n?n:0;m=new i.FramebufferTexture(E,S,d),this.width=E,this.height=S}}else f===t.TextureSourceType.none&&((m=new i.DataTexture(new Uint8Array(4).fill(255),1,1)).wrapS=i.MirroredRepeatWrapping,m.wrapT=i.MirroredRepeatWrapping,this.width=this.height=1);if(m)return m.flipY=!!a,m;throw new Error("使用未知的数据类型创建纹理")},r}(Kr),Qu=function(t){function e(r,i){var n,o=t.call(this,r,i)||this;return null===(n=o.compositionSourceManager.sourceContent)||void 0===n||n.items.forEach((function(t){var r=t.content.renderer.shape;r&&Object.keys(r).forEach((function(t){var i=r[t];e.shape[t]||(e.shape[t]=0),e.shape[t]+=i.length}))})),o.content.start(),o}return o(e,t),e.prototype.createRenderFrame=function(){this.renderFrame=new Zu({camera:this.camera,keepColorBuffer:this.keepColorBuffer,renderer:this.renderer})},e.prototype.updateVideo=function(){this.textures.map((function(t){return t.startVideo()}))},e.prototype.updateCamera=function(){var t=this.renderFrame;t.threeCamera?t.updateMatrix():t.updateUniform()},e.prototype.getRendererOptions=function(){var t=qu.createWithData(this.renderer.engine,{data:new Uint8Array(4).fill(255),width:1,height:1});return t.texture.needsUpdate=!0,this.rendererOptions||(this.rendererOptions={emptyTexture:t,cachePrefix:"-"}),this.rendererOptions},e.shape={},e}(Du),Ku=1,Ju=function(t){function e(e,r){var n=this,o=r.drawStart,a=void 0===o?0:o,s=r.drawCount,u=r.indices,c=r.mode,l=r.name,h=void 0===l?"effectsGeometry:".concat(Ku++):l;(n=t.call(this,h)||this).attributes={},n.destroyed=!1,n.attributesName=[],n.mode=null!=c?c:E.TRIANGLES;var f=[],p={},d=new i.BufferGeometry;return Object.keys(r.attributes).forEach((function(t){var e=r.attributes[t];if("dataSource"in e){var o=e.dataSource;if(o){void 0===p[o]&&n.setAttributeType(o,e,d,p,r.maxVertex);var a=e.size,s=e.offset,u=e.normalize,c=p[o],l=c.buffer,h=c.dataLength,m=new i.InterleavedBufferAttribute(l,a,(null!=s?s:0)/h,u);d.setAttribute(t,m),p[t]={buffer:l,attribute:m,type:c.type,dataLength:h}}}else n.setAttributeType(t,e,d,p,r.maxVertex);f.push(t)})),u&&u.data&&d.setIndex(new i.BufferAttribute(u.data,1)),n.geometry=d,n.attributes=p,n.attributesName=f,n.drawStart=a,n.drawCount=null!=s?s:0,n}return o(e,t),Object.defineProperty(e.prototype,"drawCount",{get:function(){return this.geometry.drawRange.count},set:function(t){this.geometry.drawRange.count=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"drawStart",{get:function(){return this.geometry.drawRange.start},set:function(t){this.geometry.drawRange.start=t},enumerable:!1,configurable:!0}),e.prototype.getAttributeData=function(t){if(null!=this.attributes[t])return this.attributes[t].buffer.array},e.prototype.setAttributeData=function(t,e){if(null!=this.attributes[t]){var r=this.attributes[t].buffer;r.updateRange.count=e.length,r.updateRange.offset=0,r.set(e,0),this.geometry.attributes[t].needsUpdate=!0}},e.prototype.setAttributeSubData=function(t,e,r){null!=this.attributes[t]&&(this.attributes[t].buffer.set(r,e),this.geometry.attributes[t].needsUpdate=!0)},e.prototype.getAttributeStride=function(t){var e=this.attributes[t];return e.buffer.stride*Si[e.type]},e.prototype.getAttributeNames=function(){return this.attributesName},e.prototype.getIndexData=function(){var t=this.geometry.getIndex();return null===t?void 0:t.array},e.prototype.setIndexData=function(t){t&&(this.geometry.setIndex(new i.BufferAttribute(t,1)),this.geometry.index.needsUpdate=!0)},e.prototype.setIndexSubData=function(t,e){var r=this.geometry.getIndex();if(null!==r){var i=t,n=t+e.length;if(r.count<n){var o=new e.constructor(end);o.set(r.array),r.array=o}r.array.set(e,i),this.geometry.index.needsUpdate=!0}},e.prototype.setDrawStart=function(t){this.drawStart=t},e.prototype.getDrawStart=function(){return this.drawStart},e.prototype.setDrawCount=function(t){this.drawCount=t},e.prototype.getDrawCount=function(){return this.drawCount},e.prototype.dispose=function(){this.destroyed||(this.geometry.dispose(),this.destroyed=!0)},e.prototype.setAttributeType=function(t,e,r,n,o){var a,s=e,u=s.size,c=s.offset,l=s.normalize,h=s.type,f=void 0===h?E.FLOAT:h,p=e,d=p.stride,m=p.data;if(f&&!m&&(m=Ri(f)),m){d="aSprite"===t?12:null!=d?d:0;var v=m instanceof Float32Array?Float32Array.BYTES_PER_ELEMENT:Uint16Array.BYTES_PER_ELEMENT,y=d/v;if(o){var x=o*d+(null!==(a=Qu.shape[t])&&void 0!==a?a:0);0===m.length&&(m=m instanceof Float32Array?new Float32Array(x):new Uint16Array(x))}var g=new i.InterleavedBuffer(m,y),T=new i.InterleavedBufferAttribute(g,u,(null!=c?c:0)/v,l);r.setAttribute(t,T),n[t]={buffer:g,attribute:T,type:f,dataLength:v}}},e}(bi),$u=function(e){function r(t,r){var n=this,o=r.material,a=r.geometry,s=r.priority,u=void 0===s?0:s;return(n=e.call(this,t,r)||this).geometry=a,n.material=o,a.mode===E.LINES?n.mesh=new i.LineSegments(a.geometry,o.material):n.mesh=new i.Mesh(a.geometry,o.material),n.worldMatrix=n.mesh.matrixWorld,n.priority=u,n}return o(r,e),Object.defineProperty(r.prototype,"priority",{get:function(){return this.mesh.renderOrder},set:function(t){this.mesh&&(this.mesh.renderOrder=t)},enumerable:!1,configurable:!0}),r.prototype.setVisible=function(t){this.mesh.visible=t},r.prototype.getVisible=function(){return this.mesh.visible},r.prototype.firstGeometry=function(){return this.geometry},r.prototype.setMaterial=function(e,r){r!==t.DestroyOptions.keep&&this.material.dispose(r),this.material=e,this.mesh.material=e.material},r.prototype.restore=function(){},r.prototype.dispose=function(t){this.destroyed||(this.mesh.clear(),this.destroyed=!0)},r}(Ii),tc=function(t){function e(e){var r=t.call(this)||this;return r.gpuCapability=new xn(e),r}return o(e,t),e}(Uu),ec=function(t){function e(e){var r=t.call(this)||this;return r.engine=new tc(e),r}return o(e,t),e}(_n),rc=function(t){function e(e,r){var i=t.call(this)||this,n=r.width,o=r.height,a=r.camera;return i.renderer=new ec(e),i.width=n,i.height=o,i.camera=a,i}return o(e,t),Object.defineProperty(e.prototype,"currentComposition",{get:function(){return this.compositions[0]},enumerable:!1,configurable:!0}),e.prototype.loadScene=function(t,e){return s(this,void 0,void 0,(function(){var e,r;return u(this,(function(i){switch(i.label){case 0:return[4,new Lu({}).loadScene(t)];case 1:return e=i.sent(),(r=new Qu({renderer:this.renderer,width:this.width,height:this.height},e)).renderFrame.group=this,r.renderFrame.threeCamera=this.camera,this.compositions=[r],[2]}}))}))},e.prototype.update=function(t){this.compositions.forEach((function(e){e.update(t)}))},e}(i.Group);Dn(8),Kr.create=function(t,e){return new qu(void 0,e)},Kr.createWithData=function(t,e,r){return new qu(e,r)},ci.create=function(t,e){return new Wu(t,e)},bi.create=function(t,e){return new Ju(t,e)},Ii.create=function(t,e){return new $u(t,e)};var ic="1.6.10";tr.info("THREEJS plugin version: "+ic),t.AbstractPlugin=Er,t.AssetManager=Lu,t.BYTES_TYPE_MAP=Si,t.BezierCurve=De,t.BezierCurvePath=Ue,t.COMPRESSED_TEXTURE=Sn,t.CONSTANT_MAP_BLEND=ku,t.CONSTANT_MAP_DEPTH=Hu,t.CONSTANT_MAP_STENCIL_FUNC=Gu,t.CONSTANT_MAP_STENCIL_OP=Xu,t.COPY_FRAGMENT_SHADER=mi,t.COPY_MESH_SHADER_ID=pi,t.COPY_VERTEX_SHADER=di,t.CalculateItem=jn,t.CalculateLoader=Ra,t.CalculateVFXItem=_a,t.Camera=us,t.CameraController=Sr,t.CameraVFXItem=Rr,t.CameraVFXItemLoader=br,t.Composition=Du,t.CompositionSourceManager=wu,t.DEFAULT_FONTS=Na,t.Downloader=Gr,t.EFFECTS_COPY_MESH_NAME=fi,t.EVENT_TYPE_CLICK=Cr,t.EVENT_TYPE_TOUCH_END=Mr,t.EVENT_TYPE_TOUCH_MOVE=Or,t.EVENT_TYPE_TOUCH_START=wr,t.Engine=Uu,t.EventSystem=Ir,t.FILTER_NAME_NONE=x,t.FilterSpriteVFXItem=Jn,t.Float16ArrayWrapper=Jt,t.FrameBuffer=Rn,t.GPUCapability=xn,t.Geometry=bi,t.GlobalUniforms=mn,t.GradientValue=Ne,t.HELP_LINK=g,t.InteractBehavior=Lr,t.InteractItem=Ln,t.InteractLoader=Mn,t.InteractMesh=Cn,t.InteractVFXItem=wn,t.KTXTexture=$r,t.LineSegments=ze,t.LinearValue=Fe,t.Material=ci,t.MaterialDataBlock=ni,t.Mesh=Ii,t.PLAYER_OPTIONS_ENV_EDITOR=y,t.POST_PROCESS_SETTINGS="post_process_settings",t.ParticleLoader=ba,t.ParticleMesh=ya,t.ParticleSystem=ia,t.ParticleVFXItem=ma,t.PassTextureCache=Ti,t.PluginSystem=xr,t.QCanvasViewer=La,t.QText=Ma,t.RENDER_PASS_NAME_PREFIX=ln,t.RENDER_PREFER_LOOKUP_TEXTURE=_i,t.RUNTIME_ENV="runtime_env",t.RandomSetValue=Ie,t.RandomValue=Pe,t.RandomVectorValue=Ve,t.RenderBuffer=vn,t.RenderFrame=fn,t.RenderPass=zi,t.RenderPassPriorityNormal=Pi,t.RenderPassPriorityPostprocess=3e3,t.RenderPassPriorityPrepare=0,t.RenderTargetHandle=Fi,t.Renderer=_n,t.SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_0=m,t.SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_SIZE_0=v,t.SEMANTIC_PRE_COLOR_ATTACHMENT_0=p,t.SEMANTIC_PRE_COLOR_ATTACHMENT_SIZE_0=d,t.SPRITE_VERTEX_STRIDE=f,t.SemanticMap=Ei,t.Shader=hi,t.SpriteItem=qn,t.SpriteLoader=Xn,t.SpriteMesh=Pn,t.SpriteVFXItem=Qn,t.StaticValue=Le,t.TEMPLATE_USE_OFFSCREEN_CANVAS=Ai,t.TEXTURE_UNIFORM_MAP=ju,t.TextItem=Za,t.TextLoader=Qa,t.TextMesh=Aa,t.TextVFXItem=qa,t.Texture=Kr,t.TextureFactory=ri,t.ThreeComposition=Qu,t.ThreeDisplayObject=rc,t.ThreeMaterial=Wu,t.ThreeTexture=qu,t.Ticker=Bu,t.TimelineComponent=Qe,t.Transform=hr,t.VFXItem=fr,t.ValueGetter=Me,t.addByOrder=et,t.addItem=G,t.addItemWithOrder=H,t.alphaFrameFrag=Hi,t.alphaMaskFrag=Yi,t.assertExist=nt,t.asserts=function(t,e){if(void 0===e&&(e="asserts failed"),!t)throw new Error(e)},t.blend="vec4 blendColor(vec4 color,vec4 vc,float mode){vec4 ret=color*vc;\n#ifdef PRE_MULTIPLY_ALPHA\nfloat alpha=vc.a;\n#else\nfloat alpha=ret.a;\n#endif\nif(mode==1.){ret.rgb*=alpha;}else if(mode==2.){ret.rgb*=alpha;ret.a=dot(ret.rgb,vec3(0.33333333));}else if(mode==3.){alpha=color.r*alpha;ret=vec4(vc.rgb*alpha,alpha);}return ret;}",t.bloomMixVert=Qi,t.bloomThresholdVert=Ki,t.calculateTranslation=re,t.cameraMoveFrag="uniform vec2 uMoveTexSize;uniform sampler2D uFilterSource;\n#define INTERPOLATION 1\nvec4 filterMain(vec2 texCoord,sampler2D tex){\n#ifdef INTERPOLATION\nvec2 texInPixel=texCoord*uMoveTexSize;vec2 coordMin=floor(texInPixel);vec2 pp=texInPixel-coordMin;vec4 fCoord=vec4(coordMin/uMoveTexSize,(coordMin+vec2(1.))/uMoveTexSize);vec4 cLT=texture2D(uFilterSource,vec2(fCoord.x,fCoord.w));vec4 cLB=texture2D(uFilterSource,vec2(fCoord.x,fCoord.y));vec4 cRT=texture2D(uFilterSource,vec2(fCoord.z,fCoord.w));vec4 cRB=texture2D(uFilterSource,vec2(fCoord.z,fCoord.y));vec4 cB=mix(cLB,cRB,pp.x);vec4 cT=mix(cLT,cRT,pp.x);return mix(cB,cT,pp.y);\n#else\nreturn texture2D(uFilterSource,texCoord);\n#endif\n}",t.cameraMoveVert=ji,t.canvasPool=Ba,t.colorGradingFrag=$i,t.colorStopsFromGradient=Z,t.colorToArr=j,t.combineImageTemplate=ja,t.combineImageTemplate1=Pa,t.combineImageTemplate1Async=function(t,e,r,i,n){return s(this,void 0,void 0,(function(){return u(this,(function(o){return console.warn("The combineImageTemplate1Async function is deprecated. Use combineImageTemplate1 instead."),[2,Pa(t,e,r,i,n)]}))}))},t.combineImageTemplate2=Ya,t.combineImageTemplate2Async=function(t,e,r,i,n){return s(this,void 0,void 0,(function(){return u(this,(function(o){return console.warn("The combineImageTemplate2Async function is deprecated. Use combineImageTemplate2 instead."),[2,Ya(t,e,r,i,n)]}))}))},t.combineImageTemplateAsync=function(t,e,r,i,n){return s(this,void 0,void 0,(function(){return u(this,(function(o){return console.warn("The combineImageTemplateAsync function is deprecated. Use combineImageTemplate instead."),[2,ja(t,e,r,i,n)]}))}))},t.compatibleFrag="#version 300 es\n#ifdef WEBGL2\n#define texture2D texture\n#define textureCube texture\n#define textureCubeLodEXT textureLod\nlayout(location=0)out vec4 fragColor;\n#else\n#define fragColor gl_FragColor\n#endif\n",t.compatibleVert="#version 300 es\n#ifdef WEBGL2\n#define texture2D texture\n#else\n#endif\n",t.convertAnchor=ce,t.copyFrag=li,t.createCopyShader=vi,t.createFilter=k,t.createFilterShaders=B,t.createGLContext=function(t,e,r){var i;if(void 0===e&&(e="webgl"),"webgl2"===e&&((i=t.getContext("webgl2",r))||console.debug("WebGL2 context retrieval failed, falling back to WebGL context.")),i&&"webgl"!==e||(i=t.getContext("webgl",r)),!i)throw new Error("This browser does not support WebGL or the WebGL version is incorrect. Please check your WebGL version.");return i},t.createKeyFrameMeta=Ye,t.createShaderWithMarcos=Dr,t.createShape=yo,t.createVFXItem=pr,t.createValueGetter=ke,t.decimalEqual=pe,t.deepClone=function t(e){if(ir(e))return e.map(t);if(e&&"object"==typeof e){if(ArrayBuffer.isView(e))return e.slice();for(var r={},i=Object.keys(e),n=0;n<i.length;n++){var o=i[n];r[o]=t(e[o])}return r}return e},t.defaultGlobalVolume=cn,t.defaultPlugins=mr,t.delayFrag=Wi,t.deserializeMipmapTexture=Zr,t.distortionFrag=Zi,t.distortionVert=qi,t.earcut=Bo,t.enlargeBuffer=Y,t.ensureVec3=ie,t.filters=Ts,t.findPreviousRenderPass=function(t,e){var r=t.indexOf(e);return t[r-1]},t.gaussianDownFrag="precision highp float;varying vec2 uv;uniform sampler2D _MainTex;uniform vec2 _TextureSize;float GaussWeight2D(float x,float y,float sigma){float PI=3.14159265358;float E=2.71828182846;float sigma_2=pow(sigma,2.0);float a=-(x*x+y*y)/(2.0*sigma_2);return pow(E,a)/(2.0*PI*sigma_2);}vec3 GaussNxN(sampler2D tex,vec2 uv,vec2 stride,float sigma){vec3 color=vec3(0.,0.,0.);const int r=5/2;float weight=0.0;for(int i=-r;i<=r;i++){for(int j=-r;j<=r;j++){float w=GaussWeight2D(float(i),float(j),sigma);vec2 coord=uv+vec2(i,j)*stride;color+=texture2D(tex,coord).rgb*w;weight+=w;}}color/=weight;return color;}void main(){vec4 mainColor=texture2D(_MainTex,uv);vec3 color=mainColor.rgb;color=GaussNxN(_MainTex,uv,1.0/_TextureSize,1.0);gl_FragColor=vec4(color,1.0);}",t.gaussianDownHFrag=tn,t.gaussianDownVFrag=en,t.gaussianUpFrag=rn,t.generateEmptyTypedArray=Ri,t.generateHalfFloatTexture=Jr,t.getBackgroundImage=ka,t.getColorFromGradientStops=W,t.getConfig=wi,t.getDefaultTemplateCanvasPool=function(){return Ba},t.getDefaultTextureFactory=function(){return ei||(ei=new ri),ei},t.getGeometryByShape=jo,t.getGeometryTriangles=Yo,t.getImageItemRenderInfo=Vn,t.getKTXTextureOptions=ti,t.getKeyFrameMetaByRawValue=He,t.getParticleMeshShader=Ta,t.getPixelRatio=function(){if("object"==typeof screen&&"object"==typeof document){var t=Math.max(document.documentElement.clientWidth,window.innerWidth||0),e=screen.width/t;return Math.min(2*e,2)}return 1},t.getPreMultiAlpha=Vr,t.getStandardComposition=Tu,t.getStandardImage=gu,t.getStandardItem=Ru,t.getStandardJSON=yu,t.getTextureSize=pn,t.glContext=E,t.gpuTimer=function(t){var e=this,r=t.getExtension("EXT_disjoint_timer_query_webgl2");if(r){var i=t.createQuery(),n=function(){return s(e,void 0,void 0,(function(){return u(this,(function(e){return[2,new Promise((function(e,o){if(i){var a=t.getQueryParameter(i,t.QUERY_RESULT_AVAILABLE),s=t.getParameter(r.GPU_DISJOINT_EXT);if(a&&!s){var u=t.getQueryParameter(i,t.QUERY_RESULT);e(u/1e3/1e3)}(a||s)&&(t.deleteQuery(i),i=null),null!==a&&i&&window.setTimeout((function(){n().then(e).catch}),1)}}))]}))}))};if(!i)return;return{begin:function(){i&&t.beginQuery(r.TIME_ELAPSED_EXT,i)},end:function(){t.endQuery(r.TIME_ELAPSED_EXT)},getTime:n}}},t.imageDataFromColor=function(t){rr(t)&&(t=j(t));for(var e=t,r={width:1,height:1,data:new Uint8Array(4)},i=r.data,n=0;n<4;n++)i[n]=e[n];return r},t.imageDataFromGradient=$,t.initErrors=T,t.initGLContext=S,t.integrate="float calculateMovement(float t,vec2 p1,vec2 p2,vec2 p3,vec2 p4){float movement=0.0;float h=(t-p1.x)*0.05;for(int i=0;i<=20;i++){float t=float(i)*h;float nt=binarySearchT(t,p1.x,p2.x,p3.x,p4.x);float y=cubicBezier(nt,p1.y,p2.y,p3.y,p4.y);float weight=(i==0||i==20)? 1.0 :(mod(float(i),2.)!=0.)? 4.0 : 2.0;movement+=weight*y;}movement*=h/3.;return movement;}float integrateFromBezierCurveFrames(float time,float frameStart,float frameCount){int start=int(frameStart);int count=int(frameCount-1.);float ret=0.;for(int i=0;i<ITR_END;i+=2){vec4 k0=lookup_curve(i+start);vec4 k1=lookup_curve(i+1+start);if(i==0&&time<k0.x){return ret;}vec2 p1=vec2(k0.x,k0.y);vec2 p2=vec2(k0.z,k0.w);vec2 p3=vec2(k1.z,k1.w);vec2 p4=vec2(k1.x,k1.y);if(time>=k1.x){ret+=calculateMovement(k1.x,p1,p2,p3,p4);}if(time>=k0.x&&time<k1.x){return ret+calculateMovement(time,p1,p2,p3,p4);}}return ret;}float integrateByTimeLineSeg(float t,vec2 p0,vec2 p1){float t0=p0.x;float t1=p1.x;float y0=p0.y;float y1=p1.y;vec4 tSqr=vec4(t,t,t0,t0);tSqr=tSqr*tSqr;vec4 a=vec4(2.*t,3.,-t0,3.)*tSqr;float t1y0=t1*y0;vec4 b=vec4(y0-y1,t0*y1-t1y0,2.*y0+y1,t1y0);float r=dot(a,b);return r/(t0-t1)*0.16666667;}float integrateLineSeg(float time,vec2 p0,vec2 p1){float h=time-p0.x;float y0=p0.y;return(y0+y0+(p1.y-y0)*h/(p1.x-p0.x))*h/2.;}float integrateFromLineSeg(float time,float frameStart,float frameCount){if(time==0.){return 0.;}int start=int(frameStart);int count=int(frameCount-1.);float ret=0.;for(int i=0;i<ITR_END;i++){if(i>count){return ret;}vec4 ks=lookup_curve(i+start);vec2 k0=ks.xy;vec2 k1=ks.zw;if(time>k0.x&&time<=k1.x){return ret+integrateLineSeg(time,k0,k1);}ret+=integrateLineSeg(k1.x,k0,k1);vec2 k2=lookup_curve(i+start+1).xy;if(time>k1.x&&time<=k2.x){return ret+integrateLineSeg(time,k1,k2);}ret+=integrateLineSeg(k2.x,k1,k2);}return ret;}float integrateByTimeFromLineSeg(float time,float frameStart,float frameCount){if(time==0.){return 0.;}int start=int(frameStart);int count=int(frameCount-1.);float ret=0.;for(int i=0;i<ITR_END;i++){if(i>count){return ret;}vec4 ks=lookup_curve(i+start);vec2 k0=ks.xy;vec2 k1=ks.zw;if(time>k0.x&&time<=k1.x){return ret+integrateByTimeLineSeg(time,k0,k1);}ret+=integrateByTimeLineSeg(k1.x,k0,k1);vec2 k2=lookup_curve(i+start+1).xy;if(time>k1.x&&time<=k2.x){return ret+integrateByTimeLineSeg(time,k1,k2);}ret+=integrateByTimeLineSeg(k2.x,k1,k2);}return ret;}float getIntegrateFromTime0(float t1,vec4 value){float type=value.x;if(type==0.){return value.y*t1;}if(type==1.){vec2 p0=vec2(0.,value.y);vec2 p1=vec2(value.w,value.z);return integrateLineSeg(t1,p0,p1);}if(type==3.){return integrateFromLineSeg(t1,value.y,value.z);}if(type==4.){return mix(value.y,value.z,aSeed)*t1;}if(type==5.){return integrateFromBezierCurveFrames(t1,value.z,value.w);}return 0.;}float getIntegrateByTimeFromTime(float t0,float t1,vec4 value){float type=value.x;if(type==0.){return value.y*(t1*t1-t0*t0)/2.;}else if(type==1.){vec2 p0=vec2(0.,value.y);vec2 p1=vec2(value.w,value.z);return integrateByTimeLineSeg(t1,p0,p1)-integrateByTimeLineSeg(t0,p0,p1);}if(type==3.){return integrateByTimeFromLineSeg(t1,value.y,value.z)-integrateByTimeFromLineSeg(t0,value.y,value.z);}if(type==4.){return mix(value.y,value.z,aSeed)*(t1*t1-t0*t0)/2.;}if(type==5.){return integrateFromBezierCurveFrames(t1,value.z,value.w)-integrateFromBezierCurveFrames(t0,value.z,value.w);}return 0.;}",t.interpolateColor=q,t.isAlipayMiniApp=function(){return"undefined"!=typeof my&&"web"===(null===my||void 0===my?void 0:my.renderTarget)},t.isAndroid=K,t.isArray=ir,t.isFunction=nr,t.isIOS=function(){return!!navigator.platform&&/iPad|iPhone|iPod/.test(navigator.platform)},t.isObject=or,t.isScene=Ou,t.isSimulatorCellPhone=J,t.isString=rr,t.isUniformStruct=oi,t.isUniformStructArray=function(t){return t&&void 0!==t.length&&oi(t[0])},t.isValidFontFamily=ot,t.isWebGL2=function(t){return"undefined"!=typeof WebGL2RenderingContext&&"WebGL2RenderingContext"===t.constructor.name},t.itemFrag=Bi,t.itemFrameFrag=Di,t.itemVert=Ui,t.loadBinary=jr,t.loadBlob=function(t){return s(this,void 0,void 0,(function(){return u(this,(function(e){return[2,new Promise((function(e,r){(new Gr).downloadBlob(t,e,(function(e,i){r("Couldn't load blob ".concat(t,": status ").concat(e,", ").concat(i))}))}))]}))}))},t.loadImage=Yr,t.loadMedia=Ga,t.loadVideo=Wr,t.loadWebPOptional=Hr,t.logger=tr,t.math=Qt,t.modifyMaxKeyframeShader=Ea,t.nearestPowerOfTwo=le,t.noop=er,t.numberToFix=de,t.parsePercent=Q,t.particleFrag=ki,t.particleOriginTranslateMap=ue,t.particleUniformTypeMap=va,t.particleVert=Gi,t.pluginLoaderMap=dr,t.pointOnLine=function(t,e,r,i,n,o){var a=t*i+e*n+r*o-n*i-o*t-r*e;return a>-.001&&a<.001},t.random=ar,t.registerFilter=D,t.registerFilters=U,t.registerPlugin=yr,t.removeItem=X,t.requestAsync=Ia,t.rotateVec2=Wo,t.screenMeshVert=Ji,t.setBlendMode=Ur,t.setConfig=function(t,e){return Ci[t]=e},t.setDefaultTextureFactory=function(t){ei=t},t.setMaskMode=kr,t.setMaxSpriteMeshItemCount=Dn,t.setRayFromCamera=he,t.setSideMode=Br,t.setSpriteMeshMaxFragmentTextures=function(e){t.maxSpriteTextureCount=e},t.setSpriteMeshMaxItemCountByGPU=function(e){return t.maxSpriteTextureCount=Math.min(e.maxFragmentTextures,16),e.maxVertexUniforms>=256?t.maxSpriteMeshItemCount=32:e.maxVertexUniforms>=128?t.maxSpriteMeshItemCount=16:void(t.maxSpriteTextureCount=8)},t.setUniformValue=Yu,t.sortByOrder=tt,t.spec=Rt,t.spriteMeshShaderFromFilter=Fn,t.spriteMeshShaderFromRenderInfo=zn,t.spriteMeshShaderIdFromRenderInfo=Nn,t.thresholdFrag=nn,t.throwDestroyedError=sr,t.trailVert=Xi,t.translatePoint=function(t,e){for(var r=[-.5,.5,-.5,-.5,.5,.5,.5,-.5],i=0;i<8;i+=2)r[i]+=t,r[i+1]+=e;return r},t.trianglesFromRect=fe,t.unregisterPlugin=function(t){delete vr[t],delete dr[t],X(mr,t)},t.valIfUndefined=function(t,e){return null==t?e:t},t.value="#ifdef SHADER_VERTEX\n#define CURVE_VALUE_TEXTURE uVCurveValueTexture\n#define CURVE_VALUE_ARRAY uVCurveValues\n#define CURVE_VALUE_COUNT VERT_CURVE_VALUE_COUNT\n#define FRAG_CURVE_VALUE_COUNT 0\n#else\n#define CURVE_VALUE_TEXTURE uFCurveValueTexture\n#define CURVE_VALUE_ARRAY uFCurveValues\n#define CURVE_VALUE_COUNT FRAG_CURVE_VALUE_COUNT\n#define VERT_CURVE_VALUE_COUNT 0\n#endif\n#if CURVE_VALUE_COUNT > 0\n#if LOOKUP_TEXTURE_CURVE\nuniform sampler2D CURVE_VALUE_TEXTURE;const float uCurveCount=1./float(CURVE_VALUE_COUNT);\n#define lookup_curve(i) texture2D(CURVE_VALUE_TEXTURE,vec2(float(i) * uCurveCount,0.))\n#else\nuniform vec4 CURVE_VALUE_ARRAY[CURVE_VALUE_COUNT];\n#define lookup_curve(i) CURVE_VALUE_ARRAY[i]\n#endif\n#else\n#define lookup_curve(i) vec4(0.)\n#endif\n#ifdef WEBGL2\n#define ITR_END (count + 1)\n#else\n#define ITR_END MAX_C\n#endif\n#define NONE_CONST_INDEX 1\n#ifdef SHADER_VERTEX\nin float aSeed;out float vSeed;\n#endif\n#ifdef SHADER_VERTEX\n#define MAX_C VERT_MAX_KEY_FRAME_COUNT\n#else\n#define MAX_C FRAG_MAX_KEY_FRAME_COUNT\n#endif\nmat4 cubicBezierMatrix=mat4(1.0,-3.0,3.0,-1.0,0.0,3.0,-6.0,3.0,0.0,0.0,3.0,-3.0,0.0,0.0,0.0,1.0);float cubicBezier(float t,float y1,float y2,float y3,float y4){vec4 tVec=vec4(1.0,t,t*t,t*t*t);vec4 yVec=vec4(y1,y2,y3,y4);vec4 result=tVec*cubicBezierMatrix*yVec;return result.x+result.y+result.z+result.w;}float binarySearchT(float x,float x1,float x2,float x3,float x4){float left=0.0;float right=1.0;float mid=0.0;float computedX;for(int i=0;i<8;i++){mid=(left+right)*0.5;computedX=cubicBezier(mid,x1,x2,x3,x4);if(abs(computedX-x)<0.0001){break;}else if(computedX>x){right=mid;}else{left=mid;}}return mid;}float valueFromBezierCurveFrames(float time,float frameStart,float frameCount){int start=int(frameStart);int count=int(frameCount-1.);for(int i=0;i<ITR_END;i+=2){if(i>=count){break;}vec4 k0=lookup_curve(i+start);vec4 k1=lookup_curve(i+1+start);if(i==0&&time<k0.x){return k0.y;}if(i==int(frameCount-2.)&&time>=k1.x){return k1.y;}if(time>=k0.x&&time<=k1.x){float t=(time-k0.x)/(k1.x-k0.x);float nt=binarySearchT(time,k0.x,k0.z,k1.z,k1.x);return cubicBezier(nt,k0.y,k0.w,k1.w,k1.y);}}}float evaluteLineSeg(float t,vec2 p0,vec2 p1){return p0.y+(p1.y-p0.y)*(t-p0.x)/(p1.x-p0.x);}float valueFromLineSegs(float time,float frameStart,float frameCount){int start=int(frameStart);int count=int(frameCount-1.);int end=start+count;for(int i=0;i<ITR_END;i++){if(i>count){return lookup_curve(i).w;}vec4 seg=lookup_curve(i+start);vec2 p0=seg.xy;vec2 p1=seg.zw;if(time>=p0.x&&time<=p1.x){return evaluteLineSeg(time,p0,p1);}vec2 p2=lookup_curve(i+start+1).xy;if(time>p1.x&&time<=p2.x){return evaluteLineSeg(time,p1,p2);}}return lookup_curve(0).y;}float getValueFromTime(float time,vec4 value){float type=value.x;if(type==0.){return value.y;}if(type==1.){return mix(value.y,value.z,time/value.w);}if(type==3.){return valueFromLineSegs(time,value.y,value.z);}if(type==4.){return mix(value.y,value.z,aSeed);}if(type==5.){return valueFromBezierCurveFrames(time,value.z,value.w);}return 0.;}",t.valueDefine="#ifdef SHADER_VERTEX\n#define CURVE_VALUE_TEXTURE uVCurveValueTexture\n#define CURVE_VALUE_ARRAY uVCurveValues\n#define CURVE_VALUE_COUNT VERT_CURVE_VALUE_COUNT\n#define FRAG_CURVE_VALUE_COUNT 0\n#else\n#define CURVE_VALUE_TEXTURE uFCurveValueTexture\n#define CURVE_VALUE_ARRAY uFCurveValues\n#define CURVE_VALUE_COUNT FRAG_CURVE_VALUE_COUNT\n#define VERT_CURVE_VALUE_COUNT 0\n#endif\n#if CURVE_VALUE_COUNT > 0\n#if LOOKUP_TEXTURE_CURVE\nuniform sampler2D CURVE_VALUE_TEXTURE;const float uCurveCount=1./float(CURVE_VALUE_COUNT);\n#define lookup_curve(i) texture2D(CURVE_VALUE_TEXTURE,vec2(float(i) * uCurveCount,0.))\n#else\nuniform vec4 CURVE_VALUE_ARRAY[CURVE_VALUE_COUNT];\n#define lookup_curve(i) CURVE_VALUE_ARRAY[i]\n#endif\n#else\n#define lookup_curve(i) vec4(0.)\n#endif\n#ifdef WEBGL2\n#define ITR_END (count + 1)\n#else\n#define ITR_END MAX_C\n#endif\n",t.vecAssign=oe,t.vecFill=ne,t.vecMulCombine=se,t.vecNormalize=ae,t.version=ic,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
21
21
|
//# sourceMappingURL=index.min.js.map
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Description: Galacean Effects runtime threejs plugin for the web
|
|
4
4
|
* Author: Ant Group CO., Ltd.
|
|
5
5
|
* Contributors: 燃然,飂兮,十弦,云垣,茂安,意绮
|
|
6
|
-
* Version: v1.6.
|
|
6
|
+
* Version: v1.6.10
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import * as THREE from 'three';
|
|
@@ -27500,7 +27500,7 @@ Geometry.create = function (engine, options) {
|
|
|
27500
27500
|
Mesh.create = function (engine, props) {
|
|
27501
27501
|
return new ThreeMesh(engine, props);
|
|
27502
27502
|
};
|
|
27503
|
-
var version = "1.6.
|
|
27503
|
+
var version = "1.6.10";
|
|
27504
27504
|
logger.info('THREEJS plugin version: ' + version);
|
|
27505
27505
|
|
|
27506
27506
|
export { AbstractPlugin, AssetManager, BYTES_TYPE_MAP, BezierCurve, BezierCurvePath, COMPRESSED_TEXTURE, CONSTANT_MAP_BLEND, CONSTANT_MAP_DEPTH, CONSTANT_MAP_STENCIL_FUNC, CONSTANT_MAP_STENCIL_OP, COPY_FRAGMENT_SHADER, COPY_MESH_SHADER_ID, COPY_VERTEX_SHADER, CalculateItem, CalculateLoader, CalculateVFXItem, Camera, CameraController, CameraVFXItem, CameraVFXItemLoader, Composition, CompositionSourceManager, DEFAULT_FONTS, DestroyOptions, Downloader, EFFECTS_COPY_MESH_NAME, EVENT_TYPE_CLICK, EVENT_TYPE_TOUCH_END, EVENT_TYPE_TOUCH_MOVE, EVENT_TYPE_TOUCH_START, Engine, EventSystem, FILTER_NAME_NONE, FilterMode, FilterSpriteVFXItem, Float16ArrayWrapper, FrameBuffer, GLSLVersion, GPUCapability, Geometry, GlobalUniforms, GradientValue, HELP_LINK, HitTestType, InteractBehavior$1 as InteractBehavior, InteractItem, InteractLoader, InteractMesh, InteractVFXItem, Item, KTXTexture, LineSegments, LinearValue, Material, MaterialDataBlock, MaterialRenderType, Mesh, OrderType, PLAYER_OPTIONS_ENV_EDITOR, POST_PROCESS_SETTINGS, ParticleLoader, ParticleMesh, ParticleSystem, ParticleVFXItem, PassTextureCache, PluginSystem, QCanvasViewer, QText, QTextWrapMode, RENDER_PASS_NAME_PREFIX, RENDER_PREFER_LOOKUP_TEXTURE, RUNTIME_ENV, RandomSetValue, RandomValue, RandomVectorValue, RenderBuffer, RenderFrame, RenderPass, RenderPassAttachmentStorageType, RenderPassDestroyAttachmentType, RenderPassPriorityNormal, RenderPassPriorityPostprocess, RenderPassPriorityPrepare, RenderTargetHandle, RenderTextureFormat, Renderer, SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_0, SEMANTIC_MAIN_PRE_COLOR_ATTACHMENT_SIZE_0, SEMANTIC_PRE_COLOR_ATTACHMENT_0, SEMANTIC_PRE_COLOR_ATTACHMENT_SIZE_0, SPRITE_VERTEX_STRIDE, SemanticMap, Shader, ShaderCompileResultStatus, ShaderType, SpriteItem, SpriteLoader, SpriteMesh, SpriteVFXItem, StaticValue, TEMPLATE_USE_OFFSCREEN_CANVAS, TEXTURE_UNIFORM_MAP, TextItem, TextLoader, TextMesh, TextVFXItem, Texture, TextureFactory, TextureLoadAction, TextureSourceType, TextureStoreAction, ThreeComposition, ThreeDisplayObject, ThreeMaterial, ThreeTexture, Ticker, TimelineComponent, Transform, VFXItem, ValueGetter, addByOrder, addItem, addItemWithOrder, alphaFrameFrag, alphaMaskFrag, assertExist, asserts, blend, bloomMixVert, bloomThresholdVert, calculateTranslation, cameraMove_frag as cameraMoveFrag, cameraMoveVert, canvasPool, colorGradingFrag, colorStopsFromGradient, colorToArr$1 as colorToArr, combineImageTemplate, combineImageTemplate1, combineImageTemplate1Async, combineImageTemplate2, combineImageTemplate2Async, combineImageTemplateAsync, compatible_frag as compatibleFrag, compatible_vert as compatibleVert, convertAnchor, copyFrag, createCopyShader, createFilter, createFilterShaders, createGLContext, createKeyFrameMeta, createShaderWithMarcos, createShape, createVFXItem, createValueGetter, decimalEqual, deepClone, defaultGlobalVolume, defaultPlugins, delayFrag, deserializeMipmapTexture, distortionFrag, distortionVert, earcut, enlargeBuffer, ensureVec3, filters, findPreviousRenderPass, gaussianDown_frag as gaussianDownFrag, gaussianDownHFrag, gaussianDownVFrag, gaussianUpFrag, generateEmptyTypedArray, generateHalfFloatTexture, getBackgroundImage, getColorFromGradientStops, getConfig, getDefaultTemplateCanvasPool, getDefaultTextureFactory, getGeometryByShape, getGeometryTriangles, getImageItemRenderInfo, getKTXTextureOptions, getKeyFrameMetaByRawValue, getParticleMeshShader, getPixelRatio, getPreMultiAlpha, getStandardComposition, getStandardImage, getStandardItem, getStandardJSON, getTextureSize, glContext, gpuTimer, imageDataFromColor, imageDataFromGradient, initErrors, initGLContext, integrate, interpolateColor, isAlipayMiniApp, isAndroid, isArray, isFunction, isIOS, isObject, isScene, isSimulatorCellPhone, isString, isUniformStruct, isUniformStructArray, isValidFontFamily, isWebGL2, itemFrag, itemFrameFrag, itemVert, loadBinary, loadBlob, loadImage, loadMedia, loadVideo, loadWebPOptional, logger, index as math, maxSpriteMeshItemCount, maxSpriteTextureCount, modifyMaxKeyframeShader, nearestPowerOfTwo, noop, numberToFix, parsePercent$1 as parsePercent, particleFrag, particleOriginTranslateMap, particleUniformTypeMap, particleVert, pluginLoaderMap, pointOnLine, random, registerFilter, registerFilters, registerPlugin, removeItem, requestAsync, rotateVec2, screenMeshVert, setBlendMode, setConfig, setDefaultTextureFactory, setMaskMode, setMaxSpriteMeshItemCount, setRayFromCamera, setSideMode, setSpriteMeshMaxFragmentTextures, setSpriteMeshMaxItemCountByGPU, setUniformValue, sortByOrder, index$1 as spec, spriteMeshShaderFromFilter, spriteMeshShaderFromRenderInfo, spriteMeshShaderIdFromRenderInfo, thresholdFrag, throwDestroyedError, trailVert, translatePoint, trianglesFromRect, unregisterPlugin, valIfUndefined, value, valueDefine, vecAssign, vecFill, vecMulCombine, vecNormalize, version };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/effects-threejs",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.10",
|
|
4
4
|
"description": "Galacean Effects runtime threejs plugin for the web",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"registry": "https://registry.npmjs.org"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@galacean/effects-core": "1.6.
|
|
46
|
+
"@galacean/effects-core": "1.6.10"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"three": "^0.149.0",
|