Skip to content

Commit

Permalink
small refinements
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixbf committed Aug 23, 2021
1 parent 2b508cd commit 6319c33
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 15 deletions.
6 changes: 3 additions & 3 deletions public/dist/ATON.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/dist/ATON.min.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions public/examples/pbr-basic-shadow/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
<script type="text/javascript" src="/vendors/vendors.min.js"></script>

<script type="text/javascript" src="/dist/THREE.bundle.js"></script>
<script type="text/javascript" src="/dist/ATON.min.js"></script>

<script type="module" src="/src/ATON.js"></script>
<script>
window.addEventListener( 'load', ()=>{

Expand Down
2 changes: 1 addition & 1 deletion public/hathor/hathor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1523,7 +1523,7 @@ HATHOR.popupEnvironment = ()=>{
ATON.VRoadcast.fireEvent("AFE_LightSwitch", false);
}

console.log(E);
//console.log(E);

ATON.toggleMainLight(b);
});
Expand Down
7 changes: 4 additions & 3 deletions public/src/ATON.js
Original file line number Diff line number Diff line change
Expand Up @@ -954,6 +954,7 @@ ATON._postAllReqsCompleted = (R)=>{
if (N && N.toggle){
ATON._postAllReqsCompleted(N);
N.toggle(N.visible);

//if (N.bPickable !== undefined) N.setPickable(N.bPickable);
}
}
Expand Down Expand Up @@ -1359,10 +1360,10 @@ ATON.adjustShadowsParamsFromSceneBounds = ()=>{

//ATON._dMainL.shadow.camera.updateProjectionMatrix();

let shb = -(r / 5000.0);
if (shb < -0.0005) shb = -0.0005;

let shb = -(r * 0.0002);
if (shb < -0.001) shb = -0.001; // -0.0005
ATON._dMainL.shadow.bias = shb;

//ATON._dMainL.shadow.normalBias = 0.05;
//ATON._dMainL.shadow.radius = 8;
};
Expand Down
4 changes: 3 additions & 1 deletion public/src/ATON.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,8 @@ load(url, onComplete){
ATON.Utils.ccExtract(data);

resolve(model);
console.log("Model "+url+" loaded");
//console.log("Model "+url+" loaded");
console.log("Model loaded");

/*if (N.type === ATON.NTYPES.SCENE)*/ ATON._assetReqComplete(url);

Expand All @@ -671,6 +672,7 @@ load(url, onComplete){
(err)=>{
//console.log(err);
//reject(model);
console.log("Error loading model");

/*if (N.type === ATON.NTYPES.SCENE)*/ ATON._assetReqComplete(url);
if (onComplete) onComplete();
Expand Down
9 changes: 5 additions & 4 deletions public/src/ATON.utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,13 +373,14 @@ Utils.loadTileSet = (tsurl, N)=>{
};

// Helper visitor routine
// Note: parentNode is not connected to model
Utils.modelVisitor = (parentNode, model)=>{
if (!model) return this;
// Note: N (parent node) is not yet connected to model
Utils.modelVisitor = (N, model)=>{
if (model===undefined) return this;
if (N===undefined) return this;

//model = Utils.mergeObject(model);

let N = parentNode;
//let N = parentNode;
let type = N.type; // Differentiate visit depending on node type

model.traverse( ( o ) => {
Expand Down

0 comments on commit 6319c33

Please sign in to comment.