Skip to content

Commit

Permalink
feat(Texture): add equals() method
Browse files Browse the repository at this point in the history
  • Loading branch information
meszaros-lajos-gyorgy committed Sep 13, 2023
1 parent 4625357 commit e17da3c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Texture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,12 @@ export class Texture extends ThreeJsTextue {
}
}

equals(texture: Texture) {
const { name: aFilename } = path.parse(this.filename.toLowerCase())
const { name: bFilename } = path.parse(texture.filename.toLowerCase())
return aFilename === bFilename
}

// ----------------

static get alpha() {
Expand Down

0 comments on commit e17da3c

Please sign in to comment.