Skip to content

Commit 59ec673

Browse files
update Open Source Docs from Roblox internal teams
1 parent 8f34d7b commit 59ec673

File tree

10 files changed

+37
-229
lines changed

10 files changed

+37
-229
lines changed

content/en-us/engine.md

Lines changed: 0 additions & 160 deletions
This file was deleted.

content/en-us/input/mouse-and-keyboard.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Mouse and keyboard input
33
description: Explains Roblox support for computer mice and keyboards.
4+
machineTranslated: true
45
---
56

67
A large percentage of Roblox sessions are played on devices with a mouse and keyboard, so it's important to properly support these inputs when designing an experience for a wide audience. Once you're comfortable with mouse and keyboard inputs, make your experience compatible across multiple platforms by setting up [mobile](../input/mobile.md) and [gamepad](./gamepad.md) inputs.
@@ -102,7 +103,7 @@ You can customize the appearance and behavior of a user's mouse icon within your
102103

103104
You can change the user's mouse icon in a `Class.LocalScript` by setting the `Class.UserInputService.MouseIcon|MouseIcon` property in `Class.UserInputService` to a custom Roblox asset ID. For example, the following `Class.LocalScript` changes the user's default mouse icon to a circle with a blue dot in the middle:
104105

105-
```lua highlight='3'
106+
```lua highlight="3"
106107
local UserInputService = game:GetService("UserInputService")
107108

108109
UserInputService.MouseIcon = "rbxassetid://3400146391"
@@ -112,7 +113,7 @@ UserInputService.MouseIcon = "rbxassetid://3400146391"
112113

113114
You can hide the user's mouse icon by setting the `Class.UserInputService.MouseIconEnabled` to `false` in a `Class.LocalScript`. For example, the following code switches the mouse icon from visible to invisible and back every two seconds:
114115

115-
```lua highlight='5,7'
116+
```lua highlight="5,7"
116117
local UserInputService = game:GetService("UserInputService")
117118

118119
while true do
@@ -129,7 +130,7 @@ You can lock the mouse icon's position to the screen using `Class.UserInputServi
129130

130131
If a user's mouse icon is locked in a position, `Class.UserInputService.InputChanged` still fires when the user moves the mouse, passing in the distance the mouse has moved. For example, the following code sample locks the user's mouse icon after one second, then Studio prints the mouse delta whenever the user moves their mouse:
131132

132-
```lua highlight='5'
133+
```lua highlight="5"
133134
local UserInputService = game:GetService("UserInputService")
134135

135136
task.wait(5)

content/en-us/parts/solid-modeling.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: Solid modeling
33
description: Solid modeling is the process of joining parts together to form complex shapes.
4+
machineTranslated: true
45
---
56

