'Ignoring singular matrix, should I concerning/Ignoring to this console massage in SwiftUI?
When I am using rotation3DEffect some times the vale became 90 or -90 degree which what I planed for that, as soon as my degree hit the 90 or -90, I see a massage in console like this:
ignoring singular matrix: ProjectionTransform(m11: 1.0, m12: 0.0, m13: 0.0, m21: -0.125, m22: -0.25, m23: -0.0025, m31: 12.5, m32: 125.0, m33: 1.25)
Which I know it is because of 90 or -90 degree, I like to know should I be responsive to this massage or simply ignoring it? with this in mind that my app has no issue with getting 90 or -90.
code for recreating the massage:
struct ContentView: View {
var body: some View {
Rectangle()
.fill(Color.red)
.frame(width: 100, height: 200, alignment: .center)
.rotation3DEffect(
Angle(degrees: 90),
axis: (x: 1.0, y: 0.0, z: 0.0),
anchor: .center,
anchorZ: 0.0,
perspective: 0.5)
}
}
Solution 1:[1]
I fixed this by setting z in axis to 0.01
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | vulgur |