-
- All Implemented Interfaces:
public final class PartyConfiguration how to confetti should be rendered
-
-
Field Summary
Fields Modifier and Type Field Description private final Integerangleprivate final Integerspreadprivate final Floatspeedprivate final FloatmaxSpeedprivate final Floatdampingprivate final List<Size>sizeprivate final List<Integer>colorsprivate final List<Shape>shapesprivate final LongtimeToLiveprivate final BooleanfadeOutEnabledprivate final Positionpositionprivate final Integerdelayprivate final Rotationrotationprivate final EmitterConfigemitter
-
Method Summary
Modifier and Type Method Description final IntegergetAngle()the direction the confetti will shoot final IntegergetSpread()how wide the confetti will shoot in degrees. final FloatgetSpeed()The start speed of the confetti at the time of creation. final FloatgetMaxSpeed()when maxSpeed is set a random speed between speed and maxSpeed will be chosen. final FloatgetDamping()The rate at which the speed will decrease right after shooting the confetti final List<Size>getSize()The size of the confetti. final List<Integer>getColors()List of colors that will be randomly picked from final List<Shape>getShapes()Set the shape of the confetti. final LonggetTimeToLive()the amount of time in milliseconds before a particle will stop rendering or fade out if fadeOutEnabled is set to true. final BooleangetFadeOutEnabled()If true and a confetti disappears because it ran out of time (set with timeToLive) it will slowly fade out. final PositiongetPosition()the point where the confetti will spawn relative to the canvas. final IntegergetDelay()the amount of milliseconds to wait before the rendering of the confetti starts final RotationgetRotation()enable the 3D rotation of a Confetti. final EmitterConfiggetEmitter()instructions how many and often a confetti particle should spawn. -
-
Method Detail
-
getSpread
final Integer getSpread()
how wide the confetti will shoot in degrees. Use 1 to shoot in a straight line and 360 to form a circle
-
getSpeed
final Float getSpeed()
The start speed of the confetti at the time of creation. Also set maxSpeed to apply a random speed between speed and maxSpeed.
-
getMaxSpeed
final Float getMaxSpeed()
-
getDamping
final Float getDamping()
The rate at which the speed will decrease right after shooting the confetti
-
getSize
final List<Size> getSize()
The size of the confetti. Use: Size.SMALL, MEDIUM or LARGE for default sizes or create your custom size using a new instance of Size.
-
getShapes
final List<Shape> getShapes()
Set the shape of the confetti. Set multiple shapes and it will be randomly assigned upon creation of the confetti. See Shape for possible shapes and custom drawables.
-
getTimeToLive
final Long getTimeToLive()
the amount of time in milliseconds before a particle will stop rendering or fade out if fadeOutEnabled is set to true.
-
getFadeOutEnabled
final Boolean getFadeOutEnabled()
If true and a confetti disappears because it ran out of time (set with timeToLive) it will slowly fade out. If set to falls it will instantly disappear from the screen.
-
getPosition
final Position getPosition()
the point where the confetti will spawn relative to the canvas. Use absolute coordinates with Position.Absolute or relative coordinates between 0.0 and 1.0 using Position.Relative. Spawn confetti on random positions using Position.between.
-
getDelay
final Integer getDelay()
the amount of milliseconds to wait before the rendering of the confetti starts
-
getRotation
final Rotation getRotation()
-
getEmitter
final EmitterConfig getEmitter()
instructions how many and often a confetti particle should spawn. Use Emitter(duration, timeUnit).max(amount) or Emitter(duration, timeUnit).perSecond(amount) to configure the Emitter.
-
-
-
-