This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.

AFrame.Primitives.Camera

Camera primitive.

Primitives

camera : List (Attribute msg) -> List (Html msg) -> Html msg

The camera primitive places the user somewhere within the scene.

camera [] []

Attributes

far : Int -> Attribute msg

Camera frustum far clipping plane.

fov : Int -> Attribute msg

Field of view (in degrees).

lookControlsEnabled : Bool -> Attribute msg

Enable look controls.

camera [ lookControlsEnabled False ] []
near : Float -> Attribute msg

Camera frustum near clipping plane.

wasdControlsEnabled : Bool -> Attribute msg

Enable WASD controls for camera.

camera [ wasdControlsEnabled False ] []
module AFrame.Primitives.Camera exposing (..)

{-| Camera primitive.

# Primitives
@docs camera

# Attributes
@docs far, fov, lookControlsEnabled, near, wasdControlsEnabled

-}

import String exposing (toLower)
import Html exposing (node, Html, Attribute)
import Html.Attributes exposing (attribute)


{-| The camera primitive places the user somewhere within the scene.

    camera [] []
-}
camera : List (Attribute msg) -> List (Html msg) -> Html msg
camera =
    node "a-camera"


{-| Camera frustum far clipping plane.
-}
far : Int -> Attribute msg
far value =
    attribute "far" (toString value)


{-| Field of view (in degrees).
-}
fov : Int -> Attribute msg
fov value =
    attribute "fov" (toString value)


{-| Enable look controls.

    camera [ lookControlsEnabled False ] []
-}
lookControlsEnabled : Bool -> Attribute msg
lookControlsEnabled value =
    attribute "look-controls-enabled" (toLower (toString value))


{-| Camera frustum near clipping plane.
-}
near : Float -> Attribute msg
near value =
    attribute "near" (toString value)


{-| Enable WASD controls for camera.

    camera [ wasdControlsEnabled False ] []
-}
wasdControlsEnabled : Bool -> Attribute msg
wasdControlsEnabled value =
    attribute "wasd-controls-enabled" (toLower (toString value))