@playcanvas/web-components
Version:
Web Components for the PlayCanvas Engine
88 lines (87 loc) • 2.54 kB
TypeScript
import { RigidBodyComponent, Vec3 } from 'playcanvas';
import { ComponentElement } from './component';
/**
* The RigidBodyComponentElement interface provides properties and methods for manipulating
* {@link https://developer.playcanvas.com/user-manual/web-components/tags/pc-rigidbody/ | `<pc-rigidbody>`} elements.
* The RigidBodyComponentElement interface also inherits the properties and methods of the
* {@link HTMLElement} interface.
*
* @category Components
*/
declare class RigidBodyComponentElement extends ComponentElement {
/**
* The angular damping of the rigidbody.
*/
private _angularDamping;
/**
* The angular factor of the rigidbody.
*/
private _angularFactor;
/**
* The friction of the rigidbody.
*/
private _friction;
/**
* The linear damping of the rigidbody.
*/
private _linearDamping;
/**
* The linear factor of the rigidbody.
*/
private _linearFactor;
/**
* The mass of the rigidbody.
*/
private _mass;
/**
* The restitution of the rigidbody.
*/
private _restitution;
/**
* The rolling friction of the rigidbody.
*/
private _rollingFriction;
/**
* The type of the rigidbody.
*/
private _type;
/** @ignore */
constructor();
getInitialComponentData(): {
angularDamping: number;
angularFactor: Vec3;
friction: number;
linearDamping: number;
linearFactor: Vec3;
mass: number;
restitution: number;
rollingFriction: number;
type: string;
};
/**
* Gets the underlying PlayCanvas rigidbody component.
* @returns The rigidbody component.
*/
get component(): RigidBodyComponent | null;
set angularDamping(value: number);
get angularDamping(): number;
set angularFactor(value: Vec3);
get angularFactor(): Vec3;
set friction(value: number);
get friction(): number;
set linearDamping(value: number);
get linearDamping(): number;
set linearFactor(value: Vec3);
get linearFactor(): Vec3;
set mass(value: number);
get mass(): number;
set restitution(value: number);
get restitution(): number;
set rollingFriction(value: number);
get rollingFriction(): number;
set type(value: string);
get type(): string;
static get observedAttributes(): string[];
attributeChangedCallback(name: string, _oldValue: string, newValue: string): void;
}
export { RigidBodyComponentElement };