Class CompositeShape
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
Holds shape data to create 3D representations of objects. Also allows shapes to be overlayed on top of one another recursively.
public class CompositeShape
- Inheritance
-
CompositeShape
Examples
"shape": { "base": "block/basic/cube" },
"shapeInventory": {
"base": "block/plant/bamboo/{color}/{part}-1",
"overlays": [ { "base": "block/plant/bamboo/{color}/{part}lod0-1" } ]
},
Fields
Base (Recommended) (Default: None)
The path to this shape file.
public AssetLocation Base
Field Value
Alternates (Optional) (Default: None)
The block shape may consists of any amount of alternatives, one of which will be randomly chosen when the shape is chosen.
public CompositeShape[] Alternates
Field Value
Format (Optional) (Default: VintageStory)
The format/filetype of this shape.
public EnumShapeFormat Format
Field Value
InsertBakedTextures (Optional) (Default: false)
Whether or not to insert baked in textures for mesh formats such as gltf into the texture atlas.
public bool InsertBakedTextures
Field Value
Overlays (Optional) (Default: None)
The shape will render all overlays on top of this shape. Can be used to group multiple shapes into one composite shape.
public CompositeShape[] Overlays
Field Value
QuantityElements (Optional) (Default: None)
If non zero will only tesselate the first n elements of the shape
public int? QuantityElements
Field Value
- int?
Scale (Optional) (Default: 1)
The scale of this shape on all axes.
public float Scale
Field Value
SelectiveElements (Optional) (Default: None)
If set will only tesselate elements with given name
public string[] SelectiveElements
Field Value
- string[]
VoxelizeTexture (Optional) (Default: false)
If true, the shape is created from a voxelized version of the first defined texture
public bool VoxelizeTexture
Field Value
offsetX (Optional) (Default: 0)
How much should this shape be offset on X axis?
public float offsetX
Field Value
offsetY (Optional) (Default: 0)
How much should this shape be offset on Y axis?
public float offsetY
Field Value
offsetZ (Optional) (Default: 0)
How much should this shape be offset on Z axis?
public float offsetZ
Field Value
rotateX (Optional) (Default: 0)
How much, in degrees, should this shape be rotated around the X axis?
public float rotateX
Field Value
rotateY (Optional) (Default: 0)
How much, in degrees, should this shape be rotated around the Y axis?
public float rotateY
Field Value
rotateZ (Optional) (Default: 0)
How much, in degrees, should this shape be rotated around the Z axis?
public float rotateZ