UNPKG
@tsparticles/shape-line
Version:
alpha (3.0.0-alpha.1)
beta (3.6.0-beta.1)
latest (3.9.1)
next (3.0.2)
3.9.1
3.9.0
3.8.1
3.8.0
3.7.1
3.7.0
3.6.0
3.6.0-beta.1
3.6.0-beta.0
3.5.0
3.4.0
3.3.0
3.2.2
3.2.1
3.2.0
3.1.0
3.0.3
3.0.2
3.0.1
3.0.0
3.0.0-beta.5
3.0.0-beta.4
3.0.0-beta.3
3.0.0-beta.2
3.0.0-beta.1
3.0.0-beta.0
3.0.0-alpha.1
3.0.0-alpha.0
tsParticles line shape
particles.js.org
tsparticles/tsparticles
@tsparticles/shape-line
/
browser
/
Utils.js
7 lines
(6 loc)
•
251 B
JavaScript
View Raw
1
2
3
4
5
6
7
export
function
drawLine
(
data
) {
const
{ context, particle, radius } = data, shapeData = particle.
shapeData
, centerY =
0
; context.
moveTo
(-radius, centerY); context.
lineTo
(radius, centerY); context.
lineCap
= shapeData?.
cap
??
"butt"
; }