Skip to content

Commit

Permalink
Optimize onCameraEulerAngles method
Browse files Browse the repository at this point in the history
  • Loading branch information
olexale committed Jan 7, 2021
1 parent 23a6218 commit 1a937f2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ios/Classes/FlutterArkitView+Handlers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,7 @@ extension FlutterArkitView {

func onCameraEulerAngles(_ result:FlutterResult){
if let frame = sceneView.session.currentFrame {
let cameraEulerAngles = frame.camera.eulerAngles
var eulerAnglesVector = SCNVector3(cameraEulerAngles.x, cameraEulerAngles.y, cameraEulerAngles.z)
let res = serializeVector(eulerAnglesVector)
let res = serializeArray(frame.camera.eulerAngles)
result(res)
} else {
result(nil)
Expand Down

0 comments on commit 1a937f2

Please sign in to comment.