Options
All
  • Public
  • Public/Protected
  • All
Menu

A THREE.BufferGeometry that fits to the user's face and deforms as the user's expression changes.

see

https://docs.zap.works/universal-ar/web-libraries/threejs/face-tracking/

Hierarchy

  • BufferGeometry
    • FaceBufferGeometry

Index

Constructors

constructor

Properties

attributes

attributes: {}
default

{}

Type declaration

  • [name: string]: BufferAttribute | InterleavedBufferAttribute

boundingBox

boundingBox: null | Box3
default

null

boundingSphere

boundingSphere: null | Sphere
default

null

drawRange

drawRange: { count: number; start: number }
default

{ start: 0, count: Infinity }

Type declaration

  • count: number
  • start: number

drawcalls

drawcalls: any
deprecated

Use {@link BufferGeometry#groups .groups} instead.

groups

groups: { count: number; materialIndex?: number; start: number }[]
default

[]

id

id: number

Unique number of this buffergeometry instance

index

index: null | BufferAttribute
default

null

Readonly isBufferGeometry

isBufferGeometry: true

morphAttributes

morphAttributes: {}
default

{}

Type declaration

  • [name: string]: (BufferAttribute | InterleavedBufferAttribute)[]

morphTargetsRelative

morphTargetsRelative: boolean
default

false

name

name: string
default

''

offsets

offsets: any
deprecated

Use {@link BufferGeometry#groups .groups} instead.

type

type: string
default

'BufferGeometry'

userData

userData: {}
default

{}

Type declaration

  • [key: string]: any

uuid

uuid: string

Static MaxIndex

MaxIndex: number

Methods

addAttribute

  • addAttribute(name: string, attribute: BufferAttribute | InterleavedBufferAttribute): BufferGeometry
  • addAttribute(name: any, array: any, itemSize: any): any
  • deprecated

    Use {@link BufferGeometry#setAttribute .setAttribute()} instead.

    Parameters

    • name: string
    • attribute: BufferAttribute | InterleavedBufferAttribute

    Returns BufferGeometry

  • Parameters

    • name: any
    • array: any
    • itemSize: any

    Returns any

addDrawCall

  • addDrawCall(start: any, count: any, indexOffset?: any): void
  • deprecated

    Use {@link BufferGeometry#addGroup .addGroup()} instead.

    Parameters

    • start: any
    • count: any
    • Optional indexOffset: any

    Returns void

addEventListener

  • addEventListener<T>(type: T, listener: EventListener<Event, T, FaceBufferGeometry>): void
  • Adds a listener to an event type.

    Type parameters

    • T: string

    Parameters

    • type: T

      The type of event to listen to.

    • listener: EventListener<Event, T, FaceBufferGeometry>

      The function that gets called when the event is fired.

    Returns void

addGroup

  • addGroup(start: number, count: number, materialIndex?: number): void
  • Parameters

    • start: number
    • count: number
    • Optional materialIndex: number

    Returns void

addIndex

  • addIndex(index: any): void
  • deprecated

    Use {@link BufferGeometry#setIndex .setIndex()} instead.

    Parameters

    • index: any

    Returns void

applyMatrix4

  • applyMatrix4(matrix: Matrix4): BufferGeometry
  • Bakes matrix transform directly into vertex coordinates.

    Parameters

    • matrix: Matrix4

    Returns BufferGeometry

applyQuaternion

  • applyQuaternion(q: Quaternion): BufferGeometry
  • Parameters

    • q: Quaternion

    Returns BufferGeometry

center

  • center(): BufferGeometry
  • Returns BufferGeometry

clearDrawCalls

  • clearDrawCalls(): void
  • deprecated

    Use {@link BufferGeometry#clearGroups .clearGroups()} instead.

    Returns void

clearGroups

  • clearGroups(): void
  • Returns void

clone

  • clone(): BufferGeometry
  • Returns BufferGeometry

computeBoundingBox

  • computeBoundingBox(): 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.

    Returns void

computeBoundingSphere

  • computeBoundingSphere(): void
  • 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.

    Returns void

computeTangents

  • computeTangents(): void
  • Computes and adds tangent attribute to this geometry.

    Returns void

computeVertexNormals

  • computeVertexNormals(): void
  • Computes vertex normals by averaging face normals.

    Returns void

copy

  • Parameters

    • source: BufferGeometry

    Returns FaceBufferGeometry

deleteAttribute

  • deleteAttribute(name: "position" | "normal" | "uv" | "color" | "skinIndex" | "skinWeight" | "instanceMatrix" | "morphTarget0" | "morphTarget1" | "morphTarget2" | "morphTarget3" | "morphTarget4" | "morphTarget5" | "morphTarget6" | "morphTarget7" | "morphNormal0" | "morphNormal1" | "morphNormal2" | "morphNormal3" | (string & {})): BufferGeometry
  • Parameters

    • name: "position" | "normal" | "uv" | "color" | "skinIndex" | "skinWeight" | "instanceMatrix" | "morphTarget0" | "morphTarget1" | "morphTarget2" | "morphTarget3" | "morphTarget4" | "morphTarget5" | "morphTarget6" | "morphTarget7" | "morphNormal0" | "morphNormal1" | "morphNormal2" | "morphNormal3" | (string & {})

    Returns BufferGeometry

dispatchEvent

  • dispatchEvent(event: Event): void
  • Fire an event type.

    Parameters

    • event: Event

    Returns void

dispose

  • dispose(): void
  • Disposes the object from memory. You need to call this when you want the bufferGeometry removed while the application is running.

    Returns void

getAttribute

  • getAttribute(name: "position" | "normal" | "uv" | "color" | "skinIndex" | "skinWeight" | "instanceMatrix" | "morphTarget0" | "morphTarget1" | "morphTarget2" | "morphTarget3" | "morphTarget4" | "morphTarget5" | "morphTarget6" | "morphTarget7" | "morphNormal0" | "morphNormal1" | "morphNormal2" | "morphNormal3" | (string & {})): BufferAttribute | InterleavedBufferAttribute
  • Parameters

    • name: "position" | "normal" | "uv" | "color" | "skinIndex" | "skinWeight" | "instanceMatrix" | "morphTarget0" | "morphTarget1" | "morphTarget2" | "morphTarget3" | "morphTarget4" | "morphTarget5" | "morphTarget6" | "morphTarget7" | "morphNormal0" | "morphNormal1" | "morphNormal2" | "morphNormal3" | (string & {})

    Returns BufferAttribute | InterleavedBufferAttribute

getIndex

  • getIndex(): null | BufferAttribute
  • Returns null | BufferAttribute

hasAttribute

  • hasAttribute(name: "position" | "normal" | "uv" | "color" | "skinIndex" | "skinWeight" | "instanceMatrix" | "morphTarget0" | "morphTarget1" | "morphTarget2" | "morphTarget3" | "morphTarget4" | "morphTarget5" | "morphTarget6" | "morphTarget7" | "morphNormal0" | "morphNormal1" | "morphNormal2" | "morphNormal3" | (string & {})): boolean
  • Parameters

    • name: "position" | "normal" | "uv" | "color" | "skinIndex" | "skinWeight" | "instanceMatrix" | "morphTarget0" | "morphTarget1" | "morphTarget2" | "morphTarget3" | "morphTarget4" | "morphTarget5" | "morphTarget6" | "morphTarget7" | "morphNormal0" | "morphNormal1" | "morphNormal2" | "morphNormal3" | (string & {})

    Returns boolean

hasEventListener

  • hasEventListener<T>(type: T, listener: EventListener<Event, T, FaceBufferGeometry>): boolean
  • Checks if listener is added to an event type.

    Type parameters

    • T: string

    Parameters

    • type: T

      The type of event to listen to.

    • listener: EventListener<Event, T, FaceBufferGeometry>

      The function that gets called when the event is fired.

    Returns boolean

lookAt

  • lookAt(v: Vector3): void
  • Parameters

    • v: Vector3

    Returns void

merge

  • merge(geometry: BufferGeometry, offset?: number): BufferGeometry
  • Parameters

    • geometry: BufferGeometry
    • Optional offset: number

    Returns BufferGeometry

normalizeNormals

  • normalizeNormals(): void
  • Returns void

removeAttribute

  • removeAttribute(name: string): BufferGeometry
  • deprecated

    Use {@link BufferGeometry#deleteAttribute .deleteAttribute()} instead.

    Parameters

    • name: string

    Returns BufferGeometry

removeEventListener

  • removeEventListener<T>(type: T, listener: EventListener<Event, T, FaceBufferGeometry>): void
  • Removes a listener from an event type.

    Type parameters

    • T: string

    Parameters

    • type: T

      The type of the listener that gets removed.

    • listener: EventListener<Event, T, FaceBufferGeometry>

      The listener function that gets removed.

    Returns void

rotateX

  • rotateX(angle: number): BufferGeometry
  • Parameters

    • angle: number

    Returns BufferGeometry

rotateY

  • rotateY(angle: number): BufferGeometry
  • Parameters

    • angle: number

    Returns BufferGeometry

rotateZ

  • rotateZ(angle: number): BufferGeometry
  • Parameters

    • angle: number

    Returns BufferGeometry

scale

  • scale(x: number, y: number, z: number): BufferGeometry
  • Parameters

    • x: number
    • y: number
    • z: number

    Returns BufferGeometry

setAttribute

  • setAttribute(name: "position" | "normal" | "uv" | "color" | "skinIndex" | "skinWeight" | "instanceMatrix" | "morphTarget0" | "morphTarget1" | "morphTarget2" | "morphTarget3" | "morphTarget4" | "morphTarget5" | "morphTarget6" | "morphTarget7" | "morphNormal0" | "morphNormal1" | "morphNormal2" | "morphNormal3" | (string & {}), attribute: BufferAttribute | InterleavedBufferAttribute): BufferGeometry
  • Parameters

    • name: "position" | "normal" | "uv" | "color" | "skinIndex" | "skinWeight" | "instanceMatrix" | "morphTarget0" | "morphTarget1" | "morphTarget2" | "morphTarget3" | "morphTarget4" | "morphTarget5" | "morphTarget6" | "morphTarget7" | "morphNormal0" | "morphNormal1" | "morphNormal2" | "morphNormal3" | (string & {})
    • attribute: BufferAttribute | InterleavedBufferAttribute

    Returns BufferGeometry

setDrawRange

  • setDrawRange(start: number, count: number): void
  • Parameters

    • start: number
    • count: number

    Returns void

setFromPoints

  • setFromPoints(points: Vector3[] | Vector2[]): BufferGeometry
  • Parameters

    • points: Vector3[] | Vector2[]

    Returns BufferGeometry

setIndex

  • setIndex(index: null | BufferAttribute | number[]): BufferGeometry
  • Parameters

    • index: null | BufferAttribute | number[]

    Returns BufferGeometry

toJSON

  • toJSON(): any
  • Returns any

toNonIndexed

  • toNonIndexed(): BufferGeometry
  • Returns BufferGeometry

translate

  • translate(x: number, y: number, z: number): BufferGeometry
  • Parameters

    • x: number
    • y: number
    • z: number

    Returns BufferGeometry

updateFromFaceAnchor

updateFromFaceAnchorGroup

updateFromIdentityExpression

  • updateFromIdentityExpression(identity: Float32Array, expression: Float32Array): void
  • Updates the geometry to the provided identity and expression coefficients.

    Parameters

    • identity: Float32Array

      The identity coefficients.

    • expression: Float32Array

      The expression coefficients.

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property

Generated using TypeDoc