Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions content/en-us/characters/pathfinding.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ local player = Players.LocalPlayer
local character = player.Character
local humanoid = character:WaitForChild("Humanoid")

local TEST_DESTINATION = Vector3.new(100, 0, 100)
local TEST_DESTINATION = vector.create(100, 0, 100)

local waypoints
local nextWaypointIndex
Expand Down Expand Up @@ -213,7 +213,7 @@ local player = Players.LocalPlayer
local character = player.Character
local humanoid = character:WaitForChild("Humanoid")

local TEST_DESTINATION = Vector3.new(100, 0, 100)
local TEST_DESTINATION = vector.create(100, 0, 100)

local waypoints
local nextWaypointIndex
Expand Down Expand Up @@ -245,7 +245,7 @@ local player = Players.LocalPlayer
local character = player.Character
local humanoid = character:WaitForChild("Humanoid")

local TEST_DESTINATION = Vector3.new(100, 0, 100)
local TEST_DESTINATION = vector.create(100, 0, 100)

local waypoints
local nextWaypointIndex
Expand Down Expand Up @@ -286,7 +286,7 @@ local player = Players.LocalPlayer
local character = player.Character
local humanoid = character:WaitForChild("Humanoid")

local TEST_DESTINATION = Vector3.new(100, 0, 100)
local TEST_DESTINATION = vector.create(100, 0, 100)

local waypoints
local nextWaypointIndex
Expand Down Expand Up @@ -358,7 +358,7 @@ local player = Players.LocalPlayer
local character = player.Character
local humanoid = character:WaitForChild("Humanoid")

local TEST_DESTINATION = Vector3.new(100, 0, 100)
local TEST_DESTINATION = vector.create(100, 0, 100)

local waypoints
local nextWaypointIndex
Expand Down Expand Up @@ -525,7 +525,7 @@ To create a `Class.PathfindingLink` using this example:
local character = player.Character
local humanoid = character:WaitForChild("Humanoid")

local TEST_DESTINATION = Vector3.new(228.9, 17.8, 292.5)
local TEST_DESTINATION = vector.create(228.9, 17.8, 292.5)

local waypoints
local nextWaypointIndex
Expand Down
2 changes: 1 addition & 1 deletion content/en-us/chat/examples/proximity-chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ local function getPositionFromUserId(userId: number)
end

-- Return a default position if the player or character cannot be found.
return Vector3.zero
return vector.zero
end

-- Set the ShouldDeliverCallback for the general channel to control message delivery.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ local inTween = false

-- Customizable variables
local TWEEN_TIME = 1
local TWEEN_SCALE = Vector3.zero
local TWEEN_SCALE = vector.zero

