-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
James Harvey
committed
Apr 4, 2024
1 parent
3e4f04f
commit 3887024
Showing
45 changed files
with
248 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,25 @@ | ||
{ | ||
"files": { | ||
"main.css": "/static/css/main.073c9b0a.css", | ||
"main.js": "/static/js/main.d186c8d7.js", | ||
"static/js/787.28cb0dcd.chunk.js": "/static/js/787.28cb0dcd.chunk.js", | ||
"static/media/logo.svg": "/static/media/logo.6ce24c58023cc2f8fd88fe9d219db6c6.svg", | ||
"main.css": "/static/css/main.fa526bc9.css", | ||
"main.js": "/static/js/main.2215348a.js", | ||
"static/media/editor.png": "/static/media/editor.b7c500124e8682d3af2d.png", | ||
"static/media/logo.jpg": "/static/media/logo.3b54437bed7886024a3b.jpg", | ||
"static/media/8thwall.png": "/static/media/8thwall.e9ac601386c9f1ec6b92.png", | ||
"static/media/sheffield.png": "/static/media/sheffield.73d90ea4df3a6d15b639.png", | ||
"static/media/arcade.png": "/static/media/arcade.1b6b2e271fd9f9076fe0.png", | ||
"static/media/rituals.jpg": "/static/media/rituals.d95018217db15569284b.jpg", | ||
"static/media/openformat.jpg": "/static/media/openformat.2769eaba2305d506c2d0.jpg", | ||
"static/media/unity.png": "/static/media/unity.f3599892e930ea1e3e45.png", | ||
"static/media/nextjs.png": "/static/media/nextjs.70a93475e8c739b65181.png", | ||
"static/media/close.svg": "/static/media/close.efebed8b1a7fa91ea0e56f2581654098.svg", | ||
"static/media/menu.svg": "/static/media/menu.871b388e16ddf9f68a377b2c7507ed0d.svg", | ||
"index.html": "/index.html", | ||
"main.073c9b0a.css.map": "/static/css/main.073c9b0a.css.map", | ||
"main.d186c8d7.js.map": "/static/js/main.d186c8d7.js.map", | ||
"787.28cb0dcd.chunk.js.map": "/static/js/787.28cb0dcd.chunk.js.map" | ||
"static/media/github.svg": "/static/media/github.3b21c250a99986431958daaa9246a45a.svg", | ||
"main.fa526bc9.css.map": "/static/css/main.fa526bc9.css.map", | ||
"main.2215348a.js.map": "/static/js/main.2215348a.js.map" | ||
}, | ||
"entrypoints": [ | ||
"static/css/main.073c9b0a.css", | ||
"static/js/main.d186c8d7.js" | ||
"static/css/main.fa526bc9.css", | ||
"static/js/main.2215348a.js" | ||
] | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
@font-face { | ||
font-family: TitilliumWeb-Regular; | ||
src: url('./fonts/TitilliumWeb-Regular.ttf'); | ||
} | ||
|
||
@font-face { | ||
font-family: TitilliumWeb-Bold; | ||
src: url('./fonts/TitilliumWeb-Bold.ttf'); | ||
} | ||
|
||
@font-face { | ||
font-family: TitilliumWeb-Light; | ||
src: url('./fonts/TitilliumWeb-Light.ttf'); | ||
} | ||
|
||
html, body { | ||
height: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>React App</title><script defer="defer" src="/static/js/main.d186c8d7.js"></script><link href="/static/css/main.073c9b0a.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html> | ||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="author" content="james harvey, [email protected]"><meta name="description" content="James Harvey - AR Developer Portfolio"/><meta name="keywords" content="james harvey, james, harvey, augmented reality, developer, threejs, aframe, unity"><link rel="manifest" href="/manifest.json"/><link rel="stylesheet" href="./index.css"><title>James Harvey - AR Developer</title><script type="text/javascript">document.body.style.cursor="none"</script><script defer="defer" src="/static/js/main.2215348a.js"></script><link href="/static/css/main.fa526bc9.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="./js/pointer.js"></script></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/* | ||
pointer.js was created by OwL for use on websites, | ||
and can be found at https://seattleowl.com/pointer. | ||
*/ | ||
|
||
const pointer = document.createElement("div") | ||
pointer.id = "pointer-dot" | ||
const ring = document.createElement("div") | ||
ring.id = "pointer-ring" | ||
document.body.insertBefore(pointer, document.body.children[0]) | ||
document.body.insertBefore(ring, document.body.children[0]) | ||
|
||
let mouseX = -100 | ||
let mouseY = -100 | ||
let ringX = -100 | ||
let ringY = -100 | ||
let isHover = false | ||
let mouseDown = false | ||
const init_pointer = (options) => { | ||
|
||
window.onmousemove = (mouse) => { | ||
mouseX = mouse.clientX | ||
mouseY = mouse.clientY | ||
} | ||
|
||
window.onmousedown = (mouse) => { | ||
mouseDown = true | ||
} | ||
|
||
window.onmouseup = (mouse) => { | ||
mouseDown = false | ||
} | ||
|
||
const trace = (a, b, n) => { | ||
return (1 - n) * a + n * b; | ||
} | ||
window["trace"] = trace | ||
|
||
const getOption = (option) => { | ||
let defaultObj = { | ||
pointerColor: "#c2007f", | ||
ringSize: 15, | ||
ringClickSize: (options["ringSize"] || 15) - 5, | ||
} | ||
if (options[option] == undefined) { | ||
return defaultObj[option] | ||
} else { | ||
return options[option] | ||
} | ||
} | ||
|
||
const render = () => { | ||
ringX = trace(ringX, mouseX, 0.2); | ||
ringY = trace(ringY, mouseY + window.scrollY, 0.2); // Add vertical scroll offset here | ||
|
||
if (document.querySelector(".p-action-click:hover")) { | ||
pointer.style.borderColor = getOption("pointerColor"); | ||
isHover = true; | ||
} else { | ||
pointer.style.borderColor = "white"; | ||
isHover = false; | ||
} | ||
ring.style.borderColor = getOption("pointerColor"); | ||
if (mouseDown) { | ||
ring.style.padding = getOption("ringClickSize") + "px"; | ||
} else { | ||
ring.style.padding = getOption("ringSize") + "px"; | ||
} | ||
|
||
pointer.style.transform = `translate(${mouseX}px, ${mouseY}px)`; | ||
ring.style.transform = `translate(${ringX - (mouseDown ? getOption("ringClickSize") : getOption("ringSize"))}px, ${ringY - (mouseDown ? getOption("ringClickSize") : getOption("ringSize"))}px)`; | ||
|
||
requestAnimationFrame(render); | ||
}; | ||
requestAnimationFrame(render) | ||
} | ||
|
||
init_pointer({ | ||
ringSize: 10, | ||
ringClickSize: 5 | ||
}) |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.