3d-assets

3D Assets

Round Box

This generator creates a rounded box. It is used as a building block of most of the other models. Click on a snapshot to open it online.

Code example

import { RoundBox } from "3d-assets/round-box.js";

var model = new RoundBox ({
	x: 1,
	y: 1,
	z: 1,

	f0: true,
	f1: true,
	f2: true,
	f3: true,
	f4: true,
	f5: true,

	r0: true,
	r1: true,
	r2: true,
	r3: true,
	r4: true,
	r5: true,

	c0: true,
	c1: true,
	c2: true,
	c3: true,
	c4: true,
	c5: true,

	roundness:   .2,
	roundDetail:  3,
	flat:        false,
	simple:      false,
});

Parameters

General parameters

Complexity Parameters

Internal structure

An instance of RoundBox is a THREE.Group with one submesh.

Minimal example

demos/minimal-round-box.html

Online generator

online/round-box.html

Source

src/round-box.js

Home