diff --git a/demo/stencil/www/index.html b/demo/stencil/www/index.html
index 1de24dee55b..8b4bfc6632b 100644
--- a/demo/stencil/www/index.html
+++ b/demo/stencil/www/index.html
@@ -1,10 +1,2 @@
-
tsParticles Stencil Demo
\ No newline at end of file
+ tsParticles Stencil Demo
\ No newline at end of file
diff --git a/engine/src/Core/Engine.ts b/engine/src/Core/Engine.ts
index 680122ca8e1..56a36580f25 100644
--- a/engine/src/Core/Engine.ts
+++ b/engine/src/Core/Engine.ts
@@ -148,12 +148,18 @@ export class Engine {
*/
private _initialized = false;
- /** The container instances */
+ /**
+ * The container instances
+ * @returns the instances loaded in the engine
+ */
get items(): Container[] {
return this._domArray;
}
- /** The engine version */
+ /**
+ * The engine version
+ * @returns the version string
+ */
get version(): string {
return __VERSION__;
}
@@ -172,7 +178,7 @@ export class Engine {
*/
/**
* Checks if a plugin version matches the engine version
- * @param pluginVersion
+ * @param pluginVersion - the version to check
*/
checkVersion(pluginVersion: string): void {
if (this.version === pluginVersion) {
diff --git a/interactions/external/cannon/src/Cannoner.ts b/interactions/external/cannon/src/Cannoner.ts
index 3ed7518c2f7..3142a939996 100644
--- a/interactions/external/cannon/src/Cannoner.ts
+++ b/interactions/external/cannon/src/Cannoner.ts
@@ -95,16 +95,16 @@ interface CannonGesture {
* The number of particles and their velocity scale with the drag length.
*
* Options live under `interactivity.modes.cannon`:
- * - `spread` — half-angle spread in degrees around the launch angle (default 30)
+ * - `spread` — half-angle spread in degrees around the launch angle (default 30)
* - `velocityFactor` — multiplier applied to drag length to obtain particle speed (default 10)
* - `particleFactor` — how many particles per pixel of drag (default 0.2)
- * - `minParticles` — minimum burst size regardless of drag length (default 5)
- * - `maxParticles` — cap for burst size (default 200)
- * - `drawVector` — whether to render the aiming line while dragging (default true)
- * - `vectorColor` — CSS color for the aiming line (default "#ffffff80")
+ * - `minParticles` — minimum burst size regardless of drag length (default 5)
+ * - `maxParticles` — cap for burst size (default 200)
+ * - `drawVector` — whether to render the aiming line while dragging (default true)
+ * - `vectorColor` — CSS color for the aiming line (default "#ffffff80")
*/
export class Cannoner extends ExternalInteractorBase {
- /** @inheritDoc */
+ /** {@inheritDoc ExternalInteractorBase.maxDistance} */
readonly maxDistance = 0;
private _data?: CannonData;
@@ -117,18 +117,25 @@ export class Cannoner extends ExternalInteractorBase {
private _lastDownPosition: ICoordinates | undefined = undefined;
private _state: CannonState = CannonState.idle;
- /** @inheritDoc */
+ /**
+ * {@inheritDoc ExternalInteractorBase}
+ * @param container -
+ */
// eslint-disable-next-line @typescript-eslint/no-useless-constructor
constructor(container: CannonContainer) {
super(container);
}
- /** @inheritDoc */
+ /**
+ * {@inheritDoc ExternalInteractorBase.clear}
+ * @param _particle -
+ * @param _delta -
+ */
clear(_particle: InteractivityParticle, _delta: IDelta): void {
// nothing to clear per-particle
}
- /** @inheritDoc */
+ /** {@inheritDoc ExternalInteractorBase.init} */
init(): void {
const options = this.container.actualOptions.interactivity?.modes.cannon ?? new Cannon();
@@ -144,7 +151,11 @@ export class Cannoner extends ExternalInteractorBase {
};
}
- /** @inheritDoc */
+ /**
+ * {@inheritDoc ExternalInteractorBase.interact}
+ * @param interactivityData -
+ * @param _delta -
+ */
interact(interactivityData: IInteractivityData, _delta: IDelta): void {
const mouse = interactivityData.mouse,
mousePos = mouse.position,
@@ -176,7 +187,11 @@ export class Cannoner extends ExternalInteractorBase {
}
}
- /** @inheritDoc */
+ /**
+ * {@inheritDoc ExternalInteractorBase.isEnabled}
+ * @param interactivityData -
+ * @returns -
+ */
isEnabled(interactivityData: IInteractivityData): boolean {
const { container } = this,
events = container.actualOptions.interactivity?.events;
@@ -197,7 +212,11 @@ export class Cannoner extends ExternalInteractorBase {
return this._state !== CannonState.idle || interactivityData.mouse.clicking;
}
- /** @inheritDoc */
+ /**
+ * {@inheritDoc ExternalInteractorBase.loadModeOptions}
+ * @param options -
+ * @param sources -
+ */
loadModeOptions(
options: Modes & CannonMode,
...sources: RecursivePartial<(IModes & ICannonMode) | undefined>[]
@@ -209,7 +228,11 @@ export class Cannoner extends ExternalInteractorBase {
}
}
- /** @inheritDoc */
+ /**
+ * {@inheritDoc ExternalInteractorBase.reset}
+ * @param _interactivityData -
+ * @param _particle -
+ */
reset(_interactivityData: IInteractivityData, _particle: InteractivityParticle): void {
// nothing to reset
}
@@ -231,7 +254,7 @@ export class Cannoner extends ExternalInteractorBase {
pxRatio = this.container.retina.pixelRatio,
dragDist = getDistance(origin, current),
// Clamp to maxDragDistance so visual feedback matches actual force
- clampedDist = opts.maxDragDistance > none ? Math.min(dragDist, opts.maxDragDistance * pxRatio) : pxRatio,
+ clampedDist = opts.maxDragDistance > none ? Math.min(dragDist, opts.maxDragDistance * pxRatio) : dragDist,
clampRatio = dragDist > minDistance ? clampedDist / dragDist : minDistance,
clampedX = origin.x + (current.x - origin.x) * clampRatio,
clampedY = origin.y + (current.y - origin.y) * clampRatio;
diff --git a/interactions/external/cannon/src/Options/Classes/Cannon.ts b/interactions/external/cannon/src/Options/Classes/Cannon.ts
index c459723f615..57a4b090ec6 100644
--- a/interactions/external/cannon/src/Options/Classes/Cannon.ts
+++ b/interactions/external/cannon/src/Options/Classes/Cannon.ts
@@ -31,7 +31,7 @@ export class Cannon implements ICannon {
this.spread = 30;
this.velocityFactor = 0.5;
this.particleFactor = 0.2;
- this.maxDragDistance = 200;
+ this.maxDragDistance = 0;
this.minParticles = 5;
this.maxParticles = 200;
this.drawVector = true;
@@ -64,6 +64,10 @@ export class Cannon implements ICannon {
this.maxParticles = data.maxParticles;
}
+ if (data.maxDragDistance !== undefined) {
+ this.maxDragDistance = data.maxDragDistance;
+ }
+
if (data.drawVector !== undefined) {
this.drawVector = data.drawVector;
}
diff --git a/interactions/external/cannon/src/index.lazy.ts b/interactions/external/cannon/src/index.lazy.ts
index 97b4a719175..7b1a0d1203d 100644
--- a/interactions/external/cannon/src/index.lazy.ts
+++ b/interactions/external/cannon/src/index.lazy.ts
@@ -1,8 +1,7 @@
+export type { CannonContainer, CannonMode, ICannonMode } from "./Types.js";
import { type Engine } from "@tsparticles/engine/lazy";
import type { InteractivityEngine } from "@tsparticles/plugin-interactivity/lazy";
-
export type { ICannon } from "./Options/Interfaces/ICannon.js";
-export type { CannonContainer, CannonMode, ICannonMode } from "./Types.js";
export { Cannon } from "./Options/Classes/Cannon.js";
declare const __VERSION__: string;
diff --git a/interactions/external/cannon/src/index.ts b/interactions/external/cannon/src/index.ts
index ff686450def..1890127bf89 100644
--- a/interactions/external/cannon/src/index.ts
+++ b/interactions/external/cannon/src/index.ts
@@ -1,9 +1,9 @@
+export type { CannonContainer, CannonMode, ICannonMode } from "./Types.js";
import { type InteractivityEngine, ensureInteractivityPluginLoaded } from "@tsparticles/plugin-interactivity";
export { Cannon } from "./Options/Classes/Cannon.js";
import { Cannoner } from "./Cannoner.js";
import { type Engine } from "@tsparticles/engine";
export type { ICannon } from "./Options/Interfaces/ICannon.js";
-export type { CannonContainer, CannonMode, ICannonMode } from "./Types.js";
declare const __VERSION__: string;
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 1c3989bbcf3..62a35f33091 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -13268,7 +13268,7 @@ importers:
version: 10.2.0(jiti@2.7.0)
eslint-plugin-qwik:
specifier: latest
- version: 1.19.2(eslint@10.2.0(jiti@2.7.0))(typescript@6.0.2)
+ version: 1.20.0(eslint@10.2.0(jiti@2.7.0))(typescript@6.0.2)
np:
specifier: 11.0.3
version: 11.0.3(@types/node@25.6.0)(typescript@6.0.2)
@@ -29558,8 +29558,8 @@ packages:
peerDependencies:
eslint: '>=8.38.0'
- eslint-plugin-qwik@1.19.2:
- resolution: {integrity: sha512-P0Xc/jzRmL9rPR1r3dk2zET1yqgnwLwAgMjTUNYIenPXhqgDWbW7bOapwDYhjDrRpVdnLv6jnomIvFGt47ytTQ==}
+ eslint-plugin-qwik@1.20.0:
+ resolution: {integrity: sha512-6XY7cGK5BDvtjHnIRcDp50dXKlr9+jnQCudxl9VrwRaJPzgKUNpVVSbo5tflTZkCJLj6/svulE5MVSn6zTsHYw==}
engines: {node: '>=16.8.0 <18.0.0 || >=18.11'}
peerDependencies:
eslint: ^8.57.0 || ^9.0.0 || ^10.0.0
@@ -65471,7 +65471,7 @@ snapshots:
eslint: 10.2.1(jiti@2.7.0)
requireindex: 1.2.0
- eslint-plugin-qwik@1.19.2(eslint@10.2.0(jiti@2.7.0))(typescript@6.0.2):
+ eslint-plugin-qwik@1.20.0(eslint@10.2.0(jiti@2.7.0))(typescript@6.0.2):
dependencies:
'@typescript-eslint/utils': 8.58.1(eslint@10.2.0(jiti@2.7.0))(typescript@6.0.2)
eslint: 10.2.0(jiti@2.7.0)
diff --git a/websites/confetti/index.html b/websites/confetti/index.html
index 50db685507f..6441dd0bbce 100644
--- a/websites/confetti/index.html
+++ b/websites/confetti/index.html
@@ -20,31 +20,6 @@
-
-
-
-
-