3 ms·
I think they used it more as an analogy: components fill a similar role as properties do in JavaScript.
by spoiler 2y ago
I think they used it more as an analogy: components fill a similar role as properties do in JavaScript.
- CaptainOfCoit 2y agoBut that's not really true either, is it? You don't query properties in JavaScript, at best you query for Objects of a certain shape/name. You don't encapsulate data in properties so one object has many different behavior based on those, you either split the Object into many different ones and have one parent, or you mix the behavior into the same Object.
- spoiler 2y agoYeah I it's not right. Although, it's a decent early mental model for a JS dev learning ECS to adopt until better intuition develops!