UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

45 lines (44 loc) 1.96 kB
import { CoreObjectType, ObjectContent } from '../../geometry/ObjectContent'; import { Object3D } from 'three'; import type { CSS2DObject } from './CSS2DObject'; import type { CSS3DObject } from './CSS3DObject'; export declare enum CSSObjectAttribute { ID = "htmlId", CLASS = "htmlClass", HTML = "html", COPY_ATTRIBUTES = "htmlCopyAttributes", ATTRIBUTES_TO_COPY = "htmlAttributesToCopy", SCALE = "htmlScale" } export declare const DEFAULT_CSS2DOBJECT: { id: string; className: string; html: string; }; export declare const DEFAULT_CSS3DOBJECT: { id: string; className: string; html: string; }; export declare class CoreCSSObjectAttribute { static setElementId(object: ObjectContent<CoreObjectType>, value: string): void; static getElementId(object: ObjectContent<CoreObjectType>): string; static setElementClass(object: ObjectContent<CoreObjectType>, value: string): void; static getElementClass(object: ObjectContent<CoreObjectType>): string; static setElementHTML(object: ObjectContent<CoreObjectType>, value: string): void; static getElementHTML(object: ObjectContent<CoreObjectType>): string; static setCopyAttributes(object: ObjectContent<CoreObjectType>, value: boolean): void; static getCopyAttributes(object: ObjectContent<CoreObjectType>): boolean; static setAttributesToCopy(object: ObjectContent<CoreObjectType>, value: string): void; static getAttributesToCopy(object: ObjectContent<CoreObjectType>): string; static setScale(object: ObjectContent<CoreObjectType>, value: number): void; static getScale(object: ObjectContent<CoreObjectType>): number; } interface CopyAttributesOptions { CSSObject: CSS2DObject | CSS3DObject; copyAttributes: boolean; attributesToCopy: string[]; object: Object3D; } export declare function CSSObjectElementCopyObjectAttributes(element: HTMLElement, options: CopyAttributesOptions): void; export {};