effect-motion
API ReferencethreeNamespacesRenderTargetVariables

setSize

const setSize: {

Variable: setSize

const setSize: {
  (nextWidth, nextHeight): (self) => RenderTarget;
  (self, nextWidth, nextHeight): RenderTarget;
};

Defined in: packages/three/src/RenderTarget.ts:139

Resize the target in place.

Call Signature

(nextWidth, nextHeight): (self) => RenderTarget;

Parameters

ParameterType
nextWidthnumber
nextHeightnumber

Returns

(self) => RenderTarget

Call Signature

(
   self,
   nextWidth,
   nextHeight): RenderTarget;

Parameters

ParameterType
selfRenderTarget
nextWidthnumber
nextHeightnumber

Returns

RenderTarget

Remarks

three reallocates the underlying GPU textures, so the handle stays valid and nothing needs re-registering with the scope. Contents are not preserved — redraw after resizing.

On this page