refactor(app-frontend): followup to PR #3999 (#4008)

This commit is contained in:
Alejandro González 2025-07-17 02:07:18 +02:00 committed by GitHub
parent 44267619b6
commit 56c556821b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -67,9 +67,8 @@ export async function determineModelType(texture: string): Promise<'SLIM' | 'CLA
const armWidth = 2
const armHeight = 12
const imageData = context.getImageData(armX, armY, armWidth, armHeight).data
for (let index = 1; index <= imageData.length; index++) {
//every fourth value in RGBA is the alpha channel
if (index % 4 == 0 && imageData[index - 1] !== 0) {
for (let alphaIndex = 3; alphaIndex < imageData.length; alphaIndex += 4) {
if (imageData[alphaIndex] !== 0) {
resolve('CLASSIC')
return
}