Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-confetti

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-confetti - npm Package Compare versions

Comparing version 0.2.0 to 0.3.0

.babelrc

27

package.json
{
"name": "vue-confetti",
"description": "A Vue component for dropping confetti.",
"version": "0.2.0",
"main": "src/index.js",
"version": "0.3.0",
"main": "dist/vue-confetti.js",
"author": "Alex Mendes <alexanderhmendes@gmail.com>",
"license": "MIT",
"scripts": {
"lint": "eslint src",
"clean": "rimraf dist",
"build": "npm run clean && webpack --config webpack.config.js",
"prepublish": "npm run lint && npm run build"
},
"repository": {

@@ -15,3 +21,18 @@ "type": "git",

},
"homepage": "https://github.com/alexandermendes/vue-confetti"
"homepage": "https://github.com/alexandermendes/vue-confetti",
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-eslint": "^8.0.2",
"babel-loader": "^7.1.2",
"babel-preset-env": "^1.6.1",
"eslint": "^4.12.0",
"eslint-config-standard": "^10.2.1",
"eslint-plugin-import": "^2.8.0",
"eslint-plugin-node": "^5.2.1",
"eslint-plugin-promise": "^3.6.0",
"eslint-plugin-standard": "^3.0.1",
"rimraf": "^2.6.2",
"webpack": "^3.8.1"
}
}

8

src/particle.js

@@ -21,3 +21,5 @@ class Particle {

this.tilt = this.randI(10)
this.tiltAngleIncremental = (this.rand(0.08) + 0.04) * (this.rand() < 0.5 ? -1 : 1)
this.tiltAngleIncremental = (
(this.rand(0.08) + 0.04) * (this.rand() < 0.5 ? -1 : 1)
)
this.tiltAngle = 0

@@ -56,4 +58,4 @@ this.angle = this.rand(Math.PI * 2)

this.tiltAngle += (this.tiltAngleIncremental * (
Math.cos(this.wind + (this.d + this.x + this.y) * this.windPosCoef)
* 0.2 + 1
Math.cos(this.wind + (this.d + this.x + this.y) * this.windPosCoef) *
0.2 + 1
))

@@ -60,0 +62,0 @@ this.y += (Math.cos(this.angle + this.d) + 3 + this.r / 2) / 2

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc