skinview3d/example.html

49 lines
1.1 KiB
HTML
Raw Normal View History

2015-09-29 18:52:18 +02:00
<!DOCTYPE html>
<html>
<head>
<title>SkinPreview3D</title>
<style>
2016-01-10 18:28:54 +01:00
#canvas, #cape{
2015-09-29 18:52:18 +02:00
display: none;
}
#canvas_container{
width: 470px;
background: #000;
}
</style>
</head>
<body>
<div id="canvas_container">
<canvas id="canvas" width="64" height="64"></canvas>
2016-01-10 18:28:54 +01:00
<canvas id="cape" width="22" height="17"></canvas>
2015-09-29 18:52:18 +02:00
</div>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r71/three.min.js"></script>
<script type="text/javascript" src="/js/skinpreview3d.js"></script>
<script>
$(function() {
$("#canvas_container").skinPreview3D({
2016-01-10 18:28:54 +01:00
skinUrl: "/img/Dinnerbone.png",
capeUrl: "/img/cape.png",
2015-09-29 18:52:18 +02:00
canvasID: "canvas"
});
});
</script>
<label>
<input id="head2" class="toggle-head" type="checkbox" checked> Head
</label>
<label>
<input class="toggle-layer2" type="checkbox" checked> Second Layer
2016-01-10 18:28:54 +01:00
</label>
<label>
<input class="toggle-cape" type="checkbox" checked> Cape
2015-09-29 18:52:18 +02:00
</label>
</body>
</html>