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:quick_reference_transforms [2020/12/01 01:48] JSCAD Editor |
en:quick_reference_transforms [2021/04/30 08:23] (current) JSCAD Editor |
||
|---|---|---|---|
| Line 5: | Line 5: | ||
| <code javascript> | <code javascript> | ||
| const { translate, scale, rotateX } = require(' | const { translate, scale, rotateX } = require(' | ||
| - | </ | ||
| - | |||
| - | The ' | ||
| - | |||
| - | <code javascript> | ||
| - | const newshape = align({modes: | ||
| - | const newshapes = align({modes: | ||
| </ | </ | ||
| ^ Transform | ^ Transform | ||
| - | | const newshape = align({modes: | + | | const newshape = align({modes: |
| - | | const newshape = center({axes: | + | | const newshape = center({axes: |
| - | | const newshape = centerX(oldshape) | + | | const newshape = centerX(oldshape) |
| - | | const newshape = centerY(oldshape) | + | | const newshape = centerY(oldshape) |
| - | | const newshape = centerZ(oldshape) | + | | const newshape = centerZ(oldshape) |
| - | | const newshape = mirror({origin: | + | | const newshape = mirror({origin: |
| - | | const newshape = mirrorX(oldshape) | + | | const newshape = mirrorX(oldshape) |
| - | | const newshape = mirrorY(oldshape) | + | | const newshape = mirrorY(oldshape) |
| - | | const newshape = mirrorZ(oldshape) | + | | const newshape = mirrorZ(oldshape) |
| - | | const newshape = rotate([Math.PI / 4, 0, 0], oldshape) | + | | const newshape = rotate([Math.PI / 4, 0, 0], oldshape) |
| - | | const newshape = rotateX(oldshape) | + | | const newshape = rotateX(oldshape) |
| - | | const newshape = rotateY(oldshape) | + | | const newshape = rotateY(oldshape) |
| - | | const newshape = rotateZ(oldshape) | + | | const newshape = rotateZ(oldshape) |
| - | | const newshape = scale([5, 0, 10], oldshape) | + | | const newshape = scale([5, 0, 10], oldshape) |
| - | | const newshape = scaleX(5, oldshape) | + | | const newshape = scaleX(5, oldshape) |
| - | | const newshape = scaleY(0.5, oldshape) | + | | const newshape = scaleY(0.5, oldshape) |
| - | | const newshape = scaleZ(5, oldshape) | + | | const newshape = scaleZ(5, oldshape) |
| + | | const newshape = transform(mat4.rotateX(Math.PI/ | ||
| + | | const newshape = translate([5, | ||
| + | | const newshape = translateX(5, | ||
| + | | const newshape = translateY(0.5, | ||
| + | | const newshape = translateZ(5, | ||