brepjs API Reference
    Preparing search index...

    Function createCamera

    • Create a camera from position, direction, and an optional X-axis.

      If xAxis is omitted, it is derived automatically from the direction.

      Parameters

      • position: Vec3 = ...

        Camera position in world coordinates.

      • direction: Vec3 = ...

        View direction (camera looks along this vector).

      • OptionalxAxis: Vec3

        Optional horizontal axis; derived automatically if not provided.

      Returns Result<Camera>

      Result<Camera> -- an error if direction is zero-length.