MCPcopy
hub / github.com/VincentGarreau/particles.js / pJS

Function pJS

particles.js:10–1412  ·  view source on GitHub ↗
(tag_id, params)

Source from the content-addressed store, hash-verified

8/* ----------------------------------------------- */
9
10var pJS = function(tag_id, params){
11
12 var canvas_el = document.querySelector('#'+tag_id+' > .particles-js-canvas-el');
13
14 /* particles.js variables with default values */
15 this.pJS = {
16 canvas: {
17 el: canvas_el,
18 w: canvas_el.offsetWidth,
19 h: canvas_el.offsetHeight
20 },
21 particles: {
22 number: {
23 value: 400,
24 density: {
25 enable: true,
26 value_area: 800
27 }
28 },
29 color: {
30 value: '#fff'
31 },
32 shape: {
33 type: 'circle',
34 stroke: {
35 width: 0,
36 color: '#ff0000'
37 },
38 polygon: {
39 nb_sides: 5
40 },
41 image: {
42 src: '',
43 width: 100,
44 height: 100
45 }
46 },
47 opacity: {
48 value: 1,
49 random: false,
50 anim: {
51 enable: false,
52 speed: 2,
53 opacity_min: 0,
54 sync: false
55 }
56 },
57 size: {
58 value: 20,
59 random: false,
60 anim: {
61 enable: false,
62 speed: 20,
63 size_min: 0,
64 sync: false
65 }
66 },
67 line_linked: {

Callers

nothing calls this directly

Calls 6

drawFunction · 0.85
initFunction · 0.85
processFunction · 0.85
hexToRgbFunction · 0.70
isInArrayFunction · 0.70
clampFunction · 0.70

Tested by

no test coverage detected