# 视频处理

fast3d.VideoPlugin是实体类,提供视频融合等视频处理功能。

# 视频融合

# 使用示例

this.videoShed =new fast3d.VideoPlugin.VideoShed(viewer,
{
    position: {
        x:117.301249,
        y: 39.08378,
        z: 9
    },
    rotation: {
        y: -33,
        x: -8
    },
    far: 1000,//视距
    fov:30,//视角
    alpha: 1,
    near: 0.5,
    aspectRatio:0.5625,
    url: 'http://localhost:88/data/video/视频融合/东南角1/东南角.mp4',
    debugFrustum: true//是否显示投影线
})

# 创建对象

创建示例 说明
fast3d.VideoPlugin.VideoShed(viewer,options) 根据相关参数创建视频融合

# Options参数选项

Option参数 参数类型 默认值 说明
position Object 必须传入 相机坐标
position:{
    x:117.301249,//经度
    y: 39.08378,//纬度
    z: 9//高度
}
rotation Object 必须传入 相机视角
rotation: {
    x: -8,
    y: -33
}
near Number 0.1 近视距
far Number 必须传入 远视距
fov Number 必须传入 视场角
alpha Number 必须传入 视频透明度
aspectRatio Number 必须传入 视频纵横比
url String 必须传入 视频地址
debugFrustum Boolean 必须传入 是否显示投影线

# 方法

方法名 返回值 说明
get() VideoShed.prototype 获取属性值,console.log(VideoShed.alpha);
set(VideoShed.prototype) 赋予属性值并更新视频融合状态,VideoShed.alpha = 0.5;
deActiveVideo 移除视频
activeVideo(String url) 更新视频
Last Updated: 6/24/2024, 3:05:32 PM