.blitzmachine – 18-43 Aug 27
Is this a good pattern or not, in JS specially, to wrap my custom logic around an object, before I decide how to initialize /& return it?

8 Replies
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
Sorry. I want to initialize my webGL renderer. After initialized, you still have to setup some things .. Instead of doing it in the main module .. I split it like this, for more dynamic usage .. I guess. I mean the entire module. So destruction and return. Also the way of how I handle the parameters incase something is not passed. Sounds stupid .. but kinda trying to learn some JS patterns without the need of TS
Unknown User•2w ago
Message Not Public
Sign In & Join Server To View
I return the renderer at the beginning of the func if it is defined. Just noticed that it kinda looks like the singleton pattern
Unknown User•2w ago
Message Not Public
Sign In & Join Server To View
The mutable var is outside of the scope
Unknown User•2w ago
Message Not Public
Sign In & Join Server To View
This thread hasn’t had any activity in 72 hours, so it’s now locked.
Threads are closed automatically after 72 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1410333808242327612