Appearance
KBE3D / KBCore / Cesium / BillboardGraphics
类: BillboardGraphics
Describes a two dimensional icon located at the position of the containing Entity. <p> <div align='center'> <img src='/Images/Billboard.png' width='400' height='300' /><br /> Example billboards </div> </p>
参数
Object describing initialization options
属性
definitionChanged
readonlydefinitionChanged:Event
Gets the event that is raised whenever a property or sub-property is changed or modified.
show
show:
Property|undefined
Gets or sets the boolean Property specifying the visibility of the billboard.
image
image:
Property|undefined
Gets or sets the Property specifying the Image, URI, or Canvas to use for the billboard.
scale
scale:
Property|undefined
Gets or sets the numeric Property specifying the uniform scale to apply to the image. A scale greater than <code>1.0</code> enlarges the billboard while a scale less than <code>1.0</code> shrinks it. <p> <div align='center'> <img src='/Images/Billboard.setScale.png' width='400' height='300' /><br/> From left to right in the above image, the scales are <code>0.5</code>, <code>1.0</code>, and <code>2.0</code>. </div> </p>
pixelOffset
pixelOffset:
Property|undefined
Gets or sets the Cartesian2 Property specifying the billboard's pixel offset in screen space from the origin of this billboard. This is commonly used to align multiple billboards and labels at the same position, e.g., an image and text. The screen space origin is the top, left corner of the canvas; <code>x</code> increases from left to right, and <code>y</code> increases from top to bottom. <p> <div align='center'> <table border='0' cellpadding='5'><tr> <td align='center'><code>default</code><br/><img src='/Images/Billboard.setPixelOffset.default.png' width='250' height='188' /></td> <td align='center'><code>b.pixeloffset = new Cartesian2(50, 25);</code><br/><img src='/Images/Billboard.setPixelOffset.x50y-25.png' width='250' height='188' /></td> </tr></table> The billboard's origin is indicated by the yellow point. </div> </p>
eyeOffset
eyeOffset:
Property|undefined
Gets or sets the Cartesian3 Property specifying the billboard's offset in eye coordinates. Eye coordinates is a left-handed coordinate system, where <code>x</code> points towards the viewer's right, <code>y</code> points up, and <code>z</code> points into the screen. <p> An eye offset is commonly used to arrange multiple billboards or objects at the same position, e.g., to arrange a billboard above its corresponding 3D model. </p> Below, the billboard is positioned at the center of the Earth but an eye offset makes it always appear on top of the Earth regardless of the viewer's or Earth's orientation. <p> <div align='center'> <table border='0' cellpadding='5'><tr> <td align='center'><img src='/Images/Billboard.setEyeOffset.one.png' width='250' height='188' /></td> <td align='center'><img src='/Images/Billboard.setEyeOffset.two.png' width='250' height='188' /></td> </tr></table> <code>b.eyeOffset = new Cartesian3(0.0, 8000000.0, 0.0);</code> </div> </p>
horizontalOrigin
horizontalOrigin:
Property|undefined
Gets or sets the Property specifying the HorizontalOrigin.
verticalOrigin
verticalOrigin:
Property|undefined
Gets or sets the Property specifying the VerticalOrigin.
heightReference
heightReference:
Property|undefined
Gets or sets the Property specifying the HeightReference.
color
color:
Property|undefined
Gets or sets the Property specifying the Color that is multiplied with the <code>image</code>. This has two common use cases. First, the same white texture may be used by many different billboards, each with a different color, to create colored billboards. Second, the color's alpha component can be used to make the billboard translucent as shown below. An alpha of <code>0.0</code> makes the billboard transparent, and <code>1.0</code> makes the billboard opaque. <p> <div align='center'> <table border='0' cellpadding='5'><tr> <td align='center'><code>default</code><br/><img src='/Images/Billboard.setColor.Alpha255.png' width='250' height='188' /></td> <td align='center'><code>alpha : 0.5</code><br/><img src='/Images/Billboard.setColor.Alpha127.png' width='250' height='188' /></td> </tr></table> </div> </p>
rotation
rotation:
Property|undefined
Gets or sets the numeric Property specifying the rotation of the image counter clockwise from the <code>alignedAxis</code>.
alignedAxis
alignedAxis:
Property|undefined
Gets or sets the Cartesian3 Property specifying the unit vector axis of rotation in the fixed frame. When set to Cartesian3.ZERO the rotation is from the top of the screen.
sizeInMeters
sizeInMeters:
Property|undefined
Gets or sets the boolean Property specifying if this billboard's size will be measured in meters.
width
width:
Property|undefined
Gets or sets the numeric Property specifying the width of the billboard in pixels. When undefined, the native width is used.
height
height:
Property|undefined
Gets or sets the numeric Property specifying the height of the billboard in pixels. When undefined, the native height is used.
scaleByDistance
scaleByDistance:
Property|undefined
Gets or sets NearFarScalar Property specifying the scale of the billboard based on the distance from the camera. A billboard's scale will interpolate between the NearFarScalar#nearValue and NearFarScalar#farValue while the camera distance falls within the lower and upper bounds of the specified NearFarScalar#near and NearFarScalar#far. Outside of these ranges the billboard's scale remains clamped to the nearest bound.
translucencyByDistance
translucencyByDistance:
Property|undefined
Gets or sets NearFarScalar Property specifying the translucency of the billboard based on the distance from the camera. A billboard's translucency will interpolate between the NearFarScalar#nearValue and NearFarScalar#farValue while the camera distance falls within the lower and upper bounds of the specified NearFarScalar#near and NearFarScalar#far. Outside of these ranges the billboard's translucency remains clamped to the nearest bound.
pixelOffsetScaleByDistance
pixelOffsetScaleByDistance:
Property|undefined
Gets or sets NearFarScalar Property specifying the pixel offset of the billboard based on the distance from the camera. A billboard's pixel offset will interpolate between the NearFarScalar#nearValue and NearFarScalar#farValue while the camera distance falls within the lower and upper bounds of the specified NearFarScalar#near and NearFarScalar#far. Outside of these ranges the billboard's pixel offset remains clamped to the nearest bound.
imageSubRegion
imageSubRegion:
Property|undefined
Gets or sets the Property specifying a BoundingRectangle that defines a sub-region of the <code>image</code> to use for the billboard, rather than the entire image, measured in pixels from the bottom-left.
distanceDisplayCondition
distanceDisplayCondition:
Property|undefined
Gets or sets the DistanceDisplayCondition Property specifying at what distance from the camera that this billboard will be displayed.
disableDepthTestDistance
disableDepthTestDistance:
Property|undefined
Gets or sets the distance from the camera at which to disable the depth test to, for example, prevent clipping against terrain. When set to zero, the depth test is always applied. When set to Number.POSITIVE_INFINITY, the depth test is never applied.
splitDirection
splitDirection:
Property|undefined
Gets or sets the Property specifying the SplitDirection of this billboard.
方法
clone()
clone(
result?:BillboardGraphics):BillboardGraphics
Duplicates this instance.
参数
result?
BillboardGraphics
The object onto which to store the result.
返回
BillboardGraphics
The modified result parameter or a new instance if one was not provided.
merge()
merge(
source:BillboardGraphics):void
Assigns each unassigned property on this object to the value of the same property on the provided source object.
参数
source
BillboardGraphics
The object to be merged into this object.
返回
void
构造函数
构造函数
new BillboardGraphics(
options?:ConstructorOptions):BillboardGraphics
参数
options?
返回
BillboardGraphics
