Skip to content

Commit

Permalink
Rename a Position to Velocity of GpuParticles
Browse files Browse the repository at this point in the history
  • Loading branch information
ueshita committed Feb 27, 2024
1 parent 9a55c0b commit 0cda5a5
Show file tree
Hide file tree
Showing 18 changed files with 48 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ GpuParticles::ParamSet LoadGpuParticlesParameter(uint8_t*& pos, int32_t version)
break;
}

paramSet.Position.Direction = Read<float3>(pos);
paramSet.Position.Spread = Read<float>(pos);
paramSet.Position.InitialSpeed = Read<std::array<float, 2>>(pos);
paramSet.Position.Damping = Read<std::array<float, 2>>(pos);
paramSet.Velocity.Direction = Read<float3>(pos);
paramSet.Velocity.Spread = Read<float>(pos);
paramSet.Velocity.InitialSpeed = Read<std::array<float, 2>>(pos);
paramSet.Velocity.Damping = Read<std::array<float, 2>>(pos);

paramSet.Rotation.Offset = Read<std::array<float3, 2>>(pos);
paramSet.Rotation.Velocity = Read<std::array<float3, 2>>(pos);
Expand Down
4 changes: 2 additions & 2 deletions Dev/Cpp/Effekseer/Effekseer/Renderer/Effekseer.GpuParticles.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,14 @@ struct ParamSet
};
EmitShapeParams EmitShape;

struct PositionParams
struct VelocityParams
{
float3 Direction;
float Spread;
std::array<float, 2> InitialSpeed;
std::array<float, 2> Damping;
};
PositionParams Position;
VelocityParams Velocity;

struct RotationParams
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,10 @@ GpuParticles::ParameterData GpuParticleFactory::ToParamData(const Effekseer::Gpu
data.EmitShapeData[0] = paramSet.EmitShape.Data[0];
data.EmitShapeData[1] = paramSet.EmitShape.Data[1];

data.Direction = paramSet.Position.Direction;
data.Spread = paramSet.Position.Spread;
data.InitialSpeed = paramSet.Position.InitialSpeed;
data.Damping = paramSet.Position.Damping;
data.Direction = paramSet.Velocity.Direction;
data.Spread = paramSet.Velocity.Spread;
data.InitialSpeed = paramSet.Velocity.InitialSpeed;
data.Damping = paramSet.Velocity.Damping;

data.AngularOffset[0] = float4(paramSet.Rotation.Offset[0], 0.0f);
data.AngularOffset[1] = float4(paramSet.Rotation.Offset[1], 0.0f);
Expand Down
8 changes: 4 additions & 4 deletions Dev/Editor/EffekseerCore/Binary/GpuParticlesValues.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ public static byte[] GetBytes(Data.GpuParticlesValues value,
break;
}

data.Add(value.Position.Direction.GetBytes());
data.Add(value.Position.Spread.GetBytes());
data.Add(value.Position.InitialSpeed.GetBytes());
data.Add(value.Position.Damping.GetBytes());
data.Add(value.Velocity.Direction.GetBytes());
data.Add(value.Velocity.Spread.GetBytes());
data.Add(value.Velocity.InitialSpeed.GetBytes());
data.Add(value.Velocity.Damping.GetBytes());

data.Add(value.Rotation.InitialAngle.GetBytes());
data.Add(value.Rotation.AngularVelocity.GetBytes());
Expand Down
14 changes: 7 additions & 7 deletions Dev/Editor/EffekseerCore/Data/GpuParticles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,18 @@ public EmitShapeParams(Value.Path basepath)
}
}

