Skip to content

Commit 464d2cd

Browse files
authored
Merge pull request #7638 from apopiak/call_prepareVertexAttribute_with_name
fix: call prepareVertexAttribute with a name so the error message is informative
2 parents fe60ac8 + 77d6933 commit 464d2cd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CONTRIBUTORS.md

+1
Original file line numberDiff line numberDiff line change
@@ -204,3 +204,4 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to contribute to Cesiu
204204
* [Mirco Kroon](https://github.com/mircokroon)
205205
* [Rikku-x](https://github.com/Rikku-x)
206206
* [Adrien David](https://github.com/adridavid)
207+
* [Alexander Popiak](https://github.com/apopiak)

Source/Scene/PointCloud.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ define([
516516
return boundingSphere;
517517
}
518518

519-
function prepareVertexAttribute(typedArray) {
519+
function prepareVertexAttribute(typedArray, name) {
520520
// WebGL does not support UNSIGNED_INT, INT, or DOUBLE vertex attributes. Convert these to FLOAT.
521521
var componentDatatype = ComponentDatatype.fromTypedArray(typedArray);
522522
if (componentDatatype === ComponentDatatype.INT || componentDatatype === ComponentDatatype.UNSIGNED_INT || componentDatatype === ComponentDatatype.DOUBLE) {
@@ -573,7 +573,7 @@ define([
573573
for (var name in styleableProperties) {
574574
if (styleableProperties.hasOwnProperty(name)) {
575575
var property = styleableProperties[name];
576-
var typedArray = prepareVertexAttribute(property.typedArray);
576+
var typedArray = prepareVertexAttribute(property.typedArray, name);
577577
componentsPerAttribute = property.componentCount;
578578
componentDatatype = ComponentDatatype.fromTypedArray(typedArray);
579579

@@ -634,7 +634,7 @@ define([
634634

635635
var batchIdsVertexBuffer;
636636
if (hasBatchIds) {
637-
batchIds = prepareVertexAttribute(batchIds);
637+
batchIds = prepareVertexAttribute(batchIds, 'batchIds');
638638
batchIdsVertexBuffer = Buffer.createVertexBuffer({
639639
context : context,
640640
typedArray : batchIds,

0 commit comments

Comments
 (0)