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_translate [2020/12/01 00:15] JSCAD Editor |
en:design_guide_translate [2020/12/08 06:52] (current) JSCAD Editor |
||
|---|---|---|---|
| Line 9: | Line 9: | ||
| <code javascript> | <code javascript> | ||
| - | let myshape = sphere([radius: | + | const myshape = sphere([radius: |
| - | let newshape = translate([0, 0, 10], myshape) | + | const newshape = translate([3, 7, -10], myshape) |
| </ | </ | ||
| + | In addition, there are simple versions of the same function for translating about a single axis. | ||
| + | |||
| + | <code javascript> | ||
| + | const myshape = sphere([radius: | ||
| + | let newshape = translateX(3, | ||
| + | newshape = translateY(7, | ||
| + | newshape = translateZ(-10, | ||
| + | </ | ||