Background = require('bnb_js/background');

function setBackgroundTexture(textureName) {
    const isValid = typeof textureName === "string" && textureName.trim().length > 0;
    const finalTexture = isValid ? textureName : "beach.jpg";

    Background.texture(finalTexture);
}