久久久久久一区_中文字幕在线不卡_精品不卡_久久久网_精品亚洲一区二区三区在线观看_欧美精品一区二区三区在线四季

GeometryInstanceAttribute

每個實例幾何圖形屬性的值和類型信息。
new GeometryInstanceAttribute(options)
Parameters:
options (Object)
Name Description
options.componentDatatype
ComponentDatatype
屬性中每個組件的數據類型,例如值中的單個元素。
options.componentsPerAttribute
Number
一個介于1和4之間的數字,用于定義屬性中組件的數量。
options.normalize
Boolean
default false
truecomponentDatatype為整數格式時,表示當組件作為浮點進行渲染訪問時,應將它們映射到范圍[0,1](無符號)或[-1,1](有符號)中。
options.value
Array.<Number>
屬性的值。
Example
var instance = new bmgl.GeometryInstance({
  geometry : bmgl.BoxGeometry.fromDimensions({
    dimensions : new bmgl.Cartesian3(1000000.0, 1000000.0, 500000.0)
  }),
  modelMatrix : bmgl.Matrix4.multiplyByTranslation(bmgl.Transforms.eastNorthUpToFixedFrame(
    bmgl.Cartesian3.fromDegrees(0.0, 0.0)), new bmgl.Cartesian3(0.0, 0.0, 1000000.0), new bmgl.Matrix4()),
  id : 'box',
  attributes : {
    color : new bmgl.GeometryInstanceAttribute({
      componentDatatype : bmgl.ComponentDatatype.UNSIGNED_BYTE,
      componentsPerAttribute : 4,
      normalize : true,
      value : [255, 255, 0, 255]
    })
  }
});
Throws
  • DeveloperError : options.componentsPerAttribute必須介于1和4之間。
See:

Members

componentDatatype : ComponentDatatype

屬性中每個組件的數據類型,例如GeometryInstanceAttribute#value中的單個元素。
Default Value: undefined

componentsPerAttribute : Number

一個介于1和4之間的數字,用于定義屬性中組件的數量。例如,具有x、y和z組件的位置屬性將有3個,如代碼示例所示。
Default Value: undefined
Example:
show : new bmgl.GeometryInstanceAttribute({
  componentDatatype : bmgl.ComponentDatatype.UNSIGNED_BYTE,
  componentsPerAttribute : 1,
  normalize : true,
  value : [1.0]
})

normalize : Boolean

truecomponentDatatype為整數格式時,表示當組件作為浮點進行渲染訪問時,應將它們映射到范圍[0,1](無符號)或[-1,1](有符號)中。

這通常在使用ComponentDatatype.UNSIGNED_BYTE存儲顏色時使用。

Default Value: false
Example:
attribute.componentDatatype = bmgl.ComponentDatatype.UNSIGNED_BYTE;
attribute.componentsPerAttribute = 4;
attribute.normalize = true;
attribute.value = [
  bmgl.Color.floatToByte(color.red),
  bmgl.Color.floatToByte(color.green),
  bmgl.Color.floatToByte(color.blue),
  bmgl.Color.floatToByte(color.alpha)
];

value : Array.<Number>

存儲在類型化數組中的屬性值。在代碼示例中,values中的每三個元素定義一個屬性,因為componentsPerAttribute為3。
Default Value: undefined
Example:
show : new bmgl.GeometryInstanceAttribute({
  componentDatatype : bmgl.ComponentDatatype.UNSIGNED_BYTE,
  componentsPerAttribute : 1,
  normalize : true,
  value : [1.0]
})
主站蜘蛛池模板: 国内精品视频 | 日韩色综合 | 国产在线拍偷自拍观看视频网站 | 99国内精品久久久久久久 | 成人性生交大片免费看中文带字幕 | 日韩欧美成人影院 | 亚洲a级在线观看 | 欧美激情一区 | 久久伊人免费视频 | 日韩三区 | 国产日韩欧美一区二区 | 欧美不卡视频一区发布 | 国产传媒在线视频 | 久久精品免费视频播放 | 亚洲国产精品18久久 | 欧洲av在线 | 国产一级视频 | 日本天堂在线 | 视频在线一区 | 狠狠干av| 青青艹在线视频 | 黄色av电影在线 | 亚洲欧美中文日韩在线v日本 | 日韩视频在线观看 | av国产精品| 91精品福利| 国产精品一区二区三区四区 | 久久在线播放 | 国产不卡一二三区 | 三区视频 | 久久成人国产精品 | 一本色道久久综合狠狠躁篇怎么玩 | 国产精品久久久久久久久久久久久久 | 一区二区视频 | 日韩免费福利视频 | 久久精品久久久久久久久久久久久 | 国产精品99久久久久久大便 | 日韩成人不卡 | 黄色高清网站 | 久久青青 | 精品影院 |