Socket
Socket
Sign inDemoInstall

@luma.gl/engine

Package Overview
Dependencies
Maintainers
7
Versions
173
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@luma.gl/engine - npm Package Compare versions

Comparing version 9.0.0-alpha.45 to 9.0.0-alpha.46

9

dist/model/model.d.ts

@@ -1,2 +0,2 @@

import type { TypedArray, RenderPipelineProps, RenderPipelineParameters, BufferLayout, VertexArray, AttributeInfo } from '@luma.gl/core';
import type { TypedArray, RenderPipelineProps, RenderPipelineParameters, BufferLayout, VertexArray, AttributeInfo, TransformFeedback } from '@luma.gl/core';
import type { Binding, UniformValue, PrimitiveTopology } from '@luma.gl/core';

@@ -39,2 +39,3 @@ import { Device, Buffer, RenderPipeline, RenderPass } from '@luma.gl/core';

constantAttributes?: Record<string, TypedArray>;
transformFeedback?: TransformFeedback;
/** Mapped uniforms for shadertool modules */

@@ -89,2 +90,4 @@ moduleSettings?: Record<string, Record<string, any>>;

vertexArray: VertexArray;
/** TransformFeedback, WebGL 2 only. */
transformFeedback: TransformFeedback | null;
_pipelineNeedsUpdate: string | false;

@@ -141,2 +144,6 @@ _attributeInfos: Record<string, AttributeInfo>;

/**
* Updates optional transform feedback. WebGL 2 only.
*/
setTransformFeedback(transformFeedback: TransformFeedback | null): void;
/**
* @deprecated Updates shader module settings (which results in uniforms being set)

@@ -143,0 +150,0 @@ */

@@ -26,2 +26,3 @@ import { RenderPipeline, log, uid, deepEqual, splitUniformsAndBindings } from '@luma.gl/core';

this.vertexArray = void 0;
this.transformFeedback = null;
this._pipelineNeedsUpdate = 'newly created';

@@ -97,2 +98,5 @@ this._attributeInfos = {};

}
if (props.transformFeedback) {
this.transformFeedback = props.transformFeedback;
}
this.setUniforms(this._getModuleUniforms());

@@ -112,3 +116,4 @@ Object.seal(this);

vertexCount: this.vertexCount,
instanceCount: this.instanceCount
instanceCount: this.instanceCount,
transformFeedback: this.transformFeedback
});

@@ -167,2 +172,5 @@ }

}
setTransformFeedback(transformFeedback) {
this.transformFeedback = transformFeedback;
}
updateModuleSettings(props) {

@@ -189,2 +197,3 @@ this.setShaderModuleProps(props);

if (!bufferLayout) {
log.warn(`Model(${this.id}): Missing layout for buffer "${bufferName}".`)();
continue;

@@ -261,2 +270,3 @@ }

pipelineFactory: undefined,
transformFeedback: undefined,
shaderAssembler: ShaderAssembler.getDefaultShaderAssembler()

@@ -263,0 +273,0 @@ };

10

package.json
{
"name": "@luma.gl/engine",
"version": "9.0.0-alpha.45",
"version": "9.0.0-alpha.46",
"description": "WebGL2 Components for High Performance Rendering and Computation",

@@ -43,5 +43,5 @@ "type": "module",

"@babel/runtime": "^7.0.0",
"@luma.gl/constants": "9.0.0-alpha.45",
"@luma.gl/core": "9.0.0-alpha.45",
"@luma.gl/shadertools": "9.0.0-alpha.45",
"@luma.gl/constants": "9.0.0-alpha.46",
"@luma.gl/core": "9.0.0-alpha.46",
"@luma.gl/shadertools": "9.0.0-alpha.46",
"@math.gl/core": "^4.0.0",

@@ -51,3 +51,3 @@ "@probe.gl/log": "^4.0.2",

},
"gitHead": "38b58964a1287a84ac021fa02d4432a5d3f960a0"
"gitHead": "c1e0602fd739f8d08e6532034a02e8cf658e188a"
}

