Better config defaults
This commit is contained in:
@@ -34,13 +34,14 @@ function init () {
|
||||
// All assets for this app are stored here
|
||||
ATON.setPathCollection('/a/scaenae/assets/');
|
||||
// Initial light direction
|
||||
ATON.setMainLightDirection(new THREE.Vector3(0.2,-0.3,-0.7));
|
||||
ATON.toggleShadows(true);
|
||||
ATON.setMainLightDirection(new THREE.Vector3(...config.scene.initLightDir));
|
||||
ATON.toggleShadows(config.scene.shadows);
|
||||
ATON.setExposure(config.scene.initialExposure);
|
||||
// Open settings side panel when clicking on settings btn
|
||||
|
||||
AppState.camera = ATON.Nav._camera;
|
||||
AppState.renderer = ATON._renderer;
|
||||
AppState.shadows = config.scene.shadows;
|
||||
|
||||
ATON.Nav.setUserControl(true);
|
||||
}
|
||||
@@ -57,7 +58,7 @@ export function openScene (marker, nodes) {
|
||||
|
||||
ATON.setMainPanorama(marker.pano);
|
||||
// TODO: hardcoded...
|
||||
AppState.initialRotation = new THREE.Vector3(0, 1.5, 0);
|
||||
AppState.initialRotation = new THREE.Vector3(...config.scene.initRotation);
|
||||
|
||||
ATON.setAutoLP(config.scene.autoLP);
|
||||
AppState.lightProbe = config.scene.autoLP;
|
||||
@@ -74,7 +75,7 @@ function loadNodes(nodes) {
|
||||
nodes.forEach(n => {
|
||||
let node = ATON.createSceneNode(n.label);
|
||||
node.load(n.model);
|
||||
node.setRotation(0, 1.5, 0);
|
||||
node.setRotation(...config.scene.initRotation);
|
||||
|
||||
// Apply any transparency before attaching to scene
|
||||
if (n.opacity !== undefined && n.opacity !== null) {
|
||||
|
||||
Reference in New Issue
Block a user