-- Tween variables
local tweenInfo = TweenInfo.new(
Expand Down
4 changes: 2 additions & 2 deletions content/en-us/environment/global-wind.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ local gustCycleDelay = 5 -- Max duration between gust cycles in seconds
local gustCycleDuration = 3.5 -- Duration of each gust cycle in seconds

-- During each gust cycle, a portion of "gust" will be added to "baseWind" in a ramped fashion
local baseWind = Vector3.new(5, 0, 2) -- Base wind speed and direction
local gust = Vector3.new(25, 0, 10) -- Gust speed and direction
local baseWind = vector.create(5, 0, 2) -- Base wind speed and direction
local gust = vector.create(25, 0, 10) -- Gust speed and direction
local gustIntervals = 100 -- Number of iterations used to calculate each gust interval
local dg = gustCycleDuration / gustIntervals
local dgf = dg / gustCycleDuration
Expand Down
4 changes: 2 additions & 2 deletions content/en-us/luau/native-code-gen.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ local function sumComponentsSlow(v)
return v.X + v.Y + v.Z
end

-- "v" is declared to be a Vector3; code specialized for vectors is generated
local function sumComponentsFast(v: Vector3)
-- "v" is declared to be a vector; code specialized for vectors is generated
local function sumComponentsFast(v: vector)
return v.X + v.Y + v.Z
end
```
Expand Down
2 changes: 1 addition & 1 deletion content/en-us/luau/tuples.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A **tuple** is a list of values. Many [methods](./functions.md#methods) and [cal
If a [method](./functions.md#methods) or [callback](./functions.md#callbacks) accepts a tuple as a parameter, then it accepts multiple values. For example, the API Reference shows that the `Class.BindableFunction:Invoke()` method accepts a "Tuple" as a parameter, so it accepts multiple arguments.

```lua
BindableFunction:Invoke(1, true, "string", Vector3.new(0, 0, 0))
BindableFunction:Invoke(1, true, "string", vector.zero)
```

## Returns
Expand Down
2 changes: 1 addition & 1 deletion content/en-us/parts/terrain.md
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ To import a heightmap and optional colormap:
You can script terrain generation using the `Class.Terrain` class. For example, to create terrain with grass material that fills a volume, you can use methods such as `Class.Terrain:FillBall()|FillBall()`, `Class.Terrain:FillBlock()|FillBlock()`, `Class.Terrain:FillCylinder()|FillCylinder()`, `Class.Terrain:FillRegion()|FillRegion()`, or `Class.Terrain:FillWedge()|FillWedge()`.

```lua title='Fill Block Volume'
workspace.Terrain:FillBlock(CFrame.new(0, 0, 0), Vector3.new(4, 4, 4), Enum.Material.Grass)
workspace.Terrain:FillBlock(CFrame.new(0, 0, 0), vector.create(4, 4, 4), Enum.Material.Grass)
```

## Large-Scale Editing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ local Players = game:GetService("Players")
local teleporter = script.Parent
local showModal = true

local TELEPORT_POSITION = Vector3.new(1200, 200, 60)
local TELEPORT_POSITION = vector.create(1200, 200, 60)

-- Teleport character to exclusive area
local function teleportPlayer(player)
Expand Down
76 changes: 38 additions & 38 deletions content/en-us/reference/engine/classes/AvatarCreationService.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,91 +69,91 @@ methods:
[Enum.AssetType.DynamicHead] = {
["Bounds"] = {
["Classic"] = {
["MinSize"]: Vector3,
["MaxSize"]: Vector3,
["MinSize"]: vector,
["MaxSize"]: vector,
},
["ProportionsSlender"] = {
["MinSize"]: Vector3,
["MaxSize"]: Vector3,
["MinSize"]: vector,
["MaxSize"]: vector,
},
["ProportionsNormal"] = {
["MinSize"]: Vector3,
["MaxSize"]: Vector3,
["MinSize"]: vector,
["MaxSize"]: vector,
},
},
["SubParts"] = {
["Head"] = {
["NeckRigAttachment"] = {
["LowerBound"]: Vector3,
["UpperBound"]: Vector3,
["LowerBound"]: vector,
["UpperBound"]: vector,
},
["FaceFrontAttachment"] = {
["LowerBound"]: Vector3,
["UpperBound"]: Vector3,
["LowerBound"]: vector,
["UpperBound"]: vector,
},
["HatAttachment"] = {
["LowerBound"]: Vector3,
["UpperBound"]: Vector3,
["LowerBound"]: vector,
["UpperBound"]: vector,
},
["HairAttachment"] = {
["LowerBound"]: Vector3,
["UpperBound"]: Vector3,
["LowerBound"]: vector,
["UpperBound"]: vector,
},
["FaceCenterAttachment"] = {
["LowerBound"]: Vector3,
["UpperBound"]: Vector3,
["LowerBound"]: vector,
["UpperBound"]: vector,
},
},
},
},
[Enum.AssetType.LeftArm] = {
["Bounds"] = {
["Classic"] = {
["MinSize"]: Vector3,
["MaxSize"]: Vector3,
["MinSize"]: vector,
["MaxSize"]: vector,
},
["ProportionsSlender"] = {
["MinSize"]: Vector3,
["MaxSize"]: Vector3,
["MinSize"]: vector,
["MaxSize"]: vector,
},
["ProportionsNormal"] = {
["MinSize"]: Vector3,
["MaxSize"]: Vector3,
["MinSize"]: vector,
["MaxSize"]: vector,
},
},
["SubParts"] = {
["LeftHand"] = {
["LeftWristRigAttachment"] = {
["LowerBound"]: Vector3,
["UpperBound"]: Vector3,
["LowerBound"]: vector,
["UpperBound"]: vector,
},
["LeftGripAttachment"] = {
["LowerBound"]: Vector3,
["UpperBound"]: Vector3,
["LowerBound"]: vector,
["UpperBound"]: vector,
},
},
["LeftUpperArm"] = {
["LeftShoulderRigAttachment"] = {
["LowerBound"]: Vector3,
["UpperBound"]: Vector3,
["LowerBound"]: vector,
["UpperBound"]: vector,
},
["LeftShoulderAttachment"] = {
["LowerBound"]: Vector3,
["UpperBound"]: Vector3,
["LowerBound"]: vector,
["UpperBound"]: vector,
},
["LeftElbowRigAttachment"] = {
["LowerBound"]: Vector3,
["UpperBound"]: Vector3,
["LowerBound"]: vector,
["UpperBound"]: vector,
},
},
["LeftLowerArm"] = {
["LeftElbowRigAttachment"] = {
["LowerBound"]: Vector3,
["UpperBound"]: Vector3,
["LowerBound"]: vector,
["UpperBound"]: vector,
},
["LeftWristRigAttachment"] = {
["LowerBound"]: Vector3,
["UpperBound"]: Vector3,
["LowerBound"]: vector,
["UpperBound"]: vector,
},
},
},
Expand All @@ -164,8 +164,8 @@ methods:
[Enum.AssetType.HairAccessory] = {
["Attachments"] = {
{
["Size"]: Vector3,
["Offset"]: Vector3,
["Size"]: vector,
["Offset"]: vector,
["Name"]: string,
},
},
Expand Down
2 changes: 1 addition & 1 deletion content/en-us/reference/engine/classes/BillboardGui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -583,4 +583,4 @@ properties:
writeCapabilities: []
methods: []
events: []
callbacks: []
callbacks: []
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ properties:
second) into the desired [angular velocity][3] (radians per second). For
example: Setting
`Class.BodyAngularVelocity.AngularVelocity|AngularVelocity` to
`Vector3.new(0, 1, 0) * math.rad(360)` ≈ `Vector3.new(0, 6.283, 0)` will
`vector.create(0, 1, 0) * math.rad(360)` ≈ `vector.create(0, 6.283, 0)` will
cause a part to spin around the Y axis once per second.
code_samples:
type: Vector3
Expand Down
20 changes: 10 additions & 10 deletions content/en-us/reference/engine/classes/Camera.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ properties:
The most intuitive way to position and orient the `Class.Camera` is by
using the `Datatype.CFrame.lookAt()` constructor. In the following
example, the `Class.Camera` is positioned at
`Datatype.Vector3.new(0, 10, 0)` and is oriented to be looking towards
`Datatype.Vector3.new(10, 0, 0)`.
`Datatype.Vector3|vector.create(0, 10, 0)` and is oriented to be looking towards
`Datatype.Vector3|vector.create(10, 0, 0)`.

```lua
local Workspace = game:GetService("Workspace")

local camera = Workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable

local pos = Vector3.new(0, 10, 0)
local lookAtPos = Vector3.new(10, 0, 0)
local pos = vector.create(0, 10, 0)
local lookAtPos = vector.create(10, 0, 0)

Workspace.CurrentCamera.CFrame = CFrame.lookAt(pos, lookAtPos)
```
Expand Down Expand Up @@ -104,7 +104,7 @@ properties:
character = player.CharacterAdded:Wait()
end

local pos = camera.CFrame * Vector3.new(0, 20, 0)
local pos = camera.CFrame * vector.create(0, 20, 0)
local lookAtPos = character.PrimaryPart.Position
local targetCFrame = CFrame.lookAt(pos, lookAtPos)

Expand Down Expand Up @@ -715,8 +715,8 @@ methods:
local camera = Workspace.CurrentCamera

local castPoints = {
Vector3.new(0, 10, 0),
Vector3.new(0, 15, 0)
vector.create(0, 10, 0),
vector.create(0, 15, 0)
}
local ignoreList = {}

Expand Down Expand Up @@ -810,7 +810,7 @@ methods:
local function getActualRoll()
local camera = workspace.CurrentCamera

local trueUp = Vector3.new(0, 1, 0)
local trueUp = vector.create(0, 1, 0)
local cameraUp = camera:GetRenderCFrame().upVector

return math.acos(trueUp:Dot(cameraUp))
Expand Down Expand Up @@ -1291,7 +1291,7 @@ methods:

local camera = Workspace.CurrentCamera

local worldPoint = Vector3.new(0, 10, 0)
local worldPoint = vector.create(0, 10, 0)
local vector, onScreen = camera:WorldToScreenPoint(worldPoint)

local screenPoint = Vector2.new(vector.X, vector.Y)
Expand Down Expand Up @@ -1350,7 +1350,7 @@ methods:

local camera = Workspace.CurrentCamera

local worldPoint = Vector3.new(0, 10, 0)
local worldPoint = vector.create(0, 10, 0)
local vector, onScreen = camera:WorldToViewportPoint(worldPoint)

local viewportPoint = Vector2.new(vector.X, vector.Y)
Expand Down
16 changes: 8 additions & 8 deletions content/en-us/reference/engine/classes/EditableMesh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,14 @@ description: |
local function makeSharpCube()
local eMesh = AssetService:CreateEditableMesh()

local v1 = eMesh:AddVertex(Vector3.new(0, 0, 0))
local v2 = eMesh:AddVertex(Vector3.new(1, 0, 0))
local v3 = eMesh:AddVertex(Vector3.new(0, 1, 0))
local v4 = eMesh:AddVertex(Vector3.new(1, 1, 0))
local v5 = eMesh:AddVertex(Vector3.new(0, 0, 1))
local v6 = eMesh:AddVertex(Vector3.new(1, 0, 1))
local v7 = eMesh:AddVertex(Vector3.new(0, 1, 1))
local v8 = eMesh:AddVertex(Vector3.new(1, 1, 1))
local v1 = eMesh:AddVertex(vector.create(0, 0, 0))
local v2 = eMesh:AddVertex(vector.create(1, 0, 0))
local v3 = eMesh:AddVertex(vector.create(0, 1, 0))
local v4 = eMesh:AddVertex(vector.create(1, 1, 0))
local v5 = eMesh:AddVertex(vector.create(0, 0, 1))
local v6 = eMesh:AddVertex(vector.create(1, 0, 1))
local v7 = eMesh:AddVertex(vector.create(0, 1, 1))
local v8 = eMesh:AddVertex(vector.create(1, 1, 1))

addSharpQuad(eMesh, v5, v6, v8, v7) -- Front
addSharpQuad(eMesh, v1, v3, v4, v2) -- Back
Expand Down
2 changes: 1 addition & 1 deletion content/en-us/reference/engine/classes/Humanoid.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1862,7 +1862,7 @@ methods:
`Class.Workspace.CurrentCamera|CurrentCamera`.

```lua
humanoid:Move(Vector3.new(0, 0, -1), true)
humanoid:Move(vector.create(0, 0, -1), true)
```

When this function is called, the `Class.Humanoid` will move until the
Expand Down
4 changes: 2 additions & 2 deletions content/en-us/reference/engine/classes/Instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1271,11 +1271,11 @@ methods:
returned by default.

For example, the following code snippet sets the instance's
**InitialPosition** attribute to `Datatype.Vector3|Vector3.new(0, 10, 0)`:
**InitialPosition** attribute to `Datatype.Vector3|vector.create(0, 10, 0)`:

```lua
local part = workspace.Part
part:SetAttribute("InitialPosition", Vector3.new(0, 10, 0))
part:SetAttribute("InitialPosition", vector.create(0, 10, 0))
```

#### Limitations
Expand Down
2 changes: 1 addition & 1 deletion content/en-us/reference/engine/classes/RayValue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: |
to create a new RayValue named "Value" within the `Class.Workspace`. It
creates a ray at (0, 50, 0) and it faces in the positive-X direction.

`Instance.new("RayValue").Value = Ray.new(Vector3.new(0, 50, 0), Vector3.new(10, 0, 0))`
`Instance.new("RayValue").Value = Ray.new(vector.create(0, 50, 0), vector.create(10, 0, 0))`

Since there is no trivial way to edit rays within Studio, sometimes it is
better to use a CFrameValue instead (which can be changed through a part or
Expand Down
Loading
Loading