refactor: ♻️ move clothing data into App.vue template
This commit is contained in:
parent
ce817e59f1
commit
e0f67441bd
2 changed files with 5 additions and 107 deletions
|
@ -1,67 +1,5 @@
|
|||
export default {
|
||||
methods: {
|
||||
getMuscleRefPics(count) {
|
||||
let muscles = [];
|
||||
|
||||
for (let i = 0; i < count; i++) {
|
||||
let imgNum = (i + 1).toString().padStart(2, "0");
|
||||
muscles.push(`/img/muscle-ref/muscle-ref${imgNum}.JPG`);
|
||||
}
|
||||
|
||||
return muscles;
|
||||
},
|
||||
|
||||
getClothesPics() {
|
||||
const warm = [
|
||||
"/img/clothes-ref/warm/tank-top.jpg",
|
||||
"/img/clothes-ref/warm/shorts.jpg",
|
||||
"/img/clothes-ref/warm/hoodie.jpg",
|
||||
"/img/clothes-ref/warm/sneakers.jpg"
|
||||
];
|
||||
|
||||
const cold = [
|
||||
"/img/clothes-ref/cold/coat.jpg",
|
||||
"/img/clothes-ref/cold/scarf.jpg",
|
||||
"/img/clothes-ref/cold/hoodie.jpg",
|
||||
"/img/clothes-ref/cold/jeans.jpg",
|
||||
"/img/clothes-ref/cold/boots.jpg"
|
||||
];
|
||||
|
||||
const workout = [
|
||||
"/img/clothes-ref/workout/hoodie.jpg",
|
||||
"/img/clothes-ref/workout/tank-top.jpg",
|
||||
"/img/clothes-ref/workout/gloves.jpg",
|
||||
"/img/clothes-ref/workout/apple-watch.jpg",
|
||||
"/img/clothes-ref/workout/shorts.jpg"
|
||||
];
|
||||
|
||||
const lazy = [
|
||||
"/img/clothes-ref/lazy/pants.jpg",
|
||||
"/img/clothes-ref/lazy/undies.jpg"
|
||||
];
|
||||
|
||||
return [warm, cold, workout, lazy];
|
||||
},
|
||||
|
||||
getKittens(count) {
|
||||
let kittens = [];
|
||||
|
||||
for (let i = 0; i < count; i++) {
|
||||
let width = this.getRandomInt(300, 600);
|
||||
let height = this.getRandomInt(300, 600);
|
||||
kittens.push(`https://placekitten.com/${width}/${height}`);
|
||||
}
|
||||
|
||||
return kittens;
|
||||
},
|
||||
|
||||
getRandomInt(min, max) {
|
||||
min = Math.ceil(min);
|
||||
max = Math.floor(max);
|
||||
max++; // make it inclusive
|
||||
return Math.floor(Math.random() * (max - min)) + min;
|
||||
},
|
||||
|
||||
getClientLocale() {
|
||||
if (navigator.language) {
|
||||
return navigator.languages[0];
|
||||
|
@ -72,7 +10,6 @@ export default {
|
|||
} else if (navigator.systemLanguage) {
|
||||
return navigator.systemLanguage;
|
||||
}
|
||||
// return navigator.language ? navigator.languages[0] : navigator.language;
|
||||
},
|
||||
|
||||
toImperial(cm) {
|
||||
|
|
|
@ -28,46 +28,7 @@ export default {
|
|||
special: "ridged",
|
||||
size: 20, // cm
|
||||
girth: 5 // cm
|
||||
},
|
||||
clothingStyles: [
|
||||
{
|
||||
name: "Warm Weather",
|
||||
clothes: [
|
||||
"Loose Tank Top",
|
||||
"Short shorts (knee-long) with dangling bands",
|
||||
"Sweater/Hoodie tied around waist",
|
||||
"Sneakers (Air Jordan style)"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Cold Weather",
|
||||
clothes: [
|
||||
"Coat",
|
||||
"Checkered scarf with short cords",
|
||||
"Hoodie",
|
||||
"Loose Jeans",
|
||||
"Boots"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Workout",
|
||||
clothes: [
|
||||
"Sleeveless Hoodie (hood goes on) OR Tank Top",
|
||||
"Fingerless Gloves",
|
||||
"Apple Watch (fitness tracking)",
|
||||
"Short Shorts",
|
||||
"(barefoot)"
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Lazy Boy Style",
|
||||
clothes: [
|
||||
"(topless)",
|
||||
"tracksuit pants (optional)",
|
||||
"Undies (jockstrap/boxer briefs)"
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -103,10 +64,10 @@ export default {
|
|||
const colors = {
|
||||
headers: ["Body Part", "Color (hex)", "Color"],
|
||||
data: [
|
||||
["Primary Scale Color", this.colors.scalesPrimary],
|
||||
["Secondary Scale Color", this.colors.scalesSecondary],
|
||||
["Primary Hair Color", this.colors.hairPrimary],
|
||||
["Secondary Hair Color", this.colors.hairSecondary],
|
||||
["Scale Color", this.colors.scalesPrimary],
|
||||
["Chestplate Color", this.colors.scalesSecondary],
|
||||
["Hair Color", this.colors.hairPrimary],
|
||||
["Hair Streaks", this.colors.hairSecondary],
|
||||
["Eyes", this.colors.eyes],
|
||||
["Facial Spikes", this.colors.eyebrows],
|
||||
["Horns/Claws/Nipples", this.colors.horns],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue