99 lines
3.6 KiB
HTML
99 lines
3.6 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>Speckle Viewer</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" />
|
|
<link
|
|
href="https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,700&display=swap"
|
|
rel="stylesheet"
|
|
/>
|
|
<link
|
|
href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css"
|
|
rel="stylesheet"
|
|
/>
|
|
<link
|
|
rel="stylesheet"
|
|
href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.min.css"
|
|
integrity="sha512-EZLkOqwILORob+p0BXZc+Vm3RgJBOe1Iq/0fiI7r/wJgzOFZMlsqTa29UEl6v6U6gsV4uIpsNZoV32YZqrCRCQ=="
|
|
crossorigin="anonymous"
|
|
/>
|
|
<style type="text/css">
|
|
#renderer {
|
|
height: 700px;
|
|
width: 100%;
|
|
}
|
|
</style>
|
|
<script defer src="demo.js"></script>
|
|
</head>
|
|
|
|
<body style="background: #e4e4e4">
|
|
<div class="container">
|
|
<div class="row" style="padding-top: 20px">
|
|
<div class="twelve columns">
|
|
<h3>Viewer</h3>
|
|
<h5>Controls summary:</h5>
|
|
<p class="text-sm">
|
|
Click an object to select it. Double click it to focus on it. Press `esc` to
|
|
clear the selection. Press `shift-s` to toggle a section plane. Press `s`
|
|
while the section plane is active to toggle its control mode. Double click
|
|
anywhere outside an object to zoom extents to the entire scene.
|
|
</p>
|
|
</div>
|
|
<div class="twelve columns">
|
|
<button onclick="v.postprocessing = !v.postprocessing">
|
|
Postprocessing Toggle
|
|
</button>
|
|
<button onclick="v.interactions.zoomExtents()">Zoom Extents</button>
|
|
<button onclick="v.toggleSectionBox()">Toggle Section Box</button>
|
|
<button onclick="v.interactions.rotateCamera(undefined, undefined, false)">
|
|
Rotate
|
|
</button>
|
|
<button onclick="viewerScreenshot()">Screenshot</button>
|
|
</div>
|
|
<div class="twelve columns">
|
|
<input
|
|
id="objectUrlInput"
|
|
type="text"
|
|
name="objectId"
|
|
placeholder="Object Url"
|
|
style="width: 49%"
|
|
value="https://latest.speckle.dev/streams/010b3af4c3/objects/a401baf38fe5809d0eb9d3c902a36e8f"
|
|
/>
|
|
<button class="" onclick="loadData()" style="width: 49%">
|
|
Load Object URL
|
|
</button>
|
|
</div>
|
|
<div class="twelve columns">
|
|
<button onclick="v.unloadAll()">Dispose Everything</button>
|
|
View:
|
|
<button onclick="v.toggleCameraProjection()">Ortho/Perspective</button>
|
|
<button onclick="v.interactions.rotateTo()">3D</button>
|
|
<button onclick="v.interactions.rotateTo('top')">Top</button>
|
|
<button onclick="v.interactions.rotateTo('front')">Front</button>
|
|
<button onclick="v.interactions.rotateTo('back')">Back</button>
|
|
<button onclick="v.interactions.rotateTo('left')">Left</button>
|
|
<button onclick="v.interactions.rotateTo('right')">Right</button>
|
|
</div>
|
|
|
|
<div class="twelve columns">
|
|
Used Memory (MB):
|
|
<span id="info-mem">-</span>
|
|
/ LoadProgress:
|
|
<span id="info-progress">-</span>
|
|
/ ViewerBusy:
|
|
<span id="info-busy">idle</span>
|
|
/ Draw Calls:
|
|
<span id="info-draws">-</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="twelve columns">
|
|
<div id="renderer"></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|