@gltf-transform/functions
Advanced tools
Comparing version 4.0.0-alpha.9 to 4.0.0-alpha.10
{ | ||
"name": "@gltf-transform/functions", | ||
"version": "4.0.0-alpha.9", | ||
"version": "4.0.0-alpha.10", | ||
"repository": "github:donmccurdy/glTF-Transform", | ||
@@ -38,4 +38,4 @@ "homepage": "https://gltf-transform.dev/functions.html", | ||
"dependencies": { | ||
"@gltf-transform/core": "^4.0.0-alpha.9", | ||
"@gltf-transform/extensions": "^4.0.0-alpha.9", | ||
"@gltf-transform/core": "^4.0.0-alpha.10", | ||
"@gltf-transform/extensions": "^4.0.0-alpha.10", | ||
"ktx-parse": "^0.6.0", | ||
@@ -56,3 +56,3 @@ "ndarray": "^1.0.19", | ||
}, | ||
"gitHead": "934f1fa4fa5b92a5d851198004e0253bcaa7b71f" | ||
"gitHead": "759bfd7276f9cdee5cacbe3b53aba96f7ed415ea" | ||
} |
@@ -1,2 +0,11 @@ | ||
import { BufferUtils, Document, ImageUtils, Texture, TextureChannel, Transform, vec2 } from '@gltf-transform/core'; | ||
import { | ||
BufferUtils, | ||
Document, | ||
FileUtils, | ||
ImageUtils, | ||
Texture, | ||
TextureChannel, | ||
Transform, | ||
vec2, | ||
} from '@gltf-transform/core'; | ||
import { EXTTextureAVIF, EXTTextureWebP } from '@gltf-transform/extensions'; | ||
@@ -246,2 +255,3 @@ import { getTextureChannelMask } from './list-texture-channels.js'; | ||
const srcURI = texture.getURI(); | ||
const srcFormat = getFormat(texture); | ||
@@ -268,3 +278,3 @@ const dstFormat = options.targetFormat || srcFormat; | ||
// Overwrite, then update path and MIME type if src/dst formats differ. | ||
const srcExtension = ImageUtils.mimeTypeToExtension(srcMimeType); | ||
const srcExtension = srcURI ? FileUtils.extension(srcURI) : ImageUtils.mimeTypeToExtension(srcMimeType); | ||
const dstExtension = ImageUtils.mimeTypeToExtension(dstMimeType); | ||
@@ -271,0 +281,0 @@ const dstURI = texture.getURI().replace(new RegExp(`\\.${srcExtension}$`), `.${dstExtension}`); |
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 too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2192382
25843