Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

GetBoneTexture()

Helper function to provide the final Texture that a bone will use, based on the provided tex name and styles.

function GetBoneTexture(boneTex: String, styles: Style[]): Texture {
    styles.forEach(style => {
        const tex: Texture = style.textures.find(tex => tex.name == boneTex);
        if(tex != undefined) {
            return tex;
        }
    });
    return undefined;
}