Socket
Socket
Sign inDemoInstall

@pixi/compressed-textures

Package Overview
Dependencies
33
Maintainers
2
Versions
85
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.4.0 to 7.4.2

10

lib/loaders/detectCompressedTextures.js

@@ -6,11 +6,11 @@ "use strict";

extensions = {
bptc: storedGl.getExtension("EXT_texture_compression_bptc"),
astc: storedGl.getExtension("WEBGL_compressed_texture_astc"),
etc: storedGl.getExtension("WEBGL_compressed_texture_etc"),
s3tc: storedGl.getExtension("WEBGL_compressed_texture_s3tc"),
s3tc_sRGB: storedGl.getExtension("WEBGL_compressed_texture_s3tc_srgb"),
/* eslint-disable-line camelcase */
etc: storedGl.getExtension("WEBGL_compressed_texture_etc"),
pvrtc: storedGl.getExtension("WEBGL_compressed_texture_pvrtc") || storedGl.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),
etc1: storedGl.getExtension("WEBGL_compressed_texture_etc1"),
pvrtc: storedGl.getExtension("WEBGL_compressed_texture_pvrtc") || storedGl.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),
atc: storedGl.getExtension("WEBGL_compressed_texture_atc"),
astc: storedGl.getExtension("WEBGL_compressed_texture_astc"),
bptc: storedGl.getExtension("EXT_texture_compression_bptc")
atc: storedGl.getExtension("WEBGL_compressed_texture_atc")
};

@@ -17,0 +17,0 @@ }

"use strict";
var core = require("@pixi/core");
const resolveCompressedTextureUrl = {
const knownFormats = ["s3tc", "s3tc_sRGB", "etc", "etc1", "pvrtc", "atc", "astc", "bptc"], resolveCompressedTextureUrl = {
extension: core.ExtensionType.ResolveParser,

@@ -10,18 +10,9 @@ test: (value) => {

parse: (value) => {
const extension = core.utils.path.extname(value).slice(1);
if (extension === "ktx") {
const extensions2 = [
".s3tc.ktx",
".s3tc_sRGB.ktx",
".etc.ktx",
".etc1.ktx",
".pvrt.ktx",
".atc.ktx",
".astc.ktx",
".bptc.ktx"
];
if (extensions2.some((ext) => value.endsWith(ext)))
const parts = value.split("."), extension = parts.pop();
if (["ktx", "dds"].includes(extension)) {
const textureFormat = parts.pop();
if (knownFormats.includes(textureFormat))
return {
resolution: parseFloat(core.settings.RETINA_PREFIX.exec(value)?.[1] ?? "1"),
format: extensions2.find((ext) => value.endsWith(ext)),
format: textureFormat,
src: value

@@ -28,0 +19,0 @@ };

@@ -36,3 +36,3 @@ import { BlobResource } from './BlobResource';

*
* **.dds** - the DirectDraw Surface file format stores DXTn (DXT-1,3,5) data. See {@link PIXI.parseDDS}
* **.dds** - the DirectDraw Surface file format stores DXTn (DXT-1,3,5) data or BCn (BC6H, BC7). See {@link PIXI.parseDDS}
* **.ktx** - the Khronos Texture Container file format supports storing all the supported WebGL compression formats.

@@ -39,0 +39,0 @@ * See {@link PIXI.parseKTX}.

{
"name": "@pixi/compressed-textures",
"version": "7.4.0",
"version": "7.4.2",
"description": "Loaders for compressed texture file formats",

@@ -50,5 +50,5 @@ "keywords": [

"peerDependencies": {
"@pixi/assets": "7.4.0",
"@pixi/core": "7.4.0"
"@pixi/assets": "7.4.2",
"@pixi/core": "7.4.2"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc