src/scene/scene_loader.js
function flattenProperties (obj, prefix = null, globals = {}) {
    prefix = prefix ? (prefix + '.') : 'global.';

    for (const p in obj) {
        const key = prefix + p;
        const val = obj[p];
        globals[key] = val;

        if (typeof val === 'object' && !Array.isArray(val)) {
            flattenProperties(val, key, globals);
        }
    }
    return globals;
}
function flattenProperties (obj, prefix = null, globals = {}) {
    prefix = prefix ? (prefix + '.') : 'global.';

    for (const p in obj) {
        const key = prefix + p;
        const val = obj[p];
        globals[key] = val;

        if (typeof val === 'object' && !Array.isArray(val)) {
            flattenProperties(val, key, globals);
        }
    }
    return globals;
}
function flattenProperties ( obj , prefix = null , globals = { } ) { prefix = prefix ? ( prefix + '.' ) : 'global.' ; for ( const p in obj ) { const key = prefix + p ; const val = obj [ p ] ; globals [ key ] = val ; if ( typeof val === 'object' && ! Array . isArray ( val ) ) { flattenProperties ( val , key , globals ) ; } } return globals ; }
Flatten nested properties for simpler string look-ups
Flatten nested properties for simpler string look - ups