skybox subsetter

This commit is contained in:
SoulliesOfficial
2025-07-09 01:01:06 -04:00
parent 6533997d59
commit 537caabfa9
128 changed files with 13280 additions and 2268 deletions

View File

@@ -25,6 +25,7 @@ namespace Dreamteck.Splines
public enum MotionType { None, UseParticleSystem, FollowForward, FollowBackward, ByNormal, ByNormalRandomized }
public enum Wrap { Default, Loop }
public bool is3D;
public float width = 10f;
public Vector3 extendDirection = Vector3.right;
@@ -141,6 +142,8 @@ namespace Dreamteck.Splines
particle.velocity = trs.InverseTransformDirection(particle.velocity);
}
protected override void Reset()
{
base.Reset();
@@ -157,7 +160,15 @@ namespace Dreamteck.Splines
{
Evaluate(particleData.GetSplinePercent(wrapMode, _particles[index], motionType), ref evalResult);
Vector3 resultRight = evalResult.right;
_particles[index].position = evalResult.position + extendDirection * particleData.initialOffset;
if (!is3D)
{
_particles[index].position = evalResult.position + extendDirection * particleData.initialOffset;
}
else
{
_particles[index].position = evalResult.position + particleData.threeDOffset;
}
if (apply3DRotation)
{
_particles[index].rotation3D = evalResult.rotation.eulerAngles;
@@ -217,8 +228,16 @@ namespace Dreamteck.Splines
if (emitFromShell) circle = Quaternion.AngleAxis(Random.Range(0f, 360f), Vector3.forward) * Vector2.right;
else circle = Random.insideUnitCircle;
}
if (!is3D)
{
newParticleData.initialOffset = Random.Range(-width, width);
}
else
{
newParticleData.threeDOffset = new Vector3(Random.Range(-width, width), Random.Range(-width, width), 0);
}
newParticleData.initialOffset = Random.Range(-width, width);
newParticleData.startOffset = circle * 0.5f;
newParticleData.endOffset = Random.insideUnitCircle * 0.5f;
_particleDataMap.Add(seed, newParticleData);
@@ -265,6 +284,7 @@ namespace Dreamteck.Splines
public class Particle
{
internal float initialOffset;
internal Vector3 threeDOffset = Vector3.zero;
internal Vector2 startOffset = Vector2.zero;
internal Vector2 endOffset = Vector2.zero;
internal float cycleSpeed = 0f;

View File

@@ -27,6 +27,7 @@ namespace Dreamteck.Splines.Editor
SerializedProperty wrapMode = serializedObject.FindProperty("wrapMode");
SerializedProperty minCycles = serializedObject.FindProperty("minCycles");
SerializedProperty maxCycles = serializedObject.FindProperty("maxCycles");
SerializedProperty is3D = serializedObject.FindProperty("is3D");
SerializedProperty width = serializedObject.FindProperty("width");
SerializedProperty extendDirection = serializedObject.FindProperty("extendDirection");
@@ -40,6 +41,7 @@ namespace Dreamteck.Splines.Editor
EditorGUILayout.PropertyField(pauseWhenNotVisible);
EditorGUILayout.PropertyField(emitPoint);
EditorGUILayout.PropertyField(offset);
EditorGUILayout.PropertyField(is3D);
EditorGUILayout.PropertyField(width);
if (width.floatValue < 0f) width.floatValue = 0f;
EditorGUILayout.PropertyField(extendDirection);