What is Incisor?
Tutorials
Key Concepts
Reddit
Stack Overflow
Deprecation Schedule

RenderTarget(name, coreWidth, coreHeight)

RenderTargets are objects that contain Textures to render to, as well as settings for how those textures may be resized automatically based on environmental factors such as canvas size, canvas aspect ratio, and the current asset package scale.

new RenderTarget(name, coreWidth, coreHeight)

RenderTargets are objects that contain Textures to render to, as well as settings for how those textures may be resized automatically based on environmental factors such as canvas size, canvas aspect ratio, and the current asset package scale.

Parameters:
Name Type Attributes Default Description
name string    

The name given to the RenderTarget. This name must be unique.

coreWidth number    

The base width value of this RenderTarget, prior to the application of any automatic resolution or aspect ratio adjustments that can occur.

coreHeight number    

The base height value of this RenderTarget, prior to the application of any automatic resolution or aspect ratio adjustments that can occur.

MEMBERS

assetPackageScaleResolutionScaling :boolean

Flag determining whether or not this RenderTarget automatically scales its resolution based on the current assetPackageScale. The current assetPackageScale can be found at nc.projectConfiguration.assetConfiguration.assetPackageScale.

Default Value:
  • true

auxiliaryResolutionScaleFactor :number

Additional factor that multiplies this RenderTarget's resolution scale.

Default Value:
  • 1

canvasAspectMatching :boolean

Flag determining whether or not this RenderTarget automatically matches the aspect ratio of the canvas.

Default Value:
  • false

canvasSizeResolutionScaling :boolean

Flag determining whether or not this RenderTarget automatically scales its resolution based on the size of the canvas.

Default Value:
  • false

capCanvasSizeResolutionScaling :boolean

Flag determining whether or not the canvasSizeResolutionScaling factor for this RenderTarget is capped to 1. This only applies if canvasSizeResolutionScaling is true.

Default Value:
  • true

coreHeight :number

The base height value of this RenderTarget. To get the final vertical render resolution of this RenderTarget's Texture, start with this value, then apply all of the enabled automatic adjustments (such as canvasAspectMatching and assetPackageScaleResolutionScaling).

Default Value:
  • 500

coreWidth :number

The base width value of this RenderTarget. To get the final horizontal render resolution of this RenderTarget's Texture, start with this value, then apply all of the enabled automatic adjustments (such as canvasAspectMatching and assetPackageScaleResolutionScaling).

Default Value:
  • 500

globalRenderTargetResolutionScaling :boolean

Flag determining whether or not this RenderTarget automatically scales its resolution based on the current nc.globalRenderTargetResolutionScaler value.

Default Value:
  • true

inheritedTypes :object

Dictionary object listing all of the types this object is compatible with.

name :string

The name of the RenderTarget. This name must be unique.

readonly renderResolutionLedger :object

Aan object containing a complete record of all of the factors that contribute to the final render resolution of this RenderTarget. [REQUIREMENT: unpublished projects only]

resizeLazyUpdater :LazyUpdater

The LazyUpdater in charge of updating the size of this RenderTarget's Texture. The 'updateIfNeeded' call for this LazyUpdater is called whenever this RenderTarget is rendered to, but you can call it directly if you need to ensure that changes to the RenderTarget size are applied immediately for any reason.

texture :Texture

The Texture associated with this RenderTarget.

type :string

Type identifier.

METHODS

getCurrentRenderResolution()

Returns a vector containing the current render resolution for this RenderTarget.