Adding in HTML/styles to laptop mesh
This commit is contained in:
@@ -24,6 +24,7 @@ import font from '../assets/fonts/Inter-Bold.woff';
|
|||||||
import toyCar from '../assets/models/ToyCar.glb';
|
import toyCar from '../assets/models/ToyCar.glb';
|
||||||
import mac from '../assets/models/mac-draco.glb';
|
import mac from '../assets/models/mac-draco.glb';
|
||||||
import { SpotLightHelper, DirectionalLightHelper } from 'three';
|
import { SpotLightHelper, DirectionalLightHelper } from 'three';
|
||||||
|
import logo from '../assets/logos/fd..svg';
|
||||||
|
|
||||||
const rsqw = (t, delta = 0.1, a = 1, f = 1 / (2 * Math.PI)) => (a / Math.atan(1 / delta)) * Math.atan(Math.sin(2 * Math.PI * t * f) / delta)
|
const rsqw = (t, delta = 0.1, a = 1, f = 1 / (2 * Math.PI)) => (a / Math.atan(1 / delta)) * Math.atan(Math.sin(2 * Math.PI * t * f) / delta)
|
||||||
|
|
||||||
@@ -221,9 +222,18 @@ const App = () => {
|
|||||||
<mesh castShadow material={materials['matte.001']} geometry={nodes['Cube008_1'].geometry} />
|
<mesh castShadow material={materials['matte.001']} geometry={nodes['Cube008_1'].geometry} />
|
||||||
<mesh castShadow geometry={nodes['Cube008_2'].geometry}>
|
<mesh castShadow geometry={nodes['Cube008_2'].geometry}>
|
||||||
{/* Drei's HTML component can now "hide behind" canvas geometry */}
|
{/* Drei's HTML component can now "hide behind" canvas geometry */}
|
||||||
<Html onClick={() => setScreenClicked(!screenClicked)} className="content" rotation-x={-Math.PI / 2} position={[0, 0.05, -0.09]} transform occlude>
|
<Html className="content" rotation-x={-Math.PI / 2} position={[0, 0.05, -0.09]} transform occlude>
|
||||||
<div className="wrapper">
|
<div className="text-xs text-white" onMouseEnter={() => setScreenClicked(!screenClicked)} onMouseLeave={() => setScreenClicked(!screenClicked)}>
|
||||||
<h1>Hello</h1>
|
<div className="px-4 wrapper">
|
||||||
|
<nav className="flex items-center justify-between pt-4 pb-2">
|
||||||
|
<img alt="Frank Delaguila - Designer and Developer Logo (FD.)" className="w-6" src={logo} />
|
||||||
|
<h1>Hello</h1>
|
||||||
|
</nav>
|
||||||
|
<div className="bg-zinc-800 w-full rounded p-4">
|
||||||
|
<h1 className="font-bold uppercase text-xl" style={ {color: '#e35205'} }>Ultradent</h1>
|
||||||
|
<p>React/Preact, Javascript, jQuery, Webpack, Storybook, React Testing Library</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Html>
|
</Html>
|
||||||
</mesh>
|
</mesh>
|
||||||
|
|||||||
@@ -5,14 +5,18 @@ const MainContent = () => {
|
|||||||
return (
|
return (
|
||||||
<main className="container">
|
<main className="container">
|
||||||
<nav className="flex items-center w-full">
|
<nav className="flex items-center w-full">
|
||||||
<img alt="Frank Delaguila - Designer and Developer Logo (FD.)" className="w-16" src={logo} />
|
<img
|
||||||
<ul className="flex items-center justify-between ml-24 w-64">
|
alt="Frank Delaguila - Designer and Developer Logo (FD.)"
|
||||||
<li>Home</li>
|
className="w-16"
|
||||||
<li>About</li>
|
src={logo}
|
||||||
<li>Portfolio</li>
|
/>
|
||||||
<li>Contact</li>
|
{/* <ul className="flex items-center justify-between ml-24 w-64">
|
||||||
</ul>
|
<li>Home</li>
|
||||||
</nav>
|
<li>About</li>
|
||||||
|
<li>Portfolio</li>
|
||||||
|
<li>Contact</li>
|
||||||
|
</ul> */}
|
||||||
|
</nav>
|
||||||
</main>
|
</main>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -33,16 +33,12 @@ body {
|
|||||||
.content {
|
.content {
|
||||||
width: 334px;
|
width: 334px;
|
||||||
height: 216px;
|
height: 216px;
|
||||||
background: #f0f0f0;
|
background: #1a1a1d;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrapper {
|
.wrapper {
|
||||||
padding: 10px;
|
|
||||||
width: 668px;
|
|
||||||
height: 432px;
|
height: 432px;
|
||||||
transform: scale(0.5);
|
|
||||||
transform-origin: top left;
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user