| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- import type { CSSUnitValue } from '../css';
- import type { DisplayObjectConfig } from '../dom';
- import { AABB } from '../shapes';
- import type { BaseStyleProps, ParsedBaseStyleProps } from '../types';
- import { DisplayObject } from './DisplayObject';
- export interface HTMLStyleProps extends BaseStyleProps {
- x?: number | string;
- y?: number | string;
- innerHTML: string | HTMLElement;
- width?: number | string;
- height?: number | string;
- }
- export interface ParsedHTMLStyleProps extends ParsedBaseStyleProps {
- x: CSSUnitValue;
- y: CSSUnitValue;
- $el: HTMLElement;
- innerHTML: string | HTMLElement;
- width: CSSUnitValue;
- height: CSSUnitValue;
- }
- /**
- * HTML container
- * @see https://github.com/pmndrs/drei#html
- */
- export declare class HTML extends DisplayObject<HTMLStyleProps, ParsedHTMLStyleProps> {
- constructor({ style, ...rest }?: DisplayObjectConfig<HTMLStyleProps>);
- /**
- * return wrapper HTMLElement
- * * <div> in g-webgl/canvas
- * * <foreignObject> in g-svg
- */
- getDomElement(): HTMLElement;
- /**
- * override with $el.getBoundingClientRect
- * @see https://developer.mozilla.org/zh-CN/docs/Web/API/Element/getBoundingClientRect
- */
- getBoundingClientRect(): DOMRect;
- getClientRects(): DOMRect[];
- getBounds(): AABB;
- getLocalBounds(): AABB;
- }
- //# sourceMappingURL=HTML.d.ts.map
|