Skip to content

Commit

Permalink
Reverse version list to get latest item first.
Browse files Browse the repository at this point in the history
  • Loading branch information
takavfx committed Apr 1, 2021
1 parent 1e9ac2c commit ce80529
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function preview (token, versions=[], envmap=0) {
EnvMap: Object.keys(envMaps)[envmap],
TimeScale: 1,
Exposure: 1,
Intensity: 2.5,
Intensity: 3,
Color: 0xffffff,
Axis: toBoolean(AxisState),
Grid: toBoolean(GridState),
Expand Down Expand Up @@ -208,7 +208,7 @@ function preview (token, versions=[], envmap=0) {
if (envMapName==='default') {
scene.background = new THREE.Color('#696969')
scene.environment = null
hemiLight.intensity = params.Intensity = ( hemiLight.intensity <= 1 ) ? 2.5 : params.Intensity
hemiLight.intensity = params.Intensity = ( hemiLight.intensity <= 1 ) ? 3 : params.Intensity
} else {
rgbeLoader.load(
envMaps[envMapName],
Expand Down Expand Up @@ -360,6 +360,7 @@ function preview (token, versions=[], envmap=0) {
console.error('Accessing to data resource is failed.')
console.error(err)
console.error('Please reload this page.')
info.innerHTML = 'Accessing to data resource is failed.<br/>Please reload this page.'
})
}

Expand Down Expand Up @@ -520,7 +521,7 @@ window.addEventListener('DOMContentLoaded', () => {
.then((version_res) => version_res.json())
.then((version_data) => {
// console.log(version_data['data'])
preview(at_data, version_data['data'], query['envmap'])
preview(at_data, version_data['data'].reverse(), query['envmap'])
})
})
})
Expand Down

0 comments on commit ce80529

Please sign in to comment.