Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/threejs_4_deno/src/Three.js>BufferAttribute

A simple transformation of three.js for use within a Deno workflow
Go to Latest
class BufferAttribute
Re-export
import { BufferAttribute } from "https://deno.land/x/threejs_4_deno@v121/src/Three.js";

Constructors

new
BufferAttribute(
array: ArrayLike<number>,
itemSize: number,
normalized?: boolean,
)

Properties

array: ArrayLike<number>
count: number
readonly
isBufferAttribute: true
itemSize: number
name: string
writeonly
needsUpdate: boolean
normalized: boolean
onUploadCallback: () => void
updateRange: { offset: number; count: number; }
usage: Usage
version: number

Methods

copy(source: BufferAttribute): this
copyArray(array: ArrayLike<number>): this
copyAt(
index1: number,
attribute: BufferAttribute,
index2: number,
): this
copyColorsArray(colors: { r: number; g: number; b: number; }[]): this
copyVector2sArray(vectors: { x: number; y: number; }[]): this
copyVector3sArray(vectors: { x: number; y: number; z: number; }[]): this
copyVector4sArray(vectors: { x: number; y: number; z: number; w: number; }[]): this
getW(index: number): number
getX(index: number): number
getY(index: number): number
getZ(index: number): number
onUpload(callback: () => void): this
set(value: ArrayLike<number> | ArrayBufferView, offset?: number): this
setUsage(usage: Usage): this
setW(index: number, z: number): this
setX(index: number, x: number): this
setXY(
index: number,
x: number,
y: number,
): this
setXYZ(
index: number,
x: number,
y: number,
z: number,
): this
setXYZW(
index: number,
x: number,
y: number,
z: number,
w: number,
): this
setY(index: number, y: number): this
setZ(index: number, z: number): this
toJSON(): { itemSize: number; type: string; array: number[]; normalized: boolean; }