Skip to content

Commit

Permalink
add model test file
Browse files Browse the repository at this point in the history
  • Loading branch information
cabanier committed Apr 1, 2024
1 parent a778b83 commit b604ef4
Show file tree
Hide file tree
Showing 8 changed files with 261 additions and 0 deletions.
Binary file added assets/FlightHelmet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/FlightHelmet.usdz
Binary file not shown.
Binary file added assets/cube.usdz
Binary file not shown.
57 changes: 57 additions & 0 deletions model-1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Example HTMLModelElement</title>
<style>
html,
body {
display: grid;
grid-template-columns: 1fr;
gap: 1rem;
place-items: center;
overflow: hidden;
height: 100%;
margin: 0;
padding: 0;
width: 95%;
max-width: 90vw;
max-height: 90vh;
}

model,
picture,
img {
width: 100%;
height: auto;
display: grid;
place-items: center;
max-height: 90vh;
}

img {
object-fit: contain;
}

@media (orientation: landscape) {
body {
grid-template-columns: 1fr 2fr;
}
}
</style>
</head>

<body>
<h1>An example <code>model</code> Element</h1>
<model interactive width="670" height="1191" poster="assets/FlightHelmet.png">
<source src="assets/FlightHelmet.usdz" type="model/vnd.usdz+zip" />
<!--
<source src="assets/FlightHelmet.glb" type="model/gltf-binary" />
<picture>
<img src="assets/FlightHelmet.png" width="670" height="1191" />
</picture>
-->
</model>
</body>
</html>
54 changes: 54 additions & 0 deletions model-2.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Example HTMLModelElement</title>
<style>
html,
body {
display: grid;
grid-template-columns: 1fr;
gap: 1rem;
place-items: center;
overflow: hidden;
height: 100%;
margin: 0;
padding: 0;
width: 95%;
max-width: 90vw;
max-height: 90vh;
}

model,
picture,
img {
width: 100%;
height: auto;
display: grid;
place-items: center;
max-height: 90vh;
}

img {
object-fit: contain;
}

@media (orientation: landscape) {
body {
grid-template-columns: 1fr 2fr;
}
}
</style>
</head>

<body>
<h1>An example <code>model</code> Element</h1>
<model interactive width="670" height="1191">
<source src="assets/FlightHelmet.usdz" type="model/vnd.usdz+zip" />
<picture>
<img src="assets/FlightHelmet.png" width="670" height="1191" />
</picture>
</model>
</body>
</html>
50 changes: 50 additions & 0 deletions model-3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Example HTMLModelElement</title>
<style>
html,
body {
display: grid;
grid-template-columns: 1fr;
gap: 1rem;
place-items: center;
overflow: hidden;
height: 100%;
margin: 0;
padding: 0;
width: 95%;
max-width: 90vw;
max-height: 90vh;
}

model,
picture,
img {
width: 100%;
height: auto;
display: grid;
place-items: center;
max-height: 90vh;
}

img {
object-fit: contain;
}

@media (orientation: landscape) {
body {
grid-template-columns: 1fr 2fr;
}
}
</style>
</head>

<body>
<h1>An example <code>model</code> Element</h1>
<model interactive width="670" height="1191" src="assets/FlightHelmet.usdz" poster="assets/FlightHelmet.png">
</model>
</body>
</html>
50 changes: 50 additions & 0 deletions model-4.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Example HTMLModelElement</title>
<style>
html,
body {
display: grid;
grid-template-columns: 1fr;
gap: 1rem;
place-items: center;
overflow: hidden;
height: 100%;
margin: 0;
padding: 0;
width: 95%;
max-width: 90vw;
max-height: 90vh;
}

model,
picture,
img {
width: 100%;
height: auto;
display: grid;
place-items: center;
max-height: 90vh;
}

img {
object-fit: contain;
}

@media (orientation: landscape) {
body {
grid-template-columns: 1fr 2fr;
}
}
</style>
</head>

<body>
<h1>An example <code>model</code> Element</h1>
<model interactive width="670" height="1191" src="assets/FlightHelmet.usdz">
</model>
</body>
</html>
50 changes: 50 additions & 0 deletions model-5.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>Example HTMLModelElement</title>
<style>
html,
body {
display: grid;
grid-template-columns: 1fr;
gap: 1rem;
place-items: center;
overflow: hidden;
height: 100%;
margin: 0;
padding: 0;
width: 95%;
max-width: 90vw;
max-height: 90vh;
}

model,
picture,
img {
width: 100%;
height: auto;
display: grid;
place-items: center;
max-height: 90vh;
}

img {
object-fit: contain;
}

@media (orientation: landscape) {
body {
grid-template-columns: 1fr 2fr;
}
}
</style>
</head>

<body>
<h1>An example <code>model</code> Element</h1>
<model interactive width="670" height="1191" src="assets/cube.usdz">
</model>
</body>
</html>

0 comments on commit b604ef4

Please sign in to comment.