Skip to content

Commit 33b1437

Browse files
ayutazclaude
andcommitted
Add deployment configuration and documentation
- GitHub Actions workflow for automatic deployment to GitHub Pages - Babel configuration for Chrome 90+ targeting - Updated README with project overview and setup instructions - Complete M1 milestone: Basic working version 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 2bb333f commit 33b1437

3 files changed

Lines changed: 125 additions & 1 deletion

File tree

.babelrc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"presets": [
3+
[
4+
"@babel/preset-env",
5+
{
6+
"targets": {
7+
"chrome": "90"
8+
},
9+
"modules": false
10+
}
11+
]
12+
]
13+
}

.github/workflows/deploy.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: '18'
24+
cache: 'npm'
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- name: Build project
30+
run: npm run build
31+
32+
- name: Upload artifact
33+
uses: actions/upload-pages-artifact@v2
34+
with:
35+
path: ./dist
36+
37+
deploy:
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
runs-on: ubuntu-latest
42+
needs: build
43+
steps:
44+
- name: Deploy to GitHub Pages
45+
id: deployment
46+
uses: actions/deploy-pages@v2

README.md

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,66 @@
1-
# ImageToPixelArt
1+
# Image to Pixel Art Converter
2+
3+
画像をピクセルアート風に変換するWebアプリケーション
4+
5+
## 機能
6+
7+
- 🎨 カラー画像を指定色数(2-256色)に減色
8+
- 🔲 ピクセル化処理によるレトロゲーム風の見た目
9+
- 🎯 3種類のディザリング手法(Floyd-Steinberg, Ordered, Atkinson)
10+
- 📏 出力サイズのカスタマイズ
11+
- 💾 変換結果のダウンロード
12+
- 🖱️ ドラッグ&ドロップ対応
13+
14+
## 対応ブラウザ
15+
16+
- Google Chrome 90+ (Windows/Mac/Linux)
17+
18+
## 開発
19+
20+
### セットアップ
21+
22+
```bash
23+
# 依存関係のインストール
24+
npm install
25+
26+
# 開発サーバーの起動
27+
npm run dev
28+
29+
# ビルド
30+
npm run build
31+
```
32+
33+
### プロジェクト構造
34+
35+
```
36+
src/
37+
├── js/
38+
│ ├── core/ # 画像処理コア
39+
│ │ ├── colorQuantizer.js # 色量子化
40+
│ │ ├── pixelator.js # ピクセル化
41+
│ │ └── dithering.js # ディザリング
42+
│ └── ui/ # UIコンポーネント
43+
│ ├── fileUploader.js # ファイルアップロード
44+
│ ├── settings.js # 設定管理
45+
│ └── preview.js # プレビュー表示
46+
├── css/
47+
│ └── main.css # スタイルシート
48+
└── index.html # メインHTML
49+
```
50+
51+
## アルゴリズム
52+
53+
### 色量子化
54+
K-meansクラスタリングを使用して、画像の色を指定された色数に削減します。
55+
56+
### ピクセル化
57+
ブロック平均化またはCanvas APIのスケーリングを使用して、画像を低解像度化します。
58+
59+
### ディザリング
60+
- **Floyd-Steinberg**: エラー拡散による自然な見た目
61+
- **Ordered (Bayer)**: 規則的なパターンによるレトロな見た目
62+
- **Atkinson**: 高コントラストな結果
63+
64+
## ライセンス
65+
66+
MIT

0 commit comments

Comments
 (0)