婷婷久久网-婷婷久久久久-婷婷久久久-婷婷久-国产微拍精品一区-国产网址在线观看

Label

標(biāo)簽將繪制定位在三維場(chǎng)景中的視區(qū)對(duì)齊文本。不應(yīng)直接使用此構(gòu)造函數(shù),而應(yīng)通過調(diào)用LabelCollection#add來創(chuàng)建標(biāo)簽。
new Label()
Throws
  • DeveloperError : translucencybydistance.far必須大于translucencybydistance.near。
  • DeveloperError : pixeloffsetscaleByDistance.far必須大于pixeloffsetscaleByDistance.near。
  • DeveloperError : 距離displayCondition.far必須大于距離displayCondition.near
See:

Members

(static) enableRightToLeftDetection : Boolean

確定是否運(yùn)行與標(biāo)簽文本從右向左語言匹配的算法
Default Value: false
Examples:
// Example 1.
// Set a label's rightToLeft before init
bmgl.Label.enableRightToLeftDetection = true;
var myLabelEntity = viewer.entities.add({
  label: {
    id: 'my label',
    text: '?? ???? ?????? \n ?????? ?????? ????',
  }
});
// Example 2.
var myLabelEntity = viewer.entities.add({
  label: {
    id: 'my label',
    text: 'English text'
  }
});
// Set a label's rightToLeft after init
bmgl.Label.enableRightToLeftDetection = true;
myLabelEntity.text = '???? ???';

backgroundColor : Color

獲取或設(shè)置此標(biāo)簽的背景色。
Default Value: new Color(0.165, 0.165, 0.165, 0.8)

backgroundPadding : Cartesian2

獲取或設(shè)置此標(biāo)簽的背景填充(以像素為單位)。x值控制水平填充,y值控制垂直填充。
Default Value: new Cartesian2(7, 5)

disableDepthTestDistance : Number

獲取或設(shè)置與要禁用深度測(cè)試的照相機(jī)之間的距離,例如,防止對(duì)地形進(jìn)行剪切。當(dāng)設(shè)置為零時(shí),始終應(yīng)用深度測(cè)試。當(dāng)設(shè)置為數(shù)字正無窮大時(shí),深度測(cè)試永遠(yuǎn)不會(huì)應(yīng)用。

distanceDisplayCondition : DistanceDisplayCondition

獲取或設(shè)置條件,該條件指定此標(biāo)簽將顯示在距相機(jī)的距離處。
Default Value: undefined

eyeOffset : Cartesian3

獲取和設(shè)置在眼坐標(biāo)中應(yīng)用于此標(biāo)簽的三維笛卡爾偏移量。眼睛坐標(biāo)系是左手坐標(biāo)系,其中x指向觀看者的右側(cè),y指向上方,z指向屏幕。眼睛坐標(biāo)使用與世界和模型坐標(biāo)相同的比例,通常是米。

眼睛偏移通常用于在同一位置排列多個(gè)標(biāo)簽或?qū)ο螅纾谄鋵?duì)應(yīng)的3D模型上方排列標(biāo)簽。

下面,標(biāo)簽位于地球中心,但眼睛偏移使其始終出現(xiàn)在地球頂部,無論觀眾或地球的方向如何。

l.eyeOffset = new Cartesian3(0.0, 8000000.0, 0.0);

Default Value: Cartesian3.ZERO

fillColor : Color

獲取或設(shè)置此標(biāo)簽的填充顏色。
Default Value: Color.WHITE
See:

font : String

獲取或設(shè)置用于繪制此標(biāo)簽的字體。使用與CSS“字體”屬性相同的語法指定字體。
Default Value: '30px sans-serif'
See:

heightReference : HeightReference

獲取或設(shè)置此公告牌的高度引用。
Default Value: HeightReference.NONE

horizontalOrigin : HorizontalOrigin

獲取或設(shè)置此標(biāo)簽的水平原點(diǎn),該原點(diǎn)確定標(biāo)簽是繪制到其定位點(diǎn)位置的左側(cè)、中心還是右側(cè)。


