Why should jQuery be bad practice? Basically it just makes dealing with the dom easier, but is a rather bare/loose library instead a structured framework for UI. Most “widgets” and libraries are rather encapsuled and a lot has to be hardcoded, it depends on the scale of your project, but there are also more structured frameworks based on jQuery. The size of the library itself isn’t relevant as well as long as you don’t need to maxopt the loading speed.
As mentioned it depends on the scale, i personally wouldn’t use it aside from demos, small hacky things.
As long as you don’t start any css selections like $('#health').text(player.health) in a render loop there is no big difference, and most functions of jQuery basically wrap just very basic things into functions to chain calls. Such as $element.text('Hello') is the same as $element[0].textContent = 'Hello'. You rather save code for various tasks.
I’m blown away by the sortable() method so simple but what havoc am I bringing to the Three.js library by using these stripped down methods for only interface development?
Again not using sortable() directly with Three.js.
I don’t really see how this should be related to THREE, but the jQuery realm uses the dom for application structure instead the other way, so if you would sort a list of children of a Object3D you would have to synchronize that with the actual array.
Aah yes DOM I forgot, jQuery is independent from Three.js
I was thinking somehow the presence of jQuery would do something crazy to the Three.js engine.
Understand the loop if I query over lots of things that is a potential threat.
Yeah not doing any Object3D manipulation, I have a taxonomy(classification engine) i’m running along side the Three.js engine - an independent interface from the 3D engine
I don’t think this should be a problem — using two frameworks that both want to control the DOM together can be a challenge (e.g. jQuery + React), but threejs doesn’t touch the DOM.
jQuery is a bit “less cool/modern” than other libraries for managing the DOM these days, but not bad practice, and certainly not incompatible with three.js.
I don’t have personal experience with the jQuery/React combination but generally any DOM-manipulating framework…
react
jquery
angular
d3
vue
backbone
…
… will cause some headaches when used alongside another DOM-manipulating framework, unless you’re very careful how you use them. For D3 in particular there are best practices to get around those issues, but for the others I’d suggest just picking one, especially if you’re just getting started on a new project.