Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit adecc81

Browse files
jo-chemlaDesplandis
authored andcommitted
feat(example): 3dTilesLoader, parse url search-param query
1 parent 9817605 commit adecc81

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

examples/3dtiles_loader.html

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
const input_url = document.getElementById('url');
162162
if (!input_url) return;
163163

164-
uri.searchParams.set('copc', url);
164+
uri.searchParams.set('3dtiles', url);
165165
history.replaceState(null, null, `?${uri.searchParams.toString()}`);
166166

167167
input_url.value = url;
@@ -220,6 +220,15 @@
220220
window.loadSete = loadSete;
221221
window.loadLille = loadLille;
222222

223+
224+
function loadPassedModel() {
225+
const passedUrl = uri.searchParams.get('3dtiles');
226+
if (passedUrl) {
227+
setUrl(passedUrl);
228+
}
229+
}
230+
loadPassedModel();
231+
223232
</script>
224233
</body>
225234
</html>

0 commit comments

Comments
 (0)