婷婷久久网-婷婷久久久久-婷婷久久久-婷婷久-国产微拍精品一区-国产网址在线观看

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
truecomponentDatatype為整數(shù)格式時,表示當組件作為浮點進行渲染訪問時,應將它們映射到范圍[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

truecomponentDatatype為整數(shù)格式時,表示當組件作為浮點進行渲染訪問時,應將它們映射到范圍[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
]);
主站蜘蛛池模板: 情人意大利| 色在线视频播放| 印度西施| 五年级小数除法竖式计算题100道| 蛋仔图片100张| amari| 翟潇闻个人介绍| 萱草花二声部合唱谱| 陈宝莲徐锦江夜半2普通话| 电影儿媳| 松岛菜菜子| 都市频道节目表今天| 眼光娘娘治眼病口诀| 路易德菲耐斯| 贝瓦儿歌菊花开| 87版七仙女台湾| 《两个女人》韩国电影简介| kami什么意思| 九州电影网| 我是特种兵免费观看完整版 | 看黄色录像播放| 现代短诗繁星| 情欲狂欢电影| 飞天少女猪| 孙启皓| 爱在一起麻辣烫| 张俪eyely| 相识电影| 小霸王解说呐| 新人类男友会触电电视剧免费观看全集 | 3s游戏交易平台| 永远的乳房 电影| 2001年日历全年表| 徐曼华| 我的一级兄弟| 教学评一体化课题研究| 寡妇高潮一级免费看| 内裤之穴| 每日一句话| 一二三年级的童话绘画| 讯息 电影|