@mineapi/achievements
Advanced tools
Comparing version 1.0.6 to 1.0.7
{ | ||
"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"; |
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
426164
209