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

@mineapi/achievements

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mineapi/achievements - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

2

package.json
{
"name": "@mineapi/achievements",
"version": "1.0.6",
"version": "1.0.7",
"description": "The easiest way to create Minecraft achievements.",

@@ -5,0 +5,0 @@ "main": "./src/index.js",

@@ -9,2 +9,3 @@ "use strict";

const canvas_1 = require("canvas");
const path_1 = __importDefault(require("path"));
class Generator {

@@ -32,11 +33,11 @@ title;

ctx.patternQuality = "fast";
const background = await (0, canvas_1.loadImage)("./src/assets/background.png");
const background = await (0, canvas_1.loadImage)(path_1.default.join(__dirname, "./src/assets/background.png"));
if (!background)
return new Error("Could not load background image");
ctx.drawImage(background, 0, 0, 320, 64);
const icon = await (0, canvas_1.loadImage)("./src/assets/icons/" + this.icons[this.icon] + ".png");
const icon = await (0, canvas_1.loadImage)(path_1.default.join(__dirname, "./src/assets/icons/" + this.icons[this.icon] + ".png"));
if (!icon)
return new Error("Could not load icon image");
ctx.drawImage(icon, 16, 16, 32, 32);
const font = await (0, canvas_1.registerFont)("./src/assets/Minecraftia.ttf", { family: "Minecraftia" });
const font = await (0, canvas_1.registerFont)(path_1.default.join(__dirname, "./src/assets/Minecraftia.ttf"), { family: "Minecraftia" });
ctx.font = "16px Minecraftia";

@@ -43,0 +44,0 @@ ctx.fillStyle = "#ffff00";

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