🎉Text
hello world!
Let's just define an example
const text = new Text({
"name": "test",//text name
"position": {
"x": 20,
"y": 30
},
"layer": 100,//you don't have to type is automatically set to 100
"color": "yellow",//text color
"rotate": 0,//(you don't have to use it) example: 90
"opacity": 1,//(you don't have to use it) can be max 1 and can be min 0
"text": "Hello world!",
"font": "Futura",//you do not have to enter a font, but you can enter a font
"size": "20px"//instead of px you can use vh fln
})

Position
https://electoriaengine.gitbook.io/api/components/component/scale-and-position#position
Shadow,Rotate,Opacity
https://electoriaengine.gitbook.io/api/components/component/texture#shadow
Update
text.update({
text:"123 FPS"
})
//or
updateData({
name:"text",
text:"123 FPS"
})
Get
console.log(text.get())
console.log(getData("text"))
//Example
console.log(
text.get().text//example: 123 fps
)
Remove
text.remove()
removeData("text")
Last updated