/* Main js entry for template ATON web-app ===============================================*/ // Realize our app let APP = ATON.App.realize(); const material = { color: "#e6f2ff", emissive: true, }; function showEdges (object) { if (object.isMesh) { let edges = new THREE.EdgesGeometry(child.geometry, 45); let line = new THREE.LineSegments(edges, edgeMaterial); child.add(line); } } // You can require here flares (plugins) if needed by the app //APP.requireFlares(["myFlare","anotherFlare"]); // APP.setup() is required for web-app initialization // You can place here UI setup (HTML), events handling, etc. APP.setup = ()=>{ // Realize base ATON and add base UI events ATON.realize(); ATON.UI.addBasicEvents(); // 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("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(); 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",()=>{ // Do stuff console.log("All flares ready"); }); }; /* If you plan to use an update routine (executed continuously), you can place its logic here. APP.update = ()=>{ }; */