- Three.js源码学习(一)core/BufferAttrib
- Three.js源码学习(二)core/BufferGoemet
- Three.js源码学习(四)Core/DirectGeomet
- Three.js源码学习(五)core/EventDispatc
- Three.js源码学习(八)core/InstancedBuf
- Three.js源码学习(十一)core/Interleaved
- Three.js源码学习(十六)core/Raycaster
- Three.js源码学习(十七)core/Uniform
- Three.js源码学习(九)core/InstancedBuf
- Three.js源码学习(十二)core/Interleaved
1,BufferAttribute
构造函数
BufferAttribute(array,itemSize,normalized)
属性
name
array
itemSize
count array未定义时,返回0,否则返回数组长度除项目长度
normalized
dynamic//默认false
updateRange//默认{offset:0,count:-1}
version//默认0
方法
set(value)
isBufferAttribute
onUploadCallback()
setArray(array)
setDynamic(value)
copy(source)//复制一份BufferAttribute对象
copyAt(index1,attribute,index2)//将从attribute中拷贝当前对象长度的数据
copyArray(array)
copyColorsArray(colors)//将colors颜色拷贝到当前对象的array中
copyVector2sArray(vectors)
copyVector3sArray(vectors)
copyVector4sArray(vectors)
set(value,offset)
getX(index)//获取第index个item.x
setX(index,x)//设置第index为x
getY(index)//获取第index个item.y
setY(index,y)
getZ(index)
setZ(index,z)
getW(index)
setW(index,w)
setXY(index,x,y)
setXYZ(index,x,y,z)
setXYZW(index,x,y,z,w)
onUpload(callback)//设置回调函数
clone()//返回一份拷贝对象
//BufferAttribute子类
Int8BufferAttribute(array,itemSize,normalized)
Unit8BufferAttribute(array,itemSize,normalized)
Uint8ClampedBufferAttribute( array, itemSize, normalized )
Int16BufferAttribute( array, itemSize, normalized )
Uint16BufferAttribute( array, itemSize, normalized )
Int32BufferAttribute( array, itemSize, normalized )
Uint32BufferAttribute( array, itemSize, normalized )
Float32BufferAttribute( array, itemSize, normalized )
Float64BufferAttribute( array, itemSize, normalized )
网友评论