@deck.gl/mesh-layers
Advanced tools
Comparing version 7.0.0-rc.1 to 7.0.0
@@ -57,3 +57,3 @@ "use strict"; | ||
if (propName === 'scenegraph') { | ||
return (0, _core3.loadFile)(url, layer.getLoadOptions()).then(function (_ref2) { | ||
return (0, _core3.load)(url, layer.getLoadOptions()).then(function (_ref2) { | ||
var scenes = _ref2.scenes; | ||
@@ -116,3 +116,4 @@ return scenes[0]; | ||
size: 3, | ||
accessor: 'getPosition' | ||
accessor: 'getPosition', | ||
transition: true | ||
}, | ||
@@ -127,3 +128,4 @@ instancePositions64xy: { | ||
accessor: 'getColor', | ||
defaultValue: DEFAULT_COLOR | ||
defaultValue: DEFAULT_COLOR, | ||
transition: true | ||
}, | ||
@@ -177,6 +179,6 @@ instanceModelMatrix: _matrix.MATRIX_ATTRIBUTES | ||
key: "updateState", | ||
value: function updateState(_ref3) { | ||
var props = _ref3.props, | ||
oldProps = _ref3.oldProps, | ||
changeFlags = _ref3.changeFlags; | ||
value: function updateState(params) { | ||
(0, _get2.default)((0, _getPrototypeOf2.default)(ScenegraphLayer.prototype), "updateState", this).call(this, params); | ||
var props = params.props, | ||
oldProps = params.oldProps; | ||
@@ -252,7 +254,7 @@ if (props.scenegraph !== oldProps.scenegraph) { | ||
key: "draw", | ||
value: function draw(_ref4) { | ||
var _ref4$moduleParameter = _ref4.moduleParameters, | ||
moduleParameters = _ref4$moduleParameter === void 0 ? null : _ref4$moduleParameter, | ||
_ref4$parameters = _ref4.parameters, | ||
parameters = _ref4$parameters === void 0 ? {} : _ref4$parameters; | ||
value: function draw(_ref3) { | ||
var _ref3$moduleParameter = _ref3.moduleParameters, | ||
moduleParameters = _ref3$moduleParameter === void 0 ? null : _ref3$moduleParameter, | ||
_ref3$parameters = _ref3.parameters, | ||
parameters = _ref3$parameters === void 0 ? {} : _ref3$parameters; | ||
if (!this.state.scenegraph) return; | ||
@@ -259,0 +261,0 @@ var sizeScale = this.props.sizeScale; |
@@ -28,2 +28,4 @@ "use strict"; | ||
var _images = require("@loaders.gl/images"); | ||
var _matrix = require("../utils/matrix"); | ||
@@ -49,3 +51,3 @@ | ||
if (typeof src === 'string') { | ||
return (0, _core3.loadImage)(src).then(function (data) { | ||
return (0, _images.loadImage)(src).then(function (data) { | ||
return getTextureFromData(gl, data, opts); | ||
@@ -112,3 +114,3 @@ }).catch(function (error) { | ||
if (propName === 'mesh') { | ||
return (0, _core3.loadFile)(url); | ||
return (0, _core3.load)(url); | ||
} | ||
@@ -115,0 +117,0 @@ |
import { Layer } from '@deck.gl/core'; | ||
import { fp64, ScenegraphNode, log } from '@luma.gl/core'; | ||
import { loadFile } from '@loaders.gl/core'; | ||
import { load } from '@loaders.gl/core'; | ||
import { MATRIX_ATTRIBUTES } from '../utils/matrix'; | ||
@@ -30,3 +30,3 @@ import vs from './scenegraph-layer-vertex.glsl'; | ||
if (propName === 'scenegraph') { | ||
return loadFile(url, layer.getLoadOptions()).then((_ref2) => { | ||
return load(url, layer.getLoadOptions()).then((_ref2) => { | ||
let scenes = _ref2.scenes; | ||
@@ -75,3 +75,4 @@ return scenes[0]; | ||
size: 3, | ||
accessor: 'getPosition' | ||
accessor: 'getPosition', | ||
transition: true | ||
}, | ||
@@ -86,3 +87,4 @@ instancePositions64xy: { | ||
accessor: 'getColor', | ||
defaultValue: DEFAULT_COLOR | ||
defaultValue: DEFAULT_COLOR, | ||
transition: true | ||
}, | ||
@@ -115,6 +117,6 @@ instanceModelMatrix: MATRIX_ATTRIBUTES | ||
updateState(_ref3) { | ||
let props = _ref3.props, | ||
oldProps = _ref3.oldProps, | ||
changeFlags = _ref3.changeFlags; | ||
updateState(params) { | ||
super.updateState(params); | ||
const props = params.props, | ||
oldProps = params.oldProps; | ||
@@ -180,7 +182,7 @@ if (props.scenegraph !== oldProps.scenegraph) { | ||
draw(_ref4) { | ||
let _ref4$moduleParameter = _ref4.moduleParameters, | ||
moduleParameters = _ref4$moduleParameter === void 0 ? null : _ref4$moduleParameter, | ||
_ref4$parameters = _ref4.parameters, | ||
parameters = _ref4$parameters === void 0 ? {} : _ref4$parameters; | ||
draw(_ref3) { | ||
let _ref3$moduleParameter = _ref3.moduleParameters, | ||
moduleParameters = _ref3$moduleParameter === void 0 ? null : _ref3$moduleParameter, | ||
_ref3$parameters = _ref3.parameters, | ||
parameters = _ref3$parameters === void 0 ? {} : _ref3$parameters; | ||
if (!this.state.scenegraph) return; | ||
@@ -187,0 +189,0 @@ const sizeScale = this.props.sizeScale; |
import { Layer, createIterable } from '@deck.gl/core'; | ||
import { Model, Geometry, Texture2D, fp64, PhongMaterial, isWebGL2 } from '@luma.gl/core'; | ||
import { loadImage, loadFile } from '@loaders.gl/core'; | ||
import { load } from '@loaders.gl/core'; | ||
import { loadImage } from '@loaders.gl/images'; | ||
const fp64LowPart = fp64.fp64LowPart; | ||
@@ -77,3 +78,3 @@ import { MATRIX_ATTRIBUTES } from '../utils/matrix'; | ||
if (propName === 'mesh') { | ||
return loadFile(url); | ||
return load(url); | ||
} | ||
@@ -80,0 +81,0 @@ |
@@ -9,3 +9,3 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; | ||
import { fp64, ScenegraphNode, log } from '@luma.gl/core'; | ||
import { loadFile } from '@loaders.gl/core'; | ||
import { load } from '@loaders.gl/core'; | ||
import { MATRIX_ATTRIBUTES } from '../utils/matrix'; | ||
@@ -37,3 +37,3 @@ import vs from './scenegraph-layer-vertex.glsl'; | ||
if (propName === 'scenegraph') { | ||
return loadFile(url, layer.getLoadOptions()).then(function (_ref2) { | ||
return load(url, layer.getLoadOptions()).then(function (_ref2) { | ||
var scenes = _ref2.scenes; | ||
@@ -97,3 +97,4 @@ return scenes[0]; | ||
size: 3, | ||
accessor: 'getPosition' | ||
accessor: 'getPosition', | ||
transition: true | ||
}, | ||
@@ -108,3 +109,4 @@ instancePositions64xy: { | ||
accessor: 'getColor', | ||
defaultValue: DEFAULT_COLOR | ||
defaultValue: DEFAULT_COLOR, | ||
transition: true | ||
}, | ||
@@ -158,7 +160,8 @@ instanceModelMatrix: MATRIX_ATTRIBUTES | ||
key: "updateState", | ||
value: function updateState(_ref3) { | ||
var props = _ref3.props, | ||
oldProps = _ref3.oldProps, | ||
changeFlags = _ref3.changeFlags; | ||
value: function updateState(params) { | ||
_get(_getPrototypeOf(ScenegraphLayer.prototype), "updateState", this).call(this, params); | ||
var props = params.props, | ||
oldProps = params.oldProps; | ||
if (props.scenegraph !== oldProps.scenegraph) { | ||
@@ -234,7 +237,7 @@ if (props.scenegraph instanceof ScenegraphNode) { | ||
key: "draw", | ||
value: function draw(_ref4) { | ||
var _ref4$moduleParameter = _ref4.moduleParameters, | ||
moduleParameters = _ref4$moduleParameter === void 0 ? null : _ref4$moduleParameter, | ||
_ref4$parameters = _ref4.parameters, | ||
parameters = _ref4$parameters === void 0 ? {} : _ref4$parameters; | ||
value: function draw(_ref3) { | ||
var _ref3$moduleParameter = _ref3.moduleParameters, | ||
moduleParameters = _ref3$moduleParameter === void 0 ? null : _ref3$moduleParameter, | ||
_ref3$parameters = _ref3.parameters, | ||
parameters = _ref3$parameters === void 0 ? {} : _ref3$parameters; | ||
if (!this.state.scenegraph) return; | ||
@@ -241,0 +244,0 @@ var sizeScale = this.props.sizeScale; |
@@ -9,3 +9,4 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck"; | ||
import { Model, Geometry, Texture2D, fp64, PhongMaterial, isWebGL2 } from '@luma.gl/core'; | ||
import { loadImage, loadFile } from '@loaders.gl/core'; | ||
import { load } from '@loaders.gl/core'; | ||
import { loadImage } from '@loaders.gl/images'; | ||
var fp64LowPart = fp64.fp64LowPart; | ||
@@ -88,3 +89,3 @@ import { MATRIX_ATTRIBUTES } from '../utils/matrix'; | ||
if (propName === 'mesh') { | ||
return loadFile(url); | ||
return load(url); | ||
} | ||
@@ -91,0 +92,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "7.0.0-rc.1", | ||
"version": "7.0.0", | ||
"publishConfig": { | ||
@@ -37,4 +37,5 @@ "access": "public" | ||
"dependencies": { | ||
"@loaders.gl/core": ">=1.0.0-alpha.2" | ||
"@loaders.gl/core": "^1.0.1", | ||
"@loaders.gl/images": "^1.0.1" | ||
} | ||
} |
@@ -25,3 +25,3 @@ // Copyright (c) 2019 Uber Technologies, Inc. | ||
import {fp64, ScenegraphNode, log} from '@luma.gl/core'; | ||
import {loadFile} from '@loaders.gl/core'; | ||
import {load} from '@loaders.gl/core'; | ||
@@ -42,3 +42,3 @@ import {MATRIX_ATTRIBUTES} from '../utils/matrix'; | ||
if (propName === 'scenegraph') { | ||
return loadFile(url, layer.getLoadOptions()).then(({scenes}) => scenes[0]); | ||
return load(url, layer.getLoadOptions()).then(({scenes}) => scenes[0]); | ||
} | ||
@@ -69,3 +69,4 @@ | ||
size: 3, | ||
accessor: 'getPosition' | ||
accessor: 'getPosition', | ||
transition: true | ||
}, | ||
@@ -80,3 +81,4 @@ instancePositions64xy: { | ||
accessor: 'getColor', | ||
defaultValue: DEFAULT_COLOR | ||
defaultValue: DEFAULT_COLOR, | ||
transition: true | ||
}, | ||
@@ -106,3 +108,6 @@ instanceModelMatrix: MATRIX_ATTRIBUTES | ||
updateState({props, oldProps, changeFlags}) { | ||
updateState(params) { | ||
super.updateState(params); | ||
const {props, oldProps} = params; | ||
if (props.scenegraph !== oldProps.scenegraph) { | ||
@@ -109,0 +114,0 @@ if (props.scenegraph instanceof ScenegraphNode) { |
@@ -28,3 +28,4 @@ // Note: This file will either be moved back to deck.gl or reformatted to web-monorepo standards | ||
import {Model, Geometry, Texture2D, fp64, PhongMaterial, isWebGL2} from '@luma.gl/core'; | ||
import {loadImage, loadFile} from '@loaders.gl/core'; | ||
import {load} from '@loaders.gl/core'; | ||
import {loadImage} from '@loaders.gl/images'; | ||
const {fp64LowPart} = fp64; | ||
@@ -111,3 +112,3 @@ | ||
if (propName === 'mesh') { | ||
return loadFile(url); | ||
return load(url); | ||
} | ||
@@ -114,0 +115,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
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
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1833035
14436
2
3
40
+ Added@loaders.gl/images@^1.0.1
- Removed@loaders.gl/core@4.3.3(transitive)
- Removed@loaders.gl/loader-utils@4.3.3(transitive)
- Removed@loaders.gl/schema@4.3.3(transitive)
- Removed@loaders.gl/worker-utils@4.3.3(transitive)
- Removed@probe.gl/env@4.0.9(transitive)
- Removed@probe.gl/log@4.0.9(transitive)
- Removed@probe.gl/stats@4.0.9(transitive)
- Removed@types/geojson@7946.0.14(transitive)
Updated@loaders.gl/core@^1.0.1