You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the current ECS we are treating the resources as components (Materials, DCLTexture...etc) and that is creating something different from a pure ECS, because some components need other components to work. For example, a PBRMaterial component needs a shape component to work.
I think that we should separate the resources from the components since we are coupling component dependency.
Open question
Should we keep them this way or treat them as a totally different thing?
Things to have into account
We should give the devs complete control of the resources so they can load/unload as they want.
Devs should be able to prewarm a resource if they want to
Code example
Right now we are assign a material this way
`const myMaterial = new Material()
myMaterial.albedoColor = Color3.Blue()
myMaterial.roughness = 1
myMaterial.specularIntensity = 0
myMaterial.metallic = 0
const entity = new Entity()
entity.addComponent(myMaterial)`
It can look something like this
`const myMaterial = new Material()
myMaterial.albedoColor = Color3.Blue()
myMaterial.roughness = 1
myMaterial.specularIntensity = 0
myMaterial.metallic = 0
const entity = new Entity()
const planeShape = new PlaneShape()
planeShape.setMaterial(myMaterial)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Context
In the current ECS we are treating the resources as components (Materials, DCLTexture...etc) and that is creating something different from a pure ECS, because some components need other components to work. For example, a PBRMaterial component needs a shape component to work.
I think that we should separate the resources from the components since we are coupling component dependency.
Open question
Should we keep them this way or treat them as a totally different thing?
Things to have into account
Code example
Right now we are assign a material this way
`const myMaterial = new Material()
myMaterial.albedoColor = Color3.Blue()
myMaterial.roughness = 1
myMaterial.specularIntensity = 0
myMaterial.metallic = 0
const entity = new Entity()
entity.addComponent(myMaterial)`
It can look something like this
`const myMaterial = new Material()
myMaterial.albedoColor = Color3.Blue()
myMaterial.roughness = 1
myMaterial.specularIntensity = 0
myMaterial.metallic = 0
const entity = new Entity()
const planeShape = new PlaneShape()
planeShape.setMaterial(myMaterial)
entity.addComponent(planeShape)`
1 vote ·
All reactions