Skip to content

Commit 924d976

Browse files
committed
feat: add camera paths
- Add new functional for CCameraExtend - Add new camera API for LUA
1 parent 67312b6 commit 924d976

55 files changed

Lines changed: 4239 additions & 37 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

LDYOM/Languages/English.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ nothing_params = "This objective has no parameters"
130130
set_increment_global_variable = "Set/Increment Global Variable"
131131
set_characteristics_vehicle = "Set vehicle characteristics"
132132
follow_carrec_path_vehicle = "Following Carrec Path with Vehicle"
133+
play_camera_path = "Play camera path"
133134

134135
[objective_categories]
135136
world = "World"
@@ -357,6 +358,8 @@ visual_effects = "Visual Effects"
357358
visual_effect = "Visual Effect"
358359
checkpoints = "Checkpoints"
359360
checkpoint = "Checkpoint"
361+
camera_paths = "Cinematic Cameras"
362+
camera_path = "Cinematic Camera"
360363

361364
[skin_selector]
362365
title = "Skin Selector"
@@ -1007,3 +1010,17 @@ play = "Play"
10071010
rerec = "Rerecord"
10081011
create_copy_vehicle = "Create Vehicle Copy"
10091012
overlay_states = ["When ready to record, press I", "Recording started, press O to stop", "Press O again to replay, press P to save"]
1013+
1014+
[camera_paths]
1015+
control = "Camera Control (RMB+):\n Movement: WASD or arrow keys, QE\n Movement speed: %.2f (adjust with mouse wheel)\n View: mouse movement"
1016+
degree = "Degree"
1017+
weight = "Point Weight"
1018+
control_points = "Control Points"
1019+
add_control_point = "Add Control Point"
1020+
custom_control_knots = "Editing Knots"
1021+
preview_current_point = "Preview Current Point"
1022+
update_control_point = "Update Control Point"
1023+
rotation_easing = "Rotation Easing Type"
1024+
play = "Play"
1025+
catmull_rom_rotations = "Catmull-Rom Centripetal Rotations"
1026+
invalid_curve_warning = "Invalid curve data, try reducing the degree of the curve or adding more control points"

LDYOM/Languages/Polish.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ nothing_params = "Ten cel nie ma parametrów"
131131
set_increment_global_variable = "Ustaw/zwiększ zmienną globalną"
132132
set_characteristics_vehicle = "Ustawienia cech pojazdu"
133133
follow_carrec_path_vehicle = "Podążanie ścieżką Carrec dla pojazdu"
134+
play_camera_path = "Odtwórz ścieżkę kamery"
134135

135136
[objective_categories]
136137
world = "Świat"
@@ -358,6 +359,8 @@ visual_effects = "Efekty wizualne"
358359
visual_effect = "Efekt wizualny"
359360
checkpoints = "Punkty kontrolne"
360361
checkpoint = "Punkt kontrolny"
362+
camera_paths = "Ścieżki kamery"
363+
camera_path = "Ścieżka kamery"
361364

362365
[skin_selector]
363366
title = "Wybór skina"
@@ -1008,3 +1011,17 @@ play = "Odtwórz"
10081011
rerec = "Nagranie ponowne"
10091012
create_copy_vehicle = "Utwórz kopię pojazdu"
10101013
overlay_states = ["Gdy będziesz gotowy do nagrywania, naciśnij I", "Nagrywanie rozpoczęte, naciśnij O, aby zatrzymać", "Naciśnij ponownie O, aby ponownie odtworzyć, naciśnij P, aby zapisać"]
1014+
1015+
[camera_paths]
1016+
control = "Sterowanie kamerą (PPM+):\n Przesuwanie: WASD lub strzałki, QE\n Prędkość przesuwania: %.2f (zmiana za pomocą kółka myszy)\n Widok: ruch myszy"
1017+
degree = "Stopień"
1018+
weight = "Waga punktu"
1019+
control_points = "Punkty kontrolne"
1020+
add_control_point = "Dodaj punkt kontrolny"
1021+
custom_control_knots = "Edycja węzłów kontrolnych"
1022+
preview_current_point = "Podgląd bieżącego punktu"
1023+
update_control_point = "Aktualizuj punkt kontrolny"
1024+
rotation_easing = "Typ łagodzenia obrotu"
1025+
play = "Odtwórz"
1026+
catmull_rom_rotations = "Obroty Catmull-Roma"
1027+
invalid_curve_warning = "Dane krzywej są niewłaściwe, spróbuj zmniejszyć stopień krzywej lub dodać więcej punktów kontrolnych"

LDYOM/Languages/Portuguese.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ nothing_params = "Sem parâmetros"
131131
set_increment_global_variable = "Definir/aumentar variável global"
132132
set_characteristics_vehicle = "Definir características do veículo"
133133
follow_carrec_path_vehicle = "Seguir caminho Carrec do veículo"
134+
play_camera_path = "Reproduzir caminho da câmera"
134135

