Skip to content
Lucas Damian Johnson edited this page Nov 12, 2022 · 13 revisions

When your first initialize or re-initialize the engine you can pass it several options as an object.

Texture Options

Properties for textureOptions.

Property Type Info
width number The width of the textures.
height number The height of the textures.
animationTime number The time in milliseconds to run the texture animation interval.

Note: Textures must be the same width and height.

World Options

Properties for world.

Property Type Info
maxX number | Infinity The max X range for the world.
minX number | -Infinity The min X range for the world.
maxZ number | Infinity The max Z range for the world.
minZ number | -Infinity The min Z range for the world.
maxY number The max Y range for the world.
minY number The min Y range for the world.

Note: Infinite Y range can be done but will not work with sunlight propagation.

Region Options

Properties for regions.

Property Type Info
regionXPow2 number The X size of a region defined as a power of 2.
regionZPow2 number The Z size of a region defined as a power of 2.
regionYPow2 number The Y size of a region defined as a power of 2.

Chunk Options

Properties for chunks.

Property Type Info
chunkXPow2 number The X size of a chunk defined as a power of 2. The max is 5.
chunkZPow2 number The Z size of a chunk defined as a power of 2. The max is 5.
chunkYPow2 number The Y size of a chunk defined as a power of 2. The max is 7.

Updating Options

Properties for updating.

Property Type Info
autoRebuild boolean Whether or not to rebuild on voxel add or remove.

Light Options

Properties for lighting.

Property Type Info
doAO boolean Whether or not to calculate and display ambient occlusion.
doSunLight boolean Whether or not to calculate and display sunlight.
doRGBLight boolean Whether or not to calculate and display RGB light.
autoRGBLight boolean Whether or not to auto calculate RGB light propagation and rebuild chunks.
autoSunLight boolean Whether or not to auto calculate Sunlight propagation and rebuild chunks.

Voxel Options

Properties for voxels.

Property Type Info
doColors boolean This is a WIP. Whether or not to calculate and display colored voxels.

Material Options

Properties for materials.

Property Type Info
mode "classic" "standard"
doAO boolean Whether or not to display ambient occlusion.
doSunLight boolean Whether or not display sunlight.
doRGBLight boolean Whether or not to display RGB light.
disableFloraShaderEffects boolean This is a WIP. Whether or not to disable the default flora shader effects.
disableFluidShaderEffects boolean This is a WIP. Whether or not to disable the default fluid shader effects.

Meshes Options

Properties for meshes.

Property Type Info
clearChachedGeometry boolean If set all cached mesh geometry will be auto cleared.
checkMagmaCollisions boolean If set collisions will be checked for all magma meshes.
checkFluidCollisions boolean If set collisions will be checked for all fluid meshes.
checkFloraCollisions boolean If set collisions will be checked for all flora meshes.
checkSolidCollisions boolean If set collisions will be checked for all solid meshes.
seralize boolean If set all chunk meshes will be auto serlized via Babylon.Js
pickable boolean If set all chunk meshes will be set to pickable.

Nexus Options

Properties for nexus.

Property Type Info
enabled boolean Sets the nexus thread to enabled. Must be set in order to use that thread.
autoSyncChunks boolean If set to true chunks will be auto synced into the thread.
autoSyncVoxelPalette boolean If set to true the voxel palette will be auto synced into the thread.

Rich World Options

Properties for richWorld.

Property Type Info
enabled boolean Sets the rich world thread to enabled. Must be set in order to use that thread.
autoSyncChunks boolean If set to true chunks will be auto synced into the thread.
autoSyncVoxelPalette boolean If set to true the voxel palette will be auto synced into the thread.

FX Options

Properties for fx.

Property Type Info
enabled boolean Sets the fx thread to enabled. Must be set in order to use that thread.
autoSyncChunks boolean If set to true chunks will be auto synced into the thread.
autoSyncVoxelPalette boolean If set to true the voxel palette will be auto synced into the thread.

Data Options

Properties for data.

Property Type Info
enabled boolean Sets the data thread to enabled. Must be set in order to use that thread.
autoSyncChunks boolean If set to true chunks will be auto synced into the thread.

Here is the settings type defintion:

export type EngineSettingsData = {
 nexus: {
  enabled: boolean;
  autoSyncChunks: boolean;
  autoSyncVoxelPalette: boolean;
 };
 data: {
  enabled: boolean;
  autoSyncChunks: boolean;
 };
 richWorld: {
  enabled: boolean;
  autoSyncChunks: boolean;
  autoSyncVoxelPalette: boolean;
 };
 fx: {
  enabled: boolean;
  autoSyncChunks: boolean;
  autoSyncVoxelPalette: boolean;
 };
 server: {
  enabled: boolean;
 };
 textureOptions: {
  width: number;
  height: number;
  animationTime: number;
 };
 world: {
  maxX: number;
  minX: number;
  maxZ: number;
  minZ: number;
  maxY: number;
  minY: number;
 };
 regions: {
  regionXPow2: number;
  regionYPow2: number;
  regionZPow2: number;
 };
 chunks: {
  autoHeightMap: boolean;
  chunkXPow2: number;
  chunkYPow2: number;
  chunkZPow2: number;
 };
 updating: {
  autoRebuild: boolean;
 };
 lighting: {
  doAO: boolean;
  doSunLight: boolean;
  doRGBLight: boolean;
  autoRGBLight: boolean;
  autoSunLight: boolean;
 };
 voxels: {
  doColors: boolean;
 };
 meshes: {
  clearChachedGeometry: boolean;
  checkMagmaCollisions: boolean;
  checkFluidCollisions: boolean;
  checkFloraCollisions: boolean;
  checkSolidCollisions: boolean;
  seralize: boolean;
  pickable: boolean;
 };
 materials: {
  mode : "classic" | "standard",
  disableFloraShaderEffects: boolean;
  disableFluidShaderEffects: boolean;
  doAO: boolean;
  doSunLight: boolean;
  doRGBLight: boolean;
 };
};
Clone this wiki locally