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