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 🙏

© 2024 – Pkg Stats / Ryan Hefner

dashifyjs

v1.0.8

Published

Ever wanted to do something cool? something amazing? or just plain bored? Now with dashifyjs, You can convert your typescript or javascript code into a geometry dash level!

Downloads

10

Readme

DashifyJS

Ever wanted to convert JS/TS code into a geometry dash level? Now you can with DashifyJS!

Examples

This is also compatible with 2.2!

Typescript example

import dashifyjs, { Gamemode, PlayerSize, GameType } from "dashifyjs" // Importing the main scripts

dashifyjs.level.createLevel("DashifyJS", "Created by an npm module 'DashifyJS' This is a showcase to the package."); // Creating a level, with a name and description;
dashifyjs.level.setOfficialSong(4);
dashifyjs.level.Data.setFolder(0);

dashifyjs.level.setBGColor(1, 255, 9);
dashifyjs.level.setGroundColor(35, 99, 100);

dashifyjs.level.Data.setGameType(GameType.Normal); // Can be platformer too
dashifyjs.level.Data.setGamemode(Gamemode.Cube); // Changing the Gamemode setting to a 'Cube' or identified as a 0.
dashifyjs.level.Data.setPlayerSize(PlayerSize.Normal); // Can be Mini, or Normal.
dashifyjs.level.Data.setFont(3); // Font Identifier (ID)
dashifyjs.level.Data.setGNTexture(2); // Ground Texture
dashifyjs.level.Data.setBGTexture(5); // Background Texture

dashifyjs.triggers.createSpawn({ touchTrigger: true, target: 2, posX: 47, posY: 2, scale: 5 });
dashifyjs.triggers.createToggle({ posX: -100, posY: 1, target: 1, toggle: 0 });
dashifyjs.triggers.createReverse({ spawnTrigger: true, groupID: 2, posX: 47, posY: 10 });
dashifyjs.triggers.createToggle({ spawnTrigger: true, groupID: 2, posX: 47, posY: 10, target: 1, toggle: 1 });
dashifyjs.triggers.createEnd({ scale: 5, groupID: 1, posX: 1, posY: 1, touchTrigger: true });

dashifyjs.spikes.create("spike", { posX: 3, posY: 1 });
for (let i = 0; i < 20; i++) {
    if (i % 6 == 0) dashifyjs.triggers.createPulse({
        posX: (4 + i) + (i + 1) + 3,
        posY: 1,
        color: { r: 35, g: 99, b: 10 },
        channel: 1000
    });
    dashifyjs.blocks.create("cube", { posX: 4 + i + (i + 1), posY: 1 });
    dashifyjs.blocks.create("cube", { posX: 4 + i + (i + 1), posY: 10 });

    dashifyjs.spikes.create("spike", { posX: 4 + i + (i + 1), posY: 3 });
    dashifyjs.spikes.create("spike", { posX: 4 + i + (i + 1), posY: 8, flipY: true });
}

dashifyjs.portals.create("ship", { posX: 4, posY: 5 });
dashifyjs.specials.createText({ posX: 47, posY: 5, text: "DashifyJS" });

dashifyjs.Compiler.compile(); // Compile our code into a Geometry dash level.

Javascript Example

const dashifyjs = require("dashifyjs").default;
const { Gamemode, PlayerSize, GameType } = require("dashifyjs");

dashifyjs.level.createLevel("DashifyJS", "Created by an npm module 'DashifyJS' This is a showcase to the package.");
dashifyjs.level.setOfficialSong(4);
dashifyjs.level.Data.setFolder(0);

dashifyjs.level.setBGColor(1, 255, 9);
dashifyjs.level.setGroundColor(35, 99, 100);

dashifyjs.level.Data.setGamemode(Gamemode.Cube);
dashifyjs.level.Data.setPlayerSize(PlayerSize.Normal);
dashifyjs.level.Data.setGameType(GameType.Normal);
dashifyjs.level.Data.setFont(3);
dashifyjs.level.Data.setGNTexture(2);
dashifyjs.level.Data.setBGTexture(5);

dashifyjs.triggers.createSpawn({ touchTrigger: true, target: 2, posX: 47, posY: 2, scale: 5 });
dashifyjs.triggers.createToggle({ posX: -100, posY: 1, target: 1, toggle: 0 });
dashifyjs.triggers.createReverse({ spawnTrigger: true, groupID: 2, posX: 47, posY: 10 });
dashifyjs.triggers.createToggle({ spawnTrigger: true, groupID: 2, posX: 47, posY: 10, target: 1, toggle: 1 });
dashifyjs.triggers.createEnd({ scale: 5, groupID: 1, posX: 1, posY: 1, touchTrigger: true });

dashifyjs.spikes.create("spike", { posX: 3, posY: 1 });
for (let i = 0; i < 20; i++) {
    if (i % 6 == 0) dashifyjs.triggers.createPulse({
        posX: (4 + i) + (i + 1) + 3,
        posY: 1,
        color: { r: 35, g: 99, b: 10 },
        channel: 1000
    });
    dashifyjs.blocks.create("cube", { posX: 4 + i + (i + 1), posY: 1 });
    dashifyjs.blocks.create("cube", { posX: 4 + i + (i + 1), posY: 10 });

    dashifyjs.spikes.create("spike", { posX: 4 + i + (i + 1), posY: 3 });
    dashifyjs.spikes.create("spike", { posX: 4 + i + (i + 1), posY: 8, flipY: true });
}
dashifyjs.portals.create("ship", { posX: 4, posY: 5 });

dashifyjs.specials.createText({ posX: 47, posY: 5, text: "DashifyJS" });

dashifyjs.Compiler.compile();

OR you could use them like this

import dashifyjs from "dashifyjs";

const alpha = dashifyjs.triggers.createAlpha();
alpha.setPosition({ x: 4, y: 4 });

dashifyjs.Compiler.compile();

How can i use triggers?

Here is an example

dashifyjs.triggers.createColor({ color: "10,255,5", channel: "BG", fadeTime: 0.4, posX: 11, posY: 2 }) // Create a color trigger, the "color" attribute can be a RGB type or a string like that, anything else will error out if you are using javascript. The "channel" attribute is the channel of the color attribute, This can also translate to a pulse object.

Here is a list of expirements

Ex.N 1

dashifyjs.level.createLevel("Expirement 01", "an expirement");
dashifyjs.specials.createText({ posX: 2, posY: 2, text: btoa("Decoded text!") }); // Use baes64-encoding with a text, using 'create' wont work since it does not provide a text attribute.

Developers

  1. ContentGamer

Q&A

Is anything possible with this package?

Yes, the package also has alot of triggers to use! Go crazy!

Why isn't there other objects in dashifyjs.blocks?

The only method in dashifyjs.blocks is create, with a name and a type (or Unique Identifier, i use this because i have alot of the same names), you can browse the json at the 'json'/blocks code to see all blocks i have currently put it.

Contact

You can contact with me on discord, or twitter!

  1. You can DM Me with discord at contentgamer
  2. Or you can DM Me with twitter Here