Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/remapper/src/deps.ts>three.BufferGeometry

A framework for Beat Saber map scripting.
Go to Latest
class three.BufferGeometry
Re-export
import { three } from "https://deno.land/x/remapper@2.1.0/src/deps.ts";
const { BufferGeometry } = three;

This is a superefficent class for geometries because it saves all data in buffers. It reduces memory costs and cpu cycles. But it is not as easy to work with because of all the necessary buffer calculations. It is mainly interesting when working with static objects.

see src/core/BufferGeometry.js

Constructors

new
BufferGeometry()

This creates a new BufferGeometry. It also sets several properties to an default value.

Properties

attributes: { [name: string]: BufferAttribute | InterleavedBufferAttribute; }
boundingBox: Box3 | null
boundingSphere: Sphere | null
deprecated
drawcalls: any
drawRange: { start: number; count: number; }
groups: Array<{ start: number; count: number; materialIndex?: number | undefined; }>
id: number

Unique number of this buffergeometry instance

index: BufferAttribute | null
readonly
isBufferGeometry: true
morphAttributes: { [name: string]: Array<BufferAttribute | InterleavedBufferAttribute>; }
morphTargetsRelative: boolean
name: string
deprecated
offsets: any
type: string
userData: { [key: string]: any; }
uuid: string

Methods

addAttribute(
name: any,
array: any,
itemSize: any,
): any
deprecated
addDrawCall(
start: any,
count: any,
indexOffset?: any,
): void
addGroup(
start: number,
count: number,
materialIndex?: number,
): void
deprecated
addIndex(index: any): void

Bakes matrix transform directly into vertex coordinates.

deprecated
clearDrawCalls(): void
clearGroups(): void

Computes bounding box of the geometry, updating Geometry.boundingBox attribute. Bounding boxes aren't computed by default. They need to be explicitly computed, otherwise they are null.

Computes bounding sphere of the geometry, updating Geometry.boundingSphere attribute. Bounding spheres aren't' computed by default. They need to be explicitly computed, otherwise they are null.

Computes and adds tangent attribute to this geometry.

Computes vertex normals by averaging face normals.

copy(source: BufferGeometry): this
dispose(): void

Disposes the object from memory. You need to call this when you want the bufferGeometry removed while the application is running.

hasAttribute(name: BuiltinShaderAttributeName | (string & { })): boolean
lookAt(v: Vector3): void
merge(geometry: BufferGeometry, offset?: number): BufferGeometry
deprecated
removeAttribute(name: string): BufferGeometry
rotateX(angle: number): BufferGeometry
rotateY(angle: number): BufferGeometry
rotateZ(angle: number): BufferGeometry
scale(
x: number,
y: number,
z: number,
): BufferGeometry
setDrawRange(start: number, count: number): void
setIndex(index: BufferAttribute | number[] | null): BufferGeometry
toJSON(): any
translate(
x: number,
y: number,
z: number,
): BufferGeometry