3d-assets

3D Assets

Wardrobe

This generator creates a 3D wardrobe. A set of parameters control the size and the shape of the wardrobe. It is possible to generale low-poly wardrobe by reducing its complexity, removing edges and using flat shading. Click on a snapshot to open it online.

Code example

import { Wardrobe } from "3d-assets/wardrobe.js";

var model = new Wardrobe ({
	wings: 2,
	wingWidth: 40,
	height: 150,
	thickness: 1.5,
	depth: 40,
	doorRoundness: .005,
	doorAngle: 0,
	handleThickness: 0.5,
	handleSize: 10,
	handleRoundDetail: 1,
	doorRoundDetail: 1,
	flat: false,
	simple: false,
});

Parameters

General parameters

Doors parameters

Handles parameters

Complexity parameters

Internal structure

An instance of Wardrobe is a THREE.Group with one submesh called body and wings subgroups called Door_<i>. Each subgroup contains two submeshes called door_<i> and handle_<i>.

Minimal example

demos/minimal-wardrobe.html

Online generator

online/wardrobe.html

Source

src/wardrobe.js

Home