Created
March 9, 2022 18:38
-
-
Save juanigallo/28f21d5ec1728a2d8c16729556df5f92 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Instanciamos una nueva entidad | |
const nameEntity = new Entity(); | |
// Instanciamos un texto con el valor @JuaniGallo | |
const myName = new TextShape("@JuaniGallo"); | |
// Asociamos nuestro nombre a la entidad que creamos al principio | |
nameEntity.addComponent(myName); | |
// Posicionamos nuestra entidad principal | |
nameEntity.addComponent(new Transform({ position: new Vector3(8, 1, 8) })); | |
// Asociamos la entidad al engine | |
engine.addEntity(nameEntity); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment