public/lib/wardrobe.js
分割 4 / 7 · 元ファイル 490〜621行付近
{ id: 'kappougi', nm: '割烹着風', price: 170, tone: 'cute', draw: function (g, x, shY, bot, r, col) {
base(g, x, shY, bot, r, col);
g.fillStyle = lite(col, 0.90);
g.beginPath(); g.moveTo(x - r * 0.64, shY + r * 0.10); g.lineTo(x + r * 0.64, shY + r * 0.10);
g.lineTo(x + r * 1.06, bot + r * 0.20); g.lineTo(x - r * 1.06, bot + r * 0.20); g.closePath(); g.fill();
g.strokeStyle = lite(col, 0.60); g.lineWidth = r * 0.10;
g.beginPath(); g.moveTo(x - r * 1.00, T(shY, bot, 0.60)); g.lineTo(x + r * 1.00, T(shY, bot, 0.60)); g.stroke();
bow(g, x, T(shY, bot, 0.60), r * 0.22, lite(col, 0.40));
} },
{ id: 'cape', nm: 'ケープドレス', price: 300, tone: 'cute', draw: function (g, x, shY, bot, r, col) {
base(g, x, shY, bot, r, lite(col, 0.40));
skirt(g, x, shY, bot, r, 0.48, lite(col, 0.40), 1.48, 0.62);
/* 肩に丸いケープ */
g.fillStyle = dark(col, 0.30);
g.beginPath(); g.ellipse(x, shY + r * 0.02, r * 1.00, r * 0.70, 0, 0, Math.PI); g.closePath(); g.fill();
g.fillStyle = GD;
g.beginPath(); g.arc(x, shY + r * 0.06, r * 0.13, 0, 7); g.fill();
frill(g, x, bot + r * 0.58, r * 1.48, r * 0.15, WH, 7);
} },
{ id: 'whitedress', nm: '白いドレス', price: 400, tone: 'cute', draw: function (g, x, shY, bot, r, col) {
base(g, x, shY, bot, r, lite(col, 0.86));
/* 長く引きずる裾 */
g.fillStyle = lite(col, 0.86);
g.beginPath(); g.moveTo(x - HW(r, 0.40), T(shY, bot, 0.40)); g.lineTo(x + HW(r, 0.40), T(shY, bot, 0.40));
g.lineTo(x + r * 1.68, bot + r * 0.86); g.lineTo(x - r * 1.68, bot + r * 0.86); g.closePath(); g.fill();
frill(g, x, T(shY, bot, 0.10), HW(r, 0.10), r * 0.12, WH, 5);
panel(g, x, shY, bot, r, 0.38, 0.44, lite(col, 0.55));
g.strokeStyle = lite(col, 0.60); g.lineWidth = 1;
g.beginPath(); g.moveTo(x - r * 1.60, bot + r * 0.70); g.lineTo(x + r * 1.60, bot + r * 0.70); g.stroke();
} },
/* ---- 男性向け・中性的(15種) ---- */
{ id: 'hoodie', nm: 'パーカー', price: 140, tone: 'neutral', draw: function (g, x, shY, bot, r, col) {
base(g, x, shY, bot, r, col);
hood(g, x, shY, r, dark(col, 0.18));
g.strokeStyle = WH; g.lineWidth = 1.4;
g.beginPath(); g.moveTo(x - r * 0.14, T(shY, bot, 0.20)); g.lineTo(x - r * 0.18, T(shY, bot, 0.46)); g.stroke();
g.beginPath(); g.moveTo(x + r * 0.14, T(shY, bot, 0.20)); g.lineTo(x + r * 0.18, T(shY, bot, 0.46)); g.stroke();
pocket(g, x, T(shY, bot, 0.62), r * 1.00, r * 0.30, dark(col, 0.14));
} },
{ id: 'workwear', nm: '作業着', price: 160, tone: 'neutral', draw: function (g, x, shY, bot, r, col) {
base(g, x, shY, bot, r, dark(col, 0.20));
g.strokeStyle = dark(col, 0.50); g.lineWidth = 1.2;
g.beginPath(); g.moveTo(x, shY); g.lineTo(x, bot); g.stroke();
pocket(g, x - r * 0.46, T(shY, bot, 0.22), r * 0.40, r * 0.26, dark(col, 0.38));
pocket(g, x + r * 0.46, T(shY, bot, 0.22), r * 0.40, r * 0.26, dark(col, 0.38));
panel(g, x, shY, bot, r, 0.56, 0.64, dark(col, 0.45));
g.fillStyle = GD; g.fillRect(x - r * 0.10, T(shY, bot, 0.57), r * 0.20, r * 0.11);
} },
{ id: 'suit', nm: 'スーツ', price: 340, tone: 'neutral', draw: function (g, x, shY, bot, r, col) {
base(g, x, shY, bot, r, WH);
var d = dark(col, 0.68);
g.fillStyle = d;
g.beginPath(); g.moveTo(x - r * 0.74, shY); g.lineTo(x - r * 0.16, shY);
g.lineTo(x - r * 0.34, bot); g.lineTo(x - r * 1.16, bot); g.closePath(); g.fill();
g.beginPath(); g.moveTo(x + r * 0.74, shY); g.lineTo(x + r * 0.16, shY);
g.lineTo(x + r * 0.34, bot); g.lineTo(x + r * 1.16, bot); g.closePath(); g.fill();
/* 襟 */
g.fillStyle = dark(col, 0.50);
g.beginPath(); g.moveTo(x - r * 0.58, shY); g.lineTo(x - r * 0.16, shY); g.lineTo(x - r * 0.26, T(shY, bot, 0.40)); g.closePath(); g.fill();
g.beginPath(); g.moveTo(x + r * 0.58, shY); g.lineTo(x + r * 0.16, shY); g.lineTo(x + r * 0.26, T(shY, bot, 0.40)); g.closePath(); g.fill();
/* ネクタイ */
g.fillStyle = RD;
g.beginPath(); g.moveTo(x, shY + r * 0.04); g.lineTo(x + r * 0.11, T(shY, bot, 0.50));
g.lineTo(x, T(shY, bot, 0.58)); g.lineTo(x - r * 0.11, T(shY, bot, 0.50)); g.closePath(); g.fill();
buttons(g, x - r * 0.30, shY, bot, r, BK, 2, 0.58, 0.74);
} },
{ id: 'sports', nm: 'スポーツユニフォーム', price: 180, tone: 'neutral', draw: function (g, x, shY, bot, r, col) {
base(g, x, shY, bot, r, col);
g.fillStyle = WH;
g.fillRect(x - r * 0.74, shY, r * 0.18, (bot - shY) * 0.30);
g.fillRect(x + r * 0.56, shY, r * 0.18, (bot - shY) * 0.30);
vneck(g, x, shY, r, WH, 0.50);
g.fillStyle = WH;
g.beginPath(); g.arc(x, T(shY, bot, 0.48), r * 0.28, 0, 7); g.fill();
g.fillStyle = col;
g.fillRect(x - r * 0.06, T(shY, bot, 0.36), r * 0.12, r * 0.36);
panel(g, x, shY, bot, r, 0.82, 0.90, WH);
} },
{ id: 'overall', nm: 'オーバーオール', price: 200, tone: 'neutral', draw: function (g, x, shY, bot, r, col) {
base(g, x, shY, bot, r, lite(col, 0.66));
g.fillStyle = DN;
g.beginPath(); g.moveTo(x - r * 0.44, T(shY, bot, 0.24)); g.lineTo(x + r * 0.44, T(shY, bot, 0.24));
g.lineTo(x + r * 1.16, bot); g.lineTo(x - r * 1.16, bot); g.closePath(); g.fill();
g.strokeStyle = DN; g.lineWidth = r * 0.16;
g.beginPath(); g.moveTo(x - r * 0.58, shY); g.lineTo(x - r * 0.36, T(shY, bot, 0.26)); g.stroke();
g.beginPath(); g.moveTo(x + r * 0.58, shY); g.lineTo(x + r * 0.36, T(shY, bot, 0.26)); g.stroke();
g.fillStyle = GD;
g.beginPath(); g.arc(x - r * 0.40, T(shY, bot, 0.26), r * 0.08, 0, 7); g.fill();
g.beginPath(); g.arc(x + r * 0.40, T(shY, bot, 0.26), r * 0.08, 0, 7); g.fill();
pocket(g, x, T(shY, bot, 0.42), r * 0.46, r * 0.30, '#3d5d82');
} },
{ id: 'jacket', nm: 'ジャケット', price: 250, tone: 'neutral', draw: function (g, x, shY, bot, r, col) {
openFront(g, x, shY, bot, r, dark(col, 0.42), lite(col, 0.70));
g.fillStyle = dark(col, 0.60);
g.beginPath(); g.moveTo(x - r * 0.62, shY); g.lineTo(x - r * 0.14, shY); g.lineTo(x - r * 0.30, T(shY, bot, 0.44)); g.closePath(); g.fill();
g.beginPath(); g.moveTo(x + r * 0.62, shY); g.lineTo(x + r * 0.14, shY); g.lineTo(x + r * 0.30, T(shY, bot, 0.44)); g.closePath(); g.fill();
pocket(g, x - r * 0.66, T(shY, bot, 0.62), r * 0.34, r * 0.10, dark(col, 0.62));
pocket(g, x + r * 0.66, T(shY, bot, 0.62), r * 0.34, r * 0.10, dark(col, 0.62));
} },
{ id: 'tshirt', nm: 'Tシャツ', price: 60, tone: 'neutral', draw: function (g, x, shY, bot, r, col) {
base(g, x, shY, bot, r, lite(col, 0.10));
g.strokeStyle = lite(col, 0.55); g.lineWidth = r * 0.10;
g.beginPath(); g.arc(x, shY - r * 0.10, r * 0.32, 0.2, Math.PI - 0.2); g.stroke();
g.strokeStyle = dark(col, 0.20); g.lineWidth = 1;
g.beginPath(); g.moveTo(x - r * 1.10, T(shY, bot, 0.92)); g.lineTo(x + r * 1.10, T(shY, bot, 0.92)); g.stroke();
} },
{ id: 'jersey', nm: 'ジャージ', price: 150, tone: 'neutral', draw: function (g, x, shY, bot, r, col) {
base(g, x, shY, bot, r, dark(col, 0.25));
g.fillStyle = WH;
g.beginPath(); g.moveTo(x - r * 0.70, shY); g.lineTo(x - r * 0.56, shY); g.lineTo(x - r * 0.96, bot); g.lineTo(x - r * 1.12, bot); g.closePath(); g.fill();
g.beginPath(); g.moveTo(x + r * 0.70, shY); g.lineTo(x + r * 0.56, shY); g.lineTo(x + r * 0.96, bot); g.lineTo(x + r * 1.12, bot); g.closePath(); g.fill();
g.strokeStyle = SV; g.lineWidth = 1.2;
g.beginPath(); g.moveTo(x, shY); g.lineTo(x, T(shY, bot, 0.90)); g.stroke();
panel(g, x, shY, bot, r, 0, 0.08, dark(col, 0.50));
} },
{ id: 'tanktop', nm: 'タンクトップ', price: 90, tone: 'neutral', draw: function (g, x, shY, bot, r, col) {
base(g, x, shY, bot, r, lite(col, 0.14));
g.fillStyle = dark(col, 0.45);
g.beginPath(); g.moveTo(x - r * 0.78, shY - r * 0.04); g.lineTo(x - r * 0.34, shY - r * 0.04);
g.lineTo(x - r * 0.72, T(shY, bot, 0.42)); g.lineTo(x - r * 0.98, T(shY, bot, 0.42)); g.closePath(); g.fill();
g.beginPath(); g.moveTo(x + r * 0.78, shY - r * 0.04); g.lineTo(x + r * 0.34, shY - r * 0.04);
g.lineTo(x + r * 0.72, T(shY, bot, 0.42)); g.lineTo(x + r * 0.98, T(shY, bot, 0.42)); g.closePath(); g.fill();
g.strokeStyle = WH; g.lineWidth = 1.2;
g.beginPath(); g.moveTo(x - r * 0.34, shY); g.lineTo(x + r * 0.34, shY); g.stroke();
} },
{ id: 'shirttie', nm: 'ワイシャツ', price: 190, tone: 'neutral', draw: function (g, x, shY, bot, r, col) {
base(g, x, shY, bot, r, WH);
g.fillStyle = CR;
g.beginPath(); g.moveTo(x - r * 0.52, shY - r * 0.02); g.lineTo(x - r * 0.10, shY); g.lineTo(x - r * 0.22, T(shY, bot, 0.24)); g.closePath(); g.fill();
g.beginPath(); g.moveTo(x + r * 0.52, shY - r * 0.02); g.lineTo(x + r * 0.10, shY); g.lineTo(x + r * 0.22, T(shY, bot, 0.24)); g.closePath(); g.fill();
g.fillStyle = dark(col, 0.30);