@@ -38,9 +38,7 @@ function billboardFromRenderMode(renderMode: number | undefined): { isBillboardB
3838 4 : { isBillboardBased : true , billboardMode : ParticleSystem . BILLBOARDMODE_Y } ,
3939 5 : { isBillboardBased : true , billboardMode : ParticleSystem . BILLBOARDMODE_Y } ,
4040 } ;
41- return renderMode !== undefined && renderMode in map
42- ? map [ renderMode ]
43- : { isBillboardBased : true , billboardMode : ParticleSystem . BILLBOARDMODE_ALL } ;
41+ return renderMode !== undefined && renderMode in map ? map [ renderMode ] : { isBillboardBased : true , billboardMode : ParticleSystem . BILLBOARDMODE_ALL } ;
4442}
4543
4644/**
@@ -85,16 +83,8 @@ export function convertParticleSystem(unityPS: any, renderer: any): IParticleSys
8583 preWarmCycles : main . prewarm === "1" ? 100 : 0 ,
8684 isLocal : ( getUnityProp ( main , "simulationSpace" ) ?? main . simulationSpace ) === "0" ,
8785
88- color1 : convertColor (
89- maxColor
90- ? { r : maxColor . r ?? "1" , g : maxColor . g ?? "1" , b : maxColor . b ?? "1" , a : maxColor . a ?? "1" }
91- : { r : "1" , g : "1" , b : "1" , a : "1" }
92- ) ,
93- color2 : convertColor (
94- maxColor
95- ? { r : maxColor . r ?? "1" , g : maxColor . g ?? "1" , b : maxColor . b ?? "1" , a : maxColor . a ?? "1" }
96- : { r : "1" , g : "1" , b : "1" , a : "1" }
97- ) ,
86+ color1 : convertColor ( maxColor ? { r : maxColor . r ?? "1" , g : maxColor . g ?? "1" , b : maxColor . b ?? "1" , a : maxColor . a ?? "1" } : { r : "1" , g : "1" , b : "1" , a : "1" } ) ,
87+ color2 : convertColor ( maxColor ? { r : maxColor . r ?? "1" , g : maxColor . g ?? "1" , b : maxColor . b ?? "1" , a : maxColor . a ?? "1" } : { r : "1" , g : "1" , b : "1" , a : "1" } ) ,
9888
9989 minInitialRotation : parseFloat ( startRotation ?. minScalar ?? startRotation ?. scalar ?? "0" ) ,
10090 maxInitialRotation : parseFloat ( startRotation ?. scalar ?? "0" ) ,
@@ -221,7 +211,11 @@ export function convertParticleSystem(unityPS: any, renderer: any): IParticleSys
221211 }
222212
223213 // Rotation3DOverLife (if separate X, Y, Z)
224- if ( rotationOverLifetimeModule && isEnabled ( rotationOverLifetimeModule ) && ( rotationOverLifetimeModule . separateAxes === "1" || getUnityProp ( rotationOverLifetimeModule , "separateAxes" ) === "1" ) ) {
214+ if (
215+ rotationOverLifetimeModule &&
216+ isEnabled ( rotationOverLifetimeModule ) &&
217+ ( rotationOverLifetimeModule . separateAxes === "1" || getUnityProp ( rotationOverLifetimeModule , "separateAxes" ) === "1" )
218+ ) {
225219 behaviors . push ( {
226220 type : "Rotation3DOverLife" ,
227221 angularVelocityX : convertMinMaxCurve ( getUnityProp ( rotationOverLifetimeModule , "x" ) ?? { } ) ,
@@ -322,11 +316,7 @@ export function convertParticleSystem(unityPS: any, renderer: any): IParticleSys
322316 const sx = getUnityProp ( noiseModule , "strengthX" ) ?? noiseModule . strengthX ;
323317 const sy = getUnityProp ( noiseModule , "strengthY" ) ?? noiseModule . strengthY ;
324318 const sz = getUnityProp ( noiseModule , "strengthZ" ) ?? noiseModule . strengthZ ;
325- config . noiseStrength = new Vector3 (
326- parseFloat ( sx ?. scalar ?? "0" ) ,
327- parseFloat ( sy ?. scalar ?? "0" ) ,
328- parseFloat ( sz ?. scalar ?? "0" )
329- ) ;
319+ config . noiseStrength = new Vector3 ( parseFloat ( sx ?. scalar ?? "0" ) , parseFloat ( sy ?. scalar ?? "0" ) , parseFloat ( sz ?. scalar ?? "0" ) ) ;
330320 }
331321
332322 config . behaviors = behaviors ;
0 commit comments