mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2024-12-29 16:29:40 +00:00
Fix "linear_sweep(..., texture=..., scale=..., twist=...)".
The commit 'Fix "linear_sweep(..., texture=..., scale=...)" was not enough. This one fixes linear_sweep(..., texture=...) when scale and/or twist parameters are specified. Code to reproduce the fixed issue: linear_sweep(ellipse(d = [5, 10]), 5, twist = 45, texture = "bricks", scale = 0.5);
This commit is contained in:
parent
d700884482
commit
d9f118e44f
1 changed files with 2 additions and 2 deletions
|
@ -3489,8 +3489,8 @@ function _textured_linear_sweep(
|
|||
if (i != counts.y || ti == 0)
|
||||
let(
|
||||
v = (i + (ti/texcnt.y)) / counts.y,
|
||||
sc = lerp(scale, [1,1,1], v),
|
||||
mat = down((v-0.5)*h) *
|
||||
sc = lerp([1, 1, 1], scale, v),
|
||||
mat = up((v-0.5)*h) *
|
||||
scale(sc) *
|
||||
zrot(twist*v)
|
||||
) apply(mat, tile_rows[ti])
|
||||
|
|
Loading…
Reference in a new issue