GraphiteEditor / GraphiteEditor/Graphite

Add custom data types for angles and factors/percentages

Abierto
#2,433 5 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Rust
Estrellas
27.2k
Forks
1.3k
Merge medio
20 h 5 min
PR fusionados (30 d)
57

Descripción

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%.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Comienza rastreando los valores de rotación y X-skew/Y-skew del nodo Transform y, a continuación, sigue las entradas numéricas del grafo de nodos descritas en el issue. Identifica los usos incoherentes de porcentajes y factores y define el alcance afectado; el trabajo estará terminado cuando los ángulos y las proporciones utilicen representaciones explícitas y sin ambigüedades de forma coherente.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
rust
Área
computer-graphics
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
30/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.