{"_id":"@derschmale/tiny-helix","name":"@derschmale/tiny-helix","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@derschmale/tiny-helix","version":"0.1.0","description":"A TypeScript library for WebGPU","main":"dist/tiny-helix.js","module":"dist/tiny-helix.esm.js","types":"dist/index.d.ts","type":"module","scripts":{"build":"webpack --config webpack.config.cjs","build:debug":"webpack --config webpack.config.cjs","docs":"npx typedoc --out docs src","lint":"eslint src --ext .ts","test":"jest","prepublishOnly":"npm run build"},"keywords":["webgpu","typescript","graphics","3d"],"author":{"name":"David Lenaerts"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/DerSchmale/tiny-helix.git"},"devDependencies":{"@types/jest":"^29.5.11","@typescript-eslint/eslint-plugin":"^6.14.0","@typescript-eslint/parser":"^6.14.0","@webgpu/types":"^0.1.66","eslint":"^8.56.0","jest":"^29.7.0","ts-jest":"^29.1.1","ts-loader":"^9.5.1","typescript":"^5.3.3","webpack":"^5.89.0","webpack-cli":"^5.1.4","typedoc":"^0.25.0"},"peerDependencies":{"@webgpu/types":">=0.1.0"},"peerDependenciesMeta":{"@webgpu/types":{"optional":true}},"gitHead":"3ddc5e60e207c628262304e240dc99b23232c089","_id":"@derschmale/tiny-helix@0.1.0","bugs":{"url":"https://github.com/DerSchmale/tiny-helix/issues"},"homepage":"https://github.com/DerSchmale/tiny-helix#readme","_nodeVersion":"24.11.1","_npmVersion":"11.6.4","dist":{"integrity":"sha512-BVnKb53ltArNCjzqjZsWuu01fK1mTvwUDrfZx1G/bHP6xRDNb6rVGmjy3LLqU6RI47AyQqXsMVjG7JtVt2XGrw==","shasum":"e165bef5cba16bb3d0b2826fe7c6013da3c55267","tarball":"https://registry.npmjs.org/@derschmale/tiny-helix/-/tiny-helix-0.1.0.tgz","fileCount":42,"unpackedSize":1150906,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCbc/oYkn948QlI0HduIRkCeLqc1B+Ns2C5OB7/heT++QIhAImzsPft1Gl5OLXgM5orXJryVqEfZV2XwfEWcJX7vpnw"}]},"_npmUser":{"name":"~derschmale","email":"david.lenaerts@gmail.com"},"directories":{},"maintainers":[{"name":"~derschmale","email":"david.lenaerts@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tiny-helix_0.1.0_1766433060497_0.12699929690785994"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-22T19:51:00.332Z","0.1.0":"2025-12-22T19:51:00.707Z","modified":"2025-12-22T19:51:01.042Z"},"maintainers":[{"name":"~derschmale","email":"david.lenaerts@gmail.com"}],"description":"A TypeScript library for WebGPU","homepage":"https://github.com/DerSchmale/tiny-helix#readme","keywords":["webgpu","typescript","graphics","3d"],"repository":{"type":"git","url":"git+https://github.com/DerSchmale/tiny-helix.git"},"author":{"name":"David Lenaerts"},"bugs":{"url":"https://github.com/DerSchmale/tiny-helix/issues"},"license":"MIT","readme":"# tiny-helix\r\n\r\nA lightweight TypeScript library for WebGPU, built as an ES6 module.\r\n\r\n## Quickstart\r\n\r\nInstall:\r\n\r\n```bash\r\nnpm install tiny-helix\r\n```\r\n\r\nOr for development from source:\r\n\r\n```bash\r\ngit clone https://github.com/DerSchmale/tiny-helix.git\r\ncd tiny-helix\r\nnpm install\r\nnpm run build:debug   # builds non-minified debug bundles with source maps\r\n```\r\n\r\n## Usage (browser)\r\n\r\nBasic example showing initialization and a simple render loop:\r\n\r\n```ts\r\nimport TinyHelix from 'tiny-helix';\r\n\r\nconst app = new TinyHelix();\r\nawait app.initialize({ canvas: document.querySelector('canvas')! });\r\n\r\nfunction frame() {\r\n  app.startFrame();\r\n  const encoder = app.createCommandEncoder('frame-encoder');\r\n\r\n  // Simple clear pass: create a render pass, set the clear color and end the pass.\r\n  // This uses the backbuffer as the default target.\r\n  const clearPass = encoder.createRenderPass()\r\n    .withLabel('clear-pass')\r\n    .withClearColor(0.1, 0.12, 0.15, 1.0) // r,g,b,a\r\n    .build();\r\n\r\n  clearPass.end();\r\n\r\n  encoder.submit();\r\n  requestAnimationFrame(frame);\r\n}\r\n\r\nframe();\r\n```\r\n\r\n## Debug build and source maps\r\n\r\nA development-friendly debug build is included. It produces readable, non-minified bundles with full source maps. The debug builds output the following files into `dist/`:\r\n\r\n- `tiny-helix.debug.js` + `tiny-helix.debug.js.map` (UMD / CommonJS-like build)\r\n- `tiny-helix.esm.debug.js` + `tiny-helix.esm.debug.js.map` (ESM build)\r\n\r\nTo create the debug bundles run:\r\n\r\n```bash\r\nnpm run build:debug\r\n```\r\n\r\nThe webpack configuration is set up so source maps use `file:///...` absolute file URLs instead of the `webpack://` scheme. This prevents browsers from attempting to resolve `webpack://` sources when consuming the package as a module.\r\n\r\n## API overview\r\n\r\nThis project exposes a small set of helpers and wrappers for working with WebGPU in TypeScript. The main entry points are:\r\n\r\n- `TinyHelix` (default export): High-level manager for a WebGPU context, backbuffer and helpers for creating render targets, shaders, meshes and render pipelines.\r\n- `WebGPUContext`: Low-level context manager that handles adapter/device initialization and canvas configuration.\r\n- `CommandEncoder`: Helper for recording and submitting GPU commands per-frame.\r\n- `RenderPass`, `RenderPipeline`, `RenderTarget`, `Shader`, `Mesh`, `Texture`, and buffer helpers.\r\n\r\nSee the inline JSDoc comments in `src/` for detailed method and type information. TypeScript consumers will get typings from the `dist/index.d.ts` entry.\r\n\r\n## Development notes\r\n\r\n- Use `npm run build` to produce production bundles (minified, optimized).\r\n- Use `npm run build:debug` to produce debug bundles with full source maps.\r\n- For TypeScript projects, install `@webgpu/types` for better type completion:\r\n\r\n```bash\r\nnpm install --save-dev @webgpu/types\r\n```\r\n\r\n## Requirements\r\n\r\n- A browser with WebGPU support\r\n- For TypeScript projects, you may want to install `@webgpu/types` for full type definitions\r\n\r\n## License\r\n\r\nMIT License - see [LICENSE](./LICENSE) for details.\r\n","readmeFilename":"README.md","_rev":"1-b98221aa94af9fb90d270e31095af48f"}