67
**Solid modeling** is the process of joining [parts](../parts/index.md)
@@ -173,7 +174,7 @@ When performing a `Class.BasePart:UnionAsync()|UnionAsync()`, `Class.BasePart:In
173174

174175
To demonstrate `Class.BasePart:UnionAsync()|UnionAsync()`, the following `Class.Script` uses the **Part1** `Class.BasePart` from the workspace, unions it together with the **Part2**, **Part3**, and **Part4** `Class.BasePart|BaseParts`, then parents the resulting `Class.UnionOperation` to the workspace at the original position of **Part1**.
175176

176-
```lua highlight='6'
177+
```lua highlight="6"
177178
local Workspace = game:GetService("Workspace")
178179

179180
local mainPart = Workspace.Part1
@@ -201,7 +202,7 @@ end
201202

202203
To demonstrate `Class.BasePart:IntersectAsync()|IntersectAsync()`, the following `Class.Script` uses the **Part1** `Class.BasePart` from the workspace, intersects it with the **Part2** and **Part3** `Class.BasePart|BaseParts`, then parents the resulting `Class.IntersectOperation` to the workspace at the original position of **Part1**.
203204

204-
```lua highlight='6'
205+
```lua highlight="6"
205206
local Workspace = game:GetService("Workspace")
206207

207208
local mainPart = Workspace.Part1
@@ -229,7 +230,7 @@ end
229230

230231
To demonstrate `Class.BasePart:SubtractAsync()|SubtractAsync()`, the following `Class.Script` uses the **Part1** `Class.BasePart` from the workspace, negates the **Part2**, **Part3**, and **Part4** `Class.BasePart|BaseParts` from it, then parents the resulting `Class.UnionOperation` to the workspace at the original position of **Part1**.
231232

232-
```lua highlight='6'
233+
```lua highlight="6"
233234
local Workspace = game:GetService("Workspace")
234235

235236
local mainPart = Workspace.Part1

content/en-us/performance-optimization/design.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ Designing for performance means following a handful of best practices **as you b
99

1010
Lower-end devices, particularly mobile devices, have severe memory limitations and are succeptible to crashes due to out of memory (OOM) errors:
1111

12-
- If you want to support lower-end devices, choose a baseline set of devices with certain performance characteristics, test your experience on them throughout the development process, and pay close attention to frame rate and memory usage. As you find problem areas in your experience, use those areas to identify the limits of your devices.
12+
- If you want to support lower-end devices, choose at least one "baseline" device, test your experience on it throughout the development process, and pay close attention to frame rate and memory usage. As you find problem areas in your experience, use those areas to identify the limits of your device.
1313

14-
For example, you might test an experience with the **Render** (<kbd>Shift</kbd><kbd>F2</kbd>) and **Summary** (<kbd>Shift</kbd><kbd>F2</kbd>) debug stats enabled. If the frame rate starts to drop in a particularly cluttered area, you could examine the **Draw (scene)** numbers and determine that you need to stay below 600 draw calls and 650,000 triangles. Or you could examine the **Developer Console** (<kbd>F9</kbd>) and note that memory usage is a bit high unless you enable [streaming](../workspace/streaming.md). Having a clear understanding of device limits can help you stay under them as you continue to build your experience.
14+
For example, you might test an experience with the **Render** (<kbd>Shift</kbd><kbd>F2</kbd>) and **Summary** (<kbd>Shift</kbd><kbd>F2</kbd>) debug stats enabled. If the frame rate starts to drop in a particularly cluttered area, you could examine the **Draw (scene)** numbers and determine that you need to stay below 1,000 draw calls and 1,000,000 triangles for the experience to run well on your baseline device.
15+
16+
Or you could examine the **Developer Console** (<kbd>F9</kbd>) and note that memory usage is a bit high unless you enable [streaming](../workspace/streaming.md). Having a clear understanding of device limits can help you stay under them as you continue to build your experience.
1517

1618
![A Roblox experience with three overlays active.](../assets/optimization/perf-hud.png)
1719

@@ -23,8 +25,6 @@ Roblox does not have access to all of a device's memory. Some amount is required
2325

2426
More generally, testing on a variety of devices can help you check that the experience matches your visual and performance expectations at different graphics quality levels. For a much more detailed example of how you might think about optimizing your experience for low-end mobile devices, see [Real World Building and Scripting Optimization](https://devforum.roblox.com/t/real-world-building-and-scripting-optimization-for-roblox/3127146).
2527

26-
<a target="_blank" href="https://devforum.roblox.com/t/real-world-building-and-scripting-optimization-for-roblox/3127146"><img src="../assets/optimization/chicken-rocket.jpg" width="400" alt="Header image for Real World Building and Scripting Optimization." /></a>
27-
2828
## Streaming and teleportation
2929

3030
- [Instance streaming](../workspace/streaming.md) lets Roblox dynamically load and unload 3D content and is a great option for most experiences, especially larger ones. Streaming improves join times, reduces memory footprint, and increases frame rates. For more information, see [Improving performance](improve.md#instance-streaming).
@@ -37,11 +37,11 @@ More generally, testing on a variety of devices can help you check that the expe
3737

3838
- As you create assets, convert them into [packages](../projects/assets/packages.md). Making packages part of your workflow helps avoid the common issue of duplicate assets with different IDs, which can hurt performance.
3939

40-
- When you add meshes and textures, use and reuse them rather than importing duplicate copies. By resizing, rotating, and overlapping, you can create rich, varied environments that require very few [draw calls](improve.md#draw-calls). For more information, see [Remove duplicate textures](../tutorials/environmental-art/optimize-your-experience.md#remove-duplicate-textures).
40+
- When you add meshes and textures, use and reuse them rather than importing duplicate copies. By resizing, rotating, and overlapping, you can create rich, varied environments that require very few [draw calls](improve.md#draw-calls). For more information, see [Remove duplicate textures](../tutorials/curriculums/environmental-art/optimize-your-experience.md#remove-duplicate-textures).
4141

4242
## Transparency
4343

44-
- Avoid transparency values other than 0 (visible) and 1 (invisible). When you use partial transparency, be especially careful to avoid [high transparency overdraw](../tutorials/environmental-art/optimize-your-experience.md#delete-layered-transparencies).
44+
- Avoid transparency values other than 0 (visible) and 1 (invisible). When you use partial transparency, be especially careful to avoid [high transparency overdraw](../tutorials/curriculums/environmental-art/optimize-your-experience.md#delete-layered-transparencies).
4545

4646
## Scripting
4747

content/en-us/reference/engine/globals/LuaGlobals.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -732,9 +732,10 @@ functions:
732732
Returns the basic type of the provided object.
733733
description: |
734734
Returns the type of its only argument, coded as a string. The possible
735-
results of this function are "nil" (a string, not the value nil),
736-
"number", "string", "boolean", "table", "vector", "function", "thread",
737-
and "userdata".
735+
results of this function are `"nil"` (a string, not the value nil),
736+
`"number"`, `"string"`, `"boolean"`, `"table"`, `"vector"`, `"function"`, `"thread"`,
737+
`"userdata"`, and `"buffer"`. The `buffer` primitive is an addition from
738+
Luau, not from Lua.
738739
parameters:
739740
- name: v
740741
type: Variant

content/en-us/scale-discovery.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

content/en-us/ui/rich-text.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: Rich text markup
33
description: Rich Text Markup are simple markup tags to style sections of a string.
44
comments: |
55
1. Replace numbered footnotes with dedicated style.
6+
machineTranslated: true
67
---
78

89
UI **rich text** utilizes simple markup tags to style sections of a string in bold, italics, underline, fill color, stroke variations, and more. You can apply styling tags to `Class.TextLabel`, `Class.TextButton`, and `Class.TextBox` objects.
@@ -14,7 +15,7 @@ You must enable rich text on a per-object basis through its **RichText** propert
1415
<img src="../assets/ui/rich-text/Enable-Rich-Text.png"
1516
width="320" />
1617

17-
```lua highlight='2'
18+
```lua highlight="2"
1819
local title = Instance.new("TextLabel")
1920
title.RichText = true
2021

0 commit comments

Comments
 (0)