Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions src/components/crystal-toolkit/scene/Scene.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ export default class Scene {
private debugDOMElement?,
cameraState?: CameraState
) {
this.tiling = tiling || 0;
this.maxTiling = maxTiling || [0, 0, 0];
this.tiling = tiling;
this.maxTiling = maxTiling;
this.arrayOfTileRoots = Scene.getEmptyTilesArray([
this.maxTiling,
this.maxTiling,
Expand Down Expand Up @@ -522,10 +522,6 @@ export default class Scene {
return tiles;
};

const _alternateTiles = (x: number) => {
return (-1) ** (x + 1) * Math.trunc((x + 1) / 2);
};

const emptyLattice = [
[0, 0, 0],
[0, 0, 0],
Expand All @@ -551,9 +547,7 @@ export default class Scene {
this.arrayOfTileRoots[x][y][z].push(tileRootObject);

let tileOffsets: number[][] = lattice.map((vector: number[], index: number) => {
return vector.map((x: number) => {
return x * _alternateTiles(tile[index]);
});
return vector.map((x: number) => x * tile[index]);
});
traverseScene(sceneJson, tileRootObject, tileOffsets, '');
}
Expand Down