jjavideo3d
v1.1.3
Published
cesium地图视频投射
Readme
Cesium视频投射示例
用法
import { VideoLayer } from 'jjavideo3d'
const video3d = new VideoLayer(viewer, {
position: { x: 117.21, y: 31.36, z: 500, },//视锥顶点坐标
rotation: { x: -90, y: 20, },//x:视锥俯仰角(0度视锥水平,-90垂直于地面);y:视锥偏航角
far: 1000,//视锥顶点到底面的长度
near: 0.01,//视锥顶点到近面的长度
url: videoHTMLDom,//video标签/图片url
FrustumShow: true,//是否展示视锥
aspectRatio: e.aspectRatio,//视锥底面长宽比
fov: e.fov,//aspectRatio>=1,视锥水平视场角;aspectRatio<1,视锥垂直视场角
lineColor: '#28e1cb',//视锥棱线的颜色
type: 1,//type:1视频投射,type:2图片投射
debug: true,//是否展示gui界面调试
wallCorrect: 10,//视频墙离视锥底面距离(大于0视频墙逐渐靠近视锥中心)
})更新位置,角度,颜色等等参数
video3d.DoChange({
rotation: { x: this.options_gui.x, y: this.options_gui.y },
position: { x: this.options_gui.cX, y: this.options_gui.cY, z: this.options_gui.cH },
fov: this.options_gui.fov,
aspectRatio: this.options_gui.aspectRatio,
near: this.options_gui.near,
far: this.options_gui.far,
lineColor: this.options_gui.lineColor,
wallCorrect: this.options_gui.wallCorrect,
})展示,隐藏,销毁
video3d.Show()
video3d.Hide()
video3d.Destory()
效果

