@quenty/camerastoryutils 10.11.0-canary.ae8d76d.0 → 10.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/package.json +6 -6
- package/src/Client/CameraStoryUtils.lua +20 -14
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
# [10.11.0
|
|
6
|
+
# [10.11.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/camerastoryutils@10.10.4...@quenty/camerastoryutils@10.11.0) (2025-05-10)
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
### Bug Fixes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/camerastoryutils",
|
|
3
|
-
"version": "10.11.0
|
|
3
|
+
"version": "10.11.0",
|
|
4
4
|
"description": "CameraStoryUtils - utility functions for 3D viewport hoarcekat stories.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"Quenty"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@quenty/insertserviceutils": "10.11.0
|
|
30
|
-
"@quenty/loader": "10.
|
|
31
|
-
"@quenty/math": "2.7.3",
|
|
32
|
-
"@quenty/promise": "10.11.0
|
|
29
|
+
"@quenty/insertserviceutils": "^10.11.0",
|
|
30
|
+
"@quenty/loader": "^10.9.0",
|
|
31
|
+
"@quenty/math": "^2.7.3",
|
|
32
|
+
"@quenty/promise": "^10.11.0"
|
|
33
33
|
},
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "20cff952c2cf06b959f2f11d2293bdef38acc604"
|
|
38
38
|
}
|
|
@@ -10,9 +10,9 @@ local RunService = game:GetService("RunService")
|
|
|
10
10
|
local TextService = game:GetService("TextService")
|
|
11
11
|
|
|
12
12
|
local InsertServiceUtils = require("InsertServiceUtils")
|
|
13
|
-
local Promise = require("Promise")
|
|
14
|
-
local Math = require("Math")
|
|
15
13
|
local Maid = require("Maid")
|
|
14
|
+
local Math = require("Math")
|
|
15
|
+
local Promise = require("Promise")
|
|
16
16
|
|
|
17
17
|
local CameraStoryUtils = {}
|
|
18
18
|
|
|
@@ -117,7 +117,14 @@ end
|
|
|
117
117
|
@param toCFrame CFrame
|
|
118
118
|
@return (interpolate: function, color: Color3, label: string?, labelOffset: Vector2?) -> ()
|
|
119
119
|
]=]
|
|
120
|
-
function CameraStoryUtils.getInterpolationFactory(
|
|
120
|
+
function CameraStoryUtils.getInterpolationFactory(
|
|
121
|
+
maid: Maid.Maid,
|
|
122
|
+
viewportFrame: ViewportFrame,
|
|
123
|
+
low: number,
|
|
124
|
+
high: number,
|
|
125
|
+
period: number,
|
|
126
|
+
toCFrame: CFrame
|
|
127
|
+
)
|
|
121
128
|
assert(maid, "Bad maid")
|
|
122
129
|
assert(viewportFrame, "Bad viewportFrame")
|
|
123
130
|
assert(type(low) == "number", "Bad low")
|
|
@@ -132,10 +139,9 @@ function CameraStoryUtils.getInterpolationFactory(maid: Maid.Maid, viewportFrame
|
|
|
132
139
|
labelOffset = labelOffset or Vector2.zero
|
|
133
140
|
|
|
134
141
|
maid:GivePromise(CameraStoryUtils.promiseCrate(maid, viewportFrame, {
|
|
135
|
-
Color = color
|
|
136
|
-
Transparency = 0.5
|
|
137
|
-
}))
|
|
138
|
-
:Then(function(crate)
|
|
142
|
+
Color = color,
|
|
143
|
+
Transparency = 0.5,
|
|
144
|
+
})):Then(function(crate)
|
|
139
145
|
local label
|
|
140
146
|
if labelText then
|
|
141
147
|
local h, s, _ = Color3.toHSV(color)
|
|
@@ -176,7 +182,7 @@ function CameraStoryUtils.getInterpolationFactory(maid: Maid.Maid, viewportFrame
|
|
|
176
182
|
end
|
|
177
183
|
end
|
|
178
184
|
|
|
179
|
-
|
|
185
|
+
maid:GiveTask(RunService.RenderStepped:Connect(function()
|
|
180
186
|
local t = (os.clock() / period % 2 / period) * period
|
|
181
187
|
if t >= 1 then
|
|
182
188
|
t = 1 - (t % 1)
|
|
@@ -201,12 +207,12 @@ function CameraStoryUtils.getInterpolationFactory(maid: Maid.Maid, viewportFrame
|
|
|
201
207
|
end
|
|
202
208
|
end
|
|
203
209
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
210
|
+
for part, rel in relCFrame do
|
|
211
|
+
part.CFrame = cframe:toWorldSpace(rel)
|
|
212
|
+
end
|
|
213
|
+
end))
|
|
214
|
+
end)
|
|
209
215
|
end
|
|
210
216
|
end
|
|
211
217
|
|
|
212
|
-
return CameraStoryUtils
|
|
218
|
+
return CameraStoryUtils
|