docs: rosetta naming in README, docs, guide, licenses
This commit is contained in:
1 parent
22ddcd78fa
commit
753ae98d4a
20 files changed
+123
-123
No files matched your search
@@ -77,7 +77,7 @@ end
|
||||
|
||||
<!-- doc:display needs Roblox -->
|
||||
```luau
|
||||
local F = require(game:GetService("ReplicatedStorage").Formats)
|
||||
local F = require(game:GetService("ReplicatedStorage").Rosetta)
|
||||
local bytes = game:GetService("HttpService"):GetAsync("https://example.com/cat.webp")
|
||||
local img = assert(F.image.load(bytes))
|
||||
if img.format ~= "rgba8" then
|
||||
@@ -94,7 +94,7 @@ label.Parent = game:GetService("Players").LocalPlayer.PlayerGui:WaitForChild("Sc
|
||||
|
||||
<!-- doc:display needs LÖVE -->
|
||||
```lua
|
||||
local F = require("formats")
|
||||
local F = require("rosetta")
|
||||
local image
|
||||
function love.load()
|
||||
local img = assert(F.load("cat.webp")) -- a love.filesystem path
|
||||
@@ -141,7 +141,7 @@ container calls them.
|
||||
```luau
|
||||
for _, bytes in { flacBytes, mp3Bytes, oggBytes } do
|
||||
local dec = assert(F.audio.open(bytes)) -- open reads the headers only
|
||||
assert(dec.tags.title == "Docs Tone" and dec.tags.artist == "formats-luau")
|
||||
assert(dec.tags.title == "Docs Tone" and dec.tags.artist == "rosetta")
|
||||
print(string.format("%s - %s (%.1f s, %d Hz)", dec.tags.artist, dec.tags.title, dec.duration, dec.sampleRate))
|
||||
end
|
||||
```
|
||||
|
||||
Reference in new issue
Block a user