@playcanvas/web-components
Version:
Web Components for the PlayCanvas Engine
49 lines (48 loc) • 1.61 kB
TypeScript
import { GSplatComponent } from 'playcanvas';
import { ComponentElement } from './component';
/**
* The SplatComponentElement interface provides properties and methods for manipulating
* {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-splat/ | `<pc-splat>`} elements.
* The SplatComponentElement interface also inherits the properties and methods of the
* {@link HTMLElement} interface.
*
* @category Components
*/
declare class SplatComponentElement extends ComponentElement {
private _asset;
private _castShadows;
/** @ignore */
constructor();
getInitialComponentData(): {
asset: import("playcanvas").Asset | null | undefined;
castShadows: boolean;
};
/**
* Gets the underlying PlayCanvas splat component.
* @returns The splat component.
*/
get component(): GSplatComponent | null;
/**
* Sets id of the `pc-asset` to use for the splat.
* @param value - The asset ID.
*/
set asset(value: string);
/**
* Gets the id of the `pc-asset` to use for the splat.
* @returns The asset ID.
*/
get asset(): string;
/**
* Sets whether the splat casts shadows.
* @param value - Whether the splat casts shadows.
*/
set castShadows(value: boolean);
/**
* Gets whether the splat casts shadows.
* @returns Whether the splat casts shadows.
*/
get castShadows(): boolean;
static get observedAttributes(): string[];
attributeChangedCallback(name: string, _oldValue: string, newValue: string): void;
}
export { SplatComponentElement };