Johnsmith0508 / cubes

Node.Js, Socket.io, Cannon.js & Three.js working together with redis and mysql

Home Page:https://dynalogic.org/node

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hacky solution to a dumb issue

Johnsmith0508 opened this issue · comments

for reference, see 9326567

due to the async nature of THREE's model loaders, when clientjs:430 creates the new Item, the model is not always created yet. To combat this issue, a dummy model is made, with only a .clone() function, to satisfy the needs of the constructor. This solution is a terrible Idea, for one because it is a hack required for many implementations of the API. It also could cause other issues down the line, due thinking the model exists, when it does not.

TL;DR
created dummy model to satisfy a constructor. don't do that