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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@async0x4c/processing-ts

v0.1.0

Published

A Processing to JavaScript transpiler for web applications.

Downloads

6

Readme

Processing.ts

Run native Processing code in your browser using JavaScript / TypeScript

License: MIT

Processingのコードを、変換なしでそのままWeb上で実行できるTypeScriptライブラリです。

  • 🟢 Processingコード(.pde)をそのまま実行
  • 📝 Processing4.4までの構文をサポート
  • 🎨 Webでインタラクティブアートを公開・共有
  • ✅ npmから利用可能

Installation

npm i @async0x4c/processing-ts

Live demo

▶ Live Demo

Quick start(Vanilla JS)

1.ライブラリのダウンロード

library.jsをダウンロード

2.スケッチの入ったフォルダを用意

.
└── MySketch/
    ├── data/
    │   └── picture.png
    ├── main.pde
    └── system.pde

3.sketch.propertiesを作成

.
└── MySketch/
    ├── data/
    │   └── picture.png
    ├── main.pde
    ├── system.pde
    └── sketch.properties

sketch.propertiesのサンプル

main = main.pde  # メイン(PDEで一番左になるタブ)のファイル名
sketches = main.pde system.pde  # スケッチで利用する全てのファイル
resources = ./data/picture.png  # 静的に読み込む全てのリソース(任意)

4.Canvasを渡して実行

.
├── index.html
├── main.js
├── library.js
└── MySketch/
    └── ...

HTML

<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Processing-ts</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/pixi.js/8.12.0/pixi.min.js" integrity="sha512-gO6ZqUJAWdxRHBTOVBmjev2Or6vRUSDO2LWlqrU8jNDh+ymsV1wn36g5u8A3VZ0eauEUJH2lN4EFCWH5PriRrA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
    <script type="module" src="./main.js"></script>
  </head>
  <body>
    <canvas id="app">
    </canvas>
    <script type="module" src="main.ts"></script>
    <style>
      body{
        margin: 0;
        overflow: hidden;
      }
    </style>
  </body>
</html>

main.js

import { SketchManager } from "./library.js";

const manager = new SketchManager(); //スケッチの変換/実行を管理するクラス
manager.mountPApplet(document.getElementById("app")); //Canvasを渡す
const sketch = await manager.loadSketch("./MySketch/"); //スケッチを読み込み
await manager.runSketch(sketch); //スケッチを実行

Quick start(npm)

1.インストール

npm i @async0x4c/processing-ts

2.スケッチの入ったフォルダを用意

.
└── MySketch/
    ├── data/
    │   └── picture.png
    ├── main.pde
    └── system.pde

3.sketch.propertiesを作成

.
└── MySketch/
    ├── data/
    │   └── picture.png
    ├── main.pde
    ├── system.pde
    └── sketch.properties

sketch.propertiesのサンプル

main = main.pde  # メイン(PDEで一番左になるタブ)のファイル名
sketches = main.pde system.pde  # スケッチで利用する全てのファイル
resources = ./data/picture.png  # 静的に読み込む全てのリソース(任意)

4.Canvasを渡して実行

.
├── index.html
├── main.js
├── index.js
└── MySketch/
    └── ...

HTML

<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Processing-ts</title>
  </head>
  <body>
    <canvas id="app">
    </canvas>
    <script type="module" src="main.ts"></script>
    <style>
      body{
        margin: 0;
        overflow: hidden;
      }
    </style>
  </body>
</html>

main.js

import { SketchManager } from "./index.js";

const manager = new SketchManager(); //スケッチの変換/実行を管理するクラス
manager.mountPApplet(document.getElementById("app")); //Canvasを渡す
const sketch = await manager.loadSketch("./MySketch/"); //スケッチを読み込み
await manager.runSketch(sketch); //スケッチを実行

どんなときに使える?

  • 📋 Processing作品をWebサイトに貼りたいとき
  • ♾️ JavaScriptとProcessingを組み合わせたいとき
  • 📖 教材をブラウザで動かしたいとき
  • ⭐ インタラクティブなポートフォリオを作りたいとき

FAQ

Q. p5.jsとの違いは何?

A.p5.jsはJavaScriptでProcessingのスケッチを書く必要がありますが、本ライブラリは元のProcessingコードをブラウザ上で実行します。

Q. Processing.jsで良くない?

Processing.jsではProcessing.tsに比べ多くの関数がサポートされているものの、対象とするProcessingのバージョンが古いため、動作が異なる関数が存在します。 Processing.tsでは、最新のProcessingの機能に基づいて実装や変換を行うため、Processing.jsに比べより確実にスケッチをブラウザ上で実行することができます。

今後について

今後の開発においてはWebAssemblyを用いた変換速度の改善や周辺ライブラリのサポート、Processing.tsと連携して高度な機能を実現するProcessing用のライブラリなど様々なものを計画しているので、コミュニティを盛り上げてもらえると嬉しいです。

開発・コントリビューション

バグ報告・提案・コントリビュート大歓迎です!