{"_id":"@alexislours/ltd-textures","_rev":"2-ac08f2a676e8a9f39e01029627411a6e","name":"@alexislours/ltd-textures","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@alexislours/ltd-textures","version":"1.0.0","keywords":["wasm","tegra","switch","texture","bcn","bc1","bc3","dxt","swizzle","block-linear"],"author":{"name":"Alexis Lours"},"license":"AGPL-3.0-or-later","_id":"@alexislours/ltd-textures@1.0.0","maintainers":[{"name":"alexislours","email":"alexislours@protonmail.com"}],"homepage":"https://github.com/alexislours/ltd-save-editor/tree/dev/packages/ltd-textures#readme","bugs":{"url":"https://github.com/alexislours/ltd-save-editor/issues"},"dist":{"shasum":"0096feadee224917adc715657417cc0b72eaec28","tarball":"https://registry.npmjs.org/@alexislours/ltd-textures/-/ltd-textures-1.0.0.tgz","fileCount":18,"integrity":"sha512-XU6u5PbfdnfJBiIhLCS+8fCGiXD2ijsDtIMQWGoxZKSQmTtEe3rNdTXaBtCOuAeaovWWADstocvxymBsowXIYw==","signatures":[{"sig":"MEYCIQDtn9Osey7C+7nUsbC6CfKidG0PJe8pE3n6BwTsNsRoRwIhAK0eklqNE32bAQ3feObzCsnu5ZWc5ZDsUBcbEy4nNiam","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alexislours%2fltd-textures@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":402655},"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./worker":{"types":"./dist/worker.d.ts","import":"./dist/worker.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.js"},"./ugc.wasm":"./build/ugc.wasm"},"gitHead":"06c6b52fc9944ebdfaf4f0ec7c6484b6ac474c58","scripts":{"build":"npm run build:wasm && tsup && tsc -p tsconfig.build.json","check":"tsc -p tsconfig.json","lint:pkg":"publint --strict && attw --pack --profile esm-only --exclude-entrypoints ugc.wasm","build:wasm":"asc assembly/index.ts --config asconfig.json --target release","prepublishOnly":"npm run build","build:wasm:debug":"asc assembly/index.ts --config asconfig.json --target debug"},"_npmUser":{"name":"alexislours","email":"alexislours@protonmail.com"},"repository":{"url":"git+https://github.com/alexislours/ltd-save-editor.git","type":"git","directory":"packages/ltd-textures"},"_npmVersion":"11.13.0","description":"Tegra/Switch block-linear (de)swizzle, BC1/BC3 transcode, sRGB/linear conversion, and image resize, in WebAssembly.","directories":{},"sideEffects":false,"_nodeVersion":"24.16.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","publint":"^0.3.21","@types/node":"^24.12.3","assemblyscript":"^0.28.17","@arethetypeswrong/cli":"^0.18.3"},"_npmOperationalInternal":{"tmp":"tmp/ltd-textures_1.0.0_1780845104539_0.12207066376573339","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@alexislours/ltd-textures","version":"1.0.1","description":"Tegra/Switch block-linear (de)swizzle, BC1/BC3 transcode, sRGB/linear conversion, and image resize, in WebAssembly.","license":"AGPL-3.0-or-later","author":{"name":"Alexis Lours"},"type":"module","sideEffects":false,"keywords":["wasm","tegra","switch","texture","bcn","bc1","bc3","dxt","swizzle","block-linear"],"repository":{"type":"git","url":"git+https://github.com/alexislours/ltd-save-editor.git","directory":"packages/ltd-textures"},"homepage":"https://github.com/alexislours/ltd-save-editor/tree/dev/packages/ltd-textures#readme","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.js"},"./worker":{"types":"./dist/worker.d.ts","import":"./dist/worker.js"},"./ugc.wasm":"./build/ugc.wasm"},"scripts":{"build:wasm":"asc assembly/index.ts --config asconfig.json --target release","build:wasm:debug":"asc assembly/index.ts --config asconfig.json --target debug","build":"npm run build:wasm && tsup && tsc -p tsconfig.build.json","check":"tsc -p tsconfig.json","lint:pkg":"publint --strict && attw --pack --profile esm-only --exclude-entrypoints ugc.wasm","test":"vitest run","prepublishOnly":"npm run build"},"devDependencies":{"@arethetypeswrong/cli":"^0.18.3","@types/node":"^24.12.3","assemblyscript":"^0.28.17","publint":"^0.3.21","tsup":"^8.5.0"},"publishConfig":{"access":"public"},"gitHead":"18da1ed5c8a3bf1ed2a637a7e1576b792d75c695","_id":"@alexislours/ltd-textures@1.0.1","bugs":{"url":"https://github.com/alexislours/ltd-save-editor/issues"},"_nodeVersion":"24.16.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-4d6S4zM12tvTbuJFAL173ZnNrCfzeowLAmilKaUiXOXkJvrFs5ACpBly7b6Oez1C5e0HvZ+wII63t/ueP9tdQQ==","shasum":"101b1a27ab92c0b772f6b42a98c5a52e9c5c8e6e","tarball":"https://registry.npmjs.org/@alexislours/ltd-textures/-/ltd-textures-1.0.1.tgz","fileCount":18,"unpackedSize":415628,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@alexislours%2fltd-textures@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDaWp4kH1S7pEMn3BXz+bjGI1HL4zRQExXbiQ1NE7C2jAiEA9KcKM4UMhZ0BnmYWiGzoR3zS5y7V2TayBDQNRF3AN34="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c0750fc8-f347-4c37-b9c2-12a429511bf5"}},"directories":{},"maintainers":[{"name":"alexislours","email":"alexislours@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ltd-textures_1.0.1_1780877678910_0.6339569598749053"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-07T15:11:44.343Z","modified":"2026-06-08T00:14:39.383Z","1.0.0":"2026-06-07T15:11:44.738Z","1.0.1":"2026-06-08T00:14:39.088Z"},"bugs":{"url":"https://github.com/alexislours/ltd-save-editor/issues"},"author":{"name":"Alexis Lours"},"license":"AGPL-3.0-or-later","homepage":"https://github.com/alexislours/ltd-save-editor/tree/dev/packages/ltd-textures#readme","keywords":["wasm","tegra","switch","texture","bcn","bc1","bc3","dxt","swizzle","block-linear"],"repository":{"type":"git","url":"git+https://github.com/alexislours/ltd-save-editor.git","directory":"packages/ltd-textures"},"description":"Tegra/Switch block-linear (de)swizzle, BC1/BC3 transcode, sRGB/linear conversion, and image resize, in WebAssembly.","maintainers":[{"name":"alexislours","email":"alexislours@protonmail.com"}],"readme":"# @alexislours/ltd-textures\n\n<div align=\"center\">\n  <a href=\"https://www.npmjs.com/package/@alexislours/ltd-textures\"><img alt=\"npm\" src=\"https://img.shields.io/npm/v/@alexislours/ltd-textures?style=for-the-badge&logo=npm\"></a>\n  <a href=\"https://github.com/alexislours/ltd-save-editor/actions/workflows/packages-ci.yml\"><img alt=\"ci\" src=\"https://img.shields.io/github/actions/workflow/status/alexislours/ltd-save-editor/packages-ci.yml?branch=dev&label=ci&style=for-the-badge&logo=githubactions\"></a>\n  <a href=\"./LICENSE\"><img alt=\"license\" src=\"https://img.shields.io/npm/l/@alexislours/ltd-textures?style=for-the-badge&logo=gnu\"></a>\n</div>\n\nTegra/Switch GPU texture toolkit in WebAssembly: block-linear (de)swizzle, BC1/BC3 transcode, sRGB/linear conversion, and image resize. No bundler assumptions, no Vite magic; you bring the wasm bytes and (optionally) a worker factory.\n\n## Install\n\n```sh\nnpm install @alexislours/ltd-textures\n```\n\n## Usage\n\nPortable core. Supply the wasm bytes however your environment loads them:\n\n```ts\nimport { createUgcWasm } from '@alexislours/ltd-textures';\n\nconst wasm = await createUgcWasm({\n  wasm: fetch(import.meta.resolve('@alexislours/ltd-textures/ugc.wasm')),\n});\nconst rgba = wasm.bc3Decode(blocks, width, height);\n```\n\nMulti-threaded BC encoding is opt-in via a worker factory. Without one, the\nthreaded methods transparently fall back to single-threaded encoding:\n\n```ts\nimport UgcWorker from '@alexislours/ltd-textures/worker?worker'; // Vite example\n\nconst wasm = await createUgcWasm({\n  wasm: fetch(wasmUrl),\n  createWorker: () => new UgcWorker(),\n});\nawait wasm.bc1EncodeThreaded(linRgba, srgbRgba, w, h, mode, threads);\n```\n\nIn a Vite/webpack browser app, the `./browser` entry resolves the bundled wasm for you:\n\n```ts\nimport { loadUgcWasm } from '@alexislours/ltd-textures/browser';\nimport UgcWorker from '@alexislours/ltd-textures/worker?worker'; // Vite example\n\nconst wasm = await loadUgcWasm({ createWorker: () => new UgcWorker() });\n```\n\n## Entry points\n\n- `.` the portable `createUgcWasm` API plus `Bc1Mode`/`FitMode`/`Matte`.\n- `./browser` convenience loader that fetches the shipped wasm via `import.meta.url`.\n- `./worker` the BC-encode worker entry (instantiate as a module worker).\n- `./ugc.wasm` the prebuilt binary asset.\n\n## License\n\nAGPL-3.0-or-later\n","readmeFilename":"README.md"}