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.
#
ParametersName | Type |
---|---|
source | Circle |
#
Returns#
Defined in#
dynamicSourceâ–¸ dynamicSource(source
): SourceSampler
Dynamically infers a source sampler for the specified source type.
#
ParametersName | Type |
---|---|
source | unknown |
#
Returns#
Defined in#
elementSourceâ–¸ elementSource(source
): SourceSampler
Creates a sampler to retrieve random points inside a specified HTMLElement.
#
ParametersName | Type |
---|---|
source | HTMLElement |
#
Returns#
Defined in#
mouseSourceâ–¸ mouseSource(source
): SourceSampler
Creates a sampler to retrieve the position of a mouse event.
#
ParametersName | Type |
---|---|
source | MouseEvent |
#
Returns#
Defined in#
rectSourceâ–¸ rectSource(source
): SourceSampler
Creates a sampler to retrieve random points inside a specified rectangle.
#
ParametersName | Type |
---|---|
source | Rect |