meta data for this page
Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
en:design_guide_scale [2020/12/01 00:23] JSCAD Editor |
en:design_guide_scale [2020/12/08 06:52] (current) JSCAD Editor |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ==== Scale ==== | ==== Scale ==== | ||
| - | Shapes can be scaled by any factor. Shapes are enlarged | + | Shapes can be scaled by any factor, enlarging |
| // | // | ||
| Defaults: | Defaults: | ||
| - | * factor | + | * factors |
| <code javascript> | <code javascript> | ||
| - | let myshape = sphere({radius: | + | const myshape = sphere({radius: |
| - | let newshape = scale([2, 4, 6], myshape) | + | const newshape = scale([2, 4, 6], myshape) |
| </ | </ | ||
| - | In addition, there are simple versions of the same function for scale about a single axis. | + | In addition, there are simple versions of the same function for scaling |
| <code javascript> | <code javascript> | ||
| - | let myshape = sphere({radius: | + | const myshape = sphere({radius: |
| let newshape = scaleX(2, myshape) | let newshape = scaleX(2, myshape) | ||
| - | newshape = scaleY(4, | + | newshape = scaleY(4, |
| - | newshape = scaleZ(6, | + | newshape = scaleZ(6, |
| </ | </ | ||