diff --git a/docs.json b/docs.json index c2bfe7bf..aa47d5bd 100644 --- a/docs.json +++ b/docs.json @@ -268,6 +268,14 @@ { "group": "Scripting API", "pages": [ + { + "group": "@luau", + "pages": [ + "scripting/api-reference/luau/date-type-arg", + "scripting/api-reference/luau/date-type-result", + "scripting/api-reference/luau/vector" + ] + }, { "group": "Artboards", "pages": [ diff --git a/scripting/api-reference/color/color.mdx b/scripting/api-reference/color/color.mdx index bf833a43..d52f7485 100644 --- a/scripting/api-reference/color/color.mdx +++ b/scripting/api-reference/color/color.mdx @@ -184,3 +184,20 @@ print(Color.opacity(newColor)) ``` +### `toFloat` + +{/* toFloat: (color: Color) -> { number } */} +
+```lua +toFloat(color: Color) -> {number} +``` +
+ +Convert a Color (ARGB packed integer) to an {r, g, b, a} table +with values in 0–1 range. Use with `clearColor` in render passes. +```lua +local cc = Color.toFloat(Color.rgba(255, 0, 0, 128)) +-- cc = {1.0, 0.0, 0.0, 0.502} +``` + + diff --git a/scripting/api-reference/interfaces/listener-action.mdx b/scripting/api-reference/interfaces/listener-action.mdx index 77a9fdf3..777a6000 100644 --- a/scripting/api-reference/interfaces/listener-action.mdx +++ b/scripting/api-reference/interfaces/listener-action.mdx @@ -22,7 +22,7 @@ Called once when the listener is created or attached. ```lua highlight={4,5,6,12} type MyListenerAction = {} --- Called once when the script initializes. +-- Called once when the script initiali zes. function init(self: MyListenerAction, context: Context): boolean return true end diff --git a/scripting/api-reference/interfaces/view-model.mdx b/scripting/api-reference/interfaces/view-model.mdx index 81cf87d2..1db72bf7 100644 --- a/scripting/api-reference/interfaces/view-model.mdx +++ b/scripting/api-reference/interfaces/view-model.mdx @@ -213,3 +213,16 @@ end ``` +### `getIndex` + +{/* getIndex: (self: ViewModel) -> number */} +
+```lua +getIndex() -> number +``` +
+ +Returns the index. +Returns -1 if view model does not have an index available. + + diff --git a/scripting/api-reference/luau/date-type-arg.mdx b/scripting/api-reference/luau/date-type-arg.mdx new file mode 100644 index 00000000..0a36f5e3 --- /dev/null +++ b/scripting/api-reference/luau/date-type-arg.mdx @@ -0,0 +1,20 @@ +--- +title: DateTypeArg +--- + +## Fields + +### `year` + +### `month` + +### `day` + +### `hour` + +### `min` + +### `sec` + +### `isdst` + diff --git a/scripting/api-reference/luau/date-type-result.mdx b/scripting/api-reference/luau/date-type-result.mdx new file mode 100644 index 00000000..0465db48 --- /dev/null +++ b/scripting/api-reference/luau/date-type-result.mdx @@ -0,0 +1,24 @@ +--- +title: DateTypeResult +--- + +## Fields + +### `year` + +### `month` + +### `wday` + +### `yday` + +### `day` + +### `hour` + +### `min` + +### `sec` + +### `isdst` + diff --git a/scripting/api-reference/luau/vector.mdx b/scripting/api-reference/luau/vector.mdx new file mode 100644 index 00000000..a6bb1d4f --- /dev/null +++ b/scripting/api-reference/luau/vector.mdx @@ -0,0 +1,12 @@ +--- +title: vector +--- + +## Fields + +### `x` + +### `y` + +### `z` +