diff --git a/.gitignore b/.gitignore index ac8e2be..256c14c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,5 +3,6 @@ # Models *.3dm -*.gl{b,tf} +*.gl* *.obj + diff --git a/assets/.keep b/assets/.keep new file mode 100644 index 0000000..e69de29 diff --git a/js/main.js b/js/main.js index fe6e679..02adf74 100644 --- a/js/main.js +++ b/js/main.js @@ -5,12 +5,9 @@ // Realize our app let APP = ATON.App.realize(); -const materialProperties = { - color: "#8993a4", - //transparent: true, - //opacity: 0.8, - flatShading: false, - //wireframe: true, +const material = { + color: "#e6f2ff", + emissive: true, }; function showEdges (object) { @@ -31,19 +28,22 @@ APP.setup = ()=>{ // Realize base ATON and add base UI events ATON.realize(); ATON.UI.addBasicEvents(); - - let lightProbe = new ATON.LightProbe(); - lightProbe.setPosition(2, 6, 2); + // All assets for this app are stored here + ATON.setPathCollection('./assets/'); + ATON.setMainLightDirection(new THREE.Vector3(0.2,-0.3,-0.7)); // Load 3D model - let mainNode = ATON.createSceneNode("teatro").load("nicolo/models/teatro_san_salvador.glb"); - mainNode.setMaterial(new THREE.MeshPhongMaterial(materialProperties)); + let mainNode = ATON.createSceneNode("teatro").load("teatro_san_salvador_20250926.gltf"); + const pano = "defsky-grass.jpg"; + ATON.setMainPanorama(pano); + mainNode.setMaterial(new THREE.MeshPhongMaterial(material)); + mainNode.setRotation(0, 1.5, 0) //showEdges(mainNode.children[0]); mainNode.attachToRoot(); - lightProbe.update(); - //ATON.addLightProbe(lightProbe); + ATON.toggleShadows(true); + ATON.setExposure(1.3); // If our app required ore or more flares (plugins), we can also wait for them to be ready for specific setups ATON.on("AllFlaresReady",()=>{