Assets path; some view defaults

This commit is contained in:
Nicolò P 2025-09-29 18:45:17 +02:00
parent 04c51af8a8
commit ae85cf281c
3 changed files with 15 additions and 14 deletions

3
.gitignore vendored
View File

@ -3,5 +3,6 @@
# Models
*.3dm
*.gl{b,tf}
*.gl*
*.obj

0
assets/.keep Normal file
View File

View File

@ -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",()=>{