@divinevoxel/vlox 0.0.71 → 0.0.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Contexts/Base/Main/InitDataGenerator.js +0 -9
- package/Contexts/Base/Remote/DataSync.types.d.ts +0 -5
- package/Contexts/Base/Remote/InitDataSync.js +17 -31
- package/Contexts/Render/DivineVoxelEngineRender.d.ts +1 -1
- package/Contexts/World/DivineVoxelEngineWorld.d.ts +1 -1
- package/Init/StartConstructor.js +7 -7
- package/Init/StartWorld.d.ts +1 -1
- package/Init/StartWorld.js +0 -12
- package/Math/Indexing.d.ts +12 -3
- package/Math/Indexing.js +24 -15
- package/Mesher/Functions/CompactVoxelMesh.d.ts +2 -2
- package/Mesher/Functions/CompactVoxelMesh.js +4 -5
- package/Mesher/Functions/MeshSection.d.ts +1 -1
- package/Mesher/Functions/MeshSection.js +72 -66
- package/Mesher/Functions/MeshTexture.d.ts +1 -1
- package/Mesher/Functions/MeshTexture.js +3 -4
- package/Mesher/Functions/MeshVoxel.js +20 -26
- package/Mesher/Geomtry/Primitives/QuadVertexData.d.ts +12 -10
- package/Mesher/Geomtry/Primitives/QuadVertexData.js +49 -56
- package/Mesher/Geomtry/VoxelGeometryBuilder.d.ts +2 -2
- package/Mesher/Geomtry/VoxelGeometryBuilder.js +108 -125
- package/Mesher/Geomtry/VoxelMesh.d.ts +1 -1
- package/Mesher/Geomtry/VoxelMesh.js +2 -2
- package/Mesher/{Tools → Geomtry}/VoxelMeshBVHBuilder.d.ts +2 -9
- package/Mesher/{Tools → Geomtry}/VoxelMeshBVHBuilder.js +4 -16
- package/Mesher/Geomtry/{Buffers.d.ts → VoxelMeshBuffers.d.ts} +9 -8
- package/Mesher/Geomtry/VoxelMeshBuffers.js +49 -0
- package/Mesher/{Tools → Geomtry}/VoxelMeshVertexStructCursor.d.ts +10 -0
- package/Mesher/{Tools → Geomtry}/VoxelMeshVertexStructCursor.js +10 -0
- package/Mesher/Geomtry/index.d.ts +0 -1
- package/Mesher/Geomtry/index.js +0 -1
- package/Mesher/InitMesher.js +2 -11
- package/Mesher/InitTask.js +10 -22
- package/Mesher/Models/Common/BoundsFunctions.d.ts +1 -3
- package/Mesher/Models/Common/BoundsFunctions.js +0 -16
- package/Mesher/Models/Common/Calc/CalcConstants.js +14 -31
- package/Mesher/Models/Common/Calc/FaceDataCalc.d.ts +2 -8
- package/Mesher/Models/Common/Calc/FaceDataCalc.js +50 -52
- package/Mesher/Models/Nodes/Custom/Liquid/FlowGradient.d.ts +2 -2
- package/Mesher/Models/Nodes/Custom/Liquid/FlowGradient.js +1 -1
- package/Mesher/Models/Nodes/Custom/Liquid/LiquidGeomtryNode.d.ts +1 -5
- package/Mesher/Models/Nodes/Custom/Liquid/LiquidGeomtryNode.js +40 -42
- package/Mesher/Models/Nodes/GeometryNode.d.ts +3 -5
- package/Mesher/Models/Nodes/GeometryNode.js +1 -2
- package/Mesher/Models/Nodes/Ruled/BoxVoxelGeometryNode.d.ts +3 -6
- package/Mesher/Models/Nodes/Ruled/BoxVoxelGeometryNode.js +55 -40
- package/Mesher/Models/Nodes/Ruled/QuadVoxelGeometryNode.d.ts +2 -6
- package/Mesher/Models/Nodes/Ruled/QuadVoxelGeometryNode.js +52 -51
- package/Mesher/Models/Nodes/Ruleless/RulelessBoxVoxelGeometryNode.d.ts +2 -6
- package/Mesher/Models/Nodes/Ruleless/RulelessBoxVoxelGeometryNode.js +18 -19
- package/Mesher/Models/Nodes/Ruleless/RulelessQuadVoxelGeometryNode.d.ts +2 -6
- package/Mesher/Models/Nodes/Ruleless/RulelessQuadVoxelGeometryNode.js +37 -40
- package/Mesher/{Tools → Models/Protocols}/OutlinedVoxelTool.d.ts +1 -1
- package/Mesher/{Tools → Models/Protocols}/OutlinedVoxelTool.js +1 -1
- package/Mesher/Models/RenderedMaterials.d.ts +6 -0
- package/Mesher/{RenderedMaterials.js → Models/RenderedMaterials.js} +2 -2
- package/Mesher/Models/VoxelConstructor.d.ts +4 -5
- package/Mesher/Models/VoxelConstructor.js +23 -12
- package/Mesher/Models/{VoxelGeometryLookUp.d.ts → VoxelGeometryBuilderCacheSpace.d.ts} +6 -14
- package/Mesher/Models/{VoxelGeometryLookUp.js → VoxelGeometryBuilderCacheSpace.js} +26 -44
- package/Mesher/{Tools/VoxelMesherDataTool.d.ts → Models/VoxelModelBuilder.d.ts} +10 -8
- package/Mesher/{Tools/VoxelMesherDataTool.js → Models/VoxelModelBuilder.js} +44 -19
- package/Mesher/Models/VoxelModelConstructorRegister.js +3 -3
- package/Models/Defaults/CubeVoxelGeometry.js +4 -0
- package/Models/Defaults/CubeVoxelModels.js +344 -344
- package/Models/Defaults/LiquidVoxelModel.js +2 -2
- package/Models/Defaults/PanelVoxelModels.js +432 -432
- package/Models/Defaults/StairVoxelModel.js +576 -576
- package/Models/Examples.js +469 -456
- package/Models/Indexing/VoxelAOResultsIndex.d.ts +4 -4
- package/Models/Indexing/VoxelAOResultsIndex.js +15 -9
- package/Models/Indexing/VoxelFaceCullResultsIndex.d.ts +3 -3
- package/Models/Indexing/VoxelFaceCullResultsIndex.js +14 -9
- package/Models/Indexing/VoxelFaceTransparentResultsIndex.d.ts +1 -1
- package/Models/Indexing/VoxelFaceTransparentResultsIndex.js +1 -1
- package/Models/Rules/Functions/BuildFinalInputs.js +9 -7
- package/Models/Rules/Functions/BuildGeomtryInputs.js +8 -5
- package/Models/Rules/Functions/BuildRules.js +4 -4
- package/Models/Rules/{VoxelModelManager.d.ts → VoxelModelRuleBuilderRegister.d.ts} +1 -1
- package/Models/Rules/VoxelModelRuleBuilderRegister.js +178 -0
- package/Models/VoxelModel.types.d.ts +14 -5
- package/Renderer/Classes/SectorMesh.d.ts +3 -4
- package/Renderer/Classes/SectorMesh.js +6 -11
- package/Renderer/InitTasks.js +6 -7
- package/Renderer/MeshManager.js +2 -2
- package/Renderer/MeshRegister.js +2 -1
- package/Settings/EngineSettings.d.ts +1 -1
- package/Settings/EngineSettings.js +3 -5
- package/Settings/EngineSettings.types.d.ts +17 -18
- package/Settings/EngineSettings.types.js +16 -15
- package/Tasks/IWG/IWG.d.ts +2 -1
- package/Tasks/IWG/IWG.js +9 -3
- package/Tasks/IWG/Internal/Classes/BuildQueue.d.ts +11 -0
- package/Tasks/IWG/Internal/Classes/BuildQueue.js +49 -0
- package/Tasks/IWG/Internal/Classes/Generator.d.ts +6 -1
- package/Tasks/IWG/Internal/Classes/Generator.js +14 -2
- package/Tasks/IWG/Internal/Classes/IWGTaskBase.js +2 -2
- package/Tasks/IWG/Internal/Functions/getSectorState.js +4 -7
- package/Tasks/IWG/Internal/Functions/runBuildUpdate.js +21 -2
- package/Tasks/IWG/Internal/Functions/runWorldUpdate.js +5 -6
- package/Tasks/IWG/Internal/IWGTasks.d.ts +0 -4
- package/Tasks/IWG/Internal/IWGTasks.js +12 -31
- package/Tasks/IWG/Internal/IWGTools.d.ts +1 -1
- package/Tasks/IWG/Procedures/SaveAllSectors.js +2 -0
- package/Tasks/Propagation/Flow/FlowManager.d.ts +0 -2
- package/Tasks/Propagation/Flow/FlowManager.js +86 -87
- package/Tasks/Propagation/Flow/WorldFlow.js +2 -3
- package/Tasks/Propagation/Illumanation/WorldRGB.js +1 -2
- package/Tasks/Update/InitTasks.d.ts +2 -1
- package/Tasks/Update/InitTasks.js +6 -6
- package/Tasks/Update/UpdateTask.d.ts +3 -1
- package/Tasks/Update/UpdateTask.js +28 -2
- package/Tasks/Update/VoxelUpdate.js +21 -7
- package/Tasks/WorldGeneration/WorldGenBrush.js +2 -1
- package/Templates/Cursor/TemplateCursor.d.ts +2 -2
- package/Templates/Cursor/TemplateCursor.js +1 -2
- package/Templates/Functions/CreateTemplate.js +1 -1
- package/Templates/VoxelTemplate.js +6 -8
- package/Templates/VoxelTemplates.types.d.ts +1 -1
- package/Textures/Classes/CompiledTexture.d.ts +18 -0
- package/Textures/Classes/CompiledTexture.js +50 -0
- package/Textures/Classes/CompiledTextureAnimation.d.ts +12 -0
- package/Textures/Classes/CompiledTextureAnimation.js +27 -0
- package/Textures/Classes/TextureAnimationTexture.d.ts +10 -0
- package/Textures/Classes/TextureAnimationTexture.js +32 -0
- package/Textures/Functions/BuildTextureData.d.ts +10 -0
- package/Textures/Functions/BuildTextureData.js +205 -0
- package/Textures/Texture.types.d.ts +50 -64
- package/Textures/TextureManager.d.ts +8 -19
- package/Textures/TextureManager.js +28 -166
- package/Tools/Brush/Brush.d.ts +1 -3
- package/Tools/Brush/Brush.js +43 -12
- package/Util/Binary/BinaryArrays.d.ts +6 -0
- package/Util/Binary/BinaryArrays.js +25 -0
- package/Util/Binary/BinaryBuffer.d.ts +29 -0
- package/Util/Binary/BinaryBuffer.js +130 -0
- package/Util/Binary/BinaryFunctions.d.ts +3 -0
- package/Util/Binary/BinaryFunctions.js +11 -0
- package/Util/StringPalette.d.ts +1 -0
- package/Util/StringPalette.js +8 -0
- package/Voxels/Cursor/DataCursor.interface.d.ts +5 -0
- package/Voxels/Cursor/VoxelCursor.d.ts +6 -6
- package/Voxels/Cursor/VoxelCursor.interface.d.ts +11 -16
- package/Voxels/Cursor/VoxelCursor.interface.js +35 -58
- package/Voxels/Cursor/VoxelCursor.js +13 -12
- package/Voxels/Cursor/VoxelLightData.d.ts +3 -4
- package/Voxels/Cursor/VoxelLightData.js +8 -7
- package/Voxels/Data/VoxelPalettesRegister.d.ts +8 -0
- package/Voxels/Data/VoxelPalettesRegister.js +8 -0
- package/Voxels/Data/VoxelTag.types.d.ts +56 -0
- package/Voxels/Data/VoxelTag.types.js +23 -0
- package/Voxels/{State → Data}/VoxelTagStates.d.ts +2 -2
- package/Voxels/{State → Data}/VoxelTagStates.js +5 -5
- package/Voxels/Data/VoxelTagsRegister.d.ts +9 -0
- package/Voxels/Data/VoxelTagsRegister.js +32 -0
- package/Voxels/Functions/BuildStateData.js +12 -12
- package/Voxels/Functions/BuildTagAndPaletteData.d.ts +13 -0
- package/Voxels/Functions/BuildTagAndPaletteData.js +55 -0
- package/Voxels/Indexes/VoxelIndex.js +3 -3
- package/Voxels/InitVoxelData.js +31 -73
- package/Voxels/State/Schema/StateSchema.d.ts +1 -1
- package/Voxels/Types/Voxel.types.d.ts +20 -42
- package/Voxels/Types/Voxel.types.js +6 -17
- package/Voxels/Types/VoxelModelCompiledData.types.d.ts +11 -13
- package/Voxels/Types/VoxelSubstances.types.d.ts +2 -15
- package/Voxels/Types/VoxelSubstances.types.js +1 -9
- package/World/Archive/Archive.types.d.ts +38 -34
- package/World/Archive/Functions/ArchiveArea.js +18 -30
- package/World/Archive/Functions/ArchiveSector.js +484 -213
- package/World/Archive/Functions/ImportSector.d.ts +3 -3
- package/World/Archive/Functions/ImportSector.js +205 -151
- package/World/Archive/Functions/Shared.d.ts +6 -0
- package/World/Archive/Functions/Shared.js +75 -0
- package/World/Archive/InitTasks.js +30 -13
- package/World/Cursor/SectionCursor.d.ts +3 -2
- package/World/Cursor/SectionCursor.js +9 -4
- package/World/Cursor/SectorCursor.d.ts +3 -2
- package/World/Cursor/SectorCursor.js +5 -3
- package/World/Cursor/WorldCursor.d.ts +2 -2
- package/World/Cursor/WorldCursor.js +6 -3
- package/World/Cursor/WorldVoxelCursor.d.ts +7 -7
- package/World/Cursor/WorldVoxelCursor.js +21 -24
- package/World/InitTasks.d.ts +1 -1
- package/World/Lock/WorldLock.d.ts +1 -1
- package/World/Section/Section.d.ts +31 -23
- package/World/Section/Section.js +116 -18
- package/World/Section/SectionState.d.ts +10 -0
- package/World/Section/SectionState.js +11 -0
- package/World/Sector/Sector.d.ts +24 -9
- package/World/Sector/Sector.js +92 -21
- package/World/Sector/SectorHeightMap.js +3 -5
- package/World/Sector/SectorState.d.ts +21 -0
- package/World/Sector/SectorState.js +28 -0
- package/World/WorldRegister.d.ts +4 -0
- package/World/WorldRegister.js +15 -3
- package/World/WorldSpaces.d.ts +6 -0
- package/World/WorldSpaces.js +25 -6
- package/package.json +1 -1
- package/Data/Cursor/DataCursor.interface.d.ts +0 -5
- package/Data/Cursor/DataCursor.interface.js +0 -2
- package/Data/Register/MappedDataRegister.d.ts +0 -5
- package/Data/Register/MappedDataRegister.js +0 -9
- package/Data/Register/MappedRegisterBase.d.ts +0 -14
- package/Data/Register/MappedRegisterBase.js +0 -50
- package/Data/Structs/StructBuilder.d.ts +0 -34
- package/Data/Structs/StructBuilder.js +0 -157
- package/Data/Structs/StructBuilder.types.d.ts +0 -30
- package/Mesher/Functions/CompactMesh.d.ts +0 -2
- package/Mesher/Functions/CompactMesh.js +0 -42
- package/Mesher/Geomtry/Buffers.js +0 -81
- package/Mesher/Geomtry/GeometryNormals.d.ts +0 -10
- package/Mesher/Geomtry/GeometryNormals.js +0 -52
- package/Mesher/Geomtry/MeshData.types.d.ts +0 -13
- package/Mesher/Geomtry/MeshData.types.js +0 -6
- package/Mesher/Geomtry/Tools/MesherDataTools.d.ts +0 -7
- package/Mesher/Geomtry/Tools/MesherDataTools.js +0 -12
- package/Mesher/Geomtry/Tools/index.d.ts +0 -1
- package/Mesher/Geomtry/Tools/index.js +0 -1
- package/Mesher/RenderedMaterials.d.ts +0 -6
- package/Models/Rules/VoxelModelManager.js +0 -82
- package/Textures/TextureAnimations.d.ts +0 -4
- package/Textures/TextureAnimations.js +0 -35
- package/Textures/TextureArray.d.ts +0 -47
- package/Textures/TextureArray.js +0 -202
- package/Textures/TextureBuilder.d.ts +0 -13
- package/Textures/TextureBuilder.js +0 -120
- package/Textures/TextureRegister.d.ts +0 -9
- package/Textures/TextureRegister.js +0 -28
- package/Tools/Data/SubstanceDataTool.d.ts +0 -13
- package/Tools/Data/SubstanceDataTool.js +0 -51
- package/Voxels/Palettes/MaterialPalette.d.ts +0 -9
- package/Voxels/Palettes/MaterialPalette.js +0 -11
- package/Voxels/Palettes/SubstancePalette.d.ts +0 -9
- package/Voxels/Palettes/SubstancePalette.js +0 -11
- package/Voxels/Palettes/VoxelPalette.d.ts +0 -11
- package/Voxels/Palettes/VoxelPalette.js +0 -15
- package/Voxels/Segments/MaterialDataGenerator.d.ts +0 -6
- package/Voxels/Segments/MaterialDataGenerator.js +0 -12
- package/Voxels/Segments/SubstanceDataGenerator.d.ts +0 -6
- package/Voxels/Segments/SubstanceDataGenerator.js +0 -35
- package/Voxels/Segments/VoxelDataGenerator.d.ts +0 -10
- package/Voxels/Segments/VoxelDataGenerator.js +0 -56
- package/Voxels/Structs/Builder/SubstanceStructBuilder.d.ts +0 -2
- package/Voxels/Structs/Builder/SubstanceStructBuilder.js +0 -42
- package/Voxels/Structs/Builder/VoxelStructBuilder.d.ts +0 -2
- package/Voxels/Structs/Builder/VoxelStructBuilder.js +0 -68
- package/Voxels/Structs/SubstanceStruct.d.ts +0 -17
- package/Voxels/Structs/SubstanceStruct.js +0 -17
- package/Voxels/Structs/VoxelStruct.d.ts +0 -27
- package/Voxels/Structs/VoxelStruct.js +0 -29
- package/World/Section/SectionHeightMap.d.ts +0 -10
- package/World/Section/SectionHeightMap.js +0 -39
- package/World/Section/SectionStruct.d.ts +0 -8
- package/World/Section/SectionStruct.js +0 -29
- package/World/Section/SectionStructProperties.d.ts +0 -10
- package/World/Section/SectionStructProperties.js +0 -11
- package/World/Sector/SectorStruct.d.ts +0 -1
- package/World/Sector/SectorStruct.js +0 -46
- package/World/Sector/SectorStructIds.d.ts +0 -13
- package/World/Sector/SectorStructIds.js +0 -14
- package/World/Structs/WorldDataStructProperties.d.ts +0 -8
- package/World/Structs/WorldDataStructProperties.js +0 -9
- /package/Mesher/{VoxelShaderData.d.ts → Geomtry/VoxelShaderData.d.ts} +0 -0
- /package/Mesher/{VoxelShaderData.js → Geomtry/VoxelShaderData.js} +0 -0
- /package/{Data/Functions → Util/Binary}/Palettes.d.ts +0 -0
- /package/{Data/Functions → Util/Binary}/Palettes.js +0 -0
- /package/{Data/Structs/StructBuilder.types.js → Voxels/Cursor/DataCursor.interface.js} +0 -0
- /package/Voxels/{VoxelLevelReader.d.ts → Cursor/VoxelLevelReader.d.ts} +0 -0
- /package/Voxels/{VoxelLevelReader.js → Cursor/VoxelLevelReader.js} +0 -0
- /package/World/{Storage → Types}/WorldStorage.interface.d.ts +0 -0
- /package/World/{Storage → Types}/WorldStorage.interface.js +0 -0
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { BinaryNumberTypes } from "@amodx/binary";
|
|
2
|
-
import { SubstanceStructIds } from "../../Types/VoxelSubstances.types";
|
|
3
|
-
import { StructBuilder } from "../../../Data/Structs/StructBuilder.js";
|
|
4
|
-
export const SubstanceStructBuilder = new StructBuilder("substance-tag-manager", "substance");
|
|
5
|
-
SubstanceStructBuilder.addNode([
|
|
6
|
-
{
|
|
7
|
-
id: SubstanceStructIds.parent,
|
|
8
|
-
type: "string-map",
|
|
9
|
-
allowedComms: ["constructor", "nexus", "fx", "world", "render"],
|
|
10
|
-
},
|
|
11
|
-
/* {
|
|
12
|
-
id: SubstanceStructIds.culledSubstnaces,
|
|
13
|
-
type: "object-map",
|
|
14
|
-
allowedComms: ["constructor"],
|
|
15
|
-
}, */
|
|
16
|
-
{
|
|
17
|
-
id: SubstanceStructIds.isTransparent,
|
|
18
|
-
type: "boolean",
|
|
19
|
-
default: false,
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
id: SubstanceStructIds.isSolid,
|
|
23
|
-
type: "boolean",
|
|
24
|
-
default: false,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
id: SubstanceStructIds.isLiquid,
|
|
28
|
-
type: "boolean",
|
|
29
|
-
default: false,
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
id: SubstanceStructIds.flowRate,
|
|
33
|
-
type: "number",
|
|
34
|
-
numberType: BinaryNumberTypes.Float32,
|
|
35
|
-
default: 1,
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
id: SubstanceStructIds.isWindAffected,
|
|
39
|
-
type: "boolean",
|
|
40
|
-
default: false,
|
|
41
|
-
},
|
|
42
|
-
]);
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { BinaryNumberTypes } from "@amodx/binary";
|
|
2
|
-
import { VoxelStructIds } from "../../Types/Voxel.types";
|
|
3
|
-
import { StructBuilder } from "../../../Data/Structs/StructBuilder.js";
|
|
4
|
-
export const VoxelStructBuilder = new StructBuilder("voxel-tag-manager", "voxel");
|
|
5
|
-
VoxelStructBuilder.addNode([
|
|
6
|
-
{
|
|
7
|
-
id: VoxelStructIds.substance,
|
|
8
|
-
type: "string-map",
|
|
9
|
-
allowedComms: ["constructor", "nexus", "fx", "world", "render"],
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
id: VoxelStructIds.colliderID,
|
|
13
|
-
type: "string-map",
|
|
14
|
-
allowedComms: ["nexus"],
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
id: VoxelStructIds.checkCollisions,
|
|
18
|
-
type: "boolean",
|
|
19
|
-
default: false,
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
id: VoxelStructIds.renderedMaterial,
|
|
23
|
-
type: "string-map",
|
|
24
|
-
allowedComms: ["constructor", "nexus", "fx", "world", "render"],
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
id: VoxelStructIds.voxelMaterial,
|
|
28
|
-
type: "string-map",
|
|
29
|
-
allowedComms: ["constructor", "nexus", "fx", "world", "render"],
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
id: VoxelStructIds.isLightSource,
|
|
33
|
-
type: "boolean",
|
|
34
|
-
default: false,
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
id: VoxelStructIds.noAO,
|
|
38
|
-
type: "boolean",
|
|
39
|
-
default: false,
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
id: VoxelStructIds.lightValue,
|
|
43
|
-
type: "number",
|
|
44
|
-
numberType: BinaryNumberTypes.Uint16,
|
|
45
|
-
default: 0,
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
id: VoxelStructIds.isRich,
|
|
49
|
-
type: "boolean",
|
|
50
|
-
default: false,
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
id: VoxelStructIds.isTransparent,
|
|
54
|
-
type: "boolean",
|
|
55
|
-
default: false,
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
id: VoxelStructIds.canHaveSecondary,
|
|
59
|
-
type: "boolean",
|
|
60
|
-
default: false,
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
id: VoxelStructIds.hardness,
|
|
64
|
-
type: "number",
|
|
65
|
-
numberType: BinaryNumberTypes.Uint32,
|
|
66
|
-
default: 0,
|
|
67
|
-
},
|
|
68
|
-
]);
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { BinaryStructData, InstantiatedStruct } from "@amodx/binary/";
|
|
2
|
-
import { SubstanceStructIds } from "../Types/VoxelSubstances.types.js";
|
|
3
|
-
export interface SubstanceStruct {
|
|
4
|
-
[key: string]: any;
|
|
5
|
-
[SubstanceStructIds.parent]: number;
|
|
6
|
-
[SubstanceStructIds.isSolid]: number;
|
|
7
|
-
[SubstanceStructIds.isTransparent]: number;
|
|
8
|
-
[SubstanceStructIds.isLiquid]: number;
|
|
9
|
-
[SubstanceStructIds.flowRate]: number;
|
|
10
|
-
[SubstanceStructIds.isWindAffected]: number;
|
|
11
|
-
}
|
|
12
|
-
export declare class SubstanceStruct extends InstantiatedStruct<SubstanceStruct> {
|
|
13
|
-
static instance: SubstanceStruct;
|
|
14
|
-
static init(data: BinaryStructData): void;
|
|
15
|
-
static setSubstance(id: string | number): void;
|
|
16
|
-
static initData: BinaryStructData;
|
|
17
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { RemoteBinaryStruct, InstantiatedStruct, } from "@amodx/binary/";
|
|
2
|
-
import { SubstanceStructIds } from "../Types/VoxelSubstances.types.js";
|
|
3
|
-
import { SubstancePalette } from "../Palettes/SubstancePalette.js";
|
|
4
|
-
const remote = new RemoteBinaryStruct("voxel-data");
|
|
5
|
-
export class SubstanceStruct extends InstantiatedStruct {
|
|
6
|
-
static instance;
|
|
7
|
-
static init(data) {
|
|
8
|
-
remote.init(data);
|
|
9
|
-
const instance = remote.instantiate();
|
|
10
|
-
this.initData = data;
|
|
11
|
-
SubstanceStruct.instance = instance;
|
|
12
|
-
}
|
|
13
|
-
static setSubstance(id) {
|
|
14
|
-
this.instance.setIndex(typeof id == "string" ? SubstancePalette.id.numberFromString(id) : id);
|
|
15
|
-
}
|
|
16
|
-
static initData;
|
|
17
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { BinaryStructData, InstantiatedStruct } from "@amodx/binary/";
|
|
2
|
-
import { VoxelStructIds } from "../Types/Voxel.types";
|
|
3
|
-
export interface VoxelStruct {
|
|
4
|
-
[key: string]: any;
|
|
5
|
-
[VoxelStructIds.substance]: number;
|
|
6
|
-
[VoxelStructIds.renderedMaterial]: number;
|
|
7
|
-
[VoxelStructIds.voxelMaterial]: number;
|
|
8
|
-
[VoxelStructIds.hardness]: number;
|
|
9
|
-
[VoxelStructIds.colliderID]: number;
|
|
10
|
-
[VoxelStructIds.checkCollisions]: number;
|
|
11
|
-
[VoxelStructIds.isLightSource]: number;
|
|
12
|
-
[VoxelStructIds.noAO]: number;
|
|
13
|
-
[VoxelStructIds.lightValue]: number;
|
|
14
|
-
[VoxelStructIds.isRich]: number;
|
|
15
|
-
[VoxelStructIds.canHaveSecondary]: number;
|
|
16
|
-
[VoxelStructIds.isTransparent]: number;
|
|
17
|
-
}
|
|
18
|
-
export declare class VoxelStruct extends InstantiatedStruct<VoxelStruct> {
|
|
19
|
-
static instance: VoxelStruct;
|
|
20
|
-
static init(data: BinaryStructData): void;
|
|
21
|
-
static clone(): InstantiatedStruct<VoxelStruct> & VoxelStruct;
|
|
22
|
-
static sync(voxelMap: Uint16Array): void;
|
|
23
|
-
static setVoxel(id: number): void;
|
|
24
|
-
static setStringVoxel(id: string): void;
|
|
25
|
-
static voxelIndex: Uint16Array;
|
|
26
|
-
static initData: BinaryStructData;
|
|
27
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { RemoteBinaryStruct, InstantiatedStruct, } from "@amodx/binary/";
|
|
2
|
-
import { VoxelStructIds } from "../Types/Voxel.types";
|
|
3
|
-
import { VoxelPalette } from "../Palettes/VoxelPalette";
|
|
4
|
-
const remote = new RemoteBinaryStruct("voxel-data");
|
|
5
|
-
export class VoxelStruct extends InstantiatedStruct {
|
|
6
|
-
static instance;
|
|
7
|
-
static init(data) {
|
|
8
|
-
remote.init(data);
|
|
9
|
-
const instance = remote.instantiate();
|
|
10
|
-
this.initData = data;
|
|
11
|
-
VoxelStruct.instance = instance;
|
|
12
|
-
}
|
|
13
|
-
static clone() {
|
|
14
|
-
return this.instance.createClone();
|
|
15
|
-
}
|
|
16
|
-
static sync(voxelMap) {
|
|
17
|
-
this.voxelIndex = voxelMap;
|
|
18
|
-
}
|
|
19
|
-
static setVoxel(id) {
|
|
20
|
-
const index = this.voxelIndex[id];
|
|
21
|
-
this.instance.setIndex(index);
|
|
22
|
-
}
|
|
23
|
-
static setStringVoxel(id) {
|
|
24
|
-
const index = this.voxelIndex[VoxelPalette.ids.getNumberId(id)];
|
|
25
|
-
this.instance.setIndex(index);
|
|
26
|
-
}
|
|
27
|
-
static voxelIndex = new Uint16Array();
|
|
28
|
-
static initData;
|
|
29
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Section } from "./Section";
|
|
2
|
-
export declare class SectionHeightMap {
|
|
3
|
-
private static _sectionState;
|
|
4
|
-
static setSection(section: Section): typeof SectionHeightMap;
|
|
5
|
-
static setVoxel(y: number, hasVoxel: boolean): void;
|
|
6
|
-
static getVoxel(y: number): boolean;
|
|
7
|
-
static setDirty(y: number, dirty: boolean): void;
|
|
8
|
-
static getDirty(y: number): boolean;
|
|
9
|
-
static getMinMax(): number[];
|
|
10
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { WorldSpaces } from "../WorldSpaces";
|
|
2
|
-
import { Section } from "./Section";
|
|
3
|
-
import { SectionStructProperties } from "./SectionStructProperties";
|
|
4
|
-
export class SectionHeightMap {
|
|
5
|
-
static _sectionState;
|
|
6
|
-
static setSection(section) {
|
|
7
|
-
if (!this._sectionState)
|
|
8
|
-
this._sectionState = Section.StateStruct.instantiate();
|
|
9
|
-
this._sectionState.setData(section.sectionState);
|
|
10
|
-
return this;
|
|
11
|
-
}
|
|
12
|
-
static setVoxel(y, hasVoxel) {
|
|
13
|
-
this._sectionState[SectionStructProperties.heightMap][y] = hasVoxel ? 1 : 0;
|
|
14
|
-
}
|
|
15
|
-
static getVoxel(y) {
|
|
16
|
-
return this._sectionState[SectionStructProperties.heightMap][y] == 1;
|
|
17
|
-
}
|
|
18
|
-
static setDirty(y, dirty) {
|
|
19
|
-
this._sectionState[SectionStructProperties.dirtyMap][y] = dirty ? 1 : 0;
|
|
20
|
-
}
|
|
21
|
-
static getDirty(y) {
|
|
22
|
-
return this._sectionState[SectionStructProperties.dirtyMap][y] == 1;
|
|
23
|
-
}
|
|
24
|
-
static getMinMax() {
|
|
25
|
-
let min = Infinity;
|
|
26
|
-
let max = -Infinity;
|
|
27
|
-
let i = WorldSpaces.section.bounds.y;
|
|
28
|
-
while (i--) {
|
|
29
|
-
if (this._sectionState[SectionStructProperties.heightMap][i] ||
|
|
30
|
-
this._sectionState[SectionStructProperties.dirtyMap][i]) {
|
|
31
|
-
if (i < min)
|
|
32
|
-
min = i;
|
|
33
|
-
if (i > max)
|
|
34
|
-
max = i;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return [min, max];
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SectionStructProperties } from "./SectionStructProperties.js";
|
|
2
|
-
export interface SectionStruct {
|
|
3
|
-
[SectionStructProperties.minHeight]: number;
|
|
4
|
-
[SectionStructProperties.maxHeight]: number;
|
|
5
|
-
[SectionStructProperties.heightMap]: number[];
|
|
6
|
-
[SectionStructProperties.dirtyMap]: number[];
|
|
7
|
-
}
|
|
8
|
-
export declare function InitalizeSectionTags(): void;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { BinaryNumberTypes, BinaryStruct } from "@amodx/binary/";
|
|
2
|
-
import { WorldSpaces } from "../WorldSpaces.js";
|
|
3
|
-
import { SectionStructProperties } from "./SectionStructProperties.js";
|
|
4
|
-
import { Section } from "./Section.js";
|
|
5
|
-
const SectionStateStruct = new BinaryStruct("section-tags");
|
|
6
|
-
SectionStateStruct.registerProperty({
|
|
7
|
-
id: SectionStructProperties.minHeight,
|
|
8
|
-
type: "typed-number",
|
|
9
|
-
numberType: BinaryNumberTypes.Uint8,
|
|
10
|
-
}, {
|
|
11
|
-
id: SectionStructProperties.maxHeight,
|
|
12
|
-
type: "typed-number",
|
|
13
|
-
numberType: BinaryNumberTypes.Uint8,
|
|
14
|
-
});
|
|
15
|
-
export function InitalizeSectionTags() {
|
|
16
|
-
SectionStateStruct.registerProperty({
|
|
17
|
-
id: SectionStructProperties.heightMap,
|
|
18
|
-
type: "bit-array",
|
|
19
|
-
length: WorldSpaces.section.bounds.y,
|
|
20
|
-
}, {
|
|
21
|
-
id: SectionStructProperties.dirtyMap,
|
|
22
|
-
type: "bit-array",
|
|
23
|
-
length: WorldSpaces.section.bounds.y,
|
|
24
|
-
});
|
|
25
|
-
const initData = SectionStateStruct.init({
|
|
26
|
-
indexBufferMode: "shared",
|
|
27
|
-
});
|
|
28
|
-
Section.StateStruct.init(initData);
|
|
29
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare enum SectionStructProperties {
|
|
2
|
-
minHeight = "dve_min_height",
|
|
3
|
-
maxHeight = "dve_max_height",
|
|
4
|
-
heightMap = "dve_height_map",
|
|
5
|
-
dirtyMap = "dve_dirty_map",
|
|
6
|
-
voxelIDSegment = "dve_voxel_id",
|
|
7
|
-
voxelLightSegment = "dve_voxel_light",
|
|
8
|
-
voxelStateSegment = "dve_voxel_state",
|
|
9
|
-
voxelSecondaryIDSegment = "dve_voxel_secondary_id"
|
|
10
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export var SectionStructProperties;
|
|
2
|
-
(function (SectionStructProperties) {
|
|
3
|
-
SectionStructProperties["minHeight"] = "dve_min_height";
|
|
4
|
-
SectionStructProperties["maxHeight"] = "dve_max_height";
|
|
5
|
-
SectionStructProperties["heightMap"] = "dve_height_map";
|
|
6
|
-
SectionStructProperties["dirtyMap"] = "dve_dirty_map";
|
|
7
|
-
SectionStructProperties["voxelIDSegment"] = "dve_voxel_id";
|
|
8
|
-
SectionStructProperties["voxelLightSegment"] = "dve_voxel_light";
|
|
9
|
-
SectionStructProperties["voxelStateSegment"] = "dve_voxel_state";
|
|
10
|
-
SectionStructProperties["voxelSecondaryIDSegment"] = "dve_voxel_secondary_id";
|
|
11
|
-
})(SectionStructProperties || (SectionStructProperties = {}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function InitalizeSectorTags(): void;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { BinaryNumberTypes, BinaryStruct } from "@amodx/binary/";
|
|
2
|
-
import { Sector } from "./Sector.js";
|
|
3
|
-
import { SectorStateStructIds } from "./SectorStructIds.js";
|
|
4
|
-
const SectorStateStruct = new BinaryStruct("sector-tags");
|
|
5
|
-
SectorStateStruct.registerProperty({
|
|
6
|
-
id: SectorStateStructIds.lastSaveTimestamp,
|
|
7
|
-
type: "typed-number",
|
|
8
|
-
numberType: BinaryNumberTypes.Uint32,
|
|
9
|
-
}, {
|
|
10
|
-
id: SectorStateStructIds.lastAnalyzerUpdateTimestamp,
|
|
11
|
-
type: "typed-number",
|
|
12
|
-
numberType: BinaryNumberTypes.Uint32,
|
|
13
|
-
}, {
|
|
14
|
-
id: SectorStateStructIds.hasRichData,
|
|
15
|
-
type: "boolean",
|
|
16
|
-
}, {
|
|
17
|
-
id: SectorStateStructIds.hasEntityData,
|
|
18
|
-
type: "boolean",
|
|
19
|
-
}, {
|
|
20
|
-
id: SectorStateStructIds.isStored,
|
|
21
|
-
type: "boolean",
|
|
22
|
-
}, {
|
|
23
|
-
id: SectorStateStructIds.isWorldGenDone,
|
|
24
|
-
type: "boolean",
|
|
25
|
-
}, {
|
|
26
|
-
id: SectorStateStructIds.isWorldDecorDone,
|
|
27
|
-
type: "boolean",
|
|
28
|
-
}, {
|
|
29
|
-
id: SectorStateStructIds.isWorldSunDone,
|
|
30
|
-
type: "boolean",
|
|
31
|
-
}, {
|
|
32
|
-
id: SectorStateStructIds.isWorldPropagationDone,
|
|
33
|
-
type: "boolean",
|
|
34
|
-
}, {
|
|
35
|
-
id: SectorStateStructIds.isDirty,
|
|
36
|
-
type: "boolean",
|
|
37
|
-
}, {
|
|
38
|
-
id: SectorStateStructIds.persistent,
|
|
39
|
-
type: "boolean",
|
|
40
|
-
});
|
|
41
|
-
export function InitalizeSectorTags() {
|
|
42
|
-
const initData = SectorStateStruct.init({
|
|
43
|
-
indexBufferMode: "shared",
|
|
44
|
-
});
|
|
45
|
-
Sector.StateStruct.init(initData);
|
|
46
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare enum SectorStateStructIds {
|
|
2
|
-
lastSaveTimestamp = "dve_last_save_timestamp",
|
|
3
|
-
lastAnalyzerUpdateTimestamp = "dve_last_analyzer_update_timestamp",
|
|
4
|
-
hasRichData = "dve_has_rich_data",
|
|
5
|
-
hasEntityData = "dve_has_entity_data",
|
|
6
|
-
isStored = "dve_is_stored",
|
|
7
|
-
isWorldGenDone = "dve_is_world_gen_done",
|
|
8
|
-
isWorldDecorDone = "dve_is_world_decor_done",
|
|
9
|
-
isWorldSunDone = "dve_is_world_sun_done",
|
|
10
|
-
isWorldPropagationDone = "dve_is_world_propagation_done",
|
|
11
|
-
isDirty = "dve_is_dirty",
|
|
12
|
-
persistent = "dve_persistent"
|
|
13
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export var SectorStateStructIds;
|
|
2
|
-
(function (SectorStateStructIds) {
|
|
3
|
-
SectorStateStructIds["lastSaveTimestamp"] = "dve_last_save_timestamp";
|
|
4
|
-
SectorStateStructIds["lastAnalyzerUpdateTimestamp"] = "dve_last_analyzer_update_timestamp";
|
|
5
|
-
SectorStateStructIds["hasRichData"] = "dve_has_rich_data";
|
|
6
|
-
SectorStateStructIds["hasEntityData"] = "dve_has_entity_data";
|
|
7
|
-
SectorStateStructIds["isStored"] = "dve_is_stored";
|
|
8
|
-
SectorStateStructIds["isWorldGenDone"] = "dve_is_world_gen_done";
|
|
9
|
-
SectorStateStructIds["isWorldDecorDone"] = "dve_is_world_decor_done";
|
|
10
|
-
SectorStateStructIds["isWorldSunDone"] = "dve_is_world_sun_done";
|
|
11
|
-
SectorStateStructIds["isWorldPropagationDone"] = "dve_is_world_propagation_done";
|
|
12
|
-
SectorStateStructIds["isDirty"] = "dve_is_dirty";
|
|
13
|
-
SectorStateStructIds["persistent"] = "dve_persistent";
|
|
14
|
-
})(SectorStateStructIds || (SectorStateStructIds = {}));
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export var WorldDataStructProperties;
|
|
2
|
-
(function (WorldDataStructProperties) {
|
|
3
|
-
WorldDataStructProperties["header"] = "dve_header";
|
|
4
|
-
WorldDataStructProperties["dataType"] = "dve_data_type";
|
|
5
|
-
WorldDataStructProperties["dimensionId"] = "dve_dimension_id";
|
|
6
|
-
WorldDataStructProperties["positionX"] = "dve_p_x";
|
|
7
|
-
WorldDataStructProperties["positionY"] = "dve_p_y";
|
|
8
|
-
WorldDataStructProperties["positionZ"] = "dve_p_z";
|
|
9
|
-
})(WorldDataStructProperties || (WorldDataStructProperties = {}));
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|