PilotGaea 3D O'view
    正在準備搜尋索引...

    類別 VoxelModule

    體素模組,僅在 TerrainViewOptions.requestWebGL2 啟用時有效。

    層級 (查看層級一覽)

    索引

    方法

    • 新增一個體素實體,僅在 TerrainViewOptions.requestWebGL2 啟用時有效。

      參數

      回傳 null | VoxelEntity

      體素實體。

      const textureSize = { width: 10, height: 10, depth: 10 };
      const frame = { data: [[120, 23, 100, 10], [120, 23, 100, 10]] }

      ov.Voxel.addVoxelEntity({
      data: new ov.VoxelData(textureSize, frame),
      colorSet: ["#2b79ba", "#abdda4", "#ffffbf", "#fdae61", "#d7191c"],
      colorPos: [0.0, 0.25, 0.50, 0.75, 1.0]
      });
    • 移除指定體素實體。

      參數

      回傳 void

    • 計算資料需要的材質大小。

      參數

      • data: [x: number, y: number, z: number, v: number][]

        資料。

      • pxPerMeter: number

        每多少公尺為一像素。

      回傳 { width: number; height: number; depth: number }

      材質尺寸。

    訪問器屬性

    • get entities(): VoxelEntity[]

      取得全部體素實體陣列

      回傳 VoxelEntity[]

    • get opacity(): number

      取得整體透明度

      回傳 number

    • set opacity(value: number): void

      設定整體透明度

      參數

      • value: number

      回傳 void