Skip to content

Commit

Permalink
Example tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
xeolabs committed Oct 22, 2019
1 parent 1903e65 commit 45c04c7
Showing 1 changed file with 4 additions and 32 deletions.
36 changes: 4 additions & 32 deletions examples/storeyViews_StoreyViewsPlugin_recipe2.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

#myNavCubeCanvas {
position: absolute;
width: 250px;
height: 250px;
width: 300px;
height: 300px;
bottom: 50px;
right: 10px;
z-index: 200000;
Expand Down Expand Up @@ -63,7 +63,6 @@ <h1>StoreyViewsPlugin UX Recipe #2</h1>
<p>Click anywhere in the 2D plan to go there in <b>first-person mode</b> in the 3D view.</p>
<p>Click empty space in the 2D plan to return to ortho view.</p>


<div id="storeyMap"></div>

<ul>
Expand Down Expand Up @@ -176,7 +175,7 @@ <h1>StoreyViewsPlugin UX Recipe #2</h1>

const storeyMap = storeyViewsPlugin.createStoreyMap("2SWZMQPyD9pfT9q87pgXa1", {
format: "png",
width: 500,
width: 380,
useObjectStates: true
});

Expand All @@ -201,6 +200,7 @@ <h1>StoreyViewsPlugin UX Recipe #2</h1>
pointer.style.cursor = "none";
pointer.style["pointer-events"] = "none";
pointer.style.transform = "rotate(0deg)";
pointer.style.visibility = "hidden";
document.body.appendChild(pointer);

const canStandOnTypes = {
Expand Down Expand Up @@ -324,7 +324,6 @@ <h1>StoreyViewsPlugin UX Recipe #2</h1>

function showPointer(imagePos, imageDir) {


const angleRad = Math.atan2(imageDir[0], imageDir[1]);
const angleDeg = Math.floor(180 * angleRad / Math.PI);

Expand All @@ -335,32 +334,5 @@ <h1>StoreyViewsPlugin UX Recipe #2</h1>
}
});

//------------------------------------------------------------------------------------------------------------------
// Mouse over entities to highlight them
//------------------------------------------------------------------------------------------------------------------

// var lastEntity = null;
// viewer.scene.input.on("mousemove", function (coords) {
// var hit = viewer.scene.pick({
// canvasPos: coords
// });
// if (hit) {
// if (!lastEntity || hit.entity.id !== lastEntity.id) {
// if (lastEntity) {
// lastEntity.highlighted = false;
// }
// lastEntity = hit.entity;
// hit.entity.highlighted = true;
// }
// } else {
// if (lastEntity) {
// lastEntity.highlighted = false;
// lastEntity = null;
// }
// }
// });

window.viewer = viewer;

</script>
</html>

0 comments on commit 45c04c7

Please sign in to comment.