Skip to main content

AdorneeValue

Helper class to transform a an adornee into relative positions/information

Properties

Changed

AdorneeValue.Changed: Signal<T>--fireswitholdValue,newValue

Event fires when adornee changes

Value

AdorneeValue.Value: Instance | CFrame | Vector3 | nil

The value of the AdorneeValue

Functions

new

AdorneeValue.new() → AdorneeValue

Constructs a new AdorneeValue

GetAdornee

AdorneeValue:GetAdornee() → Instance | CFrame | Vector3 | nil

Gets the current adornee. This is useful for attaching things to the world.

Observe

AdorneeValue:Observe() → Observable<Instance | CFrame | Vector3 | nil>

Observes the current adornee.

ObserveBottomCFrame

AdorneeValue:ObserveBottomCFrame() → Observable<CFrame | nil>

Observes the bottom cframe of the adornee

ObserveCenterPosition

AdorneeValue:ObserveCenterPosition() → Observable<Vector3 | nil>

Observes the center position of the adornee

GetCenterPosition

AdorneeValue:GetCenterPosition() → Vector3 | nil

Gets the center position of the adornee

ObserveRadius

AdorneeValue:ObserveRadius() → Observable<number?>

Observes the approximate radius of the adornee

GetRadius

AdorneeValue:GetRadius() → number?

Gets the approximate radius of the adornee

ObservePositionTowards

AdorneeValue:ObservePositionTowards(
observeTargetPositionObservable<Vector3>,
observeRadiusObservable<number>
) → Observable

Observes the position towards a given target. This projects the current adornee's bounding box and the position of the target to attach something generally near the outside of the box.

GetPositionTowards

AdorneeValue:GetPositionTowards(
targetVector3,
radiusVector3,
centerVector3
) → Vector3

Gets a position projected from our current center and radius towards the given target vector. Useful for attaching arrows and stuff.

ObserveAttachmentParent

AdorneeValue:ObserveAttachmentParent() → Observable<Instance?>

Observes a parent value to use or an attachment we'll attach to the adornee. May end up being the terrain if using an absolute position.

RenderPositionAttachment

AdorneeValue:RenderPositionAttachment(
props{}--

Takes Blend.Children as an option

) → Observable<Instance?>

Returns an Observable which when used can to render an attachment at a given CFrame which can be used to play back a variety of effects.

See Blend for details.

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Constructs a new AdorneeValue",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "AdorneeValue"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 24,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        },
        {
            "name": "GetAdornee",
            "desc": "Gets the current adornee. This is useful for attaching things to the world.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Instance | CFrame | Vector3 | nil"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 40,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        },
        {
            "name": "Observe",
            "desc": "Observes the current adornee.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Instance | CFrame | Vector3 | nil>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 49,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        },
        {
            "name": "ObserveBottomCFrame",
            "desc": "Observes the bottom cframe of the adornee",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<CFrame | nil>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 104,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        },
        {
            "name": "ObserveCenterPosition",
            "desc": "Observes the center position of the adornee",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Vector3 | nil>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 132,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        },
        {
            "name": "GetCenterPosition",
            "desc": "Gets the center position of the adornee",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Vector3 | nil"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 143,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        },
        {
            "name": "ObserveRadius",
            "desc": "Observes the approximate radius of the adornee",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<number?>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 166,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        },
        {
            "name": "GetRadius",
            "desc": "Gets the approximate radius of the adornee",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 177,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        },
        {
            "name": "ObservePositionTowards",
            "desc": "Observes the position towards a given target. This projects the current adornee's bounding box\nand the position of the target to attach something generally near the outside of the box.",
            "params": [
                {
                    "name": "observeTargetPosition",
                    "desc": "",
                    "lua_type": "Observable<Vector3>"
                },
                {
                    "name": "observeRadius",
                    "desc": "",
                    "lua_type": "Observable<number>"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 208,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        },
        {
            "name": "GetPositionTowards",
            "desc": "Gets a position projected from our current center and radius towards\nthe given target vector. Useful for attaching arrows and stuff.",
            "params": [
                {
                    "name": "target",
                    "desc": "",
                    "lua_type": "Vector3"
                },
                {
                    "name": "radius",
                    "desc": "",
                    "lua_type": "Vector3"
                },
                {
                    "name": "center",
                    "desc": "",
                    "lua_type": "Vector3"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Vector3"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 229,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        },
        {
            "name": "ObserveAttachmentParent",
            "desc": "Observes a parent value to use or an attachment we'll attach to the adornee. May end up being\nthe terrain if using an absolute position.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Instance?>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 257,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        },
        {
            "name": "RenderPositionAttachment",
            "desc": "Returns an [Observable] which when used can to render an attachment at a given\nCFrame which can be used to play back a variety of effects.\n\nSee [Blend] for details.",
            "params": [
                {
                    "name": "props",
                    "desc": "Takes [Blend.Children] as an option",
                    "lua_type": "{}"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Instance?>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 286,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "Changed",
            "desc": "Event fires when adornee changes",
            "lua_type": "Signal<T> -- fires with oldValue, newValue",
            "source": {
                "line": 59,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        },
        {
            "name": "Value",
            "desc": "The value of the AdorneeValue",
            "lua_type": "Instance | CFrame | Vector3 | nil",
            "source": {
                "line": 65,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        }
    ],
    "types": [],
    "name": "AdorneeValue",
    "desc": "Helper class to transform a an adornee into relative positions/information",
    "source": {
        "line": 5,
        "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
    }
}