高清在线一区二区_激情网在线观看_激情一区二区三区_精品中文一区_亚洲中字幕_亚洲天堂一区

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
]);
主站蜘蛛池模板: 国产69精品福利视频 | 在线成人亚洲 | 美国黄色小视频 | av在线免费在线观看 | va免费视频 | 国产福利视频在线观看 | 9999免费视频 | 毛片视频大全 | 毛片网站视频 | 艹男人的日日夜夜 | 黄色网址免费入口 | 亚洲一区二区免费 | 日本免费大片免费视频 | 成人免费福利视频 | 在线观看福利网站 | 一区二区三区四区五区中文字幕 | 国产成人av在线播放 | 国产一区二区视频观看 | 99精品电影| 亚洲一区在线国产 | 91高清网站 | 国产女厕一区二区三区在线视 | 毛片电影在线看 | 91午夜在线观看 | 一区二区精品在线 | 精品无码久久久久久国产 | 欧美一级美国一级 | av电影在线观看网站 | 成人三级黄色片 | 欧美性生交大片 | 精品一区二区免费 | 毛片区 | 欧洲色阁中文字幕 | 精品69人人人人 | 欧美一区二区黄 | 国产91久久久久久 | 国产一级毛片国产 | 亚洲网站在线观看视频 | 精品999久久久| 久久免费视频3 | 极品国产91在线网站 |