Skip to content

Commit

Permalink
Fix parse glTF texture wrap & filterMode bug (#1659)
Browse files Browse the repository at this point in the history
* fix: texture wrap and filterMode bug
  • Loading branch information
meiya163254 authored Jul 24, 2023
1 parent e34cb6a commit cf49f88
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/loader/src/gltf/parser/GLTFTextureParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,15 @@ export class GLTFTextureParser extends GLTFParser {
private _parseSampler(texture: Texture2D, samplerInfo: ISamplerInfo): void {
const { filterMode, wrapModeU, wrapModeV } = samplerInfo;

if (filterMode) {
if (filterMode !== undefined) {
texture.filterMode = filterMode;
}

if (wrapModeU) {
if (wrapModeU !== undefined) {
texture.wrapModeU = wrapModeU;
}

if (wrapModeV) {
if (wrapModeV !== undefined) {
texture.wrapModeV = wrapModeV;
}
}
Expand Down

0 comments on commit cf49f88

Please sign in to comment.