Default Value: HorizontalOrigin.LEFT
Example:
// Use a top, right origin
l.horizontalOrigin = bmgl.HorizontalOrigin.RIGHT;
l.verticalOrigin = bmgl.VerticalOrigin.TOP;

id : *

獲取或設(shè)置拾取標(biāo)簽時(shí)返回的用戶定義值。

outlineColor : Color

獲取或設(shè)置此標(biāo)簽的大綱顏色。
Default Value: Color.BLACK
See:

outlineWidth : Number

獲取或設(shè)置此標(biāo)簽的輪廓寬度。
Default Value: 1.0
See:

pixelOffset : Cartesian2

獲取或設(shè)置屏幕空間中距此標(biāo)簽原點(diǎn)的像素偏移量。這通常用于在同一位置對(duì)齊多個(gè)標(biāo)簽和廣告牌,例如圖像和文本。屏幕空間原點(diǎn)是畫布的左上角;x從左到右增加,y從上到下增加。

default
l.pixeloffset = new Cartesian2(25, 75);
標(biāo)簽的原點(diǎn)用黃色點(diǎn)表示。
Default Value: Cartesian2.ZERO

pixelOffsetScaleByDistance : NearFarScalar

獲取或設(shè)置基于標(biāo)簽與相機(jī)的距離的標(biāo)簽的近像素和遠(yuǎn)像素偏移縮放屬性。標(biāo)簽的像素偏移量將在NearFarScalar#nearValueNearFarScalar#farValue之間縮放,而相機(jī)距離在指定NearFarScalar#nearNearFarScalar#far的上下限內(nèi)。在這些范圍之外,標(biāo)簽的像素偏移比例保持固定到最近的界限。如果未定義,將禁用PixeLoffSetscaleByDistance。
Examples:
// Example 1.
// Set a label's pixel offset scale to 0.0 when the
// camera is 1500 meters from the label and scale pixel offset to 10.0 pixels
// in the y direction the camera distance approaches 8.0e6 meters.
text.pixelOffset = new bmgl.Cartesian2(0.0, 1.0);
text.pixelOffsetScaleByDistance = new bmgl.NearFarScalar(1.5e2, 0.0, 8.0e6, 10.0);
// Example 2.
// disable pixel offset by distance
text.pixelOffsetScaleByDistance = undefined;

position : Cartesian3

獲取或設(shè)置此標(biāo)簽的笛卡爾位置。

scale : Number

獲取或設(shè)置與標(biāo)簽大小(以像素為單位)相乘的統(tǒng)一比例。 比例尺為1.0不會(huì)更改標(biāo)簽的大小; 大于1.0的比例會(huì)放大標(biāo)簽; 小于1.0的正比例會(huì)縮小標(biāo)簽。

