Skip to content

Commit

Permalink
Fix styling edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
lilleyse committed Oct 18, 2016
1 parent f0f86ad commit 83efc1b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 29 deletions.
19 changes: 8 additions & 11 deletions Source/Scene/PointCloud3DTileContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,10 @@ define([
var hasBatchTable = defined(batchTable);

var styleableVertexAttributes = [];
var styleableShaderAttributes = {};
content._styleableShaderAttributes = styleableShaderAttributes;

if (hasStyleableProperties) {
var styleableShaderAttributes = {};
var attributeLocation = numberOfAttributes;

for (var name in styleableProperties) {
Expand Down Expand Up @@ -533,8 +534,6 @@ define([
++attributeLocation;
}
}

content._styleableShaderAttributes = styleableShaderAttributes;
}

var uniformMap = {
Expand Down Expand Up @@ -875,14 +874,12 @@ define([

// Disable vertex attributes that aren't used in the style, enable attributes that are
var styleableShaderAttributes = content._styleableShaderAttributes;
if (defined(styleableShaderAttributes)) {
for (name in styleableShaderAttributes) {
if (styleableShaderAttributes.hasOwnProperty(name)) {
attribute = styleableShaderAttributes[name];
var enabled = (styleableProperties.indexOf(name) >= 0);
var vertexAttribute = getVertexAttribute(vertexArray, attribute.location);
vertexAttribute.enabled = enabled;
}
for (name in styleableShaderAttributes) {
if (styleableShaderAttributes.hasOwnProperty(name)) {
attribute = styleableShaderAttributes[name];
var enabled = (styleableProperties.indexOf(name) >= 0);
var vertexAttribute = getVertexAttribute(vertexArray, attribute.location);
vertexAttribute.enabled = enabled;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,6 @@
"asset": {
"version": "0.0"
},
"properties": {
"id": {
"minimum": 0,
"maximum": 9
},
"Longitude": {
"minimum": -1.3197190069941716,
"maximum": -1.3196399825465384
},
"Latitude": {
"minimum": 0.6988468038519597,
"maximum": 0.6989046685398855
},
"Height": {
"minimum": 6,
"maximum": 84
}
},
"geometricError": 240,
"root": {
"boundingVolume": {
Expand Down

0 comments on commit 83efc1b

Please sign in to comment.