arrange bamboo around center
This commit is contained in:
parent
724bc153be
commit
c434d7f866
1 changed files with 12 additions and 8 deletions
20
src/Arts.cs
20
src/Arts.cs
|
@ -96,17 +96,21 @@ static class Arts
|
||||||
);
|
);
|
||||||
|
|
||||||
// bamboo
|
// bamboo
|
||||||
for (int i = -12; i <= 12; i++)
|
offset = 0;
|
||||||
|
int s_len = 24;
|
||||||
|
for (int i = -s_len; i <= s_len; i++)
|
||||||
{
|
{
|
||||||
float z_offset = Noise.s_scalar_x(i) * 2.0f;
|
Quat q = Quat.FromAngles(0, i * 3, 0);
|
||||||
float x_offset = Noise.s_scalar_x(i + 32) * 0.2f;
|
Vec3 pos = q * V.XYZ(0, 0, -10 + (Maths.smooth_stop(Noise.u_scalar_x(i + s_len * 2)) * 5));
|
||||||
float x_wind = Maths.smooth_stop(Maths.u_scalar(SKMath.Sin((i * 0.16f) - Time.Totalf)));
|
// float z_offset = Noise.s_scalar_x(i + 32) * 2.0f;
|
||||||
|
float x_offset = Noise.s_scalar_x(i + s_len * 4) * 0.2f;
|
||||||
|
float x_wind = Maths.smooth_stop(Maths.u_scalar(SKMath.Sin((pos.x * 0.5f) - Time.Totalf)));
|
||||||
Vec3[] p = new Vec3[] {
|
Vec3[] p = new Vec3[] {
|
||||||
V.XYZ(i * 0.3f, 0, -10 + z_offset),
|
pos + V.XYZ(0, 0, 0),
|
||||||
V.XYZ(i * 0.3f, 1, -10 + z_offset),
|
pos + V.XYZ(0, 1, 0),
|
||||||
|
|
||||||
V.XYZ(i * 0.3f, 4, -10 + z_offset),
|
pos + V.XYZ(0, 4, 0),
|
||||||
V.XYZ(i * 0.3f + x_offset + x_wind, 5, -10 + z_offset),
|
pos + V.XYZ(x_offset + x_wind, 5, 0),
|
||||||
};
|
};
|
||||||
|
|
||||||
// debug bezier points
|
// debug bezier points
|
||||||
|
|
Loading…
Add table
Reference in a new issue