應(yīng)用較大的值可能會(huì)使標(biāo)簽像素化。 要使文本變大而沒有像素化,請(qǐng)?jiān)谡{(diào)用Label#font時(shí)使用更大的字體。


在上圖中從左到右,比例為0.51.02.0
Default Value: 1.0

scaleByDistance : NearFarScalar

根據(jù)標(biāo)簽與相機(jī)的距離獲取或設(shè)置標(biāo)簽的近縮放和遠(yuǎn)縮放屬性。標(biāo)簽的比例將在NearFarScalar#nearValueNearFarScalar#farValue之間插入,而相機(jī)距離在指定NearFarScalar#nearNearFarScalar#far的上下限內(nèi)。在這些范圍之外,標(biāo)簽的刻度將保持在最近的范圍內(nèi)。如果未定義,將禁用scaleByDistance。
Examples:
// Example 1.
// Set a label's scaleByDistance to scale by 1.5 when the
// camera is 1500 meters from the label and disappear as
// the camera distance approaches 8.0e6 meters.
label.scaleByDistance = new bmgl.NearFarScalar(1.5e2, 1.5, 8.0e6, 0.0);
// Example 2.
// disable scaling by distance
label.scaleByDistance = undefined;

show : Boolean

確定是否顯示此標(biāo)簽。使用此選項(xiàng)可隱藏或顯示標(biāo)簽,而不是將其刪除并重新添加到集合中。
Default Value: true

showBackground : Boolean

確定是否顯示此標(biāo)簽后面的背景。
Default Value: false

style : LabelStyle

獲取或設(shè)置此標(biāo)簽的樣式。
Default Value: LabelStyle.FILL

text : String

獲取或設(shè)置此標(biāo)簽的文本。

totalScale : Number

獲取標(biāo)簽的總比例,該比例是標(biāo)簽的比例乘以所需字體的計(jì)算相對(duì)大小(與生成的glyph大小相比)。
Default Value: 1.0

translucencyByDistance : NearFarScalar

根據(jù)標(biāo)簽與相機(jī)的距離獲取或設(shè)置標(biāo)簽的近半透明屬性和遠(yuǎn)半透明屬性。標(biāo)簽的半透明將插入NearFarScalar#nearValueNearFarScalar#farValue之間,而相機(jī)距離在指定NearFarScalar#nearNearFarScalar#far的上下限內(nèi)。在這些范圍之外,標(biāo)簽的半透明性保持固定到最近的邊界。如果未定義,半透明Y距離將被禁用。
Examples:
// Example 1.
// Set a label's translucencyByDistance to 1.0 when the
// camera is 1500 meters from the label and disappear as
// the camera distance approaches 8.0e6 meters.
text.translucencyByDistance = new bmgl.NearFarScalar(1.5e2, 1.0, 8.0e6, 0.0);
// Example 2.
// disable translucency by distance
text.translucencyByDistance = undefined;

verticalOrigin : VerticalOrigin

獲取或設(shè)置此標(biāo)簽的垂直原點(diǎn),該原點(diǎn)確定標(biāo)簽是位于其定位點(diǎn)位置的上方、下方還是中心。


Default Value: VerticalOrigin.BASELINE
Example:
// Use a top, right origin
l.horizontalOrigin = bmgl.HorizontalOrigin.RIGHT;
l.verticalOrigin = bmgl.VerticalOrigin.TOP;

Methods

computeScreenSpacePosition(scene, result) → {Cartesian2}
計(jì)算標(biāo)簽原點(diǎn)的屏幕空間位置,同時(shí)考慮眼睛和像素偏移。屏幕空間原點(diǎn)是畫布的左上角;x從左到右增加,y從上到下增加。
Parameters:
scene (Scene) 標(biāo)簽所在的場(chǎng)景。
result (Cartesian2) 存儲(chǔ)結(jié)果的對(duì)象。
Example
console.log(l.computeScreenSpacePosition(scene).toString());
See:
equals(other) → {Boolean}
確定此標(biāo)簽是否等于另一個(gè)標(biāo)簽。如果標(biāo)簽的所有屬性都相同,則標(biāo)簽是相等的。不同集合中的標(biāo)簽可以相等。
Parameters:
other (Label) 用于比較是否相等的標(biāo)簽。
isDestroyed() → {Boolean}
如果此對(duì)象被破壞,則返回true;否則返回false。

如果此對(duì)象被破壞,則不應(yīng)使用它;調(diào)用除isDestroyed以外的任何函數(shù)將導(dǎo)致DeveloperError異常。
主站蜘蛛池模板: 前线1942| 幸福年简谱| 姿metcn张筱雨人体1| 翟凌| 泡在我家的辣妹第二季动漫在线观看| 牧师讲道| 短剧《职场里的秘密》| 强好案电影| 决胜法庭演员表| 杨梅花的图片| 金珠韩国电影| 性感的秘书| 我的亲爱| 江苏诗歌网| 崔维斯·费米尔| abo血型鉴定实验报告| 脚心的视频vk| 林岚| 第一财经高清直播| shenin| 适度水解奶粉有哪些| cctv6 节目表| 夜班护士电影在线播放免费观看高清版| 一江春水向东流 电视剧| 伟创变频器说明书| 奇爱博士| 小学毕业老师解散班级群寄语| 视频999| 笼中鸟完整版| 乱世三义电视剧免费观看完整版| 孽子 电影| 但丁| 最美表演| 成年黄色在线观看| 苏晓电视剧叫什么名字的| 我的m属性学姐| 成年黄色在线观看| 纳得克·库吉米亚| 5一6岁脑筋急转弯大全及答案| 热天午后| 日本电视剧《阿信》|