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

GeometryAttribute

幾何屬性的值和類型信息。Geometry通常包含一個或多個屬性。所有屬性一起構成幾何體的頂點。
new GeometryAttribute(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.values
TypedArray
存儲在類型化數組中的屬性值。
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

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

componentsPerAttribute : Number

一個介于1和4之間的數字,用于定義屬性中組件的數量。例如,具有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

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.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

存儲在類型化數組中的屬性值。在代碼示例中,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
]);
主站蜘蛛池模板: www.日韩欧美 | 成年人视频在线免费观看 | 91免费视频网 | 天天曰天天干 | 日美韩一区二区三区 | 黄色伊人| sis52.com| 亚洲黄色成人 | 综合在线一区 | 五月激情综合网 | 国产高清欧美 | 日本伊人网| 免费久久久久 | 亚洲国产成人精品片在线观看 | 国产一区二区三区免费播放 | 欧美精品一区在线观看 | 欧美国产中文 | 欧美日韩大片 | 九色精品视频 | 蜜桃精品视频 | 91精品国产亚一区二区三区老牛 | 欧美日韩精品免费观看视频 | 免费黄色高清视频 | 欧美日韩中文字幕一区二区 | 成人免费一区二区三区 | 婷婷激情视频 | 麻豆国产一区 | 国产欧美亚洲精品 | 黄色短视频免费观看 | 毛片视频免费 | 久久污 | 日韩国产精品一区 | 日韩精品一区二区三区中文在线 | theporn国产在线精品 | 毛片资源 | 亚洲电影第三页 | 日韩精选视频 | 欧美乱码精品一区二区三 | 狂揉艳妇肉体在线观看视频大全 | aa精品| 天天综合网91 |