@gltf-transform/functions
Advanced tools
Comparing version 3.4.3 to 3.4.4
{ | ||
"name": "@gltf-transform/functions", | ||
"version": "3.4.3", | ||
"version": "3.4.4", | ||
"repository": "github:donmccurdy/glTF-Transform", | ||
@@ -38,4 +38,4 @@ "homepage": "https://gltf-transform.dev/functions.html", | ||
"dependencies": { | ||
"@gltf-transform/core": "^3.4.3", | ||
"@gltf-transform/extensions": "^3.4.3", | ||
"@gltf-transform/core": "^3.4.4", | ||
"@gltf-transform/extensions": "^3.4.4", | ||
"ktx-parse": "^0.5.0", | ||
@@ -56,3 +56,3 @@ "ndarray": "^1.0.19", | ||
}, | ||
"gitHead": "701a51849636e2cf9c2d10e0f3faf13b4a808352" | ||
"gitHead": "fc58f3a615c0fdf3d2540f1b432c1dffe8f0fcf8" | ||
} |
@@ -60,10 +60,17 @@ import { ExtensionProperty, Material, Property, Texture, TextureInfo } from '@gltf-transform/core'; | ||
function traverse(prop: Material | ExtensionProperty) { | ||
for (const child of graph.listChildren(prop)) { | ||
const textureInfoNames = new Set<string>(); | ||
for (const edge of graph.listChildEdges(prop)) { | ||
if (edge.getChild() instanceof Texture) { | ||
textureInfoNames.add(edge.getName() + 'Info'); | ||
} | ||
} | ||
for (const edge of graph.listChildEdges(prop)) { | ||
const child = edge.getChild(); | ||
if (visited.has(child)) continue; | ||
visited.add(child); | ||
if (child instanceof Texture) { | ||
for (const textureInfo of listTextureInfo(child)) { | ||
results.add(textureInfo); | ||
} | ||
if (child instanceof TextureInfo && textureInfoNames.has(edge.getName())) { | ||
results.add(child); | ||
} else if (child instanceof ExtensionProperty) { | ||
@@ -70,0 +77,0 @@ traverse(child); |
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
1347144
7354