@tsparticles/updater-roll
Advanced tools
Comparing version 3.7.1 to 3.8.0
@@ -1,5 +0,4 @@ | ||
import { assertValidVersion } from "@tsparticles/engine"; | ||
import { RollUpdater } from "./RollUpdater.js"; | ||
export async function loadRollUpdater(engine, refresh = true) { | ||
assertValidVersion(engine, "3.7.1"); | ||
engine.checkVersion("3.8.0"); | ||
await engine.addParticleUpdater("roll", () => { | ||
@@ -6,0 +5,0 @@ return Promise.resolve(new RollUpdater(engine)); |
@@ -1,2 +0,2 @@ | ||
import { AlterType, getRandom, getRangeValue, halfRandom, rangeColorToHsl, } from "@tsparticles/engine"; | ||
import { AlterType, getRandom, getRangeValue, half, rangeColorToHsl, } from "@tsparticles/engine"; | ||
import { RollMode } from "./RollMode.js"; | ||
@@ -27,3 +27,3 @@ const double = 2, doublePI = Math.PI * double, maxAngle = 360; | ||
else if (rollOpt.darken.enable && rollOpt.enlighten.enable) { | ||
const alterType = getRandom() >= halfRandom ? AlterType.darken : AlterType.enlighten; | ||
const alterType = getRandom() >= half ? AlterType.darken : AlterType.enlighten; | ||
particle.roll.alter = { | ||
@@ -30,0 +30,0 @@ type: alterType, |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loadRollUpdater = loadRollUpdater; | ||
const engine_1 = require("@tsparticles/engine"); | ||
const RollUpdater_js_1 = require("./RollUpdater.js"); | ||
async function loadRollUpdater(engine, refresh = true) { | ||
(0, engine_1.assertValidVersion)(engine, "3.7.1"); | ||
engine.checkVersion("3.8.0"); | ||
await engine.addParticleUpdater("roll", () => { | ||
@@ -9,0 +8,0 @@ return Promise.resolve(new RollUpdater_js_1.RollUpdater(engine)); |
@@ -31,3 +31,3 @@ "use strict"; | ||
else if (rollOpt.darken.enable && rollOpt.enlighten.enable) { | ||
const alterType = (0, engine_1.getRandom)() >= engine_1.halfRandom ? engine_1.AlterType.darken : engine_1.AlterType.enlighten; | ||
const alterType = (0, engine_1.getRandom)() >= engine_1.half ? engine_1.AlterType.darken : engine_1.AlterType.enlighten; | ||
particle.roll.alter = { | ||
@@ -34,0 +34,0 @@ type: alterType, |
@@ -1,5 +0,4 @@ | ||
import { assertValidVersion } from "@tsparticles/engine"; | ||
import { RollUpdater } from "./RollUpdater.js"; | ||
export async function loadRollUpdater(engine, refresh = true) { | ||
assertValidVersion(engine, "3.7.1"); | ||
engine.checkVersion("3.8.0"); | ||
await engine.addParticleUpdater("roll", () => { | ||
@@ -6,0 +5,0 @@ return Promise.resolve(new RollUpdater(engine)); |
@@ -1,2 +0,2 @@ | ||
import { AlterType, getRandom, getRangeValue, halfRandom, rangeColorToHsl, } from "@tsparticles/engine"; | ||
import { AlterType, getRandom, getRangeValue, half, rangeColorToHsl, } from "@tsparticles/engine"; | ||
import { RollMode } from "./RollMode.js"; | ||
@@ -27,3 +27,3 @@ const double = 2, doublePI = Math.PI * double, maxAngle = 360; | ||
else if (rollOpt.darken.enable && rollOpt.enlighten.enable) { | ||
const alterType = getRandom() >= halfRandom ? AlterType.darken : AlterType.enlighten; | ||
const alterType = getRandom() >= half ? AlterType.darken : AlterType.enlighten; | ||
particle.roll.alter = { | ||
@@ -30,0 +30,0 @@ type: alterType, |
{ | ||
"name": "@tsparticles/updater-roll", | ||
"version": "3.7.1", | ||
"version": "3.8.0", | ||
"description": "tsParticles particles roll updater", | ||
@@ -90,3 +90,3 @@ "homepage": "https://particles.js.org", | ||
"dependencies": { | ||
"@tsparticles/engine": "3.7.1" | ||
"@tsparticles/engine": "3.8.0" | ||
}, | ||
@@ -93,0 +93,0 @@ "publishConfig": { |
@@ -7,3 +7,3 @@ /*! | ||
* How to use? : Check the GitHub README | ||
* v3.7.1 | ||
* v3.8.0 | ||
*/ | ||
@@ -78,3 +78,3 @@ /* | ||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ initParticle: () => (/* binding */ initParticle),\n/* harmony export */ updateRoll: () => (/* binding */ updateRoll)\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 _RollMode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RollMode.js */ \"./dist/browser/RollMode.js\");\n\n\nconst double = 2,\n doublePI = Math.PI * double,\n maxAngle = 360;\nfunction initParticle(engine, particle) {\n const rollOpt = particle.options.roll;\n if (!rollOpt?.enable) {\n particle.roll = {\n enable: false,\n horizontal: false,\n vertical: false,\n angle: 0,\n speed: 0\n };\n return;\n }\n particle.roll = {\n enable: rollOpt.enable,\n horizontal: rollOpt.mode === _RollMode_js__WEBPACK_IMPORTED_MODULE_1__.RollMode.horizontal || rollOpt.mode === _RollMode_js__WEBPACK_IMPORTED_MODULE_1__.RollMode.both,\n vertical: rollOpt.mode === _RollMode_js__WEBPACK_IMPORTED_MODULE_1__.RollMode.vertical || rollOpt.mode === _RollMode_js__WEBPACK_IMPORTED_MODULE_1__.RollMode.both,\n angle: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * doublePI,\n speed: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(rollOpt.speed) / maxAngle\n };\n if (rollOpt.backColor) {\n particle.backColor = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.rangeColorToHsl)(engine, rollOpt.backColor);\n } else if (rollOpt.darken.enable && rollOpt.enlighten.enable) {\n const alterType = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() >= _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.halfRandom ? _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AlterType.darken : _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AlterType.enlighten;\n particle.roll.alter = {\n type: alterType,\n value: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(alterType === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AlterType.darken ? rollOpt.darken.value : rollOpt.enlighten.value)\n };\n } else if (rollOpt.darken.enable) {\n particle.roll.alter = {\n type: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AlterType.darken,\n value: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(rollOpt.darken.value)\n };\n } else if (rollOpt.enlighten.enable) {\n particle.roll.alter = {\n type: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AlterType.enlighten,\n value: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(rollOpt.enlighten.value)\n };\n }\n}\nfunction updateRoll(particle, delta) {\n const roll = particle.options.roll,\n data = particle.roll;\n if (!data || !roll?.enable) {\n return;\n }\n const speed = data.speed * delta.factor,\n max = doublePI;\n data.angle += speed;\n if (data.angle > max) {\n data.angle -= max;\n }\n}\n\n//# sourceURL=webpack://@tsparticles/updater-roll/./dist/browser/Utils.js?"); | ||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ initParticle: () => (/* binding */ initParticle),\n/* harmony export */ updateRoll: () => (/* binding */ updateRoll)\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 _RollMode_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RollMode.js */ \"./dist/browser/RollMode.js\");\n\n\nconst double = 2,\n doublePI = Math.PI * double,\n maxAngle = 360;\nfunction initParticle(engine, particle) {\n const rollOpt = particle.options.roll;\n if (!rollOpt?.enable) {\n particle.roll = {\n enable: false,\n horizontal: false,\n vertical: false,\n angle: 0,\n speed: 0\n };\n return;\n }\n particle.roll = {\n enable: rollOpt.enable,\n horizontal: rollOpt.mode === _RollMode_js__WEBPACK_IMPORTED_MODULE_1__.RollMode.horizontal || rollOpt.mode === _RollMode_js__WEBPACK_IMPORTED_MODULE_1__.RollMode.both,\n vertical: rollOpt.mode === _RollMode_js__WEBPACK_IMPORTED_MODULE_1__.RollMode.vertical || rollOpt.mode === _RollMode_js__WEBPACK_IMPORTED_MODULE_1__.RollMode.both,\n angle: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() * doublePI,\n speed: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(rollOpt.speed) / maxAngle\n };\n if (rollOpt.backColor) {\n particle.backColor = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.rangeColorToHsl)(engine, rollOpt.backColor);\n } else if (rollOpt.darken.enable && rollOpt.enlighten.enable) {\n const alterType = (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRandom)() >= _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.half ? _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AlterType.darken : _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AlterType.enlighten;\n particle.roll.alter = {\n type: alterType,\n value: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(alterType === _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AlterType.darken ? rollOpt.darken.value : rollOpt.enlighten.value)\n };\n } else if (rollOpt.darken.enable) {\n particle.roll.alter = {\n type: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AlterType.darken,\n value: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(rollOpt.darken.value)\n };\n } else if (rollOpt.enlighten.enable) {\n particle.roll.alter = {\n type: _tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.AlterType.enlighten,\n value: (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.getRangeValue)(rollOpt.enlighten.value)\n };\n }\n}\nfunction updateRoll(particle, delta) {\n const roll = particle.options.roll,\n data = particle.roll;\n if (!data || !roll?.enable) {\n return;\n }\n const speed = data.speed * delta.factor,\n max = doublePI;\n data.angle += speed;\n if (data.angle > max) {\n data.angle -= max;\n }\n}\n\n//# sourceURL=webpack://@tsparticles/updater-roll/./dist/browser/Utils.js?"); | ||
@@ -89,3 +89,3 @@ /***/ }), | ||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadRollUpdater: () => (/* binding */ loadRollUpdater)\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 _RollUpdater_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RollUpdater.js */ \"./dist/browser/RollUpdater.js\");\n\n\nasync function loadRollUpdater(engine, refresh = true) {\n (0,_tsparticles_engine__WEBPACK_IMPORTED_MODULE_0__.assertValidVersion)(engine, \"3.7.1\");\n await engine.addParticleUpdater(\"roll\", () => {\n return Promise.resolve(new _RollUpdater_js__WEBPACK_IMPORTED_MODULE_1__.RollUpdater(engine));\n }, refresh);\n}\n\n//# sourceURL=webpack://@tsparticles/updater-roll/./dist/browser/index.js?"); | ||
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ loadRollUpdater: () => (/* binding */ loadRollUpdater)\n/* harmony export */ });\n/* harmony import */ var _RollUpdater_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RollUpdater.js */ \"./dist/browser/RollUpdater.js\");\n\nasync function loadRollUpdater(engine, refresh = true) {\n engine.checkVersion(\"3.8.0\");\n await engine.addParticleUpdater(\"roll\", () => {\n return Promise.resolve(new _RollUpdater_js__WEBPACK_IMPORTED_MODULE_0__.RollUpdater(engine));\n }, refresh);\n}\n\n//# sourceURL=webpack://@tsparticles/updater-roll/./dist/browser/index.js?"); | ||
@@ -92,0 +92,0 @@ /***/ }), |
/*! For license information please see tsparticles.updater.roll.min.js.LICENSE.txt */ | ||
!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{constructor(e){this._engine=e}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,l){const o=l.options.roll;if(o?.enable)if(l.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)l.backColor=(0,r.rangeColorToHsl)(e,o.backColor);else if(o.darken.enable&&o.enlighten.enable){const e=(0,r.getRandom)()>=r.halfRandom?r.AlterType.darken:r.AlterType.enlighten;l.roll.alter={type:e,value:(0,r.getRangeValue)(e===r.AlterType.darken?o.darken.value:o.enlighten.value)}}else o.darken.enable?l.roll.alter={type:r.AlterType.darken,value:(0,r.getRangeValue)(o.darken.value)}:o.enlighten.enable&&(l.roll.alter={type:r.AlterType.enlighten,value:(0,r.getRangeValue)(o.enlighten.value)});else l.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(this._engine,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){(0,r.assertValidVersion)(e,"3.7.1"),await e.addParticleUpdater("roll",(()=>Promise.resolve(new c(e))),l)}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{constructor(e){this._engine=e}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,l){const o=l.options.roll;if(o?.enable)if(l.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)l.backColor=(0,r.rangeColorToHsl)(e,o.backColor);else if(o.darken.enable&&o.enlighten.enable){const e=(0,r.getRandom)()>=r.half?r.AlterType.darken:r.AlterType.enlighten;l.roll.alter={type:e,value:(0,r.getRangeValue)(e===r.AlterType.darken?o.darken.value:o.enlighten.value)}}else o.darken.enable?l.roll.alter={type:r.AlterType.darken,value:(0,r.getRangeValue)(o.darken.value)}:o.enlighten.enable&&(l.roll.alter={type:r.AlterType.enlighten,value:(0,r.getRangeValue)(o.enlighten.value)});else l.roll={enable:!1,horizontal:!1,vertical:!1,angle:0,speed:0}}(this._engine,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){e.checkVersion("3.8.0"),await e.addParticleUpdater("roll",(()=>Promise.resolve(new c(e))),l)}return n})())); |
@@ -1,1 +0,1 @@ | ||
/*! tsParticles Roll Updater v3.7.1 by Matteo Bruni */ | ||
/*! tsParticles Roll Updater v3.8.0 by Matteo Bruni */ |
@@ -7,3 +7,3 @@ (function (factory) { | ||
else if (typeof define === "function" && define.amd) { | ||
define(["require", "exports", "@tsparticles/engine", "./RollUpdater.js"], factory); | ||
define(["require", "exports", "./RollUpdater.js"], factory); | ||
} | ||
@@ -14,6 +14,5 @@ })(function (require, exports) { | ||
exports.loadRollUpdater = loadRollUpdater; | ||
const engine_1 = require("@tsparticles/engine"); | ||
const RollUpdater_js_1 = require("./RollUpdater.js"); | ||
async function loadRollUpdater(engine, refresh = true) { | ||
(0, engine_1.assertValidVersion)(engine, "3.7.1"); | ||
engine.checkVersion("3.8.0"); | ||
await engine.addParticleUpdater("roll", () => { | ||
@@ -20,0 +19,0 @@ return Promise.resolve(new RollUpdater_js_1.RollUpdater(engine)); |
@@ -40,3 +40,3 @@ (function (factory) { | ||
else if (rollOpt.darken.enable && rollOpt.enlighten.enable) { | ||
const alterType = (0, engine_1.getRandom)() >= engine_1.halfRandom ? engine_1.AlterType.darken : engine_1.AlterType.enlighten; | ||
const alterType = (0, engine_1.getRandom)() >= engine_1.half ? engine_1.AlterType.darken : engine_1.AlterType.enlighten; | ||
particle.roll.alter = { | ||
@@ -43,0 +43,0 @@ type: alterType, |
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
4
328850
1020
+ Added@tsparticles/engine@3.8.0(transitive)
- Removed@tsparticles/engine@3.7.1(transitive)
Updated@tsparticles/engine@3.8.0