Enable, Disable and Hide
You can enable/disable or hide a prop at any frame:
- Enable/Disable affects the prop's icon style
- Hide/Show affects the prop's opacity
By default, a prop's enabled
with opacity set to 1
.
- Global Config Generator
- Config
new GlobalConfigGenerator()
.addProp((generator) => {
generator.type('TABLE').addPosition((positionGenerator) => {
positionGenerator.x(50).y(50).hide()
}).addPosition((positionGenerator) => {
positionGenerator.x(90).y(90).show()
}, 2).addPosition((positionGenerator) => {
positionGenerator.x(90).y(90)
}, 3).addPosition((positionGenerator) => {
positionGenerator.x(90).y(90).hide()
}, 4).shouldDisplayName(false)
})
.addProp((generator) => {
generator.type('CHARACTER').addPosition((positionGenerator) => {
positionGenerator.x(200).y(200).enable()
}).addPosition((positionGenerator) => {
positionGenerator.x(50).y(50).disable()
}, 2).addPosition((positionGenerator) => {
positionGenerator.x(90).y(90).disable()
}, 3).addPosition((positionGenerator) => {
positionGenerator.x(90).y(90).disable()
}, 4)
})
config.props = [
{
"frameAnimationConfig": {
"1": {
"x": 50,
"y": 50,
"hide": true
},
"2": {
"x": 90,
"y": 90,
"hide": false
},
"3": {
"x": 90,
"y": 90
},
"4": {
"x": 90,
"y": 90,
"hide": true
}
},
"type": "TABLE",
"shouldDisplayName": false
},
{
"frameAnimationConfig": {
"1": {
"x": 200,
"y": 200,
"enabled": true
},
"2": {
"x": 50,
"y": 50,
"enabled": false
},
"3": {
"x": 90,
"y": 90,
"enabled": false
},
"4": {
"x": 90,
"y": 90,
"enabled": false
}
},
"type": "CHARACTER"
}
]