PointMaterial
PointMaterialは、ポイントジオメトリレンダリング用のマテリアルを表します。
Properties
Section titled “Properties”center
Section titled “center”Type: { x: number, y: number }
Description: 中心からのシフト量を指定します。範囲は 0 から 1 の間です。単位は、ポイントの丸に対する相対位置です。
Default: Required
Example:
{ point: { center: { x: 0.5, y: 0.5 } }}clampToGround
Section titled “clampToGround”Type: boolean
Description: 地面に張り付けるかどうかを指定します。
Default: Required
Example:
{ point: { clampToGround: true }}Type: Color
Description: ポイントの色をColorインスタンスで指定します。
Default: Required
Example:
import { Color } from "@navaramap/three";
{ point: { color: new Color().setHex(0xff0000) }}declutter
Section titled “declutter”Type: boolean | undefined
Description: 画面空間でのデクラッター(重なり除去)に参加します。ラベルやスプライトが画面上で重なった場合、優先度の低いものが非表示になります。デフォルトで有効です。すべてのラベルを無条件に描画するには false を設定します。
Default: true
Example:
{ point: { declutter: false }}declutterPriority
Section titled “declutterPriority”Type: number | undefined
Description: デクラッターの配置優先度です。値が大きいほど重なりの競合に勝ちます。declutter が有効な場合にのみ意味を持ちます。FeatureEvaluator.evaluate() で地物ごとに上書きできます。
Default: 0.0
Example:
{ point: { declutter: true, declutterPriority: 1 }}depthTest
Section titled “depthTest”Type: boolean | undefined
Description: 前面のモデルが背面のモデルを隠すかどうかを決定する変数です。
Default: true
Example:
{ point: { depthTest: true }}effectIds
Section titled “effectIds”Type: string[] | undefined
Description: 適用するセレクティブエフェクトの ID を指定します(例: “bloom”, “outline”)。SelectiveBloomEffectDesc や SelectiveOutlineEffectDesc と連携して使用します。
Default: undefined
Example:
{ point: { effectIds: ["bloom", "outline"] }}emissiveColor
Section titled “emissiveColor”Type: Color | undefined
Description: 発光色をColorインスタンスで指定します。
Default: undefined
Example:
import { Color } from "@navaramap/three";
{ point: { emissiveColor: new Color().setHex(0xff0000) }}emissiveIntensity
Section titled “emissiveIntensity”Type: number | undefined
Description: 発光の強度を指定します。Bloom エフェクトが有効な場合のデフォルト値は 0.3 です。
Default: undefined
Example:
{ point: { emissiveIntensity: 0.5 }}geometryTypes
Section titled “geometryTypes”Type: ("point" | "line" | "polygon")[] | undefined
Description: このマテリアルが消費するソースジオメトリのカテゴリーです。"line" を含めるとラインの頂点ごとに、"polygon" を含めるとポリゴンリングの頂点ごとに 1 つのポイントを描画します(リングを閉じる重複頂点はスキップされます)。配列を指定するとデフォルトは置き換えられるため、ポイントジオメトリも描画し続けたい場合は "point" を含めてください。このオプションはジオメトリ構築時に適用されます。レイヤー作成時に指定してください。layer.update() で変更しても読み込み済みのタイルには反映されず、変更後に読み込まれたタイルにのみ適用されます(すべてに反映するにはレイヤーを作り直してください)。
Default: ["point"]
Example:
{ point: { geometryTypes: ["point", "polygon"] }}height
Section titled “height”Type: number
Description: 高さを指定します。単位はメートルです。
Default: Required
Example:
{ point: { height: 100 // 100メートル }}offsetDepth
Section titled “offsetDepth”Type: boolean | undefined
Description: 地球表面との重なりを回避します。ポイントが地球表面にめり込まないようにする場合に使用します。
Default: undefined
Example:
{ point: { offsetDepth: true }}opacity
Section titled “opacity”Type: number | undefined
Description: ポイントの不透明度を指定します。有効範囲は 0.0(完全に透明)から 1.0(完全に不透明)です。
Default: 1.0
Example:
{ point: { transparent: true, opacity: 0.5 // 50%の不透明度 }}sizeInMeters
Section titled “sizeInMeters”Type: boolean | undefined
Description: サイズをメートル単位で指定するかどうか。false の場合、サイズはピクセル単位です。
Default: true
Example:
{ point: { sizeInMeters: true }}Type: boolean | undefined
Description: ポイントを表示するかどうかを指定します。
Default: undefined
Example:
{ point: { show: true }}Type: number
Description: ポイントのサイズを指定します。単位はメートルです。
Default: Required
Example:
{ point: { size: 10 // 10メートル }}transparent
Section titled “transparent”Type: boolean | undefined
Description: ポイントの透過度を考慮するかどうかを指定します。true にするとエフェクトを有効にしたときにポイントがうまく表示されないことがあるので注意してください。
Default: undefined
Example:
{ point: { transparent: false }}