effect-motion
API ReferencethreeNamespacesSceneVariables

setBackground

const setBackground: {

Variable: setBackground

const setBackground: {
  (background): (self) => Scene;
  (self, background): Scene;
};

Defined in: packages/three/src/Scene.ts:160

Set the background color or texture, or null for transparency.

Call Signature

(background): (self) => Scene;

Parameters

ParameterType
backgroundTexture<unknown, TextureEventMap> | Color | null

Returns

(self) => Scene

Call Signature

(self, background): Scene;

Parameters

ParameterType
selfScene
backgroundTexture<unknown, TextureEventMap> | Color | null

Returns

Scene

Remarks

null is what an overlay tier wants: with nothing painted behind it, whatever was rendered first shows through.

On this page