From 325db431bdcf0ee563a7df0b1a5ecfd7fe71448a Mon Sep 17 00:00:00 2001 From: MihailRis Date: Wed, 23 Sep 2026 22:36:09 +0300 Subject: [PATCH] update doc/*/vca.md --- doc/en/vca.md | 13 +++++++++++++ doc/ru/vca.md | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/doc/en/vca.md b/doc/en/vca.md index adde137f6..d8c0c238f 100644 --- a/doc/en/vca.md +++ b/doc/en/vca.md @@ -27,6 +27,7 @@ Two kinds of curve definitions are currently available, each producing a value ` - `@rotate` - rotates an object/bone - `@scale` - scales an object/bone (multiplier) - `@zoom` - camera zoom (multiplier) +- `@texture` - change of a dynamically assigned texture (see [skeleton:set_texture](scripting/ecs.md#skeleton)) ## Metadata @@ -73,6 +74,18 @@ Example for `curve bezier`: @key frame 138 value 53.00411 lx 127.067 ly 53.00411 rx 138.001 ry 53.00411 ``` +For the `texture` directive, it is simpler. Example: + +```vcd +@texture name $0 { + @key frame 0 value entities/tireman:face_0 + @key frame 24 value entities/tireman:face_1 +} +``` + +> Here, `entities/tireman` is the name of the texture atlas containing `face_*` textures. +> The texture does not necessarily have to be in an atlas. + ## Expression curves The attribute describes a function `f(t) = x`, where t is time in seconds. diff --git a/doc/ru/vca.md b/doc/ru/vca.md index 795541dc1..c4d97c2ec 100644 --- a/doc/ru/vca.md +++ b/doc/ru/vca.md @@ -27,6 +27,7 @@ VCA файл состоит из набора директив, порядок - `@rotate` - поворот объекта/кости - `@scale` - масштабирование объекта/кости (множитель) - `@zoom` - масштаб камеры (множитель) +- `@texture` - смена динамически-назначаемой текстуры (см. [skeleton:set_texture](scripting/ecs.md#skeleton)) ## Мета-информация @@ -73,6 +74,18 @@ VCA файл состоит из набора директив, порядок @key frame 138 value 53.00411 lx 127.067 ly 53.00411 rx 138.001 ry 53.00411 ``` +Для директивы texture всё проще. Пример: + +```vcd +@texture name $0 { + @key frame 0 value entities/tireman:face_0 + @key frame 24 value entities/tireman:face_1 +} +``` + +> entities/tireman здесь - имя текстурного атласа, в котором находятся face_\* текстуры. +> Текстура не обязательно должна находиться в атласе. + ## Кривые через выражения Через атрибут описывается функция `f(t) = x` где t - время в секундах.