npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@jawirhytam/kurokuro

v1.1.2

Published

A DjawaScript Turtle Graphics library.

Readme

Kurokuro 🐢

A simple and fun turtle graphics library for DjawaScript.

With Kurokuro, you can create drawings and patterns by giving commands to a "turtle" to move on a canvas.

Kurokuro Example Image (The image above is a placeholder; you can replace it with a screenshot of your code's output)


Table of Contents


Installation

To use Kurokuro, you will need two packages: djawascript (as the command-line tool) and kurokuro (the graphics library itself).

  1. Install DjawaScript globally: Open your terminal and run the following command. You might need sudo on Linux/macOS.

    npm install -g @jawirhytam/djawascript
  2. Install Kurokuro in Your Project: Create a new directory for your project, navigate into it, and install Kurokuro locally.

    mkdir my-kurokuro-project
    cd my-kurokuro-project
    npm install @jawirhytam/kurokuro

Now you are ready to start drawing!

Usage

The process is very straightforward and designed to feel like running a regular script.

Step 1: Initialize Your Script

Create a new file with a .jawa extension (e.g., drawing.jawa). To tell djawa that this file will use the Kurokuro graphics library, you must add a special comment at the very top of your file:

// @kurokuro: pake

Step 2: Write Your Code

Use the functions from the Kurokuro API to start drawing.

// @kurokuro: pake

// Draw a simple square
kanggo (jarno i = 0; i < 4; i++) terus
  maju(100);
  mengen(90);
mbari

Step 3: Run Your Script

Save your file, and run it using djawa run from your terminal.

djawa run drawing.jawa

An application window will appear and instantly display your drawing!

API Reference

Here are all the commands you can give to the turtle.

| Function | Parameters | Description | | :--- | :--- | :--- | | maju(distance) | distance: Angka | Moves the turtle forward by distance pixels. | | mundur(distance) | distance: Angka | Moves the turtle backward by distance pixels. | | mengen(degrees) | degrees: Angka | Turns the turtle right by degrees. | | mengiri(degrees) | degrees: Angka | Turns the turtle left by degrees. | | penMunggah() | - | Lifts the pen up. The turtle will move without drawing. | | penMudun() | - | Puts the pen down. The turtle will draw again when moving. | | reset() | - | Clears all drawings on the canvas and resets the turtle to its initial position. |

Complete Example

Here is an example to draw a hexagon.

hexagon.jawa

// @kurokuro: pake

// Clear the canvas and reset the turtle to the center
reset();

// Define properties for the hexagon
jarno sides = 6;
jarno sideLength = 80;
jarno angle = 360 / sides;

cetakno("Drawing a hexagon...");

// Loop to draw each side
kanggo (jarno i = 0; i < sides; i = i + 1) terus
  maju(sideLength);
  mengen(angle);
mbari

cetakno("Hexagon drawing complete!");

To run it:

djawa run hexagon.jawa

This will open an application window displaying the hexagon you've created.