init(castsShadow:receivesShadow:)
Creates a grounding shadow component by configuring whether its entity receives shadows from other model entities with the component.
Declaration
init(castsShadow: Bool, receivesShadow: Bool)Parameters
- castsShadow:
A Boolean value that indicates whether the component’s entity casts a shadow on the environment and other model entities.
- receivesShadow:
A Boolean value that indicates whether the component’s entity receives shadows from other model entities.
Discussion
This initializer is an alternative to init(castsShadow:), which creates a component that, by default, configures an entity to receive grounding shadows from other model entities in the scene.