npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@konoui/mjimage

v0.0.47

Published

Generates Mahjong tiles in SVG format.

Downloads

383

Readme

npm version

麻雀牌ジェネレーター

仕様に沿ってテキストを入力することで、SVG 形式の画像を表示する Typescript ライブラリです。

仕様

| 牌 | 記述 | | ------ | ------------------------------------------------------- | | 萬子牌 | 1m 2m 3m ... 9m | | 筒子牌 | 1p 2p 3p ... 9p | | 索子牌 | 1s 2s 3s ... 9s | | 風牌 | 1z(東) 2z(南) 3z(西) 4z(北) 1w(東) 2w(南) 3w(西) 4w(北) | | 三元牌 | 5z(白) 6z(發) 7z(中) 1d(白) 2d(發) 3d(中) | | 赤ドラ | 0m 0p 0s   | | 裏牌 | _ |

※ 風牌の w は wind の、三元牌の d は dragon の略

制御文字

| 記号 | 説明 | 記載例 | | ---- | ------------------------------------------------ | ----------- | | - | 横向きの牌を表す | -123s | | , | ブロックの塊を表す | 123,-123 | | t | ツモ牌を表す | 123,t3p | | d | ドラ牌を表す | 123,t3p,d4p | | ^ | ツモ切りを表す(牌の色が暗くなる) | 3^56m | | r | 赤ドラを示す( 0m や 0p や 0s と同様に扱われる) | r5s |

入力例

例 1) 456m456s456p1w2w3w1d,t2p,d3p

例 2) 23789p, t1w, -456p, 9-99p, d3p

※ スペースは無視されます。

卓全体の生成

例)

table:
  1w:
    hand: 123456789m1234s
    discard: 12345m12345s12345p1234w
    score: 0
  2w:
    hand: 123456789m1234s,t1p
    discard: 12345m12345s12345p1234w
    score: 3000
  3w:
    hand: 123456789m1234s
    discard: 12345m12345s12345p1234w
    score: 25000
  4w:
    hand: 123456789m1234s
    discard: 12345m12345s12345p1234w
    score: 12000
  board:
    doras: 1m
    sticks:
      reach: 1
      dead: 3
    round: 1w1
    front: 2w

牌画像

【保存版】商用無料の高クオリティーの麻雀画像の無料素材まとめ

使い方

設定例

html の例