Question: Three.js and javascript programming - Stairs are made up of a series of steps , and each step is made up of a riser and

Three.js and javascript programming -

Stairs are made up of a series of steps, and each step is made up of a riser and a tread. The riser is the vertical part of the step and the tread is the horizontal part you step.

Write a function createStairs(riser, tread, width, nbrSteps) that returns a geometry for stairs made of nbrSteps many steps, where each step has specified width, and whose riser rises riser units and whose tread treads tread units (of course), and use your function is a program to render stairs. The geometry depicted below (sans labels) was created with the call createStairs(1, 2, 4, 5).

function createStairs(riser, tread, width, nbrSteps) { } 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!