Puck3D
@_documentation(visibility: public)
@_spi(Experimental)
public struct Puck3D : PrimitiveMapContent
Displays user location via 3D Puck.
Use a 3D model to display user location Map
content.
Map {
let model = Model(
uri: URL(string: /* url to glb model */),
orientation: [0, 0, 180] // orient source model to point the bearing property
)
Puck3D(model: model, bearing: .course)
}
-
Creates puck.
Declaration
Swift
@_documentation(visibility: public) public init(model: Model, bearing: PuckBearing?)
-
The scale of the model.
Declaration
Swift
@_documentation(visibility: public) public func modelScale(_ modelScale: [Double]) -> Puck3D
-
The rotation of the model in euler angles [lon, lat, z].
Declaration
Swift
@_documentation(visibility: public) public func modelRotation(_ modelRotation: [Double]) -> Puck3D
-
The opacity of the model used as the location puck
Declaration
Swift
@_documentation(visibility: public) public func modelOpacity(_ modelOpacity: Double) -> Puck3D
-
Enable/disable shadow casting for the puck model
Declaration
Swift
@_documentation(visibility: public) public func modelCastShadows(_ modelCastShadows: Bool) -> Puck3D
-
Enable/disable shadow receiving for the puck model
Declaration
Swift
@_documentation(visibility: public) public func modelReceiveShadows(_ modelReceiveShadows: Bool) -> Puck3D
-
Defines scaling mode. Only applies to location-indicator type layers. Defaults to
viewport
.Declaration
Swift
@_documentation(visibility: public) public func modelScaleMode(_ modelScaleMode: ModelScaleMode) -> Puck3D
-
The scale of the model.
Declaration
Swift
@_documentation(visibility: public) public func modelScale(_ modelScale: Expression) -> Puck3D
-
The rotation of the model in euler angles [lon, lat, z].
Declaration
Swift
@_documentation(visibility: public) public func modelRotation(_ modelRotation: Expression) -> Puck3D
-
The opacity of the model used as the location puck
Declaration
Swift
@_documentation(visibility: public) public func modelOpacity(_ modelOpacity: Expression) -> Puck3D
-
Enable/disable shadow casting for the puck model
Declaration
Swift
@_documentation(visibility: public) public func modelCastShadows(_ modelCastShadows: Expression) -> Puck3D
-
Enable/disable shadow receiving for the puck model
Declaration
Swift
@_documentation(visibility: public) public func modelReceiveShadows(_ modelReceiveShadows: Expression) -> Puck3D
-
Defines scaling mode. Only applies to location-indicator type layers. Defaults to
viewport
.Declaration
Swift
@_documentation(visibility: public) public func modelScaleMode(_ modelScaleMode: Expression) -> Puck3D