-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: hanbollar <github@hannahbollar.com>
- Loading branch information
Showing
12 changed files
with
285 additions
and
86 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 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,71 +1,257 @@ | ||
<!-- THIS IS AUTO GENERATED FROM scripts/update-all-submodules.sh ANY DIRECT EDITS WILL NOT BE SAVED --> | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US" prefix="og: http://ogp.me/ns#"> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<title>Volumetrics — Your Spatial developement companion</title> | ||
<link rel="shortcut icon" href="/favicon.ico" /> | ||
<!-- <script src="https://cdn.jsdelivr.net/gh/volumetrics-io/mrjs/dist/mr.js"></script> --> | ||
<script src="./mr.js"></script> | ||
<style> | ||
* { | ||
padding: 0; | ||
margin: 0; | ||
border: none; | ||
box-sizing: border-box; | ||
} | ||
|
||
mr-app { | ||
width: 100vw; | ||
height: 100vh; | ||
border-radius: unset; | ||
background-color: transparent; | ||
} | ||
<!-- Title --> | ||
<title>MRjs</title> | ||
|
||
#logo { | ||
width: 300px; | ||
height: 300px; | ||
z-index: 70; | ||
scale: 3.5; | ||
} | ||
</style> | ||
<!-- Favicon --> | ||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" /> | ||
|
||
<!-- SEO --> | ||
<meta name="description" content="An extensible library of Web Components for the spatial web." /> | ||
|
||
<!-- Basic Open Graph --> | ||
<meta content="MRjs" itemProp="name" class="next-head" /> | ||
<meta content="An extensible library of Web Components for the spatial web." itemProp="description" class="next-head" /> | ||
<meta content="https://mrjs.io/opengraph.jpg" itemProp="image" class="next-head" /> | ||
|
||
<!-- Generic Open Graph --> | ||
<meta property="og:type" content="article" class="next-head" /> | ||
<meta content="MRjs" property="og:title" class="next-head" /> | ||
<meta content="https://mrjs.io" property="og:url" class="next-head" /> | ||
<meta content="https://mrjs.io/opengraph.jpg" property="og:image" class="next-head" /> | ||
<meta content="An extensible library of Web Components for the spatial web." property="og:description" | ||
class="next-head" /> | ||
<meta content="MRjs" property="og:site_name" class="next-head" /> | ||
|
||
<!-- CSS Styles --> | ||
<link rel="stylesheet" type="text/css" href="index-style.css"/> | ||
|
||
<!-- MRjs --> | ||
<script src="./mr.js"></script> | ||
|
||
</head> | ||
|
||
<body> | ||
<mr-app debug="false"> | ||
<mr-light color="hsl(340, 100%, 50%)" intensity="5" data-position="-0.3 0.5 0.2"></mr-light> | ||
<mr-light color="hsl(180, 100%, 50%)" intensity="2.5" data-position="0 -0.5 0.4"></mr-light> | ||
<mr-light color="hsl(40, 100%, 50%)" intensity="5" data-position="0.6 0.25 0.2"></mr-light> | ||
<mr-model id="logo" src="./index-assets/mrjs_logo.glb"></mr-model> | ||
<!-- <mr-app debug="true"> --> | ||
<mr-app> | ||
<mr-light color="white" intensity="2" data-position="0 0.5 0.5"></mr-light> | ||
<mr-light id="mouselight" color="white" intensity="0.25" data-position="0 0 0.5"></mr-light> | ||
|
||
<mr-panel> | ||
<mr-div class="gapped padded section"> | ||
<mr-model style="height: 100px; width: 220px; scale: 0.07; z-index: 10;" | ||
src="./index-assets/mrjs_logo_large.glb"></mr-model> | ||
<mr-text class="h1">An extensible library of Web Components for the spatial web.</mr-text> | ||
<mr-text class="chapeau">MRjs is a mixed-reality-first, WebXR interface library meant to bootstrap | ||
spatial web app development. It implements much of the foundational work so that developers can | ||
spend less time on the basics and more time on their app.</mr-text> | ||
<mr-a target="_blank" href="https://github.com/Volumetrics-io/mrjs">See on GitHub</mr-a> | ||
<mr-a target="_blank" href="https://discord.gg/volumetrics">Join us on Discord</mr-a> | ||
<mr-button class="documentation" onclick="redirectToDocumentation()">Documentation</mr-button> | ||
</mr-div> | ||
|
||
<mr-div class="triptych"> | ||
<mr-div class="gapped padded section"> | ||
<mr-model id="extendable" data-position="0.01 0.01 5" | ||
style="height: 120px; width: 140px; scale: 2.7; z-index: 50 ;" | ||
src="./index-assets/jigsaw.glb"></mr-model> | ||
<mr-text class="h2">Extensible</mr-text> | ||
<mr-text class="narrow">Being open-source and built on top of web standards, you can easily | ||
implement custom elements and contribute to the ecosystem.</mr-text> | ||
</mr-div> | ||
<mr-div class="gapped padded section"> | ||
<mr-model id="familiar" data-position="0 0 5" | ||
style="height: 120px; width: 140px; scale: 1.7; z-index: 50 ;" | ||
src="./index-assets/familiar.glb"></mr-model> | ||
<mr-text class="h2">Familiar</mr-text> | ||
<mr-text class="narrow">Looks and feels like native HTML and CSS, but designed from the ground up | ||
for mixed-reality. Start with 2D and ease your way into creating 3D content.</mr-text> | ||
</mr-div> | ||
<mr-div class="gapped padded section"> | ||
<mr-model id="all-in-one" data-position="0 0 0" | ||
style="height: 120px; width: 140px; scale: 1.7; z-index: 30;" | ||
src="./index-assets/all-in-one.glb"></mr-model> | ||
<mr-text class="h2">All-in-one</mr-text> | ||
<mr-text class="narrow">Asset management, physics, and user interaction come built in, so you can | ||
spend less time laying the foundation and more time building your app.</mr-text> | ||
</mr-div> | ||
</mr-div> | ||
|
||
<!-- <mr-div class="diptych"> | ||
<mr-div class="gapped padded section"> | ||
<mr-text class="h2">Open-source and extendable</mr-text> | ||
<mr-text class="narrow">Built on top of web standards, you can implement custom elements and | ||
contribute to the ecosystem.</mr-text> | ||
</mr-div> | ||
<mr-div class="section"> | ||
<mr-div class="illustration"> | ||
<mr-model style="scale: 0.03; z-index: 20" src="./index-assets/koifish.glb" | ||
data-comp-animation="clip: 0; action: play;"></mr-model> | ||
</mr-div> | ||
</mr-div> | ||
</mr-div> | ||
<mr-div class="diptych"> | ||
<mr-div class="section"> | ||
<mr-div class="illustration"> | ||
<mr-model style="scale: 0.03; z-index: 20" src="./index-assets/koifish.glb" | ||
data-comp-animation="clip: 0; action: play;"></mr-model> | ||
</mr-div> | ||
</mr-div> | ||
<mr-div class="gapped padded section first"> | ||
<mr-text class="h2">Familiar and powerful</mr-text> | ||
<mr-text class="narrow">Looks and feels like existing libraries, but designed from the ground up for | ||
mixed-reality. Start with 2D and ease your way into creating 3D content.</mr-text> | ||
</mr-div> | ||
</mr-div> | ||
<mr-div class="diptych"> | ||
<mr-div class="gapped padded section"> | ||
<mr-text class="h2">All-in-one</mr-text> | ||
<mr-text class="narrow">Asset management, physics, and user interaction come built in, so you can | ||
spend less time laying the foundation and more time building your app.</mr-text> | ||
</mr-div> | ||
<mr-div class="section"> | ||
<mr-div class="illustration"> | ||
<mr-model style="scale: 0.03; z-index: 20" src="./index-assets/koifish.glb" | ||
data-comp-animation="clip: 0; action: play;"></mr-model> | ||
</mr-div> | ||
</mr-div> | ||
</mr-div> --> | ||
|
||
<mr-div class="gapped padded section"> | ||
<mr-text class="h1">Examples</mr-text> | ||
|
||
<mr-div class="mosaic"> | ||
|
||
<mr-div class="illustration"> | ||
<mr-a target="_blank" class="example-link" | ||
href="/examples/anchors.html">Anchoring</mr-a> | ||
</mr-div> | ||
|
||
<mr-div class="illustration"> | ||
<mr-a target="_blank" class="example-link" | ||
href="/examples/audio.html">Audio</mr-a> | ||
</mr-div> | ||
|
||
<mr-div class="illustration"> | ||
<mr-a target="_blank" class="example-link" | ||
href="/examples/camera.html">Camera</mr-a> | ||
</mr-div> | ||
|
||
<mr-div class="illustration"> | ||
<mr-a target="_blank" class="example-link" | ||
href="/examples/debug.html">Debugging</mr-a> | ||
</mr-div> | ||
|
||
<mr-div class="illustration"> | ||
<mr-a target="_blank" class="example-link" | ||
href="/examples/embed.html">Embed</mr-a> | ||
</mr-div> | ||
|
||
<mr-div class="illustration"> | ||
<mr-a target="_blank" class="example-link" | ||
href="/examples/images.html">Images</mr-a> | ||
</mr-div> | ||
|
||
<mr-div class="illustration"> | ||
<mr-a target="_blank" class="example-link" | ||
href="/examples/models.html">Models</mr-a> | ||
</mr-div> | ||
|
||
<mr-div class="illustration"> | ||
<mr-a target="_blank" class="example-link" | ||
href="/examples/skybox.html">Skybox</mr-a> | ||
</mr-div> | ||
|
||
<mr-div class="illustration"> | ||
<mr-a target="_blank" class="example-link" | ||
href="/examples/video.html">Video</mr-a> | ||
</mr-div> | ||
|
||
</mr-div> | ||
</mr-div> | ||
|
||
|
||
|
||
</mr-panel> | ||
</mr-app> | ||
|
||
<script> | ||
function rotate(timestamp) { | ||
t = timestamp / 200; | ||
let rx = (-t) % -360; | ||
let ry = (t) % 360; | ||
let rz = (t * 2) % 360; | ||
document.querySelector("#logo").dataset.rotation = rx + " " + ry + " " + rz; | ||
|
||
let data = { | ||
rx: Math.round(rx * 100) / 100, | ||
ry: Math.round(ry * 100) / 100, | ||
rz: Math.round(rz * 100) / 100 | ||
} | ||
window.top.postMessage(JSON.stringify(data), '*') | ||
window.requestAnimationFrame(rotate); | ||
}; | ||
window.requestAnimationFrame(rotate); | ||
|
||
// window.onload = () => { | ||
// document.querySelector("#logo").onclick = () => { | ||
// console.log("clicked"); | ||
// } | ||
// } | ||
function redirectToDocumentation() { | ||
window.location.href = "https://docs.mrjs.io"; | ||
} | ||
|
||
window.requestAnimationFrame(function rotate_extendable(timestamp) { | ||
let rx = Math.cos(timestamp / 2000) * 5 + 50; | ||
let ry = Math.cos(timestamp / 2000) * 5 - 40; | ||
let rz = Math.sin(timestamp / 2000) * 5; | ||
document.querySelector("#extendable").dataset.rotation = rx + " " + ry + " " + rz; | ||
window.requestAnimationFrame(rotate_extendable); | ||
}); | ||
|
||
window.requestAnimationFrame(function rotate_familiar(timestamp) { | ||
let rx = Math.cos(timestamp / 2000) * 10 + 25; | ||
let ry = Math.cos(timestamp / 2000) * 10 + 230; | ||
let rz = Math.sin(timestamp / 2000) * 10 + 5; | ||
document.querySelector("#familiar").dataset.rotation = rx + " " + ry + " " + rz; | ||
window.requestAnimationFrame(rotate_familiar); | ||
}); | ||
|
||
window.requestAnimationFrame(function rotate_allInOne(timestamp) { | ||
let rx = Math.cos(timestamp / 2000) * -10 + 25; | ||
let ry = Math.cos(timestamp / 2000) * -10 + 50; | ||
let rz = Math.sin(timestamp / 2000) * -10 + 5; | ||
document.querySelector("#all-in-one").dataset.rotation = rx + " " + ry + " " + rz; | ||
window.requestAnimationFrame(rotate_allInOne); | ||
}); | ||
|
||
|
||
// Light follow mouse | ||
(function () { | ||
"use strict"; | ||
|
||
document.onmousemove = handleMouseMove; | ||
function handleMouseMove(event) { | ||
var dot, eventDoc, doc, body, pageX, pageY; | ||
|
||
event = event || window.event; // IE-ism | ||
|
||
// If pageX/Y aren't available and clientX/Y | ||
// are, calculate pageX/Y - logic taken from jQuery | ||
// Calculate pageX/Y if missing and clientX/Y available | ||
if (event.pageX == null && event.clientX != null) { | ||
eventDoc = (event.target && event.target.ownerDocument) || document; | ||
doc = eventDoc.documentElement; | ||
body = eventDoc.body; | ||
|
||
event.pageX = | ||
event.clientX + | ||
((doc && doc.scrollLeft) || (body && body.scrollLeft) || 0) - | ||
((doc && doc.clientLeft) || (body && body.clientLeft) || 0); | ||
event.pageY = | ||
event.clientY + | ||
((doc && doc.scrollTop) || (body && body.scrollTop) || 0) - | ||
((doc && doc.clientTop) || (body && body.clientTop) || 0); | ||
} | ||
|
||
let ratioX = (event.pageX * 2) / window.innerWidth - 1; | ||
let ratioY = -((event.pageY * 2) / window.innerHeight - 1); | ||
|
||
document.querySelector("#mouselight").dataset.position = | ||
ratioX + " " + ratioY + " 0.25"; | ||
} | ||
})(); | ||
|
||
</script> | ||
</body> | ||
|
||
</html> | ||
<!-- THIS IS AUTO GENERATED FROM scripts/update-all-submodules.sh ANY DIRECT EDITS WILL NOT BE SAVED --> |
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 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 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 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
Oops, something went wrong.