@tsparticles/updater-orbit 3.0.0-beta.2 → 3.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/Options/Classes/OrbitRotation.js +0 -2
- package/cjs/Options/Classes/OrbitRotation.js +0 -2
- package/esm/Options/Classes/OrbitRotation.js +0 -2
- package/package.json +3 -3
- package/report.html +4 -22
- package/tsparticles.updater.orbit.js +1 -3
- package/tsparticles.updater.orbit.min.js +1 -1
- package/tsparticles.updater.orbit.min.js.LICENSE.txt +1 -1
- package/umd/Options/Classes/OrbitRotation.js +0 -2
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Demo / Generator : https://particles.js.org/
|
|
5
5
|
* GitHub : https://www.github.com/matteobruni/tsparticles
|
|
6
6
|
* How to use? : Check the GitHub README
|
|
7
|
-
* v3.0.0-beta.
|
|
7
|
+
* v3.0.0-beta.4
|
|
8
8
|
*/
|
|
9
9
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10
10
|
if(typeof exports === 'object' && typeof module === 'object')
|
|
@@ -102,8 +102,6 @@ class OrbitRotation extends engine_root_window_.ValueWithRandom {
|
|
|
102
102
|
constructor() {
|
|
103
103
|
super();
|
|
104
104
|
this.value = 45;
|
|
105
|
-
this.random.enable = false;
|
|
106
|
-
this.random.minimumValue = 0;
|
|
107
105
|
}
|
|
108
106
|
load(data) {
|
|
109
107
|
if (data === undefined) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see tsparticles.updater.orbit.min.js.LICENSE.txt */
|
|
2
|
-
!function(t,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 i="object"==typeof exports?o(require("@tsparticles/engine")):o(t.window);for(var e in i)("object"==typeof exports?exports:t)[e]=i[e]}}(this,(t=>(()=>{"use strict";var o={533:o=>{o.exports=t}},i={};function e(t){var a=i[t];if(void 0!==a)return a.exports;var r=i[t]={exports:{}};return o[t](r,r.exports,e),r.exports}e.d=(t,o)=>{for(var i in o)e.o(o,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:o[i]})},e.o=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};return(()=>{e.r(a),e.d(a,{loadOrbitUpdater:()=>n});var t=e(533);class o extends t.ValueWithRandom{constructor(){super(),this.value=45
|
|
2
|
+
!function(t,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 i="object"==typeof exports?o(require("@tsparticles/engine")):o(t.window);for(var e in i)("object"==typeof exports?exports:t)[e]=i[e]}}(this,(t=>(()=>{"use strict";var o={533:o=>{o.exports=t}},i={};function e(t){var a=i[t];if(void 0!==a)return a.exports;var r=i[t]={exports:{}};return o[t](r,r.exports,e),r.exports}e.d=(t,o)=>{for(var i in o)e.o(o,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:o[i]})},e.o=(t,o)=>Object.prototype.hasOwnProperty.call(t,o),e.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var a={};return(()=>{e.r(a),e.d(a,{loadOrbitUpdater:()=>n});var t=e(533);class o extends t.ValueWithRandom{constructor(){super(),this.value=45}load(t){void 0!==t&&super.load(t)}}class i{constructor(){this.animation=new t.AnimationOptions,this.enable=!1,this.opacity=1,this.rotation=new o,this.width=1}load(o){o&&(this.animation.load(o.animation),this.rotation.load(o.rotation),void 0!==o.enable&&(this.enable=o.enable),void 0!==o.opacity&&(this.opacity=(0,t.setRangeValue)(o.opacity)),void 0!==o.width&&(this.width=(0,t.setRangeValue)(o.width)),void 0!==o.radius&&(this.radius=(0,t.setRangeValue)(o.radius)),void 0!==o.color&&(this.color=t.OptionsColor.create(this.color,o.color)))}}class r{constructor(t){this.container=t}afterDraw(t){const o=t.options.orbit;o?.enable&&this.drawOrbit(t,"front")}beforeDraw(t){const o=t.options.orbit;o?.enable&&this.drawOrbit(t,"back")}drawOrbit(o,i){const e=this.container;let a,r;switch(i){case"back":a=Math.PI/2,r=3*Math.PI/2;break;case"front":a=3*Math.PI/2,r=Math.PI/2;break;default:a=0,r=2*Math.PI}e.canvas.draw((i=>{!function(o,i,e,a,r,n,s,l,d){if(n<=0)return;const b=i.getPosition();e&&(o.strokeStyle=(0,t.getStyleFromHsl)(e,r)),o.lineWidth=n;const c=s*Math.PI/180;o.beginPath(),o.ellipse(b.x,b.y,a/2,2*a,c,l,d),o.stroke()}(i,o,o.orbitColor??o.getFillColor(),o.retina.orbitRadius??e.retina.orbitRadius??o.getRadius(),o.orbitOpacity??1,o.orbitWidth??1,(o.orbitRotation??0)*e.retina.pixelRatio,a,r)}))}init(o){const i=this.container,e=o.options.orbit;e?.enable&&(o.orbitRotation=(0,t.getRangeValue)(e.rotation.value),o.orbitColor=(0,t.rangeColorToHsl)(e.color),o.retina.orbitRadius=void 0!==e.radius?(0,t.getRangeValue)(e.radius)*i.retina.pixelRatio:void 0,i.retina.orbitRadius=o.retina.orbitRadius,o.orbitAnimationSpeed=e.animation.enable?(0,t.getRangeValue)(e.animation.speed):0,o.orbitWidth=(0,t.getRangeValue)(e.width),o.orbitOpacity=(0,t.getRangeValue)(e.opacity))}isEnabled(t){const o=t.options.orbit?.animation;return!t.destroyed&&!t.spawning&&!!o?.enable}loadOptions(t,...o){t.orbit||(t.orbit=new i);for(const i of o)t.orbit.load(i?.orbit)}update(t,o){this.isEnabled(t)&&(void 0===t.orbitRotation&&(t.orbitRotation=0),t.orbitRotation+=(t.orbitAnimationSpeed??0/(2*Math.PI))*o.factor)}}async function n(t,o=!0){await t.addParticleUpdater("orbit",(t=>new r(t)),o)}})(),a})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
/*! tsParticles Orbit Updater v3.0.0-beta.
|
|
1
|
+
/*! tsParticles Orbit Updater v3.0.0-beta.4 by Matteo Bruni */
|