@antv/g-webgpu-engine
Advanced tools
Comparing version 0.5.4-alpha.3 to 0.5.4-alpha.6
@@ -1,4 +0,3 @@ | ||
import _isTypedArray from "lodash/isTypedArray"; | ||
import _isPlainObject from "lodash/isPlainObject"; | ||
import isPlainObject from 'lodash-es/isPlainObject'; | ||
import isTypedArray from 'lodash-es/isTypedArray'; | ||
/** | ||
@@ -9,2 +8,3 @@ * 考虑结构体命名, eg: | ||
*/ | ||
export function extractUniforms(uniforms) { | ||
@@ -22,3 +22,3 @@ var extractedUniforms = {}; | ||
Array.isArray(uniformValue) && typeof uniformValue[0] === 'number' || // u_A: [1, 2, 3] | ||
_isTypedArray(uniformValue) || // u_A: Float32Array | ||
isTypedArray(uniformValue) || // u_A: Float32Array | ||
// @ts-ignore | ||
@@ -32,3 +32,3 @@ uniformValue === '' || // @ts-ignore | ||
if (_isPlainObject(uniformValue)) { | ||
if (isPlainObject(uniformValue)) { | ||
Object.keys(uniformValue).forEach(function (childName) { | ||
@@ -35,0 +35,0 @@ extractUniformsRecursively(childName, // @ts-ignore |
@@ -7,3 +7,2 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray"; | ||
import _createClass from "@babel/runtime/helpers/createClass"; | ||
import _isTypedArray from "lodash/isTypedArray"; | ||
@@ -15,2 +14,3 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
import { AST_TOKEN_TYPES, createEntity, STORAGE_CLASS } from '@antv/g-webgpu-core'; | ||
import isTypedArray from 'lodash-es/isTypedArray'; | ||
@@ -87,3 +87,3 @@ /* babel-plugin-inline-import './shaders/quad.vert.glsl' */ | ||
} else if (storageClass === STORAGE_CLASS.Uniform) { | ||
if (data && (Array.isArray(data) || _isTypedArray(data)) && data.length > 16) { | ||
if (data && (Array.isArray(data) || isTypedArray(data)) && data.length > 16) { | ||
// up to mat4 which includes 16 elements | ||
@@ -361,3 +361,3 @@ throw new Error("invalid data type ".concat(type)); | ||
originalDataLength: originalDataLength, | ||
typedArrayConstructor: _isTypedArray(data) ? data.constructor : undefined, | ||
typedArrayConstructor: isTypedArray(data) ? data.constructor : undefined, | ||
textureWidth: width, | ||
@@ -364,0 +364,0 @@ texture: texture, |
@@ -6,6 +6,6 @@ import _regeneratorRuntime from "@babel/runtime/regenerator"; | ||
import _createClass from "@babel/runtime/helpers/createClass"; | ||
import _isNumber from "lodash/isNumber"; | ||
import { AST_TOKEN_TYPES, isSafari, STORAGE_CLASS, createEntity } from '@antv/g-webgpu-core'; | ||
import { AST_TOKEN_TYPES, createEntity, isSafari, STORAGE_CLASS } from '@antv/g-webgpu-core'; | ||
import * as WebGPUConstants from '@webgpu/types/dist/constants'; | ||
import isNil from 'lodash/isNil'; | ||
import isNil from 'lodash-es/isNil'; | ||
import isNumber from 'lodash-es/isNumber'; | ||
import WebGPUBuffer from './WebGPUBuffer'; | ||
@@ -65,3 +65,3 @@ | ||
uniforms.forEach(function (uniform) { | ||
if (_isNumber(uniform.data)) { | ||
if (isNumber(uniform.data)) { | ||
_this.uniformGPUBufferLayout.push({ | ||
@@ -68,0 +68,0 @@ name: uniform.name, |
@@ -15,3 +15,3 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray"; | ||
import * as WebGPUConstants from '@webgpu/types/dist/constants'; | ||
import isNil from 'lodash/isNil'; | ||
import isNil from 'lodash-es/isNil'; | ||
import { extractUniforms } from '../utils/uniform'; | ||
@@ -18,0 +18,0 @@ import { getColorStateDescriptors, getCullMode, getDepthStencilStateDescriptor, primitiveMap } from './constants'; |
@@ -10,5 +10,5 @@ "use strict"; | ||
var _isTypedArray2 = _interopRequireDefault(require("lodash/isTypedArray")); | ||
var _isPlainObject = _interopRequireDefault(require("lodash-es/isPlainObject")); | ||
var _isPlainObject2 = _interopRequireDefault(require("lodash/isPlainObject")); | ||
var _isTypedArray = _interopRequireDefault(require("lodash-es/isTypedArray")); | ||
@@ -32,3 +32,3 @@ /** | ||
Array.isArray(uniformValue) && typeof uniformValue[0] === 'number' || // u_A: [1, 2, 3] | ||
(0, _isTypedArray2.default)(uniformValue) || // u_A: Float32Array | ||
(0, _isTypedArray.default)(uniformValue) || // u_A: Float32Array | ||
// @ts-ignore | ||
@@ -42,3 +42,3 @@ uniformValue === '' || // @ts-ignore | ||
if ((0, _isPlainObject2.default)(uniformValue)) { | ||
if ((0, _isPlainObject.default)(uniformValue)) { | ||
Object.keys(uniformValue).forEach(function (childName) { | ||
@@ -45,0 +45,0 @@ extractUniformsRecursively(childName, // @ts-ignore |
@@ -22,6 +22,6 @@ "use strict"; | ||
var _isTypedArray2 = _interopRequireDefault(require("lodash/isTypedArray")); | ||
var _gWebgpuCore = require("@antv/g-webgpu-core"); | ||
var _isTypedArray = _interopRequireDefault(require("lodash-es/isTypedArray")); | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
@@ -100,3 +100,3 @@ | ||
} else if (storageClass === _gWebgpuCore.STORAGE_CLASS.Uniform) { | ||
if (data && (Array.isArray(data) || (0, _isTypedArray2.default)(data)) && data.length > 16) { | ||
if (data && (Array.isArray(data) || (0, _isTypedArray.default)(data)) && data.length > 16) { | ||
// up to mat4 which includes 16 elements | ||
@@ -374,3 +374,3 @@ throw new Error("invalid data type ".concat(type)); | ||
originalDataLength: originalDataLength, | ||
typedArrayConstructor: (0, _isTypedArray2.default)(data) ? data.constructor : undefined, | ||
typedArrayConstructor: (0, _isTypedArray.default)(data) ? data.constructor : undefined, | ||
textureWidth: width, | ||
@@ -377,0 +377,0 @@ texture: texture, |
@@ -22,4 +22,2 @@ "use strict"; | ||
var _isNumber2 = _interopRequireDefault(require("lodash/isNumber")); | ||
var _gWebgpuCore = require("@antv/g-webgpu-core"); | ||
@@ -29,4 +27,6 @@ | ||
var _isNil = _interopRequireDefault(require("lodash/isNil")); | ||
var _isNil = _interopRequireDefault(require("lodash-es/isNil")); | ||
var _isNumber = _interopRequireDefault(require("lodash-es/isNumber")); | ||
var _WebGPUBuffer = _interopRequireDefault(require("./WebGPUBuffer")); | ||
@@ -85,3 +85,3 @@ | ||
uniforms.forEach(function (uniform) { | ||
if ((0, _isNumber2.default)(uniform.data)) { | ||
if ((0, _isNumber.default)(uniform.data)) { | ||
_this.uniformGPUBufferLayout.push({ | ||
@@ -88,0 +88,0 @@ name: uniform.name, |
@@ -30,3 +30,3 @@ "use strict"; | ||
var _isNil = _interopRequireDefault(require("lodash/isNil")); | ||
var _isNil = _interopRequireDefault(require("lodash-es/isNil")); | ||
@@ -33,0 +33,0 @@ var _uniform = require("../utils/uniform"); |
{ | ||
"name": "@antv/g-webgpu-engine", | ||
"version": "0.5.4-alpha.3", | ||
"version": "0.5.4-alpha.6", | ||
"description": "", | ||
@@ -25,3 +25,3 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@antv/g-webgpu-core": "^0.5.4-alpha.3", | ||
"@antv/g-webgpu-core": "^0.5.4-alpha.6", | ||
"@webgpu/glslang": "^0.0.15", | ||
@@ -33,3 +33,3 @@ "@webgpu/types": "^0.0.31", | ||
"inversify-inject-decorators": "^3.1.0", | ||
"lodash": "^4.17.15", | ||
"lodash-es": "^4.17.15", | ||
"probe.gl": "^3.1.1", | ||
@@ -36,0 +36,0 @@ "reflect-metadata": "^0.1.13", |
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
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
689328
+ Addedlodash-es@^4.17.15
+ Addedlodash-es@4.17.21(transitive)
- Removedlodash@^4.17.15
- Removedlodash@4.17.21(transitive)