Assets path; some view defaults
This commit is contained in:
parent
04c51af8a8
commit
ae85cf281c
3
.gitignore
vendored
3
.gitignore
vendored
@ -3,5 +3,6 @@
|
||||
|
||||
# Models
|
||||
*.3dm
|
||||
*.gl{b,tf}
|
||||
*.gl*
|
||||
*.obj
|
||||
|
||||
|
||||
0
assets/.keep
Normal file
0
assets/.keep
Normal file
26
js/main.js
26
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",()=>{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user