function handleClothingItemPolaroidSlide(clothing,xOffset,yOffset,depth,cat){
            if (clothing != null) {
                
                utilities.scaleToPolaroidSize(clothing);
                clothing.setVisible(true);
                polaroid.add(clothing);
                clothing.x =  cat.x+xOffset;
                clothing.y = cat.y+yOffset;
                clothing.setDepth(depth);//it is function that's causing the crash. don't know why.
            }
        }
//Helper function to reduce code duplication
Helper function to reduce code duplication
Helper function to reduce code duplication
function handleClothingItemPolaroidSlide(clothing,xOffset,yOffset,depth,cat){
            if (clothing != null) {
                utilities.scaleToPolaroidSize(clothing);
                clothing.setVisible(true);
                polaroid.add(clothing);
                clothing.x =  cat.x+xOffset;
                clothing.y = cat.y+yOffset;
                clothing.setDepth(depth);
            }
        }
function handleClothingItemPolaroidSlide ( clothing , xOffset , yOffset , depth , cat ) { if ( clothing != null ) { utilities . scaleToPolaroidSize ( clothing ) ; clothing . setVisible ( true ) ; polaroid . add ( clothing ) ; clothing . x = cat . x + xOffset ; clothing . y = cat . y + yOffset ; clothing . setDepth ( depth ) ; } }
Helper function to reduce code duplication
Helper function to reduce code duplication
//it is function that's causing the crash. don't know why.