particles_config: Config for particles.js

Description Usage Arguments Examples

View source: R/config.R

Description

See examples here https://vincentgarreau.com/particles.js/

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
particles_config(
  particles.number.value = 80L,
  particles.number.density.enable = TRUE,
  particles.number.density.value_area = 800L,
  particles.color.value = "#112446",
  particles.shape.type = "circle",
  particles.shape.stroke.width = 0L,
  particles.shape.stroke.color = "#000000",
  particles.shape.polygon.nb_sides = 5L,
  particles.shape.image.src = "img/github.svg",
  particles.shape.image.width = 100L,
  particles.shape.image.height = 100L,
  particles.opacity.value = 0.5,
  particles.opacity.random = FALSE,
  particles.opacity.anim.enable = FALSE,
  particles.opacity.anim.speed = 1L,
  particles.opacity.anim.opacity_min = 0.1,
  particles.opacity.anim.sync = FALSE,
  particles.size.value = 3L,
  particles.size.random = TRUE,
  particles.size.anim.enable = FALSE,
  particles.size.anim.speed = 40L,
  particles.size.anim.size_min = 0.1,
  particles.size.anim.sync = FALSE,
  particles.line_linked.enable = TRUE,
  particles.line_linked.distance = 150L,
  particles.line_linked.color = "#112446",
  particles.line_linked.opacity = 0.4,
  particles.line_linked.width = 1L,
  particles.move.enable = TRUE,
  particles.move.speed = 6L,
  particles.move.direction = "none",
  particles.move.random = FALSE,
  particles.move.straight = FALSE,
  particles.move.out_mode = "out",
  particles.move.bounce = FALSE,
  particles.move.attract.enable = FALSE,
  particles.move.attract.rotateX = 600L,
  particles.move.attract.rotateY = 1200L,
  interactivity.detect_on = "canvas",
  interactivity.events.onhover.enable = TRUE,
  interactivity.events.onhover.mode = "repulse",
  interactivity.events.onclick.enable = TRUE,
  interactivity.events.onclick.mode = "push",
  interactivity.events.resize = TRUE,
  interactivity.modes.grab.distance = 400L,
  interactivity.modes.grab.line_linked.opacity = 1L,
  interactivity.modes.bubble.distance = 400L,
  interactivity.modes.bubble.size = 40L,
  interactivity.modes.bubble.duration = 2L,
  interactivity.modes.bubble.opacity = 8L,
  interactivity.modes.bubble.speed = 3L,
  interactivity.modes.repulse.distance = 200L,
  interactivity.modes.repulse.duration = 0.4,
  interactivity.modes.push.particles_nb = 4L,
  interactivity.modes.remove.particles_nb = 2L,
  retina_detect = TRUE
)

Arguments

particles.number.value

Number of particles

particles.number.density.enable

Logical, enable density

particles.number.density.value_area

Density of particles.

particles.color.value

Color of particles

particles.shape.type

Type of shape(s): "circle", "edge", "triangle", "polygon", "star", "image"

particles.shape.stroke.width

Stroke width of shapes

particles.shape.stroke.color

Stroke color of shapes

particles.shape.polygon.nb_sides

For "polygon", number of shapes

particles.shape.image.src

For "image", path to image

particles.shape.image.width

For "image", width of image

particles.shape.image.height

For "image", height of image

particles.opacity.value

Opacity value

particles.opacity.random

Logical. Random opacity

particles.opacity.anim.enable

Enable animation for particles opacity

particles.opacity.anim.speed

Speed of animation

particles.opacity.anim.opacity_min

Minimal opacity

particles.opacity.anim.sync

Synchronize opacity animation between particles

particles.size.value

Size of particles

particles.size.random

Logical. Ramdom size

particles.size.anim.enable

Enable animation for size

particles.size.anim.speed

Speed animation

particles.size.anim.size_min

Minimal size when animated

particles.size.anim.sync

Synchronize size animation between particles

particles.line_linked.enable

Logical. Links particles to each other

particles.line_linked.distance

Distance between particles

particles.line_linked.color

Link color

particles.line_linked.opacity

Link opacity

particles.line_linked.width

Link width

particles.move.enable

Logical.Should particles move ?

particles.move.speed

Speed of particles

particles.move.direction

Direction of particles: "none", "top", "top-right", "right", "bottom-right", "bottom", "bottom-left", "left", "top-left"

particles.move.random

Logical radom movement

particles.move.straight

Logical. Straight or not

particles.move.out_mode

What does particles should do when reaching border of page ? "out" or "bounce"

particles.move.bounce

Logical. Movement between particles

particles.move.attract.enable

Logical

particles.move.attract.rotateX

Numeric

particles.move.attract.rotateY

Numeric

interactivity.detect_on

On "canvas" or "window"

interactivity.events.onhover.enable

Enable on hover with mouse

interactivity.events.onhover.mode

What to do when mouse is hover: "grab", "bubble", "repulse"

interactivity.events.onclick.enable

Enable on click with mouse

interactivity.events.onclick.mode

What to do on click: "push" (add particles), "remove", "bubble", "repulse"

interactivity.events.resize

Logical

interactivity.modes.grab.distance

Grab particles within a distance

interactivity.modes.grab.line_linked.opacity

Change opacity of links between particles grabbed

interactivity.modes.bubble.distance

Transform particles to buble within a distance

interactivity.modes.bubble.size

Size of bubles

interactivity.modes.bubble.duration

Duration of effect

interactivity.modes.bubble.opacity

Opacity of bubbles

interactivity.modes.bubble.speed

Speed of bubbles

interactivity.modes.repulse.distance

Distance to repulse particles

interactivity.modes.repulse.duration

Duration of repulse

interactivity.modes.push.particles_nb

Add how many new particles

interactivity.modes.remove.particles_nb

Remove how many particles

retina_detect

Logical

Examples

1
2
3
4
5
particles(particles_config(
  particles.color.value = "#DF0101",
  particles.shape.type = "star",
  particles.line_linked.color = "#DF0101"
))

dreamRs/shinyparticles documentation built on Dec. 1, 2019, 5:16 a.m.