Namespace: sources
index.sources
Type aliases#
DynamicSourceType#
Ƭ DynamicSourceType: Circle | Rect | HTMLElement | MouseEvent
Represents all types where a source type can be dynamically inferred.
Defined in#
SourceSampler#
Ƭ SourceSampler: () => Vector
Type declaration#
â–¸ (): Vector
Represents a method used for sampling points to emit particles from.
Returns#
Defined in#
Functions#
circleSource#
â–¸ circleSource(source): SourceSampler
Creates a sampler to retrieve random points inside a specified circle.
Parameters#
| Name | Type |
|---|---|
source | Circle |
Returns#
Defined in#
dynamicSource#
â–¸ dynamicSource(source): SourceSampler
Dynamically infers a source sampler for the specified source type.
Parameters#
| Name | Type |
|---|---|
source | unknown |
Returns#
Defined in#
elementSource#
â–¸ elementSource(source): SourceSampler
Creates a sampler to retrieve random points inside a specified HTMLElement.
Parameters#
| Name | Type |
|---|---|
source | HTMLElement |
Returns#
Defined in#
mouseSource#
â–¸ mouseSource(source): SourceSampler
Creates a sampler to retrieve the position of a mouse event.
Parameters#
| Name | Type |
|---|---|
source | MouseEvent |
Returns#
Defined in#
rectSource#
â–¸ rectSource(source): SourceSampler
Creates a sampler to retrieve random points inside a specified rectangle.
Parameters#
| Name | Type |
|---|---|
source | Rect |