Custom Physics Registry. Empty by default. Augment it to declare options of modules added with definePhysics(); they then appear as typed keys of physics.
definePhysics()
physics
declare module "konfeti" { interface PhysicsRegistry { magnet: { x?: number; y?: number; strength?: number }; }}Konfeti.fire({ physics: { magnet: { strength: 900 } } }); Copy
declare module "konfeti" { interface PhysicsRegistry { magnet: { x?: number; y?: number; strength?: number }; }}Konfeti.fire({ physics: { magnet: { strength: 900 } } });
Custom Physics Registry. Empty by default. Augment it to declare options of modules added with
definePhysics(); they then appear as typed keys ofphysics.Example