Skip to content

format

typescript
Camera.targetTexture

class: Camera

description

Target render texture.

In general, the camera renders directly to the screen, but for certain effects, rendering the camera to a texture can be very useful. To do this, you can create a RenderTexture object and set it as the targetTexture on the camera. The camera will then render to that texture.

parameter

param_nametypedescription

reture

typedescription
RenderTextureThe current render texture of the camera.

code example

javascript