Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
James Harvey committed Apr 4, 2024
1 parent 3e4f04f commit 3887024
Show file tree
Hide file tree
Showing 45 changed files with 248 additions and 73 deletions.
27 changes: 18 additions & 9 deletions asset-manifest.json
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 modified favicon.ico
Binary file not shown.
Binary file added fonts/TitilliumWeb-Bold.ttf
Binary file not shown.
Binary file added fonts/TitilliumWeb-Light.ttf
Binary file not shown.
Binary file added fonts/TitilliumWeb-Regular.ttf
Binary file not shown.
Binary file added glb/mac-draco.glb
Binary file not shown.
18 changes: 18 additions & 0 deletions index.css
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%;
}
2 changes: 1 addition & 1 deletion index.html
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>
81 changes: 81 additions & 0 deletions js/pointer.js
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 removed logo192.png
Binary file not shown.
Binary file removed logo512.png
Binary file not shown.
16 changes: 3 additions & 13 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"short_name": "James Harvey",
"name": "James Harvey - AR Developer",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"sizes": "248x248 124x124 64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
Expand Down
2 changes: 0 additions & 2 deletions static/css/main.073c9b0a.css

This file was deleted.

1 change: 0 additions & 1 deletion static/css/main.073c9b0a.css.map

This file was deleted.

4 changes: 4 additions & 0 deletions static/css/main.fa526bc9.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions static/css/main.fa526bc9.css.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions static/js/787.28cb0dcd.chunk.js

This file was deleted.

Loading

0 comments on commit 3887024

Please sign in to comment.