import { vec3 } from 'gl-matrix'; import { GLfloat3 } from '../tuples'; import { FontFace } from './fontface'; import { GlyphVertices } from './glyphvertices'; import { Label } from './label'; import { Text } from './text'; /** * A Label that can be positioned in 3D space. The unit for positions, size and transformations, is the abstract World * Unit. */ export declare class Position3DLabel extends Label { private static readonly DEFAULT_FONTSIZE_WORLD; /** @see {@link position} */ protected _position: vec3; /** @see {@link direction} */ protected _direction: vec3; /** @see {@link up} */ protected _up: vec3; /** * Constructs a pre-configured 3D-label with given text. Depending on the label type, transformations are applied * once when typesetting (static) or every frame during rendering (dynamic). * @param text - The text that is displayed by this label. * @param type - Either static or dynamic. If static is used, all transformations are baked and modifications to * on any of the label's transformations are expected to occur less often. * @param fontFace - The font face that should be used for that label, or undefined if set later. */ constructor(text: Text, type: Label.Type, fontFace?: FontFace); /** * If altered, creates a position, direction, and up-vector, then prepares the vertex storage and invokes * typesetting. Depending on the label's type (static or dynamic) the transform is stored and applied either during * typesetting (static) or passed as single transform to the vertex shader during rendering (dynamic). */ typeset(force?: boolean): GlyphVertices | undefined; /** * Sets the 3D position of the label's reference point. */ set position(position: vec3 | GLfloat3); get position(): vec3 | GLfloat3; /** * Sets the 3D direction of the label, i.e., the direction of the baseline. */ set direction(direction: vec3 | GLfloat3); get direction(): vec3 | GLfloat3; /** * Sets the up-vector of the label. It should be orthogonal to the direction to ensure that the label is not skewed. */ set up(up: vec3 | GLfloat3); get up(): vec3 | GLfloat3; /** * This unit is used for the font size. This method overrides the super.fontSizeUnit, since `Position3DLabel` only * supports world unit for now. Neither pixel (px) nor point (pt) are supported. * (@see {@link fontSize}) * @param unit - Unit to be used, though, this label type only supports world units. */ set fontSizeUnit(unit: Label.Unit); get fontSizeUnit(): Label.Unit; }