melonJS
    Preparing search index...

    Interface MeshHit

    Where a Ray3d hit a mesh: what Mesh#intersectRay and Camera3d#pick return, and what a pointer event on a mesh under a Camera3d carries as pointer.hit3d.

    interface MeshHit {
        distance: number;
        instance: number;
        normal: Vector3d;
        point: Vector3d;
        renderable: Renderable;
        triangle: number;
    }
    Index
    distance: number

    how far along the ray, i.e. from the camera for a camera ray

    instance: number

    which instance of an InstancedMesh was hit, -1 for any other mesh

    normal: Vector3d

    the surface's world-space normal there, of unit length, facing the ray

    point: Vector3d

    the world-space point where the ray met its surface

    renderable: Renderable

    the mesh that was hit (for a GLTFModel, the part)

    triangle: number

    which triangle was hit: its first index is indices[triangle * 3]