import { ContextManager, Observable } from '@zcomponent/core'; import * as THREE from 'three'; import { HP_ShapeId } from '@babylonjs/havok'; import { Group } from '@zcomponent/three/lib/components/Group'; import { ColliderHelper, PhysicsShapeType, Shape, PhysicsMaterial } from '../../index'; import { GLTF, Mesh } from '@zcomponent/three'; export interface ColliderConstructorProps { /** * @zprop * @zdefault Box */ shape: Shape; /** * @zprop * @zvalues nodeids three/Object3D/{Mesh/**,GLTF} */ targetMesh?: string; targetMeshObject?: Mesh | GLTF | THREE.Mesh; } export declare function translateShape(shape: Shape): PhysicsShapeType; /** * A collider that uses a shape to define its collision volume. * This collider should be child of a RigidBody. * @zcomponent * @zgroup Physics * @zicon shapes * @ztag three/Object3D/Physics/Collider * @ztag three/Object3D/Group/Physics/Collider * @zparents three/Object3D/** */ export declare class Collider extends Group { props: ColliderConstructorProps; mesh: Mesh | GLTF | THREE.Mesh | undefined; dirtyFlags: { material: boolean; transform: boolean; }; /** * The type of physics shape used for the collider. */ shape: PhysicsShapeType; /** * Identifier for the shape used in the physics engine. */ shapeId?: HP_ShapeId; /** * A visual representation of the collider for preview purposes in the scene. */ colliderHelper?: ColliderHelper; material: PhysicsMaterial; private _markMaterialDirty; /** * Initializes the collider component with the given context and properties. * @param ctx {ContextManager} The context manager instance. * @param props {ColliderConstructorProps} Properties for the collider initialization. */ constructor(ctx: ContextManager, props: ColliderConstructorProps); private markAsDirty; private resolveMesh; ____setupHelepr: () => void; ready: Observable; getColliderTransforms: (bodyMatrixWorld: THREE.Matrix4) => [[number, number, number], [number, number, number, number], [number, number, number]]; /** * Disposes of the collider component, performing necessary cleanup. */ dispose(): never; shapeIndex: number; }