135136
[objective_categories]
136137
world = "Mundo"
@@ -358,6 +359,8 @@ pyrotechnics = "Pirotecnia"
358359
audio = "Áudio"
359360
visual_effect = "Efeito visual"
360361
checkpoint = "Ponto de verificação"
362+
camera_paths = "Caminhos da câmera"
363+
camera_path = "Caminho da câmera"
361364

362365
[skin_selector]
363366
title = "Seleção de Skin"
@@ -1008,3 +1011,17 @@ play = "Reproduzir"
10081011
rerec = "Refazer"
10091012
create_copy_vehicle = "Criar cópia do veículo"
10101013
overlay_states = ["Quando estiver pronto para gravar, pressione I", "Gravação iniciada, pressione O para parar", "Pressione O novamente para regravar, pressione P para salvar"]
1014+
1015+
[camera_paths]
1016+
control = "Controle da câmera (Botão direito do mouse +):\n Movimento: WASD ou setas, QE\n Velocidade de movimento: %.2f (altera com a roda do mouse)\n Vista: movimento do mouse"
1017+
degree = "Grau"
1018+
weight = "Peso do ponto"
1019+
control_points = "Pontos de controle"
1020+
add_control_point = "Adicionar ponto de controle"
1021+
custom_control_knots = "Edição de nós personalizada"
1022+
preview_current_point = "Visualizar ponto atual"
1023+
update_control_point = "Atualizar ponto de controle"
1024+
rotation_easing = "Tipo de suavização de rotação"
1025+
play = "Reproduzir"
1026+
catmull_rom_rotations = "Rotações Catmull-Rom centrípetas"
1027+
invalid_curve_warning = "A curva é inválida, tente reduzir o grau da curva ou adicionar mais pontos de controle"

LDYOM/Languages/Russian.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ nothing_params = "У этой цели нет параметров"
130130
set_increment_global_variable = "Установить/увеличить гл. переменную"
131131
set_characteristics_vehicle = "Установить характеристики ТС"
132132
follow_carrec_path_vehicle = "Следование по Carrec пути"
133+
play_camera_path = "Воспроизвести путь камеры"
133134

134135
[objective_categories]
135136
world = "Мир"
@@ -384,6 +385,7 @@ particles = "Частицы"
384385
pickups = "Пикапы"
385386
visual_effects = "Визуальные эффекты"
386387
checkpoints = "Контрольные точки"
388+
camera_paths = "Кинокамеры"
387389
actor = "Актер"
388390
vehicle = "ТС-во"
389391
object = "Объект"
@@ -394,6 +396,7 @@ pyrotechnics = "Пиротехника"
394396
audio = "Аудио"
395397
visual_effect = "Визуальный эффект"
396398
checkpoint = "Контрольная точка"
399+
camera_path = "Кинокамера"
397400

398401
[skin_selector]
399402
title = "Выбор скина"
@@ -545,6 +548,24 @@ conditions = [
545548
"Игрок в ТС"
546549
]
547550

551+
[camera_paths]
552+
control = """Управление камерой (ПКМ+):
553+
Перемещение: WASD или стрелки, QE
554+
Скорость перемещения: %.2f (изменяется колесом мыши)
555+
Вид: движение мыши"""
556+
degree = "Степень"
557+
weight = "Вес точки"
558+
control_points = "Контрольные точки"
559+
add_control_point = "Добавить контрольную точку"
560+
custom_control_knots = "Редактирование узлов"
561+
preview_current_point = "Предпросмотр текущей точки"
562+
update_control_point = "Обновить контрольную точку"
563+
rotation_easing = "Тип сглаживания вращения"
564+
play = "Воспроизвести"
565+
catmull_rom_rotations = "Центростремительное вращение Кэтмулла-Рома"
566+
invalid_curve_warning = "Данные кривой недействительны, попробуйте уменьшить степень кривой или добавить больше контрольных точек"
567+
568+
548569
[hotkey_editor]
549570
title = "Редактор горячих клавиш"
550571
clear = "Очистить"

LDYOM/Scripts/annotations/ldyom.lua

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,20 @@ LDActor = {
870870
copy = function() end,
871871
}
872872

