Options
All
  • Public
  • Public/Protected
  • All
Menu

Class VideoAgentMesh

视频经纪人MESH

Hierarchy

  • Mesh
    • VideoAgentMesh

Index

Constructors

Properties

$removeEventListener: () => void

Type declaration

    • (): void
    • Returns void

audioInstance: HTMLAudioElement
audioLikeInstance: AudioLike
castShadow: boolean

Gets rendered into shadow map.

children: Object3D[]

Array with object's children.

customDepthMaterial: Material

Custom depth material to be used when rendering to the depth map. Can only be used in context of meshes. When shadow-casting with a DirectionalLight or SpotLight, if you are (a) modifying vertex positions in the vertex shader, (b) using a displacement map, (c) using an alpha map with alphaTest, or (d) using a transparent texture with alphaTest, you must specify a customDepthMaterial for proper shadows.

customDistanceMaterial: Material

Same as customDepthMaterial, but used with PointLight.

freeze: boolean
frustumCulled: boolean

When this is set, it checks every frame if the object is in the frustum of the camera. Otherwise the object gets drawn every frame even if it isn't visible.

geometry: Geometry | BufferGeometry
id: number

Unique number of this object instance.

isMesh: true
isObject3D: true

Used to check whether this or derived classes are Object3Ds. Default is true. You should not change this, as it is used internally for optimisation.

layers: Layers
material: Material | Material[]
matrix: Matrix4

Local transform.

matrixAutoUpdate: boolean

When this is set, it calculates the matrix of position, (rotation or quaternion) and scale every frame and also recalculates the matrixWorld property.

matrixWorld: Matrix4

The global transform of the object. If the Object3d has no parent, then it's identical to the local transform.

matrixWorldNeedsUpdate: boolean

When this is set, it calculates the matrixWorld in that frame and resets this property to false.

modelViewMatrix: Matrix4
morphTargetDictionary?: {}

Type declaration

  • [key: string]: number
morphTargetInfluences?: number[]
name: string

