@tsparticles/plugin-motion 3.0.0-beta.0 → 3.0.0-beta.2

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.
@@ -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.0
7
+ * v3.0.0-beta.2
8
8
  */
9
9
  (function webpackUniversalModuleDefinition(root, factory) {
10
10
  if(typeof exports === 'object' && typeof module === 'object')
@@ -1 +1 @@
1
- /*! tsParticles Motion Plugin v3.0.0-beta.0 by Matteo Bruni */
1
+ /*! tsParticles Motion Plugin v3.0.0-beta.2 by Matteo Bruni */
@@ -1,5 +1,5 @@
1
1
  import { type Engine, type IContainerPlugin } from "@tsparticles/engine";
2
- import type { MotionContainer } from "./types";
2
+ import type { MotionContainer } from "./types.js";
3
3
  export declare class MotionInstance implements IContainerPlugin {
4
4
  private readonly _container;
5
5
  private readonly _engine;
@@ -1,6 +1,6 @@
1
1
  import type { IOptionLoader, RecursivePartial } from "@tsparticles/engine";
2
- import type { IMotion } from "../Interfaces/IMotion";
3
- import { MotionReduce } from "./MotionReduce";
2
+ import type { IMotion } from "../Interfaces/IMotion.js";
3
+ import { MotionReduce } from "./MotionReduce.js";
4
4
  export declare class Motion implements IMotion, IOptionLoader<IMotion> {
5
5
  disable: boolean;
6
6
  reduce: MotionReduce;
@@ -1,5 +1,5 @@
1
1
  import type { IOptionLoader, RecursivePartial } from "@tsparticles/engine";
2
- import type { IMotionReduce } from "../Interfaces/IMotionReduce";
2
+ import type { IMotionReduce } from "../Interfaces/IMotionReduce.js";
3
3
  export declare class MotionReduce implements IMotionReduce, IOptionLoader<IMotionReduce> {
4
4
  factor: number;
5
5
  value: boolean;
@@ -1,4 +1,4 @@
1
- import type { IMotionReduce } from "./IMotionReduce";
1
+ import type { IMotionReduce } from "./IMotionReduce.js";
2
2
  export interface IMotion {
3
3
  disable: boolean;
4
4
  reduce: IMotionReduce;
package/types/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Container, IOptions, Options } from "@tsparticles/engine";
2
- import type { IMotion } from "./Options/Interfaces/IMotion";
3
- import type { Motion } from "./Options/Classes/Motion";
2
+ import type { IMotion } from "./Options/Interfaces/IMotion.js";
3
+ import type { Motion } from "./Options/Classes/Motion.js";
4
4
  export type IMotionOptions = IOptions & {
5
5
  motion?: IMotion;
6
6
  };
@@ -4,17 +4,17 @@
4
4
  if (v !== undefined) module.exports = v;
5
5
  }
6
6
  else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "./MotionReduce"], factory);
7
+ define(["require", "exports", "./MotionReduce.js"], factory);
8
8
  }
9
9
  })(function (require, exports) {
10
10
  "use strict";
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.Motion = void 0;
13
- const MotionReduce_1 = require("./MotionReduce");
13
+ const MotionReduce_js_1 = require("./MotionReduce.js");
14
14
  class Motion {
15
15
  constructor() {
16
16
  this.disable = false;
17
- this.reduce = new MotionReduce_1.MotionReduce();
17
+ this.reduce = new MotionReduce_js_1.MotionReduce();
18
18
  }
19
19
  load(data) {
20
20
  if (!data) {
package/umd/index.js CHANGED
@@ -4,21 +4,21 @@
4
4
  if (v !== undefined) module.exports = v;
5
5
  }
6
6
  else if (typeof define === "function" && define.amd) {
7
- define(["require", "exports", "./Options/Classes/Motion", "./MotionInstance"], factory);
7
+ define(["require", "exports", "./Options/Classes/Motion.js", "./MotionInstance.js"], factory);
8
8
  }
9
9
  })(function (require, exports) {
10
10
  "use strict";
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.loadMotionPlugin = void 0;
13
- const Motion_1 = require("./Options/Classes/Motion");
14
- const MotionInstance_1 = require("./MotionInstance");
13
+ const Motion_js_1 = require("./Options/Classes/Motion.js");
14
+ const MotionInstance_js_1 = require("./MotionInstance.js");
15
15
  class MotionPlugin {
16
16
  constructor(engine) {
17
17
  this.id = "motion";
18
18
  this._engine = engine;
19
19
  }
20
20
  getPlugin(container) {
21
- return new MotionInstance_1.MotionInstance(container, this._engine);
21
+ return new MotionInstance_js_1.MotionInstance(container, this._engine);
22
22
  }
23
23
  loadOptions(options, source) {
24
24
  if (!this.needsPlugin()) {
@@ -26,7 +26,7 @@
26
26
  }
27
27
  let motionOptions = options.motion;
28
28
  if (!motionOptions?.load) {
29
- options.motion = motionOptions = new Motion_1.Motion();
29
+ options.motion = motionOptions = new Motion_js_1.Motion();
30
30
  }
31
31
  motionOptions.load(source?.motion);
32
32
  }