Scale X and Scale Y
You can scale the prop by x-axis or/and y-axis.
By default, a prop's scaleX and scaleY are both set to 1.
- Global Config Generator
- Config
new GlobalConfigGenerator()
.addProp((generator) => {
generator.type('TABLE').addPosition((positionGenerator) => {
positionGenerator.x(50).y(50).scaleY(2)
}).addPosition((positionGenerator) => {
positionGenerator.x(90).y(90).scaleX(2)
}, 2).addPosition((positionGenerator) => {
positionGenerator.x(90).y(90).scale(2)
}, 3).shouldDisplayName(false)
})
.addProp((generator) => {
generator.type('CHARACTER').addPosition((positionGenerator) => {
positionGenerator.x(200).y(200).scale(0.5)
}).addPosition((positionGenerator) => {
positionGenerator.x(50).y(50).scale(2)
}, 2).addPosition((positionGenerator) => {
positionGenerator.x(90).y(90).scale(1)
}, 3)
})
config.props = [
{
"frameAnimationConfig": {
"1": {
"x": 50,
"y": 50,
"scaleY": 2
},
"2": {
"x": 90,
"y": 90,
"scaleX": 2
},
"3": {
"x": 90,
"y": 90,
"scaleX": 2,
"scaleY": 2
}
},
"type": "TABLE",
"shouldDisplayName": false
},
{
"frameAnimationConfig": {
"1": {
"x": 200,
"y": 200,
"scaleX": 0.5,
"scaleY": 0.5
},
"2": {
"x": 50,
"y": 50,
"scaleX": 2,
"scaleY": 2
},
"3": {
"x": 90,
"y": 90,
"scaleX": 1,
"scaleY": 1
}
},
"type": "CHARACTER"
}
]