GraphiteEditor / GraphiteEditor/Graphite

Add custom data types for angles and factors/percentages

オープン
#2,433 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
27.2k
フォーク
1.3k
平均マージ
20時間 5分
マージ済み PR(30日)
57

説明

Instead of using `f64` for all types of numbers, there are some with special significance.

- Angles can be represented by degrees or radians. Our data type should encode one unambiguous value, enforcing any nodes that want to construct or read an angle to do so with an explicit choice of degrees or radians. This should replace the Transform node's rotation and X-skew/Y-skew angles, avoiding the confusion that the inputs given in the node graph aren't the user-friendly degrees set in the Properties panel. (See [#2431](https://github.com/GraphiteEditor/Graphite/pull/2431))
- Percentages can be represented out of 100 (percent) or 1 (factor). This distinctly represents not a quantity but a portion out of a whole, so it needs its own type. This avoids the confusion and mess caused by our current inconsistent usage of percentages and factors in various places, with uncertainty about whether those values are out of 1 or 100 when fed by the node graph. We can ensure number input widgets in range mode display the factor or percent on a per-case basis for whichever is designed to be the more logical approach, or do what Blender does and offer an app preference to display all such quantities as out of 1.00 or out of 100%.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

まず Transform ノードの回転値と X-skew/Y-skew 値を追跡し、次に issue に記載されているノードグラフの数値入力をたどります。パーセンテージと係数の一貫しない使用箇所を特定し、影響範囲を定義します。角度と部分が一貫して明示的かつ曖昧さのない表現を使用していれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust
領域
computer-graphics
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
30/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。