Move storybook things to examples/
|
@ -62,4 +62,3 @@ libs/
|
||||||
_ignore/
|
_ignore/
|
||||||
.DS_Store
|
.DS_Store
|
||||||
.rpt2_cache
|
.rpt2_cache
|
||||||
dist/
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
stories: ['../stories/**/*.stories.js'],
|
stories: ['../examples/stories/**/*.stories.js'],
|
||||||
addons: ['@storybook/addon-knobs/register']
|
addons: ['@storybook/addon-knobs/register']
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import * as skinview3d from "..";
|
import * as skinview3d from "../..";
|
||||||
import { withKnobs, radios, number } from "@storybook/addon-knobs";
|
import { withKnobs, radios, number } from "@storybook/addon-knobs";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -14,7 +14,7 @@ const createViewer = () => {
|
||||||
const viewer = new skinview3d.SkinViewer(element, {
|
const viewer = new skinview3d.SkinViewer(element, {
|
||||||
width: 300,
|
width: 300,
|
||||||
height: 400,
|
height: 400,
|
||||||
skin: "texture/1_8_texturemap_redux.png",
|
skin: "textures/1_8_texturemap_redux.png",
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(viewer);
|
console.log(viewer);
|
||||||
|
@ -88,12 +88,12 @@ export const Textures = () => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const capeUrl = radios("Cape Textures", capeOptions, "none");
|
const capeUrl = radios("Cape Textures", capeOptions, "none");
|
||||||
viewer.loadSkin(`texture/${skinUrl}.png`);
|
viewer.loadSkin(`textures/${skinUrl}.png`);
|
||||||
|
|
||||||
if (capeUrl === "none") {
|
if (capeUrl === "none") {
|
||||||
viewer.loadCape(null);
|
viewer.loadCape(null);
|
||||||
} else {
|
} else {
|
||||||
viewer.loadCape(`texture/${capeUrl}.png`);
|
viewer.loadCape(`textures/${capeUrl}.png`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return element;
|
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,3 @@
|
||||||
|
# Example textures
|
||||||
|
Assets in this directory are copyrighted by their original author(s), and are **OUTSIDE** the scope of skinview3d's license.
|
||||||
|
These files are intended for demo use. If you are the copyright owner and disagree with our use, please submit an issue and we will remove the related files.
|
Before Width: | Height: | Size: 589 B After Width: | Height: | Size: 589 B |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
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 |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
@ -13,7 +13,7 @@
|
||||||
"test": "npm run test:lint",
|
"test": "npm run test:lint",
|
||||||
"dev:watch:modules": "tsc -w --preserveWatchOutput --declaration --sourceMap --outDir libs -p .",
|
"dev:watch:modules": "tsc -w --preserveWatchOutput --declaration --sourceMap --outDir libs -p .",
|
||||||
"dev:watch:bundles": "rollup -w --no-watch.clearScreen -c",
|
"dev:watch:bundles": "rollup -w --no-watch.clearScreen -c",
|
||||||
"dev:storybook": "start-storybook -s ./public -p 6006",
|
"dev:storybook": "start-storybook -s ./examples -p 6006",
|
||||||
"dev": "npm-run-all --parallel dev:watch:modules dev:storybook",
|
"dev": "npm-run-all --parallel dev:watch:modules dev:storybook",
|
||||||
"prepublishOnly": "npm run clean && npm run build"
|
"prepublishOnly": "npm run clean && npm run build"
|
||||||
},
|
},
|
||||||
|
|