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(self: AdorneeValue) → Instance | CFrame | Vector3 | nil

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

Observe​

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

Observes the current adornee.

ObserveBottomCFrame​

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

Observes the bottom cframe of the adornee

ObserveCenterPosition​

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

Observes the center position of the adornee

GetCenterPosition​

AdorneeValue.GetCenterPosition(self: AdorneeValue) → Vector3 | nil

Gets the center position of the adornee

ObserveRadius​

AdorneeValue.ObserveRadius(self: AdorneeValue) → Observable<number?>

Observes the approximate radius of the adornee

GetRadius​

AdorneeValue.GetRadius(self: AdorneeValue) → number?

Gets the approximate radius of the adornee

ObservePositionTowards​

AdorneeValue.ObservePositionTowards(
self: AdorneeValue,
observeTargetPosition: Observable<Vector3>,
observeRadius: Observable<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(
self: AdorneeValue,
target: Vector3,
radius: Vector3,
center: Vector3
) → 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(self: AdorneeValue) → 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(
self: AdorneeValue,
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": 40,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        },
        {
            "name": "GetAdornee",
            "desc": "Gets the current adornee. This is useful for attaching things to the world.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "AdorneeValue"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Instance | CFrame | Vector3 | nil"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 53,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        },
        {
            "name": "Observe",
            "desc": "Observes the current adornee.",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "AdorneeValue"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Instance | CFrame | Vector3 | nil>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 62,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        },
        {
            "name": "ObserveBottomCFrame",
            "desc": "Observes the bottom cframe of the adornee",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "AdorneeValue"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<CFrame | nil>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 117,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        },
        {
            "name": "ObserveCenterPosition",
            "desc": "Observes the center position of the adornee",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "AdorneeValue"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Vector3 | nil>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 145,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        },
        {
            "name": "GetCenterPosition",
            "desc": "Gets the center position of the adornee",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "AdorneeValue"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Vector3 | nil"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 156,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        },
        {
            "name": "ObserveRadius",
            "desc": "Observes the approximate radius of the adornee",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "AdorneeValue"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<number?>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 179,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        },
        {
            "name": "GetRadius",
            "desc": "Gets the approximate radius of the adornee",
            "params": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "AdorneeValue"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "number?"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 190,
                "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": "self",
                    "desc": "",
                    "lua_type": "AdorneeValue"
                },
                {
                    "name": "observeTargetPosition",
                    "desc": "",
                    "lua_type": "Observable<Vector3>"
                },
                {
                    "name": "observeRadius",
                    "desc": "",
                    "lua_type": "Observable<number>"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 221,
                "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": "self",
                    "desc": "",
                    "lua_type": "AdorneeValue"
                },
                {
                    "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": "static",
            "source": {
                "line": 247,
                "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": [
                {
                    "name": "self",
                    "desc": "",
                    "lua_type": "AdorneeValue"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Instance?>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 280,
                "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": "self",
                    "desc": "",
                    "lua_type": "AdorneeValue"
                },
                {
                    "name": "props",
                    "desc": "Takes [Blend.Children] as an option",
                    "lua_type": "{}"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<Instance?>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 309,
                "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": 72,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        },
        {
            "name": "Value",
            "desc": "The value of the AdorneeValue",
            "lua_type": "Instance | CFrame | Vector3 | nil",
            "source": {
                "line": 78,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        }
    ],
    "types": [],
    "name": "AdorneeValue",
    "desc": "Helper class to transform a an adornee into relative positions/information",
    "source": {
        "line": 6,
        "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
    }
}