@code-dot-org/dance-party
Advanced tools
Comparing version 1.0.4 to 1.0.5
{ | ||
"name": "@code-dot-org/dance-party", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/main.js", |
@@ -59,1 +59,11 @@ # Dance Party | ||
it to ensure it matches expectations. | ||
### Publishing a new version | ||
To publish a new version, the following command should work: | ||
``` | ||
npm version 1.0.4 | ||
``` | ||
With `1.0.4` replaced by the new version number that should be published. | ||
Note: make sure you are logged into `npm` first. If not, the command may fail with a misleading `E404` error. You can see if you're logged in with `npm whoami`, and if not logged in, can can use `npm login`. |
@@ -161,7 +161,8 @@ /* eslint-disable no-unused-vars, curly, eqeqeq */ | ||
const animationData = await this.resourceLoader_.getAnimationData(); | ||
await this.loadExtraImages(); | ||
await Promise.all(costumeNames.map((costume) => { | ||
const promises = costumeNames.map((costume) => { | ||
const costumeData = animationData[costume.toLowerCase()]; | ||
return this.loadCostumeAnimations(costume, costumeData); | ||
})); | ||
}); | ||
promises.push(this.loadExtraImages()); | ||
await Promise.all(promises); | ||
this.allSpritesLoaded = true; | ||
@@ -722,7 +723,7 @@ } | ||
const startAngle = -Math.PI / 2; | ||
// The length of the spiral gets longer as we go from up from 5 towards 40 | ||
// The length of the spiral gets longer as we go from up from 5 towards 80 | ||
// characters in the group. | ||
const countConstrained = this.p5_.constrain(count, 5, 40); | ||
// We go from 1 circle to 2 circles as the length of the spiral gets longer. | ||
const cycles = this.p5_.lerp(1, 2, (countConstrained-5)/35); | ||
const countConstrained = this.p5_.constrain(count, 5, 80); | ||
// We go from 1 circle to 4 circles as the length of the spiral gets longer. | ||
const cycles = this.p5_.lerp(1, 4, (countConstrained-5)/75); | ||
const deltaAngle = cycles * 2 * Math.PI / count; | ||
@@ -732,3 +733,4 @@ | ||
const angle = deltaAngle * i + startAngle; | ||
const radius = this.p5_.lerp(50, maxCircleRadius, i/count); | ||
const maxRadius = this.p5_.lerp(0.75*maxCircleRadius, 2*maxCircleRadius, this.p5_.constrain(count / 80, 0, 1)); | ||
const radius = this.p5_.lerp(50, maxRadius, i/count); | ||
sprite.x = 200 + radius * Math.cos(angle); | ||
@@ -735,0 +737,0 @@ sprite.y = 200 + radius * Math.sin(angle); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
113368
69
3
24881460