public class PositionParams
public class VelocityParams
{
[Key(key = "GpuParticles_Position_Direction")]
[Key(key = "GpuParticles_Velocity_Direction")]
public Value.Vector3D Direction { get; private set; } = new Value.Vector3D(0.0f, 0.0f, 1.0f);

[Key(key = "GpuParticles_Position_Spread")]
[Key(key = "GpuParticles_Velocity_Spread")]
public Value.Float Spread { get; private set; } = new Value.Float(value: 15.0f, min: 0.0f, max: 180.0f);

[Key(key = "GpuParticles_Position_InitialSpeed")]
[Key(key = "GpuParticles_Velocity_InitialSpeed")]
public Value.FloatWithRandom InitialSpeed { get; private set; } = new Value.FloatWithRandom(value: 1.0f);

[Key(key = "GpuParticles_Position_Damping")]
[Key(key = "GpuParticles_Velocity_Damping")]
public Value.FloatWithRandom Damping { get; private set; } = new Value.FloatWithRandom(value: 0.0f, min: 0.0f);
}

Expand Down Expand Up @@ -371,8 +371,8 @@ public RenderMaterialParams(Value.Path basepath)

[IO(Export = true)]
[Selected(ID = 0, Value = 1)]
[TreeNode(id = "GpuParticles_Position", key = "GpuParticles_Position")]
public PositionParams Position { get; private set; } = new PositionParams();
[TreeNode(id = "GpuParticles_Velocity", key = "GpuParticles_Velocity")]
public VelocityParams Velocity { get; private set; } = new VelocityParams();

[IO(Export = true)]
[Selected(ID = 0, Value = 1)]
Expand Down
18 changes: 9 additions & 9 deletions Dev/release/resources/languages/en/Effekseer_GpuParticles.csv
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ GpuParticles_EmitShape_ModelSize_Desc,Size of mesh shape.
GpuParticles_EmitShape_RotationApplied_Name,Set angle on spawn
GpuParticles_EmitShape_RotationApplied_Desc,Valid for circles, spheres, and models

GpuParticles_Position_Name,Position
GpuParticles_Position_Direction_Name,Direction
GpuParticles_Position_Direction_Desc,Direction of movement when spawning particles.
GpuParticles_Position_Spread_Name,Spread
GpuParticles_Position_Spread_Desc,Angle of random diffusion in the direction of movement when spawning particles.
GpuParticles_Position_InitialSpeed_Name,Initial Speed
GpuParticles_Position_InitialSpeed_Desc,Initial speed of movement when spawning particles.
GpuParticles_Position_Damping_Name,Damping
GpuParticles_Position_Damping_Desc,Damping force during particle motion.
GpuParticles_Velocity_Name,Velocity
GpuParticles_Velocity_Direction_Name,Direction
GpuParticles_Velocity_Direction_Desc,Direction of movement when spawning particles.
GpuParticles_Velocity_Spread_Name,Spread
GpuParticles_Velocity_Spread_Desc,Angle of random diffusion in the direction of movement when spawning particles.
GpuParticles_Velocity_InitialSpeed_Name,Initial Speed
GpuParticles_Velocity_InitialSpeed_Desc,Initial speed of movement when spawning particles.
GpuParticles_Velocity_Damping_Name,Damping
GpuParticles_Velocity_Damping_Desc,Damping force during particle motion.

GpuParticles_Rotation_Name,Rotation
GpuParticles_Rotation_InitialAngle_Name,Initial Angle
Expand Down
18 changes: 9 additions & 9 deletions Dev/release/resources/languages/es/Effekseer_GpuParticles.csv
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ GpuParticles_EmitShape_ModelSize_Desc,Tamaño de la forma de la malla.
GpuParticles_EmitShape_RotationApplied_Name,Ajustar ángulo en la Aparición
GpuParticles_EmitShape_RotationApplied_Desc,Válido para círculo, esfera y modelo

