[page:BufferGeometry] →

[name]

[name] tesselates the famous Utah teapot database by Martin Newell.

Import

[name] is an add-on, and must be imported explicitly. See [link:#manual/introduction/Installation Installation / Addons].

import { TeapotGeometry } from 'three/addons/geometries/TeapotGeometry.js';

Code Example

const geometry = new TeapotGeometry( 50, 18 ); const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } ); const teapot = new THREE.Mesh( geometry, material ); scene.add( teapot );

Constructor

[name]([param:Integer size], [param:Integer segments], [param:Boolean bottom], [param:Boolean lid], [param:Boolean body], [param:Boolean fitLid], [param:Boolean blinn])

size — Relative scale of the teapot. Optional; Defaults to `50`.
segments — Number of line segments to subdivide each patch edge. Optional; Defaults to `10`.
bottom — Whether the bottom of the teapot is generated or not. Optional; Defaults to `true`.
lid — Whether the lid is generated or not. Optional; Defaults to `true`.
body — Whether the body is generated or not. Optional; Defaults to `true`.
fitLid — Whether the lid is slightly stretched to prevent gaps between the body and lid or not. Optional; Defaults to `true`.
blinn — Whether the teapot is scaled vertically for better aesthetics or not. Optional; Defaults to `true`.

Properties

See the base [page:BufferGeometry] class for common properties.

Methods

See the base [page:BufferGeometry] class for common methods.

Source

[link:https://github.com/mrdoob/three.js/blob/master/examples/jsm/geometries/TeapotGeometry.js examples/jsm/geometries/TeapotGeometry.js]