Merge pull request #969 from MihailRis/add-normal-to-rect-in-vcm

Add normal to 'rect' and 'tri' primitives in vcm
This commit is contained in:
MihailRis 2026-09-06 20:09:55 +03:00 • committed by GitHub
commit c61b13cb63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 25 additions and 11 deletions

View file

@ -41,6 +41,7 @@ This primitive describes a triangle.
- `region` - UV region within the selected texture, defined by the positions of opposite corners of a square of normalized texture coordinates. Example: `region (0,0,1,1)`
- `region-scale` - multiplier vector for the UV region. Example: `region-scale (0.5,1)`
- `shading` - determines whether shading is enabled on the primitive. Example: `shading off`
- `normal` - overrides normal vector. Example: `normal (0,1,0)`
By default, texture coordinates are not affected by shape or size, unlike other primitives.
@ -56,6 +57,7 @@ This primitive describes a parallelogram using the right and up vectors.
- `region-scale` - the multiplier vector for the automatically selected UV region. Example: `region-scale (0.5,1)`
- `shading` - determines whether shading is enabled on the primitive. Example: `shading off`
- `flip` - flips the UV region horizontally or vertically. Example: `flip v`
- `normal` - overrides normal vector. Example: `normal (0,1,0)`
### `box` Properties
@ -66,8 +68,8 @@ This primitive describes a rectangular parallelepiped.
- `origin` - the point relative to which the rotation will be applied. Default: the center of the primitive. Example: `origin (0.5,0.5,0.5)`
- `rotate` - rotation around the (x,y,z) axes in degrees, or a quaternion (x,y,z,w). Example: `rotate (45,0,0)` or `rotate (0.3826834, 0, 0, 0.9238795)`
- `texture` - the default texture to display for all sides.
- `shading` determines whether shading is enabled on the primitive. Example: `shading off`
- `delete` deletes sides by name (top, bottom, east, west, north, south)
- `shading` - determines whether shading is enabled on the primitive. Example: `shading off`
- `delete` - deletes sides by name (top, bottom, east, west, north, south)
### `part` properties (nested in `box`)
@ -76,7 +78,7 @@ This primitive describes the properties of the sides of a rectangular parallelep
- `tags` - determines which side the properties will be applied to. Example: `tags (top,bottom)`
- `texture` - the texture to display. Default: `$side_index`.
- `region` - the UV region within the selected texture, defined by the positions of opposite corners. Example: `region (0,0,1,1)`
- `region-scale` is a multiplier vector for the automatically selected UV region. Example: `region-scale (0.5,1)`
- `region-scale` - multiplier vector for the automatically selected UV region. Example: `region-scale (0.5,1)`
## Skeleton

View file

@ -41,6 +41,7 @@
- `region` - UV регион в границах выбранной текстуры, определяется позициями противоположных углов квадрата нормализованных текстурных координат. Пример: `region (0,0,1,1)`
- `region-scale` вектор-множитель для UV региона. Пример: `region-scale (0.5,1)`
- `shading` определяет возможность затенения на примитиве. Пример: `shading off`
- `normal` переопределяет вектор нормали. Пример: `normal (0,1,0)`
Текстурные координаты по-умолчанию не зависят от формы из размера, в отличие от других примитивов.
@ -53,9 +54,10 @@
- `up` - вектор Y, также определяющий высоту примитива. Пример: `up (0,1,0)`
- `texture` - отображаемая текстура. По-умолчанию: `$0`. Пример: `texture "blocks:sand"`
- `region` - UV регион в границах выбранной текстуры, определяется позициями противоположных углов. Пример: `region (0,0,1,1)`
- `region-scale` вектор-множитель для автоматически выбранного UV региона. Пример: `region-scale (0.5,1)`
- `shading` определяет возможность затенения на примитиве. Пример: `shading off`
- `flip` отражает UV регион по горизонтали или вертикали. Пример: `flip v`
- `region-scale` - вектор-множитель для автоматически выбранного UV региона. Пример: `region-scale (0.5,1)`
- `shading` - определяет возможность затенения на примитиве. Пример: `shading off`
- `flip` - отражает UV регион по горизонтали или вертикали. Пример: `flip v`
- `normal` - переопределяет вектор нормали. Пример: `normal (0,1,0)`
### Свойства `box`
@ -66,8 +68,8 @@
- `origin` - точка, относительно которой будет применено вращение. По-умолчанию: центр примитива. Пример: `origin (0.5,0.5,0.5)`
- `rotate` - вращение вокруг осей (x,y,z) в градусах, или кватернион (x,y,z,w). Пример: `rotate (45,0,0)` или `rotate (0.3826834, 0, 0, 0.9238795)`
- `texture` - отображаемая текстура для всех сторон по-умолчанию.
- `shading` определяет возможность затенения на примитиве. Пример: `shading off`
- `delete` удаляет стороны по именам (top, bottom, east, west, north, south)
- `shading` - определяет возможность затенения на примитиве. Пример: `shading off`
- `delete` - удаляет стороны по именам (top, bottom, east, west, north, south)
### Свойства `part` (вложен в `box`)
@ -76,7 +78,7 @@
- `tags` - определяет то, на какаие из сторон будут применены свойства. Пример: `tags (top,bottom)`
- `texture` - отображаемая текстура. По-умолчанию: `$индекс_стороны`.
- `region` - UV регион в границах выбранной текстуры, определяется позициями противоположных углов. Пример: `region (0,0,1,1)`
- `region-scale` вектор-множитель для автоматически выбранного UV региона. Пример: `region-scale (0.5,1)`
- `region-scale` - вектор-множитель для автоматически выбранного UV региона. Пример: `region-scale (0.5,1)`
## Скелет