@mlightcad/three-viewcube
Version:
A highly customizable standalone view cube addon for three.js
53 lines • 1.6 kB
TypeScript
import * as THREE from 'three';
import { FixedPosGizmo, ObjectPosition } from './fixedPosGizmo';
/**
* Options to customize axes
*/
export interface AxesOptions {
/**
* Position of axes
*/
pos?: ObjectPosition;
/**
* Size of area ocupied by view cube. Because width and height of this area is same, it is single value.
* The real size of view cube will be calculated automatically considering rotation.
*/
size?: number;
/**
* Flag to show z-axis
*/
hasZAxis?: boolean;
}
/**
* Default axes option values
*/
export declare const DEFAULT_AXES_OPTIONS: AxesOptions;
/**
* An axis gizmo to visualize the axes in a simple way.
* The X axis is red, the Y axis is green, and the Z axis is blue by default
*/
export declare class AxesGizmo extends FixedPosGizmo {
private axes;
private xText;
private yText;
private zText?;
private hasZAxis;
constructor(camera: THREE.PerspectiveCamera | THREE.OrthographicCamera, renderer: THREE.WebGLRenderer, options: AxesOptions);
/**
* Set color of x-axis and y-axis
* @param xAxisColor color of x-axis
* @param yAxisColor color of y-axis
*/
setLineColors(xAxisColor: THREE.Color, yAxisColor: THREE.Color): this;
/**
* Set text color
* @param color text color
*/
setTextColor(color: THREE.Color): void;
/**
* Free the GPU-related resources allocated by this instance. Call this method whenever this instance
* is no longer used in your app.
*/
dispose(): void;
}
//# sourceMappingURL=axesGizmo.d.ts.map