@tsparticles/updater-roll
Advanced tools
Comparing version 3.6.0-beta.1 to 3.6.0
@@ -1,2 +0,2 @@ | ||
import { OptionsColor, setRangeValue, } from "@tsparticles/engine"; | ||
import { OptionsColor, isNull, setRangeValue, } from "@tsparticles/engine"; | ||
import { RollLight } from "./RollLight.js"; | ||
@@ -13,3 +13,3 @@ import { RollMode } from "../../RollMode.js"; | ||
load(data) { | ||
if (!data) { | ||
if (isNull(data)) { | ||
return; | ||
@@ -16,0 +16,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import { setRangeValue } from "@tsparticles/engine"; | ||
import { isNull, setRangeValue } from "@tsparticles/engine"; | ||
export class RollLight { | ||
@@ -8,3 +8,3 @@ constructor() { | ||
load(data) { | ||
if (!data) { | ||
if (isNull(data)) { | ||
return; | ||
@@ -11,0 +11,0 @@ } |
@@ -16,3 +16,3 @@ "use strict"; | ||
load(data) { | ||
if (!data) { | ||
if ((0, engine_1.isNull)(data)) { | ||
return; | ||
@@ -19,0 +19,0 @@ } |
@@ -11,3 +11,3 @@ "use strict"; | ||
load(data) { | ||
if (!data) { | ||
if ((0, engine_1.isNull)(data)) { | ||
return; | ||
@@ -14,0 +14,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import { OptionsColor, setRangeValue, } from "@tsparticles/engine"; | ||
import { OptionsColor, isNull, setRangeValue, } from "@tsparticles/engine"; | ||
import { RollLight } from "./RollLight.js"; | ||
@@ -13,3 +13,3 @@ import { RollMode } from "../../RollMode.js"; | ||
load(data) { | ||
if (!data) { | ||
if (isNull(data)) { | ||
return; | ||
@@ -16,0 +16,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import { setRangeValue } from "@tsparticles/engine"; | ||
import { isNull, setRangeValue } from "@tsparticles/engine"; | ||
export class RollLight { | ||
@@ -8,3 +8,3 @@ constructor() { | ||
load(data) { | ||
if (!data) { | ||
if (isNull(data)) { | ||
return; | ||
@@ -11,0 +11,0 @@ } |
{ | ||
"name": "@tsparticles/updater-roll", | ||
"version": "3.6.0-beta.1", | ||
"version": "3.6.0", | ||
"description": "tsParticles particles roll updater", | ||
@@ -90,3 +90,3 @@ "homepage": "https://particles.js.org", | ||
"dependencies": { | ||
"@tsparticles/engine": "^3.6.0-beta.1" | ||
"@tsparticles/engine": "^3.6.0" | ||
}, | ||
@@ -93,0 +93,0 @@ "publishConfig": { |
@@ -7,3 +7,3 @@ /*! | ||
* How to use? : Check the GitHub README | ||
* v3.6.0-beta.1 | ||
* v3.6.0 | ||
*/ | ||
@@ -38,3 +38,3 @@ /* | ||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Roll: () => (/* binding */ Roll)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _RollLight_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RollLight.js */ \"./dist/browser/Options/Classes/RollLight.js\");\n/* harmony import */ var _RollMode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../RollMode.js */ \"./dist/browser/RollMode.js\");\n\n\n\nclass Roll {\n constructor() {\n this.darken = new _RollLight_js__WEBPACK_IMPORTED_MODULE_1__.RollLight();\n this.enable = false;\n this.enlighten = new _RollLight_js__WEBPACK_IMPORTED_MODULE_1__.RollLight();\n this.mode = _RollMode_js__WEBPACK_IMPORTED_MODULE_2__.RollMode.vertical;\n this.speed = 25;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.backColor !== undefined) {\n this.backColor = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OptionsColor.create(this.backColor, data.backColor);\n }\n this.darken.load(data.darken);\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n this.enlighten.load(data.enlighten);\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n if (data.speed !== undefined) {\n this.speed = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.speed);\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/updater-roll/./dist/browser/Options/Classes/Roll.js?"); | ||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ Roll: () => (/* binding */ Roll)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _RollLight_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RollLight.js */ \"./dist/browser/Options/Classes/RollLight.js\");\n/* harmony import */ var _RollMode_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../RollMode.js */ \"./dist/browser/RollMode.js\");\n\n\n\nclass Roll {\n constructor() {\n this.darken = new _RollLight_js__WEBPACK_IMPORTED_MODULE_1__.RollLight();\n this.enable = false;\n this.enlighten = new _RollLight_js__WEBPACK_IMPORTED_MODULE_1__.RollLight();\n this.mode = _RollMode_js__WEBPACK_IMPORTED_MODULE_2__.RollMode.vertical;\n this.speed = 25;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.backColor !== undefined) {\n this.backColor = _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.OptionsColor.create(this.backColor, data.backColor);\n }\n this.darken.load(data.darken);\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n this.enlighten.load(data.enlighten);\n if (data.mode !== undefined) {\n this.mode = data.mode;\n }\n if (data.speed !== undefined) {\n this.speed = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.speed);\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/updater-roll/./dist/browser/Options/Classes/Roll.js?"); | ||
@@ -49,3 +49,3 @@ /***/ }), | ||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RollLight: () => (/* binding */ RollLight)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nclass RollLight {\n constructor() {\n this.enable = false;\n this.value = 0;\n }\n load(data) {\n if (!data) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.value !== undefined) {\n this.value = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.value);\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/updater-roll/./dist/browser/Options/Classes/RollLight.js?"); | ||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ RollLight: () => (/* binding */ RollLight)\n/* harmony export */ });\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tsparticles/engine */ \"@tsparticles/engine\");\n/* harmony import */ var _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__);\n\nclass RollLight {\n constructor() {\n this.enable = false;\n this.value = 0;\n }\n load(data) {\n if ((0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.isNull)(data)) {\n return;\n }\n if (data.enable !== undefined) {\n this.enable = data.enable;\n }\n if (data.value !== undefined) {\n this.value = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.setRangeValue)(data.value);\n }\n }\n}\n\n//# sourceURL=webpack://@tsparticles/updater-roll/./dist/browser/Options/Classes/RollLight.js?"); | ||
@@ -52,0 +52,0 @@ /***/ }), |
/*! For license information please see tsparticles.updater.roll.min.js.LICENSE.txt */ | ||
!function(e,o){if("object"==typeof exports&&"object"==typeof module)module.exports=o(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],o);else{var l="object"==typeof exports?o(require("@tsparticles/engine")):o(e.window);for(var t in l)("object"==typeof exports?exports:e)[t]=l[t]}}(this,(e=>(()=>{var o={303:o=>{o.exports=e}},l={};function t(e){var n=l[e];if(void 0!==n)return n.exports;var a=l[e]={exports:{}};return o[e](a,a.exports,t),a.exports}t.d=(e,o)=>{for(var l in o)t.o(o,l)&&!t.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:o[l]})},t.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};t.r(n),t.d(n,{loadRollUpdater:()=>p});var a,r=t(303);!function(e){e.both="both",e.horizontal="horizontal",e.vertical="vertical"}(a||(a={}));const i=2*Math.PI;class s{constructor(){this.enable=!1,this.value=0}load(e){e&&(void 0!==e.enable&&(this.enable=e.enable),void 0!==e.value&&(this.value=(0,r.setRangeValue)(e.value)))}}class d{constructor(){this.darken=new s,this.enable=!1,this.enlighten=new s,this.mode=a.vertical,this.speed=25}load(e){e&&(void 0!==e.backColor&&(this.backColor=r.OptionsColor.create(this.backColor,e.backColor)),this.darken.load(e.darken),void 0!==e.enable&&(this.enable=e.enable),this.enlighten.load(e.enlighten),void 0!==e.mode&&(this.mode=e.mode),void 0!==e.speed&&(this.speed=(0,r.setRangeValue)(e.speed)))}}class c{getTransformValues(e){const o=e.roll?.enable&&e.roll,l=o&&o.horizontal,t=o&&o.vertical;return{a:l?Math.cos(o.angle):void 0,d:t?Math.sin(o.angle):void 0}}init(e){!function(e){const o=e.options.roll;if(o?.enable)if(e.roll={enable:o.enable,horizontal:o.mode===a.horizontal||o.mode===a.both,vertical:o.mode===a.vertical||o.mode===a.both,angle:(0,r.getRandom)()*i,speed:(0,r.getRangeValue)(o.speed)/360},o.backColor)e.backColor=(0,r.rangeColorToHsl)(o.backColor);else if(o.darken.enable&&o.enlighten.enable){const l=(0,r.getRandom)()>=r.halfRandom?r.AlterType.darken:r.AlterType.enlighten;e.roll.alter={type:l,value:(0,r.getRangeValue)(l===r.AlterType.darken?o.darken.value:o.enlighten.value)}}else o.darken.enable?e.roll.alter={type:r.AlterType.darken,value:(0,r.getRangeValue)(o.darken.value)}:o.enlighten.enable&&(e.roll.alter={type:r.AlterType.enlighten,value:(0,r.getRangeValue)(o.enlighten.value)});else e.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(e)}isEnabled(e){const o=e.options.roll;return!e.destroyed&&!e.spawning&&!!o?.enable}loadOptions(e,...o){e.roll||(e.roll=new d);for(const l of o)e.roll.load(l?.roll)}update(e,o){this.isEnabled(e)&&function(e,o){const l=e.options.roll,t=e.roll;if(!t||!l?.enable)return;const n=t.speed*o.factor,a=i;t.angle+=n,t.angle>a&&(t.angle-=a)}(e,o)}}async function p(e,o=!0){await e.addParticleUpdater("roll",(()=>Promise.resolve(new c)),o)}return n})())); | ||
!function(e,l){if("object"==typeof exports&&"object"==typeof module)module.exports=l(require("@tsparticles/engine"));else if("function"==typeof define&&define.amd)define(["@tsparticles/engine"],l);else{var o="object"==typeof exports?l(require("@tsparticles/engine")):l(e.window);for(var t in o)("object"==typeof exports?exports:e)[t]=o[t]}}(this,(e=>(()=>{var l={303:l=>{l.exports=e}},o={};function t(e){var n=o[e];if(void 0!==n)return n.exports;var a=o[e]={exports:{}};return l[e](a,a.exports,t),a.exports}t.d=(e,l)=>{for(var o in l)t.o(l,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:l[o]})},t.o=(e,l)=>Object.prototype.hasOwnProperty.call(e,l),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};t.r(n),t.d(n,{loadRollUpdater:()=>p});var a,r=t(303);!function(e){e.both="both",e.horizontal="horizontal",e.vertical="vertical"}(a||(a={}));const i=2*Math.PI;class s{constructor(){this.enable=!1,this.value=0}load(e){(0,r.isNull)(e)||(void 0!==e.enable&&(this.enable=e.enable),void 0!==e.value&&(this.value=(0,r.setRangeValue)(e.value)))}}class d{constructor(){this.darken=new s,this.enable=!1,this.enlighten=new s,this.mode=a.vertical,this.speed=25}load(e){(0,r.isNull)(e)||(void 0!==e.backColor&&(this.backColor=r.OptionsColor.create(this.backColor,e.backColor)),this.darken.load(e.darken),void 0!==e.enable&&(this.enable=e.enable),this.enlighten.load(e.enlighten),void 0!==e.mode&&(this.mode=e.mode),void 0!==e.speed&&(this.speed=(0,r.setRangeValue)(e.speed)))}}class c{getTransformValues(e){const l=e.roll?.enable&&e.roll,o=l&&l.horizontal,t=l&&l.vertical;return{a:o?Math.cos(l.angle):void 0,d:t?Math.sin(l.angle):void 0}}init(e){!function(e){const l=e.options.roll;if(l?.enable)if(e.roll={enable:l.enable,horizontal:l.mode===a.horizontal||l.mode===a.both,vertical:l.mode===a.vertical||l.mode===a.both,angle:(0,r.getRandom)()*i,speed:(0,r.getRangeValue)(l.speed)/360},l.backColor)e.backColor=(0,r.rangeColorToHsl)(l.backColor);else if(l.darken.enable&&l.enlighten.enable){const o=(0,r.getRandom)()>=r.halfRandom?r.AlterType.darken:r.AlterType.enlighten;e.roll.alter={type:o,value:(0,r.getRangeValue)(o===r.AlterType.darken?l.darken.value:l.enlighten.value)}}else l.darken.enable?e.roll.alter={type:r.AlterType.darken,value:(0,r.getRangeValue)(l.darken.value)}:l.enlighten.enable&&(e.roll.alter={type:r.AlterType.enlighten,value:(0,r.getRangeValue)(l.enlighten.value)});else e.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(e)}isEnabled(e){const l=e.options.roll;return!e.destroyed&&!e.spawning&&!!l?.enable}loadOptions(e,...l){e.roll||(e.roll=new d);for(const o of l)e.roll.load(o?.roll)}update(e,l){this.isEnabled(e)&&function(e,l){const o=e.options.roll,t=e.roll;if(!t||!o?.enable)return;const n=t.speed*l.factor,a=i;t.angle+=n,t.angle>a&&(t.angle-=a)}(e,l)}}async function p(e,l=!0){await e.addParticleUpdater("roll",(()=>Promise.resolve(new c)),l)}return n})())); |
@@ -1,1 +0,1 @@ | ||
/*! tsParticles Roll Updater v3.6.0-beta.1 by Matteo Bruni */ | ||
/*! tsParticles Roll Updater v3.6.0 by Matteo Bruni */ |
@@ -25,3 +25,3 @@ (function (factory) { | ||
load(data) { | ||
if (!data) { | ||
if ((0, engine_1.isNull)(data)) { | ||
return; | ||
@@ -28,0 +28,0 @@ } |
@@ -20,3 +20,3 @@ (function (factory) { | ||
load(data) { | ||
if (!data) { | ||
if ((0, engine_1.isNull)(data)) { | ||
return; | ||
@@ -23,0 +23,0 @@ } |
Sorry, the diff of this file is not supported yet
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
328041
1
4
Updated@tsparticles/engine@^3.6.0