Add 3d Viewport component
Implement a Viewport component and associated update script that allows rendering 3d content inside it. This is based on the implementation used at Furnavia for their 2025 website.
This commit is contained in:
parent
c8527f17f7
commit
49a329ac43
4 changed files with 47 additions and 0 deletions
|
@ -10,6 +10,7 @@ export default function BasePage(props: BaseProps) {
|
|||
<meta charset="utf-8" />
|
||||
<title>{props.title}</title>
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
<script type="module" defer="" src="viewport.js" />
|
||||
</head>
|
||||
<body>
|
||||
<header class="header">
|
||||
|
|
12
src/components/Viewport.tsx
Normal file
12
src/components/Viewport.tsx
Normal file
|
@ -0,0 +1,12 @@
|
|||
/**
|
||||
3d Viewport
|
||||
*/
|
||||
export default function Viewport(
|
||||
props: {
|
||||
children: unknown,
|
||||
}
|
||||
) {
|
||||
return <div class="viewport in3d">
|
||||
{ props.children }
|
||||
</div>
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue