donmccurdy / glTF-Transform

glTF 2.0 SDK for JavaScript and TypeScript, on Web and Node.js.
https://gltf-transform.dev
MIT License
1.42k stars 150 forks source link

Deprecate hexadecimal getters/setters #1158

Closed donmccurdy closed 11 months ago

donmccurdy commented 1 year ago

For baseColorFactor and all other material color inputs (including extensions), I've provided getters/setters for both factors and hexadecimal values. This affects most new material extensions, has started to feel like an unnecessary bit of clutter.

https://github.com/donmccurdy/glTF-Transform/blob/5f27fbd7260889a17f5138169afe03aee6682a6e/packages/core/src/properties/material.ts#L193-L222

In v4, perhaps the hexadecimal-based getters/setters should be deprecated or removed, leaving just factors. Conversion to/from hex is easy with https://gltf-transform.dev/modules/core/classes/ColorUtils.

donmccurdy commented 11 months ago

I'll deprecate these methods in v3.10, and remove them in v4.0.