Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/threejs_4_deno/src/Three.d.ts>Scene

A simple transformation of three.js for use within a Deno workflow
Go to Latest
class Scene
extends Object3D
Re-export
import { Scene } from "https://deno.land/x/threejs_4_deno@v121/src/Three.d.ts";

Scenes allow you to set up what and where is to be rendered by three.js. This is where you place objects, lights and cameras.

Constructors

new
Scene()

Properties

autoUpdate: boolean
background:
environment: null | Texture
fog: IFog | null

A fog instance defining the type of fog that affects everything rendered in the scene. Default is null.

readonly
isScene: true
onAfterRender: (
renderer: WebGLRenderer,
scene: Scene,
camera: Camera,
) => void

Calls after rendering scene

onBeforeRender: (
renderer: WebGLRenderer,
scene: Scene,
camera: Camera,
renderTarget: WebGLRenderTarget | any,
) => void

Calls before rendering scene

overrideMaterial: Material | null

If not null, it will force everything in the scene to be rendered with that material. Default is null.

type: "Scene"

Methods

dispose(): void
toJSON(meta?: any): any