Skip to content

Commit

Permalink
fix picking API bench test, and the wrong import of tesselator (visgl…
Browse files Browse the repository at this point in the history
  • Loading branch information
jianhuang01 authored and Xiaoji Chen committed Feb 20, 2019
1 parent 0e3dae6 commit 0504f11
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions test/bench/pick-layers.bench.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Layer} from '@deck.gl/core';
import {getClosestFromPickingBuffer} from '@deck.gl/core/lib/pick-layers';
import {getClosestObject} from '@deck.gl/core/lib/picking/query-object';

const SAMPLE_LAYERS = [new Layer()];
const OBJECT_COLOR = [0, 10, 20, 1];
Expand Down Expand Up @@ -40,10 +40,10 @@ const TEST_CASES = [
];

export default function pickLayersBench(bench) {
bench = bench.group('getClosestFromPickingBuffer');
bench = bench.group('getClosestObject');

TEST_CASES.forEach(testCase => {
bench = bench.add(testCase.title, () => getClosestFromPickingBuffer(null, testCase.data));
bench = bench.add(testCase.title, () => getClosestObject(testCase.data));
});

return bench;
Expand Down
10 changes: 5 additions & 5 deletions test/bench/tesselation.bench.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as data from 'deck.gl/test/data';

import {PolygonTesselator} from '@deck.gl/layers/solid-polygon-layer/polygon-tesselator';
import PolygonTesselator from '@deck.gl/layers/solid-polygon-layer/polygon-tesselator';

const polygons = data.choropleths.features.map(f => f.geometry.coordinates);

Expand All @@ -9,18 +9,18 @@ export default function tesselationBench(suite) {
.group('TESSELATOR')
.add('polygonTesselator.updatePositions#flat', () => {
const tesselator = new PolygonTesselator({polygons});
tesselator.updatePositions({});
tesselator._updatePositions({});
})
.add('polygonTesselator.updatePositions#extruded', () => {
const tesselator = new PolygonTesselator({polygons});
tesselator.updatePositions({extruded: true});
tesselator._updatePositions({extruded: true});
})
.add('polygonTesselator.updatePositions#flat - fp64', () => {
const tesselator = new PolygonTesselator({polygons});
tesselator.updatePositions({fp64: true});
tesselator._updatePositions({fp64: true});
})
.add('polygonTesselator.updatePositions#extruded - fp64', () => {
const tesselator = new PolygonTesselator({polygons});
tesselator.updatePositions({extruded: true, fp64: true});
tesselator._updatePositions({extruded: true, fp64: true});
});
}

0 comments on commit 0504f11

Please sign in to comment.