Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ditch gl-matrix fork in favor of the original package #6751

Merged
merged 2 commits into from
May 29, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 0 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
],
"settings": {
"import/ignore": [
"@mapbox/gl-matrix",
"@mapbox/shelf-pack",
"@mapbox/whoots-js"
]
Expand Down
1 change: 0 additions & 1 deletion build/rollup_plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ export const plugins = () => [
}),
commonjs({
namedExports: {
'@mapbox/gl-matrix': ['vec3', 'vec4', 'mat2', 'mat3', 'mat4'],
'@mapbox/whoots-js': ['getTileBBox']
}
}),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"node": ">=6.4.0"
},
"dependencies": {
"@mapbox/gl-matrix": "^0.0.1",
"@mapbox/jsonlint-lines-primitives": "^2.0.1",
"@mapbox/mapbox-gl-supported": "^1.3.1",
"@mapbox/point-geometry": "^0.1.0",
Expand All @@ -27,6 +26,7 @@
"earcut": "^2.1.3",
"geojson-rewind": "^0.3.0",
"geojson-vt": "^3.1.2",
"gl-matrix": "^2.6.1",
"gray-matter": "^3.0.8",
"grid-index": "^1.0.0",
"minimist": "0.0.8",
Expand Down
6 changes: 1 addition & 5 deletions src/geo/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ import {number as interpolate} from '../style-spec/util/interpolate';
import tileCover from '../util/tile_cover';
import { CanonicalTileID, UnwrappedTileID } from '../source/tile_id';
import EXTENT from '../data/extent';
import glmatrix from '@mapbox/gl-matrix';

const vec4 = glmatrix.vec4,
mat4 = glmatrix.mat4,
mat2 = glmatrix.mat2;
import { vec4, mat4, mat2 } from 'gl-matrix';

/**
* A single transform, generally used for a single tile to be
Expand Down
2 changes: 1 addition & 1 deletion src/render/draw_debug.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import browser from '../util/browser';

import { mat4 } from '@mapbox/gl-matrix';
import { mat4 } from 'gl-matrix';
import EXTENT from '../data/extent';
import VertexArrayObject from './vertex_array_object';
import { PosArray } from '../data/array_types';
Expand Down
5 changes: 1 addition & 4 deletions src/render/draw_fill_extrusion.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow

import glMatrix from '@mapbox/gl-matrix';
import { mat3, mat4, vec3 } from 'gl-matrix';

import {
isPatternMissing,
Expand All @@ -10,9 +10,6 @@ import {
import Texture from './texture';
import Color from '../style-spec/util/color';
import DepthMode from '../gl/depth_mode';
const mat3 = glMatrix.mat3;
const mat4 = glMatrix.mat4;
const vec3 = glMatrix.vec3;
import StencilMode from '../gl/stencil_mode';

import type Painter from './painter';
Expand Down
2 changes: 1 addition & 1 deletion src/render/draw_heatmap.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @flow

import { mat4 } from '@mapbox/gl-matrix';
import { mat4 } from 'gl-matrix';

import Texture from './texture';
import pixelsToTileUnits from '../source/pixels_to_tile_units';
Expand Down
2 changes: 1 addition & 1 deletion src/render/draw_hillshade.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Coordinate from '../geo/coordinate';

import Texture from './texture';
import EXTENT from '../data/extent';
import { mat4 } from '@mapbox/gl-matrix';
import { mat4 } from 'gl-matrix';
import StencilMode from '../gl/stencil_mode';
import DepthMode from '../gl/depth_mode';

Expand Down
2 changes: 1 addition & 1 deletion src/render/draw_symbol.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import drawCollisionDebug from './draw_collision_debug';
import pixelsToTileUnits from '../source/pixels_to_tile_units';
import * as symbolProjection from '../symbol/projection';
import * as symbolSize from '../symbol/symbol_size';
import { mat4 } from '@mapbox/gl-matrix';
import { mat4 } from 'gl-matrix';
const identityMat4 = mat4.identity(new Float32Array(16));
import properties from '../style/style_layer/symbol_style_layer_properties';
const symbolLayoutProperties = properties.layout;
Expand Down
2 changes: 1 addition & 1 deletion src/render/painter.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import browser from '../util/browser';

import { mat4 } from '@mapbox/gl-matrix';
import { mat4 } from 'gl-matrix';
import SourceCache from '../source/source_cache';
import EXTENT from '../data/extent';
import pixelsToTileUnits from '../source/pixels_to_tile_units';
Expand Down
2 changes: 1 addition & 1 deletion src/style/style_layer/circle_style_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { multiPolygonIntersectsBufferedPoint } from '../../util/intersection_tes
import { getMaximumPaintValue, translateDistance, translate } from '../query_utils';
import properties from './circle_style_layer_properties';
import { Transitionable, Transitioning, PossiblyEvaluated } from '../properties';
import {vec4} from '@mapbox/gl-matrix';
import { vec4 } from 'gl-matrix';
import Point from '@mapbox/point-geometry';

import type { FeatureState } from '../../style-spec/expression';
Expand Down
4 changes: 1 addition & 3 deletions src/symbol/collision_index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import Point from '@mapbox/point-geometry';

import * as intersectionTests from '../util/intersection_tests';
import Grid from './grid_index';
import glmatrix from '@mapbox/gl-matrix';

const mat4 = glmatrix.mat4;
import { mat4 } from 'gl-matrix';

import * as projection from '../symbol/projection';

Expand Down
2 changes: 1 addition & 1 deletion src/symbol/placement.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type Transform from '../geo/transform';
import type StyleLayer from '../style/style_layer';
import type Tile from '../source/tile';
import type SymbolBucket from '../data/bucket/symbol_bucket';
import type mat4 from '@mapbox/gl-matrix';
import type {mat4} from 'gl-matrix';
import type {CollisionBoxArray, CollisionVertexArray} from '../data/array_types';
import type FeatureIndex from '../data/feature_index';
import type {OverscaledTileID} from '../source/tile_id';
Expand Down
2 changes: 1 addition & 1 deletion src/symbol/projection.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import Point from '@mapbox/point-geometry';

import { mat4, vec4 } from '@mapbox/gl-matrix';
import { mat4, vec4 } from 'gl-matrix';
import * as symbolSize from './symbol_size';
import { addDynamicAttributes } from '../data/bucket/symbol_bucket';
import properties from '../style/style_layer/symbol_style_layer_properties';
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,6 @@
dependencies:
wgs84 "0.0.0"

"@mapbox/gl-matrix@^0.0.1":
version "0.0.1"
resolved "https://registry.yarnpkg.com/@mapbox/gl-matrix/-/gl-matrix-0.0.1.tgz#e5126aab4d64c36b81c7a97d0ae0dddde5773d2b"

"@mapbox/jsonlint-lines-primitives@^2.0.1":
version "2.0.1"
resolved "https://registry.yarnpkg.com/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.1.tgz#bc4c1593e2ec2371e2771c518068d6eab8eeae58"
Expand Down Expand Up @@ -4460,6 +4456,10 @@ github-slugger@1.2.0, github-slugger@^1.0.0, github-slugger@^1.1.1:
dependencies:
emoji-regex ">=6.0.0 <=6.1.1"

gl-matrix@^2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/gl-matrix/-/gl-matrix-2.6.1.tgz#1bc7f7b396f4ae80abdb4db9a98cd07d170b9004"

gl@^4.0.1:
version "4.0.4"
resolved "https://registry.yarnpkg.com/gl/-/gl-4.0.4.tgz#46745f365a230672b2f988d85018f737e64c3343"
Expand Down