Skip to content

Commit

Permalink
update light example
Browse files Browse the repository at this point in the history
  • Loading branch information
Maoyeedy committed Oct 5, 2024
1 parent 01f760d commit fccf235
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lights.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
// Click and drag the mouse to view the scene from different angles.

function setup () {

document.oncontextmenu = () => false
cvs = createCanvas(windowWidth, windowHeight, WEBGL)

describe('A white box drawn against a gray background.')
}

function draw () {
background(50)
// Enable orbiting with the mouse.

orbitControl()

// Turn on the lights.
ambientLight(128, 128, 128)
directionalLight(128, 128, 128, 0, 0, -1)

// Draw the box.
box(50)

//draw a plane under the box
Expand Down

0 comments on commit fccf235

Please sign in to comment.