873+
874+
---@class LDCameraPath
875+
---@field getName fun(self): string
876+
---@field copy fun(self): LDCameraPath
877+
---@field getUuid fun(self): uuid
878+
---@field getPositionCurve fun(self): userdata
879+
---@field isCustomControlKnots fun(self): boolean
880+
---@field getRotationsCurve fun(self): CQuaternion[]
881+
---@field getRotationsEasing fun(self): integer[]
882+
---@field getTime fun(self): number
883+
---@field isCatmullRomRotations fun(self): boolean
884+
---@field isValid fun(self): boolean
885+
886+
873887
---@class LDSceneSettings
874888
---@field groupRelations integer[][]
875889
---@field time integer[]
@@ -908,6 +922,8 @@ LDScene = {
908922
getVisualEffects = function() end,
909923
---@return LDCheckpoint[]
910924
getCheckpoints = function() end,
925+
---@return LDCameraPath[]
926+
getCameraPaths = function() end,
911927
---@return LDSceneSettings
912928
getSceneSettings = function() end,
913929
---@return boolean
@@ -1016,8 +1032,45 @@ ld.settings = {
10161032
time = {}
10171033

10181034
---current time in milliseconds
1019-
---@type number
1020-
time.snTimeInMilliseconds = nil
1035+
---@return number
1036+
time.getSnTimeInMilliseconds = function ()
1037+
end
1038+
1039+
1040+
---@class CCameraExtend
1041+
CCameraExtend = {
1042+
---@param mode boolean
1043+
setExtendMode = function(self, mode) end,
1044+
---@param attachEntity userdata
1045+
---@param lookEntity userdata
1046+
---@param rotationOffset CQuaternion
1047+
---@param posOffset number[]
1048+
attachToEntity = function(self, attachEntity, lookEntity, rotationOffset, posOffset) end,
1049+
---@param path LDCameraPath
1050+
---@return boolean
1051+
playCameraPath = function(self, path) end,
1052+
stopCameraPath = function(self) end,
1053+
---@return boolean
1054+
isPlayingPath = function(self) end,
1055+
---@return number
1056+
getPathProgress = function(self) end,
1057+
}
1058+
1059+
1060+
---@class CCameraExtend
1061+
ld.TheCameraExtend = nil
1062+
1063+
1064+
ld.CameraMutex = {
1065+
---@return boolean
1066+
isLocked = function() end,
1067+
}
1068+
1069+
---@class CutsceneMutexGuard
1070+
CutsceneMutexGuard = {
1071+
---@return CutsceneMutexGuard
1072+
new = function() end,
1073+
}
10211074

10221075
glm = {}
10231076

LDYOM/Scripts/scripts/Core/Languages/English.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ variable = "Variable"
4444
global_variable = "Global variable"
4545
objective = "Objective"
4646
char = "Character"
47+
camera_path = "Camera Path"
4748
[nodes.types.core]
4849
flow = "Flow"
4950
number = "Number"
@@ -231,3 +232,10 @@ on_complete = "On Completion"
231232

232233
[nodes.core.stop_carrec_path_vehicle]
233234
title = "Stop Carrec Path for Vehicle"
235+
236+
[nodes.core.play_camera_path]
237+
title = "Play camera path"
238+
on_complete = "On completion"
239+
240+
[nodes.core.stop_camera_path]
241+
title = "Stop camera path"

LDYOM/Scripts/scripts/Core/Languages/Polish.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ variable = "Zmienna"
4444
global_variable = "Zmienna globalna"
4545
objective = "Cel"
4646
char = "Postać"
47+
camera_path = "Ścieżka kamery"
4748
[nodes.types.core]
4849
flow = "Przepływ"
4950
number = "Liczba"
@@ -234,3 +235,10 @@ on_complete = "Po zakończeniu"
234235

235236
[nodes.core.stop_carrec_path_vehicle]
236237
title = "Zatrzymaj ścieżkę Carrec dla pojazdu"
238+
239+
[nodes.core.play_camera_path]
240+
title = "Odtwórz ścieżkę kamery"
241+
on_complete = "Po zakończeniu"
242+
243+
[nodes.core.stop_camera_path]
244+
title = "Zatrzymaj ścieżkę kamery"

LDYOM/Scripts/scripts/Core/Languages/Portuguese.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ variable = "Variável"
4444
global_variable = "Variável Global"
4545
objective = "Objetivo"
4646
char = "Personagem"
47+
camera_path = "Caminho da câmera"
4748
[nodes.types.core]
4849
flow = "Fluxo"
4950
number = "Número"
@@ -231,3 +232,10 @@ on_complete = "Ao completar"
231232

232233
[nodes.core.stop_carrec_path_vehicle]
233234
title = "Parar caminho Carrec para veículo"
235+
236+
[nodes.core.play_camera_path]
237+
title = "Reproduzir caminho da câmera"
238+
on_complete = "Ao concluir"
239+
240+
[nodes.core.stop_camera_path]
241+
title = "Parar caminho da câmera"

LDYOM/Scripts/scripts/Core/Languages/Russian.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ variable = "Переменная"
4444
global_variable = "Гл. переменная"
4545
objective = "Цель"
4646
char = "Персонаж"
47+
camera_path = "Путь камеры"
4748

4849
[nodes.types.core]
4950
flow = "Поток"
@@ -243,4 +244,11 @@ title = "Запуск Carrec пути для ТС"
243244
on_complete = "При завершении"
244245

245246
[nodes.core.stop_carrec_path_vehicle]
246-
title = "Остановить Carrec пути для ТС"
247+
title = "Остановить Carrec пути для ТС"
248+
249+
[nodes.core.play_camera_path]
250+
title = "Воспроизвести путь камеры"
251+
on_complete = "При завершении"
252+
253+
[nodes.core.stop_camera_path]
254+
title = "Остановить путь камеры"

0 commit comments

Comments
 (0)