viewport-mercator-project
Advanced tools
Comparing version 4.1.0 to 4.1.1
@@ -5,2 +5,5 @@ # Change Log | ||
### 4.1.1 | ||
- Replace gl-matrix dependency with cherry-pick imports | ||
### 4.1.0 | ||
@@ -7,0 +10,0 @@ - NEW: `PerspectiveMercatorViewport.fitBounds` method |
@@ -13,9 +13,13 @@ export { _fitBounds as fitBounds }; | ||
// View and Projection Matrix calculations for mapbox-js style | ||
// map view properties | ||
// View and Projection Matrix calculations for mapbox-js style map view properties | ||
import Viewport, { createMat4 } from './viewport'; | ||
import { mat4, vec2 } from 'gl-matrix'; | ||
import autobind from './autobind'; | ||
import assert from 'assert'; | ||
/* eslint-disable camelcase */ | ||
import mat4 from 'gl-mat4'; | ||
import vec2_distance from 'gl-vec2/distance'; | ||
import vec2_add from 'gl-vec2/add'; | ||
import vec2_negate from 'gl-vec2/negate'; | ||
// CONSTANTS | ||
@@ -216,4 +220,4 @@ var PI = Math.PI; | ||
var translate = vec2.sub([], toLocation, fromLocation); | ||
var newCenter = vec2.add([], center, translate); | ||
var translate = vec2_add([], toLocation, vec2_negate([], fromLocation)); | ||
var newCenter = vec2_add([], center, translate); | ||
return this.unprojectFlat(newCenter); | ||
@@ -430,6 +434,6 @@ } | ||
// around current lat/lon | ||
var pixelsPerDegreeX = vec2.distance(projectFlat([longitude + 0.5, latitude], scale), projectFlat([longitude - 0.5, latitude], scale)); | ||
var pixelsPerDegreeX = vec2_distance(projectFlat([longitude + 0.5, latitude], scale), projectFlat([longitude - 0.5, latitude], scale)); | ||
// Calculate number of pixels occupied by one degree latitude | ||
// around current lat/lon | ||
var pixelsPerDegreeY = vec2.distance(projectFlat([longitude, latitude + 0.5], scale), projectFlat([longitude, latitude - 0.5], scale)); | ||
var pixelsPerDegreeY = vec2_distance(projectFlat([longitude, latitude + 0.5], scale), projectFlat([longitude, latitude - 0.5], scale)); | ||
@@ -597,2 +601,2 @@ var pixelsPerMeterX = pixelsPerDegreeX / metersPerDegree; | ||
} | ||
//# sourceMapping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biAgICBsYXRpdHVkZTogMCxcbiAgICB6b29tOiAwXG4gIH0pO1xuXG4gIGNvbnN0IG53ID0gdmlld3BvcnQucHJvamVjdChbd2VzdCwgbm9ydGhdKTtcbiAgY29uc3Qgc2UgPSB2aWV3cG9ydC5wcm9qZWN0KFtlYXN0LCBzb3V0aF0pO1xuICBjb25zdCBzaXplID0gW1xuICAgIE1hdGguYWJzKHNlWzBdIC0gbndbMF0pLFxuICAgIE1hdGguYWJzKHNlWzFdIC0gbndbMV0pXG4gIF07XG4gIGNvbnN0IGNlbnRlciA9IFtcbiAgICAoc2VbMF0gKyBud1swXSkgLyAyLFxuICAgIChzZVsxXSArIG53WzFdKSAvIDJcbiAgXTtcblxuICBjb25zdCBzY2FsZVggPSAod2lkdGggLSBwYWRkaW5nICogMiAtIE1hdGguYWJzKG9mZnNldFswXSkgKiAyKSAvIHNpemVbMF07XG4gIGNvbnN0IHNjYWxlWSA9IChoZWlnaHQgLSBwYWRkaW5nICogMiAtIE1hdGguYWJzKG9mZnNldFsxXSkgKiAyKSAvIHNpemVbMV07XG5cbiAgY29uc3QgY2VudGVyTG5nTGF0ID0gdmlld3BvcnQudW5wcm9qZWN0KGNlbnRlcik7XG4gIGNvbnN0IHpvb20gPSB2aWV3cG9ydC56b29tICsgTWF0aC5sb2cyKE1hdGguYWJzKE1hdGgubWluKHNjYWxlWCwgc2NhbGVZKSkpO1xuXG4gIHJldHVybiB7XG4gICAgbG9uZ2l0dWRlOiBjZW50ZXJMbmdMYXRbMF0sXG4gICAgbGF0aXR1ZGU6IGNlbnRlckxuZ0xhdFsxXSxcbiAgICB6b29tXG4gIH07XG59XG4iXX0= |
@@ -9,6 +9,12 @@ var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); | ||
// gl-matrix is a large dependency for a small module. | ||
// However since it is used by mapbox etc, it should already be present | ||
// in most target application bundles. | ||
import { mat4, vec4, vec2 } from 'gl-matrix'; | ||
/* eslint-disable camelcase */ | ||
import mat4_scale from 'gl-mat4/scale'; | ||
import mat4_translate from 'gl-mat4/translate'; | ||
import mat4_multiply from 'gl-mat4/multiply'; | ||
import mat4_invert from 'gl-mat4/invert'; | ||
import vec4_multiply from 'gl-vec4/multiply'; | ||
import vec4_transformMat4 from 'gl-vec4/transformMat4'; | ||
import vec2_lerp from 'gl-vec2/lerp'; | ||
import _equals from './equals'; | ||
import autobind from './autobind'; | ||
@@ -72,4 +78,4 @@ import assert from 'assert'; | ||
var vpm = createMat4(); | ||
mat4.multiply(vpm, vpm, this.projectionMatrix); | ||
mat4.multiply(vpm, vpm, this.viewMatrix); | ||
mat4_multiply(vpm, vpm, this.projectionMatrix); | ||
mat4_multiply(vpm, vpm, this.viewMatrix); | ||
this.viewProjectionMatrix = vpm; | ||
@@ -90,19 +96,8 @@ | ||
// matrix for conversion from location to screen coordinates | ||
mat4.scale(m, m, [this.width / 2, -this.height / 2, 1]); | ||
mat4.translate(m, m, [1, -1, 0]); | ||
mat4_scale(m, m, [this.width / 2, -this.height / 2, 1]); | ||
mat4_translate(m, m, [1, -1, 0]); | ||
// Scale with viewport window's width and height in pixels | ||
// mat4.scale(m, m, [this.width, this.height, 1]); | ||
// Convert to (0, 1) | ||
// mat4.translate(m, m, [0.5, 0.5, 0]); | ||
// mat4.scale(m, m, [0.5, 0.5, 1]); | ||
// Project to clip space (-1, 1) | ||
mat4.multiply(m, m, this.viewProjectionMatrix); | ||
mat4_multiply(m, m, this.viewProjectionMatrix); | ||
// console.log(`vec ${[this.width / 2, this.height / 2, 1]}`); | ||
// console.log(`View ${this.viewMatrix}`); | ||
// console.log(`VPM ${vpm}`); | ||
// console.log(`Pixel ${m}`); | ||
var mInverse = mat4.invert(createMat4(), m); | ||
var mInverse = mat4_invert(createMat4(), m); | ||
if (!mInverse) { | ||
@@ -130,3 +125,3 @@ throw new Error('Pixel project matrix not invertible'); | ||
return viewport.width === this.width && viewport.height === this.height && mat4.equals(viewport.projectionMatrix, this.projectionMatrix) && mat4.equals(viewport.viewMatrix, this.viewMatrix); | ||
return viewport.width === this.width && viewport.height === this.height && _equals(viewport.projectionMatrix, this.projectionMatrix) && _equals(viewport.viewMatrix, this.viewMatrix); | ||
} | ||
@@ -210,6 +205,4 @@ | ||
var t = z0 === z1 ? 0 : (targetZ - z0) / (z1 - z0); | ||
var v = vec2.lerp([], coord0, coord1, t); | ||
var v = vec2_lerp([], coord0, coord1, t); | ||
// console.error(`unprojecting to non-linear ${v}<=${[x, y2, targetZ]}`); | ||
var vUnprojected = this.unprojectFlat(v); | ||
@@ -224,5 +217,5 @@ return xyz.length === 2 ? vUnprojected : [vUnprojected[0], vUnprojected[1], 0]; | ||
value: function transformVector(matrix, vector) { | ||
var result = vec4.transformMat4([0, 0, 0, 0], vector, matrix); | ||
var result = vec4_transformMat4([0, 0, 0, 0], vector, matrix); | ||
var scale = 1 / result[3]; | ||
vec4.multiply(result, result, [scale, scale, scale, scale]); | ||
vec4_multiply(result, result, [scale, scale, scale, scale]); | ||
return result; | ||
@@ -284,5 +277,5 @@ } | ||
if (modelMatrix) { | ||
modelViewProjectionMatrix = mat4.multiply([], this.viewProjectionMatrix, modelMatrix); | ||
pixelProjectionMatrix = mat4.multiply([], this.pixelProjectionMatrix, modelMatrix); | ||
pixelUnprojectionMatrix = mat4.invert([], pixelProjectionMatrix); | ||
modelViewProjectionMatrix = mat4_multiply([], this.viewProjectionMatrix, modelMatrix); | ||
pixelProjectionMatrix = mat4_multiply([], this.pixelProjectionMatrix, modelMatrix); | ||
pixelUnprojectionMatrix = mat4_invert([], pixelProjectionMatrix); | ||
} | ||
@@ -326,3 +319,3 @@ | ||
// Helper, avoids low-precision 32 bit matrices from gl-matrix mat4.create() | ||
// Helper, avoids low-precision 32 bit matrices from mat4.create() | ||
@@ -334,2 +327,2 @@ | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy92aWV3cG9ydC5qcyJdLCJuYW1lcyI6WyJtYXQ0IiwidmVjNCIsInZlYzIiLCJhdXRvYmluZCIsImFzc2VydCIsIklERU5USVRZIiwiY3JlYXRlTWF0NCIsIkVSUl9BUkdVTUVOVCIsIlZpZXdwb3J0Iiwid2lkdGgiLCJoZWlnaHQiLCJ2aWV3TWF0cml4IiwicHJvamVjdGlvbk1hdHJpeCIsInNjYWxlIiwidnBtIiwibXVsdGlwbHkiLCJ2aWV3UHJvamVjdGlvbk1hdHJpeCIsIm0iLCJ0cmFuc2xhdGUiLCJtSW52ZXJzZSIsImludmVydCIsIkVycm9yIiwicGl4ZWxQcm9qZWN0aW9uTWF0cml4IiwicGl4ZWxVbnByb2plY3Rpb25NYXRyaXgiLCJ2aWV3cG9ydCIsImVxdWFscyIsInh5eiIsInRvcExlZnQiLCJ4MCIsInkwIiwiejAiLCJOdW1iZXIiLCJpc0Zpbml0ZSIsInByb2plY3RGbGF0IiwiWCIsIlkiLCJ2IiwidHJhbnNmb3JtVmVjdG9yIiwieCIsInkiLCJ5MiIsImxlbmd0aCIsInRhcmdldFoiLCJjb29yZDAiLCJjb29yZDEiLCJ6MSIsInQiLCJsZXJwIiwidlVucHJvamVjdGVkIiwidW5wcm9qZWN0RmxhdCIsIm1hdHJpeCIsInZlY3RvciIsInJlc3VsdCIsInRyYW5zZm9ybU1hdDQiLCJfcHJvamVjdEZsYXQiLCJhcmd1bWVudHMiLCJfdW5wcm9qZWN0RmxhdCIsIm1vZGVsTWF0cml4IiwibW9kZWxWaWV3UHJvamVjdGlvb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Ckge1xuICAgIHJldHVybiB7fTtcbiAgfVxufVxuXG4vLyBIZWxwZXIsIGF2b2lkcyBsb3ctcHJlY2lzaW9uIDMyIGJpdCBtYXRyaWNlcyBmcm9tIG1hdDQuY3JlYXRlKClcbmV4cG9ydCBmdW5jdGlvbiBjcmVhdGVNYXQ0KCkge1xuICByZXR1cm4gWzEsIDAsIDAsIDAsIDAsIDEsIDAsIDAsIDAsIDAsIDEsIDAsIDAsIDAsIDAsIDFdO1xufVxuIl19 |
@@ -11,5 +11,3 @@ 'use strict'; | ||
// gl-matrix is a large dependency for a small module. | ||
// However since it is used by mapbox etc, it should already be present | ||
// in most target application bundles. | ||
/* eslint-disable camelcase */ | ||
@@ -19,4 +17,34 @@ | ||
var _glMatrix = require('gl-matrix'); | ||
var _scale = require('gl-mat4/scale'); | ||
var _scale2 = _interopRequireDefault(_scale); | ||
var _translate = require('gl-mat4/translate'); | ||
var _translate2 = _interopRequireDefault(_translate); | ||
var _multiply = require('gl-mat4/multiply'); | ||
var _multiply2 = _interopRequireDefault(_multiply); | ||
var _invert = require('gl-mat4/invert'); | ||
var _invert2 = _interopRequireDefault(_invert); | ||
var _multiply3 = require('gl-vec4/multiply'); | ||
var _multiply4 = _interopRequireDefault(_multiply3); | ||
var _transformMat = require('gl-vec4/transformMat4'); | ||
var _transformMat2 = _interopRequireDefault(_transformMat); | ||
var _lerp = require('gl-vec2/lerp'); | ||
var _lerp2 = _interopRequireDefault(_lerp); | ||
var _equals2 = require('./equals'); | ||
var _equals3 = _interopRequireDefault(_equals2); | ||
var _autobind = require('./autobind'); | ||
@@ -89,4 +117,4 @@ | ||
var vpm = createMat4(); | ||
_glMatrix.mat4.multiply(vpm, vpm, this.projectionMatrix); | ||
_glMatrix.mat4.multiply(vpm, vpm, this.viewMatrix); | ||
(0, _multiply2.default)(vpm, vpm, this.projectionMatrix); | ||
(0, _multiply2.default)(vpm, vpm, this.viewMatrix); | ||
this.viewProjectionMatrix = vpm; | ||
@@ -107,19 +135,8 @@ | ||
// matrix for conversion from location to screen coordinates | ||
_glMatrix.mat4.scale(m, m, [this.width / 2, -this.height / 2, 1]); | ||
_glMatrix.mat4.translate(m, m, [1, -1, 0]); | ||
(0, _scale2.default)(m, m, [this.width / 2, -this.height / 2, 1]); | ||
(0, _translate2.default)(m, m, [1, -1, 0]); | ||
// Scale with viewport window's width and height in pixels | ||
// mat4.scale(m, m, [this.width, this.height, 1]); | ||
// Convert to (0, 1) | ||
// mat4.translate(m, m, [0.5, 0.5, 0]); | ||
// mat4.scale(m, m, [0.5, 0.5, 1]); | ||
// Project to clip space (-1, 1) | ||
_glMatrix.mat4.multiply(m, m, this.viewProjectionMatrix); | ||
(0, _multiply2.default)(m, m, this.viewProjectionMatrix); | ||
// console.log(`vec ${[this.width / 2, this.height / 2, 1]}`); | ||
// console.log(`View ${this.viewMatrix}`); | ||
// console.log(`VPM ${vpm}`); | ||
// console.log(`Pixel ${m}`); | ||
var mInverse = _glMatrix.mat4.invert(createMat4(), m); | ||
var mInverse = (0, _invert2.default)(createMat4(), m); | ||
if (!mInverse) { | ||
@@ -147,3 +164,3 @@ throw new Error('Pixel project matrix not invertible'); | ||
return viewport.width === this.width && viewport.height === this.height && _glMatrix.mat4.equals(viewport.projectionMatrix, this.projectionMatrix) && _glMatrix.mat4.equals(viewport.viewMatrix, this.viewMatrix); | ||
return viewport.width === this.width && viewport.height === this.height && (0, _equals3.default)(viewport.projectionMatrix, this.projectionMatrix) && (0, _equals3.default)(viewport.viewMatrix, this.viewMatrix); | ||
} | ||
@@ -227,6 +244,4 @@ | ||
var t = z0 === z1 ? 0 : (targetZ - z0) / (z1 - z0); | ||
var v = _glMatrix.vec2.lerp([], coord0, coord1, t); | ||
var v = (0, _lerp2.default)([], coord0, coord1, t); | ||
// console.error(`unprojecting to non-linear ${v}<=${[x, y2, targetZ]}`); | ||
var vUnprojected = this.unprojectFlat(v); | ||
@@ -241,5 +256,5 @@ return xyz.length === 2 ? vUnprojected : [vUnprojected[0], vUnprojected[1], 0]; | ||
value: function transformVector(matrix, vector) { | ||
var result = _glMatrix.vec4.transformMat4([0, 0, 0, 0], vector, matrix); | ||
var result = (0, _transformMat2.default)([0, 0, 0, 0], vector, matrix); | ||
var scale = 1 / result[3]; | ||
_glMatrix.vec4.multiply(result, result, [scale, scale, scale, scale]); | ||
(0, _multiply4.default)(result, result, [scale, scale, scale, scale]); | ||
return result; | ||
@@ -301,5 +316,5 @@ } | ||
if (modelMatrix) { | ||
modelViewProjectionMatrix = _glMatrix.mat4.multiply([], this.viewProjectionMatrix, modelMatrix); | ||
pixelProjectionMatrix = _glMatrix.mat4.multiply([], this.pixelProjectionMatrix, modelMatrix); | ||
pixelUnprojectionMatrix = _glMatrix.mat4.invert([], pixelProjectionMatrix); | ||
modelViewProjectionMatrix = (0, _multiply2.default)([], this.viewProjectionMatrix, modelMatrix); | ||
pixelProjectionMatrix = (0, _multiply2.default)([], this.pixelProjectionMatrix, modelMatrix); | ||
pixelUnprojectionMatrix = (0, _invert2.default)([], pixelProjectionMatrix); | ||
} | ||
@@ -343,3 +358,3 @@ | ||
// Helper, avoids low-precision 32 bit matrices from gl-matrix mat4.create() | ||
// Helper, avoids low-precision 32 bit matrices from mat4.create() | ||
@@ -351,2 +366,2 @@ | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy92aWV3cG9ydC5qcyJdLCJuYW1lcyI6WyJjcmVhdGVNYXQ0IiwiSURFTlRJVFkiLCJFUlJfQVJHVU1FTlQiLCJWaWV3cG9ydCIsIndpZHRoIiwiaGVpZ2h0Iiwidmlld01hdHJpeCIsInByb2plY3Rpb25NYXRyaXgiLCJzY2FsZSIsInZwbSIsIm11bHRpcGx5Iiwidmlld1Byb2plY3Rpb25NYXRyaXgiLCJtIiwidHJhbnNsYXRlIiwibUludmVyc2UiLCJpbnZlcnQiLCJFcnJvciIsInBpeGVsUHJvamVjdGlvbk1hdHJpeCI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B9XG59XG5cbi8vIEhlbHBlciwgYXZvaWRzIGxvdy1wcmVjaXNpb24gMzIgYml0IG1hdHJpY2VzIGZyb20gbWF0NC5jcmVhdGUoKVxuZXhwb3J0IGZ1bmN0aW9uIGNyZWF0ZU1hdDQoKSB7XG4gIHJldHVybiBbMSwgMCwgMCwgMCwgMCwgMSwgMCwgMCwgMCwgMCwgMSwgMCwgMCwgMCwgMCwgMV07XG59XG4iXX0= |
{ | ||
"name": "viewport-mercator-project", | ||
"version": "4.1.0", | ||
"version": "4.1.1", | ||
"description": "Convert to and from lat/lng and pixels in web mercator at arbitrary floating point zoom levels.", | ||
@@ -25,3 +25,3 @@ "author": "Uber Technologies, Inc.", | ||
"clean": "rm -fr dist/* dist-es6/*", | ||
"lint": "eslint src", | ||
"lint": "eslint src test", | ||
"precommit": "npm test", | ||
@@ -35,3 +35,6 @@ "publish-prod": "npm run build && npm run test && npm publish", | ||
"dependencies": { | ||
"gl-matrix": "^2.3.2" | ||
"gl-mat4": "^1.1.4", | ||
"gl-vec2": "^1.0.0", | ||
"gl-vec3": "^1.0.3", | ||
"gl-vec4": "^1.0.1" | ||
}, | ||
@@ -38,0 +41,0 @@ "devDependencies": { |
@@ -1,8 +0,12 @@ | ||
// View and Projection Matrix calculations for mapbox-js style | ||
// map view properties | ||
// View and Projection Matrix calculations for mapbox-js style map view properties | ||
import Viewport, {createMat4} from './viewport'; | ||
import {mat4, vec2} from 'gl-matrix'; | ||
import autobind from './autobind'; | ||
import assert from 'assert'; | ||
/* eslint-disable camelcase */ | ||
import mat4 from 'gl-mat4'; | ||
import vec2_distance from 'gl-vec2/distance'; | ||
import vec2_add from 'gl-vec2/add'; | ||
import vec2_negate from 'gl-vec2/negate'; | ||
// CONSTANTS | ||
@@ -181,4 +185,4 @@ const PI = Math.PI; | ||
const translate = vec2.sub([], toLocation, fromLocation); | ||
const newCenter = vec2.add([], center, translate); | ||
const translate = vec2_add([], toLocation, vec2_negate([], fromLocation)); | ||
const newCenter = vec2_add([], center, translate); | ||
return this.unprojectFlat(newCenter); | ||
@@ -330,3 +334,3 @@ } | ||
// around current lat/lon | ||
const pixelsPerDegreeX = vec2.distance( | ||
const pixelsPerDegreeX = vec2_distance( | ||
projectFlat([longitude + 0.5, latitude], scale), | ||
@@ -337,3 +341,3 @@ projectFlat([longitude - 0.5, latitude], scale) | ||
// around current lat/lon | ||
const pixelsPerDegreeY = vec2.distance( | ||
const pixelsPerDegreeY = vec2_distance( | ||
projectFlat([longitude, latitude + 0.5], scale), | ||
@@ -340,0 +344,0 @@ projectFlat([longitude, latitude - 0.5], scale) |
// View and Projection Matrix management | ||
// gl-matrix is a large dependency for a small module. | ||
// However since it is used by mapbox etc, it should already be present | ||
// in most target application bundles. | ||
import {mat4, vec4, vec2} from 'gl-matrix'; | ||
/* eslint-disable camelcase */ | ||
import mat4_scale from 'gl-mat4/scale'; | ||
import mat4_translate from 'gl-mat4/translate'; | ||
import mat4_multiply from 'gl-mat4/multiply'; | ||
import mat4_invert from 'gl-mat4/invert'; | ||
import vec4_multiply from 'gl-vec4/multiply'; | ||
import vec4_transformMat4 from 'gl-vec4/transformMat4'; | ||
import vec2_lerp from 'gl-vec2/lerp'; | ||
import equals from './equals'; | ||
import autobind from './autobind'; | ||
@@ -60,4 +66,4 @@ import assert from 'assert'; | ||
const vpm = createMat4(); | ||
mat4.multiply(vpm, vpm, this.projectionMatrix); | ||
mat4.multiply(vpm, vpm, this.viewMatrix); | ||
mat4_multiply(vpm, vpm, this.projectionMatrix); | ||
mat4_multiply(vpm, vpm, this.viewMatrix); | ||
this.viewProjectionMatrix = vpm; | ||
@@ -77,20 +83,9 @@ | ||
// matrix for conversion from location to screen coordinates | ||
mat4.scale(m, m, [this.width / 2, -this.height / 2, 1]); | ||
mat4.translate(m, m, [1, -1, 0]); | ||
// matrix for conversion from location to screen coordinates | ||
mat4_scale(m, m, [this.width / 2, -this.height / 2, 1]); | ||
mat4_translate(m, m, [1, -1, 0]); | ||
// Scale with viewport window's width and height in pixels | ||
// mat4.scale(m, m, [this.width, this.height, 1]); | ||
// Convert to (0, 1) | ||
// mat4.translate(m, m, [0.5, 0.5, 0]); | ||
// mat4.scale(m, m, [0.5, 0.5, 1]); | ||
// Project to clip space (-1, 1) | ||
mat4.multiply(m, m, this.viewProjectionMatrix); | ||
mat4_multiply(m, m, this.viewProjectionMatrix); | ||
// console.log(`vec ${[this.width / 2, this.height / 2, 1]}`); | ||
// console.log(`View ${this.viewMatrix}`); | ||
// console.log(`VPM ${vpm}`); | ||
// console.log(`Pixel ${m}`); | ||
const mInverse = mat4.invert(createMat4(), m); | ||
const mInverse = mat4_invert(createMat4(), m); | ||
if (!mInverse) { | ||
@@ -116,4 +111,4 @@ throw new Error('Pixel project matrix not invertible'); | ||
viewport.height === this.height && | ||
mat4.equals(viewport.projectionMatrix, this.projectionMatrix) && | ||
mat4.equals(viewport.viewMatrix, this.viewMatrix); | ||
equals(viewport.projectionMatrix, this.projectionMatrix) && | ||
equals(viewport.viewMatrix, this.viewMatrix); | ||
} | ||
@@ -167,6 +162,4 @@ | ||
const t = z0 === z1 ? 0 : (targetZ - z0) / (z1 - z0); | ||
const v = vec2.lerp([], coord0, coord1, t); | ||
const v = vec2_lerp([], coord0, coord1, t); | ||
// console.error(`unprojecting to non-linear ${v}<=${[x, y2, targetZ]}`); | ||
const vUnprojected = this.unprojectFlat(v); | ||
@@ -178,5 +171,5 @@ return xyz.length === 2 ? vUnprojected : [vUnprojected[0], vUnprojected[1], 0]; | ||
transformVector(matrix, vector) { | ||
const result = vec4.transformMat4([0, 0, 0, 0], vector, matrix); | ||
const result = vec4_transformMat4([0, 0, 0, 0], vector, matrix); | ||
const scale = 1 / result[3]; | ||
vec4.multiply(result, result, [scale, scale, scale, scale]); | ||
vec4_multiply(result, result, [scale, scale, scale, scale]); | ||
return result; | ||
@@ -219,5 +212,5 @@ } | ||
if (modelMatrix) { | ||
modelViewProjectionMatrix = mat4.multiply([], this.viewProjectionMatrix, modelMatrix); | ||
pixelProjectionMatrix = mat4.multiply([], this.pixelProjectionMatrix, modelMatrix); | ||
pixelUnprojectionMatrix = mat4.invert([], pixelProjectionMatrix); | ||
modelViewProjectionMatrix = mat4_multiply([], this.viewProjectionMatrix, modelMatrix); | ||
pixelProjectionMatrix = mat4_multiply([], this.pixelProjectionMatrix, modelMatrix); | ||
pixelUnprojectionMatrix = mat4_invert([], pixelProjectionMatrix); | ||
} | ||
@@ -256,5 +249,5 @@ | ||
// Helper, avoids low-precision 32 bit matrices from gl-matrix mat4.create() | ||
// Helper, avoids low-precision 32 bit matrices from mat4.create() | ||
export function createMat4() { | ||
return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]; | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
271805
22
2593
4
+ Addedgl-mat4@^1.1.4
+ Addedgl-vec2@^1.0.0
+ Addedgl-vec3@^1.0.3
+ Addedgl-vec4@^1.0.1
+ Addedgl-mat4@1.2.0(transitive)
+ Addedgl-vec2@1.3.0(transitive)
+ Addedgl-vec3@1.1.3(transitive)
+ Addedgl-vec4@1.0.1(transitive)
- Removedgl-matrix@^2.3.2
- Removedgl-matrix@2.8.1(transitive)