Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GeoVistoogsi
AR
Commits
0a0b8d22
Commit
0a0b8d22
authored
Jan 02, 2025
by
Percen
Browse files
Update public/index.html
parent
14feb8d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
public/index.html
View file @
0a0b8d22
...
...
@@ -189,6 +189,22 @@
console
.
log
(
`Modell ausgewählt:
${
selectedModel
}
`
);
updateMenu
();
}
async
function
loadAndUnpackZip
(
zipUrl
)
{
const
response
=
await
fetch
(
zipUrl
);
const
buffer
=
await
response
.
arrayBuffer
();
const
zip
=
await
JSZip
.
loadAsync
(
buffer
);
const
files
=
{};
for
(
const
filename
of
Object
.
keys
(
zip
.
files
))
{
if
(
!
zip
.
files
[
filename
].
dir
)
{
const
content
=
await
zip
.
files
[
filename
].
async
(
'
blob
'
);
files
[
filename
]
=
URL
.
createObjectURL
(
content
);
}
}
return
files
;
}
async
function
activateXR
()
{
const
canvas
=
document
.
createElement
(
'
canvas
'
);
...
...
@@ -211,7 +227,7 @@
status
.
textContent
=
"
Lade Modell aus ZIP-Datei...
"
;
try
{
const
zipUrl
=
'
./assets/models/
model
.zip
'
;
// Relativer Pfad zur ZIP-Datei
const
zipUrl
=
'
./assets/models/
city_trash_can
.zip
'
;
// Relativer Pfad zur ZIP-Datei
const
files
=
await
loadAndUnpackZip
(
zipUrl
);
const
gltfFile
=
Object
.
keys
(
files
).
find
((
filename
)
=>
filename
.
endsWith
(
'
.gltf
'
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment