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(selfAdorneeValue) → Instance | CFrame | Vector3 | nil

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

Observe

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

Observes the current adornee.

ObserveBottomCFrame

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

Observes the bottom cframe of the adornee

ObserveCenterPosition

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

Observes the center position of the adornee

GetCenterPosition

AdorneeValue.GetCenterPosition(selfAdorneeValue) → Vector3 | nil

Gets the center position of the adornee

ObserveRadius

AdorneeValue.ObserveRadius(selfAdorneeValue) → Observable<number?>

Observes the approximate radius of the adornee

GetRadius

AdorneeValue.GetRadius(selfAdorneeValue) → number?

Gets the approximate radius of the adornee

ObservePositionTowards

AdorneeValue.ObservePositionTowards(
selfAdorneeValue,
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(
selfAdorneeValue,
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(selfAdorneeValue) → 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(
selfAdorneeValue,
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": 38,
                "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": 51,
                "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": 60,
                "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": 115,
                "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": 143,
                "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": 154,
                "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": 177,
                "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": 188,
                "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": 219,
                "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": 241,
                "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": 274,
                "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": 303,
                "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": 70,
                "path": "src/adorneevalue/src/Shared/AdorneeValue.lua"
            }
        },
        {
            "name": "Value",
            "desc": "The value of the AdorneeValue",
            "lua_type": "Instance | CFrame | Vector3 | nil",
            "source": {
                "line": 76,
                "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"
    }
}