2020-09-22 01:44:24 -07:00
|
|
|
import React from "react";
|
|
|
|
|
|
2020-09-22 01:49:12 -07:00
|
|
|
import OutfitCanvas, {
|
|
|
|
|
OutfitCanvasImage,
|
2020-09-22 03:03:01 -07:00
|
|
|
OutfitCanvasMovie,
|
2020-09-22 01:49:12 -07:00
|
|
|
} from "../app/components/OutfitCanvas";
|
2020-09-22 01:44:24 -07:00
|
|
|
|
|
|
|
|
export default {
|
2020-09-22 01:49:12 -07:00
|
|
|
title: "Dress to Impress/OutfitCanvas",
|
|
|
|
|
component: OutfitCanvas,
|
2020-09-22 03:03:01 -07:00
|
|
|
argTypes: {
|
2020-09-22 05:39:48 -07:00
|
|
|
paused: {
|
|
|
|
|
name: "Paused",
|
|
|
|
|
},
|
2020-09-22 03:03:01 -07:00
|
|
|
pet: {
|
|
|
|
|
name: "Pet",
|
|
|
|
|
control: {
|
|
|
|
|
type: "radio",
|
|
|
|
|
options: ["None", "Blue Acara"],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
items: {
|
|
|
|
|
name: "Items",
|
|
|
|
|
control: {
|
|
|
|
|
type: "multi-select",
|
|
|
|
|
options: ["Bubbles In Water Foreground"],
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2020-09-22 01:44:24 -07:00
|
|
|
};
|
|
|
|
|
|
2020-09-22 03:03:01 -07:00
|
|
|
// NOTE: We don't bother with assetProxy here, because we only run Storybook
|
|
|
|
|
// locally, and localhost isn't subject to the same mixed content rules.
|
|
|
|
|
// So this is noticeably faster!
|
|
|
|
|
|
|
|
|
|
const Template = (args) => (
|
2020-09-22 05:39:48 -07:00
|
|
|
<OutfitCanvas width={300} height={300} pauseMovieLayers={args.paused}>
|
2020-09-22 03:03:01 -07:00
|
|
|
{args.pet === "Blue Acara" && (
|
|
|
|
|
<>
|
|
|
|
|
<OutfitCanvasImage
|
|
|
|
|
src="http://images.neopets.com/cp/bio/data/000/000/002/2426_898928db88/2426.svg"
|
|
|
|
|
zIndex={10}
|
|
|
|
|
/>
|
|
|
|
|
<OutfitCanvasImage
|
|
|
|
|
src="http://images.neopets.com/cp/bio/data/000/000/002/2425_501f596cef/2425.svg"
|
|
|
|
|
zIndex={20}
|
|
|
|
|
/>
|
|
|
|
|
<OutfitCanvasImage
|
|
|
|
|
src="http://images.neopets.com/cp/bio/data/000/000/002/2427_f12853f18a/2427.svg"
|
|
|
|
|
zIndex={30}
|
|
|
|
|
/>
|
|
|
|
|
<OutfitCanvasImage
|
|
|
|
|
src="http://images.neopets.com/cp/bio/data/000/000/032/32185_dc8f076ae3/32185.svg"
|
|
|
|
|
zIndex={40}
|
|
|
|
|
/>
|
|
|
|
|
<OutfitCanvasImage
|
|
|
|
|
src="http://images.neopets.com/cp/bio/data/000/000/002/2428_991dcdedc7/2428.svg"
|
|
|
|
|
zIndex={50}
|
|
|
|
|
/>
|
|
|
|
|
<OutfitCanvasImage
|
|
|
|
|
src="http://images.neopets.com/cp/bio/data/000/000/002/2430_87edccba4c/2430.svg"
|
|
|
|
|
zIndex={60}
|
|
|
|
|
/>
|
|
|
|
|
</>
|
|
|
|
|
)}
|
|
|
|
|
{args.items.includes("Bubbles In Water Foreground") && (
|
|
|
|
|
<OutfitCanvasMovie
|
|
|
|
|
librarySrc="http://images.neopets.com/cp/items/data/000/000/564/564507_fc3216b9b8/all-item_foreground_lower.js"
|
|
|
|
|
zIndex={100}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
2020-09-22 01:49:12 -07:00
|
|
|
</OutfitCanvas>
|
2020-09-22 01:44:24 -07:00
|
|
|
);
|
2020-09-22 03:03:01 -07:00
|
|
|
|
|
|
|
|
export const BlueAcara = Template.bind({});
|
|
|
|
|
BlueAcara.args = {
|
|
|
|
|
pet: "Blue Acara",
|
|
|
|
|
items: [],
|
2020-09-22 05:39:48 -07:00
|
|
|
paused: false,
|
2020-09-22 03:03:01 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const BubblesOnWaterForeground = Template.bind({});
|
|
|
|
|
BubblesOnWaterForeground.args = {
|
|
|
|
|
pet: "None",
|
|
|
|
|
items: ["Bubbles In Water Foreground"],
|
2020-09-22 05:39:48 -07:00
|
|
|
paused: false,
|
2020-09-22 03:03:01 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const BlueAcaraWithForeground = Template.bind({});
|
|
|
|
|
BlueAcaraWithForeground.args = {
|
|
|
|
|
pet: "Blue Acara",
|
|
|
|
|
items: ["Bubbles In Water Foreground"],
|
2020-09-22 05:39:48 -07:00
|
|
|
paused: false,
|
2020-09-22 03:03:01 -07:00
|
|
|
};
|