blockbench/lib/wintersky.umd.js
2023-04-13 18:48:34 +02:00

2 lines
62 KiB
JavaScript

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("three"),require("molangjs"),require("tinycolor2")):"function"==typeof define&&define.amd?define(["three","molangjs","tinycolor2"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).Wintersky=t(e.THREE,e.Molang,e.tinycolor)}(this,(function(e,t,i){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=a(t),s=a(i),o={};o.Scene=class{constructor(t={}){this.emitters=[],this.space=new e.Object3D,this._fetchTexture=t.fetchTexture,this.global_options={max_emitter_particles:t.max_emitter_particles||3e4,tick_rate:t.tick_rate||30,loop_mode:t.loop_mode||"auto",parent_mode:t.parent_mode||"world",ground_collision:0!=t.ground_collision,_scale:1},Object.defineProperty(this.global_options,"scale",{get:()=>this.global_options._scale,set:e=>{this.global_options._scale=e,this.emitters.forEach((t=>{t.local_space.scale.set(e,e,e),t.global_space.scale.set(e,e,e)}))}})}fetchTexture(e){if("function"==typeof this._fetchTexture)return this._fetchTexture(e)}updateFacingRotation(e){this.emitters.forEach((t=>{t.updateFacingRotation(e)}))}};const n="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QcKDTg2HKzkwgAAAFBJREFUOMtjvHDhwn8GCgALAwMDg4iICFma37x5w8DEQCEg2gBpaWkGaWlp8g2g2AVDyABcgTUwXiDGNQMfiCzoAk+fPiXIpr4L3rx5Q7YBAOhLE0zw8k9cAAAAAElFTkSuQmCC";function l(e){if("string"==typeof e&&"#"==e[0])e.length<9&&(e="#ff"+e.substr(1,6));else{if(e instanceof Array)return new s.default({r:255*(e[0]||0),g:255*(e[1]||0),b:255*(e[2]||0),a:"number"==typeof e[3]?e[3]:1}).toHex8String();e=new s.default(e).toHex8String()}return"#"+e.substr(3,6)+e.substr(1,2)}class c{constructor(t,i,a=0){this.scene=t,this.texture=new e.Texture(new Image),this.texture.image.onload=()=>{this.texture.needsUpdate=!0,"function"==typeof this.onTextureUpdate&&this.onTextureUpdate()},this.reset(),this.onTextureUpdate=null,a.path&&this.set("file_path",a.path),i&&i.particle_effect?this.setFromJSON(i):"object"==typeof i&&Object.assign(this,i)}reset(){for(var t in this.texture.image.src=n,this.texture.magFilter=e.NearestFilter,this.texture.minFilter=e.NearestFilter,c.types){var i,a=c.types[t];switch(a.type){case"string":case"molang":i="";break;case"number":i=0;break;case"boolean":i=!1;break;case"color":i="#ffffff";break;case"object":i={}}if(a.array){if(this[t]=[],a.dimensions)for(var r=0;r<a.dimensions;r++)"object"==a.type&&(i={}),this[t].push(i)}else this[t]=i}return this.emitter_rate_mode="steady",this.emitter_lifetime_mode="looping",this.emitter_shape_mode="point",this.particle_appearance_material="particles_alpha",this.particle_appearance_facing_camera_mode="rotate_xyz",this.particle_appearance_direction_mode="derive_from_velocity",this.particle_appearance_speed_threshold=.01,this.particle_direction_mode="outwards",this.particle_motion_mode="dynamic",this.particle_rotation_mode="dynamic",this.particle_texture_mode="static",this.particle_color_mode="static",this.particle_color_interpolant="v.particle_age / v.particle_lifetime",this.particle_color_range=1,this.emitter_rate_rate="4",this.emitter_rate_amount="1",this.emitter_rate_maximum="100",this.emitter_lifetime_active_time="1",this.particle_appearance_size=["0.2","0.2"],this.particle_lifetime_max_lifetime="1",this.particle_texture_size=[16,16],this}set(e,t){if(null!=c.types[e]&&null!=t&&null!=t)return c.types[e].array&&t instanceof Array?("molang"==c.types[e].type&&(t=t.map((e=>e.toString()))),this[e].splice(0,1/0,...t)):"string"==typeof this[e]?this[e]=t.toString():"number"==c.types[e].type&&"number"==typeof t?this[e]=t:"boolean"==c.types[e].type&&(this[e]=!!t),this}setFromJSON(e){var t=e.particle_effect.components,i=e.particle_effect.curves,a=e.particle_effect.description;if(a&&a.identifier&&(this.identifier=a.identifier),a&&a.basic_render_parameters&&(this.set("particle_texture_path",a.basic_render_parameters.texture),this.set("particle_appearance_material",a.basic_render_parameters.material)),i)for(var r in i){var o=i[r],n={id:r,mode:o.type,input:(o.input||0).toString(),range:(o.horizontal_range||0).toString(),nodes:[]};if(o.nodes instanceof Array&&o.nodes.length)o.nodes.forEach((e=>{let t=parseFloat(e)||0;n.nodes.push(t)}));else if("object"==typeof o.nodes&&"bezier_chain"==o.type)for(let e in o.nodes){let t=o.nodes[e],i={time:parseFloat(e),left_value:parseFloat(t.left_value||t.value)||0,right_value:parseFloat(t.right_value||t.value)||0,left_slope:parseFloat(t.left_slope||t.slope)||0,right_slope:parseFloat(t.right_slope||t.slope)||0};n.nodes.push(i)}this.curves[r]=n}if(t){function c(e){return t["minecraft:"+e]}if(c("emitter_initialization")){var p=c("emitter_initialization").creation_expression,h=c("emitter_initialization").per_update_expression;"string"==typeof p&&(this.variables_creation_vars=p.replace(/;+$/,"").split(";")),"string"==typeof h&&(this.variables_tick_vars=h.replace(/;+$/,"").split(";"))}c("emitter_local_space")&&(this.space_local_position=c("emitter_local_space").position,this.space_local_rotation=c("emitter_local_space").rotation,this.space_local_velocity=c("emitter_local_space").velocity),c("emitter_rate_steady")&&(this.set("emitter_rate_mode","steady"),this.set("emitter_rate_rate",c("emitter_rate_steady").spawn_rate),this.set("emitter_rate_maximum",c("emitter_rate_steady").max_particles)),c("emitter_rate_instant")&&(this.set("emitter_rate_mode","instant"),this.set("emitter_rate_amount",c("emitter_rate_instant").num_particles)),c("emitter_lifetime_once")&&(this.set("emitter_lifetime_mode","once"),this.set("emitter_lifetime_active_time",c("emitter_lifetime_once").active_time)),c("emitter_lifetime_looping")&&(this.set("emitter_lifetime_mode","looping"),this.set("emitter_lifetime_active_time",c("emitter_lifetime_looping").active_time),this.set("emitter_lifetime_sleep_time",c("emitter_lifetime_looping").sleep_time)),c("emitter_lifetime_expression")&&(this.set("emitter_lifetime_mode","expression"),this.set("emitter_lifetime_activation",c("emitter_lifetime_expression").activation_expression),this.set("emitter_lifetime_expiration",c("emitter_lifetime_expression").expiration_expression));var m,_=c("emitter_shape_point")||c("emitter_shape_custom");if(_&&(this.set("emitter_shape_mode","point"),this.set("emitter_shape_offset",_.offset)),c("emitter_shape_sphere")&&(_=c("emitter_shape_sphere"),this.set("emitter_shape_mode","sphere"),this.set("emitter_shape_offset",_.offset),this.set("emitter_shape_radius",_.radius),this.set("emitter_shape_surface_only",_.surface_only)),c("emitter_shape_box")&&(_=c("emitter_shape_box"),this.set("emitter_shape_mode","box"),this.set("emitter_shape_offset",_.offset),this.set("emitter_shape_half_dimensions",_.half_dimensions),this.set("emitter_shape_surface_only",_.surface_only)),c("emitter_shape_disc")){switch(_=c("emitter_shape_disc"),this.set("emitter_shape_mode","disc"),this.set("emitter_shape_offset",_.offset),_.plane_normal){case"x":this.set("emitter_shape_plane_normal",[1,0,0]);break;case"y":this.set("emitter_shape_plane_normal",[0,1,0]);break;case"z":this.set("emitter_shape_plane_normal",[0,0,1]);break;default:this.set("emitter_shape_plane_normal",_.plane_normal)}this.set("emitter_shape_radius",_.radius),this.set("emitter_shape_surface_only",_.surface_only)}if(c("emitter_shape_entity_aabb")&&(this.set("emitter_shape_mode","entity_aabb"),this.set("emitter_shape_surface_only",c("emitter_shape_entity_aabb").surface_only),_=c("emitter_shape_entity_aabb")),_&&_.direction&&("inwards"==_.direction||"outwards"==_.direction?this.set("particle_direction_mode",_.direction):(this.set("particle_direction_mode","direction"),this.set("particle_direction_direction",_.direction))),c("particle_initialization")){h=c("particle_initialization").per_update_expression;var d=c("particle_initialization").per_render_expression;"string"==typeof h&&(this.particle_update_expression=h.replace(/;+$/,"").split(";")),"string"==typeof d&&(this.particle_render_expression=d.replace(/;+$/,"").split(";"))}if(c("particle_initial_spin")&&(this.set("particle_rotation_initial_rotation",c("particle_initial_spin").rotation),this.set("particle_rotation_rotation_rate",c("particle_initial_spin").rotation_rate)),c("particle_kill_plane")&&this.set("particle_lifetime_kill_plane",c("particle_kill_plane")),c("particle_motion_dynamic")){let e=c("particle_motion_dynamic").linear_acceleration,t=c("particle_motion_dynamic").linear_drag_coefficient,i=c("particle_motion_dynamic").rotation_acceleration,a=c("particle_motion_dynamic").rotation_drag_coefficient;null==e&&null==t||(this.set("particle_motion_mode","dynamic"),this.set("particle_motion_linear_acceleration",e),this.set("particle_motion_linear_drag_coefficient",t),this.set("particle_motion_linear_speed",1)),null==e&&null==t||(this.set("particle_rotation_mode","dynamic"),this.set("particle_rotation_rotation_acceleration",i),this.set("particle_rotation_rotation_drag_coefficient",a))}else this.set("particle_motion_mode","static");if(c("particle_motion_parametric")){let e=c("particle_motion_parametric").relative_position,t=c("particle_motion_parametric").direction,i=c("particle_motion_parametric").rotation;null==e&&null==t||(this.set("particle_motion_mode","parametric"),this.set("particle_motion_relative_position",e),this.set("particle_motion_direction",t)),null!=i&&(this.set("particle_rotation_mode","parametric"),this.set("particle_rotation_rotation",i))}if(c("particle_motion_collision")&&(this.set("particle_collision_enabled",c("particle_motion_collision").enabled),this.set("particle_collision_collision_drag",c("particle_motion_collision").collision_drag),this.set("particle_collision_coefficient_of_restitution",c("particle_motion_collision").coefficient_of_restitution),this.set("particle_collision_collision_radius",c("particle_motion_collision").collision_radius),this.set("particle_collision_expire_on_contact",c("particle_motion_collision").expire_on_contact)),void 0!==c("particle_initial_speed"))"object"!=typeof(m=c("particle_initial_speed"))?this.set("particle_motion_linear_speed",m):(this.set("particle_direction_mode","direction"),this.set("particle_direction_direction",c("particle_initial_speed")),this.set("particle_motion_linear_speed",1));if(c("particle_lifetime_expression")&&(this.set("particle_lifetime_max_lifetime",c("particle_lifetime_expression").max_lifetime||""),this.set("particle_lifetime_expiration_expression",c("particle_lifetime_expression").expiration_expression||0)),c("particle_expire_if_in_blocks")instanceof Array&&this.set("particle_lifetime_expire_in",c("particle_expire_if_in_blocks")),c("particle_expire_if_not_in_blocks")instanceof Array&&this.set("particle_lifetime_expire_outside",c("particle_expire_if_not_in_blocks")),c("particle_appearance_billboard")){this.set("particle_appearance_size",c("particle_appearance_billboard").size),this.set("particle_appearance_facing_camera_mode",c("particle_appearance_billboard").facing_camera_mode);var{direction:f,uv:g}=c("particle_appearance_billboard");f&&(this.set("particle_appearance_direction_mode",f.mode),this.set("particle_appearance_speed_threshold",f.min_speed_threshold),this.set("particle_appearance_direction",f.custom_direction)),g&&(g.texture_width&&this.set("particle_texture_size",[g.texture_width,g.texture_height]),g.flipbook?(this.set("particle_texture_mode","animated"),this.set("particle_texture_uv",g.flipbook.base_UV),this.set("particle_texture_uv_size",g.flipbook.size_UV),this.set("particle_texture_uv_step",g.flipbook.step_UV),this.set("particle_texture_frames_per_second",g.flipbook.frames_per_second),this.set("particle_texture_max_frame",g.flipbook.max_frame),this.set("particle_texture_stretch_to_lifetime",g.flipbook.stretch_to_lifetime),this.set("particle_texture_loop",g.flipbook.loop)):(this.set("particle_texture_mode","static"),this.set("particle_texture_uv",g.uv),this.set("particle_texture_uv_size",g.uv_size)))}if(c("particle_appearance_lighting")&&this.set("particle_color_light",!0),c("particle_appearance_tinting"))if("string"==typeof(m=c("particle_appearance_tinting").color))this.set("particle_color_static",l(m));else if(m instanceof Array&&m.length>=3)if((typeof m[0]+typeof m[1]+typeof m[2]+typeof m[3]).includes("string"))this.set("particle_color_mode","expression"),this.set("particle_color_expression",m);else{this.set("particle_color_mode","static");var u=new s.default({r:255*m[0],g:255*m[1],b:255*m[2],a:m[3]}).toHex8String();this.set("particle_color_static",u)}else if("object"==typeof m){this.set("particle_color_mode","gradient"),this.set("particle_color_interpolant",m.interpolant);let e=[];if(m.gradient instanceof Array){let t=100/(m.gradient.length-1);m.gradient.forEach(((i,a)=>{i=l(i);var r=t*a;e.push({percent:r,color:i})}))}else if("object"==typeof m.gradient){let t=0;for(var A in m.gradient)t=Math.max(parseFloat(A),t);for(var A in this.set("particle_color_range",t),m.gradient){u=l(m.gradient[A]);var y=parseFloat(A)/t*100;e.push({color:u,percent:y})}}this.set("particle_color_gradient",e)}}return this.updateTexture(),this}updateTexture(){let e=e=>{if(!e)switch(this.particle_texture_path){case"textures/particle/particles":e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IB2cksfwAAAAlwSFlzAAALEwAACxMBAJqcGAAAD4RJREFUeJztXQuMXUUZ3sqrSB9bLLRUHgsUhJZHoUJUQCqI+OBRfOGzbq1KrYgFUdJiYtGqQZClxWCoEcQQUAE3samoxGygvjCmLTSNFVOrhgix6BqgGgr29//u+f/duXNn5sw597F7750v+XLvPXNmzuP7/n/mzDlnt6eni0CMsd6HhCbDJbK5jAy0ds8SRuA7+bq8TLkpapnyhAjknbhGlIfWKSqy3Z6rPLQ/XYlWilikPCRcnrBJ+HECV1T6ykMRXrTcFj+ZoIloRAYJLY8td2UB+zOZoMMQEtTuBlq3Vx2GC5f9Pp28bsTMtybhux4p+rsUtvApG3QpUgboYqj4Kfo7FCGBUWYuL5MJ8gwU22a99RNCODN8EnHy68oAOe3rNprVdkKbg4gOYE5iHsScwpwqnCLLJxo8YKz3t+1w9AYipat869atBK5Zs8ZZvmHDBlIW2S6L9QrhPsJ9mfsJDxTBJ4nQvcxpHvYaZjhI6k4U4+xvtF/ZXplz1LGwRXeZYOucOQTeOH16TZktehETGOLva4i/v4g4WUSFwNOZhzJnMA+zOEN4iKw7VeqqEdQE+6oJipyfjoaK/RyfleeMefLr/lhtAo1+OwOo2Hv27CFQlz/xxBNRJnCIf6AR8So8xH018whmH/MY5nHCY2XZkbLOTMMImhHUBLqdfeo5Zx0F0wDmctsAAm/0m+IDJQxgi3+wRDxEPUrEnsM8iTmPOV94OvNk5lzm8cyjmYeLaaZLNrBNkAyg8PX5RQ1go4ABzLQ/Sfry6ZLaVfi5IvbrmGcxFzDfLHwT8xwpe62Y4TVihFlGNqgyQcy+dQ1sEzjEJ+uzCrYJYsWvNFjd50+1xD+ReRrz9czzmBcxFzLfy3yf8HLmO5kXMy8Qg8yXbHGMYYJe0wSx+9c1gOhKzyrU4zEAAN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6ZbZRZNy8D1Zuh8vavawzQrPXL1mkUYgRKBugJH2BeBLq++9aJ3Z8i69eTAfLW73gDJHQ3/g+jo09H5lJXBwAAAABJRU5ErkJggg==";break;case"textures/flame_atlas":case"textures/particle/flame_atlas":e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAIACAYAAACLuuzTAAAphElEQVR42u3dB7RlVZUu4EMVoUCigIqAZFBybBAapSU1oii0NNqNoG0b29buNiuIICVBcs65iCI556DknHMoMlSRKhF372+uvc45t+7ap6qe743n6/H2GHvce6vOnnuFOf/5z7nmWqdTVVXnL7k7fz0C9pin0znhE53Osct0Oscs3emctnqnc9bfdjrnbNCpTluj0/nD2p3O2et3Osct2+n8ft7OcAH7zt/pnLhCEnD0UrWA+qFzPt2pzv27TnXmJ9PD532mU51aC95n/oKAQxbudE5fMwk5Yfn09vM36lQXfbZTXbZlp7pym5mqSz7Xqcas1NICb71os07lwTPX7XTu3mVUdeeOs1W3/WyW6k/fHFHd+L2R1Z+/PaI6eeVOdHeYgCOX6HSu+vJM8abrvj6ienLMotVLV61fPXniwtXtP5+1uvXHtaB/HVGdvlans/+HCgIM4P17fqC65T9mrm74zsjqkcPmr164ZM3quQtWru7b/QPVg/vPUz17zieqsz/V6RxQEmDAnjp50Wi25t7z29mjFa/e/pXq8WM/Uj165ILVA/vMVV27/UwxK8ME3PmrWSvXkyctUt29y+zVs+euUD134Srxb+9OvLcW/rFolfE4/uMFAXf8ctbqjQe+Xz1/4arVwwfPF/ebj/yseuXPm1VPn7Z4dd8eH6hu/dHMMRaXbOGRqQRcsfVM1RPHLVQ9fNB81U3fH1lNefn06o0Hf1hNePRX1S3/OXPlBXf9erYYyD+uW2jBDd8ZEc196er1q7t3HhW/v3rbP1YP7D1X1X89csgHqyMW65RtQZ89fOcOs3UfmPTMQdU7b95Yt+Y/qtfv+df8z+3GZJT13/X0GUvGYF7+D53qoQPmqa7/lxFVqzHtNFunc+TiyQ4YE5s4frlatWu1HlNr3ymr1feq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QBumhVBLHh3c4YeuKnNzngTPkGuF8Bevm3P7fd+O7ExuMDFPai/rwRraO6akLnayewFfULiXjqn9cn1VpFD84lOSYAAAAASUVORK5CYII=";break;case"textures/particle/campfire_smoke":e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAADACAYAAAANzeNOAAAClklEQVRo3u2Z624UMQyF91URgoqi3ujSG70tqgCB4JWDXOlUpx47dmbUVav1j6NMMj6fnZ0ks9uuWmurJVoVIAZcnx23WQAxRmYXALPWYsDnj+9aCiCBIpjQpgEMYaWnoE2eOayglnIBFgHuLr801hBAmyPQs87hp/etB7AgLsCDyXh3ChLAYhjGwg8xazYBvI11NXUe7B5g823doGEAmyOQaZR3YRYyMR/tf3AhGDMBYoS87IC4UxCzBKC1siOJC+hVgjEXwBAvM5vdx8iBuqqhlRiZaze++Ha+PmuiWQCYtRYDLNCwuQvImDVk8jVfbp4c7LlGxJgAMUIIRMtgaUMAmwEUsdkEMAgGQKDuU+BAS6l1wMGesbbztgDyPni4u3hSGsAmiGFdgGXWkNkAazpDZmsaT+b10X7KjDgTwBmsa5ilNQEcoCG4D5kAngoqEmmzCeAqPHEi9zHqYC9zuJS9jHUebBPwc3PVtIZ/cLAZ/RBgZe5VMmxOA/QUMHZ+cvAMMjGzUYJ1H+0EgGAE4dqTOQXc0MEa1n0KvYza3F0HvbJrN74pwO/vNw1KA2DAWymCuBk9uYDIyNXMAoguTg8fZQLkBmdCX1oZg9kF4CDVZgh/+ugCEKCNXnZ3HSBQt7WZCjAL8OfhtkFDADHgQIkg3awA4frq63FLAXTmXhUTgGTh7LqfAmgBlJoCIBo2ex1EZ0LthQK8PODvj/sGDQHEIBuIATfnp7mlzCYNSm1nyaSzowKrCnMKCGal/kkDM1fC/VqJBdhFwO3luv37tXnU8DcUNuN6GCCSzICkv+JoCDRUQXQG1EIqwK4AsAewiYbPAz4TeuYUoHcWhJ9BZK51UIACbAuAA2X47WxBFlVQj/G1A/4D2cRpqoNd7bwAAAAASUVORK5CYII=";break;default:e=n}this.texture.image.src=e};if("function"==typeof this.scene.fetchTexture){let t=this.scene.fetchTexture(this);t instanceof Promise?t.then((t=>{e(t)})):e(t)}else e();return this}}c.types={identifier:{type:"string"},file_path:{type:"string"},curves:{type:"object"},space_local_position:{type:"boolean"},space_local_rotation:{type:"boolean"},space_local_velocity:{type:"boolean"},variables_creation_vars:{type:"string",array:!0},variables_tick_vars:{type:"string",array:!0},emitter_rate_mode:{type:"string"},emitter_rate_rate:{type:"molang"},emitter_rate_amount:{type:"molang"},emitter_rate_maximum:{type:"molang"},emitter_lifetime_mode:{type:"string"},emitter_lifetime_active_time:{type:"molang"},emitter_lifetime_sleep_time:{type:"molang"},emitter_lifetime_activation:{type:"molang"},emitter_lifetime_expiration:{type:"molang"},emitter_shape_mode:{type:"string"},emitter_shape_offset:{type:"molang",array:!0,dimensions:3},emitter_shape_radius:{type:"molang"},emitter_shape_half_dimensions:{type:"molang",array:!0,dimensions:3},emitter_shape_plane_normal:{type:"molang",array:!0,dimensions:3},emitter_shape_surface_only:{type:"boolean"},particle_appearance_size:{type:"molang",array:!0,dimensions:2},particle_appearance_material:{type:"string"},particle_appearance_facing_camera_mode:{type:"string"},particle_appearance_direction_mode:{type:"string"},particle_appearance_speed_threshold:{type:"number"},particle_appearance_direction:{type:"molang",array:!0,dimensions:3},particle_update_expression:{type:"string",array:!0},particle_render_expression:{type:"string",array:!0},particle_direction_mode:{type:"string"},particle_direction_direction:{type:"molang",array:!0,dimensions:3},particle_motion_mode:{type:"string"},particle_motion_linear_speed:{type:"molang"},particle_motion_linear_acceleration:{type:"molang",array:!0,dimensions:3},particle_motion_linear_drag_coefficient:{type:"molang"},particle_motion_relative_position:{type:"molang",array:!0,dimensions:3},particle_motion_direction:{type:"molang",array:!0,dimensions:3},particle_rotation_mode:{type:"string"},particle_rotation_initial_rotation:{type:"molang"},particle_rotation_rotation_rate:{type:"molang"},particle_rotation_rotation_acceleration:{type:"molang"},particle_rotation_rotation_drag_coefficient:{type:"molang"},particle_rotation_rotation:{type:"molang"},particle_lifetime_max_lifetime:{type:"molang"},particle_lifetime_kill_plane:{type:"number",array:!0,dimensions:4},particle_lifetime_expiration_expression:{type:"molang"},particle_lifetime_expire_in:{type:"string",array:!0},particle_lifetime_expire_outside:{type:"string",array:!0},particle_texture_size:{type:"number",array:!0,dimensions:2},particle_texture_height:{type:"number"},particle_texture_path:{type:"string"},particle_texture_mode:{type:"string"},particle_texture_uv:{type:"molang",array:!0,dimensions:2},particle_texture_uv_size:{type:"molang",array:!0,dimensions:2},particle_texture_uv_step:{type:"molang",array:!0,dimensions:2},particle_texture_frames_per_second:{type:"number"},particle_texture_max_frame:{type:"molang"},particle_texture_stretch_to_lifetime:{type:"boolean"},particle_texture_loop:{type:"boolean"},particle_color_mode:{type:"string"},particle_color_static:{type:"color"},particle_color_interpolant:{type:"molang"},particle_color_range:{type:"number"},particle_color_gradient:{type:"object",array:!0},particle_color_expression:{type:"molang",array:!0,dimensions:4},particle_color_light:{type:"boolean"},particle_collision_enabled:{type:"molang"},particle_collision_collision_drag:{type:"number"},particle_collision_coefficient_of_restitution:{type:"number"},particle_collision_collision_radius:{type:"number"},particle_collision_expire_on_contact:{type:"boolean"}},o.Config=c;const p={roundTo(e,t){var i=Math.pow(10,t);return Math.round(e*i)/i},randomab:(e,t)=>e+Math.random()*(t-e),radToDeg:e=>e/Math.PI*180,degToRad:e=>Math.PI/(180/e),clamp:(e,t,i)=>(e>i&&(e=i),(e<t||isNaN(e))&&(e=t),e),roundTo(e,t){var i=Math.pow(10,t);return Math.round(e*i)/i},getRandomEuler:()=>new e.Euler(p.randomab(-Math.PI,Math.PI),p.randomab(-Math.PI,Math.PI),p.randomab(-Math.PI,Math.PI))},h={x:new e.Vector3(1,0,0),y:new e.Vector3(0,1,0),z:new e.Vector3(0,0,1),n:new e.Vector3(0,0,0)};function m(e,t){let i=e.indexOf(t);i>=0&&e.splice(i,1)}const _={r:255,r:255,b:255,a:1},d=(new e.Plane).setComponents(0,1,0,0);class f{constructor(t){this.emitter=t,this.geometry=new e.PlaneBufferGeometry(2,2),this.material=this.emitter.material,this.mesh=new e.Mesh(this.geometry,this.material),this.position=this.mesh.position;let i=new Float32Array(16).fill(1);this.geometry.setAttribute("clr",new e.BufferAttribute(i,4)),this.speed=new e.Vector3,this.acceleration=new e.Vector3,this.facing_direction=new e.Vector3,this.add()}params(){var e=this.emitter.params();return e["variable.particle_lifetime"]=this.lifetime,e["variable.particle_age"]=this.age,e["variable.particle_random_1"]=this.random_vars[0],e["variable.particle_random_2"]=this.random_vars[1],e["variable.particle_random_3"]=this.random_vars[2],e["variable.particle_random_4"]=this.random_vars[3],e}add(){this.emitter.particles.includes(this)||(this.emitter.particles.push(this),this.emitter.config.space_local_position&&this.emitter.local_space.parent?this.emitter.local_space.add(this.mesh):this.emitter.global_space.add(this.mesh)),this.age=this.loop_time=0,this.current_frame=0,this.random_vars=[Math.random(),Math.random(),Math.random(),Math.random()];var t=this.params();this.position.set(0,0,0),this.lifetime=this.emitter.calculate(this.emitter.config.particle_lifetime_max_lifetime,t),this.initial_rotation=this.emitter.calculate(this.emitter.config.particle_rotation_initial_rotation,t),this.rotation_rate=this.emitter.calculate(this.emitter.config.particle_rotation_rotation_rate,t),this.rotation=0;var i=this.emitter.config.emitter_shape_surface_only;if("box"===this.emitter.config.emitter_shape_mode){var a=this.emitter.calculate(this.emitter.config.emitter_shape_half_dimensions,t);if(this.position.x=p.randomab(-a.x,a.x),this.position.y=p.randomab(-a.y,a.y),this.position.z=p.randomab(-a.z,a.z),i){var r=Math.floor(p.randomab(0,3)),s=Math.floor(p.randomab(0,2));this.position.setComponent(r,a.getComponent(r)*(s?1:-1))}}else if("entity_aabb"===this.emitter.config.emitter_shape_mode){a=new e.Vector3(.5,1,.5);if(this.position.x=p.randomab(-a.x,a.x),this.position.y=p.randomab(-a.y,a.y),this.position.z=p.randomab(-a.z,a.z),i){r=Math.floor(p.randomab(0,3)),s=Math.floor(p.randomab(0,2));this.position.setComponent(r,a.getComponent(r)*(s?1:-1))}}else if("sphere"===this.emitter.config.emitter_shape_mode){var o=this.emitter.calculate(this.emitter.config.emitter_shape_radius,t);this.position.x=i?o:o*Math.random(),this.position.applyEuler(p.getRandomEuler())}else if("disc"===this.emitter.config.emitter_shape_mode){o=this.emitter.calculate(this.emitter.config.emitter_shape_radius,t);var n=Math.random()*Math.PI*2,l=i?o:o*Math.sqrt(Math.random());this.position.x=l*Math.cos(n),this.position.z=l*Math.sin(n);var c=this.emitter.calculate(this.emitter.config.emitter_shape_plane_normal,t);if(!c.equals(h.n)){var m=(new e.Quaternion).setFromUnitVectors(h.y,c);this.position.applyQuaternion(m)}}this.speed.set(0,0,0);var _=this.emitter.config.particle_direction_mode;"inwards"==_||"outwards"==_?"point"===this.emitter.config.emitter_shape_mode?this.speed.set(1,0,0).applyEuler(p.getRandomEuler()):(this.speed.copy(this.position).normalize(),"inwards"==_&&this.speed.negate()):this.speed=this.emitter.calculate(this.emitter.config.particle_direction_direction,t).normalize();var d=this.emitter.calculate(this.emitter.config.particle_motion_linear_speed,t);if(this.speed.x*=d,this.speed.y*=d,this.speed.z*=d,this.position.add(this.emitter.calculate(this.emitter.config.emitter_shape_offset,t)),"locator"==this.emitter.parent_mode&&(this.position.x*=-1,this.position.y*=-1,this.speed.x*=-1,this.speed.y*=-1),"world"!=this.emitter.parent_mode&&this.emitter.config.space_local_position&&!this.emitter.config.space_local_rotation&&(this.speed.x*=-1,this.speed.z*=-1),"entity_aabb"===this.emitter.config.emitter_shape_mode&&(this.position.x+=1),this.emitter.local_space.parent&&("locator"==this.emitter.parent_mode&&this.speed.applyQuaternion(this.emitter.local_space.getWorldQuaternion(new e.Quaternion)),this.emitter.config.space_local_rotation||this.position.applyQuaternion(this.emitter.local_space.getWorldQuaternion(new e.Quaternion)),!this.emitter.config.space_local_position)){let t=this.emitter.local_space.getWorldPosition(new e.Vector3);this.position.addScaledVector(t,1/this.emitter.scene.global_options._scale)}return this.setFrame(0),this.tick()}tick(t){var i=this.params();let a=1/this.emitter.scene.global_options.tick_rate;for(var r of this.emitter.config.particle_render_expression)this.emitter.Molang.parse(r,i);if(this.age+=a,this.loop_time+=a,this.lifetime&&this.age>this.lifetime&&this.remove(),this.emitter.calculate(this.emitter.config.particle_lifetime_expiration_expression,i)&&this.remove(),"dynamic"===this.emitter.config.particle_motion_mode){var o=this.emitter.calculate(this.emitter.config.particle_motion_linear_drag_coefficient,i);if(this.acceleration.copy(this.emitter.calculate(this.emitter.config.particle_motion_linear_acceleration,i)),this.emitter.config.space_local_position?"locator"==this.emitter.parent_mode&&(this.acceleration.x*=-1,this.acceleration.y*=-1):"world"!=this.emitter.parent_mode&&(this.acceleration.x*=-1,this.acceleration.z*=-1),this.acceleration.addScaledVector(this.speed,-o),this.speed.addScaledVector(this.acceleration,a),this.position.addScaledVector(this.speed,a),this.emitter.config.particle_lifetime_kill_plane.find((e=>e))){var n=this.emitter.calculate(this.emitter.config.particle_lifetime_kill_plane,i),l=(new e.Vector3).copy(this.position).addScaledVector(this.speed,-a),c=(new e.Vector3).copy(this.position);this.emitter.config.space_local_position&&"locator"==this.emitter.parent_mode&&(l.x*=-1,l.y*=-1,c.x*=-1,c.y*=-1);var h=new e.Line3(l,c);if(n.intersectsLine(h))return this.remove(),this}if(this.emitter.ground_collision&&(!this.emitter.config.particle_collision_enabled&&this.emitter.config.particle_collision_collision_radius||this.emitter.calculate(this.emitter.config.particle_collision_enabled,i))){let t=this.emitter.config.particle_collision_collision_drag,i=this.emitter.config.particle_collision_coefficient_of_restitution,r=this.emitter.config.particle_collision_collision_radius,s=d,o=new e.Sphere(this.position,r),n=(new e.Vector3).copy(this.position).addScaledVector(this.speed,-a),l=new e.Line3(n,this.position),c=s.intersectsLine(l);if(c&&s.intersectLine(l,this.position),c||s.intersectsSphere(o)){if(this.emitter.config.particle_collision_expire_on_contact)return this.remove(),this;this.position.y=r*Math.sign(n.y),this.speed.reflect(s.normal),this.speed.y*=i,this.speed.x=Math.sign(this.speed.x)*p.clamp(Math.abs(this.speed.x)-t*a,0,1/0),this.speed.z=Math.sign(this.speed.z)*p.clamp(Math.abs(this.speed.z)-t*a,0,1/0)}}}else"parametric"!==this.emitter.config.particle_motion_mode||t||(this.emitter.config.particle_motion_relative_position.join("").length&&this.position.copy(this.emitter.calculate(this.emitter.config.particle_motion_relative_position,i)),this.emitter.config.particle_motion_direction.join("").length&&this.speed.copy(this.emitter.calculate(this.emitter.config.particle_motion_direction,i)),this.emitter.config.space_local_position&&"locator"==this.emitter.parent_mode&&(this.position.x*=-1,this.position.y*=-1));if("dynamic"===this.emitter.config.particle_rotation_mode){var m=this.emitter.calculate(this.emitter.config.particle_rotation_rotation_drag_coefficient,i),f=this.emitter.calculate(this.emitter.config.particle_rotation_rotation_acceleration,i);f+=-m*this.rotation_rate,this.rotation_rate+=f*a,this.rotation=p.degToRad(this.initial_rotation+this.rotation_rate*this.age)}else"parametric"===this.emitter.config.particle_rotation_mode&&(this.rotation=p.degToRad(this.emitter.calculate(this.emitter.config.particle_rotation_rotation,i)));if("direction"!=this.emitter.config.particle_appearance_facing_camera_mode.substr(0,9)&&"lookat_direction"!=this.emitter.config.particle_appearance_facing_camera_mode||("custom"==this.emitter.config.particle_appearance_direction_mode?this.facing_direction.copy(this.emitter.calculate(this.emitter.config.particle_appearance_direction,i)).normalize():this.speed.length()>=(this.emitter.config.particle_appearance_speed_threshold||.01)&&this.facing_direction.copy(this.speed).normalize()),!t){var g=this.emitter.calculate(this.emitter.config.particle_appearance_size,i);if(this.mesh.scale.x=g.x||1e-4,this.mesh.scale.y=g.y||1e-4,"animated"===this.emitter.config.particle_texture_mode){var u=this.emitter.calculate(this.emitter.config.particle_texture_max_frame,i);if(this.emitter.config.particle_texture_stretch_to_lifetime&&u)var A=u/this.lifetime;else A=this.emitter.calculate(this.emitter.config.particle_texture_frames_per_second,i);Math.floor(this.loop_time*A)>this.current_frame&&(this.current_frame=Math.floor(this.loop_time*A),u&&this.current_frame>=u?this.emitter.config.particle_texture_loop&&(this.current_frame=0,this.loop_time=0,this.setFrame(0)):this.setFrame(this.current_frame))}else this.setFrame(0);if("expression"===this.emitter.config.particle_color_mode){var y=this.emitter.calculate(this.emitter.config.particle_color_expression,i,"array");this.setColor(...y)}else if("gradient"===this.emitter.config.particle_color_mode){var v=this.emitter.calculate(this.emitter.config.particle_color_interpolant,i),b=this.emitter.calculate(this.emitter.config.particle_color_range,i);y=function(e,t){let i=0;if(e.forEach(((e,a)=>{e.percent<=t&&(i=a)})),e[i]&&!e[i+1])return s.default(e[i].color).toRgb();if(!e[i]&&e[i+1])return s.default(e[i+1].color).toRgb();if(e[i]&&e[i+1]){var a=(t-e[i].percent)/(e[i+1].percent-e[i].percent);return s.default.mix(e[i].color,e[i+1].color,100*a).toRgb()}return _}(this.emitter.config.particle_color_gradient,v/b*100);this.setColor(y.r/255,y.g/255,y.b/255,y.a)}else{y=s.default(this.emitter.config.particle_color_static).toRgb();this.setColor(y.r/255,y.g/255,y.b/255,y.a)}}return this}remove(){return m(this.emitter.particles,this),this.mesh.parent&&this.mesh.parent.remove(this.mesh),this.emitter.dead_particles.push(this),this}setColor(e,t,i,a=1){let r=this.geometry.getAttribute("clr");r.array.set([e,t,i,a,e,t,i,a,e,t,i,a,e,t,i,a]),r.needsUpdate=!0}setFrame(e){var t=this.params(),i=this.emitter.calculate(this.emitter.config.particle_texture_uv,t),a=this.emitter.calculate(this.emitter.config.particle_texture_uv_size,t);if(e){var r=this.emitter.calculate(this.emitter.config.particle_texture_uv_step,t);i.addScaledVector(r,e)}this.setUV(i.x,i.y,a.x||this.emitter.config.particle_texture_size[0],a.y||this.emitter.config.particle_texture_size[1])}setUV(e,t,i,a){let r=this.geometry.getAttribute("uv");i=(e+i-0)/this.emitter.config.particle_texture_size[0],a=(t+a-0)/this.emitter.config.particle_texture_size[1],e=(e+(i>0?0:-0))/this.emitter.config.particle_texture_size[0],t=(t+(a>0?0:-0))/this.emitter.config.particle_texture_size[1],r.array.set([e,1-t,i,1-t,e,1-a,i,1-a]),r.needsUpdate=!0}}o.Particle=f;const g=new e.Vector3,u=new e.Object3D,A=["particles_alpha","particles_opaque","particles_blend","particles_add"];function y(t){switch(t.mode){case"catmull_rom":var i=[];return t.nodes.forEach(((t,a)=>{i.push(new e.Vector2(a-1,t))})),new e.SplineCurve(i);case"bezier":i=[];return t.nodes.forEach(((t,a)=>{i.push(new e.Vector2(a/3,t))})),new e.CubicBezierCurve(...i)}}return o.Emitter=class extends class{constructor(){this.events={}}dispatchEvent(e,t){var i=this.events[e];if(i)for(var a=0;a<i.length;a++)"function"==typeof i[a]&&i[a](t)}on(e,t){this.events[e]||(this.events[e]=[]),this.events[e].safePush(t)}removeEventListener(e,t){this.events[e]&&this.events[e].remove(t)}}{constructor(t,i,a=0){super(),this.scene=t,t.emitters.push(this),this.config=i instanceof c?i:new c(t,i,a),this.Molang=new r.default,this.Molang.variableHandler=(t,i)=>this.config.curves[t]&&function(t,i,a,r){var s=t.Molang.parse(i.input,r),o=t.Molang.parse(i.range,r);if("bezier_chain"==i.mode&&(o=1),(s=s/o||0)===1/0&&(s=0),"linear"==i.mode){s*=p=i.nodes.length-1;var n=Math.floor(s),l=s%1,c=i.nodes[n+1]-i.nodes[n];return i.nodes[n]+c*l}if("catmull_rom"==i.mode){let e=t._cached_curves[a];var p;e||(e=t._cached_curves[a]=y(i));var h=(1+(s*=p=i.nodes.length-3))/(p+2);return e.getPoint(h).y}if("bezier"==i.mode){let e=t._cached_curves[a];return e||(e=t._cached_curves[a]=y(i)),e.getPoint(s).y}if("bezier_chain"==i.mode){let t=i.nodes.slice().sort(((e,t)=>e.time-t.time)),a=0;for(;a<t.length&&!(t[a].time>s);)a++;let r=t[a-1],o=t[a];r||(r={time:0,right_value:0,right_slope:0}),o||(o={time:1,right_value:0,right_slope:0});let n=o.time-r.time;var m=[new e.Vector2(r.time+0*n,r.right_value),new e.Vector2(r.time+n*(1/3),r.right_value+r.right_slope*(1/3)),new e.Vector2(r.time+n*(2/3),o.left_value-o.left_slope*(1/3)),new e.Vector2(r.time+1*n,o.left_value)];return new e.CubicBezierCurve(...m).getPoint((s-r.time)/n).y}}(this,this.config.curves[t],t,i);let s=t.global_options._scale;this.local_space=new e.Object3D,this.local_space.scale.set(s,s,s),this.global_space=new e.Object3D,this.global_space.scale.set(s,s,s),this.material=new e.ShaderMaterial({uniforms:{map:{type:"t",value:this.config.texture},materialType:{type:"int",value:1}},vertexShader:"#define GLSLIFY 1\nattribute vec4 clr;varying vec2 vUv;varying vec4 vColor;void main(){vColor=clr;vUv=uv;vec4 mvPosition=modelViewMatrix*vec4(position,1.0);gl_Position=projectionMatrix*mvPosition;}",fragmentShader:"#define GLSLIFY 1\nvarying vec2 vUv;varying vec4 vColor;uniform sampler2D map;uniform int materialType;void main(void){vec4 tColor=texture2D(map,vUv);if(materialType==0){if(tColor.a<0.5)discard;tColor.a=1.0;}else if(materialType==1){tColor.a=1.0;}else{tColor.a=tColor.a*vColor.a;}gl_FragColor=vec4(tColor.rgb*vColor.rgb,tColor.a);}",vertexColors:e.FaceColors,transparent:!0,alphaTest:.2}),this.particles=[],this.dead_particles=[],this.age=0,this.view_age=0,this.enabled=!1,this.loop_mode=a.loop_mode||t.global_options.loop_mode,this.parent_mode=a.parent_mode||t.global_options.parent_mode,this.ground_collision="boolean"==typeof a.ground_collision?a.ground_collision:t.global_options.ground_collision,this.random_vars=[Math.random(),Math.random(),Math.random(),Math.random()],this.tick_values={},this.creation_values={},this._cached_curves={},this.updateMaterial()}clone(){let e=new o.Emitter(this.scene,this.config);return e.loop_mode=this.loop_mode,e}params(){var e={"variable.entity_scale":1};return e["variable.emitter_lifetime"]=this.active_time,e["variable.emitter_age"]=this.age,e["variable.emitter_random_1"]=this.random_vars[0],e["variable.emitter_random_2"]=this.random_vars[1],e["variable.emitter_random_3"]=this.random_vars[2],e["variable.emitter_random_4"]=this.random_vars[3],e}calculate(t,i,a){let r=e=>this.Molang.parse(e,i);var s;return t instanceof Array?"array"==a?(s=[],t.forEach((e=>{s.push(r(e))}))):4===t.length?s=(new e.Plane).setComponents(r(t[0]),r(t[1]),r(t[2]),r(t[3])):3===t.length?s=new e.Vector3(r(t[0]),r(t[1]),r(t[2])):2===t.length&&(s=new e.Vector2(r(t[0]),r(t[1]))):"color"==a||(s=r(t)),s}updateConfig(){this.updateMaterial()}updateMaterial(){this.config.updateTexture()}updateFacingRotation(t){if(0==this.particles.length)return;const i=new e.Quaternion,a=new e.Vector3;let r;this.config.particle_appearance_facing_camera_mode.substring(0,6),r=this.particles[0].mesh.parent.getWorldQuaternion(i).invert(),this.particles.forEach((e=>{switch("direction"==this.config.particle_appearance_facing_camera_mode.substring(0,9)&&("YXZ"!==e.mesh.rotation.order&&(e.mesh.rotation.order="YXZ"),a.copy(e.facing_direction),1==a.y?a.y=-1:-1==a.y&&(a.y=1,a.z=-1e-5)),"lookat_direction"==this.config.particle_appearance_facing_camera_mode&&("XYZ"!==e.mesh.rotation.order&&(e.mesh.rotation.order="XYZ"),a.copy(e.facing_direction)),this.config.particle_appearance_facing_camera_mode){case"lookat_xyz":e.mesh.lookAt(t.position);break;case"lookat_y":var i=a.copy(t.position);g.set(0,0,0),e.mesh.localToWorld(g),i.y=g.y,e.mesh.lookAt(i);break;case"rotate_xyz":e.mesh.rotation.copy(t.rotation),e.mesh.quaternion.premultiply(r);break;case"rotate_y":e.mesh.rotation.copy(t.rotation),e.mesh.rotation.reorder("YXZ"),e.mesh.rotation.x=e.mesh.rotation.z=0,e.mesh.quaternion.premultiply(r);break;case"direction_x":var s=Math.atan2(a.x,a.z),o=Math.atan2(a.y,Math.sqrt(Math.pow(a.x,2)+Math.pow(a.z,2)));e.mesh.rotation.set(0,s-Math.PI/2,o);break;case"direction_y":s=Math.atan2(a.x,a.z);var n=Math.atan2(a.y,Math.sqrt(Math.pow(a.x,2)+Math.pow(a.z,2)));e.mesh.rotation.set(n-Math.PI/2,s-Math.PI,0);break;case"direction_z":s=Math.atan2(a.x,a.z),n=Math.atan2(a.y,Math.sqrt(Math.pow(a.x,2)+Math.pow(a.z,2)));e.mesh.rotation.set(-n,s,0);break;case"lookat_direction":u.position.copy(e.mesh.position),u.quaternion.setFromUnitVectors(h.x,a),a.copy(t.position),e.mesh.parent.add(u),u.updateMatrixWorld(),u.worldToLocal(a),e.mesh.parent.remove(u),e.mesh.rotation.set(Math.atan2(-a.y,a.z),0,0,"XYZ"),e.mesh.quaternion.premultiply(u.quaternion);break;case"emitter_transform_xy":e.mesh.rotation.set(0,0,0);break;case"emitter_transform_xz":e.mesh.rotation.set(-Math.PI/2,0,0);break;case"emitter_transform_yz":e.mesh.rotation.set(0,Math.PI/2,0)}e.mesh.rotation.z+=e.rotation||0}))}start(){this.age=0,this.view_age=0,this.enabled=!0,this.initialized=!0,this.scene.space.add(this.global_space);var e=this.params();for(var t of(this.Molang.resetVariables(),this.active_time=this.calculate(this.config.emitter_lifetime_active_time,e),this.sleep_time=this.calculate(this.config.emitter_lifetime_sleep_time,e),this.random_vars=[Math.random(),Math.random(),Math.random(),Math.random()],this.creation_values={},this.config.variables_creation_vars))this.Molang.parse(t);return this.dispatchEvent("start",{params:e}),"instant"===this.config.emitter_rate_mode&&this.spawnParticles(this.calculate(this.config.emitter_rate_amount,e)),this}tick(t){let i=this.params(),{tick_rate:a}=this.scene.global_options;for(var r of(this._cached_curves={},this.config.variables_tick_vars))this.Molang.parse(r);if(this.config.particle_update_expression.length&&this.particles.forEach((e=>{let t=e.params();for(var i of this.config.particle_update_expression)this.Molang.parse(i,t)})),this.dispatchEvent("tick",{params:i}),!t){let t=this.config.particle_appearance_material;this.material.uniforms.materialType.value=A.indexOf(t),this.material.side="particles_blend"===t||"particles_add"===t?e.DoubleSide:e.FrontSide,this.material.blending="particles_add"===t?e.AdditiveBlending:e.NormalBlending}if(this.particles.forEach((e=>{e.tick(t)})),this.age+=1/a,this.view_age+=1/a,this.enabled&&"steady"===this.config.emitter_rate_mode){var s=this.calculate(this.config.emitter_rate_rate,i)/a,o=1/s;s=Math.round(this.age*a)%Math.round(o)==0?Math.ceil(s):Math.floor(s),this.spawnParticles(s)}return this.dispatchEvent("ticked",{params:i,tick_rate:a}),"expression"===this.config.emitter_lifetime_mode?(this.enabled&&this.calculate(this.config.emitter_lifetime_expiration,i)&&this.stop(),!this.enabled&&this.calculate(this.config.emitter_lifetime_activation,i)&&this.start()):"looping"==this.loop_mode||"auto"==this.loop_mode&&"looping"==this.config.emitter_lifetime_mode?(this.enabled&&p.roundTo(this.age,5)>=this.active_time&&this.stop(),!this.enabled&&p.roundTo(this.age,5)>=this.sleep_time&&this.start()):this.enabled&&p.roundTo(this.age,5)>=this.active_time&&this.stop(),this}stop(e=!1){return this.enabled=!1,this.age=0,e&&this.particles.slice().forEach((e=>{e.remove()})),this.dispatchEvent("stop",{}),this}jumpTo(e){let{tick_rate:t}=this.scene.global_options,i=Math.round(this.view_age*t),a=Math.round(e*t);if(("looping"==this.loop_mode||"auto"==this.loop_mode&&"looping"==this.config.emitter_lifetime_mode)&&(a%=Math.round(this.active_time*t)-1),i!=a){for(a<i?this.stop(!0).start():this.initialized||this.start();Math.round(this.view_age*t)<a-1;)this.tick(!0);return this.tick(!1),this}}playLoop(){return this.initialized&&0!=this.age||this.start(),this.paused=!1,clearInterval(this.tick_interval),this.tick_interval=setInterval((()=>{this.tick()}),1e3/this.scene.global_options.tick_rate),this}toggleLoop(){return this.paused=!this.paused,this.paused?(clearInterval(this.tick_interval),delete this.tick_interval):this.playLoop(),this}stopLoop(){return clearInterval(this.tick_interval),delete this.tick_interval,this.stop(!0),this.paused=!0,this}spawnParticles(e){if(!e)return this;if("steady"==this.config.emitter_rate_mode){var t=this.calculate(this.config.emitter_rate_maximum,this.params())||0;t=p.clamp(t,0,this.scene.global_options.max_emitter_particles),e=p.clamp(e,0,t-this.particles.length)}else e=p.clamp(e,0,this.scene.global_options.max_emitter_particles-this.particles.length);for(var i=0;i<e;i++){if(this.dead_particles.length)var a=this.dead_particles.pop();else a=new f(this);a.add()}return e}delete(){[...this.particles,...this.dead_particles].forEach((e=>{e.mesh.parent&&e.mesh.parent.remove(e.mesh)})),this.particles.splice(0,1/0),this.dead_particles.splice(0,1/0),this.local_space.parent&&this.local_space.parent.remove(this.local_space),this.global_space.parent&&this.global_space.parent.remove(this.global_space),m(this.scene.emitters,this)}},o}));