@masatomakino/threejs-position-util
    Preparing search index...

    Function get2DPosition

    • Project 3D world coordinates to 2D screen space. Origin (0,0) is top-left, (canvasW, canvasH) is bottom-right.

      Parameters

      • vec: Vector3

        The 3D world coordinates to project

      • camera: Camera

        The camera used for projection

      • canvasW: number

        The width of the canvas in pixels

      • canvasH: number

        The height of the canvas in pixels

      Returns Vector3

      The 2D screen coordinates with z=0