skinview3d/examples/index.html

57 lines
1.1 KiB
HTML
Raw Normal View History

2018-02-11 20:20:04 +01:00
<!DOCTYPE html>
<html>
2018-07-17 20:49:00 +02:00
2018-02-11 20:20:04 +01:00
<head>
<meta charset="utf-8">
<title>skinview3d</title>
<link href="https://fonts.googleapis.com/css?family=Archivo+Black" rel="stylesheet">
<style>
html,
body {
margin: 0;
padding: 0;
background-color: #1e1e1e;
}
2020-06-08 22:32:54 +02:00
#skin-container {
text-align: center;
cursor: move;
}
#skin-container > canvas {
background: white;
filter: drop-shadow(-5px 5px 7px rgba(0, 0, 0, 0.4));
outline: none;
}
</style>
2018-02-11 20:20:04 +01:00
</head>
2018-07-17 20:49:00 +02:00
2018-02-11 20:20:04 +01:00
<body>
2020-06-08 22:32:54 +02:00
<div id="skin-container"></div>
2018-02-11 20:20:04 +01:00
2020-01-31 01:50:30 +01:00
<script type="text/javascript" src="../bundles/skinview3d.bundle.js"></script>
2018-02-11 20:20:04 +01:00
<script>
let skinViewer = new skinview3d.SkinViewer({
2020-06-08 22:32:54 +02:00
domElement: document.getElementById("skin-container"),
2020-04-26 01:00:10 +02:00
width: 200,
height: 400,
skinUrl: "./skin.png",
capeUrl: "./cape.png",
earUrl: "./ears.png"
2018-02-11 20:20:04 +01:00
});
2020-06-08 22:32:54 +02:00
let control = skinview3d.createOrbitControls(skinViewer);
control.enableRotate = true;
control.enableZoom = false;
control.enablePan = false;
skinViewer.playerObject.rotation.y = 180 * Math.PI / 180;
2018-02-11 20:20:04 +01:00
</script>
</body>
2018-07-17 20:49:00 +02:00
</html>