国产久_亚欧精品一区_久久亚洲美女_99精品在线观看_日韩成人三级_久久精品久久久久

GeometryAttribute

幾何屬性的值和類型信息。Geometry通常包含一個或多個屬性。所有屬性一起構(gòu)成幾何體的頂點。
new GeometryAttribute(options)
Parameters:
options (Object)
Name Description
options.componentDatatype
ComponentDatatype
屬性中每個組件的數(shù)據(jù)類型,例如值中的單個元素。
options.componentsPerAttribute
Number
一個介于1和4之間的數(shù)字,用于定義屬性中組件的數(shù)量。
options.normalize
Boolean
default false
當(dāng)truecomponentDatatype為整數(shù)格式時,表示當(dāng)組件作為浮點進(jìn)行渲染訪問時,應(yīng)將它們映射到范圍[0,1](無符號)或[-1,1](有符號)中。
options.values
TypedArray
存儲在類型化數(shù)組中的屬性值。
Example
var geometry = new bmgl.Geometry({
  attributes : {
    position : new bmgl.GeometryAttribute({
      componentDatatype : bmgl.ComponentDatatype.FLOAT,
      componentsPerAttribute : 3,
      values : new Float32Array([
        0.0, 0.0, 0.0,
        7500000.0, 0.0, 0.0,
        0.0, 7500000.0, 0.0
      ])
    })
  },
  primitiveType : bmgl.PrimitiveType.LINE_LOOP
});
Throws
  • DeveloperError : options.componentsPerAttribute必須介于1和4之間。
See:

Members

componentDatatype : ComponentDatatype

屬性中每個組件的數(shù)據(jù)類型,例如GeometryAttribute#values中的單個元素。
Default Value: undefined

componentsPerAttribute : Number

一個介于1和4之間的數(shù)字,用于定義屬性中組件的數(shù)量。例如,具有x、y和z組件的位置屬性將有3個,如代碼示例所示。
Default Value: undefined
Example:
attribute.componentDatatype = bmgl.ComponentDatatype.FLOAT;
attribute.componentsPerAttribute = 3;
attribute.values = new Float32Array([
  0.0, 0.0, 0.0,
  7500000.0, 0.0, 0.0,
  0.0, 7500000.0, 0.0
]);

normalize : Boolean

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

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

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

values : TypedArray

存儲在類型化數(shù)組中的屬性值。在代碼示例中,values中的每三個元素定義一個屬性,因為componentsPerAttribute為3。
Default Value: undefined
Example:
attribute.componentDatatype = bmgl.ComponentDatatype.FLOAT;
attribute.componentsPerAttribute = 3;
attribute.values = new Float32Array([
  0.0, 0.0, 0.0,
  7500000.0, 0.0, 0.0,
  0.0, 7500000.0, 0.0
]);
主站蜘蛛池模板: 激情啪啪网站 | 三级精品视频 | 夜夜夜网 | 久草色视频 | 精品国产乱码久久久久久樱花 | 久久七| 91网站在线观看视频 | 欧美日韩一区二区在线视频 | 亚洲性人人天天夜夜摸 | 99久久久久久久 | 欧美专区日韩 | 毛片毛片毛片毛片毛片毛片 | 激情视频免费 | 免费观看毛片 | 美国毛片在线 | 右手影院亚洲欧美 | 中文字幕精品视频在线观看 | 激情网站免费 | 色九月婷婷| 黄页免费在线观看 | 午夜激情视频在线 | 国产精品专区在线 | 日本精品一二区 | 殴美一区二区 | 亚洲欧美自拍另类 | 97久草 | 欧美 日韩 中文字幕 | 成人性生交大片免费7 | 精品亚洲视频在线观看 | 成年人网站免费在线观看 | 国产精品久久久久久吹潮 | 中文字幕一区二区三区精品 | 成人在线观看免费视频 | 国产区视频在线播放 | 日韩国产欧美精品 | 麻豆网站在线看 | 日韩在线视频精品 | 亚洲一区 视频 | 成人免费视频观看视频 | 91久久网| 日韩电影黄 |