@playcanvas/web-components
Version:
Web Components for the PlayCanvas Engine
39 lines (38 loc) • 1.16 kB
TypeScript
import { Component } from 'playcanvas';
import { AsyncElement } from '../async-element';
/**
* Represents a component in the PlayCanvas engine.
*
* @category Components
*/
declare class ComponentElement extends AsyncElement {
private _componentName;
private _enabled;
private _component;
/**
* Creates a new ComponentElement instance.
*
* @param componentName - The name of the component.
* @ignore
*/
constructor(componentName: string);
getInitialComponentData(): {};
addComponent(): Promise<void>;
initComponent(): void;
connectedCallback(): Promise<void>;
disconnectedCallback(): void;
get component(): Component | null;
/**
* Sets the enabled state of the component.
* @param value - The enabled state of the component.
*/
set enabled(value: boolean);
/**
* Gets the enabled state of the component.
* @returns The enabled state of the component.
*/
get enabled(): boolean;
static get observedAttributes(): string[];
attributeChangedCallback(name: string, _oldValue: string, newValue: string): void;
}
export { ComponentElement };