Expose the objects holding constants
See original GitHub issueIt’s useful for editors & data files to be able to enumerate constants. So instead of having "wrapS" : 1000
you can write "wrapS" : "RepeatWrapping"
, or if you want to construct a drop down for all the different texture filter modes etc. What seems to be the best approach at the moment is to copy & paste TEXTURE_FILTER
, I think it would be better if they were just exported as is instead. Not only is it a whole lot cleaner than copy & paste, but it also guarantees that they’re in sync if new ones ever gets added or if it’s changed.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
how to expose constant data - c++ - Stack Overflow
I am not sure if this is the best way to expose data in OOPS parlance. I have made variables const but const_cast...
Read more >JavaScript Constants With Object.freeze() - DEV Community
You don't actually need objects to organize your constants, you could simply have a constants directory instead of a constants file, and then ......
Read more >Python Constants: Improve Your Code's Maintainability
Constants can only be accessed, not written. This feature makes them thread-safe objects, which means that several threads can simultaneously ...
Read more >How to Share Constants in Typescript Project - Medium
One way to manage constants in TypeScript is to use the class. In the following example, the AppSettings class is created with static...
Read more >Constants (IBM WebSphere Application Server, Release 8.5)
This class will hold any constants exposed by the programming model. Application developers will be able to use these constants when developing JAX-WS...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I guess @Sairony is asking for all constants to be scoped under a particular namespace for their purpose. For example:
From that perspective, the user can enumerate the choices in a dropdown with
Object.keys(THREE.Wrapping)
rather than having to maintain a matching list.All else being equal I agree the scoped constants might be nice, but this seems like a major a hassle to change now, so I’m not sure we can justify moving all the constants.
Related: #12579, #12972