@luma.gl/engine
Advanced tools
Comparing version 9.0.9 to 9.0.10
@@ -23,2 +23,4 @@ import type { TypedArray, RenderPipelineProps, RenderPipelineParameters } from '@luma.gl/core'; | ||
shaderInputs?: ShaderInputs; | ||
/** Bindings */ | ||
bindings?: Record<string, Binding>; | ||
/** Parameters that are built into the pipeline */ | ||
@@ -28,6 +30,8 @@ parameters?: RenderPipelineParameters; | ||
geometry?: GPUGeometry | Geometry | null; | ||
/** @deprecated Use instanced rendering? Will be auto-detected in 9.1 */ | ||
isInstanced?: boolean; | ||
/** instance count */ | ||
instanceCount?: number; | ||
/** Vertex count */ | ||
vertexCount?: number; | ||
/** instance count */ | ||
instanceCount?: number; | ||
indexBuffer?: Buffer | null; | ||
@@ -80,6 +84,8 @@ /** @note this is really a map of buffers, not a map of attributes */ | ||
bufferLayout: BufferLayout[]; | ||
/** Use instanced rendering */ | ||
isInstanced: boolean | undefined; | ||
/** instance count. `undefined` means not instanced */ | ||
instanceCount: number; | ||
/** Vertex count */ | ||
vertexCount: number; | ||
/** instance count */ | ||
instanceCount: number; | ||
/** Index buffer */ | ||
@@ -148,2 +154,7 @@ indexBuffer: Buffer | null; | ||
/** | ||
* Updates the instance count (used in draw calls) | ||
* @note Any attributes with stepMode=instance need to be at least this big | ||
*/ | ||
setInstanceCount(instanceCount: number): void; | ||
/** | ||
* Updates the vertex count (used in draw calls) | ||
@@ -153,8 +164,5 @@ * @note Any attributes with stepMode=vertex need to be at least this big | ||
setVertexCount(vertexCount: number): void; | ||
/** | ||
* Updates the instance count (used in draw calls) | ||
* @note Any attributes with stepMode=instance need to be at least this big | ||
*/ | ||
setInstanceCount(instanceCount: number): void; | ||
/** Set the shader inputs */ | ||
setShaderInputs(shaderInputs: ShaderInputs): void; | ||
/** Update uniform buffers from the model's shader inputs */ | ||
updateShaderInputs(): void; | ||
@@ -161,0 +169,0 @@ /** |
@@ -42,2 +42,5 @@ // luma.gl | ||
varyings: [], | ||
isInstanced: undefined, | ||
instanceCount: 0, | ||
vertexCount: 0, | ||
shaderInputs: undefined, | ||
@@ -67,6 +70,8 @@ pipelineFactory: undefined, | ||
// Dynamic properties | ||
/** Use instanced rendering */ | ||
isInstanced = undefined; | ||
/** instance count. `undefined` means not instanced */ | ||
instanceCount = 0; | ||
/** Vertex count */ | ||
vertexCount; | ||
/** instance count */ | ||
instanceCount = 0; | ||
/** Index buffer */ | ||
@@ -166,4 +171,4 @@ indexBuffer = null; | ||
// Apply any dynamic settings that will not trigger pipeline change | ||
if (props.vertexCount) { | ||
this.setVertexCount(props.vertexCount); | ||
if (props.isInstanced) { | ||
this.isInstanced = props.isInstanced; | ||
} | ||
@@ -173,2 +178,5 @@ if (props.instanceCount) { | ||
} | ||
if (props.vertexCount) { | ||
this.setVertexCount(props.vertexCount); | ||
} | ||
if (props.indexBuffer) { | ||
@@ -255,2 +263,3 @@ this.setIndexBuffer(props.indexBuffer); | ||
vertexArray: this.vertexArray, | ||
isInstanced: this.isInstanced, | ||
vertexCount: this.vertexCount, | ||
@@ -343,2 +352,15 @@ instanceCount: this.instanceCount, | ||
/** | ||
* Updates the instance count (used in draw calls) | ||
* @note Any attributes with stepMode=instance need to be at least this big | ||
*/ | ||
setInstanceCount(instanceCount) { | ||
this.instanceCount = instanceCount; | ||
// luma.gl examples don't set props.isInstanced and rely on auto-detection | ||
// but deck.gl sets instanceCount even for models that are not instanced. | ||
if (this.isInstanced === undefined && instanceCount > 0) { | ||
this.isInstanced = true; | ||
} | ||
this.setNeedsRedraw('instanceCount'); | ||
} | ||
/** | ||
* Updates the vertex count (used in draw calls) | ||
@@ -351,10 +373,3 @@ * @note Any attributes with stepMode=vertex need to be at least this big | ||
} | ||
/** | ||
* Updates the instance count (used in draw calls) | ||
* @note Any attributes with stepMode=instance need to be at least this big | ||
*/ | ||
setInstanceCount(instanceCount) { | ||
this.instanceCount = instanceCount; | ||
this.setNeedsRedraw('instanceCount'); | ||
} | ||
/** Set the shader inputs */ | ||
setShaderInputs(shaderInputs) { | ||
@@ -370,2 +385,3 @@ this.shaderInputs = shaderInputs; | ||
} | ||
/** Update uniform buffers from the model's shader inputs */ | ||
updateShaderInputs() { | ||
@@ -372,0 +388,0 @@ this._uniformStore.setUniforms(this.shaderInputs.getUniformValues()); |
{ | ||
"name": "@luma.gl/engine", | ||
"version": "9.0.9", | ||
"version": "9.0.10", | ||
"description": "3D Engine Components for luma.gl", | ||
@@ -46,3 +46,3 @@ "type": "module", | ||
"dependencies": { | ||
"@luma.gl/shadertools": "9.0.9", | ||
"@luma.gl/shadertools": "9.0.10", | ||
"@math.gl/core": "^4.0.0", | ||
@@ -52,3 +52,3 @@ "@probe.gl/log": "^4.0.2", | ||
}, | ||
"gitHead": "1715a33d52c6d23227cd3f62e163a40ea9acec9e" | ||
"gitHead": "aa5e354fd9502a84e43c9e312ad33d9c155fed01" | ||
} |
@@ -41,3 +41,4 @@ // luma.gl | ||
shaderInputs?: ShaderInputs; | ||
/** Bindings */ | ||
bindings?: Record<string, Binding>; | ||
/** Parameters that are built into the pipeline */ | ||
@@ -49,6 +50,8 @@ parameters?: RenderPipelineParameters; | ||
/** @deprecated Use instanced rendering? Will be auto-detected in 9.1 */ | ||
isInstanced?: boolean; | ||
/** instance count */ | ||
instanceCount?: number; | ||
/** Vertex count */ | ||
vertexCount?: number; | ||
/** instance count */ | ||
instanceCount?: number; | ||
@@ -109,2 +112,6 @@ indexBuffer?: Buffer | null; | ||
isInstanced: undefined!, | ||
instanceCount: 0, | ||
vertexCount: 0, | ||
shaderInputs: undefined!, | ||
@@ -141,6 +148,8 @@ pipelineFactory: undefined!, | ||
/** Use instanced rendering */ | ||
isInstanced: boolean | undefined = undefined; | ||
/** instance count. `undefined` means not instanced */ | ||
instanceCount: number = 0; | ||
/** Vertex count */ | ||
vertexCount: number; | ||
/** instance count */ | ||
instanceCount: number = 0; | ||
@@ -267,8 +276,12 @@ /** Index buffer */ | ||
// Apply any dynamic settings that will not trigger pipeline change | ||
if (props.vertexCount) { | ||
this.setVertexCount(props.vertexCount); | ||
if (props.isInstanced) { | ||
this.isInstanced = props.isInstanced; | ||
} | ||
if (props.instanceCount) { | ||
this.setInstanceCount(props.instanceCount); | ||
} | ||
if (props.vertexCount) { | ||
this.setVertexCount(props.vertexCount); | ||
} | ||
if (props.indexBuffer) { | ||
@@ -366,2 +379,3 @@ this.setIndexBuffer(props.indexBuffer); | ||
vertexArray: this.vertexArray, | ||
isInstanced: this.isInstanced, | ||
vertexCount: this.vertexCount, | ||
@@ -463,2 +477,16 @@ instanceCount: this.instanceCount, | ||
/** | ||
* Updates the instance count (used in draw calls) | ||
* @note Any attributes with stepMode=instance need to be at least this big | ||
*/ | ||
setInstanceCount(instanceCount: number): void { | ||
this.instanceCount = instanceCount; | ||
// luma.gl examples don't set props.isInstanced and rely on auto-detection | ||
// but deck.gl sets instanceCount even for models that are not instanced. | ||
if (this.isInstanced === undefined && instanceCount > 0) { | ||
this.isInstanced = true; | ||
} | ||
this.setNeedsRedraw('instanceCount'); | ||
} | ||
/** | ||
* Updates the vertex count (used in draw calls) | ||
@@ -472,11 +500,3 @@ * @note Any attributes with stepMode=vertex need to be at least this big | ||
/** | ||
* Updates the instance count (used in draw calls) | ||
* @note Any attributes with stepMode=instance need to be at least this big | ||
*/ | ||
setInstanceCount(instanceCount: number): void { | ||
this.instanceCount = instanceCount; | ||
this.setNeedsRedraw('instanceCount'); | ||
} | ||
/** Set the shader inputs */ | ||
setShaderInputs(shaderInputs: ShaderInputs): void { | ||
@@ -493,2 +513,3 @@ this.shaderInputs = shaderInputs; | ||
/** Update uniform buffers from the model's shader inputs */ | ||
updateShaderInputs(): void { | ||
@@ -495,0 +516,0 @@ this._uniformStore.setUniforms(this.shaderInputs.getUniformValues()); |
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
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
1077525
21932
+ Added@luma.gl/shadertools@9.0.10(transitive)
- Removed@luma.gl/shadertools@9.0.9(transitive)
Updated@luma.gl/shadertools@9.0.10