Update from review feedback
|
|
@ -1,4 +1,4 @@
|
|||
module.exports = {
|
||||
stories: ['../stories/**/*.stories.js'],
|
||||
addons: ['@storybook/addon-knobs/register']
|
||||
stories: ["../examples/**/*.stories.js"],
|
||||
addons: ["@storybook/addon-knobs/register"],
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,40 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<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;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="skin_container"></div>
|
||||
|
||||
<script type="text/javascript" src="../bundles/skinview3d.bundle.js"></script>
|
||||
|
||||
<script>
|
||||
let skinViewer = new skinview3d.SkinViewer(document.getElementById("skin_container"), {
|
||||
width: 400,
|
||||
height: 300,
|
||||
skin: "./1_8_texturemap_redux.png"
|
||||
});
|
||||
|
||||
let control = new skinview3d.createOrbitControls(skinViewer);
|
||||
skinViewer.animations.add(skinview3d.WalkingAnimation);
|
||||
skinViewer.animations.speed = 1.5;
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/* eslint-disable */
|
||||
import * as skinview3d from "../libs/skinview3d";
|
||||
import * as skinview3d from "../../libs/skinview3d";
|
||||
import { withKnobs, radios, number } from "@storybook/addon-knobs";
|
||||
|
||||
export default {
|
||||
|
|
@ -14,7 +14,7 @@ const createViewer = () => {
|
|||
const viewer = new skinview3d.SkinViewer(element, {
|
||||
width: 300,
|
||||
height: 400,
|
||||
skin: "texture/1_8_texturemap_redux.png",
|
||||
skin: "textures/1_8_texturemap_redux.png",
|
||||
});
|
||||
|
||||
console.log(viewer);
|
||||
|
|
@ -88,12 +88,12 @@ export const Textures = () => {
|
|||
};
|
||||
|
||||
const capeUrl = radios("Cape Textures", capeOptions, "none");
|
||||
viewer.loadSkin(`texture/${skinUrl}.png`);
|
||||
viewer.loadSkin(`textures/${skinUrl}.png`);
|
||||
|
||||
if (capeUrl === "none") {
|
||||
viewer.loadCape(null);
|
||||
} else {
|
||||
viewer.loadCape(`texture/${capeUrl}.png`);
|
||||
viewer.loadCape(`textures/${capeUrl}.png`);
|
||||
}
|
||||
|
||||
return element;
|
||||
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 689 B After Width: | Height: | Size: 689 B |
|
|
@ -0,0 +1,11 @@
|
|||
# Copyright Infomration
|
||||
|
||||
| Texture | Owner |
|
||||
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Hacksore.png | @Hacksore |
|
||||
| 1_8_texturemap_redux.png | Mojang Studios |
|
||||
| cape.png | Mojang Studios |
|
||||
| mojang_cape.png | Mojang Studios |
|
||||
| hatsune_miku.png | [xilefian](http://www.minecraftforum.net/forums/mapping-and-modding/skins/2646900-hatsune-miku-skin-1-9-transparency-layers) |
|
||||
| hd_cape.png | TBD |
|
||||
| ironman_hd.png | TBD |
|
||||
|
Before Width: | Height: | Size: 589 B After Width: | Height: | Size: 589 B |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
Before Width: | Height: | Size: 278 KiB After Width: | Height: | Size: 278 KiB |
|
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 109 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
|
|
@ -13,11 +13,9 @@
|
|||
"test": "npm run test:lint",
|
||||
"dev:watch:modules": "tsc -w --declaration --sourceMap --outDir libs -p .",
|
||||
"dev:watch:bundles": "rollup -w -c",
|
||||
"dev:serve": "ws",
|
||||
"storybook": "start-storybook -s ./public -p 6006",
|
||||
"dev": "npm-run-all --parallel dev:watch:modules dev:watch:bundles dev:serve",
|
||||
"prepublishOnly": "npm run clean && npm run build",
|
||||
"build-storybook": "build-storybook"
|
||||
"storybook": "start-storybook -s ./examples -p 6006",
|
||||
"dev": "npm run storybook",
|
||||
"prepublishOnly": "npm run clean && npm run build"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
|
@ -54,7 +52,6 @@
|
|||
"@yushijinhun/three-minifier-rollup": "^0.1.7",
|
||||
"babel-loader": "^8.1.0",
|
||||
"eslint": "^7.3.1",
|
||||
"local-web-server": "^4.2.1",
|
||||
"npm-run-all": "^4.1.5",
|
||||
"rimraf": "^3.0.2",
|
||||
"rollup": "^2.18.0",
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |