PageSourceSearch

https://dedalium.com/_nuxt/8fbd849.js

js dedalium.com collected 2026-10-02 00:29:50 UTC 139,457 bytes, 1 lines download raw bytes

1(window.webpackJsonp=window.webpackJsonp||[]).push([[135],{150:function(e,t,r){"use strict";r.d(t,"a",function(){return m});var n=r(40),o=r(8),h=r(23),l=r(81),d=r(24),c=r(329),_=r(1),f=r(9);class m{getRenderCamera(e){return this._renderCamera?this._renderCamera:(t=this.originalScene.activeCameras&&this.originalScene.activeCameras.length>1?this.originalScene.activeCameras[this.originalScene.activeCameras.length-1]:this.originalScene.activeCamera,e&&t&&t.isRigCamera?t.rigParent:t);var t}setRenderCamera(e){this._renderCamera=e}_getSharedGizmoLight(){return this._sharedGizmoLight||(this._sharedGizmoLight=new c.a("shared gizmo light",new _.f(0,1,0),this.utilityLayerScene),this._sharedGizmoLight.intensity=2,this._sharedGizmoLight.groundColor=f.a.Gray()),this._sharedGizmoLight}static get DefaultUtilityLayer(){return null==m._DefaultUtilityLayer?m._CreateDefaultUtilityLayerFromScene(d.a.LastCreatedScene):m._DefaultUtilityLayer}static _CreateDefaultUtilityLayerFromScene(e){return m._DefaultUtilityLayer=new m(e),m._DefaultUtilityLayer.originalScene.onDisposeObservable.addOnce(()=>{m._DefaultUtilityLayer=null}),m._DefaultUtilityLayer}static get DefaultKeepDepthUtilityLayer(){return null==m._DefaultKeepDepthUtilityLayer?m._CreateDefaultKeepUtilityLayerFromScene(d.a.LastCreatedScene):m._DefaultKeepDepthUtilityLayer}static _CreateDefaultKeepUtilityLayerFromScene(e){return m._DefaultKeepDepthUtilityLayer=new m(e),m._DefaultKeepDepthUtilityLayer.utilityLayerScene.autoClearDepthAndStencil=!1,m._DefaultKeepDepthUtilityLayer.originalScene.onDisposeObservable.addOnce(()=>{m._DefaultKeepDepthUtilityLayer=null}),m._DefaultKeepDepthUtilityLayer}constructor(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.originalScene=e,this.handleEvents=t,this._pointerCaptures={},this._lastPointerEvents={},this._sharedGizmoLight=null,this._renderCamera=null,this.pickUtilitySceneFirst=!0,this.shouldRender=!0,this.onlyCheckPointerDownEvents=!0,this.processAllEvents=!1,this.pickingEnabled=!0,this.onPointerOutObservable=new o.a,this.utilityLayerScene=new n.b(e.getEngine(),{virtual:!0,useFloatingOrigin:e.floatingOriginMode}),this.utilityLayerScene.useRightHandedSystem=e.useRightHandedSystem,this.utilityLayerScene._allowPostProcessClearColor=!1,this.utilityLayerScene.postProcessesEnabled=!1,this.utilityLayerScene.detachControl(),t&&(this._originalPointerObserver=e.onPrePointerObservable.add(t=>{var r;if(this.utilityLayerScene.activeCamera&&this.pickingEnabled&&(this.processAllEvents||t.type===h.a.POINTERMOVE||t.type===h.a.POINTERUP||t.type===h.a.POINTERDOWN||t.type===h.a.POINTERDOUBLETAP)){this.utilityLayerScene.pointerX=e.pointerX,this.utilityLayerScene.pointerY=e.pointerY;var n=t.event;if(e.isPointerCaptured(n.pointerId))this._pointerCaptures[n.pointerId]=!1;else{var o=r=>{var n;if(t.nearInteractionPickingInfo)n=t.nearInteractionPickingInfo.pickedMesh.getScene()==r?t.nearInteractionPickingInfo:new l.a;else if(r!==this.utilityLayerScene&&t.originalPickingInfo)n=t.originalPickingInfo;else{var o=null;this._renderCamera&&(o=r._activeCamera,r._activeCamera=this._renderCamera,t.ray=null),n=t.ray?r.pickWithRay(t.ray):r.pick(e.pointerX,e.pointerY),o&&(r._activeCamera=o)}return n},d=o(this.utilityLayerScene);if(!t.ray&&d&&(t.ray=d.ray),null!==(r=t.originalPickingInfo)&&void 0!==r&&r.aimTransform&&d&&(d.aimTransform=t.originalPickingInfo.aimTransform,d.gripTransform=t.originalPickingInfo.gripTransform),this.utilityLayerScene.onPrePointerObservable.notifyObservers(t),this.onlyCheckPointerDownEvents&&t.type!=h.a.POINTERDOWN)return t.skipOnPointerObservable||this.utilityLayerScene.onPointerObservable.notifyObservers(new h.b(t.type,t.event,d),t.type),void(t.type===h.a.POINTERUP&&this._pointerCaptures[n.pointerId]&&(this._pointerCaptures[n.pointerId]=!1));if(this.utilityLayerScene.autoClearDepthAndStencil||this.pickUtilitySceneFirst)d&&d.hit&&(t.skipOnPointerObservable||this.utilityLayerScene.onPointerObservable.notifyObservers(new h.b(t.type,t.event,d),t.type),t.skipOnPointerObservable=!0);else{var c=o(e),_=t.event;c&&d&&(0===d.distance&&c.pickedMesh?this.mainSceneTrackerPredicate&&this.mainSceneTrackerPredicate(c.pickedMesh)?(this._notifyObservers(t,c,_),t.skipOnPointerObservable=!0):t.type===h.a.POINTERDOWN?(this._pointerCaptures[_.pointerId]=!0,this._notifyObservers(t,c,_)):t.type!==h.a.POINTERMOVE&&t.type!==h.a.POINTERUP||(this._lastPointerEvents[_.pointerId]&&(this.onPointerOutObservable.notifyObservers(_.pointerId),delete this._lastPointerEvents[_.pointerId]),this._notifyObservers(t,c,_)):!this._pointerCaptures[_.pointerId]&&(d.distance<c.distance||0===c.distance)?(this._notifyObservers(t,d,_),t.skipOnPointerObservable||(t.skipOnPointerObservable=d.distance>0)):!this._pointerCaptures[_.pointerId]&&d.distance>=c.distance&&(this.mainSceneTrackerPredicate&&this.mainSceneTrackerPredicate(c.pickedMesh)?(this._notifyObservers(t,c,_),t.skipOnPointerObservable=!0):(t.type!==h.a.POINTERMOVE&&t.type!==h.a.POINTERUP||this._lastPointerEvents[_.pointerId]&&(this.onPointerOutObservable.notifyObservers(_.pointerId),delete this._lastPointerEvents[_.pointerId]),this._notifyObservers(t,d,_))),t.type===h.a.POINTERUP&&this._pointerCaptures[_.pointerId]&&(this._pointerCaptures[_.pointerId]=!1))}}}}),this._originalPointerObserver&&e.onPrePointerObservable.makeObserverTopPriority(this._originalPointerObserver)),this.utilityLayerScene.autoClear=!1,r||(this._afterRenderObserver=this.originalScene.onAfterRenderCameraObservable.add(e=>{this.shouldRender&&e==this.getRenderCamera()&&this.render()})),this._sceneDisposeObserver=this.originalScene.onDisposeObservable.add(()=>{this.dispose()}),this._updateCamera()}_notifyObservers(e,t,r){e.skipOnPointerObservable||(this.utilityLayerScene.onPointerObservable.notifyObservers(new h.b(e.type,e.event,t),e.type),this._lastPointerEvents[r.pointerId]=!0)}
1render(){if(this._updateCamera(),this.utilityLayerScene.activeCamera){var e=this.utilityLayerScene.activeCamera.getScene(),t=this.utilityLayerScene.activeCamera;t._scene=this.utilityLayerScene,t.leftCamera&&(t.leftCamera._scene=this.utilityLayerScene),t.rightCamera&&(t.rightCamera._scene=this.utilityLayerScene),this.utilityLayerScene.render(!1),t._scene=e,t.leftCamera&&(t.leftCamera._scene=e),t.rightCamera&&(t.rightCamera._scene=e)}}dispose(){this.onPointerOutObservable.clear(),this._afterRenderObserver&&this.originalScene.onAfterRenderCameraObservable.remove(this._afterRenderObserver),this._sceneDisposeObserver&&this.originalScene.onDisposeObservable.remove(this._sceneDisposeObserver),this._originalPointerObserver&&this.originalScene.onPrePointerObservable.remove(this._originalPointerObserver),this.utilityLayerScene.dispose()}_updateCamera(){this.utilityLayerScene.cameraToUseForPointers=this.getRenderCamera(),this.utilityLayerScene.activeCamera=this.getRenderCamera()}}m._DefaultUtilityLayer=null,m._DefaultKeepDepthUtilityLayer=null},220:function(e,t,r){"use strict";r.d(t,"b",function(){return c}),r.d(t,"a",function(){return _});var n=r(20),o=(r(12),r(125)),h=r(24);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach(function(t){Object(n.a)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}class c extends o.b{_gatherImports(e,t){e?(this._webGPUReady=!0,t.push(Promise.all([r.e(48).then(r.bind(null,994))]))):t.push(Promise.all([r.e(25).then(r.bind(null,709))])),super._gatherImports(e,t)}constructor(e){var t=arguments.length>2?arguments[2]:void 0,r=d({name:e,engine:(arguments.length>1&&void 0!==arguments[1]?arguments[1]:null)||h.a.LastCreatedEngine,useShaderStore:!0,useAsPostProcess:!0,fragmentShader:c.FragmentUrl},t);r.engine||(r.engine=h.a.LastCreatedEngine),super(r)}}c.FragmentUrl="pass";class _ extends o.b{_gatherImports(e,t){e?(this._webGPUReady=!0,t.push(Promise.all([r.e(319).then(r.bind(null,995))]))):t.push(Promise.all([r.e(309).then(r.bind(null,996))])),super._gatherImports(e,t)}constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;super(d(d({},arguments.length>2?arguments[2]:void 0),{},{name:e,engine:t||h.a.LastCreatedEngine,useShaderStore:!0,useAsPostProcess:!0,fragmentShader:_.FragmentUrl,defines:"#define POSITIVEX"})),this._face=0}get face(){return this._face}set face(e){if(!(e<0||e>5))switch(this._face=e,this._face){case 0:this.updateEffect("#define POSITIVEX");break;case 1:this.updateEffect("#define NEGATIVEX");break;case 2:this.updateEffect("#define POSITIVEY");break;case 3:this.updateEffect("#define NEGATIVEY");break;case 4:this.updateEffect("#define POSITIVEZ");break;case 5:this.updateEffect("#define NEGATIVEZ")}}}_.FragmentUrl="passCube"},243:function(e,t,r){"use strict";r.d(t,"a",function(){return c});r(12);var n=r(7),o=r(64),h=r(1),l=r(257);class d{constructor(e,t){this.type=e,this.jointData=t,t.nativeParams=t.nativeParams||{}}get physicsJoint(){return this._physicsJoint}set physicsJoint(e){this._physicsJoint=e}set physicsPlugin(e){this._physicsPlugin=e}executeNativeFunction(e){e(this._physicsPlugin.world,this._physicsJoint)}}d.DistanceJoint=0,d.HingeJoint=1,d.BallAndSocketJoint=2,d.WheelJoint=3,d.SliderJoint=4,d.PrismaticJoint=5,d.UniversalJoint=6,d.Hinge2Joint=d.WheelJoint,d.PointToPointJoint=8,d.SpringJoint=9,d.LockJoint=10;r(30);class c{get isDisposed(){return this._isDisposed}get mass(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getBodyMass(this):0}set mass(e){this.setMass(e)}get friction(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getBodyFriction(this):0}set friction(e){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setBodyFriction(this,e)}get restitution(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getBodyRestitution(this):0}set restitution(e){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setBodyRestitution(this,e)}get pressure(){if(!this._physicsEngine)return 0;var e=this._physicsEngine.getPhysicsPlugin();return e.setBodyPressure?e.getBodyPressure(this):0}set pressure(e){if(this._physicsEngine){var t=this._physicsEngine.getPhysicsPlugin();t.setBodyPressure&&t.setBodyPressure(this,e)}}get stiffness(){if(!this._physicsEngine)return 0;var e=this._physicsEngine.getPhysicsPlugin();return e.getBodyStiffness?e.getBodyStiffness(this):0}set stiffness(e){if(this._physicsEngine){var t=this._physicsEngine.getPhysicsPlugin();t.setBodyStiffness&&t.setBodyStiffness(this,e)}}get velocityIterations(){if(!this._physicsEngine)return 0;var e=this._physicsEngine.getPhysicsPlugin();return e.getBodyVelocityIterations?e.getBodyVelocityIterations(this):0}set velocityIterations(e){if(this._physicsEngine){var t=this._physicsEngine.getPhysicsPlugin();t.setBodyVelocityIterations&&t.setBodyVelocityIterations(this,e)}}get positionIterations(){if(!this._physicsEngine)return 0;var e=this._physicsEngine.getPhysicsPlugin();return e.getBodyPositionIterations?e.getBodyPositionIterations(this):0}set positionIterations(e){if(this._physicsEngine){var t=this._physicsEngine.getPhysicsPlugin();t.setBodyPositionIterations&&t.setBodyPositionIterations(this,e)}}constructor(object,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{mass:0},r=arguments.length>3?arguments[3]:void 0;this.object=object,this.type=e,this._options=t,this._scene=r,this._pluginData={},this._bodyUpdateRequired=!1,this._onBeforePhysicsStepCallbacks=new Array,this._onAfterPhysicsStepCallbacks=new Array,this._onPhysicsCollideCallbacks=[],this._deltaPosition=h.f.Zero(),this._isDisposed=!1,this.soft=!1,this.segments=0,this._tmpQuat=new h.b,this._tmpQuat2=new h.b,this.beforeStep=()=>
1{if(this._physicsEngine)for(var e of(this.object.translate(this._deltaPosition,-1),this._deltaRotationConjugated&&this.object.rotationQuaternion&&this.object.rotationQuaternion.multiplyToRef(this._deltaRotationConjugated,this.object.rotationQuaternion),this.object.computeWorldMatrix(!1),this.object.parent&&this.object.rotationQuaternion?(this.getParentsRotation(),this._tmpQuat.multiplyToRef(this.object.rotationQuaternion,this._tmpQuat)):this._tmpQuat.copyFrom(this.object.rotationQuaternion||new h.b),this._options.disableBidirectionalTransformation||this.object.rotationQuaternion&&this._physicsEngine.getPhysicsPlugin().setPhysicsBodyTransformation(this,this.object.getAbsolutePosition(),this._tmpQuat),this._onBeforePhysicsStepCallbacks))e(this)},this.afterStep=()=>{if(this._physicsEngine){for(var e of this._onAfterPhysicsStepCallbacks)e(this);this._physicsEngine.getPhysicsPlugin().setTransformationFromPhysicsBody(this),this.object.parent&&this.object.rotationQuaternion&&(this.getParentsRotation(),this._tmpQuat.conjugateInPlace(),this._tmpQuat.multiplyToRef(this.object.rotationQuaternion,this.object.rotationQuaternion)),this.object.setAbsolutePosition(this.object.position),this._deltaRotation?(this.object.rotationQuaternion&&this.object.rotationQuaternion.multiplyToRef(this._deltaRotation,this.object.rotationQuaternion),this._deltaPosition.applyRotationQuaternionToRef(this._deltaRotation,c._TmpVecs[0]),this.object.translate(c._TmpVecs[0],1)):this.object.translate(this._deltaPosition,1),this.object.computeWorldMatrix(!0)}},this.onCollideEvent=null,this.onCollide=e=>{if((this._onPhysicsCollideCallbacks.length||this.onCollideEvent)&&this._physicsEngine){var t=this._physicsEngine.getImpostorWithPhysicsBody(e.body);if(t){this.onCollideEvent&&this.onCollideEvent(this,t);var r=this._onPhysicsCollideCallbacks.filter(e=>-1!==e.otherImpostors.indexOf(t));for(var n of r)n.callback(this,t,e.point,e.distance,e.impulse,e.normal)}}},this.object?(this.object.parent&&0!==t.mass&&n.a.Warn("A physics impostor has been created for an object which has a parent. Babylon physics currently works in local space so unexpected issues may occur."),!this._scene&&object.getScene&&(this._scene=object.getScene()),this._scene&&(this.t
1ype>100&&(this.soft=!0),this._physicsEngine=this._scene.getPhysicsEngine(),this._physicsEngine?(this.object.rotationQuaternion||(this.object.rotation?this.object.rotationQuaternion=h.b.RotationYawPitchRoll(this.object.rotation.y,this.object.rotation.x,this.object.rotation.z):this.object.rotationQuaternion=new h.b),this._options.mass=void 0===t.mass?0:t.mass,this._options.friction=void 0===t.friction?.2:t.friction,this._options.restitution=void 0===t.restitution?.2:t.restitution,this.soft&&(this._options.mass=this._options.mass>0?this._options.mass:1,this._options.pressure=void 0===t.pressure?200:t.pressure,this._options.stiffness=void 0===t.stiffness?1:t.stiffness,this._options.velocityIterations=void 0===t.velocityIterations?20:t.velocityIterations,this._options.positionIterations=void 0===t.positionIterations?20:t.positionIterations,this._options.fixedPoints=void 0===t.fixedPoints?0:t.fixedPoints,this._options.margin=void 0===t.margin?0:t.margin,this._options.damping=void 0===t.damping?0:t.damping,this._options.path=void 0===t.path?null:t.path,this._options.shape=void 0===t.shape?null:t.shape),this._joints=[],!this.object.parent||this._options.ignoreParent?this._init():this.object.parent.physicsImpostor&&n.a.Warn("You must affect impostors to children before affecting impostor to parent.")):n.a.Error("Physics not enabled. Please use scene.enablePhysics(...) before creating impostors."))):n.a.Error("No object was provided. A physics object is obligatory")}_init(){this._physicsEngine&&(this._physicsEngine.removeImpostor(this),this.physicsBody=null,this._parent=this._parent||this._getPhysicsParent(),this._isDisposed||this.parent&&!this._options.ignoreParent||this._physicsEngine.addImpostor(this))}_getPhysicsParent(){return this.object.parent instanceof l.a?this.object.parent.physicsImpostor:null}isBodyInitRequired(){return this._bodyUpdateRequired||!this._physicsBody&&(!this._parent||!!this._options.ignoreParent)}setScalingUpdated(){this.forceUpdate()}forceUpdate(){this._init(),this.parent&&!this._options.ignoreParent&&this.parent.forceUpdate()}get physicsBody(){return this._parent&&!this._options.ignoreParent?this._parent.physicsBody:this._physicsBody}get parent(){return!this._options.ignoreParent&&this._parent?this._parent:null}set parent(e){this._parent=e}set physicsBody(e){this._physicsBody&&this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().removePhysicsBody(this),this._physicsBody=e,this.resetUpdateFlags()}resetUpdateFlags(){this._bodyUpdateRequired=!1}getObjectExtents(){if(this.object.getBoundingInfo){var q=this.object.rotationQuaternion,e=this.object.scaling.clone();this.object.rotationQuaternion=c.IDENTITY_QUATERNION;var t=this.object.computeWorldMatrix&&this.object.computeWorldMatrix(!0);t&&t.decompose(e,void 0,void 0);var r=this.object.getBoundingInfo().boundingBox.extendSize.scale(2).multiplyInPlace(e);return r.x=Math.abs(r.x),r.y=Math.abs(r.y),r.z=Math.abs(r.z),this.object.rotationQuaternion=q,this.object.computeWorldMatrix&&this.object.computeWorldMatrix(!0),r}return c.DEFAULT_OBJECT_SIZE}getObjectCenter(){return this.object.getBoundingInfo?this.object.getBoundingInfo().boundingBox.centerWorld:this.object.position}getParam(e){return this._options[e]}setParam(e,t){this._options[e]=t,this._bodyUpdateRequired=!0}setMass(e){this.getParam("mass")!==e&&this.setParam("mass",e),this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setBodyMass(this,e)}getLinearVelocity(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getLinearVelocity(this):h.f.Zero()}setLinearVelocity(e){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setLinearVelocity(this,e)}getAngularVelocity(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getAngularVelocity(this):h.f.Zero()}setAngularVelocity(e){this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().setAngularVelocity(this,e)}executeNativeFunction(e){this._physicsEngine&&e(this._physicsEngine.getPhysicsPlugin().world,this.physicsBody)}registerBeforePhysicsStep(e){this._onBeforePhysicsStepCallbacks.push(e)}unregisterBeforePhysicsStep(e){var t=this._onBeforePhysicsStepCallbacks.indexOf(e);t>-1?this._onBeforePhysicsStepCallbacks.splice(t,1):n.a.Warn("Function to remove was not found")}registerAfterPhysicsStep(e){this._onAfterPhysicsStepCallbacks.push(e)}unregisterAfterPhysicsStep(e){var t=this._onAfterPhysicsStepCallbacks.indexOf(e);t>-1?this._onAfterPhysicsStepCallbacks.splice(t,1):n.a.Warn("Function to remove was not found")}registerOnPhysicsCollide(e,t){var r=e instanceof Array?e:[e];this._onPhysicsCollideCallbacks.push({callback:t,otherImpostors:r})}unregisterOnPhysicsCollide(e,t){var r=e instanceof Array?e:[e],o=-1;this._onPhysicsCollideCallbacks.some((e,n)=>{if(e.callback===t&&e.otherImpostors.length===r.length){var h=e.otherImpostors.every(e=>r.indexOf(e)>-1);return h&&(o=n),h}return!1})?this._onPhysicsCollideCallbacks.splice(o,1):n.a.Warn("Function to remove was not found")}getParentsRotation(){var e=this.object.parent;for(this._tmpQuat.copyFromFloats(0,0,0,1);e;)e.rotationQuaternion?this._tmpQuat2.copyFrom(e.rotationQuaternion):h.b.RotationYawPitchRollToRef(e.rotation.y,e.rotation.x,e.rotation.z,this._tmpQuat2),this._tmpQuat.multiplyToRef(this._tmpQuat2,this._tmpQuat),e=e.parent;return this._tmpQuat}applyForce(e,t){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().applyForce(this,e,t),this}applyImpulse(e,t){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().applyImpulse(this,e,t),this}createJoint(e,t,r){var n=new d(t,r);return this.addJoint(e,n),this}addJoint(e,t){return this._joints.push({otherImpostor:e,joint:t}),this._physicsEngine&&this._physicsEngine.addJoint(this,e,t),this}addAnchor(e,t,r,n,o){if(!this._physicsEngine)return this;var h=this._physicsEngine.getPhysicsPlugin();return h.appendAnchor?(this._physicsEngine&&h.appendAnchor(this,e,t,r,n,o),this):this}addHook(e,t,r,n){if(!this._physicsEngine)return this;var o=this._physicsEngine.getPhysicsPlugin();return o.appendAnchor?(this._physicsEngine&&o.appendHook(this,e,t,r,n),this):this}sleep(){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().sleepBody(this),this}wakeUp(){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().wakeUpBody(this),this}clone(e){return e?new c(e,this.type,this._options,this._scene):null}dispose(){if(this._physicsEngine){for(var e of this._joints)this._physicsEngine&&this._physicsEngine.removeJoint(this,e.otherImpostor,e.joint);this._physicsEngine.removeImpostor(this),this.parent&&this.parent.forceUpdate(),this._isDisposed=!0}}setDeltaPosition(e){this._deltaPosition.copyFrom(e)}setDeltaRotation(e){this._deltaRotation||(this._deltaRotation=new h.b),this._deltaRotation.copyFrom(e),this._deltaRotationConjugated=this._deltaRotation.conjugate()}getBoxSizeToRef(e){return this._physicsEngine&&this._physicsEngine.getPhysicsPlugin().getBoxSizeToRef(this,e),this}getRadius(){return this._physicsEngine?this._physicsEngine.getPhysicsPlugin().getRadius(this):0}syncBoneWithImpostor(e,t,r,n,o){var h=c._TmpVecs[0],l=this.object;if(l.rotationQuaternion)if(o){var d=c._TmpQuat;l.rotationQuaternion.multiplyToRef(o,d),e.setRotationQuaternion(d,1,t)}else e.setRotationQuaternion(l.rotationQuaternion,1,t);h.x=0,h.y=0,h.z=0,r&&(h.x=r.x,h.y=r.y,h.z=r.z,e.getDirectionToRef(h,t,h),null==n&&(n=r.length()),h.x*=n,h.y*=n,h.z*=n),e.getParent()?(h.addInPlace(l.getAbsolutePosition()),e.setAbsolutePosition(h,t)):(t.setAbsolutePosition(l.getAbsolutePosition()),t.position.x-=
1h.x,t.position.y-=h.y,t.position.z-=h.z)}syncImpostorWithBone(e,t,r,n,o,h){var l=this.object;if(l.rotationQuaternion)if(o){var d=c._TmpQuat;e.getRotationQuaternionToRef(1,t,d),d.multiplyToRef(o,l.rotationQuaternion)}else e.getRotationQuaternionToRef(1,t,l.rotationQuaternion);var _=c._TmpVecs[0],f=c._TmpVecs[1];h||((h=c._TmpVecs[2]).x=0,h.y=1,h.z=0),e.getDirectionToRef(h,t,f),e.getAbsolutePositionToRef(t,_),null==n&&r&&(n=r.length()),null!=n&&(_.x+=f.x*n,_.y+=f.y*n,_.z+=f.z*n),l.setAbsolutePosition(_)}}c.DEFAULT_OBJECT_SIZE=new h.f(1,1,1),c.IDENTITY_QUATERNION=h.b.Identity(),c._TmpVecs=Object(o.a)(3,h.f.Zero),c._TmpQuat=h.b.Identity(),c.NoImpostor=0,c.SphereImpostor=1,c.BoxImpostor=2,c.PlaneImpostor=3,c.MeshImpostor=4,c.CapsuleImpostor=6,c.CylinderImpostor=7,c.ParticleImpostor=8,c.HeightmapImpostor=9,c.ConvexHullImpostor=10,c.CustomImpostor=100,c.RopeImpostor=101,c.ClothImpostor=102,c.SoftbodyImpostor=103},266:function(e,t,r){"use strict";r.d(t,"a",function(){return c});var n=r(20),o=(r(245),r(34),r(49),r(12),r(125)),h=r(24);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(Object(r),!0).forEach(function(t){Object(n.a)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}class c extends o.b{_gatherImports(e,t){e?(this._webGPUReady=!0,t.push(Promise.all([r.e(209).then(r.bind(null,1024)),r.e(228).then(r.bind(null,1036))]))):t.push(Promise.all([r.e(207).then(r.bind(null,1025)),r.e(226).then(r.bind(null,1037))]))}constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2?arguments[2]:void 0,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,l=!(null==o||!o.blockCompilation);super(d(d({},o),{},{name:e,engine:t||h.a.LastCreatedEngine,useShaderStore:!0,useAsPostProcess:!0,fragmentShader:c.FragmentUrl,uniforms:c.Uniforms,samplers:c.Samplers,vertexUrl:c.VertexUrl,blockCompilation:!0})),this._packedFloat=!1,this._staticDefines="",this.textureWidth=0,this.textureHeight=0,this._staticDefines=o?Array.isArray(o.defines)?o.defines.join("\n"):o.defines||"":"",this.options.blockCompilation=l,void 0!==r&&(this.direction=r),void 0!==n&&(this.kernel=n)}set kernel(e){this._idealKernel!==e&&(e=Math.max(e,1),this._idealKernel=e,this._kernel=this._nearestBestKernel(e),this.options.blockCompilation||this._updateParameters())}get kernel(){return this._idealKernel}set packedFloat(e){this._packedFloat!==e&&(this._packedFloat=e,this.options.blockCompilation||this._updateParameters())}get packedFloat(){return this._packedFloat}bind(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];super.bind(e),this._drawWrapper.effect.setFloat2("delta",1/this.textureWidth*this.direction.x,
11/this.textureHeight*this.direction.y)}_updateParameters(e,t){for(var r=this._kernel,n=(r-1)/2,o=[],h=[],l=0,i=0;i<r;i++){var u=i/(r-1),d=this._gaussianWeight(2*u-1);o[i]=i-n,h[i]=d,l+=d}for(var c=0;c<h.length;c++)h[c]/=l;for(var _=[],f=[],m=[],v=0;v<=n;v+=2){var y=Math.min(v+1,Math.floor(n));if(v===y)m.push({o:o[v],w:h[v]});else{var P=y===n,O=h[v]+h[y]*(P?.5:1),R=o[v]+1/(1+h[v]/h[y]);0===R?(m.push({o:o[v],w:h[v]}),m.push({o:o[v+1],w:h[v+1]})):(m.push({o:R,w:O}),m.push({o:-R,w:O}))}}for(var E=0;E<m.length;E++)f[E]=m[E].o,_[E]=m[E].w;o=f,h=_;var S=this.options.engine.getCaps().maxVaryingVectors-(1===this.options.shaderLanguage?1:0),T=Math.max(S,0)-1,C=Math.min(o.length,T),I="";I+=this._staticDefines,-1!=this._staticDefines.indexOf("DOF")&&(I+="#define CENTER_WEIGHT ".concat(this._glslFloat(h[C-1]),"\n"),C--);for(var x=0;x<C;x++)I+="#define KERNEL_OFFSET".concat(x," ").concat(this._glslFloat(o[x]),"\n"),I+="#define KERNEL_WEIGHT".concat(x," ").concat(this._glslFloat(h[x]),"\n");for(var M=0,D=T;D<o.length;D++)I+="#define KERNEL_DEP_OFFSET".concat(M," ").concat(this._glslFloat(o[D]),"\n"),I+="#define KERNEL_DEP_WEIGHT".concat(M," ").concat(this._glslFloat(h[D]),"\n"),M++;this.packedFloat&&(I+="#define PACKEDFLOAT 1"),this.options.blockCompilation=!1,this.updateEffect(I,null,null,{varyingCount:C,depCount:M},e,t)}_nearestBestKernel(e){var t=Math.round(e);for(var r of[t,t-1,t+1,t-2,t+2])if(r%2!=0&&Math.floor(r/2)%2==0&&r>0)return Math.max(r,3);return Math.max(t,3)}_gaussianWeight(e){var t=1/3,r=-e*e/(2*t*t);return 1/(Math.sqrt(2*Math.PI)*t)*Math.exp(r)}_glslFloat(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return e.toFixed(t).replace(/0+$/,"")}}c.VertexUrl="kernelBlur",c.FragmentUrl="kernelBlur",c.Uniforms=["delta","direction"],c.Samplers=["circleOfConfusionSampler"]},270:function(e,t,r){"use strict";r.d(t,"a",function(){return _});var n=r(20),o=(r(12),r(125)),h=r(24),l=r(1);function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?d(Object(r),!0).forEach(function(t){Object(n.a)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):d(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}class _ extends o.b{static _GetDefines(e){return e&&e.extractDriverInfo().toLowerCase().indexOf("mali")>-1?"#define MALI 1\n":null}_gatherImports(e,t){e?(this._webGPUReady=!0,t.push(Promise.all([r.e(313).then(r.bind(null,1009)),r.e(314).then(r.bind(null,1010))]))):t.push(Promise.all([r.e(303).then(r.bind(null,1011)),r.e(304).then(r.bind(null,1012))]))}constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=c(c({},arguments.length>2?arguments[2]:void 0),{},{name:e,engine:t||h.a.LastCreatedEngine,useShaderStore:!0,useAsPostProcess:!0,vertexShader:_.VertexUrl,fragmentShader:_.FragmentUrl,uniforms:_.Uniforms});super(c(c({},r),{},{defines:_._GetDefines(r.engine)})),this.texelSize=new l.e(0,0)}bind(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];super.bind(e),this._drawWrapper.effect.setFloat2("texelSize",this.texelSize.x,this.texelSize.y)}}_.VertexUrl="fxaa",_.FragmentUrl="fxaa",_.Uniforms=["texelSize"]},297:function(e,t,r){"use strict";r.d(t,"a",function(){return h});var n=r(3),o=r(8);class h{constructor(e){this._vertexBuffers={},this._activePostProcesses=[],this.onBeforeRenderObservable=new o.a,this._scene=e}_prepareBuffers(){if(!this._vertexBuffers[n.c.PositionKind]){var e=[];e.push(1,1),e.push(-1,1),e.push(-1,-1),e.push(1,-1),this._vertexBuffers[n.c.PositionKind]=new n.c(this._scene.getEngine(),e,n.c.PositionKind,!1,!1,2),this._buildIndexBuffer()}}_buildIndexBuffer(){var e=[];e.push(0),e.push(1),e.push(2),e.push(0),e.push(2),e.push(3),this._indexBuffer=this._scene.getEngine().createIndexBuffer(e)}_getActivePostProcesses(source){var e=this._activePostProcesses;e.length=0;for(var t=0;t<source.length;t++){var r=source[t];r&&e.push(r)}return e}_rebuild(){var e=this._vertexBuffers[n.c.PositionKind];e&&(e._rebuild(),this._buildIndexBuffer())}_prepareFrame(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=this._scene.activeCamera;return!!r&&(!(!(t=t||this._getActivePostProcesses(r._postProcesses))||0===t.length||!this._scene.postProcessesEnabled)&&(t[0].activate(r,e,null!=t),!0))}directRender(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,h=arguments.length>5&&void 0!==arguments[5]&&arguments[5],l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:e.length,d=this._scene.getEngine(),c=0;c<l;c++){var _;if(c<e.length-1)e[c+1].activate(this._scene.activeCamera||this._scene,null==t?void 0:t.texture);else t?d.bindFramebuffer(t,n,void 0,void 0,r,o):h||d.restoreDefaultFramebuffer(),null===(_=d._debugInsertMarker)||void 0===_||_.call(d,"post process ".concat(e[c].name," output"));var f=e[c],m=f.apply();m&&(f.onBeforeRenderObservable.notifyObservers(m),this._prepareBuffers(),d.bindBuffers(this._vertexBuffers,this._indexBuffer,m),d.drawElementsType(0,0,6),f.onAfterRenderObservable.notifyObservers(m))}d.setDepthBuffer(!0),d.setDepthWrite(!0)}_finalizeFrame(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],h=this._scene.activeCamera;if(h&&(this.onBeforeRenderObservable.notifyObservers(this),0!==(n=n||this._getActivePostProcesses(h._postProcesses)).length&&this._scene.postProcessesEnabled)){for(var l=this._scene.getEngine(),d=0,c=n.length;d<c;d++){var _,f=n[d];if(d<c-1)f._outputTexture=n[d+1].activate(h,null==t?void 0:t.texture);else t?(l.bindFramebuffer(t,r,void 0,void 0,o),f._outputTexture=t):(l.restoreDefaultFramebuffer(),f._outputTexture=null),null===(_=l._debugInsertMarker)||void 0===_||_.call(l,"post process ".concat(n[d].name," output"));if(e)break;var m=f.apply();m&&(f.onBeforeRenderObservable.notifyObservers(m),this._prepareBuffers(),l.bindBuffers(this._vertexBuffers,this._indexBuffer,m),l.drawElementsType(0,0,6),f.onAfterRenderObservable.notifyObservers(m))}l.setDepthBuffer(!0),l.setDepthWrite(!0),l.setAlphaMode(0)}}dispose(){var e=this._vertexBuffers[n.c.PositionKind];
1e&&(e.dispose(),this._vertexBuffers[n.c.PositionKind]=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null)}}},300:function(e,t,r){"use strict";r.d(t,"a",function(){return y});var n=r(20),o=(r(12),r(117)),h=r(8),l=r(374),d=r(64),c=r(53),_=r(7),f=r(65),m=r(74);function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}class y{get renderList(){return this._renderList}set renderList(e){this._renderList!==e&&(this._unObserveRenderList&&(this._unObserveRenderList(),this._unObserveRenderList=null),e&&(this._unObserveRenderList=Object(d.c)(e,this._renderListHasChanged)),this._renderList=e)}get disableImageProcessing(){return this._disableImageProcessing}set disableImageProcessing(e){e!==this._disableImageProcessing&&(this._disableImageProcessing=e,this._scene.markAllMaterialsAsDirty(64))}get disableDepthPrePass(){return this._disableDepthPrePass}set disableDepthPrePass(e){this._disableDepthPrePass=e,this._renderingManager.disableDepthPrePass=e}get name(){return this._name}set name(e){if(this._name!==e){if(this._name=e,this._sceneUBOs)for(var i=0;i<this._sceneUBOs.length;++i)this._sceneUBOs[i].name="Scene ubo #".concat(i," for ").concat(this.name);if(this._scene)for(var t=0;t<this._renderPassIds.length;++t){var r=this._renderPassIds[t];this._engine._renderPassNames[r]="".concat(this._name,"#").concat(t)}}}get renderPassIds(){return this._renderPassIds}get currentRefreshId(){return this._currentRefreshId}getActiveMeshes(){return this._activeMeshes}setMaterialForRendering(e,t){var r;r=Array.isArray(e)?e:[e];for(var n=0;n<r.length;++n)for(var i=0;i<this.options.numPasses;++i){var o=r[n];r[n].isAnInstance&&(o=r[n].sourceMesh),o.setMaterialForRenderPass(this._renderPassIds[i],void 0!==t?Array.isArray(t)?t[i]:t:void 0)}}_freezeActiveMeshes(e){this._freezeActiveMeshesCancel=Object(c.b)(()=>this._checkReadiness(),()=>{if(this._freezeActiveMeshesCancel=null,e)for(var t=0;t<this._activeMeshes.length;t++)this._activeMeshes.data[t]._freeze();this._prepareRenderingManager(0,!0),this._isFrozen=!0},(e,t)=>{this._freezeActiveMeshesCancel=null,t?(_.a.Error("ObjectRenderer: Timeout while waiting for the renderer to be ready."),e&&_.a.Error(e)):(_.a.Error("ObjectRenderer: An unexpected error occurred while waiting for the renderer to be ready."),e&&(_.a.Error(e),e.stack&&_.a.Error(e.stack)))})}_unfreezeActiveMeshes(){var e;null===(e=this._freezeActiveMeshesCancel)||void 0===e||e.call(this),this._freezeActiveMeshesCancel=null;for(var t=0;t<this._activeMeshes.length;t++)this._activeMeshes.data[t]._unFreeze();this._isFrozen=!1}constructor(e,t,r){this._unObserveRenderList=null,this._renderListHasChanged=(e,t)=>{var r=this._renderList?this._renderList.length:0;if(0===t&&r>0||0===r)for(var n of this._scene.meshes)n._markSubMeshesAsLightDirty()},this.particleSystemList=null,this.spriteManagerList=null,this.getCustomRenderList=null,this.renderMeshes=!0,this.renderDepthOnlyMeshes=!0,this.renderOpaqueMeshes=!0,this.renderAlphaTestMeshes=!0,this.renderTransparentMeshes=!0,this.renderParticles=!0,this.renderSprites=!1,this.forceLayerMaskCheck=!1,this.enableBoundingBoxRendering=!1,this.enableOutlineRendering=!0,this._disableImageProcessing=!1,this.dontSetTransformationMatrix=!1,this._disableDepthPrePass=!1,this.onBeforeRenderObservable=new h.a,this.onAfterRenderObservable=new h.a,this.onBeforeRenderingManagerRenderObservable=new h.a,this.onAfterRenderingManagerRenderObservable=new h.a,this.onInitRenderingObservable=new h.a,this.onFinishRenderingObservable=new h.a,this.onFastPathRenderObservable=new h.a,this._currentRefreshId=-1,this._refreshRate=1,this._currentApplyByPostProcessSetting=!1,this._activeMeshes=new f.a(256),this._activeBoundingBoxes=new f.a(32),this._currentFrameId=-1,this._currentSceneUBOIndex=0,this._isFrozen=!1,this._freezeActiveMeshesCancel=null,this._currentSceneCamera=null,this.name=e,this._scene=t,this._engine=this._scene.getEngine(),this._useUBO=this._engine.supportsUniformBuffers,this.renderList=[],this._renderPassIds=[],this.options=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?v(Object(r),!0).forEach(function(t){Object(n.a)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({numPasses:1,doNotChangeAspectRatio:!0,enableClusteredLights:!1},r),this._createRenderPassId(),this.renderPassId=this._renderPassIds[0],this._renderingManager=new l.a(t),this._renderingManager._useSceneAutoClearSetup=!0,this.options.enableClusteredLights&&this.onInitRenderingObservable.add(()=>{for(var e of this._scene.lights)e.getTypeID()===m.a.LIGHTTYPEID_CLUSTERED_CONTAINER&&e.isSupported&&e._updateBatches(this.activeCamera).render()}),this._scene.addObjectRenderer(this)}_releaseRenderPassId(){for(var i=0;i<this.options.numPasses;++i)this._engine.releaseRenderPassId(this._renderPassIds[i]);this._renderPassIds.length=0}_createRenderPassId(){this._releaseRenderPassId();for(var i=0;i<this.options.numPasses;++i)this._renderPassIds[i]=this._engine.createRenderPassId("".concat(this.name,"#").concat(i))}_createSceneUBO(e,t){var r=this._scene.getEngine(),n=new o.a(r,void 0,t,e,void 0,!1);return n.addUniform("viewProjection",16),t&&n.addUniform("viewProjectionR",16),n.addUniform("view",16),n.addUniform("projection",16),n.addUniform("vEyePosition",4),n.addUniform("inverseProjection",16),n}_getSceneUBO(){var e;this._currentFrameId!==this._engine.frameId&&(this._currentSceneUBOIndex=0,this._currentFrameId=this._engine.frameId),this._sceneUBOs||(this._sceneUBOs=[],this._sceneUBOIsMultiview=[]);var t=this._engine._currentRenderTarget,r=!(!t||null===(e=t.texture)||void 0===e||!e.isMultiview)||!!this._scene._multiviewSceneUboIsActive;if(this._currentSceneUBOIndex>=this._sceneUBOs.length){var n=this._sceneUBOs.length;this._sceneUBOs.push(this._createSceneUBO("Scene ubo #".concat(n," for ").concat(this.name),r)),this._sceneUBOIsMultiview.push(r)}else this._sceneUBOIsMultiview[this._currentSceneUBOIndex]!==r&&(this._sceneUBOs[this._currentSceneUBOIndex].dispose(),this._sceneUBOs[this._currentSceneUBOIndex]=this._createSceneUBO("Scene ubo #".concat(this._currentSceneUBOIndex," for ").concat(this.name),r),this._sceneUBOIsMultiview[this._currentSceneUBOIndex]=r);var o=this._sceneUBOs[this._currentSceneUBOIndex++];return o.unbindEffect(),o}resetRefreshCounter(){this._currentRefreshId=-1}get refreshRate(){return this._refreshRate}set refreshRate(e){this._refreshRate=e,this.resetRefreshCounter()}shouldRender(){return!!this._engine.snapshotRendering||(-1===this._currentRefreshId||this.refreshRate===this._currentRefreshId?(this._currentRefreshId=1,!0):(this._currentRefreshId++,!1))}isReadyForRendering(e,t){this.prepareRenderList(),this.initRender(e,t);var r=this._checkReadiness();return this.finishRender(),r}prepareRenderList(){var e=this._scene;if(this._waitingRenderList){if(!this.renderListPredicate){this.renderList=[];for(var t=0;t<this._waitingRenderList.length;t++){var r=this._waitingRenderList[t],n=e.getMeshById(r);n&&this.renderList.push(n)}}this._waitingRenderList=void 0}if(this.renderListPredicate){this.renderList?this.renderList.length=0:this.renderList=[];for(var o=this._scene.meshes,h=0;h<o.length;h++){var l=o[h];this.renderListPredicate(l)&&this.renderList.push(l)}}this._currentApplyByPostProcessSetting=this._scene.imageProcessingConfiguration.applyByPostProcess,this._disableImageProcessing&&(this._scene.imageProcessingConfiguration._applyByPostProcess=this._disableImageProcessing)}initRender(e,t){var r,n=null!==(r=this.activeCamera)&&void 0!==r?r:this._scene.activeCamera;this._currentSceneCamera=this._scene.activeCamera,this._useUBO&&(this._currentSceneUBO=this._scene.getSceneUniformBuffer(),this._currentSceneUBO.unbindEffect(),this._scene.setSceneUniformBuffer(this._getSceneUBO())),this.onInitRenderingObservable.notifyObservers(this),n&&(this.dontSetTransformationMatrix||this._scene.setTransformMatrix(n.getViewMatrix(),n.getProjectionMatrix(!0)),this._scene._activeCamera=n,this._engine.setViewport(n.rigParent?n.rigParent.viewport:n.viewport,e,t)),this._useUBO&&this._scene.finalizeSceneUbo(),this._defaultRenderListPrepared=!1}finishRender(){var e=this._scene;this._useUBO&&this._scene.setSceneUniformBuffer(this._currentSceneUBO),this._disableImageProcessing&&(e.imageProcessingConfiguration._applyByPostProcess=this._currentApplyByPostProcessSetting),e._activeCamera=this._currentSceneCamera,this._currentSceneCamera&&(this.activeCamera&&this.activeCamera!==e.activeCamera&&e.setTransformMatrix(this._currentSceneCamera.getViewMatrix(),this._currentSceneCamera.getProjectionMatrix(!0)),this._engine.setViewport(this._currentSceneCamera.viewport)),e.resetCachedMaterial(),this.onFinishRenderingObservable.notifyObservers(this)}render(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this._engine.currentRenderPassId;if(this._engine.currentRenderPassId=this._renderPassIds[e],this.onBeforeRenderObservable.notifyObservers(e),this._engine.snapshotRendering&&1===this._engine.snapshotRenderingMode)this.onFastPathRenderObservable.notifyObservers(e);else{var n,o,h=this._prepareRenderingManager(e),l=null===(n=(o=this._scene).getOutlineRenderer)||void 0===n?void 0:n.call(o),d=null==l?void 0:l.enabled;l&&(l.enabled=this.enableOutlineRendering),this.onBeforeRenderingManagerRenderObservable.notifyObservers(e),this._renderingManager.render(this.customRenderFunction,h,this.renderParticles,this.renderSprites,this.renderDepthOnlyMeshes,this.renderOpaqueMeshes,this.renderAlphaTestMeshes,this.renderTransparentMeshes,this.customRenderTransparentSubMeshes,this.spriteManagerList),this.onAfterRenderingManagerRenderObservable.notifyObservers(e),l&&(l.enabled=d)}t||this.onAfterRenderObservable.notifyObservers(e),this._engine.currentRenderPassId=r}_checkReadiness(){var e=this._scene,t=this._engine.currentRenderPassId,r=!0;e.getViewMatrix()||e.updateTransformMatrix();for(var n=this.options.numPasses,o=0;o<n&&r;o++){var h=this.renderList?this.renderList:e.frameGraph?e.meshes:e.getActiveMeshes().data,l=this.renderList||e.frameGraph?h.length:e.getActiveMeshes().length;this._engine.currentRenderPassId=this._renderPassIds[o],this.onBeforeRenderObservable.notifyObservers(o);var d=null,c=l;this.getCustomRenderList&&(d=this.getCustomRenderList(o,h,l))&&(c=d.length),d||(d=h),this.options.doNotChangeAspectRatio||e.updateTransformMatrix(!0);for(var i=0;i<c&&r;++i){var _,f=d[i];if(f.isEnabled()&&!f.isBlocked&&f.isVisible&&f.subMeshes){if(this.customIsReadyFunction){if(!this.customIsReadyFunction(f,this.refreshRate,!0)){r=!1;continue}}else if(!f.isReady(!0)){r=!1;continue}var m=f._edgesRenderer,v=f.hasThinInstances;if(f.isAnInstance){var y,P=f.sourceMesh;P.edgesShareWithInstances&&null!==(y=P._edgesRenderer)&&void 0!==y&&y.isEnabled&&(m=P._edgesRenderer,v=!0)}else f.hasInstances&&f.edgesShareWithInstances&&(v=!0);!this.customRenderFunction&&this.renderOpaqueMeshes&&null!==(_=m)&&void 0!==_&&_.isEnabled&&(m.isReady(v)||(r=!1))}}if(this.renderParticles&&e.particlesEnabled){var O=this.particleSystemList||e.particleSystems;for(var R of O)R.isReady()||(r=!1)}if(this.renderSprites&&e.spritesEnabled){var E=this.spriteManagerList||e.spriteManagers;if(E)for(var S of E)e.activeCamera&&0===(S.layerMask&e.activeCamera.layerMask)||S.isReady&&!S.isReady()&&(r=!1)}this.onAfterRenderObservable.notifyObservers(o),n>1&&(e.incrementRenderId(),e.resetCachedMaterial())}return this._engine.currentRenderPassId=t,r}_prepareRenderingManager(){var e,t,r,n,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,h=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=this._scene,d=null,c=this.renderList?this.renderList:l.frameGraph?l.meshes:l.getActiveMeshes().data,_=this.renderList||l.frameGraph?c.length:l.getActiveMeshes().length;if(this.getCustomRenderList&&(d=this.getCustomRenderList(o,c,_)),d)r=d.length,n=this.forceLayerMaskCheck;else{if(this._defaultRenderListPrepared&&!h&&!this._engine.isWebGPU)return c;this._defaultRenderListPrepared=!0,d=c,r=_,n=!this.renderList||this.forceLayerMaskCheck}var f=l.activeCamera,m=null!==(e=this.cameraForLOD)&&void 0!==e?e:f,v=null===(t=l.getBoundingBoxRenderer)||void 0===t?void 0:t.call(l);
1if(l._activeMeshesFrozen&&this._isFrozen){if(this._renderingManager.resetSprites(),this.enableBoundingBoxRendering&&v){v.reset();for(var i=0;i<this._activeBoundingBoxes.length;i++){var y=this._activeBoundingBoxes.data[i];v.renderList.push(y)}}return d}if(this._renderingManager.reset(),this._activeMeshes.reset(),this._activeBoundingBoxes.reset(),v&&v.reset(),this.renderMeshes)for(var P=l.getRenderId(),O=l.getFrameId(),R=0;R<r;R++){var E=d[R];if(E&&!E.isBlocked){if(this.customIsReadyFunction){if(!this.customIsReadyFunction(E,this.refreshRate,!1)){this.resetRefreshCounter();continue}}else if(!E.isReady(0===this.refreshRate)){this.resetRefreshCounter();continue}var S=void 0;if(m){var T=E._internalAbstractMeshDataInfo._currentLOD.get(m);T&&T[1]===O?S=T[0]:(S=l.customLODSelector?l.customLODSelector(E,m):E.getLOD(m),T?(T[0]=S,T[1]=O):E._internalAbstractMeshDataInfo._currentLOD.set(m,[S,O]))}else S=E;if(!S)continue;S!==E&&0!==S.billboardMode&&S.computeWorldMatrix(),S._preActivateForIntermediateRendering(P);var C=void 0;if(C=!(!n||!f)&&0===(E.layerMask&f.layerMask),E.isEnabled()&&E.isVisible&&E.subMeshes&&!C){if(this._activeMeshes.push(E),S._internalAbstractMeshDataInfo._wasActiveLastFrame=!0,S!==E&&S._activate(P,!0),this.enableBoundingBoxRendering&&v&&v._preActiveMesh(E),E._activate(P,!0)&&E.subMeshes.length){E.isAnInstance?E._internalAbstractMeshDataInfo._actAsRegularMesh&&(S=E):S._internalAbstractMeshDataInfo._onlyForInstancesIntermediate=!1,S._internalAbstractMeshDataInfo._isActiveIntermediate=!0,l._prepareSkeleton(S);for(var I=0;I<S.subMeshes.length;I++){var x=S.subMeshes[I];this.enableBoundingBoxRendering&&v&&v._evaluateSubMesh(E,x),this._renderingManager.dispatch(x,S)}}E._postActivate()}}}if(this.enableBoundingBoxRendering&&v&&h)for(var M=0;M<v.renderList.length;M++){var D=v.renderList.data[M];this._activeBoundingBoxes.push(D)}if(this._scene.particlesEnabled&&this.renderParticles){this._scene.onBeforeParticlesRenderingObservable.notifyObservers(this._scene);for(var A=this.particleSystemList||l.particleSystems,F=0;F<A.length;F++){var w=A[F],B=w.emitter;w.isStarted()&&B&&(!B.position||B.isEnabled())&&this._renderingManager.dispatchParticles(w)}this._scene.onAfterParticlesRenderingObservable.notifyObservers(this._scene)}return d}get renderingManager(){return this._renderingManager}setRenderingOrder(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this._renderingManager.setRenderingOrder(e,t,r,n)}setRenderingAutoClearDepthStencil(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this._renderingManager.setRenderingAutoClearDepthStencil(e,t,r,n),this._renderingManager._useSceneAutoClearSetup=!1}clone(){var e=new y(this.name,this._scene,this.options);return this.renderList&&(e.renderList=this.renderList.slice(0)),e}dispose(){for(var e=this.renderList?this.renderList:this._scene.getActiveMeshes().data,t=this.renderList?this.renderList.length:this._scene.getActiveMeshes().length,i=0;i<t;i++){var r=e[i];r&&void 0!==r.getMaterialForRenderPass(this.renderPassId)&&r.setMaterialForRenderPass(this.renderPassId,void 0)}if(this.onInitRenderingObservable.clear(),this.onFinishRenderingObservable.clear(),this.onBeforeRenderObservable.clear(),this.onAfterRenderObservable.clear(),this.onBeforeRenderingManagerRenderObservable.clear(),this.onAfterRenderingManagerRenderObservable.clear(),this.onFastPathRenderObservable.clear(),this._releaseRenderPassId(),this.renderList=null,this._sceneUBOs)for(var n of this._sceneUBOs)n.dispose();this._sceneUBOs=void 0,this._scene.removeObjectRenderer(this)}_rebuild(){this.refreshRate===y.REFRESHRATE_RENDER_ONCE&&(this.refreshRate=y.REFRESHRATE_RENDER_ONCE)}freeRenderingGroups(){this._renderingManager&&this._renderingManager.freeRenderingGroups()}}y.REFRESHRATE_RENDER_ONCE=0,y.REFRESHRATE_RENDER_ONEVERYFRAME=1,y.REFRESHRATE_RENDER_ONEVERYTWOFRAMES=2},374:function(e,t,r){"use strict";r.d(t,"a",function(){return d});r(12),r(126);var n=r(65),o=r(1);class h{set opaqueSortCompareFn(e){this._opaqueSortCompareFn=e||h.PainterSortCompare,this._renderOpaque=this._renderOpaqueSorted}set alphaTestSortCompareFn(e){this._alphaTestSortCompareFn=e||h.PainterSortCompare,this._renderAlphaTest=this._renderAlphaTestSorted}set transparentSortCompareFn(e){this._transparentSortCompareFn=e||h.defaultTransparentSortCompare,this._renderTransparent=this._renderTransparentSorted}constructor(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;this.index=e,this._opaqueSubMeshes=new n.a(256),this._transparentSubMeshes=new n.a(256),this._alphaTestSubMeshes=new n.a(256),this._depthOnlySubMeshes=new n.a(256),this._particleSystems=new n.a(256),this._spriteManagers=new n.a(256),this._empty=!0,this._edgesRenderers=new n.b(16),this.disableDepthPrePass=!1,this._scene=t,this.opaqueSortCompareFn=r,this.alphaTestSortCompareFn=o,this.transparentSortCompareFn=h}render(e,t,r,n){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],h=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],l=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],d=!(arguments.length>7&&void 0!==arguments[7])||arguments[7],c=arguments.length>8?arguments[8]:void 0;if(e)e(this._opaqueSubMeshes,this._alphaTestSubMeshes,this._transparentSubMeshes,this._depthOnlySubMeshes);else{var _=this._scene.getEngine();o&&0!==this._depthOnlySubMeshes.length&&(_.setColorWrite(!1),this._renderAlphaTest(this._depthOnlySubMeshes),_.setColorWrite(!0)),h&&0!==this._opaqueSubMeshes.length&&this._renderOpaque(this._opaqueSubMeshes),l&&0!==this._alphaTestSubMeshes.length&&this._renderAlphaTest(this._alphaTestSubMeshes);var f=_.getStencilBuffer();if(_.setStencilBuffer(!1),t&&this._renderSprites(),r&&this._renderParticles(n),this.onBeforeTransparentRendering&&this.onBeforeTransparentRendering(),d&&(c||0!==this._transparentSubMeshes.length||this._scene.useOrderIndependentTrans
1parency)){if(_.setStencilBuffer(f),c)c(this._transparentSubMeshes,this);else if(this._scene.useOrderIndependentTransparency){var m=this._scene.depthPeelingRenderer.render(this._transparentSubMeshes);m.length&&this._renderTransparent(m)}else this._renderTransparent(this._transparentSubMeshes);_.setAlphaMode(0)}if(_.setStencilBuffer(!1),h&&this._edgesRenderers.length){for(var v=0;v<this._edgesRenderers.length;v++)this._edgesRenderers.data[v].render();_.setAlphaMode(0)}_.setStencilBuffer(f)}}_renderOpaqueSorted(e){h._RenderSorted(e,this._opaqueSortCompareFn,this._scene.activeCamera,!1,this.disableDepthPrePass)}_renderAlphaTestSorted(e){h._RenderSorted(e,this._alphaTestSortCompareFn,this._scene.activeCamera,!1,this.disableDepthPrePass)}_renderTransparentSorted(e){h._RenderSorted(e,this._transparentSortCompareFn,this._scene.activeCamera,!0,this.disableDepthPrePass)}static _RenderSorted(e,t,r,n,l){var d,c=0,_=r?r.globalPosition:h._ZeroVector;if(n)for(;c<e.length;c++)(d=e.data[c])._alphaIndex=d.getMesh().alphaIndex,d._distanceToCamera=o.f.Distance(d.getBoundingInfo().boundingSphere.centerWorld,_);var f=e.length===e.data.length?e.data:e.data.slice(0,e.length);t&&f.sort(t);var m=f[0].getMesh().getScene();for(c=0;c<f.length;c++)if(d=f[c],!m._activeMeshesFrozenButKeepClipping||d.isInFrustum(m._frustumPlanes)){if(n){var v=d.getMaterial();if(v&&v.needDepthPrePass&&!l){var y=v.getScene().getEngine();y.setColorWrite(!1),y.setAlphaMode(0),d.render(!1),y.setColorWrite(!0)}}d.render(n)}}static defaultTransparentSortCompare(a,b){return a._alphaIndex>
1b._alphaIndex?1:a._alphaIndex<b._alphaIndex?-1:h.backToFrontSortCompare(a,b)}static backToFrontSortCompare(a,b){return a._distanceToCamera<b._distanceToCamera?1:a._distanceToCamera>b._distanceToCamera?-1:0}static frontToBackSortCompare(a,b){return a._distanceToCamera<b._distanceToCamera?-1:a._distanceToCamera>b._distanceToCamera?1:0}static PainterSortCompare(a,b){var e=a.getMesh(),t=b.getMesh();return e.material&&t.material?e.material.uniqueId-t.material.uniqueId:e.uniqueId-t.uniqueId}prepare(){this._opaqueSubMeshes.reset(),this._transparentSubMeshes.reset(),this._alphaTestSubMeshes.reset(),this._depthOnlySubMeshes.reset(),this._particleSystems.reset(),this.prepareSprites(),this._edgesRenderers.reset(),this._empty=!0}prepareSprites(){this._spriteManagers.reset()}dispose(){this._opaqueSubMeshes.dispose(),this._transparentSubMeshes.dispose(),this._alphaTestSubMeshes.dispose(),this._depthOnlySubMeshes.dispose(),this._particleSystems.dispose(),this._spriteManagers.dispose(),this._edgesRenderers.dispose()}dispatch(e,t,r){void 0===t&&(t=e.getMesh()),void 0===r&&(r=e.getMaterial()),null!=r&&(r.needAlphaBlendingForMesh(t)?this._transparentSubMeshes.push(e):r.needAlphaTestingForMesh(t)?(r.needDepthPrePass&&!this.disableDepthPrePass&&this._depthOnlySubMeshes.push(e),this._alphaTestSubMeshes.push(e)):(r.needDepthPrePass&&!this.disableDepthPrePass&&this._depthOnlySubMeshes.push(e),this._opaqueSubMeshes.push(e)),t._renderingGroup=this,t._edgesRenderer&&t.isEnabled()&&t.isVisible&&t._edgesRenderer.isEnabled&&this._edgesRenderers.pushNoDuplicate(t._edgesRenderer),this._empty=!1)}dispatchSprites(e){this._spriteManagers.push(e),this._empty=!1}dispatchParticles(e){this._particleSystems.push(e),this._empty=!1}_renderParticles(e){if(0!==this._particleSystems.length){var t=this._scene.activeCamera;this._scene.onBeforeParticlesRenderingObservable.notifyObservers(this._scene);for(var r=0;r<this._particleSystems.length;r++){var n=this._particleSystems.data[r];if(0!==(t&&t.layerMask&n.layerMask)){var o=n.emitter;o.position&&e&&-1===e.indexOf(o)||this._scene._activeParticles.addCount(n.render(),!1)}}this._scene.onAfterParticlesRenderingObservable.notifyObservers(this._scene)}}_renderSprites(){if(this._scene.spritesEnabled&&0!==this._spriteManagers.length){var e=this._scene.activeCamera;this._scene.onBeforeSpritesRenderingObservable.notifyObservers(this._scene);for(var t=0;t<this._spriteManagers.length;t++){var r=this._spriteManagers.data[t];0!==(e&&e.layerMask&r.layerMask)&&r.render()}this._scene.onAfterSpritesRenderingObservable.notifyObservers(this._scene)}}}h._ZeroVector=o.f.Zero();class l{}class d{get disableDepthPrePass(){return this._disableDepthPrePass}set disableDepthPrePass(e){for(var t of(this._disableDepthPrePass=e,this._renderingGroups))t.disableDepthPrePass=e}get maintainStateBetweenFrames(){return this._maintainStateBetweenFrames}set maintainStateBetweenFrames(e){e!==this._maintainStateBetweenFrames&&(this._maintainStateBetweenFrames=e,this._maintainStateBetweenFrames||this.restoreDispachedFlags())}restoreDispachedFlags(){for(var e of this._scene.meshes)if(e.subMeshes)for(var t of e.subMeshes)t._wasDispatched=!1;if(this._scene.spriteManagers)for(var r of this._scene.spriteManagers)r._wasDispatched=!1;for(var n of this._scene.particleSystems)n._wasDispatched=!1}constructor(e){this._useSceneAutoClearSetup=!1,this._disableDepthPrePass=!1,this._renderingGroups=new Array,this._autoClearDepthStencil={},this._customOpaqueSortCompareFn={},this._customAlphaTestSortCompareFn={},this._customTransparentSortCompareFn={},this._renderingGroupInfo=new l,this._maintainStateBetweenFrames=!1,this._scene=e;for(var i=d.MIN_RENDERINGGROUPS;i<d.MAX_RENDERINGGROUPS;i++)this._autoClearDepthStencil[i]={autoClear:!0,depth:!0,stencil:!0}}get renderingGroups(){return this._renderingGroups}getRenderingGroup(e){var t=e||0;return this._prepareRenderingGroup(t),this._renderingGroups[t]}_clearDepthStencilBuffer(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this._depthStencilBufferAlreadyCleaned||(this._scene.getEngine().clear(null,!1,e,t),this._depthStencilBufferAlreadyCleaned=!0)}render(e,t,r,n){var o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],h=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],l=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],c=!(arguments.length>7&&void 0!==arguments[7])||arguments[7],_=arguments.length>8?arguments[8]:void 0,f=arguments.length>9?arguments[9]:void 0,m=this._renderingGroupInfo;
1m.scene=this._scene,m.camera=this._scene.activeCamera,m.renderingManager=this;var v=null!=f?f:this._scene.spriteManagers;if(v&&n)for(var y=0;y<v.length;y++){var P=v[y];this.dispatchSprites(P)}for(var O=d.MIN_RENDERINGGROUPS;O<d.MAX_RENDERINGGROUPS;O++){this._depthStencilBufferAlreadyCleaned=O===d.MIN_RENDERINGGROUPS;var R=this._renderingGroups[O];if(R&&!R._empty){var E=1<<O;if(m.renderingGroupId=O,this._scene.onBeforeRenderingGroupObservable.notifyObservers(m,E),d.AUTOCLEAR){var S=this._useSceneAutoClearSetup?this._scene.getAutoClearDepthStencilSetup(O):this._autoClearDepthStencil[O];S&&S.autoClear&&this._clearDepthStencilBuffer(S.depth,S.stencil)}for(var T of this._scene._beforeRenderingGroupDrawStage)T.action(O);for(var C of(R.render(e,n,r,t,o,h,l,c,_),this._scene._afterRenderingGroupDrawStage))C.action(O);this._scene.onAfterRenderingGroupObservable.notifyObservers(m,E)}}}reset(){if(!this.maintainStateBetweenFrames)for(var e=d.MIN_RENDERINGGROUPS;e<d.MAX_RENDERINGGROUPS;e++){var t=this._renderingGroups[e];t&&t.prepare()}}resetSprites(){if(!this.maintainStateBetweenFrames)for(var e=d.MIN_RENDERINGGROUPS;e<d.MAX_RENDERINGGROUPS;e++){var t=this._renderingGroups[e];t&&t.prepareSprites()}}dispose(){this.freeRenderingGroups(),this._renderingGroups.length=0,this._renderingGroupInfo=null}freeRenderingGroups(){for(var e=d.MIN_RENDERINGGROUPS;e<d.MAX_RENDERINGGROUPS;e++){var t=this._renderingGroups[e];t&&t.dispose()}}_prepareRenderingGroup(e){void 0===this._renderingGroups[e]&&(this._renderingGroups[e]=new h(e,this._scene,this._customOpaqueSortCompareFn[e],this._customAlphaTestSortCompareFn[e],this._customTransparentSortCompareFn[e]),this._renderingGroups[e].disableDepthPrePass=this._disableDepthPrePass)}dispatchSprites(e){this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(e.renderingGroupId).dispatchSprites(e))}dispatchParticles(e){this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(e.renderingGroupId).dispatchParticles(e))}dispatch(e,t,r){void 0===t&&(t=e.getMesh()),this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(t.renderingGroupId).dispatch(e,t,r))}setRenderingOrder(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(this._customOpaqueSortCompareFn[e]=t,this._customAlphaTestSortCompareFn[e]=r,this._customTransparentSortCompareFn[e]=n,this._renderingGroups[e]){var o=this._renderingGroups[e];o.opaqueSortCompareFn=this._customOpaqueSortCompareFn[e],o.alphaTestSortCompareFn=this._customAlphaTestSortCompareFn[e],o.transparentSortCompareFn=this._customTransparentSortCompareFn[e]}}setRenderingAutoClearDepthStencil(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];this._autoClearDepthStencil[e]={autoClear:t,depth:r,stencil:n}}getAutoClearDepthStencilSetup(e){return this._autoClearDepthStencil[e]}}d.MAX_RENDERINGGROUPS=4,d.MIN_RENDERINGGROUPS=0,d.AUTOCLEAR=!0},421:function(e,t,r){"use strict";r.d(t,"a",function(){return C});var n=r(20),o=(r(36),r(0)),h=r(96),l=r(31),d=r(2),c=r(26),_=r(266);r(21);function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach(function(t){Object(n.a)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var v,y,P,O,R,E,S,T,C=(S=h.a,T=[],v=class extends S{get direction(){return this._effectWrapper.direction}set direction(e){this._effectWrapper.direction=e}set kernel(e){this._effectWrapper.kernel=e}get kernel(){return this._effectWrapper.kernel}set packedFloat(e){this._effectWrapper.packedFloat=e}get packedFloat(){return this._effectWrapper.packedFloat}getClassName(){return"BlurPostProcess"}constructor(e,t,r,n){var h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,d=arguments.length>5&&void 0!==arguments[5]?arguments[5]:l.b.BILINEAR_SAMPLINGMODE,c=arguments.length>6?arguments[6]:void 0,f=arguments.length>7?arguments[7]:void 0,v=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,y=arguments.length>9&&void 0!==arguments[9]?arguments[9]:"",P=arguments.length>11&&void 0!==arguments[11]?arguments[11]:5,O="number"==typeof n?arguments.length>10&&void 0!==arguments[10]&&arguments[10]:!!n.blockCompilation,R=m(m({uniforms:_.a.Uniforms,samplers:_.a.Samplers,size:"number"==typeof n?n:void 0,camera:h,samplingMode:d,engine:c,reusable:f,textureType:v,vertexUrl:_.a.VertexUrl,indexParameters:{varyingCount:0,depCount:0},textureFormat:P,defines:y},n),{},{blockCompilation:!0});super(e,_.a.FragmentUrl,m({effectWrapper:"number"!=typeof n&&n.effectWrapper?void 0:new _.a(e,c,void 0,void 0,R)},R)),Object(o.d)(this,T),this._effectWrapper.options.blockCompilation=O,this.direction=t,this.onApplyObservable.add(()=>{this._effectWrapper.textureWidth=this._outputTexture?this._outputTexture.width:this.width,this._effectWrapper.textureHeight=this._outputTexture?this._outputTexture.height:this.height}),this.kernel=r}updateEffect(){var e=arguments.length>4?arguments[4]:void 0,t=arguments.length>5?arguments[5]:void 0;this._effectWrapper._updateParameters(e,t)}static _Parse(e,t,r,n){return c.a.Parse(()=>new v(e.name,e.direction,e.kernel,e.options,t,e.renderTargetSamplingMode,r.getEngine(),e.reusable,e.textureType,void 0,!1),e,r,n)}},E="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(R=S[Symbol.metadata])&&void 0!==R?R:null):void 0,y=[Ob
1ject(d.n)()],P=[Object(d.d)()],O=[Object(d.d)()],Object(o.c)(v,null,y,{kind:"getter",name:"direction",static:!1,private:!1,access:{has:e=>"direction"in e,get:e=>e.direction},metadata:E},null,T),Object(o.c)(v,null,P,{kind:"setter",name:"kernel",static:!1,private:!1,access:{has:e=>"kernel"in e,set:(e,t)=>{e.kernel=t}},metadata:E},null,T),Object(o.c)(v,null,O,{kind:"setter",name:"packedFloat",static:!1,private:!1,access:{has:e=>"packedFloat"in e,set:(e,t)=>{e.packedFloat=t}},metadata:E},null,T),E&&Object.defineProperty(v,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:E}),v)},428:function(e,t,r){"use strict";r.d(t,"b",function(){return l}),r.d(t,"a",function(){return d});var n=r(1),o=r(11),h=r(86);class l{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.radius=e,this.radiusRange=t,this.directionRandomizer=r}startDirectionFunction(e,t,r,h){var l=r.position.subtract(e.getTranslation()).normalize(),d=Object(o.RandomRange)(0,this.directionRandomizer),c=Object(o.RandomRange)(0,this.directionRandomizer),_=Object(o.RandomRange)(0,this.directionRandomizer);l.x+=d,l.y+=c,l.z+=_,l.normalize(),h?t.copyFrom(l):n.f.TransformNormalFromFloatsToRef(l.x,l.y,l.z,e,t)}startPositionFunction(e,t,r,h){var l=this.radius-Object(o.RandomRange)(0,this.radius*this.radiusRange),d=Object(o.RandomRange)(0,1),c=Object(o.RandomRange)(0,2*Math.PI),_=Math.acos(2*d-1),f=l*Math.cos(c)*Math.sin(_),m=l*Math.cos(_),v=l*Math.sin(c)*Math.sin(_);h?t.copyFromFloats(f,m,v):n.f.TransformCoordinatesFromFloatsToRef(f,m,v,e,t)}clone(){var e=new l(this.radius,this.directionRandomizer);return h.a.DeepCopy(this,e),e}applyToShader(e){e.setFloat("radius",this.radius),e.setFloat("radiusRange",this.radiusRange),e.setFloat("directionRandomizer",this.directionRandomizer)}buildUniformLayout(e){e.addUniform("radius",1),e.addUniform("radiusRange",1),e.addUniform("directionRandomizer",1)}getEffectDefines(){return"#define SPHEREEMITTER"}getClassName(){return"SphereParticleEmitter"}serialize(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e}parse(e){this.radius=e.radius,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer}}class d extends l{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.f(0,1,0),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n.f(0,1,0);super(e),this.direction1=t,this.direction2=r}startDirectionFunction(e,t,r,h){var l=Object(o.RandomRange)(this.direction1.x,this.direction2.x),d=Object(o.RandomRange)(this.direction1.y,this.direction2.y),c=Object(o.RandomRange)(this.direction1.z,this.direction2.z);h?t.copyFromFloats(l,d,c):n.f.TransformNormalFromFloatsToRef(l,d,c,e,t)}clone(){var e=new d(this.radius,this.direction1,this.direction2);return h.a.DeepCopy(this,e),e}applyToShader(e){e.setFloat("radius",this.radius),e.setFloat("radiusRange",this.radiusRange),e.setVector3("direction1",this.direction1),e.setVector3("direction2",this.direction2)}buildUniformLayout(e){e.addUniform("radius",1),e.addUniform("radiusRange",1),e.addUniform("direction1",3),e.addUniform("direction2",3)}getEffectDefines(){return"#define SPHEREEMITTER\n#define DIRECTEDSPHEREEMITTER"}getClassName(){return"SphereDirectedParticleEmitter"}serialize(){var e=super.serialize();return e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e}parse(e){super.parse(e),n.f.FromArrayToRef(e.direction1,0,this.direction1),n.f.FromArrayToRef(e.direction2,0,this.direction2)}}},429:function(e,t,r){"use strict";r.d(t,"b",function(){return l}),r.d(t,"a",function(){return d});var n=r(1),o=r(11),h=r(86);class l{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;this.radius=e,this.height=t,this.radiusRange=r,this.directionRandomizer=o,this._tempVector=n.f.Zero()}startDirectionFunction(e,t,r,h,l){r.position.subtractToRef(e.getTranslation(),this._tempVector),this._tempVector.normalize(),n.f.TransformNormalToRef(this._tempVector,l,this._tempVector);var d=Object(o.RandomRange)(-this.directionRandomizer/2,this.directionRandomizer/2),c=Math.atan2(this._tempVector.x,this._tempVector.z);c+=Object(o.RandomRange)(-Math.PI/2,Math.PI/2)*this.directionRandomizer,this._tempVector.y=d,this._tempVector.x=Math.sin(c),this._tempVector.z=Math.cos(c),this._tempVector.normalize(),h?t.copyFrom(this._tempVector):n.f.TransformNormalFromFloatsToRef(this._tempVector.x,this._tempVector.y,this._tempVector.z,e,t)}startPositionFunction(e,t,r,h){var l=Object(o.RandomRange)(-this.height/2,this.height/2),d=Object(o.RandomRange)(0,2*Math.PI),c=Object(o.RandomRange)((1-this.radiusRange)*(1-this.radiusRange),1),_=Math.sqrt(c)*this.radius,f=_*Math.cos(d),m=_*Math.sin(d);h?t.copyFromFloats(f,l,m):n.f.TransformCoordinatesFromFloatsToRef(f,l,m,e,t)}clone(){var e=new l(this.radius,this.directionRandomizer);return h.a.DeepCopy(this,e),e}applyToShader(e){e.setFloat("radius",this.radius),e.setFloat("height",this.height),e.setFloat("radiusRange",this.radiusRange),e.setFloat("directionRandomizer",this.directionRandomizer)}buildUniformLayout(e){e.addUniform("radius",1),e.addUniform("height",1),e.addUniform("radiusRange",1),e.addUniform("directionRandomizer",1)}getEffectDefines(){return"#define CYLINDEREMITTER"}getClassName(){return"CylinderParticleEmitter"}serialize(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.height=this.height,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e}parse(e){this.radius=e.radius,this.height=e.height,this.radiusRange=e.radiu
1sRange,this.directionRandomizer=e.directionRandomizer}}class d extends l{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new n.f(0,1,0),h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new n.f(0,1,0);super(e,t,r),this.direction1=o,this.direction2=h}startDirectionFunction(e,t,r,h){var l=Object(o.RandomRange)(this.direction1.x,this.direction2.x),d=Object(o.RandomRange)(this.direction1.y,this.direction2.y),c=Object(o.RandomRange)(this.direction1.z,this.direction2.z);h?t.copyFromFloats(l,d,c):n.f.TransformNormalFromFloatsToRef(l,d,c,e,t)}clone(){var e=new d(this.radius,this.height,this.radiusRange,this.direction1,this.direction2);return h.a.DeepCopy(this,e),e}applyToShader(e){e.setFloat("radius",this.radius),e.setFloat("height",this.height),e.setFloat("radiusRange",this.radiusRange),e.setVector3("direction1",this.direction1),e.setVector3("direction2",this.direction2)}buildUniformLayout(e){e.addUniform("radius",1),e.addUniform("height",1),e.addUniform("radiusRange",1),e.addUniform("direction1",3),e.addUniform("direction2",3)}getEffectDefines(){return"#define CYLINDEREMITTER\n#define DIRECTEDCYLINDEREMITTER"}getClassName(){return"CylinderDirectedParticleEmitter"}serialize(){var e=super.serialize();return e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e}parse(e){super.parse(e),n.f.FromArrayToRef(e.direction1,0,this.direction1),n.f.FromArrayToRef(e.direction2,0,this.direction2)}}},430:function(e,t,r){"use strict";r.d(t,"b",function(){return l}),r.d(t,"a",function(){return d});var n=r(1),o=r(86),h=r(11);class l{get radius(){return this._radius}set radius(e){this._radius=e,this._buildHeight()}get angle(){return this._angle}set angle(e){this._angle=e,this._buildHeight()}_buildHeight(){0!==this._angle?this._height=this._radius/Math.tan(this._angle/2):this._height=1}constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Math.PI,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.directionRandomizer=r,this.radiusRange=1,this.heightRange=1,this.emitFromSpawnPointOnly=!1,this.angle=t,this.radius=e}startDirectionFunction(e,t,r,o){var l=r.position.subtract(e.getTranslation()).normalize(),d=Object(h.RandomRange)(0,this.directionRandomizer),c=Object(h.RandomRange)(0,this.directionRandomizer),_=Object(h.RandomRange)(0,this.directionRandomizer);l.x+=d,l.y+=c,l.z+=_,l.normalize(),o?t.copyFrom(l):n.f.TransformNormalFromFloatsToRef(l.x,l.y,l.z,e,t)}startPositionFunction(e,t,r,o){var l,s=Object(h.RandomRange)(0,2*Math.PI);l=this.emitFromSpawnPointOnly?1e-4:1-(l=Object(h.RandomRange)(0,this.heightRange))*l;var d=this._radius-Object(h.RandomRange)(0,this._radius*this.radiusRange),c=(d*=l)*Math.sin(s),_=d*Math.cos(s),f=l*this._height;if(o)return t.x=c,t.y=f,void(t.z=_);n.f.TransformCoordinatesFromFloatsToRef(c,f,_,e,t)}clone(){var e=new l(this._radius,this._angle,this.directionRandomizer);return o.a.DeepCopy(this,e),e}applyToShader(e){e.setFloat2("radius",this._radius,this.radiusRange),e.setFloat("coneAngle",this._angle),e.setFloat2("height",this._height,this.heightRange),e.setFloat("directionRandomizer",this.directionRandomizer)}buildUniformLayout(e){e.addUniform("radius",2),e.addUniform("coneAngle",1),e.addUniform("height",2),e.addUniform("directionRandomizer",1)}getEffectDefines(){var e="#define CONEEMITTER";return this.emitFromSpawnPointOnly&&(e+="\n#define CONEEMITTERSPAWNPOINT"),e}getClassName(){return"ConeParticleEmitter"}serialize(){var e={};return e.type=this.getClassName(),e.radius=this._radius,e.angle=this._angle,e.directionRandomizer=this.directionRandomizer,e.radiusRange=this.radiusRange,e.heightRange=this.heightRange,e.emitFromSpawnPointOnly=this.emitFromSpawnPointOnly,e}parse(e){this.radius=e.radius,this.angle=e.angle,this.directionRandomizer=e.directionRandomizer,this.radiusRange=void 0!==e.radiusRange?e.radiusRange:1,this.heightRange=void 0!==e.heightRange?e.heightRange:1,this.emitFromSpawnPointOnly=void 0!==e.emitFromSpawnPointOnly&&e.emitFromSpawnPointOnly}}class d extends l{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Math.PI,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n.f(0,1,0),o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new n.f(0,1,0);super(e,t),this.direction1=r,this.direction2=o}startDirectionFunction(e,t,r,o){var l=Object(h.RandomRange)(this.direction1.x,this.direction2.x),d=Object(h.RandomRange)(this.direction1.y,this.direction2.y),c=Object(h.RandomRange)(this.direction1.z,this.direction2.z);o?t.copyFromFloats(l,d,c):n.f.TransformNormalFromFloatsToRef(l,d,c,e,t)}clone(){var e=new d(this.radius,this.angle,this.direction1,this.direction2);return o.a.DeepCopy(this,e),e}applyToShader(e){super.applyToShader(e),e.setVector3("direction1",this.direction1),e.setVector3("direction2",this.direction2)}buildUniformLayout(e){super.buildUniformLayout(e),e.addUniform("direction1",3),e.addUniform("direction2",3)}getEffectDefines(){return"#define CONEEMITTER\n#define DIRECTEDCONEEMITTER"}getClassName(){return"ConeDirectedParticleEmitter"}serialize(){var e=super.serialize();return e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e}parse(e){super.parse(e),n.f.FromArrayToRef(e.direction1,0,this.direction1),n.f.FromArrayToRef(e.direction2,0,this.direction2)}}},432:function(e,t,r){"use strict";r.d(t,"a",function(){return P});r(126),r(12);var n=r(1),o=r(180),h=r(493),l=r(9),d=r(494),c=r(588),_=r(589),f=r(428),m=r(429),v=r(430),y=r(590);r(21);class P{get targetStopDuration(){return this._targetStopDuration}set targetStopDuration(e){this._targetStopDuration!==e&&(this._targetStopDuration=e)}get isNodeGenerated(){return!1}get noiseTexture(){return this._noiseTexture}set noiseTexture(e){this._noiseTexture!==e&&(this._noiseTexture=e,this._reset())}get attractors(){return this._attractors.slice(0)}addAttractor(e){this._attractors.push(e)}removeAttractor(e){var t=this._attractors.indexOf(e);-1!==t&&this._attractors.splice(t,1)}get _isAnimationSheetEnabled(){return this._animationSheetEnabled}set _isAnimationSheetEnabled(e){this._animationSheetEnabled!==e&&(this._animationSheetEnabled=e)}get isAnimationSheetEnabled(){return this._isAnimationSheetEnabled}set isAnimationSheetEnabled(e){this._isAnimationSheetEnabled!=e&&(this._isAnimationSheetEnabled=e,this._reset())}get useLogarithmicDepth(){return this._useLogarithmicDepth}set useLogarithmicDepth(e){this._useLogarithmicDepth=e&&this.get
1Scene().getEngine().getCaps().fragmentDepthSupported}getScene(){return this._scene}_hasTargetStopDurationDependantGradient(){return this._startSizeGradients&&this._startSizeGradients.length>0||this._emitRateGradients&&this._emitRateGradients.length>0||this._lifeTimeGradients&&this._lifeTimeGradients.length>0}_setEngineBasedOnBlendMode(e){switch(e){case P.BLENDMODE_MULTIPLYADD:return;case P.BLENDMODE_ADD:e=1;break;case P.BLENDMODE_ONEONE:e=6;break;case P.BLENDMODE_STANDARD:e=2;break;case P.BLENDMODE_MULTIPLY:e=4;break;case P.BLENDMODE_SUBTRACT:e=3}this._engine.setAlphaMode(e)}getDragGradients(){return this._dragGradients}getLimitVelocityGradients(){return this._limitVelocityGradients}getColorGradients(){return this._colorGradients}getSizeGradients(){return this._sizeGradients}getColorRemapGradients(){return this._colorRemapGradients}getAlphaRemapGradients(){return this._alphaRemapGradients}getLifeTimeGradients(){return this._lifeTimeGradients}getAngularSpeedGradients(){return this._angularSpeedGradients}getVelocityGradients(){return this._velocityGradients}getStartSizeGradients(){return this._startSizeGradients}getEmitRateGradients(){return this._emitRateGradients}addEmitRateGradient(e,t,r){return this._emitRateGradients||(this._emitRateGradients=[]),this._addFactorGradient(this._emitRateGradients,e,t,r),this}removeEmitRateGradient(e){return this._removeFactorGradient(this._emitRateGradients,e),this}get direction1(){return this.particleEmitterType.direction1?this.particleEmitterType.direction1:n.f.Zero()}set direction1(e){this.particleEmitterType.direction1&&(this.particleEmitterType.direction1=e)}get direction2(){return this.particleEmitterType.direction2?this.particleEmitterType.direction2:n.f.Zero()}set direction2(e){this.particleEmitterType.direction2&&(this.particleEmitterType.direction2=e)}get minEmitBox(){return this.particleEmitterType.minEmitBox?this.particleEmitterType.minEmitBox:n.f.Zero()}set minEmitBox(e){this.particleEmitterType.minEmitBox&&(this.particleEmitterType.minEmitBox=e)}get maxEmitBox(){return this.particleEmitterType.maxEmitBox?this.particleEmitterType.maxEmitBox:n.f.Zero()}set maxEmitBox(e){this.particleEmitterType.maxEmitBox&&(this.particleEmitterType.maxEmitBox=e)}get billboardMode(){return this._billboardMode}set billboardMode(e){this._billboardMode!==e&&(this._billboardMode=e,this._reset())}get isBillboardBased(){return this._isBillboardBased}set isBillboardBased(e){this._isBillboardBased!==e&&(this._isBillboardBased=e,this._reset())}get imageProcessingConfiguration(){return this._imageProcessingConfiguration}set imageProcessingConfiguration(e){this._attachImageProcessingConfiguration(e)}_attachImageProcessingConfiguration(e){e!==this._imageProcessingConfiguration&&(!e&&this._scene?this._imageProcessingConfiguration=this._scene.imageProcessingConfiguration:this._imageProcessingConfiguration=e)}_reset(){}_addFactorGradient(e,t,r,n){var o=new h.c(t,r,n);e.push(o),e.sort((a,b)=>a.gradient<b.gradient?-1:a.gradient>b.gradient?1:0)}_removeFactorGradient(e,t){if(e){var r=0;for(var n of e){if(n.gradient===t){e.splice(r,1);break}r++}}}_removeGradientAndTexture(e,t,r){if(!t)return this;var n=0;for(var o of t){if(o.gradient===e){t.splice(n,1);break}n++}return r&&r.dispose(),this}constructor(e){this.animations=[],this.renderingGroupId=0,this.emitter=n.f.Zero(),this.emitRate=10,this.manualEmitCount=-1,this.updateSpeed=.01,this._targetStopDuration=0,this.disposeOnStop=!1,this.minEmitPower=1,this.maxEmitPower=1,this.minLifeTime=1,this.maxLifeTime=1,this.minSize=1,this.maxSize=1,this.minScaleX=1,this.maxScaleX=1,this.minScaleY=1,this.maxScaleY=1,this.minInitialRotation=0,this.maxInitialRotation=0,this.minAngularSpeed=0,this.maxAngularSpeed=0,this.layerMask=268435455,this.customShader=null,this.preventAutoStart=!1,this.applyFog=!1,this._wasDispatched=!1,this._rootUrl="",this.noiseStrength=new n.f(10,10,10),this._attractors=[],this.onAnimationEnd=null,this.blendMode=P.BLENDMODE_ONEONE,this.forceDepthWrite=!1,this.preWarmCycles=0,this.preWarmStepOffset=1,this.spriteCellChangeSpeed=1,this.startSpriteCellID=0,this.endSpriteCellID=0,this.spriteCellWidth=0,this.spriteCellHeight=0,this.spriteCellLoop=!0,this.spriteRandomStartCell=!1,this.translationPivot=new n.e(0,0),this._animationSheetEnabled=!1,this.beginAnimationOnStart=!1,this.beginAnimationFrom=0,this.beginAnimationTo=60,this.beginAnimationLoop=!1,this.worldOffset=new n.f(0,0,0),this._useLogarithmicDepth=!1,this.gravity=n.f.Zero(),this._colorGradients=null,this._sizeGradients=null,this._lifeTimeGradients=null,this._angularSpeedGradients=null,this._velocityGradients=null,this._limitVelocityGradients=null,this._dragGradients=null,this._emitRateGradients=null,this._startSizeGradients=null,this._rampGradients=null,this._colorRemapGradients=null,this._alphaRemapGradients=null,this.startDelay=0,this.limitVelocityDamping=.4,this.color1=new l.b(1,1,1,1),this.color2=new l.b(1,1,1,1),this.colorDead=new l.b(0,0,0,1),this.textureMask=new l.b(1,1,1,1),this._isSubEmitter=!1,this._billboardMode=7,this._isBillboardBased=!0,this._imageProcessingConfigurationDefines=new o.a,this.id=e,this.name=e}createPointEmitter(e,t){var r=function(e,t){var r=new c.a;return r.direction1=e,r.direction2=t,r}(e,t);return this.particleEmitterType=r,r}createHemisphericEmitter(){var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new _.a(e,t)}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1);return this.particleEmitterType=e,e}createSphereEmitter(){var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return new f.b(e,t)}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1);return this.particleEmitterType=e,e}createDirectedSphereEmitter(){var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.f(0,1,0),r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n.f(0,1,0);return new f.a(e,t,r)}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,arguments.length>1&&void 0!==arguments[1]?arguments[1]:new n.f(0,1,0),arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n.f(0,1,0));return this.particleEmitterType=e,e}createCylinderEmitter(){var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return new m.b(e,t,r,n)}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,arguments.length>3&&void 0!==arguments[3]?arguments[3]:0);return this.particleEmitterType=e,e}createDirectedCylinderEmitter(){var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new n.f(0,1,0),h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:new n.f(0,1,0);return new m.a(e,t,r,o,h)}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,arguments.length>3&&void 0!==arguments[3]?arguments[3]:new n.f(0,1,0),arguments.length>4&&void 0!==arguments[4]?arguments[4]:new n.f(0,1,0));return this.particleEmitterType=e,e}createConeEmitter(){var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Math.PI/4;return new v.b(e,t)}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Math.PI/4);return this.particleEmitterType=e,e}createDirectedConeEmitter(){var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Math.PI/4,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n.f(0,1,0),o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new n.f(0,1,0);return new v.a(e,t,r,o)}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,arguments.length>1&&void 0!==arguments[1]?arguments[1]:Math.PI/4,arguments.length>2&&void 0!==arguments[2]?arguments[2]:new n.f(0,1,0),arguments.length>3&&void 0!==arguments[3]?arguments[3]:new n.f(0,1,0));return this.particleEmitterType=e,e}createBoxEmitter(e,t,r,n){var o=new d.a;return this.particleEmitterType=o,this.direction1=e,this.direction2=t,this.minEmitBox=r,this.maxEmitBox=n,o}createMeshEmitter(){var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return new y.a(e)}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null);return this.particleEmitterType=e,e}}P.BLENDMODE_ONEONE=0,P.BLENDMODE_STANDARD=1,P.BLENDMODE_ADD=2,P.BLENDMODE_MULTIPLY=3,P.BLENDMODE_MULTIPLYADD=4,P.BLENDMODE_SUBTRACT=-1},450:function(e,t,r){"use strict";r.d(t,"a",function(){return l});r(12);var n=r(1),o=r(31),h=r(96);class l extends h.a{getClassName(){return"VRDistortionCorrectionPostProcess"}constructor(e,t,r,h){super(e,"vrDistortionCorrection",["LensCenter","Scale","ScaleIn","HmdWarpParam"],null,h.postProcessScaleFactor,t,o.b.BILINEAR_SAMPLINGMODE),this._isRightEye=r,this._distortionFactors=h.distortionK,this._postProcessScaleFactor=h.postProcessScaleFactor,this._lensCenterOffset=h.lensCenterOffset,this.adaptScaleToCurrentViewport=!0,this.onSizeChangedObservable.add(()=>{this._scaleIn=new n.e(2,2/this.aspectRatio),this._scaleFactor=new n.e(1/this._postProcessScaleFactor*.5,1/this._postProcessScaleFactor*.5*this.aspectRatio),this._lensCenter=new n.e(this._isRightEye?.5-.5*this._lensCenterOffset:.5+.5*this._lensCenterOffset,.5)}),this.onApplyObservable.add(e=>{e.setFloat2("LensCenter",this._lensCenter.x,this._lensCenter.y),e.setFloat2("Scale",this._scaleFactor.x,this._scaleFactor.y),e.setFloat2("ScaleIn",this._scaleIn.x,this._scaleIn.y),e.setFloat4("HmdWarpParam",this._distortionFactors[0],this._distortionFactors[1],this._distortionFactors[2],this._distortionFactors[3])})}_gatherImports(e,t){e?(this._webGPUReady=!0,t.push(r.e(321).then(r.bind(null,999)))):t.push(r.e(311).then(r.bind(null,1e3))),super._gatherImports(e,t)}}},466:function(e,t,r){"use strict";var n=r(4),o=(r(12),r(3)),h=r(30),l=r(40),d=r(50),c=r(179),_=r(92),f=r(10),m=r(132),v=r(105);class y{get shaderLanguage(){return this._shaderLanguage}constructor(e){this.name=d.a.NAME_OUTLINERENDERER,this.zOffset=1,this.zOffsetUnits=4,this.enabled=!0,this._shaderLanguage=0,this.scene=e,this._engine=e.getEngine(),this.scene._addComponent(this),this._passIdForDrawWrapper=[];for(var i=0;i<4;++i)this._passIdForDrawWrapper[i]=this._engine.createRenderPassId("Outline Renderer (".concat(i,")"));this._engine.isWebGPU&&(this._shaderLanguage=1)}register(){this.scene._beforeRenderingMeshStage.registerStep(d.a.STEP_BEFORERENDERINGMESH_OUTLINE,this,this._beforeRenderingMesh),this.scene._afterRenderingMeshStage.registerStep(d.a.STEP_AFTERRENDERINGMESH_OUTLINE,this,this._afterRenderingMesh)}rebuild(){}dispose(){for(var i=0;i<this._passIdForDrawWrapper.length;++i)this._engine.releaseRenderPassId(this._passIdForDrawWrapper[i])}render(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3?arguments[3]:void 0;n=null!=n?n:this._passIdForDrawWrapper[0];var o=this.scene,h=o.getEngine();if(v.a._BindColorAttachments(h)){var l=h.getCaps().instancedArrays&&(null!==t.visibleInstances[e._id]&&void 0!==t.visibleInstances[e._id]||e.getRenderingMesh().hasThinInstances);if(this.isReady(e,l,n)){var d=e.getMesh(),m=d._internalAbstractMeshDataInfo._actAsRegularMesh?d:null,y=e.getRenderingMesh(),P=m||y,O=e.getMaterial();if(O&&o.activeCamera){var R=e._getDrawWrapper(n),E=c.a.GetEffect(R);o.resetCachedMaterial(),h.enableEffect(R),O.useLogarithmicDepth&&E.setFloat("logarithmicDepthConstant",2/(Math.log(o.activeCamera.maxZ+1)/Math.LN2)),E.setFloat("offset",r?0:y.outlineWidth),E.setColor4("color",r?y.overlayColor:y.outlineColor,r?y.overlayAlpha:O.alpha),E.setMatrix("viewProjection",o.getTransformMatrix()),E.setMatrix("world",P.getWorldMatrix()),Object(f.b)(y,E),Object(f.h)(y,E),y.morphTargetManager&&y.morphTargetManager.isUsingTextureForTargets&&y.morphTargetManager._bind(E),l||y._bind(e,E,O.fillMode);var S=e.getMesh().bakedVertexAnimationManager;if(S&&S.isEnabled&&S.bind(E,l),O&&O.needAlphaTestingForMesh(P)){var T=O.getAlphaTestTexture();T&&(E.setTexture("diffuseSampler",T),E.setMatrix("diffuseMatrix",T.getTextureMatrix()))}Object(_.b)(E,O,o),h.setZOffset(-this.zOffset),h.setZOffsetUnits(-this.zOffsetUnits),y._processRendering(P,e,E,O.fillMode,t,l,(e,t)=>{E.setMatrix("world",t)}),h.setZOffset(0),h.setZOffsetUnits(0)}}}}isReady(e,t,h){var l=this;h=null!=h?h:this._passIdForDrawWrapper[0];var d=[],c=[o.c.PositionKind,o.c.NormalKind],v=e.getMesh(),y=e.getMaterial();if(!y)return!1;var P=v.getScene(),O=!1,R=!1;y.needAlphaTestingForMesh(v)&&(d.push("#define ALPHATEST"),v.isVerticesDataPresent(o.c.UVKind)&&(c.push(o.c.UVKind),d.push("#define UV1"),O=!0),v.isVerticesDataPresent(o.c.UV2Kind)&&(c.push(o.c.UV2Kind),d.push("#define UV2"),R=!0)),y.useLogarithmicDepth&&d.push("#define LOGARITHMICDEPTH"),Object(_.d)(y,P,d);var E=new m.a;if(v.useBones&&v.computeBonesUsingShaders&&v.skeleton){c.push(o.c.MatricesIndicesKind),c.push(o.c.MatricesWeightsKind),v.numBoneInfluencers>4&&(c.push(o.c.MatricesIndicesExtraKind),c.push(o.c.MatricesWeightsExtraKind)
1);var S=v.skeleton;d.push("#define NUM_BONE_INFLUENCERS "+v.numBoneInfluencers),v.numBoneInfluencers>0&&E.addCPUSkinningFallback(0,v),S.isUsingTextureForMatrices?d.push("#define BONETEXTURE"):d.push("#define BonesPerMesh "+(S.bones.length+1))}else d.push("#define NUM_BONE_INFLUENCERS 0");var T=v.morphTargetManager?Object(f.p)(v.morphTargetManager,d,c,v,!0,!0,!1,O,R,!1):0;t&&(d.push("#define INSTANCES"),Object(f.D)(c),e.getRenderingMesh().hasThinInstances&&d.push("#define THIN_INSTANCES"));var C=v.bakedVertexAnimationManager;C&&C.isEnabled&&(d.push("#define BAKED_VERTEX_ANIMATION_TEXTURE"),t&&c.push("bakedVertexAnimationSettingsInstanced"));var I,x=e._getDrawWrapper(h,!0),M=x.defines,D=d.join("\n");if(M!==D){var A=["world","mBones","viewProjection","diffuseMatrix","offset","color","logarithmicDepthConstant","morphTargetInfluences","boneTextureInfo","morphTargetCount","morphTargetTextureInfo","morphTargetTextureIndices","bakedVertexAnimationSettings","bakedVertexAnimationTextureSizeInverted","bakedVertexAnimationTime","bakedVertexAnimationTexture"];Object(_.a)(A),x.setEffect(this.scene.getEngine().createEffect("outline",{attributes:c,uniformsNames:A,uniformBuffersNames:[],samplers:["diffuseSampler","boneSampler","morphTargets","bakedVertexAnimationTexture"],defines:D,fallbacks:E,onCompiled:null,onError:null,indexParameters:{maxSimultaneousMorphTargets:T},shaderLanguage:this._shaderLanguage,extraInitializationsAsync:(I=Object(n.a)(function*(){1===l._shaderLanguage?yield Promise.all([r.e(197).then(r.bind(null,2015)),r.e(163).then(r.bind(null,2016))]):yield Promise.all([r.e(194).then(r.bind(null,2017)),r.e(162).then(r.bind(null,2018))])}),function(){return I.apply(this,arguments)})},this.scene.getEngine()),D)}return x.effect.isReady()}_beforeRenderingMesh(e,t,r){if(this.enabled&&(e.renderOutline||e.renderOverlay)&&v.a._IsColorAttachmentEnabled(this._engine)&&(this._savedDepthWrite=this._engine.getDepthWrite(),e.renderOutline)){var n=t.getMaterial();n&&n.needAlphaBlendingForMesh(e)&&(this._engine.cacheStencilState(),this._engine.setDepthWrite(!1),this._engine.setColorWrite(!1),this._engine.setStencilBuffer(!0),this._engine.setStencilOperationPass(7681),this._engine.setStencilFunction(519),this._engine.setStencilMask(y._StencilReference),this._engine.setStencilFunctionReference(y._StencilReference),this._engine.stencilStateComposer.useStencilGlobalOnly=!0,this.render(t,r,!0,this._passIdForDrawWrapper[1]),this._engine.setColorWrite(!0),this._engine.setStencilFunction(517)),this._engine.setDepthWrite(!1),this.render(t,r,!1,this._passIdForDrawWrapper[0]),this._engine.setDepthWrite(this._savedDepthWrite),n&&n.needAlphaBlendingForMesh(e)&&(this._engine.stencilStateComposer.useStencilGlobalOnly=!1,this._engine.restoreStencilState())}}_afterRenderingMesh(e,t,r){if(this.enabled&&(e.renderOutline||e.renderOverlay)&&v.a._IsColorAttachmentEnabled(this._engine)){if(e.renderOverlay){var n=this._engine.getAlphaMode(),o=this._engine.alphaState.alphaBlend;this._engine.setAlphaMode(2),this.render(t,r,!0,this._passIdForDrawWrapper[3]),this._engine.setAlphaMode(n),this._engine.setDepthWrite(this._savedDepthWrite),this._engine.alphaState.setAlphaBlend(o)}e.renderOutline&&this._savedDepthWrite&&(this._engine.setDepthWrite(!0),this._engine.setColorWrite(!1),this.render(t,r,!1,this._passIdForDrawWrapper[2]),this._engine.setColorWrite(!0))}}}y._StencilReference=4;var P=!1;P||(P=!0,l.b.prototype.getOutlineRenderer=function(){return this._outlineRenderer||(this._outlineRenderer=new y(this)),this._outlineRenderer},Object.defineProperty(h.a.prototype,"renderOutline",{get:function(){return this._renderOutline},set:function(e){e&&this.getScene().getOutlineRenderer(),this._renderOutline=e},enumerable:!0,configurable:!0}),Object.defineProperty(h.a.prototype,"renderOverlay",{get:function(){return this._renderOverlay},set:function(e){e&&this.getScene().getOutlineRenderer(),this._renderOverlay=e},enumerable:!0,configurable:!0}))},494:function(e,t,r){"use strict";r.d(t,"a",function(){return l});var n=r(1),o=r(11),h=r(86);class l{constructor(){this.direction1=new n.f(0,1,0),this.direction2=new n.f(0,1,0),this.minEmitBox=new n.f(-.5,-.5,-.5),this.maxEmitBox=new n.f(.5,.5,.5)}startDirectionFunction(e,t,r,h){var l=Object(o.RandomRange)(this.direction1.x,this.direction2.x),d=Object(o.RandomRange)(this.direction1.y,this.direction2.y),c=Object(o.RandomRange)(this.direction1.z,this.direction2.z);if(h)return t.x=l,t.y=d,void(t.z=c);n.f.TransformNormalFromFloatsToRef(l,d,c,e,t)}startPositionFunction(e,t,r,h){var l=Object(o.RandomRange)(this.minEmitBox.x,this.maxEmitBox.x),d=Object(o.RandomRange)(this.minEmitBox.y,this.maxEmitBox.y),c=Object(o.RandomRange)(this.minEmitBox.z,this.maxEmitBox.z);if(h)return t.x=l,t.y=d,void(t.z=c);n.f.TransformCoordinatesFromFloatsToRef(l,d,c,e,t)}clone(){var e=new l;return h.a.DeepCopy(this,e),e}applyToShader(e){e.setVector3("direction1",this.direction1),e.setVector3("direction2",this.direction2),e.setVector3("minEmitBox",this.minEmitBox),e.setVector3("maxEmitBox",this.maxEmitBox)}buildUniformLayout(e){e.addUniform("direction1",3),e.addUniform("direction2",3),e.addUniform("minEmitBox",3),e.addUniform("maxEmitBox",3)}getEffectDefines(){return"#define BOXEMITTER"}getClassName(){return"BoxParticleEmitter"}serialize(){var e={};return e.type=this.getClassName(),e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e.minEmitBox=this.minEmitBox.asArray(),e.maxEmitBox=this.maxEmitBox.asArray(),e}parse(e){n.f.FromArrayToRef(e.direction1,0,this.direction1),n.f.FromArrayToRef(e.direction2,0,this.direction2),n.f.FromArrayToRef(e.minEmitBox,0,this.minEmitBox),n.f.FromArrayToRef(e.maxEmitBox,0,this.maxEmitBox)}}},585:function(e,t,r){"use strict";r.d(t,"a",function(){return m});var n=r(20),o=(r(36),r(0)),h=r(96),l=(r(15),r(26)),d=r(220),c=r(2);r(21);function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?_(Object(r),!0).forEach(function(t){Object(n.a)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}class m extends h.a{getClassName(){return"PassPostProcess"}constructor(e,t){var r=arguments.length>4?arguments[4]:void 0,n=f({size:"number"==typeof t?t:void 0,camera:arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,samplingMode:arguments.length>3?arguments[3]:void 0,engine:r,reusable:arguments.length>5?arguments[5]:void 0,textureType:arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,blockCompilation:arguments.length>7&&void 0!==arguments[7]&&arguments[7]},t);super(e,d.b.FragmentUrl,f({effectWrapper:"number"!=typeof t&&t.effectWrapper?void 0:new d.b(e,r,n)},n))}static _Parse(e,t,r,n){return l.a.Parse(()=>new m(e.name,e.options,t,e.renderTargetSamplingMode,e._engine,e.reusable),e,r,n)}}var v,y,P,O,R,E;R=h.a,E=[],v=class extends R{get face(){return this._effectWrapper.face}set face(e){this._effectWrapper.face=e}getClassName(){return"PassCubePostProcess"}constructor(e,t){var r=arguments.length>4?arguments[4]:void 0,n=f({size:"number"==typeof t?t:void 0,camera:arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,samplingMode:arguments.length>3?arguments[3]:void 0,engine:r,reusable:arguments.length>5?arguments[5]:void 0,textureType:arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,blockCompilation:arguments.length>7&&void 0!==arguments[7]&&arguments[7]},t);super(e,d.b.FragmentUrl,f({effectWrapper:"number"!=typeof t&&t.effectWrapper?void 0:new d.a(e,r,n)},n)),Object(o.d)(this,E)}static _Parse(e,t,r,n){return l.a.Parse(()=>new v(e.name,e.options,t,e.renderTargetSamplingMode,e._engine,e.reusable),e,r,n)}},O="function"==typeof Symbol&&Symbol.metadata?Object.create(null!==(P=R[Symbol.metadata])&&void 0!==P?P:null):void 0,y=[Object(c.d)()],Object(o.c)(v,null,y,{kind:"getter",name:"face",static:!1,private:!1,access:{has:e=>"face"in e,get:e=>e.face},metadata:O},null,E),O&&Object.defineProperty(v,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:O})},588:function(e,t,r){"use strict";r.d(t,"a",function(){return l});var n=r(86),o=r(1),h=r(11);class l{constructor(){this.direction1=new o.f(0,1,0),this.direction2=new o.f(0,1,0)}startDirectionFunction(e,t,r,n){var l=Object(h.RandomRange)(this.direction1.x,this.direction2.x),d=Object(h.RandomRange)(this.direction1.y,this.direction2.y),c=Object(h.RandomRange)(this.direction1.z,this.direction2.z);n?t.copyFromFloats(l,d,c):o.f.TransformNormalFromFloatsToRef(l,d,c,e,t)}startPositionFunction(e,t,r,n){n?t.copyFromFloats(0,0,0):o.f.TransformCoordinatesFromFloatsToRef(0,0,0,e,t)}clone(){var e=new l;return n.a.DeepCopy(this,e),e}applyToShader(e){e.setVector3("direction1",this.direction1),e.setVector3("direction2",this.direction2)}buildUniformLayout(e){e.addUniform("direction1",3),e.addUniform("direction2",3)}getEffectDefines(){return"#define POINTEMITTER"}getClassName(){return"PointParticleEmitter"}serialize(){var e={};return e.type=this.getClassName(),e.direction1=this.direction1.asArray(),e.direction2=this.direction2.asArray(),e}parse(e){o.f.FromArrayToRef(e.direction1,0,this.direction1),o.f.FromArrayToRef(e.direction2,0,this.direction2)}}},589:function(e,t,r){"use strict";r.d(t,"a",function(){return l});var n=r(86),o=r(1),h=r(11);class l{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.radius=e,this.radiusRange=t,this.directionRandomizer=r}startDirectionFunction(e,t,r,n){var l=r.position.subtract(e.getTranslation()).normalize(),d=Object(h.RandomRange)(0,this.directionRandomizer),c=Object(h.RandomRange)(0,this.directionRandomizer),_=Object(h.RandomRange)(0,this.directionRandomizer);l.x+=d,l.y+=c,l.z+=_,l.normalize(),n?t.copyFrom(l):o.f.TransformNormalFromFloatsToRef(l.x,l.y,l.z,e,t)}startPositionFunction(e,t,r,n){var l=this.radius-Object(h.RandomRange)(0,this.radius*this.radiusRange),d=Object(h.RandomRange)(0,1),c=Object(h.RandomRange)(0,2*Math.PI),_=Math.acos(2*d-1),f=l*Math.cos(c)*Math.sin(_),m=l*Math.cos(_),v=l*Math.sin(c)*Math.sin(_);
1n?t.copyFromFloats(f,Math.abs(m),v):o.f.TransformCoordinatesFromFloatsToRef(f,Math.abs(m),v,e,t)}clone(){var e=new l(this.radius,this.directionRandomizer);return n.a.DeepCopy(this,e),e}applyToShader(e){e.setFloat("radius",this.radius),e.setFloat("radiusRange",this.radiusRange),e.setFloat("directionRandomizer",this.directionRandomizer)}buildUniformLayout(e){e.addUniform("radius",1),e.addUniform("radiusRange",1),e.addUniform("directionRandomizer",1)}getEffectDefines(){return"#define HEMISPHERICEMITTER"}getClassName(){return"HemisphericParticleEmitter"}serialize(){var e={};return e.type=this.getClassName(),e.radius=this.radius,e.radiusRange=this.radiusRange,e.directionRandomizer=this.directionRandomizer,e}parse(e){this.radius=e.radius,this.radiusRange=e.radiusRange,this.directionRandomizer=e.directionRandomizer}}},590:function(e,t,r){"use strict";r.d(t,"a",function(){return d});var n=r(86),o=r(1),h=r(11),l=r(3);class d{get mesh(){return this._mesh}set mesh(e){this._mesh!==e&&(this._mesh=e,e?(this._indices=e.getIndices(),this._positions=e.getVerticesData(l.c.PositionKind),this._normals=e.getVerticesData(l.c.NormalKind)):(this._indices=null,this._positions=null,this._normals=null))}constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this._indices=null,this._positions=null,this._normals=null,this._storedNormal=o.f.Zero(),this._mesh=null,this.direction1=new o.f(0,1,0),this.direction2=new o.f(0,1,0),this.useMeshNormalsForDirection=!0,this.mesh=e}startDirectionFunction(e,t,r,n){if(this.useMeshNormalsForDirection&&this._normals)o.f.TransformNormalToRef(this._storedNormal,e,t);else{var l=Object(h.RandomRange)(this.direction1.x,this.direction2.x),d=Object(h.RandomRange)(this.direction1.y,this.direction2.y),c=Object(h.RandomRange)(this.direction1.z,this.direction2.z);n?t.copyFromFloats(l,d,c):o.f.TransformNormalFromFloatsToRef(l,d,c,e,t)}}startPositionFunction(e,t,r,n){if(this._indices&&this._positions){var h=3*(Math.random()*(this._indices.length/3)|0),l=Math.random(),d=Math.random()*(1-l),c=1-l-d,_=this._indices[h],f=this._indices[h+1],m=this._indices[h+2],v=o.d.Vector3[0],y=o.d.Vector3[1],P=o.d.Vector3[2],O=o.d.Vector3[3];o.f.FromArrayToRef(this._positions,3*_,v),o.f.FromArrayToRef(this._positions,3*f,y),o.f.FromArrayToRef(this._positions,3*m,P),O.x=l*v.x+d*y.x+c*P.x,O.y=l*v.y+d*y.y+c*P.y,O.z=l*v.z+d*y.z+c*P.z,n?t.copyFromFloats(O.x,O.y,O.z):o.f.TransformCoordinatesFromFloatsToRef(O.x,O.y,O.z,e,t),this.useMeshNormalsForDirection&&this._normals&&(o.f.FromArrayToRef(this._normals,3*_,v),o.f.FromArrayToRef(this._normals,3*f,y),o.f.FromArrayToRef(this._normals,3*m,P),this._storedNormal.x=l*v.x+d*y.x+c*P.x,this._storedNormal.y=l*v.y+d*y.y+c*P.y,this._storedNormal.z=l*v.z+d*y.z+c*P.z)}}clone(){var e=new d(this.mesh);return n.a.DeepCopy(this,e),e}applyToShader(e){e.setVector3("direction1",this.direction1),e.setVector3("direction2",this.direction2)}buildUniformLayout(e){e.addUniform("direction1",3),e.addUniform("direction2",3)}getEffectDefines(){return""}getClassName(){return"MeshParticleEmitter"}serialize(){var e,t={};return t.type=this.getClassName(),t.direction1=this.direction1.asArray(),t.direction2=this.direction2.asArray(),t.meshId=null===(e=this.mesh)||void 0===e?void 0:e.id,t.useMeshNormalsForDirection=this.useMeshNormalsForDirection,t}parse(e,t){o.f.FromArrayToRef(e.direction1,0,this.direction1),o.f.FromArrayToRef(e.direction2,0,this.direction2),e.meshId&&t&&(this.mesh=t.getLastMeshById(e.meshId)),this.useMeshNormalsForDirection=e.useMeshNormalsForDirection}}},631:function(e,t,r){"use strict";r.d(t,"a",function(){return l});var n=r(31),o=r(96),h=r(632);class l extends o.a{getClassName(){return"VRMultiviewToSingleviewPostProcess"}constructor(e,t,r){super(e,"vrMultiviewToSingleview",["imageIndex"],["multiviewSampler"],r,t,n.b.BILINEAR_SAMPLINGMODE),Object(h.a)();var o=null!=t?t:this.getCamera();this.onSizeChangedObservable.add(()=>{}),this.onApplyObservable.add(e=>{o._scene.activeCamera&&o._scene.activeCamera.isLeftCamera?e.setInt("imageIndex",0):e.setInt("imageIndex",1),e.setTexture("multiviewSampler",o._multiviewTexture)})}}},641:function(e,t,r){"use strict";r.d(t,"a",function(){return f});var n=r(20),o=r(31),h=r(96),l=r(26),d=r(270);r(21);function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function _(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?c(Object(r),!0).forEach(function(t){Object(n.a)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}class f extends h.a{getClassName(){return"FxaaPostProcess"}constructor(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3?arguments[3]:void 0,h=arguments.length>4?arguments[4]:void 0,l=arguments.length>5?arguments[5]:void 0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,f=_({uniforms:d.a.Uniforms,size:"number"==typeof t?t:void 0,camera:r,samplingMode:n||o.b.BILINEAR_SAMPLINGMODE,engine:h,reusable:l,textureType:c},t);super(e,d.a.FragmentUrl,_({effectWrapper:"number"!=typeof t&&t.effectWrapper?void 0:new d.a(e,h,f)},f)),this.onApplyObservable.add(e=>{this._effectWrapper.texelSize=this.texelSize})}static _Parse(e,t,r,n){return l.a.Parse(()=>new f(e.name,e.options,t,e.renderTargetSamplingMode,r.getEngine(),e.reusable),e,r,n)}}},663:function(e,t,r){"use strict";r.d(t,"a",function(){return C});var n,o,h,l,d,c,_,f,m,v=r(20);!function(e){e[e.FREE=0]="FREE",e[e.LIMITED=1]="LIMITED",e[e.LOCKED=2]="LOCKED"}(n||(n={})),function(e){e[e.LINEAR_X=0]="LINEAR_X",e[e.LINEAR_Y=1]="LINEAR_Y",e[e.LINEAR_Z=2]="LINEAR_Z",e[e.ANGULAR_X=3]="ANGULAR_X",e[e.ANGULAR_Y=4]="ANGULAR_Y",e[e.ANGULAR_Z=5]="ANGULAR_Z",e[e.LINEAR_DISTANCE=6]="LINEAR_DISTANCE"}(o||(o={})),function(e){e[e.BALL_AND_SOCKET=1]="BALL_AND_SOCKET",e[e.DISTANCE=2]="DISTANCE",e[e.HINGE=3]="HINGE",e[e.SLIDER=4]="SLIDER",e[e.LOCK=5]="LOCK",e[e.PRISMATIC=6]="PRISMATIC",e[e.SIX_DOF=7]="SIX_DOF"}(h||(h={})),function(e){e[e.SPHERE=0]="SPHERE",e[e.CAPSULE=1]="CAPSULE",e[e.CYLINDER=2]="CYLINDER",e[e.BOX=3]="BOX",e[e.CONVEX_HULL=4]="CONVEX_HULL",e[e.CONTAINER=5]="CONTAINER",e[e.MESH=6]="MESH",e[e.HEIGHTFIELD=7]="HEIGHTFIELD"}(l||(l={})),function(e){e[e.NONE=0]="NONE",e[e.VELOCITY=1]="VELOCITY",e[e.POSITION=2]="POSITION"}(d||(d={})),function(e){e.COLLISION_STARTED="COLLISION_STARTED",e.COLLISION_CONTINUED="COLLISION_CONTINUED",e.COLLISION_FINISHED="COLLISION_FINISHED",e.TRIGGER_ENTERED="TRIGGER_ENTERED",e.TRIGGER_EXITED="TRIGGER_EXITED"}(c||(c={})),function(e){e[e.STATIC=0]="STATIC",e[e.ANIMATED=1]="ANIMATED",e[e.DYNAMIC=2]="DYNAMIC"}(_||(_={})),function(e){e[e.DISABLED=0]="DISABLED",e[e.TELEPORT=1]="TELEPORT",e[e.ACTION=2]="ACTION"}(f||(f={})),function(e){e[e.SIMULATION_CONTROLLED=0]="SIMULATION_CONTROLLED",e[e.ALWAYS_ACTIVE=1]="ALWAYS_ACTIVE",e[e.ALWAYS_INACTIVE=2]="ALWAYS_INACTIVE"}(m||(m={}));var y=r(1);class P{get disablePreStep(){return this._prestepType==f.DISABLED}set disablePreStep(e){this._prestepType=e?f.DISABLED:f.TELEPORT}constructor(e,t,r,n){if(this._pluginData=void 0,this._pluginDataInstances=[],this._collisionCBEnabled=!1,this._collisionEndedCBEnabled=!1,this.disableSync=!1,this._isDisposed=!1,this._shape=null,this._prestepType=f.DISABLED,n){var o=n.getPhysicsEngine();if(!o)throw new Error("No Physics Engine available.");if(this._physicsEngine=o,2!=o.getPluginVersion())throw new Error("Plugin version is incorrect. Expected version 2.");var h=o.getPhysicsPlugin();if(!h)throw new Error("No Physics Plugin available.");this._physicsPlugin=h,e.rotationQuaternion||(e.rotationQuaternion=y.b.FromEulerAngles(e.rotation.x,e.rotation.y,e.rotation.z)),this.startAsleep=r,this.disableSync=0==t;var l=e;l.hasThinInstances?this._physicsPlugin.initBodyInstances(this,t,l):(e.parent&&e.computeWorldMatrix(!0),this._physicsPlugin.initBody(this,t,e.absolutePosition,e.absoluteRotationQuaternion)),this.transformNode=e,e.physicsBody=this,o.addBody(this),this._nodeDisposeObserver=e.onDisposeObservable.add(()=>{this.dispose()})}}getClassName(){return"PhysicsBody"}clone(e){var t=new P(e,this.getMotionType(),this.startAsleep,this.transformNode.getScene());return t.shape=this.shape,t.setMassProperties(this.getMassProperties()),t.setLinearDamping(this.getLinearDamping()),t.setAngularDamping(this.getAngularDamping()),t}updateBodyInstances(){var e=this.transformNode;e.hasThinInstances&&this._physicsPlugin.updateBodyInstances(this,e)}get numInstances(){return this._pluginDataInstances.length}get motionType(){return this._physicsPlugin.getMotionType(this)}set shape(e){this._shape=e,e&&this._physicsPlugin.setShape(this,e)}get shape(){return this._shape}getBoundingBox(){return this._physicsPlugin.getBodyBoundingBox(this)}setEventMask(e,t){this._physicsPlugin.setEventMask(this,e,t)}getEventMask(e){return this._physicsPlugin.getEventMask(this,e)}setMotionType(e,t){this.disableSync=void 0===t&&0==e,this._physicsPlugin.setMotionType(this,e,t)}getMotionType(e){return this._physicsPlugin.getMotionType(this,e)}setPrestepType(e){this._prestepType=e}getPrestepType(){return this._prestepType}computeMassProperties(e){return this._physicsPlugin.computeMassProperties(this,e)}setMassProperties(e,t){this._physicsPlugin.setMassProperties(this,e,t)}getMassProperties(e){return this._physicsPlugin.getMassProperties(this,e)}setLinearDamping(e,t){this._physicsPlugin.setLinearDamping(this,e,t)}getLinearDamping(e){return this._physicsPlugin.getLinearDamping(this,e)}setAngularDamping(e,t){this._physicsPlugin.setAngularDamping(this,e,t)}getAngularDamping(e){return this._physicsPlugin.getAngularDamping(this,e)}setLinearVelocity(e,t){this._physicsPlugin.setLinearVelocity(this,e,t)}getLinearVelocityToRef(e,t){this._physicsPlugin.getLinearVelocityToRef(this,e,t)}getLinearVelocity(e){var t=new y.f;return this.getLinearVelocityToRef(t,e),t}setAngularVelocity(e,t){this._physicsPlugin.setAngularVelocity(this,e,t)}getAngularVelocityToRef(e,t){this._physicsPlugin.getAngularVelocityToRef(this,e,t)}getAngularVelocity(e){var t=new y.f;return this.getAngularVelocityToRef(t,e),t}applyImpulse(e,t,r){this._physicsPlugin.applyImpulse(this,e,t,r)}
1applyAngularImpulse(e,t){this._physicsPlugin.applyAngularImpulse(this,e,t)}applyTorque(e,t){this._physicsPlugin.applyTorque(this,e,t)}applyForce(e,t,r){this._physicsPlugin.applyForce(this,e,t,r)}getGeometry(){return this._physicsPlugin.getBodyGeometry(this)}getCollisionObservable(e){return this._physicsPlugin.getCollisionObservable(this,e)}getCollisionEndedObservable(e){return this._physicsPlugin.getCollisionEndedObservable(this,e)}setCollisionCallbackEnabled(e){this._collisionCBEnabled=e,this._physicsPlugin.setCollisionCallbackEnabled(this,e)}setCollisionEndedCallbackEnabled(e){this._collisionEndedCBEnabled=e,this._physicsPlugin.setCollisionEndedCallbackEnabled(this,e)}getObjectCenterWorld(e){var t=new y.f;return this.getObjectCenterWorldToRef(t,e)}getObjectCenterWorldToRef(e,t){var r;if((null===(r=this._pluginDataInstances)||void 0===r?void 0:r.length)>0){var n=t||0,o=this.transformNode._thinInstanceDataStorage.matrixData;o&&e.set(o[16*n+12],o[16*n+13],o[16*n+14])}else e.copyFrom(this.transformNode.position);return e}addConstraint(e,t,r,n){this._physicsPlugin.addConstraint(this,e,t,r,n)}syncWithBone(e,t,r,n,o,h){var l=this.transformNode;if(l.rotationQuaternion)if(o){var d=y.d.Quaternion[0];e.getRotationQuaternionToRef(1,t,d),d.multiplyToRef(o,l.rotationQuaternion)}else e.getRotationQuaternionToRef(1,t,l.rotationQuaternion);var c=y.d.Vector3[0],_=y.d.Vector3[1];h||((h=y.d.Vector3[2]).x=0,h.y=1,h.z=0),e.getDirectionToRef(h,t,_),e.getAbsolutePositionToRef(t,c),null==n&&r&&(n=r.length()),null!=n&&(c.x+=_.x*n,c.y+=_.y*n,c.z+=_.z*n),l.setAbsolutePosition(c)}iterateOverAllInstances(e){var t;if((null===(t=this._pluginDataInstances)||void 0===t?void 0:t.length)>0)for(var i=0;i<this._pluginDataInstances.length;i++)e(this,i);else e(this,void 0)}setGravityFactor(e,t){this._physicsPlugin.setGravityFactor(this,e,t)}getGravityFactor(e){return this._physicsPlugin.getGravityFactor(this,e)}setTargetTransform(e,t,r){this._physicsPlugin.setTargetTransform(this,e,t,r)}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._collisionCBEnabled&&this.setCollisionCallbackEnabled(!1),this._collisionEndedCBEnabled&&this.setCollisionEndedCallbackEnabled(!1),this._nodeDisposeObserver&&(this.transformNode.onDisposeObservable.remove(this._nodeDisposeObserver),this._nodeDisposeObserver=null),this._physicsEngine.removeBody(this),this._physicsPlugin.removeBody(this),this._physicsPlugin.disposeBody(this),this.transformNode.physicsBody=null,this._pluginData=null,this._pluginDataInstances.length=0,this._isDisposed=!0,this.shape=null)}}class O{constructor(e,t){if(this._pluginData=void 0,this._isTrigger=!1,this._isDisposed=!1,t){var r=t.getPhysicsEngine();if(!r)throw new Error("No Physics Engine available.");if(2!=r.getPluginVersion())throw new Error("Plugin version is incorrect. Expected version 2.");var n=r.getPhysicsPlugin();if(!n)throw new Error("No Physics Plugin available.");if(this._physicsPlugin=n,void 0!==e.pluginData&&null!==e.pluginData)this._pluginData=e.pluginData,this._type=this._physicsPlugin.getShapeType(this);else if(void 0!==e.type&&null!==e.type){var o;this._type=e.type;var h=null!==(o=e.parameters)&&void 0!==o?o:{};this._physicsPlugin.initShape(this,e.type,h)}}}getClassName(){return"PhysicsShape"}get type(){return this._type}set filterMembershipMask(e){this._physicsPlugin.setShapeFilterMembershipMask(this,e)}get filterMembershipMask(){return this._physicsPlugin.getShapeFilterMembershipMask(this)}set filterCollideMask(e){this._physicsPlugin.setShapeFilterCollideMask(this,e)}get filterCollideMask(){return this._physicsPlugin.getShapeFilterCollideMask(this)}set material(e){this._physicsPlugin.setMaterial(this,e),this._material=e}get material(){return this._material||(this._material=this._physicsPlugin.getMaterial(this)),this._material}set density(e){this._physicsPlugin.setDensity(this,e)}get density(){return this._physicsPlugin.getDensity(this)}addChildFromParent(e,t,r){var n=r.computeWorldMatrix(!0),o=e.computeWorldMatrix(!0),h=y.d.Matrix[0];n.multiplyToRef(y.a.Invert(o),h);var l=y.d.Vector3[0],d=y.d.Quaternion[0],c=y.d.Vector3[1];h.decompose(c,d,l),this._physicsPlugin.addChild(this,t,l,d,c)}addChild(e,t,r,n){this._physicsPlugin.addChild(this,e,t,r,n)}removeChild(e){this._physicsPlugin.removeChild(this,e)}getNumChildren(){return this._physicsPlugin.getNumChildren(this)}getBoundingBox(){return this._physicsPlugin.getBoundingBox(this)}set isTrigger(e){this._isTrigger!==e&&(this._isTrigger=e,this._physicsPlugin.setTrigger(this,e))}get isTrigger(){return this._isTrigger}dispose(){this._isDisposed||(this._physicsPlugin.disposeShape(this),this._isDisposed=!0)}}var R=r(7),E=r(11),S=r(298);function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}class C{constructor(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{mass:0},o=arguments.length>3?arguments[3]:void 0;if(this.transformNode=e,this.type=t,this._scene=o,this._disposeShapeWhenDisposed=!0,this._options=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?T(Object(r),!0).forEach(function(t){Object(v.a)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},n),this.transformNode){var h=e;if(this.transformNode.parent&&0!==this._options.mass&&h.hasThinInstances&&R.a.Warn("A physics body has been created for an object which has a parent and thin instances. Babylon physics currently works in local space so unexpected issues may occur."),!this._scene&&e.getScene&&(this._scene=e.getScene()),this._scene){this._options.mass=void 0===this._options.mass?0:this._options.mass,this._options.friction=void 0===this._options.friction?.2:this._options.friction,this._options.restitution=void 0===this._options.restitution?.2:this._options.restitution;var l=0===this._options.mass?0:2,d=null!==(r=this._options.startAsleep)&&void 0!==r&&r;this.body=new P(e,l,d,this._scene),this._addSizeOptions(),t.getClassName&&"PhysicsShape"===t.getClassName()?(this.shape=t,this._disposeShapeWhenDisposed=!1):this.shape=new O({type:t,parameters:this._options},this._scene),this._options.isTriggerShape&&(this.shape.isTrigger=!0),this.material={friction:this._options.friction,restitution:this._options.restitution},this.body.shape=this.shape,this.shape.material=this.material,this.body.setMassProperties({mass:this._options.mass}),this._nodeDisposeObserver=this.transformNode.onDisposeObservable.add(()=>{this.dispose()})}}else R.a.Error("No object was provided. A physics object is obligatory")}_getObjectBoundingBox(){return this.transformNode.getRawBoundingInfo?this.transformNode.getRawBoundingInfo().boundingBox:new S.a(new y.f(-.5,-.5,-.5),new y.f(.5,.5,.5))}_hasVertices(e){return(null==e?void 0:e.getTotalVertices())>0}_addSizeOptions(){var e,t;this.transformNode.computeWorldMatrix(!0);var r=this._getObjectBoundingBox(),n=y.d.Vector3[0];n.copyFrom(r.extendSize),n.scaleInPlace(2),n.multiplyInPlace(this.transformNode.absoluteScaling),n.x=Math.abs(n.x),n.y=Math.abs(n.y),n.z=Math.abs(n.z);var o=y.d.Vector3[1];if(o.copyFrom(r.minimum),o.multiplyInPlace(this.transformNode.absoluteScaling),!this._options.center){var h=new y.f;h.copyFrom(r.center),h.multiplyInPlace(this.transformNode.absoluteScaling),this._options.center=h}switch(this.type){case 0:!this._options.radius&&Object(E.WithinEpsilon)(n.x,n.y,1e-4)&&Object(E.WithinEpsilon)(n.x,n.z,1e-4)?this._options.radius=n.x/2:this._options.radius||(R.a.Warn("Non uniform scaling is unsupported for sphere shapes. Setting the radius to the biggest bounding box extent."),this._options.radius=Math.max(n.x,n.y,n.z)/2);break;case 1:var l,d,c,_=n.x/2;this._options.radius=null!==(l=this._options.radius)&&void 0!==l?l:_,this._options.pointA=null!==(d=this._options.pointA)&&void 0!==d?d:new y.f(0,o.y+_,0),this._options.pointB=null!==(c=this._options.pointB)&&void 0!==c?c:new y.f(0,o.y+n.y-_,0);break;case 2:var f,m,v,P=n.x/2;this._options.radius=null!==(f=this._options.radius)&&void 0!==f?f:P,this._options.pointA=null!==(m=this._options.pointA)&&void 0!==m?m:new y.f(0,o.y,0),this._options.pointB=null!==(v=this._options.pointB)&&void 0!==v?v:new y.f(0,o.y+n.y,0);break;case 6:case 4:case 7:if(!this._options.mesh&&this._hasVertices(this.transformNode))this._options.mesh=this.transformNode;else if(!this._options.mesh||!this._hasVertices(this._options.mesh))throw new Error("No valid mesh was provided for mesh or convex hull shape parameter. Please provide a mesh with valid geometry (number of vertices greater than 0).");break;case 3:this._options.extents=null!==(e=this._options.extents)&&void 0!==e?e:new y.f(n.x,n.y,n.z),this._options.rotation=null!==(t=this._options.rotation)&&void 0!==t?t:y.b.Identity()}}dispose(){this._nodeDisposeObserver&&(this.body.transformNode.onDisposeObservable.remove(this._nodeDisposeObserver),this._nodeDisposeObserver=null),this.body.dispose(),this._disposeShapeWhenDisposed&&this.shape.dispose()}}},96:function(e,t,r){"use strict";r.d(t,"a",function(){return _e});r(36),r(12);var n,o,h,l,d,c,_,f,m,v,y,P,O,R,E,S,T,C,I,x,M,D,A,F,w,B,L,j,N,U,k,z,G,W,V,Q,H,K,Y,X,Z,J,$,ee,te,ie,se,re=r(0),ne=r(65
1),ae=r(8),oe=r(1),he=r(72),le=r(2),de=r(26),ce=r(21),ue=r(15),pe=r(80),ge=r(125),_e=(I=[],x=[],M=[],D=[],A=[],F=[],w=[],B=[],L=[],j=[],N=[],U=[],k=[],z=[],G=[],W=[],V=[],Q=[],H=[],K=[],Y=[],X=[],Z=[],J=[],$=[],ee=[],te=[],ie=[],se=[],n=class{static get ForceGLSL(){return ge.b.ForceGLSL}static set ForceGLSL(e){ge.b.ForceGLSL=e}static RegisterShaderCodeProcessing(e,t){ge.b.RegisterShaderCodeProcessing(e,t)}get name(){return this._effectWrapper.name}set name(e){this._effectWrapper.name=e}get alphaMode(){return this._effectWrapper.alphaMode}set alphaMode(e){this._effectWrapper.alphaMode=e}get samples(){return this._samples}set samples(e){this._samples=Math.min(e,this._engine.getCaps().maxMSAASamples),this._textures.forEach(e=>{e.setSamples(this._samples)})}get shaderLanguage(){return this._shaderLanguage}getEffectName(){return this._fragmentUrl}set onActivate(e){this._onActivateObserver&&this.onActivateObservable.remove(this._onActivateObserver),e&&(this._onActivateObserver=this.onActivateObservable.add(e))}set onSizeChanged(e){this._onSizeChangedObserver&&this.onSizeChangedObservable.remove(this._onSizeChangedObserver),this._onSizeChangedObserver=this.onSizeChangedObservable.add(e)}set onApply(e){this._onApplyObserver&&this.onApplyObservable.remove(this._onApplyObserver),this._onApplyObserver=this.onApplyObservable.add(e)}set onBeforeRender(e){this._onBeforeRenderObserver&&this.onBeforeRenderObservable.remove(this._onBeforeRenderObserver),this._onBeforeRenderObserver=this.onBeforeRenderObservable.add(e)}set onAfterRender(e){this._onAfterRenderObserver&&this.onAfterRenderObservable.remove(this._onAfterRenderObserver),this._onAfterRenderObserver=this.onAfterRenderObservable.add(e)}get inputTexture(){return this._textures.data[this._currentRenderTextureInd]}set inputTexture(e){this._forcedOutputTexture=e}restoreDefaultInputTexture(){this._forcedOutputTexture&&(this._forcedOutputTexture=null,this.markTextureDirty())}getCamera(){return this._camera}get texelSize(){return this._shareOutputWithPostProcess?this._shareOutputWithPostProcess.texelSize:(this._forcedOutputTexture&&this._texelSize.copyFromFloats(1/this._forcedOutputTexture.width,1/this._forcedOutputTexture.height),this._texelSize)}constructor(e,t,r,o,h,l){var d,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,_=arguments.length>7?arguments[7]:void 0,f=arguments.length>8?arguments[8]:void 0,m=arguments.length>9&&void 0!==arguments[9]?arguments[9]:null,v=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,y=arguments.length>11&&void 0!==arguments[11]?arguments[11]:"postprocess",P=arguments.length>12?arguments[12]:void 0,O=arguments.length>13&&void 0!==arguments[13]&&arguments[13],R=arguments.length>14&&void 0!==arguments[14]?arguments[14]:5,E=arguments.length>15?arguments[15]:void 0,S=arguments.length>16?arguments[16]:void 0;this._parentContainer=(Object(re.d)(this,I),null),this.uniqueId=Object(re.d)(this,x,void 0),this.width=(Object(re.d)(this,M),Object(re.d)(this,D,-1)),this.height=(Object(re.d)(this,A),Object(re.d)(this,F,-1)),this.nodeMaterialSource=(Object(re.d)(this,w),null),this._outputTexture=null,this.renderTargetSamplingMode=Object(re.d)(this,B,void 0),this.clearColor=(Object(re.d)(this,L),Object(re.d)(this,j,void 0)),this.autoClear=(Object(re.d)(this,N),Object(re.d)(this,U,!0)),this.forceAutoClearInAlphaMode=(Object(re.d)(this,k),Object(re.d)(this,z,!1)),this.alphaConstants=(Object(re.d)(this,G),Object(re.d)(this,W,void 0)),this.animations=(Object(re.d)(this,V),[]),this.enablePixelPerfectMode=Object(re.d)(this,Q,!1),this.forceFullscreenViewport=(Object(re.d)(this,H),Object(re.d)(this,K,!0)),this.inspectableCustomProperties=Object(re.d)(this,Y),this.scaleMode=Object(re.d)(this,X,1),this.alwaysForcePOT=(Object(re.d)(this,Z),Object(re.d)(this,J,!1)),this._samples=(Object(re.d)(this,$),Object(re.d)(this,ee,1)),this.adaptScaleToCurrentViewport=(Object(re.d)(this,te),Object(re.d)(this,ie,!1)),this.doNotSerialize=(Object(re.d)(this,se),!1),this._webGPUReady=!1,this._reusable=!1,this._renderId=0,this.externalTextureSamplerBinding=!1,this._textures=new ne.a(2),this._textureCache=[],this._currentRenderTextureInd=0,this._scaleRatio=new oe.e(1,1),this._texelSize=oe.e.Zero(),this.onActivateObservable=new ae.a,this.onSizeChangedObservable=new ae.a,this.onApplyObservable=new ae.a,this.onBeforeRenderObservable=new ae.a,this.onAfterRenderObservable=new ae.a,this.onDisposeObservable=new ae.a,me();var T,C=1,he=null;if(r&&!Array.isArray(r)){var le,de,ce,ue,pe,_e,fe,ve,be,ye,Pe,Oe,Re=r;r=null!==(le=Re.uniforms)&&void 0!==le?le:null,o=null!==(de=Re.samplers)&&void 0!==de?de:null,C=null!==(ce=
1Re.size)&&void 0!==ce?ce:1,l=null!==(ue=Re.camera)&&void 0!==ue?ue:null,c=null!==(pe=Re.samplingMode)&&void 0!==pe?pe:1,_=Re.engine,f=Re.reusable,m=Array.isArray(Re.defines)?Re.defines.join("\n"):null!==(_e=Re.defines)&&void 0!==_e?_e:null,v=null!==(fe=Re.textureType)&&void 0!==fe?fe:0,y=null!==(ve=Re.vertexUrl)&&void 0!==ve?ve:"postprocess",P=Re.indexParameters,O=null!==(be=Re.blockCompilation)&&void 0!==be&&be,R=null!==(ye=Re.textureFormat)&&void 0!==ye?ye:5,E=null!==(Pe=Re.shaderLanguage)&&void 0!==Pe?Pe:0,he=null!==(Oe=Re.uniformBuffers)&&void 0!==Oe?Oe:null,S=Re.extraInitializations,T=Re.effectWrapper}else h&&(C="number"==typeof h?h:{width:h.width,height:h.height});if(this._useExistingThinPostProcess=!!T,this._effectWrapper=null!=T?T:new ge.b({name:e,useShaderStore:!0,useAsPostProcess:!0,fragmentShader:t,engine:_||(null===(d=l)||void 0===d?void 0:d.getScene().getEngine()),uniforms:r,samplers:o,uniformBuffers:he,defines:m,vertexUrl:y,indexParameters:P,blockCompilation:!0,shaderLanguage:E,extraInitializations:void 0}),this.name=e,this.onEffectCreatedObservable=this._effectWrapper.onEffectCreatedObservable,null!=l?(this._camera=l,this._scene=l.getScene(),l.attachPostProcess(this),this._engine=this._scene.getEngine(),this._scene.addPostProcess(this),this.uniqueId=this._scene.getUniqueId()):_&&(this._engine=_,this._engine.postProcesses.push(this)),this._options=C,this.renderTargetSamplingMode=c||1,this._reusable=f||!1,this._textureType=v,this._textureFormat=R,this._shaderLanguage=E||0,this._samplers=o||[],-1===this._samplers.indexOf("textureSampler")&&this._samplers.push("textureSampler"),this._fragmentUrl=t,this._vertexUrl=y,this._parameters=r||[],-1===this._parameters.indexOf("scale")&&this._parameters.push("scale"),this._uniformBuffers=he||[],this._indexParameters=P,!this._useExistingThinPostProcess){this._webGPUReady=1===this._shaderLanguage;var Ee=[];this._gatherImports(this._engine.isWebGPU&&!n.ForceGLSL,Ee),this._effectWrapper._webGPUReady=this._webGPUReady,this._effectWrapper._postConstructor(O,m,S,Ee)}}_gatherImports(){var e=arguments.length>1?arguments[1]:void 0;arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&this._webGPUReady?e.push(Prom
1ise.all([r.e(49).then(r.bind(null,707))])):e.push(Promise.all([r.e(44).then(r.bind(null,708))]))}getClassName(){return"PostProcess"}getEngine(){return this._engine}getEffect(){return this._effectWrapper.drawWrapper.effect}shareOutputWith(e){return this._disposeTextures(),this._shareOutputWithPostProcess=e,this}useOwnOutput(){0==this._textures.length&&(this._textures=new ne.a(2)),this._shareOutputWithPostProcess=null}updateEffect(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,h=arguments.length>5?arguments[5]:void 0,l=arguments.length>6?arguments[6]:void 0,d=arguments.length>7?arguments[7]:void 0;this._effectWrapper.updateEffect(e,t,r,n,o,h,l,d),this._postProcessDefines=Array.isArray(this._effectWrapper.options.defines)?this._effectWrapper.options.defines.join("\n"):this._effectWrapper.options.defines}isReusable(){return this._reusable}markTextureDirty(){this.width=-1}_createRenderTargetTexture(e,t){for(var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=0;i<this._textureCache.length;i++)if(this._textureCache[i].texture.width===e.width&&this._textureCache[i].texture.height===e.height&&this._textureCache[i].postProcessChannel===r&&this._textureCache[i].texture._generateDepthBuffer===t.generateDepthBuffer&&this._textureCache[i].texture.samples===t.samples)return this._textureCache[i].texture;var n=this._engine.createRenderTargetTexture(e,t);return this._textureCache.push({texture:n,postProcessChannel:r,lastUsedRenderId:-1}),n}_flushTextureCache(){for(var e=this._renderId,i=this._textureCache.length-1;i>=0;i--)if(e-this._textureCache[i].lastUsedRenderId>100){for(var t=!1,r=0;r<this._textures.length;r++)if(this._textures.data[r]===this._textureCache[i].texture){t=!0;break}t||(this._textureCache[i].texture.dispose(),this._textureCache.splice(i,1))}}resize(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];this._textures.length>0&&this._textures.reset(),this.width=e,this.height=t;var h=null;if(r)for(var i=0;i<r._postProcesses.length;i++)if(null!==r._postProcesses[i]){h=r._postProcesses[i];break}var l={width:this.width,height:this.height},d={generateMipMaps:n,generateDepthBuffer:o||h===this,generateStencilBuffer:(o||h===this)&&this._engine.isStencilEnable,samplingMode:this.renderTargetSamplingMode,type:this._textureType,format:this._textureFormat,samples:this._samples,label:"PostProcessRTT-"+this.name};this._textures.push(this._createRenderTargetTexture(l,d,0)),this._reusable&&this._textures.push(this._createRenderTargetTexture(l,d,1)),this._texelSize.copyFromFloats(1/this.width,1/this.height),this.onSizeChangedObservable.notifyObservers(this)}_getTarget(){var e;if(this._shareOutputWithPostProcess)e=this._shareOutputWithPostProcess.inputTexture;else if(this._forcedOutputTexture)e=this._forcedOutputTexture,this.width=this._forcedOutputTexture.width,this.height=this._forcedOutputTexture.height;else{var t;e=this.inputTexture;for(var i=0;i<this._textureCache.length;i++)if(this._textureCache[i].texture===e){t=this._textureCache[i];break}t&&(t.lastUsedRenderId=this._renderId)}return e}activate(e){var t,r,n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,h=arguments.length>2?arguments[2]:void 0,l=null===e||void 0!==e.cameraRigMode?e||this._camera:null,d=null!==(t=null==l?void 0:l.getScene())&&void 0!==t?t:e,c=d.getEngine(),_=c.getCaps().maxTextureSize,f=(o?o.width:this._engine.getRenderWidth(!0))*this._options|0,m=(o?o.height:this._engine.getRenderHeight(!0))*this._options|0,v=this._options.width||f,y=this._options.height||m,P=7!==this.renderTargetSamplingMode&&1!==this.renderTargetSamplingMode&&2!==this.renderTargetSamplingMode,O=null;if(!this._shareOutputWithPostProcess&&!this._forcedOutputTexture){if(this.adaptScaleToCurrentViewport){var R=c.currentViewport;R&&(v*=R.width,y*=R.height)}(P||this.alwaysForcePOT)&&(this._options.width||(v=c.needPOTTextures?Object(pe.b)(v,_,this.scaleMode):v),this._options.height||(y=c.needPOTTextures?Object(pe.b)(y,_,this.scaleMode):y)),this.width===v&&this.height===y&&(O=this._getTarget())||this.resize(v,y,l,P,h),this._textures.forEac
1h(e=>{e.samples!==this.samples&&this._engine.updateRenderTargetTextureSampleCount(e,this.samples)}),this._flushTextureCache(),this._renderId++}return O||(O=this._getTarget()),this.enablePixelPerfectMode?(this._scaleRatio.copyFromFloats(f/v,m/y),this._engine.bindFramebuffer(O,0,f,m,this.forceFullscreenViewport)):(this._scaleRatio.copyFromFloats(1,1),this._engine.bindFramebuffer(O,0,void 0,void 0,this.forceFullscreenViewport)),null===(r=(n=this._engine)._debugInsertMarker)||void 0===r||r.call(n,"post process ".concat(this.name," input")),this.onActivateObservable.notifyObservers(l),this.autoClear&&(0===this.alphaMode||this.forceAutoClearInAlphaMode)&&this._engine.clear(this.clearColor?this.clearColor:d.clearColor,d._allowPostProcessClearColor,!0,!0),this._reusable&&(this._currentRenderTextureInd=(this._currentRenderTextureInd+1)%2),O}get isSupported(){return this._effectWrapper.drawWrapper.effect.isSupported}get aspectRatio(){return this._shareOutputWithPostProcess?this._shareOutputWithPostProcess.aspectRatio:this._forcedOutputTexture?this._forcedOutputTexture.width/this._forcedOutputTexture.height:this.width/this.height}isReady(){return this._effectWrapper.isReady()}apply(){return this._effectWrapper.isReady()?(this._engine.enableEffect(this._effectWrapper.drawWrapper),this._engine.setState(!1),this._engine.setDepthBuffer(!1),this._engine.setDepthWrite(!1),this.alphaConstants&&this.getEngine().setAlphaConstants(this.alphaConstants.r,this.alphaConstants.g,this.alphaConstants.b,this.alphaConstants.a),this._engine.setAlphaMode(this.alphaMode),source=this._shareOutputWithPostProcess?this._shareOutputWithPostProcess.inputTexture:this._forcedOutputTexture?this._forcedOutputTexture:this.inputTexture,this.externalTextureSamplerBinding||this._effectWrapper.drawWrapper.effect._bindTexture("textureSampler",null===(e=source)||void 0===e?void 0:e.texture),this._effectWrapper.drawWrapper.effect.setVector2("scale",this._scaleRatio),this.onApplyObservable.notifyObservers(this._effectWrapper.drawWrapper.effect),this._effectWrapper.bind(!0),this._effectWrapper.drawWrapper.effect):null;var source,e}_disposeTextures(){this._shareOutputWithPostProcess||this._forcedOutputTexture?this._disposeTextureCache():(this._disposeTextureCache(),this._textures.dispose())}_disposeTextureCache(){for(var i=this._textureCache.length-1;i>=0;i--)this._textureCache[i].texture.dispose();this._textureCache.length=0}setPrePassRenderer(e){return!!this._prePassEffectConfiguration&&(this._prePassEffectConfiguration=e.addEffectConfiguration(this._prePassEffectConfiguration),this._prePassEffectConfiguration.enabled=!0,!0)}dispose(e){var t;if(e=e||this._camera,this._useExistingThinPostProcess||this._effectWrapper.dispose(),this._disposeTextures(),this._scene&&this._scene.removePostProcess(this),this._parentContainer&&((t=this._parentContainer.postProcesses.indexOf(this))>-1&&this._parentContainer.postProcesses.splice(t,1),this._parentContainer=null),-1!==(t=this._engine.postProcesses.indexOf(this))&&this._engine.postProcesses.splice(t,1),this.onDisposeObservable.notifyObservers(),e){if(e.detachPostProcess(this),0===(t=e._postProcesses.indexOf(this))&&e._postProcesses.length>0){var r=this._camera._getFirstPostProcess();r&&r.markTextureDirty()}this.onActivateObservable.clear(),this.onAfterRenderObservable.clear(),this.onApplyObservable.clear(),this.onBeforeRenderObservable.clear(),this.onSizeChangedObservable.clear(),this.onEffectCreatedObservable.clear()}}serialize(){var e=de.a.Serialize(this),t=this.getCamera()||this._scene&&this._scene.activeCamera;return e.customType="BABYLON."+this.getClassName(),e.cameraId=t?t.id:null,e.reusable=this._reusable,e.textureType=this._textureType,e.fragmentUrl=this._fragmentUrl,e.parameters=this._parameters,e.samplers=this._samplers,e.uniformBuffers=this._uniformBuffers,e.options=this._options,e.defines=this._postProcessDefines,e.textureFormat=this._textureFormat,e.vertexUrl=this._vertexUrl,e.indexParameters=this._indexParameters,e}clone(){var e=this.serialize();e._engine=this._engine,e.cameraId=null;var t=n.Parse(e,this._scene,"");return t?(t.onActivateObservable=this.onActivateObservable.clone(),t.onSizeChangedObservable=this.onSizeChangedObservable.clone(),t.onApplyObservable=this.onApplyObservable.clone(),t.onBeforeRenderObservable=this.onBeforeRenderObservable.clone(),t.onAfterRenderObservable=this.onAfterRenderObservable.clone(),t._prePassEffectConfiguration=this._prePassEffectConfiguration,t):null}static Parse(e,t,r){var n=Object(ce.a)(e.customType);if(!n||!n._Parse)return null;var o=t?t.getCameraById(e.cameraId):null;return n._Parse(e,o,t,r)}static _Parse(e,t,r,o){return de.a.Parse(()=>new n(e.name,e.fragmentUrl,e.parameters,e.samplers,e.options,t,e.renderTargetSamplingMode,e._engine,e.reusable,e.defines,e.textureType,e.vertexUrl,e.indexParameters,!1,e.textureFormat),e,r,o)}},C="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,o=[Object(le.d)()],h=[Object(le.d)()],l=[Object(le.d)()],d=[Object(le.d)()],c=[Object(le.d)()],_=[Object(le.g)()],f=[Object(le.d)()],m=[Object(le.d)()],v=[Object(le.d)()],y=[Ob
1ject(le.d)()],P=[Object(le.d)()],O=[Object(le.d)()],R=[Object(le.d)()],E=[Object(le.d)()],S=[Object(le.d)("samples")],T=[Object(le.d)()],Object(re.c)(n,null,h,{kind:"getter",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name},metadata:C},null,I),Object(re.c)(n,null,v,{kind:"getter",name:"alphaMode",static:!1,private:!1,access:{has:e=>"alphaMode"in e,get:e=>e.alphaMode},metadata:C},null,I),Object(re.c)(null,null,o,{kind:"field",name:"uniqueId",static:!1,private:!1,access:{has:e=>"uniqueId"in e,get:e=>e.uniqueId,set:(e,t)=>{e.uniqueId=t}},metadata:C},x,M),Object(re.c)(null,null,l,{kind:"field",name:"width",static:!1,private:!1,access:{has:e=>"width"in e,get:e=>e.width,set:(e,t)=>{e.width=t}},metadata:C},D,A),Object(re.c)(null,null,d,{kind:"field",name:"height",static:!1,private:!1,access:{has:e=>"height"in e,get:e=>e.height,set:(e,t)=>{e.height=t}},metadata:C},F,w),Object(re.c)(null,null,c,{kind:"field",name:"renderTargetSamplingMode",static:!1,private:!1,access:{has:e=>"renderTargetSamplingMode"in e,get:e=>e.renderTargetSamplingMode,set:(e,t)=>{e.renderTargetSamplingMode=t}},metadata:C},B,L),Object(re.c)(null,null,_,{kind:"field",name:"clearColor",static:!1,private:!1,access:{has:e=>"clearColor"in e,get:e=>e.clearColor,set:(e,t)=>{e.clearColor=t}},metadata:C},j,N),Object(re.c)(null,null,f,{kind:"field",name:"autoClear",static:!1,private:!1,access:{has:e=>"autoClear"in e,get:e=>e.autoClear,set:(e,t)=>{e.autoClear=t}},metadata:C},U,k),Object(re.c)(null,null,m,{kind:"field",name:"forceAutoClearInAlphaMode",static:!1,private:!1,access:{has:e=>"forceAutoClearInAlphaMode"in e,get:e=>e.forceAutoClearInAlphaMode,set:(e,t)=>{e.forceAutoClearInAlphaMode=t}},metadata:C},z,G),Object(re.c)(null,null,y,{kind:"field",name:"alphaConstants",static:!1,private:!1,access:{has:e=>"alphaConstants"in e,get:e=>e.alphaConstants,set:(e,t)=>{e.alphaConstants=t}},metadata:C},W,V),Object(re.c)(null,null,P,{kind:"field",name:"enablePixelPerfectMode",static:!1,private:!1,access:{has:e=>"enablePixelPerfectMode"in e,get:e=>e.enablePixelPerfectMode,set:(e,t)=>{e.enablePixelPerfectMode=t}},metadata:C},Q,H),Object(re.c)(null,null,O,{kind:"field",name:"forceFullscreenViewport",static:!1,private:!1,access:{has:e=>"forceFullscreenViewport"in e,get:e=>e.forceFullscreenViewport,set:(e,t)=>{e.forceFullscreenViewport=t}},metadata:C},K,Y),Object(re.c)(null,null,R,{kind:"field",name:"scaleMode",static:!1,private:!1,access:{has:e=>"scaleMode"in e,get:e=>e.scaleMode,set:(e,t)=>{e.scaleMode=t}},metadata:C},X,Z),Object(re.c)(null,null,E,{kind:"field",name:"alwaysForcePOT",static:!1,private:!1,access:{has:e=>"alwaysForcePOT"in e,get:e=>e.alwaysForcePOT,set:(e,t)=>{e.alwaysForcePOT=t}},metadata:C},J,$),Object(re.c)(null,null,S,{kind:"field",name:"_samples",static:!1,private:!1,access:{has:e=>"_samples"in e,get:e=>e._samples,set:(e,t)=>{e._samples=t}},metadata:C},ee,te),Object(re.c)(null,null,T,{kind:"field",name:"adaptScaleToCurrentViewport",static:!1,private:!1,access:{has:e=>"adaptScaleToCurrentViewport"in e,get:e=>e.adaptScaleToCurrentViewport,set:(e,t)=>{e.adaptScaleToCurrentViewport=t}},metadata:C},ie,se),C&&Object.defineProperty(n,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:C}),n),fe=!1;function me(){fe||(fe=!0,ue.a.prototype.setTextureFromPostProcess=function(e,t,r){var n,o,h=null;t&&(t._forcedOutputTexture?h=t._forcedOutputTexture:t._textures.data[t._currentRenderTextureInd]&&(h=t._textures.data[t._currentRenderTextureInd])),this._bindTexture(e,null!==(n=null===(o=h)||void 0===o?void 0:o.texture)&&void 0!==n?n:null,r)},ue.a.prototype.setTextureFromPostProcessOutput=function(e,t,r){var n,o;this._bindTexture(e,null!==(n=null==t||null===(o=t._outputTexture)||void 0===o?void 0:o.texture)&&void 0!==n?n:null,r)},he.a.prototype.setTextureFromPostProcess=function(e,t){this._engine.setTextureFromPostProcess(this._samplers[e],t,e)},he.a.prototype.setTextureFromPostProcessOutput=function(e,t){this._engine.setTextureFromPostProcessOutput(this._samplers[e],t,e)},Object(ce.b)("BABYLON.PostProcess",_e))}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.