fix model/group center (inverted y). add html dom builder
This commit is contained in:
parent
cb742237b0
commit
3dbd1e85a8
3 changed files with 123 additions and 16 deletions
|
|
@ -45,16 +45,19 @@ mesh.model = class MeshModel {
|
|||
floor() {
|
||||
let b = this.bounds();
|
||||
this.move(0, 0, -b.min.z);
|
||||
return this;
|
||||
}
|
||||
|
||||
centerXY() {
|
||||
let b = this.bounds();
|
||||
this.move(-b.center.x, -b.center.y, 0);
|
||||
this.move(-b.center.x, b.center.y, 0);
|
||||
return this;
|
||||
}
|
||||
|
||||
move(x = 0, y = 0, z = 0) {
|
||||
let pos = this.position();
|
||||
pos.set(pos.x + x, pos.y + y, pos.z + z);
|
||||
return this;
|
||||
}
|
||||
|
||||
position() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue