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

white-dwarf

v1.0.10

Published

Data oriented game engine based on ECSY.

Downloads

5

Readme

White Dwarf

White Dwarf is a data oriented game engine based on a modified version of ECSY Framework

Install

Clone GitHub Repository

Clone this repository to your project as a submodule, create a release.html as release version of your game.

Copy dist/editor.html to your output directory.

Create src/editor.ts, src/index.ts, src/release.ts as entry points.

Then config the package.json with 3 more tasks:

"scripts": {
    "build": "esbuild src/index.ts --bundle --outfile=dist/release.js",
    "watch-editor": "esbuild src/editor.ts --bundle --sourcemap --outfile=dist/editor.js --watch",
    "watch-release": "esbuild src/release.ts --bundle --sourcemap --outfile=dist/release.js --watch"
}

You can config output canvas in release.ts by:

// Setup main canvas.
coreRenderContext.mainCanvas = document.getElementById(
  "mainCanvas"
) as HTMLCanvasElement;

Details will be covered latter.

White Dwarf Editor

picture 1

Basics

The white dwarf editor contains 3 working spaces: world editor, entity list, and entity inspector.

Right Click to move around. Scroll to zoom in and out. Left Click to select an entity from the entity list or the world editor.

Notice that Editor Main Camera is shown in the entity list, but it will not be instantiated in release mode.

Click Play to switch from release preview and editor mode.

Entity Operations

To create a new entity, enter entity name and click Create Entity at the bottom of entity list.

picture 3

To add components, select one from the inspector component dropdown, and click Add Component.

picture 4

Notice that some of the components will NOT show in your editor. Components will be shown ONLY IF there are Systems using them. This is a esbuild compile issue.

Prefabs and World Serialization

White Dwarf supports prefabs and world serialization. To create a prefab, select an entity and click Serialize Entity in the inspector. This will create an entity prefab json file.

To import a prefab, click Load Entity at the bottom of entity list, and select a prefab json file. This will load the prefab into the scene.

To save a world, just click Serialize & Save World in the tool bar. To load a world, click Load World and choose a world json file.

picture 5

Hermite Curve Editor

One of the feature supported by White Dwarf is hermite curve editing and animation.

When a hermiet curve data component is added to an entity, a curve preview will be shown when the entity is selected.

picture 6

To edit the curve, you can add and remove segments in the HermiteCurveData editor. This feature is implemented by custom editor API provided by White Dwarf. More details will be covered latter.

To apply hermite curve animation to an entity, add HermiteCurveMoveData component to the entity.

There are several configs you can change:

  • loop: If the animation will start from begining again when animation is over.
  • speed: The speed of the animation, larger means faster.
  • controlRotation: If the entity transform will align with the hermite curve derivative. When true, the x axis will point towards hermite curve derivative direction.