Visit the Documentation of the upcoming Threlte 6.
  1. @threlte/core
  2. PerspectiveCamera

@threlte/core

PerspectiveCamera

This module is deprecated. You can still use it but it will be removed in the future. Please consider using <T>/<Three> instead. Please read the update notice.

A camera that uses perspective projection.

This projection mode is designed to mimic the way the human eye sees. It is the most common projection mode used for rendering a 3D scene.

Import

Source

Github View Source Code

Package

NPM View Package

Related Docs


Example

<script>
  import { PerspectiveCamera } from '@threlte/core'
</script>

<PerspectiveCamera fov={60} position={{ x: 3, y: 3, z: 3 }} lookAt={{ x: 0, y: 0, z: 0 }} />

Properties

// optional
position: Position | undefined = undefined
scale: Scale | undefined = undefined
rotation: Rotation | undefined = undefined
lookAt: LookAt | undefined = undefined
viewportAware: boolean = false
castShadow: boolean | undefined = undefined
receiveShadow: boolean | undefined = undefined
frustumCulled: boolean | undefined = undefined
renderOrder: number | undefined = undefined
visible: boolean | undefined = undefined
dispose: boolean | undefined = undefined
userData: Record<string, any> | undefined = undefined
useCamera: boolean = true
near: number = undefined
far: number = undefined
fov: number = undefined

Bindings

inViewport: boolean
camera: THREE.PerspectiveCamera

Events

viewportenter: undefined
viewportleave: undefined