skinview3d/README.md

59 lines
1.3 KiB
Markdown
Raw Normal View History

2017-10-01 14:17:34 +02:00
skinview3d
========
[![Latest NPM release][npm-badge]][npm-badge-url]
[![License][license-badge]][license-badge-url]
2017-10-01 09:47:40 +02:00
Three.js powered Minecraft skin viewer.
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",
capeUrl: "img/cape.png",
animation: skinview3d.WalkAnimation
});
// 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);
// pause the animation
// skinViewer.animationPaused = true;
// change the animation speed
// skinViewer.animationSpeed = 8;
// disable the 'right click to play/pause' feature
// control.enableAnimationControl = false;
</script>
```
2017-10-01 14:00:45 +02:00
# Build
2017-10-02 15:29:41 +02:00
`npm run build`
2017-09-01 14:45:48 +02:00
2017-10-01 14:17:34 +02:00
[npm-badge]: https://img.shields.io/npm/v/skinview3d.svg
[npm-badge-url]: https://www.npmjs.com/package/skinview3d
[license-badge]: https://img.shields.io/npm/l/skinview3d.svg
[license-badge-url]: ./LICENSE