Skip to content

Commit

Permalink
feat: add camera paths
Browse files Browse the repository at this point in the history
 - Add new functional for CCameraExtend
 - Add new camera API for LUA
  • Loading branch information
GeTechG committed Apr 12, 2024
1 parent 67312b6 commit 924d976
Show file tree
Hide file tree
Showing 55 changed files with 4,239 additions and 37 deletions.
17 changes: 17 additions & 0 deletions LDYOM/Languages/English.toml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ nothing_params = "This objective has no parameters"
set_increment_global_variable = "Set/Increment Global Variable"
set_characteristics_vehicle = "Set vehicle characteristics"
follow_carrec_path_vehicle = "Following Carrec Path with Vehicle"
play_camera_path = "Play camera path"

[objective_categories]
world = "World"
Expand Down Expand Up @@ -357,6 +358,8 @@ visual_effects = "Visual Effects"
visual_effect = "Visual Effect"
checkpoints = "Checkpoints"
checkpoint = "Checkpoint"
camera_paths = "Cinematic Cameras"
camera_path = "Cinematic Camera"

[skin_selector]
title = "Skin Selector"
Expand Down Expand Up @@ -1007,3 +1010,17 @@ play = "Play"
rerec = "Rerecord"
create_copy_vehicle = "Create Vehicle Copy"
overlay_states = ["When ready to record, press I", "Recording started, press O to stop", "Press O again to replay, press P to save"]

[camera_paths]
control = "Camera Control (RMB+):\n Movement: WASD or arrow keys, QE\n Movement speed: %.2f (adjust with mouse wheel)\n View: mouse movement"
degree = "Degree"
weight = "Point Weight"
control_points = "Control Points"
add_control_point = "Add Control Point"
custom_control_knots = "Editing Knots"
preview_current_point = "Preview Current Point"
update_control_point = "Update Control Point"
rotation_easing = "Rotation Easing Type"
play = "Play"
catmull_rom_rotations = "Catmull-Rom Centripetal Rotations"
invalid_curve_warning = "Invalid curve data, try reducing the degree of the curve or adding more control points"
17 changes: 17 additions & 0 deletions LDYOM/Languages/Polish.toml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ nothing_params = "Ten cel nie ma parametrów"
set_increment_global_variable = "Ustaw/zwiększ zmienną globalną"
set_characteristics_vehicle = "Ustawienia cech pojazdu"
follow_carrec_path_vehicle = "Podążanie ścieżką Carrec dla pojazdu"
play_camera_path = "Odtwórz ścieżkę kamery"

[objective_categories]
world = "Świat"
Expand Down Expand Up @@ -358,6 +359,8 @@ visual_effects = "Efekty wizualne"
visual_effect = "Efekt wizualny"
checkpoints = "Punkty kontrolne"
checkpoint = "Punkt kontrolny"
camera_paths = "Ścieżki kamery"
camera_path = "Ścieżka kamery"

[skin_selector]
title = "Wybór skina"
Expand Down Expand Up @@ -1008,3 +1011,17 @@ play = "Odtwórz"
rerec = "Nagranie ponowne"
create_copy_vehicle = "Utwórz kopię pojazdu"
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ć"]

[camera_paths]
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"
degree = "Stopień"
weight = "Waga punktu"
control_points = "Punkty kontrolne"
add_control_point = "Dodaj punkt kontrolny"
custom_control_knots = "Edycja węzłów kontrolnych"
preview_current_point = "Podgląd bieżącego punktu"
update_control_point = "Aktualizuj punkt kontrolny"
rotation_easing = "Typ łagodzenia obrotu"
play = "Odtwórz"
catmull_rom_rotations = "Obroty Catmull-Roma"
invalid_curve_warning = "Dane krzywej są niewłaściwe, spróbuj zmniejszyć stopień krzywej lub dodać więcej punktów kontrolnych"
17 changes: 17 additions & 0 deletions LDYOM/Languages/Portuguese.toml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ nothing_params = "Sem parâmetros"
set_increment_global_variable = "Definir/aumentar variável global"
set_characteristics_vehicle = "Definir características do veículo"
follow_carrec_path_vehicle = "Seguir caminho Carrec do veículo"
play_camera_path = "Reproduzir caminho da câmera"

