@konoui/mjimage 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +35 -22
- package/dist/index.cjs +11 -11
- package/dist/index.d.cts +239 -214
- package/dist/index.d.ts +239 -214
- package/dist/index.js +2076 -1950
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 konoui
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
|
|
11
11
|
| 牌 | 記述 |
|
|
12
12
|
| ------ | ------------------------------------------------------- |
|
|
13
|
-
| 萬子牌 | 1m 2m 3m
|
|
14
|
-
| 筒子牌 | 1p 2p 3p
|
|
15
|
-
| 索子牌 | 1s 2s 3s
|
|
13
|
+
| 萬子牌 | 1m 2m 3m 4m 5m 6m 7m 8m 9m |
|
|
14
|
+
| 筒子牌 | 1p 2p 3p 4p 5p 6p 7p 8p 9p |
|
|
15
|
+
| 索子牌 | 1s 2s 3s 4s 5s 6s 7s 8s 9s |
|
|
16
16
|
| 風牌 | 1z(東) 2z(南) 3z(西) 4z(北) 1w(東) 2w(南) 3w(西) 4w(北) |
|
|
17
17
|
| 三元牌 | 5z(白) 6z(發) 7z(中) 1d(白) 2d(發) 3d(中) |
|
|
18
18
|
| 赤ドラ | 0m 0p 0s |
|
|
@@ -22,44 +22,55 @@
|
|
|
22
22
|
|
|
23
23
|
### 制御文字
|
|
24
24
|
|
|
25
|
-
| 記号 | 説明 | 記載例
|
|
26
|
-
| ---- | ------------------------------------------------ |
|
|
27
|
-
| \- | 横向きの牌を表す | -123s
|
|
28
|
-
| , |
|
|
29
|
-
| t | ツモ牌を表す |
|
|
30
|
-
| d | ドラ牌を表す |
|
|
31
|
-
|
|
|
32
|
-
|
|
|
25
|
+
| 記号 | 説明 | 記載例 |
|
|
26
|
+
| ---- | ------------------------------------------------ | ------------ |
|
|
27
|
+
| \- | 横向きの牌を表す | -123s |
|
|
28
|
+
| , | ブロックの塊を表す区切り文字 | 123s,-123s |
|
|
29
|
+
| t | ツモ牌を表す | 123s,t3p |
|
|
30
|
+
| d | ドラ牌を表す | 123s,t3p,d4p |
|
|
31
|
+
| r | 赤ドラを示す( 0m や 0p や 0s と同様に扱われる) | r5s |
|
|
32
|
+
| ^ | ツモ切りを表す(牌の色が暗くなる) | 3^56m |
|
|
33
33
|
|
|
34
|
-
###
|
|
34
|
+
### 画像生成
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
> [!NOTE]
|
|
37
|
+
> 表示は svgo によりファイルのサイズを最適化しています。
|
|
38
|
+
|
|
39
|
+
#### 例 1)
|
|
40
|
+
|
|
41
|
+
```
|
|
37
42
|
456m456s456p1w2w3w1d,t2p,d3p
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+

|
|
46
|
+
|
|
47
|
+
#### 例 2)
|
|
38
48
|
|
|
39
|
-
|
|
49
|
+
```
|
|
40
50
|
23789p, t1w, -456p, 9-99p, d3p
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+

|
|
41
54
|
|
|
42
55
|
※ スペースは無視されます。
|
|
43
56
|
|
|
44
57
|
### 卓全体の生成
|
|
45
58
|
|
|
46
|
-
例)
|
|
47
|
-
|
|
48
59
|
```yaml
|
|
49
60
|
table:
|
|
50
|
-
|
|
61
|
+
1z:
|
|
51
62
|
hand: 123456789m1234s
|
|
52
63
|
discard: 12345m12345s12345p1234w
|
|
53
64
|
score: 0
|
|
54
|
-
|
|
65
|
+
2z:
|
|
55
66
|
hand: 123456789m1234s,t1p
|
|
56
67
|
discard: 12345m12345s12345p1234w
|
|
57
68
|
score: 3000
|
|
58
|
-
|
|
69
|
+
3z:
|
|
59
70
|
hand: 123456789m1234s
|
|
60
71
|
discard: 12345m12345s12345p1234w
|
|
61
72
|
score: 25000
|
|
62
|
-
|
|
73
|
+
4z:
|
|
63
74
|
hand: 123456789m1234s
|
|
64
75
|
discard: 12345m12345s12345p1234w
|
|
65
76
|
score: 12000
|
|
@@ -68,10 +79,12 @@ table:
|
|
|
68
79
|
sticks:
|
|
69
80
|
reach: 1
|
|
70
81
|
dead: 3
|
|
71
|
-
round:
|
|
72
|
-
front:
|
|
82
|
+
round: 1z1
|
|
83
|
+
front: 2z
|
|
73
84
|
```
|
|
74
85
|
|
|
86
|
+

|
|
87
|
+
|
|
75
88
|
## 牌画像
|
|
76
89
|
|
|
77
90
|
[【保存版】商用無料の高クオリティーの麻雀画像の無料素材まとめ](https://majandofu.com/mahjong-images)
|