1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 04:12:02 +08:00

text align

This commit is contained in:
Kevin Levron 2020-09-17 22:47:32 +02:00
parent 8a5040e9f6
commit 9ceedcdade

View File

@ -15,6 +15,7 @@ export default {
bevelSize: { type: Number, default: 8 },
bevelOffset: { type: Number, default: 0 },
bevelSegments: { type: Number, default: 5 },
align: { type: [Boolean, String], default: false },
},
created() {
const loader = new FontLoader();
@ -32,6 +33,11 @@ export default {
bevelOffset: this.bevelOffset,
bevelSegments: this.bevelSegments,
});
if (this.align === 'center') {
this.geometry.center();
}
this.initMesh();
});
},