GpuParticles_Position_Name,Posición
GpuParticles_Position_Direction_Name,Dirección
GpuParticles_Position_Direction_Desc,Dirección de movimiento cuando se generan partículas.
GpuParticles_Position_Spread_Name,Dispersión
GpuParticles_Position_Spread_Desc,Ángulo de difusión aleatoria en la dirección del movimiento cuando se generan partículas.
GpuParticles_Position_InitialSpeed_Name,Velocidad Inicial
GpuParticles_Position_InitialSpeed_Desc,Velocidad inicial del movimiento al desovar partículas.
GpuParticles_Position_Damping_Name,Amortiguación
GpuParticles_Position_Damping_Desc,Fuerza de amortiguación durante el movimiento de las partículas.
GpuParticles_Velocity_Name,Velocidad
GpuParticles_Velocity_Direction_Name,Dirección
GpuParticles_Velocity_Direction_Desc,Dirección de movimiento cuando se generan partículas.
GpuParticles_Velocity_Spread_Name,Dispersión
GpuParticles_Velocity_Spread_Desc,Ángulo de difusión aleatoria en la dirección del movimiento cuando se generan partículas.
GpuParticles_Velocity_InitialSpeed_Name,Velocidad Inicial
GpuParticles_Velocity_InitialSpeed_Desc,Velocidad inicial del movimiento al desovar partículas.
GpuParticles_Velocity_Damping_Name,Amortiguación
GpuParticles_Velocity_Damping_Desc,Fuerza de amortiguación durante el movimiento de las partículas.

GpuParticles_Rotation_Name,Rotación
GpuParticles_Rotation_InitialAngle_Name,Ángulo inicial
Expand Down
18 changes: 9 additions & 9 deletions Dev/release/resources/languages/ja/Effekseer_GpuParticles.csv
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ GpuParticles_EmitShape_ModelSize_Desc,モデル形状のサイズ
GpuParticles_EmitShape_RotationApplied_Name,生成角度に影響
GpuParticles_EmitShape_RotationApplied_Desc,円、球、モデルで有効

GpuParticles_Position_Name,位置
GpuParticles_Position_Direction_Name,移動方向
GpuParticles_Position_Direction_Desc,パーティクル生成時の移動方向
GpuParticles_Position_Spread_Name,拡散角度
GpuParticles_Position_Spread_Desc,パーティクル生成時の移動方向のランダムに拡散する角度
GpuParticles_Position_InitialSpeed_Name,初期速度
GpuParticles_Position_InitialSpeed_Desc,パーティクル生成時の速さ
GpuParticles_Position_Damping_Name,速度減衰
GpuParticles_Position_Damping_Desc,パーティクル運動時の減衰力
GpuParticles_Velocity_Name,速度
GpuParticles_Velocity_Direction_Name,方向
GpuParticles_Velocity_Direction_Desc,パーティクル生成時の移動方向
GpuParticles_Velocity_Spread_Name,拡散角度
GpuParticles_Velocity_Spread_Desc,パーティクル生成時の移動方向のランダムに拡散する角度
GpuParticles_Velocity_InitialSpeed_Name,初期速度
GpuParticles_Velocity_InitialSpeed_Desc,パーティクル生成時の速さ
GpuParticles_Velocity_Damping_Name,速度減衰
GpuParticles_Velocity_Damping_Desc,パーティクル運動時の減衰力

GpuParticles_Rotation_Name,回転
GpuParticles_Rotation_InitialAngle_Name,初期角度
Expand Down
Binary file modified Examples/Resources/GpuParticles_emit_line.efkefc
Binary file not shown.
Binary file modified Examples/Resources/GpuParticles_emit_mesh.efkefc
Binary file not shown.
Binary file modified Examples/Resources/GpuParticles_emit_sphere.efkefc
Binary file not shown.
Binary file modified Examples/Resources/GpuParticles_force_turbulence.efkefc
Binary file not shown.
Binary file modified Examples/Resources/GpuParticles_force_vortex.efkefc
Binary file not shown.
Binary file modified Examples/Resources/GpuParticles_mesh_simple.efkefc
Binary file not shown.
Binary file modified Examples/Resources/GpuParticles_sprite_directional.efkefc
Binary file not shown.
Binary file modified Examples/Resources/GpuParticles_sprite_mass.efkefc
Binary file not shown.
Binary file modified Examples/Resources/GpuParticles_sprite_simple.efkefc
Binary file not shown.
Binary file modified Examples/Resources/GpuParticles_trails_simple.efkefc
Binary file not shown.

0 comments on commit 0cda5a5

Please sign in to comment.