2017-10-01 14:17:34 +02:00
|
|
|
skinview3d
|
|
|
|
========
|
|
|
|
|
2018-01-06 13:18:04 +01:00
|
|
|
[](https://travis-ci.org/to2mbn/skinview3d)
|
|
|
|
[](https://www.npmjs.com/package/skinview3d)
|
|
|
|
[](https://github.com/to2mbn/skinview3d/blob/master/LICENSE)
|
2017-10-01 14:17:34 +02:00
|
|
|
|
2017-10-01 09:47:40 +02:00
|
|
|
Three.js powered Minecraft skin viewer.
|
2015-09-29 19:12:29 +02:00
|
|
|
|
2016-01-10 18:28:54 +01:00
|
|
|
# Features
|
|
|
|
* 1.8 Skins
|
2017-09-02 14:39:01 +02:00
|
|
|
* HD Skins
|
2016-01-10 18:28:54 +01:00
|
|
|
* Capes
|
2017-08-30 14:26:04 +02:00
|
|
|
* Slim arms
|
2016-01-10 18:28:54 +01:00
|
|
|
|
2017-10-01 14:17:34 +02:00
|
|
|
# Usage
|
|
|
|
```html
|
|
|
|
<div id="skin_container"></div>
|
|
|
|
<script>
|
|
|
|
let skinViewer = new skinview3d.SkinViewer({
|
|
|
|
domElement: document.getElementById("skin_container"),
|
|
|
|
slim: true,
|
|
|
|
width: 600,
|
|
|
|
height: 600,
|
|
|
|
skinUrl: "img/skin.png",
|
2018-01-06 15:01:12 +01:00
|
|
|
capeUrl: "img/cape.png"
|
2017-10-01 14:17:34 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
// change the skin and cape
|
|
|
|
// skinViewer.skinUrl = "img/skin.png";
|
|
|
|
// skinViewer.capeUrl = "img/cape.png";
|
|
|
|
|
|
|
|
// change the width and height
|
|
|
|
// skinViewer.width = 300;
|
|
|
|
// skinViewer.height = 400;
|
|
|
|
|
|
|
|
// enable the mouse control feature
|
|
|
|
let control = new skinview3d.SkinControl(skinViewer);
|
|
|
|
|
|
|
|
// disable the 'right click to play/pause' feature
|
|
|
|
// control.enableAnimationControl = false;
|
2018-01-06 15:01:12 +01:00
|
|
|
|
|
|
|
skinViewer.animation = new skinview3d.CompositeAnimation();
|
|
|
|
|
|
|
|
// add an animation
|
|
|
|
let walk = skinViewer.animation.add(skinview3d.WalkAnimation);
|
|
|
|
|
|
|
|
// set its speed and some others
|
|
|
|
walk.speed = 1.5;
|
|
|
|
// walk.paused = true;
|
2017-10-01 14:17:34 +02:00
|
|
|
</script>
|
|
|
|
```
|
|
|
|
|
2017-10-01 14:00:45 +02:00
|
|
|
# Build
|
2017-10-02 15:29:41 +02:00
|
|
|
`npm run build`
|