function toggleTexture(setMaterial)
{
    const textureOn = document.querySelector("#textureCheckbox").checked;
    const id = document.querySelector("input[name=materialRBGroup]:checked");

    if (!textureOn)
        setMaterial(id.value);
    else
        setMaterial(id.value + "-textured");
}
/**
 * The event of the checkbox group, and loads the given function
 * @param {function} setMaterial The function that sets the material of the mesh based on a name from the web page
 */
The event of the checkbox group, and loads the given function
@param {function} setMaterial The function that sets the material of the mesh based on a name from the web page
The event of the checkbox group and loads the given function @param { function } setMaterial The function that sets the material of the mesh based on a name from the web page
function toggleTexture(setMaterial)
{
    const textureOn = document.querySelector("#textureCheckbox").checked;
    const id = document.querySelector("input[name=materialRBGroup]:checked");
    if (!textureOn)
        setMaterial(id.value);
    else
        setMaterial(id.value + "-textured");
}
function toggleTexture ( setMaterial ) { const textureOn = document . querySelector ( "#textureCheckbox" ) . checked ; const id = document . querySelector ( "input[name=materialRBGroup]:checked" ) ; if ( ! textureOn ) setMaterial ( id . value ) ; else setMaterial ( id . value + "-textured" ) ; }
The event of the checkbox group, and loads the given function
 @param {function} setMaterial The function that sets the material of the mesh based on a name from the web page
The event of the checkbox group and loads the given function @param { function } setMaterial The function that sets the material of the mesh based on a name from the web page