[skottie] Fix single-node camera orientation relative to z=0 plane

One-node cameras start off by pointing forward, where "forward" is
decreasing z (as opposed to always facing z==0, as they currently do).

Change-Id: I2ccd5a7cf7d8f0aeeebde1537d44e188aabccd04
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255117
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
diff --git a/modules/skottie/src/SkottieAdapter.cpp b/modules/skottie/src/SkottieAdapter.cpp
index 4b53207..1cad3d9 100644
--- a/modules/skottie/src/SkottieAdapter.cpp
+++ b/modules/skottie/src/SkottieAdapter.cpp
@@ -142,14 +142,15 @@
 SkPoint3 CameraAdapter::poi() const {
     // AE supports two camera types:
     //
-    //   - one-node camera: does not auto-orient, and starts off perpendicular to the z = 0 plane.
+    //   - one-node camera: does not auto-orient, and starts off perpendicular to the z = 0 plane,
+    //     facing "forward" (decreasing z).
     //
     //   - two-node camera: has a point of interest (encoded as the anchor point), and auto-orients
     //                      to point in its direction.
     return fType == Type::kOneNode
             ? SkPoint3{ this->getPosition().fX,
                         this->getPosition().fY,
-                        0 }
+                       -this->getPosition().fZ - 1 }
             : SkPoint3{ this->getAnchorPoint().fX,
                         this->getAnchorPoint().fY,
                        -this->getAnchorPoint().fZ};
diff --git a/modules/skottie/src/SkottieAdapter.h b/modules/skottie/src/SkottieAdapter.h
index f114a68..8693ab6 100644
--- a/modules/skottie/src/SkottieAdapter.h
+++ b/modules/skottie/src/SkottieAdapter.h
@@ -173,7 +173,7 @@
 class CameraAdapter final : public TransformAdapter3D {
 public:
     enum class Type {
-        kOneNode, // implicitly facing the z == 0 plane, does not auto-orient
+        kOneNode, // implicitly facing forward (decreasing z), does not auto-orient
         kTwoNode, // explicitly facing a POI (the anchor point), auto-orients
     };