TextEntity¶
テキストエンティティ
Animation Binding¶
| Name | Type |
|---|---|
| font_style | string |
| font_weight | string |
| font_size | number |
| color | vector3 |
| stroke_color | vector3 |
| stroke_width | number |
Extends¶
Constructors¶
new TextEntity()¶
new TextEntity(
scene,opts):TextEntity
Parameters¶
| Parameter | Type | Description |
|---|---|---|
scene |
Scene |
所属可能シーン |
opts |
Option |
オプション集合 |
Returns¶
Overrides¶
AbstractPointEntity.constructor
Properties¶
_altitude_mode¶
protected_altitude_mode:AltitudeMode=AltitudeMode.ABSOLUTE
高度モード
Inherited from¶
AbstractPointEntity._altitude_mode
_anchor_mode¶
protected_anchor_mode:boolean=false
アンカーモード
Inherited from¶
AbstractPointEntity._anchor_mode
_animation¶
protected_animation:any
今のところ Entity (基底クラス) 自体のアニメーション可能パラメータと 子孫は存在しないので animation には何も追加しない
Inherited from¶
AbstractPointEntity._animation
_attributions?¶
protectedoptional_attributions:Attributions=undefined
Inherited from¶
AbstractPointEntity._attributions
_bake_target¶
protected_bake_target:BakeTarget=Entity.BakeTarget.GROUND_AND_STRUCTURE
Inherited from¶
AbstractPointEntity._bake_target
_entries¶
protected_entries:TextEntry[]
要素管理
Inherited from¶
_need_to_create_regions¶
protected_need_to_create_regions:boolean=false
再生成が必要であることを示すフラグ
Inherited from¶
AbstractPointEntity._need_to_create_regions
_pickable¶
protected_pickable:boolean=true
Viewer.pick() の対象とするかどうか
Inherited from¶
_render_type¶
protected_render_type:RenderType=Entity.RenderType.NORMAL
Inherited from¶
AbstractPointEntity._render_type
_stencil_flag¶
protected_stencil_flag:boolean=false
Inherited from¶
AbstractPointEntity._stencil_flag
_visibility¶
protected_visibility:boolean=true
表示状態を示すフラグ
Inherited from¶
AbstractPointEntity._visibility
event_emitter¶
protectedevent_emitter:null|EventEmitter<EventMap,unknown>
Inherited from¶
AbstractPointEntity.event_emitter
scene¶
readonlyscene:Scene
所属可能シーン
Inherited from¶
visualizer¶
protectedvisualizer:EntityVisualizer
Inherited from¶
AbstractPointEntity.visualizer
Accessors¶
altitude_mode¶
getaltitude_mode():AltitudeMode
高度モード取得
setaltitude_mode(value):void
高度モード設定
Parameters¶
| Parameter | Type |
|---|---|
value |
AltitudeMode |
Returns¶
anchor_mode¶
getanchor_mode():boolean
アンカーモード。
隠面処理により本来表示されない状況であっても、最前面に描画を行いマウスピックも可能となるような描画モード。 現在は、隠面処理により本来表示されない部分は半透明で描画されます。
このプロパティを有効にする場合は、下記の問題点に注意する必要があります。 - 透明・半透明モデルに適用することは想定されていません。透明・半透明モデルに対してこのプロパティを有効にすると表示が乱れる可能性があります。 - アンカーモードのエンティティどうしの前後判定はzソートにより実装されており、ピクセル単位の前後判定は行われません。
Returns¶
boolean
animation¶
getanimation():any
アニメーションパラメータ設定
Returns¶
any
bake_target¶
getbake_target():BakeTarget
setbake_target(bake_target):void
Parameters¶
| Parameter | Type |
|---|---|
bake_target |
BakeTarget |
Returns¶
num_entries¶
getnum_entries():number
Entry数を取得
Returns¶
number
render_type¶
getrender_type():RenderType
setrender_type(render_type):void
Parameters¶
| Parameter | Type |
|---|---|
render_type |
RenderType |
Returns¶
stencil_flag¶
getstencil_flag():boolean
Returns¶
boolean
visibility¶
getvisibility():boolean
可視性フラグを取得
Returns¶
boolean
Methods¶
addText()¶
addText(
text,position,props):TextEntry
テキストを追加
Parameters¶
| Parameter | Type | Description |
|---|---|---|
text |
string |
テキスト |
position |
GeoPoint |
位置 |
props |
EntryOption |
プロパティ |
Returns¶
追加したEntry
clearVisualizer()¶
clearVisualizer():
void
Returns¶
void
Inherited from¶
AbstractPointEntity.clearVisualizer
getAttributions()¶
getAttributions():
undefined|Attributions
Attributions 取得
Returns¶
undefined | Attributions
Inherited from¶
AbstractPointEntity.getAttributions
getBounds()¶
getBounds():
GeoRegion
すべてのEntryのバウンディングを算出
Returns¶
バウンディング情報を持ったGeoRegion
Inherited from¶
getDefaultVisualizer()¶
protectedgetDefaultVisualizer():EntityVisualizer
Returns¶
Inherited from¶
AbstractPointEntity.getDefaultVisualizer
getEntry()¶
getEntry(
index):TextEntry
指定された index の Entry を取得
Parameters¶
| Parameter | Type | Description |
|---|---|---|
index |
number |
Returns¶
Inherited from¶
getEntryById()¶
getEntryById(
id):undefined|TextEntry
ID を指定して Entry を取得
Parameters¶
| Parameter | Type | Description |
|---|---|---|
id |
string |
ID |
Returns¶
undefined | TextEntry
id が一致した Entry。(なければ undefined を返す)。
Inherited from¶
AbstractPointEntity.getEntryById
getFlakePrimitiveProducer()¶
getFlakePrimitiveProducer():
undefined|FlakePrimitiveProducer
FlakePrimitiveProducer インタフェースを取得
FlakePrimitiveProducer インタフェースを取得するためにシーンレンダラーが呼び出す。 FlakePrimitiveProducer インタフェースが実装されていなければ undefined を返す。
既定の実装は undefined を返す。
Returns¶
undefined | FlakePrimitiveProducer
FlakePrimitiveProducer インタフェース
Inherited from¶
AbstractPointEntity.getFlakePrimitiveProducer
getPrimitiveProducer()¶
getPrimitiveProducer():
undefined|PrimitiveProducer
PrimitiveProducer インタフェースを取得
PrimitiveProducer インタフェースを取得するためにシーンレンダラーが呼び出す。 PrimitiveProducer インタフェースが実装されていなければ undefined を返す。 既定の実装は undefined を返す。
Returns¶
undefined | PrimitiveProducer
PrimitiveProducer インタフェース
Overrides¶
AbstractPointEntity.getPrimitiveProducer
getVisualizer()¶
getVisualizer():
EntityVisualizer
Returns¶
Inherited from¶
AbstractPointEntity.getVisualizer
isAttached()¶
isAttached():
boolean
Returns¶
boolean
Inherited from¶
AbstractPointEntity.isAttached
isPickable()¶
isPickable():
boolean
このEntityが Viewer.pick() による選択対象であるかを取得する。
Returns¶
boolean
Inherited from¶
AbstractPointEntity.isPickable
onChangeAltitudeMode()¶
onChangeAltitudeMode(
prev_mode):void
高度モードが変更された後の通知
this.altitude_mode が変更されたときに呼び出される。 既定の実装は何もしない。
Parameters¶
| Parameter | Type | Description |
|---|---|---|
prev_mode |
AltitudeMode |
直前のモード |
Returns¶
void
Overrides¶
AbstractPointEntity.onChangeAltitudeMode
removeEntry()¶
removeEntry(
entry):boolean
指定された Entry を削除
Parameters¶
| Parameter | Type | Description |
|---|---|---|
entry |
TextEntry |
Returns¶
boolean
削除された場合に true を返す
Inherited from¶
AbstractPointEntity.removeEntry
setAnchorMode()¶
Experimental
setAnchorMode(
anchor_mode):void
アンカーモードを設定。
Parameters¶
| Parameter | Type | Description |
|---|---|---|
anchor_mode |
boolean |
Returns¶
void
Inherited from¶
AbstractPointEntity.setAnchorMode
See¶
setAttributions()¶
setAttributions(
attributions):void
Attributions 設定
Parameters¶
| Parameter | Type |
|---|---|
attributions |
undefined | Attributions |
Returns¶
void
Inherited from¶
AbstractPointEntity.setAttributions
setBackgroundColor()¶
setBackgroundColor(
color):void
テキスト背景の色を設定
Parameters¶
| Parameter | Type | Description |
|---|---|---|
color |
Vector4 | Vector3 |
テキストの色 |
Returns¶
void
setColor()¶
setColor(
color):void
テキストの色を設定
Parameters¶
| Parameter | Type | Description |
|---|---|---|
color |
Vector4 | Vector3 |
テキストの色 |
Returns¶
void
setEnableBackground()¶
setEnableBackground(
enable):void
テキスト背景を有効にするかどうか
Parameters¶
| Parameter | Type | Description |
|---|---|---|
enable |
boolean |
trueなら有効 |
Returns¶
void
setEnableStroke()¶
setEnableStroke(
enable):void
テキスト縁を有効にするかどうか
Parameters¶
| Parameter | Type | Description |
|---|---|---|
enable |
boolean |
trueなら有効 |
Returns¶
void
setFontFamily()¶
setFontFamily(
family):void
フォントファミリーを設定
Parameters¶
| Parameter | Type | Description |
|---|---|---|
family |
string |
フォントファミリー |
Returns¶
void
See¶
https://developer.mozilla.org/ja/docs/Web/CSS/font-family
setFontSize()¶
setFontSize(
size):void
フォントの大きさを設定
Parameters¶
| Parameter | Type | Description |
|---|---|---|
size |
number |
フォントの大きさ (Pixels) |
Returns¶
void
setFontStyle()¶
setFontStyle(
style):void
フォントスタイルを設定
Parameters¶
| Parameter | Type | Description |
|---|---|---|
style |
FontStyle |
フォントスタイル |
Returns¶
void
setFontWeight()¶
setFontWeight(
weight):void
Parameters¶
| Parameter | Type | Description |
|---|---|---|
weight |
FontWeight |
フォントの太さ |
Returns¶
void
Summary¶
フォントの太さを設定
setPickable()¶
setPickable(
pickable):void
このEntityを Viewer.pick() による選択対象とするかを設定する。
Parameters¶
| Parameter | Type | Description |
|---|---|---|
pickable |
boolean |
選択可能か否か |
Returns¶
void
Inherited from¶
AbstractPointEntity.setPickable
setPixelOffset()¶
Experimental
setPixelOffset(
offset):void
オフセット量をピクセル単位で指定します。 0番目の要素は画面右方向、1番目の様相は画面上方向です。
Parameters¶
| Parameter | Type |
|---|---|
offset |
Vector2 |
Returns¶
void
setStrokeColor()¶
setStrokeColor(
color):void
テキスト縁の色を設定
Parameters¶
| Parameter | Type | Description |
|---|---|---|
color |
Vector4 | Vector3 |
縁の色 |
Returns¶
void
setStrokeLineWidth()¶
setStrokeLineWidth(
width):void
テキスト縁の太さを設定
Parameters¶
| Parameter | Type | Description |
|---|---|---|
width |
number |
縁の線幅 |
Returns¶
void
setVisibility()¶
setVisibility(
visibility):void
可視性フラグを設定
Parameters¶
| Parameter | Type | Description |
|---|---|---|
visibility |
boolean |
可視性フラグ |
Returns¶
void
Inherited from¶
AbstractPointEntity.setVisibility
setVisualizer()¶
setVisualizer(
visualizer):void
Parameters¶
| Parameter | Type |
|---|---|
visualizer |
EntityVisualizer |
Returns¶
void
Inherited from¶
AbstractPointEntity.setVisualizer
setZIndex()¶
setZIndex(
z_index):void
Z-Indexを設定。 大きいほど手前に表示される。(アンカーモード時のみ有効)
Parameters¶
| Parameter | Type |
|---|---|
z_index |
number |
Returns¶
void
Inherited from¶
use_stencil()¶
use_stencil():
boolean
Returns¶
boolean