gputex 0.3.3 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/three.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { TextureHint, PreferredFormat, SvgRasterSize, EncodeQuality, TextureFormat, Encoder, EncoderImageSource } from './index.js';
1
+ import { TextureHint, PreferredFormat, SvgRasterSize, TextureFormat, Encoder, EncoderImageSource } from './index.js';
2
2
  export { ASTC4x4Encoder, ASTC4x4WebGLEncoder, BC1Encoder, BC1WebGLEncoder, BC5Encoder, BC5WebGLEncoder, BC7Encoder, BC7WebGLEncoder, Capabilities, EncodeBytesResult, EncodeCallOptions, EncoderConstructor, EncoderOptions, ExtensionProvider, FeatureProvider, FormatSelection, FormatVariant, MipLevel, RasterizeSvgOptions, RawPixelSource, SelectFormatOptions, WebGLBlockEncoder, WebGLCapabilities, WebGLEncodeBytesResult, WebGLEncoderConstructor, WebGLEncoderImageSource, WebGLEncoderOptions, WebGLFormatSelection, WebGPUFeature, createWebGLContext, detectCapabilities, detectWebGLCapabilities, generateMipChain, getSharedWebGLContext, isWebGLAvailable, padToBlockMultiple, rasterizeSvg, selectFormat, selectWebGLFormat } from './index.js';
3
3
  import { Texture, CompressedTexture, Loader, CompressedPixelFormat } from 'three';
4
4
 
@@ -38,14 +38,6 @@ interface CompressOptions {
38
38
  flipY?: boolean;
39
39
  /** Generate a full mip chain down to 1×1 on the CPU, encode every level. */
40
40
  mipmaps?: boolean;
41
- /**
42
- * Encode quality / speed trade-off. 'fast' (default) is ~2–4× faster for a
43
- * ≤0.36 dB PSNR cost; 'high' runs the exhaustive search (output identical to
44
- * the CPU reference encoders; for BC1, a principal-axis seed + iterative
45
- * refit). No effect on the WebGL fallback (which always uses the fast
46
- * encoders).
47
- */
48
- quality?: EncodeQuality;
49
41
  /** Reuse an existing device (e.g. Three.js's renderer device) instead
50
42
  * of creating a new one. WebGPU path only. When provided, the encoder
51
43
  * never destroys it. */
@@ -102,8 +94,6 @@ declare class GputexLoader extends Loader<Texture> {
102
94
  flipY: boolean;
103
95
  /** Generate + encode a full mip chain. Default false. */
104
96
  mipmaps: boolean;
105
- /** Encode quality / speed trade-off. Default 'fast' (~2–4× faster, ≤0.36 dB). */
106
- quality: EncodeQuality;
107
97
  /**
108
98
  * Optional pre-existing WebGPU device. Reusing the renderer's device
109
99
  * avoids spinning up a second WebGPU context for encoding.
@@ -158,8 +148,6 @@ interface EncodeResult {
158
148
  interface EncodeToTextureOptions {
159
149
  /** Pick the sRGB or linear variant of the encoder's format. Default 'srgb'. */
160
150
  colorSpace?: 'srgb' | 'linear';
161
- /** Encode quality / speed trade-off. Default 'fast'. */
162
- quality?: EncodeQuality;
163
151
  /** Flip the image vertically before encoding. Default false. */
164
152
  flipY?: boolean;
165
153
  }
@@ -169,6 +157,6 @@ interface EncodeToTextureOptions {
169
157
  * `encoder.encodeToBytes()` + `buildCompressedTexture()` for callers that want
170
158
  * a ready-to-use Three.js texture from one call.
171
159
  */
172
- declare function encodeToTexture(encoder: Encoder, source: EncoderImageSource, { colorSpace, quality, flipY }?: EncodeToTextureOptions): Promise<EncodeResult>;
160
+ declare function encodeToTexture(encoder: Encoder, source: EncoderImageSource, { colorSpace, flipY }?: EncodeToTextureOptions): Promise<EncodeResult>;
173
161
 
174
- export { type CompressOptions, type CompressResult, type CompressTextureSource, EncodeQuality, type EncodeResult, type EncodeToTextureOptions, Encoder, EncoderImageSource, GputexLoader, PreferredFormat, SvgRasterSize, TextureFormat, TextureHint, buildCompressedTexture, compressTexture, encodeToTexture, threeFormatFor };
162
+ export { type CompressOptions, type CompressResult, type CompressTextureSource, type EncodeResult, type EncodeToTextureOptions, Encoder, EncoderImageSource, GputexLoader, PreferredFormat, SvgRasterSize, TextureFormat, TextureHint, buildCompressedTexture, compressTexture, encodeToTexture, threeFormatFor };