Optional name of the object (doesn't need to be unique).

normalMatrix: Matrix3
onAfterRender: (renderer: WebGLRenderer, scene: Scene, camera: Camera, geometry: Geometry | BufferGeometry, material: Material, group: Group) => void

Type declaration

    • (renderer: WebGLRenderer, scene: Scene, camera: Camera, geometry: Geometry | BufferGeometry, material: Material, group: Group): void
    • Calls after rendering object

      Parameters

      • renderer: WebGLRenderer
      • scene: Scene
      • camera: Camera
      • geometry: Geometry | BufferGeometry
      • material: Material
      • group: Group

      Returns void

onBeforeRender: (renderer: WebGLRenderer, scene: Scene, camera: Camera, geometry: Geometry | BufferGeometry, material: Material, group: Group) => void

Type declaration

    • (renderer: WebGLRenderer, scene: Scene, camera: Camera, geometry: Geometry | BufferGeometry, material: Material, group: Group): void
    • Calls before rendering object

      Parameters

      • renderer: WebGLRenderer
      • scene: Scene
      • camera: Camera
      • geometry: Geometry | BufferGeometry
      • material: Material
      • group: Group

      Returns void

parent: null | Object3D

Object's parent in the scene graph.

paused: boolean
position: Vector3

Object's local position.

quaternion: Quaternion

Global rotation.

receiveShadow: boolean

Material gets baked in shadow receiving.

renderOrder: number

Overrides the default rendering order of scene graph objects, from lowest to highest renderOrder. Opaque and transparent objects remain sorted independently though. When this property is set for an instance of Group, all descendants objects will be sorted and rendered together.

rotation: Euler

Object's local rotation (Euler angles), in radians.

scale: Vector3

Object's local scale.

type: string
up: Vector3

Up direction.

userData: {}

An object that can be used to store custom data about the Object3d. It should not hold references to functions as these will not be cloned.

Type declaration

  • [key: string]: any
uuid: string
videoUrl?: string
visible: boolean

Object gets rendered if true.

DefaultMatrixAutoUpdate: boolean
DefaultUp: Vector3

Accessors

  • get currentTime(): number
  • get videoInstance(): HTMLAudioElement | AudioLike

Methods

  • Adds object as child of this object.

    Parameters

    • Rest ...object: Object3D[]

    Returns VideoAgentMesh

  • addEventListener(type: string, listener: (event: Event) => void): void
  • Adds a listener to an event type.

    Parameters

    • type: string

      The type of event to listen to.

    • listener: (event: Event) => void

      The function that gets called when the event is fired.

        • (event: Event): void
        • Parameters

          • event: Event

          Returns void

    Returns void

  • applyMatrix4(matrix: Matrix4): void
  • This updates the position, rotation and scale with the matrix.

    Parameters

    • matrix: Matrix4

    Returns void

  • Parameters

    • quaternion: Quaternion

    Returns VideoAgentMesh

  • Adds object as a child of this, while maintaining the object's world transform.

    Parameters

    • object: Object3D

    Returns VideoAgentMesh

  • Parameters

    • Optional recursive: boolean

    Returns VideoAgentMesh

  • Parameters

    Returns VideoAgentMesh

  • dispatchEvent(event: { type: string }): void
  • Fire an event type.

    Parameters

    • event: { type: string }
      • [attachment: string]: any
      • type: string

    Returns void

  • dispose(): void
  • getObjectById(id: number): undefined | Object3D
  • Searches through the object's children and returns the first with a matching id.

    Parameters

    • id: number

      Unique number of the object instance

    Returns undefined | Object3D

  • getObjectByName(name: string): undefined | Object3D
  • Searches through the object's children and returns the first with a matching name.

    Parameters

    • name: string

      String to match to the children's Object3d.name property.

    Returns undefined | Object3D

  • getObjectByProperty(name: string, value: string): undefined | Object3D
  • Parameters

    • name: string
    • value: string

    Returns undefined | Object3D

  • getWorldDirection(target: Vector3): Vector3
  • Parameters

    • target: Vector3

    Returns Vector3

  • getWorldPosition(target: Vector3): Vector3
  • Parameters

    • target: Vector3

    Returns Vector3

  • getWorldQuaternion(target: Quaternion): Quaternion
  • Parameters

    • target: Quaternion

    Returns Quaternion

  • getWorldScale(target: Vector3): Vector3
  • Parameters

    • target: Vector3

    Returns Vector3

  • hasEventListener(type: string, listener: (event: Event) => void): boolean
  • Checks if listener is added to an event type.

    Parameters

    • type: string

      The type of event to listen to.

    • listener: (event: Event) => void

      The function that gets called when the event is fired.

        • (event: Event): void
        • Parameters

          • event: Event

          Returns void

    Returns boolean

  • localToWorld(vector: Vector3): Vector3
  • Updates the vector from local space to world space.

    Parameters

    • vector: Vector3

      A local vector.

    Returns Vector3

  • lookAt(vector: number | Vector3, y?: number, z?: number): void
  • Rotates object to face point in space.

    Parameters

    • vector: number | Vector3

      A world vector to look at.

    • Optional y: number
    • Optional z: number

    Returns void

  • play(videoUrl?: string, currentTime?: number, duration?: number): Promise<unknown>
  • raycast(raycaster: Raycaster, intersects: Intersection[]): void
  • Parameters

    • raycaster: Raycaster
    • intersects: Intersection[]

    Returns void

  • Removes object as child of this object.

    Parameters

    • Rest ...object: Object3D[]

    Returns VideoAgentMesh

  • removeEventListener(type: string, listener: (event: Event) => void): void
  • Removes a listener from an event type.

    Parameters

    • type: string

      The type of the listener that gets removed.

    • listener: (event: Event) => void

      The listener function that gets removed.

        • (event: Event): void
        • Parameters

          • event: Event

          Returns void

    Returns void

  • Rotate an object along an axis in object space. The axis is assumed to be normalized.

    Parameters

    • axis: Vector3

      A normalized vector in object space.

    • angle: number

      The angle in radians.

    Returns VideoAgentMesh

  • Rotate an object along an axis in world space. The axis is assumed to be normalized. Method Assumes no rotated parent.

    Parameters

    • axis: Vector3

      A normalized vector in object space.

    • angle: number

      The angle in radians.

    Returns VideoAgentMesh

  • Parameters

    • angle: number

    Returns VideoAgentMesh

  • Parameters

    • angle: number

    Returns VideoAgentMesh

  • Parameters

    • angle: number

    Returns VideoAgentMesh

  • setRotationFromAxisAngle(axis: Vector3, angle: number): void
  • Parameters

    • axis: Vector3
    • angle: number

    Returns void

  • setRotationFromEuler(euler: Euler): void
  • Parameters

    • euler: Euler

    Returns void

  • setRotationFromMatrix(m: Matrix4): void
  • Parameters

    • m: Matrix4

    Returns void

  • setRotationFromQuaternion(q: Quaternion): void
  • Parameters

    • q: Quaternion

    Returns void

  • toJSON(meta?: { geometries: any; images: any; materials: any; textures: any }): any
  • Parameters

    • Optional meta: { geometries: any; images: any; materials: any; textures: any }
      • geometries: any
      • images: any
      • materials: any
      • textures: any

    Returns any

  • Parameters

    • axis: Vector3

      A normalized vector in object space.

    • distance: number

      The distance to translate.

    Returns VideoAgentMesh

  • Translates object along x axis by distance.

    Parameters

    • distance: number

      Distance.

    Returns VideoAgentMesh

  • Translates object along y axis by distance.

    Parameters

    • distance: number

      Distance.

    Returns VideoAgentMesh

  • Translates object along z axis by distance.

    Parameters

    • distance: number

      Distance.

    Returns VideoAgentMesh

  • traverse(callback: (object: Object3D) => any): void
  • Parameters

    • callback: (object: Object3D) => any
        • (object: Object3D): any
        • Parameters

          • object: Object3D

          Returns any

    Returns void

  • traverseAncestors(callback: (object: Object3D) => any): void
  • Parameters

    • callback: (object: Object3D) => any
        • (object: Object3D): any
        • Parameters

          • object: Object3D

          Returns any

    Returns void

  • traverseVisible(callback: (object: Object3D) => any): void
  • Parameters

    • callback: (object: Object3D) => any
        • (object: Object3D): any
        • Parameters

          • object: Object3D

          Returns any

    Returns void

  • update(videoUrl: string): Promise<void>
  • updateMatrix(): void
  • Updates local transform.

    Returns void

  • updateMatrixWorld(force?: boolean): void
  • Updates global transform of the object and its children.

    Parameters

    • Optional force: boolean

    Returns void

  • updateMorphTargets(): void
  • Returns void

  • updateWorldMatrix(updateParents: boolean, updateChildren: boolean): void
  • Parameters

    • updateParents: boolean
    • updateChildren: boolean

    Returns void

  • worldToLocal(vector: Vector3): Vector3
  • Updates the vector from world space to local space.

    Parameters

    • vector: Vector3

      A world vector.

    Returns Vector3