mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 04:12:02 +08:00
text align
This commit is contained in:
parent
8a5040e9f6
commit
9ceedcdade
@ -15,6 +15,7 @@ export default {
|
|||||||
bevelSize: { type: Number, default: 8 },
|
bevelSize: { type: Number, default: 8 },
|
||||||
bevelOffset: { type: Number, default: 0 },
|
bevelOffset: { type: Number, default: 0 },
|
||||||
bevelSegments: { type: Number, default: 5 },
|
bevelSegments: { type: Number, default: 5 },
|
||||||
|
align: { type: [Boolean, String], default: false },
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
const loader = new FontLoader();
|
const loader = new FontLoader();
|
||||||
@ -32,6 +33,11 @@ export default {
|
|||||||
bevelOffset: this.bevelOffset,
|
bevelOffset: this.bevelOffset,
|
||||||
bevelSegments: this.bevelSegments,
|
bevelSegments: this.bevelSegments,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (this.align === 'center') {
|
||||||
|
this.geometry.center();
|
||||||
|
}
|
||||||
|
|
||||||
this.initMesh();
|
this.initMesh();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user