Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TeapotGeometry: Add Documentation #1039

Merged
merged 1 commit into from
Jun 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions types/three/examples/jsm/geometries/TeapotGeometry.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
import { BufferGeometry } from "three";

/**
* {@link TeapotGeometry} tesselates the famous Utah teapot database by Martin Newell.
*
* {@link TeapotGeometry} is an add-on, and must be imported explicitly. See
* [Installation / Addons]{@link https://threejs.org/docs/#manual/en/introduction/Installation}.
*
* @example
* import { TeapotGeometry } from 'three/addons/geometries/TeapotGeometry.js';
*
* const geometry = new TeapotGeometry( 50, 18 );
* const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
* const teapot = new THREE.Mesh( geometry, material );
* scene.add( teapot );
*/
export class TeapotGeometry extends BufferGeometry {
/**
* @param size Relative scale of the teapot. Optional; Defaults to `50`.
* @param segments Number of line segments to subdivide each patch edge. Optional; Defaults to `10`.
* @param bottom Whether the bottom of the teapot is generated or not. Optional; Defaults to `true`.
* @param lid Whether the lid is generated or not. Optional; Defaults to `true`.
* @param body Whether the body is generated or not. Optional; Defaults to `true`.
* @param fitLid Whether the lid is slightly stretched to prevent gaps between the body and lid or not. Optional;
* Defaults to `true`.
* @param blinn Whether the teapot is scaled vertically for better aesthetics or not. Optional; Defaults to `true`.
*/
constructor(
size?: number,
segments?: number,
Expand Down
Loading