Skip to content

Commit

Permalink
Example tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Sep 21, 2023
1 parent 38ff9d4 commit 4b45f8e
Show file tree
Hide file tree
Showing 11 changed files with 60 additions and 14 deletions.
4 changes: 4 additions & 0 deletions examples/buildings/xkt_dtx_IfcOpenHouse4.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ <h3>Resources</h3>
viewer.scene.camera.look = [6.599999999999998, 8.34099990051474, -4.159999575600315];
viewer.scene.camera.up = [-0.2820584034861215, 0.9025563895259413, -0.3253229483893775];

viewer.cameraControl.enablePivotSphere({
size: 1
});

new NavCubePlugin(viewer, {
canvasId: "myNavCubeCanvas",
visible: true,
Expand Down
4 changes: 4 additions & 0 deletions examples/buildings/xkt_dtx_MAP.html
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,10 @@ <h3>Resources</h3>
viewer.scene.camera.look=[1842009.4968455553, 9.685518291306686, -5173295.851503017];
viewer.scene.camera.up=[0.011650847910481935, 0.9999241456889114, -0.003995073374452514];

viewer.cameraControl.enablePivotSphere({
size: 1
});

new NavCubePlugin(viewer, {
canvasId: "myNavCubeCanvas",
visible: true,
Expand Down
4 changes: 4 additions & 0 deletions examples/buildings/xkt_vbo_DemoProjekt.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ <h3>Resources</h3>
saoEnabled: true
});

viewer.cameraControl.enablePivotSphere({
size: 1
});

viewer.camera.eye = [102.07185264355974, 45.23873322531372, -54.1001537318987]
viewer.camera.look = [35.0291287591034, -3.5295781673428905, -20.312957533628705]
viewer.camera.up = [-0.48646319926706455, 0.8385999559445908, 0.24516049773277654]
Expand Down
4 changes: 4 additions & 0 deletions examples/buildings/xkt_vbo_HolterTower.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ <h3>Resources</h3>
viewer.scene.camera.look = [6.599999999999998, 8.34099990051474, -4.159999575600315];
viewer.scene.camera.up = [-0.2820584034861215, 0.9025563895259413, -0.3253229483893775];

viewer.cameraControl.enablePivotSphere({
size: 1
});

new NavCubePlugin(viewer, {
canvasId: "myNavCubeCanvas",
visible: true,
Expand Down
4 changes: 4 additions & 0 deletions examples/buildings/xkt_vbo_IfcOpenHouse4.html
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ <h3>Resources</h3>
edges: true
});

viewer.cameraControl.enablePivotSphere({
size: 1
});

viewer.scene.camera.eye = [14.915582703146043, 14.396781491179095, 5.431098754133695];
viewer.scene.camera.look = [6.599999999999998, 8.34099990051474, -4.159999575600315];
viewer.scene.camera.up = [-0.2820584034861215, 0.9025563895259413, -0.3253229483893775];
Expand Down
6 changes: 6 additions & 0 deletions examples/buildings/xkt_vbo_OTCCenferenceCenter.html
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@ <h3>Resources</h3>
objectDefaults: {
"IfcPlate": {
opacity: 0.3 // These are used as windows in this model - make transparent
},
"IfcWindow": {
opacity: 0.4
},
"IfcSpace": {
opacity: 0.4
}
}
});
Expand Down
6 changes: 1 addition & 5 deletions examples/cities/XKT_Lyon.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ <h3>Resources</h3>

const viewer = new Viewer({
canvasId: "myCanvas",
transparent: true,
logarithmicDepthBufferEnabled: false // <<--- Enable logarithmic depth buffer
transparent: true
});

//------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -132,9 +131,6 @@ <h3>Resources</h3>
// Show a dot about the pivot point, whenever we orbit the Camera
//------------------------------------------------------------------------------------------------------------------

viewer.cameraControl.followPointer = true;
viewer.cameraControl.smartPivot = true;

const pivotElement = document.createRange().createContextualFragment("<div class='xeokit-camera-pivot-marker'></div>").firstChild;
document.body.appendChild(pivotElement);
viewer.cameraControl.pivotElement = pivotElement;
Expand Down
4 changes: 4 additions & 0 deletions examples/cities/XKT_dtx_Lyon.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ <h3>Resources</h3>
transparent: true
});

viewer.cameraControl.enablePivotSphere({
size: 1
});

// Enable data texture model representation for
// all subsequently created SceneModels (unless they override it to be disabled)

Expand Down
4 changes: 4 additions & 0 deletions examples/lidar/xkt_MAP.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ <h3>Resources</h3>
transparent: true
});

viewer.cameraControl.enablePivotSphere({
size: 1
});

new NavCubePlugin(viewer, {
canvasId: "myNavCubeCanvas",
visible: true,
Expand Down
16 changes: 13 additions & 3 deletions examples/navigation/camera_CameraPathAnimation.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,7 @@ <h3>Resources</h3>

const viewer = new Viewer({
canvasId: "myCanvas",
transparent: true,
dtxEnabled: true
transparent: true
});

viewer.camera.eye = [10.449999809265137, 17.3799991607666, -98.30999755859375];
Expand Down Expand Up @@ -114,7 +113,18 @@ <h3>Resources</h3>
const sceneModel = xktLoader.load({
id: "myModel",
src: "../../assets/models/xkt/v8/ifc/OTCConferenceCenter.ifc.xkt",
edges: false
edges: false,
objectDefaults: {
"IfcPlate": {
opacity: 0.3 // These are used as windows in this model - make transparent
},
"IfcWindow": {
opacity: 0.4
},
"IfcSpace": {
opacity: 0.4
}
}
});

// new Skybox(viewer.scene, {
Expand Down
18 changes: 12 additions & 6 deletions examples/navigation/camera_CameraPathAnimation_dataTextures.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ <h3>Resources</h3>

const viewer = new Viewer({
canvasId: "myCanvas",
transparent: true
transparent: true,
dtsEnabled: true
});

viewer.scene.sao.enabled = true; // Higher-quality SAO settings
Expand Down Expand Up @@ -119,11 +120,16 @@ <h3>Resources</h3>
src: "../../assets/models/xkt/v8/ifc/OTCConferenceCenter.ifc.xkt",
edges: true,
enableSAO: true,
useDataTextures: {
enableViewFrustumCulling: true,
targetLodFps: 50,
disableVertexWelding: true,
disableIndexRebucketing: true
objectDefaults: {
"IfcPlate": {
opacity: 0.3 // These are used as windows in this model - make transparent
},
"IfcWindow": {
opacity: 0.4
},
"IfcSpace": {
opacity: 0.4
}
}
});

Expand Down

0 comments on commit 4b45f8e

Please sign in to comment.