@divinevoxel/vlox 0.0.80 → 0.0.81
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/Builder/Tools/Brush/BrushTool.d.ts +12 -2
- package/Builder/Tools/Brush/BrushTool.js +53 -28
- package/Builder/Tools/Debug/DebugTool.d.ts +18 -0
- package/Builder/Tools/Debug/DebugTool.js +36 -0
- package/Builder/Tools/Path/PahtTool.d.ts +1 -1
- package/Builder/Tools/Path/PahtTool.js +1 -1
- package/Builder/Tools/Sculpt/SculptTool.js +8 -0
- package/Builder/Tools/Wrench/WrenchTool.js +10 -23
- package/Builder/Util/SurfaceBoxSelection.js +2 -0
- package/Builder/VoxelBuildSpace.js +3 -3
- package/Contexts/Base/Remote/InitDataSync.js +1 -1
- package/Math/UtilFunctions.js +7 -8
- package/Math/VoxelFaces.d.ts +2 -2
- package/Math/VoxelFaces.js +46 -55
- package/Math/WorldIndexing.d.ts +11 -0
- package/Math/WorldIndexing.js +34 -0
- package/Mesher/Geometry/Geometry.types.d.ts +2 -2
- package/Mesher/Geometry/Geometry.types.js +7 -20
- package/Mesher/Geometry/Primitives/QuadVertexData.js +118 -119
- package/Mesher/Geometry/Primitives/TriangleVertexData.js +89 -90
- package/Mesher/Geometry/Proto/ProtoMesh.d.ts +1 -1
- package/Mesher/Geometry/Proto/ProtoMesh.js +22 -29
- package/Mesher/Geometry/Proto/ProtoMeshBuffer.d.ts +4 -2
- package/Mesher/Geometry/Proto/ProtoMeshBuffer.js +14 -6
- package/Mesher/Geometry/Shapes/Box.js +6 -7
- package/Mesher/Geometry/Transform/TransformBox.js +8 -9
- package/Mesher/Geometry/Transform/TransformQuad.js +4 -5
- package/Mesher/Geometry/Transform/TransformTriangle.js +3 -4
- package/Mesher/InitMesher.js +4 -9
- package/Mesher/Items/Geometry/ItemGeometryBuilder.js +7 -8
- package/Mesher/Items/MeshTexture.js +125 -57
- package/Mesher/Voxels/Base/BuildVoxel.d.ts +6 -0
- package/Mesher/Voxels/Base/BuildVoxel.js +101 -0
- package/Mesher/Voxels/Base/CompactVoxelSectionMesh.js +1 -21
- package/Mesher/Voxels/Base/MeshSectionBase.js +3 -26
- package/Mesher/Voxels/Geometry/VoxelGeometryBuilder.js +33 -31
- package/Mesher/Voxels/Geometry/VoxelShaderData.js +3 -7
- package/Mesher/Voxels/MeshTemplate.js +6 -26
- package/Mesher/Voxels/MeshVoxel.js +5 -10
- package/Mesher/Voxels/Models/Common/Calc/CalcConstants.js +41 -42
- package/Mesher/Voxels/Models/Common/Calc/FaceDataCalc.js +6 -9
- package/Mesher/Voxels/Models/Common/Faces/CullRulledFace.js +64 -47
- package/Mesher/Voxels/Models/Common/Faces/ShadeRulledFace.js +57 -43
- package/Mesher/Voxels/Models/Nodes/Custom/Liquid/FlowGradient.js +4 -5
- package/Mesher/Voxels/Models/Nodes/Custom/Liquid/LiquidGeometryNode.d.ts +1 -1
- package/Mesher/Voxels/Models/Nodes/Custom/Liquid/LiquidGeometryNode.js +116 -118
- package/Mesher/Voxels/Models/Nodes/Default/QuadVoxelGeometryNode.js +4 -4
- package/Mesher/Voxels/Models/Nodes/VoxelGeometryConstructor.js +2 -2
- package/Mesher/Voxels/Models/Procedures/Default/OutlinedTextureProcedure.js +19 -21
- package/Mesher/Voxels/Models/Procedures/Default/PillarTextureProcedure.js +45 -38
- package/Mesher/Voxels/Models/RenderedMaterials.d.ts +1 -1
- package/Mesher/Voxels/Models/RenderedMaterials.js +8 -5
- package/Mesher/Voxels/Models/VoxelGeometryBuilderCacheSpace.d.ts +18 -4
- package/Mesher/Voxels/Models/VoxelGeometryBuilderCacheSpace.js +135 -22
- package/Mesher/Voxels/Models/VoxelGeometryBuilderCacheSpaceN.d.ts +33 -0
- package/Mesher/Voxels/Models/VoxelGeometryBuilderCacheSpaceN.js +204 -0
- package/Mesher/Voxels/Models/{VoxelModelConstructorRegister.d.ts → VoxelGeometryConstructorRegister.d.ts} +1 -6
- package/Mesher/Voxels/Models/VoxelGeometryConstructorRegister.js +20 -0
- package/Mesher/Voxels/Models/VoxelModelBuilder.js +15 -16
- package/Mesher/Voxels/Models/VoxelModelEffect.d.ts +1 -3
- package/Mesher/Voxels/Models/VoxelModelEffect.js +1 -3
- package/Renderer/DVERenderNode.types.d.ts +1 -0
- package/Renderer/InitTasks.js +2 -0
- package/Tasks/Paint/Erase/EraseVoxel.js +1 -1
- package/Tasks/Propagation/Illumanation/RGBUpdate.js +191 -48
- package/Tasks/Propagation/Illumanation/SunUpdate.d.ts +1 -1
- package/Tasks/Propagation/Illumanation/SunUpdate.js +167 -63
- package/Tasks/Propagation/Illumanation/WorldSun.js +96 -60
- package/Tasks/WorldGeneration/WorldGenBrush.d.ts +2 -0
- package/Tasks/WorldGeneration/WorldGenBrush.js +31 -0
- package/Templates/Archive/ArchivedVoxelTemplate.js +1 -1
- package/Templates/Archive/Functions/CreateArchivedTemplate.js +1 -1
- package/Templates/Archive/Functions/CreateArchivedTemplateFromFull.d.ts +6 -0
- package/Templates/Archive/Functions/CreateArchivedTemplateFromFull.js +174 -0
- package/Textures/Classes/CompactedTextureReader.d.ts +22 -0
- package/Textures/Classes/CompactedTextureReader.js +90 -0
- package/Textures/Classes/CompiledTexture.d.ts +4 -1
- package/Textures/Classes/CompiledTexture.js +36 -8
- package/Textures/Classes/TextureAtlasIndex.d.ts +7 -0
- package/Textures/Classes/TextureAtlasIndex.js +14 -0
- package/Textures/Classes/TextureLoader.d.ts +20 -0
- package/Textures/Classes/TextureLoader.js +95 -0
- package/Textures/Functions/BuildTextureData.d.ts +1 -1
- package/Textures/Functions/BuildTextureData.js +19 -122
- package/Textures/Functions/CreateCompactedTexture.d.ts +6 -0
- package/Textures/Functions/CreateCompactedTexture.js +105 -0
- package/Textures/Functions/ReadCompactedTexture.d.ts +2 -0
- package/Textures/Functions/ReadCompactedTexture.js +42 -0
- package/Textures/Texture.types.d.ts +14 -0
- package/Textures/TextureManager.d.ts +7 -1
- package/Textures/TextureManager.js +13 -0
- package/Tools/Brush/Brush.d.ts +4 -2
- package/Tools/Brush/Brush.js +28 -6
- package/Util/BinaryBuffer/Functions/BinaryBufferConvert.d.ts +1 -1
- package/Util/TickInterval.d.ts +3 -0
- package/Util/TickInterval.js +31 -3
- package/Voxels/Archive/VoxelPaletteArchiveReader.d.ts +1 -0
- package/Voxels/Archive/VoxelPaletteArchiveReader.js +9 -10
- package/Voxels/Archive/VoxelPaletteArechive.js +5 -4
- package/Voxels/Cursor/VoxelCursor.interface.d.ts +1 -1
- package/Voxels/Cursor/VoxelCursor.interface.js +22 -16
- package/Voxels/Data/VoxelLUT.d.ts +69 -42
- package/Voxels/Data/VoxelLUT.js +110 -53
- package/Voxels/Functions/BuildLUTs.js +100 -45
- package/Voxels/Functions/Geometry/CalcFunctions.js +6 -7
- package/Voxels/Functions/Geometry/Inputs/BuildTriangleInputs.js +3 -0
- package/Voxels/Indexes/VoxelIndex.js +3 -1
- package/Voxels/InitVoxelData.js +3 -1
- package/Voxels/Interaction/Functions/PickVoxel.js +3 -5
- package/Voxels/Interaction/Functions/PickVoxelWorld.js +4 -6
- package/Voxels/Models/Defaults/Examples.d.ts +2 -0
- package/Voxels/Models/Defaults/Examples.js +151 -2
- package/Voxels/State/Reltional/ReltionalStateBuilder.js +2 -0
- package/Voxels/State/Schema/BinarySchema.d.ts +1 -0
- package/Voxels/State/Schema/BinarySchema.js +14 -0
- package/Voxels/State/VoxelSchemas.d.ts +11 -4
- package/Voxels/State/VoxelSchemas.js +42 -9
- package/Voxels/Types/PaintVoxelData.js +6 -2
- package/World/Archive/Classes/ImportedSection.js +1 -1
- package/World/Archive/Classes/ImportedSector.js +0 -1
- package/World/Archive/Functions/Sector/ArchiveSector.js +2 -2
- package/World/Archive/Functions/Sector/ImportSector.d.ts +1 -0
- package/World/Archive/Functions/Sector/ImportSector.js +183 -7
- package/World/Cursor/SectorCursor.js +1 -4
- package/World/Cursor/WorldCursor.d.ts +12 -3
- package/World/Cursor/WorldCursor.js +60 -30
- package/World/InitTasks.js +1 -1
- package/World/Lock/Function/LockSectors.js +5 -1
- package/World/Lock/Function/UnLockSectors.js +5 -1
- package/World/SnapShot/SectionSnapShot.d.ts +7 -3
- package/World/SnapShot/SectionSnapShot.js +47 -21
- package/World/SnapShot/SectionSnapShotCursor.d.ts +4 -2
- package/World/SnapShot/SectionSnapShotCursor.js +23 -11
- package/World/SnapShot/SnapShots.d.ts +1 -2
- package/World/SnapShot/SnapShots.js +3 -3
- package/World/WorldSpaces.d.ts +7 -0
- package/World/WorldSpaces.js +35 -13
- package/WorldSimulation/Dimensions/DimensionSegment.d.ts +2 -0
- package/WorldSimulation/Dimensions/DimensionSegment.js +9 -1
- package/WorldSimulation/Dimensions/DimensionSimulation.js +6 -7
- package/WorldSimulation/Dimensions/Generator.d.ts +4 -0
- package/WorldSimulation/Dimensions/Generator.js +15 -1
- package/WorldSimulation/Dimensions/SimulationSector.d.ts +1 -0
- package/WorldSimulation/Dimensions/SimulationSector.js +18 -0
- package/WorldSimulation/Internal/WorldSimulationTasks.js +11 -7
- package/WorldSimulation/Procedures/InitalLoad.d.ts +1 -0
- package/WorldSimulation/Procedures/InitalLoad.js +18 -8
- package/WorldSimulation/Tasks/SimulationTaskBase.d.ts +4 -1
- package/WorldSimulation/Tasks/SimulationTaskBase.js +13 -2
- package/WorldSimulation/Tasks/TaskSegment.d.ts +4 -2
- package/WorldSimulation/Tasks/TaskSegment.js +36 -22
- package/WorldSimulation/Voxels/Ticks/Types/LiquidVoxelUpdate.js +1 -2
- package/WorldSimulation/WorldSimulation.d.ts +6 -3
- package/WorldSimulation/WorldSimulation.js +44 -20
- package/package.json +1 -1
- package/Mesher/Items/MeshTextureO.d.ts +0 -1
- package/Mesher/Items/MeshTextureO.js +0 -277
- package/Mesher/Voxels/Models/VoxelConstructor.d.ts +0 -8
- package/Mesher/Voxels/Models/VoxelConstructor.js +0 -78
- package/Mesher/Voxels/Models/VoxelModelConstructorRegister.js +0 -37
- package/WorldSimulation/Procedures/BuildOnly.d.ts +0 -10
- package/WorldSimulation/Procedures/BuildOnly.js +0 -55
|
@@ -1,24 +1,11 @@
|
|
|
1
|
-
export var QuadVerticies;
|
|
2
|
-
(function (QuadVerticies) {
|
|
3
|
-
QuadVerticies[QuadVerticies["TopRight"] = 0] = "TopRight";
|
|
4
|
-
QuadVerticies[QuadVerticies["TopLeft"] = 1] = "TopLeft";
|
|
5
|
-
QuadVerticies[QuadVerticies["BottomLeft"] = 2] = "BottomLeft";
|
|
6
|
-
QuadVerticies[QuadVerticies["BottomRight"] = 3] = "BottomRight";
|
|
7
|
-
})(QuadVerticies || (QuadVerticies = {}));
|
|
8
1
|
export const QuadVerticiesArray = [
|
|
9
|
-
QuadVerticies.TopRight
|
|
10
|
-
QuadVerticies.TopLeft
|
|
11
|
-
QuadVerticies.BottomLeft
|
|
12
|
-
QuadVerticies.BottomRight
|
|
2
|
+
0 /* QuadVerticies.TopRight */,
|
|
3
|
+
1 /* QuadVerticies.TopLeft */,
|
|
4
|
+
2 /* QuadVerticies.BottomLeft */,
|
|
5
|
+
3 /* QuadVerticies.BottomRight */,
|
|
13
6
|
];
|
|
14
|
-
export var TriangleVerticies;
|
|
15
|
-
(function (TriangleVerticies) {
|
|
16
|
-
TriangleVerticies[TriangleVerticies["One"] = 0] = "One";
|
|
17
|
-
TriangleVerticies[TriangleVerticies["Two"] = 1] = "Two";
|
|
18
|
-
TriangleVerticies[TriangleVerticies["Three"] = 2] = "Three";
|
|
19
|
-
})(TriangleVerticies || (TriangleVerticies = {}));
|
|
20
7
|
export const TriangleVerticiesArray = [
|
|
21
|
-
TriangleVerticies.One
|
|
22
|
-
TriangleVerticies.Two
|
|
23
|
-
TriangleVerticies.Three
|
|
8
|
+
0 /* TriangleVerticies.One */,
|
|
9
|
+
1 /* TriangleVerticies.Two */,
|
|
10
|
+
2 /* TriangleVerticies.Three */,
|
|
24
11
|
];
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { QuadVerticies } from "../Geometry.types.js";
|
|
2
1
|
import { Vector3Like, Vector2Like } from "@amodx/math";
|
|
3
2
|
export class QuadVertexData {
|
|
4
3
|
vertices;
|
|
@@ -7,10 +6,10 @@ export class QuadVertexData {
|
|
|
7
6
|
}
|
|
8
7
|
toArray() {
|
|
9
8
|
return [
|
|
10
|
-
this.vertices[QuadVerticies.TopRight],
|
|
11
|
-
this.vertices[QuadVerticies.TopLeft],
|
|
12
|
-
this.vertices[QuadVerticies.BottomLeft],
|
|
13
|
-
this.vertices[QuadVerticies.BottomRight],
|
|
9
|
+
this.vertices[0 /* QuadVerticies.TopRight */],
|
|
10
|
+
this.vertices[1 /* QuadVerticies.TopLeft */],
|
|
11
|
+
this.vertices[2 /* QuadVerticies.BottomLeft */],
|
|
12
|
+
this.vertices[3 /* QuadVerticies.BottomRight */],
|
|
14
13
|
];
|
|
15
14
|
}
|
|
16
15
|
setVertex(vertex, value) {
|
|
@@ -20,45 +19,45 @@ export class QuadVertexData {
|
|
|
20
19
|
return this.vertices[vertex];
|
|
21
20
|
}
|
|
22
21
|
setAll(value) {
|
|
23
|
-
this.vertices[QuadVerticies.TopRight] = value;
|
|
24
|
-
this.vertices[QuadVerticies.TopLeft] = value;
|
|
25
|
-
this.vertices[QuadVerticies.BottomLeft] = value;
|
|
26
|
-
this.vertices[QuadVerticies.BottomRight] = value;
|
|
22
|
+
this.vertices[0 /* QuadVerticies.TopRight */] = value;
|
|
23
|
+
this.vertices[1 /* QuadVerticies.TopLeft */] = value;
|
|
24
|
+
this.vertices[2 /* QuadVerticies.BottomLeft */] = value;
|
|
25
|
+
this.vertices[3 /* QuadVerticies.BottomRight */] = value;
|
|
27
26
|
}
|
|
28
27
|
set(v1, v2, v3, v4) {
|
|
29
|
-
this.vertices[QuadVerticies.TopRight] = v1;
|
|
30
|
-
this.vertices[QuadVerticies.TopLeft] = v2;
|
|
31
|
-
this.vertices[QuadVerticies.BottomLeft] = v3;
|
|
32
|
-
this.vertices[QuadVerticies.BottomRight] = v4;
|
|
28
|
+
this.vertices[0 /* QuadVerticies.TopRight */] = v1;
|
|
29
|
+
this.vertices[1 /* QuadVerticies.TopLeft */] = v2;
|
|
30
|
+
this.vertices[2 /* QuadVerticies.BottomLeft */] = v3;
|
|
31
|
+
this.vertices[3 /* QuadVerticies.BottomRight */] = v4;
|
|
33
32
|
}
|
|
34
33
|
isEqualTo(v1, v2, v3, v4) {
|
|
35
|
-
if (this.vertices[QuadVerticies.TopRight] != v1)
|
|
34
|
+
if (this.vertices[0 /* QuadVerticies.TopRight */] != v1)
|
|
36
35
|
return false;
|
|
37
|
-
if (this.vertices[QuadVerticies.TopLeft] != v2)
|
|
36
|
+
if (this.vertices[1 /* QuadVerticies.TopLeft */] != v2)
|
|
38
37
|
return false;
|
|
39
|
-
if (this.vertices[QuadVerticies.BottomLeft] != v3)
|
|
38
|
+
if (this.vertices[2 /* QuadVerticies.BottomLeft */] != v3)
|
|
40
39
|
return false;
|
|
41
|
-
if (this.vertices[QuadVerticies.BottomRight] != v4)
|
|
40
|
+
if (this.vertices[3 /* QuadVerticies.BottomRight */] != v4)
|
|
42
41
|
return false;
|
|
43
42
|
return true;
|
|
44
43
|
}
|
|
45
44
|
isAllEqualTo(value) {
|
|
46
|
-
if (this.vertices[QuadVerticies.TopRight] != value)
|
|
45
|
+
if (this.vertices[0 /* QuadVerticies.TopRight */] != value)
|
|
47
46
|
return false;
|
|
48
|
-
if (this.vertices[QuadVerticies.TopLeft] != value)
|
|
47
|
+
if (this.vertices[1 /* QuadVerticies.TopLeft */] != value)
|
|
49
48
|
return false;
|
|
50
|
-
if (this.vertices[QuadVerticies.BottomLeft] != value)
|
|
49
|
+
if (this.vertices[2 /* QuadVerticies.BottomLeft */] != value)
|
|
51
50
|
return false;
|
|
52
|
-
if (this.vertices[QuadVerticies.BottomRight] != value)
|
|
51
|
+
if (this.vertices[3 /* QuadVerticies.BottomRight */] != value)
|
|
53
52
|
return false;
|
|
54
53
|
return true;
|
|
55
54
|
}
|
|
56
55
|
[Symbol.iterator]() {
|
|
57
|
-
let index = QuadVerticies.TopRight
|
|
56
|
+
let index = 0 /* QuadVerticies.TopRight */;
|
|
58
57
|
const items = this.vertices;
|
|
59
58
|
return {
|
|
60
59
|
next() {
|
|
61
|
-
if (index < QuadVerticies.BottomRight) {
|
|
60
|
+
if (index < 3 /* QuadVerticies.BottomRight */) {
|
|
62
61
|
return { value: items[index++], done: false };
|
|
63
62
|
}
|
|
64
63
|
else {
|
|
@@ -69,10 +68,10 @@ export class QuadVertexData {
|
|
|
69
68
|
}
|
|
70
69
|
clone() {
|
|
71
70
|
return new QuadVertexData([
|
|
72
|
-
structuredClone(this.vertices[QuadVerticies.TopRight]),
|
|
73
|
-
structuredClone(this.vertices[QuadVerticies.TopLeft]),
|
|
74
|
-
structuredClone(this.vertices[QuadVerticies.BottomLeft]),
|
|
75
|
-
structuredClone(this.vertices[QuadVerticies.BottomRight]),
|
|
71
|
+
structuredClone(this.vertices[0 /* QuadVerticies.TopRight */]),
|
|
72
|
+
structuredClone(this.vertices[1 /* QuadVerticies.TopLeft */]),
|
|
73
|
+
structuredClone(this.vertices[2 /* QuadVerticies.BottomLeft */]),
|
|
74
|
+
structuredClone(this.vertices[3 /* QuadVerticies.BottomRight */]),
|
|
76
75
|
]);
|
|
77
76
|
}
|
|
78
77
|
}
|
|
@@ -88,10 +87,10 @@ export class QuadVector3VertexData extends QuadVertexData {
|
|
|
88
87
|
this.vertices = vertices;
|
|
89
88
|
}
|
|
90
89
|
setFromQuadData(vertexData) {
|
|
91
|
-
Vector3Like.Copy(this.vertices[QuadVerticies.TopRight], vertexData.vertices[QuadVerticies.TopRight]);
|
|
92
|
-
Vector3Like.Copy(this.vertices[QuadVerticies.TopLeft], vertexData.vertices[QuadVerticies.TopLeft]);
|
|
93
|
-
Vector3Like.Copy(this.vertices[QuadVerticies.BottomLeft], vertexData.vertices[QuadVerticies.BottomLeft]);
|
|
94
|
-
Vector3Like.Copy(this.vertices[QuadVerticies.BottomRight], vertexData.vertices[QuadVerticies.BottomRight]);
|
|
90
|
+
Vector3Like.Copy(this.vertices[0 /* QuadVerticies.TopRight */], vertexData.vertices[0 /* QuadVerticies.TopRight */]);
|
|
91
|
+
Vector3Like.Copy(this.vertices[1 /* QuadVerticies.TopLeft */], vertexData.vertices[1 /* QuadVerticies.TopLeft */]);
|
|
92
|
+
Vector3Like.Copy(this.vertices[2 /* QuadVerticies.BottomLeft */], vertexData.vertices[2 /* QuadVerticies.BottomLeft */]);
|
|
93
|
+
Vector3Like.Copy(this.vertices[3 /* QuadVerticies.BottomRight */], vertexData.vertices[3 /* QuadVerticies.BottomRight */]);
|
|
95
94
|
}
|
|
96
95
|
addToVertex(vertex, value) {
|
|
97
96
|
Vector3Like.AddInPlace(this.vertices[vertex], value);
|
|
@@ -100,35 +99,35 @@ export class QuadVector3VertexData extends QuadVertexData {
|
|
|
100
99
|
Vector3Like.SubtractInPlace(this.vertices[vertex], value);
|
|
101
100
|
}
|
|
102
101
|
addAll(value) {
|
|
103
|
-
this.addToVertex(QuadVerticies.TopRight
|
|
104
|
-
this.addToVertex(QuadVerticies.TopLeft
|
|
105
|
-
this.addToVertex(QuadVerticies.BottomLeft
|
|
106
|
-
this.addToVertex(QuadVerticies.BottomRight
|
|
102
|
+
this.addToVertex(0 /* QuadVerticies.TopRight */, value);
|
|
103
|
+
this.addToVertex(1 /* QuadVerticies.TopLeft */, value);
|
|
104
|
+
this.addToVertex(2 /* QuadVerticies.BottomLeft */, value);
|
|
105
|
+
this.addToVertex(3 /* QuadVerticies.BottomRight */, value);
|
|
107
106
|
}
|
|
108
107
|
subtractAll(value) {
|
|
109
|
-
this.subtractFromVertex(QuadVerticies.TopRight
|
|
110
|
-
this.subtractFromVertex(QuadVerticies.TopLeft
|
|
111
|
-
this.subtractFromVertex(QuadVerticies.BottomLeft
|
|
112
|
-
this.subtractFromVertex(QuadVerticies.BottomRight
|
|
108
|
+
this.subtractFromVertex(0 /* QuadVerticies.TopRight */, value);
|
|
109
|
+
this.subtractFromVertex(1 /* QuadVerticies.TopLeft */, value);
|
|
110
|
+
this.subtractFromVertex(2 /* QuadVerticies.BottomLeft */, value);
|
|
111
|
+
this.subtractFromVertex(3 /* QuadVerticies.BottomRight */, value);
|
|
113
112
|
}
|
|
114
113
|
isEqualTo(v1, v2, v3, v4) {
|
|
115
|
-
return (Vector3Like.Equals(this.vertices[QuadVerticies.TopRight], v1) &&
|
|
116
|
-
Vector3Like.Equals(this.vertices[QuadVerticies.TopLeft], v2) &&
|
|
117
|
-
Vector3Like.Equals(this.vertices[QuadVerticies.BottomLeft], v3) &&
|
|
118
|
-
Vector3Like.Equals(this.vertices[QuadVerticies.BottomRight], v4));
|
|
114
|
+
return (Vector3Like.Equals(this.vertices[0 /* QuadVerticies.TopRight */], v1) &&
|
|
115
|
+
Vector3Like.Equals(this.vertices[1 /* QuadVerticies.TopLeft */], v2) &&
|
|
116
|
+
Vector3Like.Equals(this.vertices[2 /* QuadVerticies.BottomLeft */], v3) &&
|
|
117
|
+
Vector3Like.Equals(this.vertices[3 /* QuadVerticies.BottomRight */], v4));
|
|
119
118
|
}
|
|
120
119
|
isAllEqualTo(v1) {
|
|
121
|
-
return (Vector3Like.Equals(this.vertices[QuadVerticies.TopRight], v1) &&
|
|
122
|
-
Vector3Like.Equals(this.vertices[QuadVerticies.TopLeft], v1) &&
|
|
123
|
-
Vector3Like.Equals(this.vertices[QuadVerticies.BottomLeft], v1) &&
|
|
124
|
-
Vector3Like.Equals(this.vertices[QuadVerticies.BottomRight], v1));
|
|
120
|
+
return (Vector3Like.Equals(this.vertices[0 /* QuadVerticies.TopRight */], v1) &&
|
|
121
|
+
Vector3Like.Equals(this.vertices[1 /* QuadVerticies.TopLeft */], v1) &&
|
|
122
|
+
Vector3Like.Equals(this.vertices[2 /* QuadVerticies.BottomLeft */], v1) &&
|
|
123
|
+
Vector3Like.Equals(this.vertices[3 /* QuadVerticies.BottomRight */], v1));
|
|
125
124
|
}
|
|
126
125
|
clone() {
|
|
127
126
|
return new QuadVector3VertexData([
|
|
128
|
-
Vector3Like.Clone(this.vertices[QuadVerticies.TopRight]),
|
|
129
|
-
Vector3Like.Clone(this.vertices[QuadVerticies.TopLeft]),
|
|
130
|
-
Vector3Like.Clone(this.vertices[QuadVerticies.BottomLeft]),
|
|
131
|
-
Vector3Like.Clone(this.vertices[QuadVerticies.BottomRight]),
|
|
127
|
+
Vector3Like.Clone(this.vertices[0 /* QuadVerticies.TopRight */]),
|
|
128
|
+
Vector3Like.Clone(this.vertices[1 /* QuadVerticies.TopLeft */]),
|
|
129
|
+
Vector3Like.Clone(this.vertices[2 /* QuadVerticies.BottomLeft */]),
|
|
130
|
+
Vector3Like.Clone(this.vertices[3 /* QuadVerticies.BottomRight */]),
|
|
132
131
|
]);
|
|
133
132
|
}
|
|
134
133
|
toVec3Array() {
|
|
@@ -152,10 +151,10 @@ export class QuadVector2VertexData extends QuadVertexData {
|
|
|
152
151
|
this.vertices = vertices;
|
|
153
152
|
}
|
|
154
153
|
setFromQuadData(vertexData) {
|
|
155
|
-
Vector2Like.Copy(this.vertices[QuadVerticies.TopRight], vertexData.vertices[QuadVerticies.TopRight]);
|
|
156
|
-
Vector2Like.Copy(this.vertices[QuadVerticies.TopLeft], vertexData.vertices[QuadVerticies.TopLeft]);
|
|
157
|
-
Vector2Like.Copy(this.vertices[QuadVerticies.BottomLeft], vertexData.vertices[QuadVerticies.BottomLeft]);
|
|
158
|
-
Vector2Like.Copy(this.vertices[QuadVerticies.BottomRight], vertexData.vertices[QuadVerticies.BottomRight]);
|
|
154
|
+
Vector2Like.Copy(this.vertices[0 /* QuadVerticies.TopRight */], vertexData.vertices[0 /* QuadVerticies.TopRight */]);
|
|
155
|
+
Vector2Like.Copy(this.vertices[1 /* QuadVerticies.TopLeft */], vertexData.vertices[1 /* QuadVerticies.TopLeft */]);
|
|
156
|
+
Vector2Like.Copy(this.vertices[2 /* QuadVerticies.BottomLeft */], vertexData.vertices[2 /* QuadVerticies.BottomLeft */]);
|
|
157
|
+
Vector2Like.Copy(this.vertices[3 /* QuadVerticies.BottomRight */], vertexData.vertices[3 /* QuadVerticies.BottomRight */]);
|
|
159
158
|
}
|
|
160
159
|
addToVertex(vertex, value) {
|
|
161
160
|
Vector2Like.AddInPlace(this.vertices[vertex], value);
|
|
@@ -164,28 +163,28 @@ export class QuadVector2VertexData extends QuadVertexData {
|
|
|
164
163
|
Vector2Like.SubtractInPlace(this.vertices[vertex], value);
|
|
165
164
|
}
|
|
166
165
|
addAll(value) {
|
|
167
|
-
this.addToVertex(QuadVerticies.TopRight
|
|
168
|
-
this.addToVertex(QuadVerticies.TopLeft
|
|
169
|
-
this.addToVertex(QuadVerticies.BottomLeft
|
|
170
|
-
this.addToVertex(QuadVerticies.BottomRight
|
|
166
|
+
this.addToVertex(0 /* QuadVerticies.TopRight */, value);
|
|
167
|
+
this.addToVertex(1 /* QuadVerticies.TopLeft */, value);
|
|
168
|
+
this.addToVertex(2 /* QuadVerticies.BottomLeft */, value);
|
|
169
|
+
this.addToVertex(3 /* QuadVerticies.BottomRight */, value);
|
|
171
170
|
}
|
|
172
171
|
subtractAll(value) {
|
|
173
|
-
this.subtractFromVertex(QuadVerticies.TopRight
|
|
174
|
-
this.subtractFromVertex(QuadVerticies.TopLeft
|
|
175
|
-
this.subtractFromVertex(QuadVerticies.BottomLeft
|
|
176
|
-
this.subtractFromVertex(QuadVerticies.BottomRight
|
|
172
|
+
this.subtractFromVertex(0 /* QuadVerticies.TopRight */, value);
|
|
173
|
+
this.subtractFromVertex(1 /* QuadVerticies.TopLeft */, value);
|
|
174
|
+
this.subtractFromVertex(2 /* QuadVerticies.BottomLeft */, value);
|
|
175
|
+
this.subtractFromVertex(3 /* QuadVerticies.BottomRight */, value);
|
|
177
176
|
}
|
|
178
177
|
isEqualTo(v1, v2, v3, v4) {
|
|
179
|
-
return (Vector2Like.Equals(this.vertices[QuadVerticies.TopRight], v1) &&
|
|
180
|
-
Vector2Like.Equals(this.vertices[QuadVerticies.TopLeft], v2) &&
|
|
181
|
-
Vector2Like.Equals(this.vertices[QuadVerticies.BottomLeft], v3) &&
|
|
182
|
-
Vector2Like.Equals(this.vertices[QuadVerticies.BottomRight], v4));
|
|
178
|
+
return (Vector2Like.Equals(this.vertices[0 /* QuadVerticies.TopRight */], v1) &&
|
|
179
|
+
Vector2Like.Equals(this.vertices[1 /* QuadVerticies.TopLeft */], v2) &&
|
|
180
|
+
Vector2Like.Equals(this.vertices[2 /* QuadVerticies.BottomLeft */], v3) &&
|
|
181
|
+
Vector2Like.Equals(this.vertices[3 /* QuadVerticies.BottomRight */], v4));
|
|
183
182
|
}
|
|
184
183
|
isAllEqualTo(v1) {
|
|
185
|
-
return (Vector2Like.Equals(this.vertices[QuadVerticies.TopRight], v1) &&
|
|
186
|
-
Vector2Like.Equals(this.vertices[QuadVerticies.TopLeft], v1) &&
|
|
187
|
-
Vector2Like.Equals(this.vertices[QuadVerticies.BottomLeft], v1) &&
|
|
188
|
-
Vector2Like.Equals(this.vertices[QuadVerticies.BottomRight], v1));
|
|
184
|
+
return (Vector2Like.Equals(this.vertices[0 /* QuadVerticies.TopRight */], v1) &&
|
|
185
|
+
Vector2Like.Equals(this.vertices[1 /* QuadVerticies.TopLeft */], v1) &&
|
|
186
|
+
Vector2Like.Equals(this.vertices[2 /* QuadVerticies.BottomLeft */], v1) &&
|
|
187
|
+
Vector2Like.Equals(this.vertices[3 /* QuadVerticies.BottomRight */], v1));
|
|
189
188
|
}
|
|
190
189
|
toVec2Array() {
|
|
191
190
|
return [
|
|
@@ -197,10 +196,10 @@ export class QuadVector2VertexData extends QuadVertexData {
|
|
|
197
196
|
}
|
|
198
197
|
clone() {
|
|
199
198
|
return new QuadVector2VertexData([
|
|
200
|
-
Vector2Like.Clone(this.vertices[QuadVerticies.TopRight]),
|
|
201
|
-
Vector2Like.Clone(this.vertices[QuadVerticies.TopLeft]),
|
|
202
|
-
Vector2Like.Clone(this.vertices[QuadVerticies.BottomLeft]),
|
|
203
|
-
Vector2Like.Clone(this.vertices[QuadVerticies.BottomRight]),
|
|
199
|
+
Vector2Like.Clone(this.vertices[0 /* QuadVerticies.TopRight */]),
|
|
200
|
+
Vector2Like.Clone(this.vertices[1 /* QuadVerticies.TopLeft */]),
|
|
201
|
+
Vector2Like.Clone(this.vertices[2 /* QuadVerticies.BottomLeft */]),
|
|
202
|
+
Vector2Like.Clone(this.vertices[3 /* QuadVerticies.BottomRight */]),
|
|
204
203
|
]);
|
|
205
204
|
}
|
|
206
205
|
}
|
|
@@ -211,92 +210,92 @@ export class QuadScalarVertexData extends QuadVertexData {
|
|
|
211
210
|
this.vertices = vertices;
|
|
212
211
|
}
|
|
213
212
|
setFromQuadData(vertexData) {
|
|
214
|
-
this.vertices[QuadVerticies.TopRight] =
|
|
215
|
-
vertexData.vertices[QuadVerticies.TopRight];
|
|
216
|
-
this.vertices[QuadVerticies.TopLeft] =
|
|
217
|
-
vertexData.vertices[QuadVerticies.TopLeft];
|
|
218
|
-
this.vertices[QuadVerticies.BottomLeft] =
|
|
219
|
-
vertexData.vertices[QuadVerticies.BottomLeft];
|
|
220
|
-
this.vertices[QuadVerticies.BottomRight] =
|
|
221
|
-
vertexData.vertices[QuadVerticies.BottomRight];
|
|
213
|
+
this.vertices[0 /* QuadVerticies.TopRight */] =
|
|
214
|
+
vertexData.vertices[0 /* QuadVerticies.TopRight */];
|
|
215
|
+
this.vertices[1 /* QuadVerticies.TopLeft */] =
|
|
216
|
+
vertexData.vertices[1 /* QuadVerticies.TopLeft */];
|
|
217
|
+
this.vertices[2 /* QuadVerticies.BottomLeft */] =
|
|
218
|
+
vertexData.vertices[2 /* QuadVerticies.BottomLeft */];
|
|
219
|
+
this.vertices[3 /* QuadVerticies.BottomRight */] =
|
|
220
|
+
vertexData.vertices[3 /* QuadVerticies.BottomRight */];
|
|
222
221
|
}
|
|
223
222
|
subtractFromVertex(vertex, value) {
|
|
224
223
|
this.vertices[vertex] -= value;
|
|
225
224
|
}
|
|
226
225
|
addAll(value) {
|
|
227
|
-
this.vertices[QuadVerticies.TopRight] += value;
|
|
228
|
-
this.vertices[QuadVerticies.TopLeft] += value;
|
|
229
|
-
this.vertices[QuadVerticies.BottomLeft] += value;
|
|
230
|
-
this.vertices[QuadVerticies.BottomRight] += value;
|
|
226
|
+
this.vertices[0 /* QuadVerticies.TopRight */] += value;
|
|
227
|
+
this.vertices[1 /* QuadVerticies.TopLeft */] += value;
|
|
228
|
+
this.vertices[2 /* QuadVerticies.BottomLeft */] += value;
|
|
229
|
+
this.vertices[3 /* QuadVerticies.BottomRight */] += value;
|
|
231
230
|
}
|
|
232
231
|
add(v1, v2, v3, v4) {
|
|
233
|
-
this.vertices[QuadVerticies.TopRight] += v1;
|
|
234
|
-
this.vertices[QuadVerticies.TopLeft] += v2;
|
|
235
|
-
this.vertices[QuadVerticies.BottomLeft] += v3;
|
|
236
|
-
this.vertices[QuadVerticies.BottomRight] += v4;
|
|
232
|
+
this.vertices[0 /* QuadVerticies.TopRight */] += v1;
|
|
233
|
+
this.vertices[1 /* QuadVerticies.TopLeft */] += v2;
|
|
234
|
+
this.vertices[2 /* QuadVerticies.BottomLeft */] += v3;
|
|
235
|
+
this.vertices[3 /* QuadVerticies.BottomRight */] += v4;
|
|
237
236
|
}
|
|
238
237
|
subtractAll(value) {
|
|
239
|
-
this.vertices[QuadVerticies.TopRight] -= value;
|
|
240
|
-
this.vertices[QuadVerticies.TopLeft] -= value;
|
|
241
|
-
this.vertices[QuadVerticies.BottomLeft] -= value;
|
|
242
|
-
this.vertices[QuadVerticies.BottomRight] -= value;
|
|
238
|
+
this.vertices[0 /* QuadVerticies.TopRight */] -= value;
|
|
239
|
+
this.vertices[1 /* QuadVerticies.TopLeft */] -= value;
|
|
240
|
+
this.vertices[2 /* QuadVerticies.BottomLeft */] -= value;
|
|
241
|
+
this.vertices[3 /* QuadVerticies.BottomRight */] -= value;
|
|
243
242
|
}
|
|
244
243
|
subtract(v1, v2, v3, v4) {
|
|
245
|
-
this.vertices[QuadVerticies.TopRight] += v1;
|
|
246
|
-
this.vertices[QuadVerticies.TopLeft] += v2;
|
|
247
|
-
this.vertices[QuadVerticies.BottomLeft] += v3;
|
|
248
|
-
this.vertices[QuadVerticies.BottomRight] += v4;
|
|
244
|
+
this.vertices[0 /* QuadVerticies.TopRight */] += v1;
|
|
245
|
+
this.vertices[1 /* QuadVerticies.TopLeft */] += v2;
|
|
246
|
+
this.vertices[2 /* QuadVerticies.BottomLeft */] += v3;
|
|
247
|
+
this.vertices[3 /* QuadVerticies.BottomRight */] += v4;
|
|
249
248
|
}
|
|
250
249
|
isGreaterThan(v1, v2, v3, v4) {
|
|
251
|
-
if (this.vertices[QuadVerticies.TopRight] < v1)
|
|
250
|
+
if (this.vertices[0 /* QuadVerticies.TopRight */] < v1)
|
|
252
251
|
return false;
|
|
253
|
-
if (this.vertices[QuadVerticies.TopLeft] < v2)
|
|
252
|
+
if (this.vertices[1 /* QuadVerticies.TopLeft */] < v2)
|
|
254
253
|
return false;
|
|
255
|
-
if (this.vertices[QuadVerticies.BottomLeft] < v3)
|
|
254
|
+
if (this.vertices[2 /* QuadVerticies.BottomLeft */] < v3)
|
|
256
255
|
return false;
|
|
257
|
-
if (this.vertices[QuadVerticies.BottomRight] < v4)
|
|
256
|
+
if (this.vertices[3 /* QuadVerticies.BottomRight */] < v4)
|
|
258
257
|
return false;
|
|
259
258
|
return true;
|
|
260
259
|
}
|
|
261
260
|
isAllGreaterThan(value) {
|
|
262
|
-
if (this.vertices[QuadVerticies.TopRight] < value)
|
|
261
|
+
if (this.vertices[0 /* QuadVerticies.TopRight */] < value)
|
|
263
262
|
return false;
|
|
264
|
-
if (this.vertices[QuadVerticies.TopLeft] < value)
|
|
263
|
+
if (this.vertices[1 /* QuadVerticies.TopLeft */] < value)
|
|
265
264
|
return false;
|
|
266
|
-
if (this.vertices[QuadVerticies.BottomLeft] < value)
|
|
265
|
+
if (this.vertices[2 /* QuadVerticies.BottomLeft */] < value)
|
|
267
266
|
return false;
|
|
268
|
-
if (this.vertices[QuadVerticies.BottomRight] < value)
|
|
267
|
+
if (this.vertices[3 /* QuadVerticies.BottomRight */] < value)
|
|
269
268
|
return false;
|
|
270
269
|
return true;
|
|
271
270
|
}
|
|
272
271
|
isLessThan(v1, v2, v3, v4) {
|
|
273
|
-
if (this.vertices[QuadVerticies.TopRight] > v1)
|
|
272
|
+
if (this.vertices[0 /* QuadVerticies.TopRight */] > v1)
|
|
274
273
|
return false;
|
|
275
|
-
if (this.vertices[QuadVerticies.TopLeft] > v2)
|
|
274
|
+
if (this.vertices[1 /* QuadVerticies.TopLeft */] > v2)
|
|
276
275
|
return false;
|
|
277
|
-
if (this.vertices[QuadVerticies.BottomLeft] > v3)
|
|
276
|
+
if (this.vertices[2 /* QuadVerticies.BottomLeft */] > v3)
|
|
278
277
|
return false;
|
|
279
|
-
if (this.vertices[QuadVerticies.BottomRight] > v4)
|
|
278
|
+
if (this.vertices[3 /* QuadVerticies.BottomRight */] > v4)
|
|
280
279
|
return false;
|
|
281
280
|
return true;
|
|
282
281
|
}
|
|
283
282
|
isAllLessThan(value) {
|
|
284
|
-
if (this.vertices[QuadVerticies.TopRight] > value)
|
|
283
|
+
if (this.vertices[0 /* QuadVerticies.TopRight */] > value)
|
|
285
284
|
return false;
|
|
286
|
-
if (this.vertices[QuadVerticies.TopLeft] > value)
|
|
285
|
+
if (this.vertices[1 /* QuadVerticies.TopLeft */] > value)
|
|
287
286
|
return false;
|
|
288
|
-
if (this.vertices[QuadVerticies.BottomLeft] > value)
|
|
287
|
+
if (this.vertices[2 /* QuadVerticies.BottomLeft */] > value)
|
|
289
288
|
return false;
|
|
290
|
-
if (this.vertices[QuadVerticies.BottomRight] > value)
|
|
289
|
+
if (this.vertices[3 /* QuadVerticies.BottomRight */] > value)
|
|
291
290
|
return false;
|
|
292
291
|
return true;
|
|
293
292
|
}
|
|
294
293
|
clone() {
|
|
295
294
|
return new QuadScalarVertexData([
|
|
296
|
-
this.vertices[QuadVerticies.TopRight],
|
|
297
|
-
this.vertices[QuadVerticies.TopLeft],
|
|
298
|
-
this.vertices[QuadVerticies.BottomLeft],
|
|
299
|
-
this.vertices[QuadVerticies.BottomRight],
|
|
295
|
+
this.vertices[0 /* QuadVerticies.TopRight */],
|
|
296
|
+
this.vertices[1 /* QuadVerticies.TopLeft */],
|
|
297
|
+
this.vertices[2 /* QuadVerticies.BottomLeft */],
|
|
298
|
+
this.vertices[3 /* QuadVerticies.BottomRight */],
|
|
300
299
|
]);
|
|
301
300
|
}
|
|
302
301
|
}
|