Function useFiveProject2d

  • Five Vue Hooks: 计算三维坐标对应到屏幕二维坐标

    Returns Project2d

    project2d

    计算三维坐标对应到屏幕二维坐标
    `useFiveProject2d()` 通过 watch 监听入参和 cameraUpdate 变化自动更新返回值
    多次调用时会创建多个 watch 监听推荐 const { project2d } = useFiveAction();
    // param vector 三维的坐标
    // param testModel 是否和模型检测,如果检测,则被模型遮挡会返回 null
    // returns 三维的坐标 或者 null
    project2d(vector: THREE.Vector3 | Ref<THREE.Vector3>, testModel: boolean)
    v2: Ref<THREE.Vector2 | null>
    const project2d  = useFiveProject2d();
    project2d(new THREE.Vector3(0, 0, 0));