mirror of
https://github.com/JannisX11/blockbench.git
synced 2024-11-27 04:21:46 +08:00
1 line
60 KiB
JavaScript
1 line
60 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){return"string"==typeof e&&"#"==e[0]?e.length<9&&(e="#ff"+e.substr(1,6)):e=new s.default(e).toHex8String(),"#"+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,i&&i.particle_effect?this.setFromJSON(i):"object"==typeof i&&Object.assign(this,i),a.path&&this.set("file_path",a.path)}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_lifetime_mode="time",this.particle_color_mode="static",this.emitter_rate_rate="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:[]};o.nodes&&o.nodes.length&&o.nodes.forEach((e=>{e=parseFloat(e)||0,n.nodes.push(e)})),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_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))}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_mode","expression"),c("particle_lifetime_expression").expiration_expression?(this.set("particle_lifetime_mode","expression"),this.set("particle_lifetime_expiration_expression",c("particle_lifetime_expression").expiration_expression)):(this.set("particle_lifetime_mode","time"),this.set("particle_lifetime_max_lifetime",c("particle_lifetime_expression").max_lifetime))),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:d}=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)),d&&(d.texture_width&&this.set("particle_texture_size",[d.texture_width,d.texture_height]),d.flipbook?(this.set("particle_texture_mode","animated"),this.set("particle_texture_uv",d.flipbook.base_UV),this.set("particle_texture_uv_size",d.flipbook.size_UV),this.set("particle_texture_uv_step",d.flipbook.step_UV),this.set("particle_texture_frames_per_second",d.flipbook.frames_per_second),this.set("particle_texture_max_frame",d.flipbook.max_frame),this.set("particle_texture_stretch_to_lifetime",d.flipbook.stretch_to_lifetime),this.set("particle_texture_loop",d.flipbook.loop)):(this.set("particle_texture_mode","static"),this.set("particle_texture_uv",d.uv),this.set("particle_texture_uv_size",d.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 g=new s.default({r:255*m[0],g:255*m[1],b:255*m[2],a:m[3]}).toHex8String();this.set("particle_color_static",g)}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){g=l(m.gradient[A]);var u=parseFloat(A)/t*100;e.push({color:g,percent:u})}}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,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwQAADsEBuJFr7QAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4xOdTWsmQAABQRSURBVHhe7Z17zG1HWcYPIjeFarUq1ltRvLWKCEK8i5SKN1rqpd5ra1XqsSIg2vTURJQqKa1CK8G0RrCGgLfaxJPjLTEEvNaYg+lJY9Vo1T/8Q6MYKxpr7Pb5zX6f+WbNnrXW/vb3nXN2z54neTIz7zsza+153pk16/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ffepyuH7Dffjc9j03blWj1YVvLZ6xTZ2sxd/LYa4RrLRxGfdtaPmPKB+b8oFXHtpYP1PaxelsLn/C6J75uPYP6IIqz2E/dEpu2M8ba2z7nN8bqbS18wuue+Lr1SuynTV2Xco1wJYRpgHCtjak29o3Vqe1j9bYW+z3hTX7gJm0OC/WxW+fSshn2jdWp7WP1thY+4bETx14jXAllufYZY/YW9lMXUL9GuNbCXH37x+rV9rF6WwvOt3NXuTjy/6iKK+Ulr5sxAAAAAElFTkSuQmCC";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/OX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Eg4QS8GRAmXUMBYuDe+6aMD0oNcdbvcAE+em4hzB058w1KWRgyGCHWhDKerBPdfw279FIEMQODLcCBkLGonxvRwylb1VcWgLkdho3OtDeWnI+CtIi7Z/gBjL/UT96vcrhni9dqiyxg2Vdz9RX2/4e/5R43Ae802trOKM5fTIUfcKabWGfvwHPQBumhVBLHh3c4YeuKnNzngTPkGuF8Bevm3P7fd+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_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_mode:{type:"string"},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},f=(new e.Plane).setComponents(0,1,0,0);class d{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 f=this.emitter.calculate(this.emitter.config.particle_motion_linear_speed,t);if(this.speed.x*=f,this.speed.y*=f,this.speed.z*=f,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),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;if(this.age+=a,this.loop_time+=a,"time"===this.emitter.config.particle_lifetime_mode?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 r=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,-r),this.speed.addScaledVector(this.acceleration,a),this.position.addScaledVector(this.speed,a),this.emitter.config.particle_lifetime_kill_plane.find((e=>e))){var o=this.emitter.calculate(this.emitter.config.particle_lifetime_kill_plane,i),n=(new e.Vector3).copy(this.position).addScaledVector(this.speed,-a),l=(new e.Vector3).copy(this.position);this.emitter.config.space_local_position&&"locator"==this.emitter.parent_mode&&(n.x*=-1,n.y*=-1,l.x*=-1,l.y*=-1);var c=new e.Line3(n,l);if(o.intersectsLine(c))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=f,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 h=this.emitter.calculate(this.emitter.config.particle_rotation_rotation_drag_coefficient,i),m=this.emitter.calculate(this.emitter.config.particle_rotation_rotation_acceleration,i);m+=-h*this.rotation_rate,this.rotation_rate+=m*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)&&("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 d=this.emitter.calculate(this.emitter.config.particle_appearance_size,i);if(this.mesh.scale.x=d.x||1e-4,this.mesh.scale.y=d.y||1e-4,"animated"===this.emitter.config.particle_texture_mode){var g=this.emitter.calculate(this.emitter.config.particle_texture_max_frame,i);if(this.emitter.config.particle_texture_stretch_to_lifetime&&g)var A=g/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),g&&this.current_frame>=g?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 u=this.emitter.calculate(this.emitter.config.particle_color_expression,i,"array");this.setColor(...u)}else if("gradient"===this.emitter.config.particle_color_mode){var y=this.emitter.calculate(this.emitter.config.particle_color_interpolant,i),v=this.emitter.calculate(this.emitter.config.particle_color_range,i);u=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,y/v*100);this.setColor(u.r/255,u.g/255,u.b/255,u.a)}else{u=s.default(this.emitter.config.particle_color_static).toRgb();this.setColor(u.r/255,u.g/255,u.b/255,u.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=d;const g=new e.Vector3,A=["particles_alpha","particles_blend","particles_opaque"];return o.Emitter=class{constructor(t,i,a=0){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){var r=t.Molang.parse(i.input,a);if((r=r/t.Molang.parse(i.range,a)||0)===1/0&&(r=0),"linear"==i.mode){r*=c=i.nodes.length-1;var s=Math.floor(r),o=r%1,n=i.nodes[s+1]-i.nodes[s];return i.nodes[s]+n*o}if("catmull_rom"==i.mode){var l=[];i.nodes.forEach(((t,i)=>{l.push(new e.Vector2(i-1,t))}));var c,p=new e.SplineCurve(l),h=(1+(r*=c=i.nodes.length-3))/(c+2);return p.getPoint(h).y}}(this,this.config.curves[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.05)discard;}else if(materialType==1){tColor.a=tColor.a*vColor.a;}else{tColor.a=1.0;}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.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;"rotate"==this.config.particle_appearance_facing_camera_mode.substr(0,6)&&(r=this.particles[0].mesh.parent.getWorldQuaternion(i).invert()),this.particles.forEach((e=>{switch("direction"==this.config.particle_appearance_facing_camera_mode.substr(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)),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"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.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"instant"===this.config.emitter_rate_mode&&this.spawnParticles(this.calculate(this.config.emitter_rate_amount,e)),this}tick(e){let t=this.params(),{tick_rate:i}=this.scene.global_options;for(var a of this.config.variables_tick_vars)this.Molang.parse(a);if(this.enabled&&"steady"===this.config.emitter_rate_mode){var r=this.calculate(this.config.emitter_rate_rate,t)/i,s=1/r;r=Math.round(this.age*i)%Math.round(s)==0?Math.ceil(r):Math.floor(r),this.spawnParticles(r)}return e||(this.material.uniforms.materialType.value=A.indexOf(this.config.particle_appearance_material)),this.particles.forEach((t=>{t.tick(e)})),this.age+=1/i,this.view_age+=1/i,"expression"===this.config.emitter_lifetime_mode?(this.enabled&&this.calculate(this.config.emitter_lifetime_expiration,t)&&this.stop(),!this.enabled&&this.calculate(this.config.emitter_lifetime_activation,t)&&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}jumpTo(e){let{tick_rate:t}=this.scene.global_options,i=Math.round(this.view_age*t),a=Math.round(e*t);if("once"!=this.loop_mode&&(a=Math.clamp(a,0,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 d(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})); |