From 2393795609c7bed3f51891c3685e5d665fc7a914 Mon Sep 17 00:00:00 2001 From: larkenx Date: Thu, 20 Sep 2018 20:37:04 -0400 Subject: [PATCH] Adding ability to pass in shape options as a paramater to further configure the size and shape of individual particles, even passing in images! --- src/vue-particles/vue-particles.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/vue-particles/vue-particles.vue b/src/vue-particles/vue-particles.vue index aa54ea15..0943c733 100644 --- a/src/vue-particles/vue-particles.vue +++ b/src/vue-particles/vue-particles.vue @@ -7,6 +7,7 @@ :linesColor="linesColor" :particlesNumber="particlesNumber" :shapeType="shapeType" + :shapeOptions="shapeOptions" :particleSize="particleSize" :linesWidth="linesWidth" :lineLinked="lineLinked" @@ -45,6 +46,10 @@ type: String, default: 'circle' }, + shapeOptions: { + type: Object, + default: {} + }, particleSize: { type: Number, default: 4 @@ -99,6 +104,7 @@ this.particleOpacity, this.particlesNumber, this.shapeType, + this.shapeOptions, this.particleSize, this.linesColor, this.linesWidth, @@ -119,6 +125,7 @@ particleOpacity, particlesNumber, shapeType, + shapeOptions, particleSize, linesColor, linesWidth, @@ -152,7 +159,8 @@ }, "polygon": { "nb_sides": 5 - } + }, + ...shapeOptions }, "opacity": { "value": particleOpacity,