Skip to content

Commit

Permalink
Added test
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAlvarezMelucciDCL committed Jan 16, 2025
1 parent 259ad77 commit 3e57d30
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/ecs/components/LightSource.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,21 @@ describe('Generated LightSource ProtoBuf', () => {
shadow: components.PBLightSource_ShadowType.ST_NONE
})
})

it('should serialize/deserialize Spot LightSource', () => {
const newEngine = Engine()
const LightSource = components.LightSource(newEngine)

testComponentSerialization(LightSource, {
type: LightSource.Type.Spot({
innerAngle: 0,
outerAngle: 0
}),
active: true,
color: { r: 1, g: 1, b: 1 },
brightness: 1,
range: 10,
shadow: components.PBLightSource_ShadowType.ST_NONE
})
})
})

0 comments on commit 3e57d30

Please sign in to comment.