@streetscape.gl/layers
Advanced tools
Comparing version 1.0.0-beta.6 to 1.0.0-beta.7
@@ -8,5 +8,5 @@ "use strict"; | ||
var _constants = _interopRequireDefault(require("luma.gl/constants")); | ||
var _constants = _interopRequireDefault(require("@luma.gl/constants")); | ||
var _luma = require("luma.gl"); | ||
var _core = require("@luma.gl/core"); | ||
@@ -69,3 +69,3 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
return GridGeometry; | ||
}(_luma.Geometry); | ||
}(_core.Geometry); | ||
@@ -72,0 +72,0 @@ exports.default = GridGeometry; |
@@ -10,4 +10,6 @@ "use strict"; | ||
var _luma = require("luma.gl"); | ||
var _core2 = require("@luma.gl/core"); | ||
var _core3 = require("@loaders.gl/core"); | ||
var _imageryLayerVertex = _interopRequireDefault(require("./imagery-layer-vertex")); | ||
@@ -53,6 +55,6 @@ | ||
// Url, load the image | ||
return (0, _luma.loadTextures)(gl, _objectSpread({ | ||
urls: [src] | ||
}, opts)).then(function (textures) { | ||
return textures[0]; | ||
return (0, _core3.loadImage)(src).then(function (data) { | ||
return new _core2.Texture2D(gl, _objectSpread({ | ||
data: data | ||
}, opts)); | ||
}).catch(function (error) { | ||
@@ -74,7 +76,7 @@ throw new Error("Could not load texture from ".concat(src, ": ").concat(error)); | ||
function getTextureFromData(gl, data, opts) { | ||
if (data instanceof _luma.Texture2D) { | ||
if (data instanceof _core2.Texture2D) { | ||
return data; | ||
} | ||
return new _luma.Texture2D(gl, _objectSpread({ | ||
return new _core2.Texture2D(gl, _objectSpread({ | ||
data: data | ||
@@ -218,3 +220,3 @@ }, opts)); | ||
// 3d surface | ||
return new _luma.Model(gl, { | ||
return new _core2.Model(gl, { | ||
id: this.props.id, | ||
@@ -225,3 +227,3 @@ vs: _imageryLayerVertex.default, | ||
shaderCache: this.context.shaderCache, | ||
geometry: new _luma.Geometry(), | ||
geometry: new _core2.Geometry(), | ||
vertexCount: 0, | ||
@@ -228,0 +230,0 @@ isIndexed: true |
@@ -10,5 +10,5 @@ "use strict"; | ||
var _luma = require("luma.gl"); | ||
var _core2 = require("@luma.gl/core"); | ||
var _constants = _interopRequireDefault(require("luma.gl/constants")); | ||
var _constants = _interopRequireDefault(require("@luma.gl/constants")); | ||
@@ -49,3 +49,3 @@ var _trafficLightLayerVertex = _interopRequireDefault(require("./traffic-light-layer-vertex.glsl")); | ||
var fp64LowPart = _luma.fp64.fp64LowPart; | ||
var fp64LowPart = _core2.fp64.fp64LowPart; | ||
var LIGHT_COLOR = { | ||
@@ -188,3 +188,3 @@ invalid: [0, 0, 0], | ||
var shaders = this.getShaders(); | ||
var box = new _luma.Cube(gl, _objectSpread({ | ||
var box = new _core2.Cube(gl, _objectSpread({ | ||
id: "".concat(this.props.id, "-box") | ||
@@ -199,3 +199,3 @@ }, shaders, { | ||
})); | ||
var lights = new _luma.Sphere(gl, _objectSpread({ | ||
var lights = new _core2.Sphere(gl, _objectSpread({ | ||
id: "".concat(this.props.id, "-light") | ||
@@ -202,0 +202,0 @@ }, shaders, { |
@@ -8,3 +8,3 @@ "use strict"; | ||
var _luma = require("luma.gl"); | ||
var _core = require("@luma.gl/core"); | ||
@@ -103,3 +103,3 @@ // Copyright (c) 2019 Uber Technologies, Inc. | ||
}); | ||
return new _luma.Texture2D(gl, { | ||
return new _core.Texture2D(gl, { | ||
data: canvas | ||
@@ -106,0 +106,0 @@ }); |
@@ -24,4 +24,4 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } | ||
// THE SOFTWARE. | ||
import GL from 'luma.gl/constants'; | ||
import { Geometry } from 'luma.gl'; | ||
import GL from '@luma.gl/constants'; | ||
import { Geometry } from '@luma.gl/core'; | ||
export default class GridGeometry extends Geometry { | ||
@@ -28,0 +28,0 @@ constructor(_ref = {}) { |
@@ -25,3 +25,4 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } | ||
import { Layer } from '@deck.gl/core'; | ||
import { Model, Geometry, loadTextures, Texture2D } from 'luma.gl'; | ||
import { Model, Geometry, Texture2D } from '@luma.gl/core'; | ||
import { loadImage } from '@loaders.gl/core'; | ||
import IMAGERY_VERTEX_SHADER from './imagery-layer-vertex'; | ||
@@ -41,5 +42,5 @@ import IMAGERY_FRAGMENT_SHADER from './imagery-layer-fragment'; | ||
// Url, load the image | ||
return loadTextures(gl, _objectSpread({ | ||
urls: [src] | ||
}, opts)).then(textures => textures[0]).catch(error => { | ||
return loadImage(src).then(data => new Texture2D(gl, _objectSpread({ | ||
data | ||
}, opts))).catch(error => { | ||
throw new Error(`Could not load texture from ${src}: ${error}`); | ||
@@ -46,0 +47,0 @@ }); |
@@ -25,5 +25,5 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } | ||
import { Layer } from '@deck.gl/core'; | ||
import { Cube, Sphere, fp64 } from 'luma.gl'; | ||
import { Cube, Sphere, fp64 } from '@luma.gl/core'; | ||
const fp64LowPart = fp64.fp64LowPart; | ||
import GL from 'luma.gl/constants'; | ||
import GL from '@luma.gl/constants'; | ||
import vs from './traffic-light-layer-vertex.glsl'; | ||
@@ -30,0 +30,0 @@ import fs from './traffic-light-layer-fragment.glsl'; |
@@ -22,3 +22,3 @@ // Copyright (c) 2019 Uber Technologies, Inc. | ||
/* global document */ | ||
import { Texture2D } from 'luma.gl'; | ||
import { Texture2D } from '@luma.gl/core'; | ||
const CANVAS_SIZE = 256; | ||
@@ -25,0 +25,0 @@ |
@@ -38,4 +38,4 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
// THE SOFTWARE. | ||
import GL from 'luma.gl/constants'; | ||
import { Geometry } from 'luma.gl'; | ||
import GL from '@luma.gl/constants'; | ||
import { Geometry } from '@luma.gl/core'; | ||
@@ -42,0 +42,0 @@ var GridGeometry = |
@@ -43,3 +43,4 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
import { Layer } from '@deck.gl/core'; | ||
import { Model, Geometry, loadTextures, Texture2D } from 'luma.gl'; | ||
import { Model, Geometry, Texture2D } from '@luma.gl/core'; | ||
import { loadImage } from '@loaders.gl/core'; | ||
import IMAGERY_VERTEX_SHADER from './imagery-layer-vertex'; | ||
@@ -59,6 +60,6 @@ import IMAGERY_FRAGMENT_SHADER from './imagery-layer-fragment'; | ||
// Url, load the image | ||
return loadTextures(gl, _objectSpread({ | ||
urls: [src] | ||
}, opts)).then(function (textures) { | ||
return textures[0]; | ||
return loadImage(src).then(function (data) { | ||
return new Texture2D(gl, _objectSpread({ | ||
data: data | ||
}, opts)); | ||
}).catch(function (error) { | ||
@@ -65,0 +66,0 @@ throw new Error("Could not load texture from ".concat(src, ": ").concat(error)); |
@@ -47,5 +47,5 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
import { Layer } from '@deck.gl/core'; | ||
import { Cube, Sphere, fp64 } from 'luma.gl'; | ||
import { Cube, Sphere, fp64 } from '@luma.gl/core'; | ||
var fp64LowPart = fp64.fp64LowPart; | ||
import GL from 'luma.gl/constants'; | ||
import GL from '@luma.gl/constants'; | ||
import vs from './traffic-light-layer-vertex.glsl'; | ||
@@ -52,0 +52,0 @@ import fs from './traffic-light-layer-fragment.glsl'; |
@@ -22,3 +22,3 @@ // Copyright (c) 2019 Uber Technologies, Inc. | ||
/* global document */ | ||
import { Texture2D } from 'luma.gl'; | ||
import { Texture2D } from '@luma.gl/core'; | ||
var CANVAS_SIZE = 256; | ||
@@ -25,0 +25,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "1.0.0-beta.6", | ||
"version": "1.0.0-beta.7", | ||
"repository": { | ||
@@ -26,3 +26,4 @@ "type": "git", | ||
"peerDependencies": { | ||
"@deck.gl/core": "^6.3.0" | ||
"@deck.gl/core": "^7.0.2", | ||
"@deck.gl/layers": "^7.0.2" | ||
}, | ||
@@ -29,0 +30,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
329085
77
3071
0
2