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

syed-webgpu-engine

v1.0.10

Published

An event driven engine built with typescript, WASM and webgpu to create hardware-accelerated cross platform applications.

Downloads

8

Readme

Learning WebGPU

I already have experience with opengl, cuda. I want to start learning more about webassembly and webgpu so I can run these applications cross platform. I have a couple projects in mind to do with these technologies, but I want to create an engine to build them with.

Ikik I could use a preexisting engine, but I think these exercises are fun and the unexpected challenges that come with building something like this always teach me something.

Getting Started

  1. You're going to need nodejs
  2. Most updated browsers now support webgpu
  3. Run npm run build and then open dist/index.html in the browser
  4. If you want a clean slate to work from, see commit #1933e4c9147dd946c3866bfecd2b7c9e3d44d327

Notes

  • Works the same as opengl where you have vertex shaders and fragment shaders
  • Screenspace is (-1, -1) at bottom left to (1,1) at top left

The general flow

  1. Get the canvas, device, adapter
  2. A commandEncoder will be used to build queue of instructions
  3. You create a renderpass for the commandEncoder
  4. Inside the renderpass is a pipeline with the vertx and fragment shader for your select vertices
  5. Execute the command in the commandEncoder queue

Shaders

Use the wgsl programming language Seems to have a similar syntax to rust Vertex shaders are interpolated like opengl

Specifying Geometry

Create a buffer and add the data. Then specify the format/stride/offset of the vertices. Then render, making sure that shader has the location of the buffers aligned properly.