Appearance
KBE3D / KBCore / Cesium / GeometryPipeline / projectTo2D
函数: projectTo2D()
projectTo2D(
geometry:Geometry,attributeName:string,attributeName3D:string,attributeName2D:string,projection?:any):Geometry
Projects a geometry's 3D <code>position</code> attribute to 2D, replacing the <code>position</code> attribute with separate <code>position3D</code> and <code>position2D</code> attributes. <p> If the geometry does not have a <code>position</code>, this function has no effect. </p>
参数
geometry
The geometry to modify.
attributeName
string
The name of the attribute.
attributeName3D
string
The name of the attribute in 3D.
attributeName2D
string
The name of the attribute in 2D.
projection?
any
The projection to use.
返回
The modified geometry argument with position3D and position2D attributes.
示例
ts
geometry = Cesium.GeometryPipeline.projectTo2D(geometry, 'position', 'position3D', 'position2D');