@@ -10,6 +10,16 @@ // luma.gl, MIT license

VertexArray,
AttributeInfo
AttributeInfo,
TransformFeedback
} from '@luma.gl/core';
import type {Binding, UniformValue, PrimitiveTopology} from '@luma.gl/core';
import {Device, Buffer, RenderPipeline, RenderPass, log, uid, deepEqual, splitUniformsAndBindings} from '@luma.gl/core';
import {
Device,
Buffer,
RenderPipeline,
RenderPass,
log,
uid,
deepEqual,
splitUniformsAndBindings
} from '@luma.gl/core';
import {getAttributeInfosFromLayouts} from '@luma.gl/core';

@@ -54,2 +64,4 @@ import type {ShaderModule, PlatformInfo} from '@luma.gl/shadertools';

transformFeedback?: TransformFeedback;
/** Mapped uniforms for shadertool modules */

@@ -84,2 +96,3 @@ moduleSettings?: Record<string, Record<string, any>>;

pipelineFactory: undefined!,
transformFeedback: undefined,
shaderAssembler: ShaderAssembler.getDefaultShaderAssembler()

@@ -133,2 +146,5 @@ };

/** TransformFeedback, WebGL 2 only. */
transformFeedback: TransformFeedback | null = null;
_pipelineNeedsUpdate: string | false = 'newly created';

@@ -201,3 +217,3 @@ _attributeInfos: Record<string, AttributeInfo> = {};

if (props.indices) {
throw new Error('Model.props.indices removed. Use props.indexBuffer')
throw new Error('Model.props.indices removed. Use props.indexBuffer');
}

@@ -222,2 +238,5 @@ if (props.indexBuffer) {

}
if (props.transformFeedback) {
this.transformFeedback = props.transformFeedback;
}

@@ -250,3 +269,4 @@ this.setUniforms(this._getModuleUniforms()); // Get all default module uniforms

vertexCount: this.vertexCount,
instanceCount: this.instanceCount
instanceCount: this.instanceCount,
transformFeedback: this.transformFeedback
});

@@ -307,3 +327,3 @@ }

this.pipeline = this._updatePipeline();
// vertex array needs to be updated if we update buffer layout,

@@ -361,2 +381,9 @@ // but not if we update parameters

/**
* Updates optional transform feedback. WebGL 2 only.
*/
setTransformFeedback(transformFeedback: TransformFeedback | null): void {
this.transformFeedback = transformFeedback;
}
/**
* @deprecated Updates shader module settings (which results in uniforms being set)

@@ -407,2 +434,3 @@ */

if (!bufferLayout) {
log.warn(`Model(${this.id}): Missing layout for buffer "${bufferName}".`)();
continue; // eslint-disable-line no-continue

@@ -445,3 +473,5 @@ }

} else {
log.warn(`Model "${this.id}: Ignoring constant supplied for unknown attribute "${attributeName}"`)();
log.warn(
`Model "${this.id}: Ignoring constant supplied for unknown attribute "${attributeName}"`
)();
}

@@ -458,3 +488,6 @@ }

if (this.pipeline) {
log.log(1, `Model ${this.id}: Recreating pipeline because "${this._pipelineNeedsUpdate}".`)();
log.log(
1,
`Model ${this.id}: Recreating pipeline because "${this._pipelineNeedsUpdate}".`
)();
}

@@ -468,3 +501,9 @@ this._pipelineNeedsUpdate = false;

vs: this.device.createShader({id: '{$this.id}-vertex', stage: 'vertex', source: this.vs}),
fs: this.fs ? this.device.createShader({id: '{$this.id}-fragment', stage: 'fragment', source: this.fs}) : null
fs: this.fs
? this.device.createShader({
id: '{$this.id}-fragment',
stage: 'fragment',
source: this.fs
})
: null
});

@@ -471,0 +510,0 @@ this._attributeInfos = getAttributeInfosFromLayouts(

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc