isle.pizza/workbox-config.cjs
Christian Semmler 39598aa3b9
Vehicle textures (#21)
* Add vehicle texture editing

Parse and serialize Act1State textures in save files. Add a texture
picker modal with default presets (from .tex files) and custom uploads
persisted to IndexedDB per texture name. Quantize uploaded images
against the WDB palette and render texture changes in the 3D preview.
Support resetting textures to the WDB default.

* Fix vehicle texture not updating when switching save slots

Include slot number in the part key so that switching save slots
triggers a full part reload with the new slot's textures.

* Preload default textures for instant texture picker opening

Fetch and parse .tex files in the background when a textured part
loads, and pass the results to TexturePickerModal as a prop. The
modal no longer fetches on mount, eliminating the loading delay.

* Cleanup: parallel fetching, error recovery, dead code removal

- Fetch .tex files in parallel with Promise.all instead of sequentially
- Clear cached IndexedDB promise on rejection so subsequent calls retry
- Remove unused textureOrder array from Act1State parser
- Unify selectDefault/applyCustom into single applyTexture function
- Remove redundant squareTexture call on already-squared wdbTexture

* Add vehicle texture editor to February 2026 changelog

* Fix mouseenter error on non-Element targets
2026-02-07 23:34:57 +01:00

10 lines
250 B
JavaScript

module.exports = {
globDirectory: 'dist/',
globPatterns: [
'**/*.{js,css,html,webp,wasm,pdf,mp3,gif,png,svg,json,tex}'
],
swSrc: 'src-sw/sw.js',
swDest: 'dist/sw.js',
maximumFileSizeToCacheInBytes: 4 * 1024 * 1024,
};