This explains the repo
The program's purpose is to show how boxes of certain dimensions are stacked and then provides the dimensions of the stack itself. This program uses a consumer product as an example.
The array (as seen below) should be structured as:
An Object containing 4 properties:
- grid
- totalSize: addition of final parameters of stack
- quantity: number of boxes being stacked
- title: title of product
In grid there are 3 Objects each representing a parameter of a box (length, width, height):
- scale: number of rows/columns
- total: total span of parameter
- initial: initial span of an individual box
Here is an example of the input data:
Given input data:
[{
"grid": [{
"scale": 2,
"total": 80,
"initial": 40
}, {
"scale": 3,
"total": 75,
"initial": 25
}, {
"scale": 7,
"total": 105,
"initial": 15
}],
"totalSize": 260,
"quantity": 39,
"title": "AccSafe Premium Cotton Inspection Glove White 1 dozen "
}]
This script renders: