Skip to content

kaplayjs/crew

Repository files navigation

@kaplayjs/crew

Installation

npm install @kaplayjs/crew
yarn add @kaplayjs/crew
pnpm add @kaplayjs/crew
bun add @kaplayjs/crew

Usage

Using it on KAPLAY

Crew package comes with a plugin for load all KAPLAY crew sprites!

import { crew } from "@kaplayjs/crew";
import kaplay from "kaplay";

const k = kaplay({
    plugins: [crew],
    font: "happy",
});

k.loadCrew("apple");
k.loadCrewFont("happy");

k.add([
    k.sprite("apple"),
]);

k.add([
    k.pos(40, 40),
    k.text("ohhi"),
]);