[objective_categories]
world = "Mundo"
Expand Down Expand Up @@ -358,6 +359,8 @@ pyrotechnics = "Pirotecnia"
audio = "Áudio"
visual_effect = "Efeito visual"
checkpoint = "Ponto de verificação"
camera_paths = "Caminhos da câmera"
camera_path = "Caminho da câmera"

[skin_selector]
title = "Seleção de Skin"
Expand Down Expand Up @@ -1008,3 +1011,17 @@ play = "Reproduzir"
rerec = "Refazer"
create_copy_vehicle = "Criar cópia do veículo"
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"]

[camera_paths]
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"
degree = "Grau"
weight = "Peso do ponto"
control_points = "Pontos de controle"
add_control_point = "Adicionar ponto de controle"
custom_control_knots = "Edição de nós personalizada"
preview_current_point = "Visualizar ponto atual"
update_control_point = "Atualizar ponto de controle"
rotation_easing = "Tipo de suavização de rotação"
play = "Reproduzir"
catmull_rom_rotations = "Rotações Catmull-Rom centrípetas"
invalid_curve_warning = "A curva é inválida, tente reduzir o grau da curva ou adicionar mais pontos de controle"
21 changes: 21 additions & 0 deletions LDYOM/Languages/Russian.toml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ nothing_params = "У этой цели нет параметров"
set_increment_global_variable = "Установить/увеличить гл. переменную"
set_characteristics_vehicle = "Установить характеристики ТС"
follow_carrec_path_vehicle = "Следование по Carrec пути"
play_camera_path = "Воспроизвести путь камеры"

[objective_categories]
world = "Мир"
Expand Down Expand Up @@ -384,6 +385,7 @@ particles = "Частицы"
pickups = "Пикапы"
visual_effects = "Визуальные эффекты"
checkpoints = "Контрольные точки"
camera_paths = "Кинокамеры"
actor = "Актер"
vehicle = "ТС-во"
object = "Объект"
Expand All @@ -394,6 +396,7 @@ pyrotechnics = "Пиротехника"
audio = "Аудио"
visual_effect = "Визуальный эффект"
checkpoint = "Контрольная точка"
camera_path = "Кинокамера"

[skin_selector]
title = "Выбор скина"
Expand Down Expand Up @@ -545,6 +548,24 @@ conditions = [
"Игрок в ТС"
]

[camera_paths]
control = """Управление камерой (ПКМ+):
Перемещение: WASD или стрелки, QE
Скорость перемещения: %.2f (изменяется колесом мыши)
Вид: движение мыши"""
degree = "Степень"
weight = "Вес точки"
control_points = "Контрольные точки"
add_control_point = "Добавить контрольную точку"
custom_control_knots = "Редактирование узлов"
preview_current_point = "Предпросмотр текущей точки"
update_control_point = "Обновить контрольную точку"
rotation_easing = "Тип сглаживания вращения"
play = "Воспроизвести"
catmull_rom_rotations = "Центростремительное вращение Кэтмулла-Рома"
invalid_curve_warning = "Данные кривой недействительны, попробуйте уменьшить степень кривой или добавить больше контрольных точек"


[hotkey_editor]
title = "Редактор горячих клавиш"
clear = "Очистить"
Expand Down
57 changes: 55 additions & 2 deletions LDYOM/Scripts/annotations/ldyom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,20 @@ LDActor = {
copy = function() end,
}


---@class LDCameraPath
---@field getName fun(self): string
---@field copy fun(self): LDCameraPath
---@field getUuid fun(self): uuid
---@field getPositionCurve fun(self): userdata
---@field isCustomControlKnots fun(self): boolean
---@field getRotationsCurve fun(self): CQuaternion[]
---@field getRotationsEasing fun(self): integer[]
---@field getTime fun(self): number
---@field isCatmullRomRotations fun(self): boolean
---@field isValid fun(self): boolean


