I am currently developing a game engine interface written in JavaScript and ReactJS.
If the game object has a texture, the texture source will be displayed on the game object. For this, for the game object, you must have a link to the texture or, more specifically, to the source of the texture. I hope you have a JSX snippet like the following.
<GameObject> <Texture source="myimage.png" /> </GameObject>
The best solution I could get to get the link is to have the texture as a support, for example:
<GameObject texture={<Texture source="myimage.png" />} />
If the terminology specific to the game engine is too confusing, think of it as the caption component inside the button component, where the title component has specific data that the button should access.
My question boils down to the following: is it possible to access the childβs shoulder after the children were installed without hacks or were anti-patterns?
javascript reactjs
Johannes Stein
source share