Options
All
  • Public
  • Public/Protected
  • All
Menu

Wrapper for a scene, an object that stores and shows a polytope.

Hierarchy

  • Scene

Index

Constructors

constructor

Properties

Readonly ambientLight

ambientLight: AmbientLight = new THREE.AmbientLight(0xffffff, 0.3)

Readonly camera

camera: PerspectiveCamera = new THREE.PerspectiveCamera(75,globalThis.innerWidth / globalThis.innerHeight,0.1,1000)

A camera object to change the viewpoint.

controls

Readonly directionalLight

directionalLight: DirectionalLight = new THREE.DirectionalLight(0xffffff, 0.6)

Readonly material

material: MeshLambertMaterial = new THREE.MeshLambertMaterial({color: 0xffffff,side: THREE.DoubleSide,flatShading: true,})

polytopes

polytopes: PolytopeB[] = []

The list of polytopes that are currently on screen.

Readonly renderer

renderer: WebGLRenderer = new THREE.WebGLRenderer({ antialias: true })

Does the drawing with WEBGL.

Readonly scene

scene: Scene = new THREE.Scene()

Stores all of the polygons, lights, cameras, ... on screen.

Methods

add

  • add(face: Point[][]): void
  • Adds a face to the scene. The face is an array of simple polygons that together, form the face. This code figures out which of these faces need to be rendered, and transforms the points into 3D. (or at least will when it's fully functional).

    todo

    Make the code fully functional.

    Parameters

    Returns void

Private addLights

  • addLights(): void

clear

  • clear(): void

Generated using TypeDoc, the 1/31/2021 at 6:18:56 AM