@tsparticles/updater-rotate
Advanced tools
Comparing version 3.4.0 to 3.5.0
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loadRotateUpdater = void 0; | ||
exports.loadRotateUpdater = loadRotateUpdater; | ||
const RotateUpdater_js_1 = require("./RotateUpdater.js"); | ||
@@ -10,2 +10,1 @@ async function loadRotateUpdater(engine, refresh = true) { | ||
} | ||
exports.loadRotateUpdater = loadRotateUpdater; |
{ | ||
"name": "@tsparticles/updater-rotate", | ||
"version": "3.4.0", | ||
"version": "3.5.0", | ||
"description": "tsParticles particles rotate updater", | ||
@@ -90,3 +90,3 @@ "homepage": "https://particles.js.org", | ||
"dependencies": { | ||
"@tsparticles/engine": "^3.4.0" | ||
"@tsparticles/engine": "^3.5.0" | ||
}, | ||
@@ -93,0 +93,0 @@ "publishConfig": { |
@@ -7,3 +7,3 @@ /*! | ||
* How to use? : Check the GitHub README | ||
* v3.4.0 | ||
* v3.5.0 | ||
*/ | ||
@@ -10,0 +10,0 @@ /* |
/*! For license information please see tsparticles.updater.rotate.min.js.LICENSE.txt */ | ||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],t);else{var o="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var a in o)("object"==typeof exports?exports:e)[a]=o[a]}}(this,(e=>(()=>{var t={303:t=>{t.exports=e}},o={};function a(e){var i=o[e];if(void 0!==i)return i.exports;var n=o[e]={exports:{}};return t[e](n,n.exports,a),n.exports}a.d=(e,t)=>{for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{a.r(i),a.d(i,{loadRotateUpdater:()=>s});var e=a(303);class t{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=(0,e.setRangeValue)(t.speed)),void 0!==t.decay&&(this.decay=(0,e.setRangeValue)(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class o extends e.ValueWithRandom{constructor(){super(),this.animation=new t,this.direction=e.RotateDirection.clockwise,this.path=!1,this.value=0}load(e){e&&(super.load(e),void 0!==e.direction&&(this.direction=e.direction),this.animation.load(e.animation),void 0!==e.path&&(this.path=e.path))}}const n=2*Math.PI;class r{constructor(e){this.container=e}init(t){const o=t.options.rotate;if(!o)return;t.rotate={enable:o.animation.enable,value:(0,e.degToRad)((0,e.getRangeValue)(o.value)),min:0,max:n},t.pathRotation=o.path;let a=o.direction;if(a===e.RotateDirection.random){a=Math.floor(2*(0,e.getRandom)())>0?e.RotateDirection.counterClockwise:e.RotateDirection.clockwise}switch(a){case e.RotateDirection.counterClockwise:case"counterClockwise":t.rotate.status=e.AnimationStatus.decreasing;break;case e.RotateDirection.clockwise:t.rotate.status=e.AnimationStatus.increasing}const i=o.animation;i.enable&&(t.rotate.decay=1-(0,e.getRangeValue)(i.decay),t.rotate.velocity=(0,e.getRangeValue)(i.speed)/360*this.container.retina.reduceFactor,i.sync||(t.rotate.velocity*=(0,e.getRandom)())),t.rotation=t.rotate.value}isEnabled(e){const t=e.options.rotate;return!!t&&(!e.destroyed&&!e.spawning&&(!!t.value||t.animation.enable||t.path))}loadOptions(e,...t){e.rotate||(e.rotate=new o);for(const o of t)e.rotate.load(o?.rotate)}update(t,o){this.isEnabled(t)&&(t.isRotating=!!t.rotate,t.rotate&&((0,e.updateAnimation)(t,t.rotate,!1,e.DestroyType.none,o),t.rotation=t.rotate.value))}}async function s(e,t=!0){await e.addParticleUpdater("rotate",(e=>Promise.resolve(new r(e))),t)}})(),i})())); | ||
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],t);else{var o="object"==typeof exports?t(require("@tsparticles/engine")):t(e.window);for(var a in o)("object"==typeof exports?exports:e)[a]=o[a]}}(this,(e=>(()=>{var t={303:t=>{t.exports=e}},o={};function a(e){var i=o[e];if(void 0!==i)return i.exports;var n=o[e]={exports:{}};return t[e](n,n.exports,a),n.exports}a.d=(e,t)=>{for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};a.r(i),a.d(i,{loadRotateUpdater:()=>l});var n=a(303);class r{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(e){e&&(void 0!==e.enable&&(this.enable=e.enable),void 0!==e.speed&&(this.speed=(0,n.setRangeValue)(e.speed)),void 0!==e.decay&&(this.decay=(0,n.setRangeValue)(e.decay)),void 0!==e.sync&&(this.sync=e.sync))}}class s extends n.ValueWithRandom{constructor(){super(),this.animation=new r,this.direction=n.RotateDirection.clockwise,this.path=!1,this.value=0}load(e){e&&(super.load(e),void 0!==e.direction&&(this.direction=e.direction),this.animation.load(e.animation),void 0!==e.path&&(this.path=e.path))}}const c=2*Math.PI;class d{constructor(e){this.container=e}init(e){const t=e.options.rotate;if(!t)return;e.rotate={enable:t.animation.enable,value:(0,n.degToRad)((0,n.getRangeValue)(t.value)),min:0,max:c},e.pathRotation=t.path;let o=t.direction;if(o===n.RotateDirection.random){o=Math.floor(2*(0,n.getRandom)())>0?n.RotateDirection.counterClockwise:n.RotateDirection.clockwise}switch(o){case n.RotateDirection.counterClockwise:case"counterClockwise":e.rotate.status=n.AnimationStatus.decreasing;break;case n.RotateDirection.clockwise:e.rotate.status=n.AnimationStatus.increasing}const a=t.animation;a.enable&&(e.rotate.decay=1-(0,n.getRangeValue)(a.decay),e.rotate.velocity=(0,n.getRangeValue)(a.speed)/360*this.container.retina.reduceFactor,a.sync||(e.rotate.velocity*=(0,n.getRandom)())),e.rotation=e.rotate.value}isEnabled(e){const t=e.options.rotate;return!!t&&(!e.destroyed&&!e.spawning&&(!!t.value||t.animation.enable||t.path))}loadOptions(e,...t){e.rotate||(e.rotate=new s);for(const o of t)e.rotate.load(o?.rotate)}update(e,t){this.isEnabled(e)&&(e.isRotating=!!e.rotate,e.rotate&&((0,n.updateAnimation)(e,e.rotate,!1,n.DestroyType.none,t),e.rotation=e.rotate.value))}}async function l(e,t=!0){await e.addParticleUpdater("rotate",(e=>Promise.resolve(new d(e))),t)}return i})())); |
@@ -1,1 +0,1 @@ | ||
/*! tsParticles Rotate Updater v3.4.0 by Matteo Bruni */ | ||
/*! tsParticles Rotate Updater v3.5.0 by Matteo Bruni */ |
@@ -12,3 +12,3 @@ (function (factory) { | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loadRotateUpdater = void 0; | ||
exports.loadRotateUpdater = loadRotateUpdater; | ||
const RotateUpdater_js_1 = require("./RotateUpdater.js"); | ||
@@ -20,3 +20,2 @@ async function loadRotateUpdater(engine, refresh = true) { | ||
} | ||
exports.loadRotateUpdater = loadRotateUpdater; | ||
}); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
321459
834
Updated@tsparticles/engine@^3.5.0