---@class LDSceneSettings
---@field groupRelations integer[][]
---@field time integer[]
Expand Down Expand Up @@ -908,6 +922,8 @@ LDScene = {
getVisualEffects = function() end,
---@return LDCheckpoint[]
getCheckpoints = function() end,
---@return LDCameraPath[]
getCameraPaths = function() end,
---@return LDSceneSettings
getSceneSettings = function() end,
---@return boolean
Expand Down Expand Up @@ -1016,8 +1032,45 @@ ld.settings = {
time = {}

---current time in milliseconds
---@type number
time.snTimeInMilliseconds = nil
---@return number
time.getSnTimeInMilliseconds = function ()
end


---@class CCameraExtend
CCameraExtend = {
---@param mode boolean
setExtendMode = function(self, mode) end,
---@param attachEntity userdata
---@param lookEntity userdata
---@param rotationOffset CQuaternion
---@param posOffset number[]
attachToEntity = function(self, attachEntity, lookEntity, rotationOffset, posOffset) end,
---@param path LDCameraPath
---@return boolean
playCameraPath = function(self, path) end,
stopCameraPath = function(self) end,
---@return boolean
isPlayingPath = function(self) end,
---@return number
getPathProgress = function(self) end,
}


---@class CCameraExtend
ld.TheCameraExtend = nil


ld.CameraMutex = {
---@return boolean
isLocked = function() end,
}

---@class CutsceneMutexGuard
CutsceneMutexGuard = {
---@return CutsceneMutexGuard
new = function() end,
}

glm = {}

Expand Down
8 changes: 8 additions & 0 deletions LDYOM/Scripts/scripts/Core/Languages/English.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ variable = "Variable"
global_variable = "Global variable"
objective = "Objective"
char = "Character"
camera_path = "Camera Path"
[nodes.types.core]
flow = "Flow"
number = "Number"
Expand Down Expand Up @@ -231,3 +232,10 @@ on_complete = "On Completion"

[nodes.core.stop_carrec_path_vehicle]
title = "Stop Carrec Path for Vehicle"

[nodes.core.play_camera_path]
title = "Play camera path"
on_complete = "On completion"

[nodes.core.stop_camera_path]
title = "Stop camera path"
8 changes: 8 additions & 0 deletions LDYOM/Scripts/scripts/Core/Languages/Polish.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ variable = "Zmienna"
global_variable = "Zmienna globalna"
objective = "Cel"
char = "Postać"
camera_path = "Ścieżka kamery"
[nodes.types.core]
flow = "Przepływ"
number = "Liczba"
Expand Down Expand Up @@ -234,3 +235,10 @@ on_complete = "Po zakończeniu"

[nodes.core.stop_carrec_path_vehicle]
title = "Zatrzymaj ścieżkę Carrec dla pojazdu"

[nodes.core.play_camera_path]
title = "Odtwórz ścieżkę kamery"
on_complete = "Po zakończeniu"

[nodes.core.stop_camera_path]
title = "Zatrzymaj ścieżkę kamery"
8 changes: 8 additions & 0 deletions LDYOM/Scripts/scripts/Core/Languages/Portuguese.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ variable = "Variável"
global_variable = "Variável Global"
objective = "Objetivo"
char = "Personagem"
camera_path = "Caminho da câmera"
[nodes.types.core]
flow = "Fluxo"
number = "Número"
Expand Down Expand Up @@ -231,3 +232,10 @@ on_complete = "Ao completar"

[nodes.core.stop_carrec_path_vehicle]
title = "Parar caminho Carrec para veículo"

[nodes.core.play_camera_path]
title = "Reproduzir caminho da câmera"
on_complete = "Ao concluir"

[nodes.core.stop_camera_path]
title = "Parar caminho da câmera"
10 changes: 9 additions & 1 deletion LDYOM/Scripts/scripts/Core/Languages/Russian.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ variable = "Переменная"
global_variable = "Гл. переменная"
objective = "Цель"
char = "Персонаж"
camera_path = "Путь камеры"

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

[nodes.core.stop_carrec_path_vehicle]
title = "Остановить Carrec пути для ТС"
title = "Остановить Carrec пути для ТС"

[nodes.core.play_camera_path]
title = "Воспроизвести путь камеры"
on_complete = "При завершении"

[nodes.core.stop_camera_path]
title = "Остановить путь камеры"

0 comments on commit 924d976

Please sign in to comment.