Skip to content

Commit

Permalink
refs CesiumGS#5152 revert commit
Browse files Browse the repository at this point in the history
  • Loading branch information
geoscan-builder committed Dec 13, 2018
1 parent ca38e70 commit fd5f6a6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 39 deletions.
20 changes: 0 additions & 20 deletions Source/Scene/Cesium3DTileset.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ define([
'../Core/Resource',
'../Core/RuntimeError',
'../Core/Transforms',
'../DataSources/ConstantProperty',
'../Renderer/ClearCommand',
'../Renderer/Pass',
'../ThirdParty/when',
Expand Down Expand Up @@ -63,7 +62,6 @@ define([
Resource,
RuntimeError,
Transforms,
ConstantProperty,
ClearCommand,
Pass,
when,
Expand Down Expand Up @@ -287,24 +285,6 @@ define([
*/
this.shadows = defaultValue(options.shadows, ShadowMode.ENABLED);

/**
* Determines whether backfaces of points / mesh are hidden
*
* @type {boolean}
* @default false
*/
var backFaceCulling = defaultValue(options.backFaceCulling, false);
this.backFaceCulling = new ConstantProperty(backFaceCulling);

/**
* Determines whether the tileset is lighted by the sun
*
* @type {boolean}
* @default true
*/
var normalShading = defaultValue(options.normalShading, true);
this.normalShading = new ConstantProperty(normalShading);

/**
* Determines if the tileset will be shown.
*
Expand Down
18 changes: 2 additions & 16 deletions Source/Scene/PointCloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ define([
'../Core/PrimitiveType',
'../Core/RuntimeError',
'../Core/Transforms',
'../DataSources/ConstantProperty',
'../Renderer/Buffer',
'../Renderer/BufferUsage',
'../Renderer/DrawCommand',
Expand Down Expand Up @@ -63,7 +62,6 @@ define([
PrimitiveType,
RuntimeError,
Transforms,
ConstantProperty,
Buffer,
BufferUsage,
DrawCommand,
Expand Down Expand Up @@ -149,13 +147,11 @@ define([

// Use per-point normals to hide back-facing points.
this.backFaceCulling = false;
bindProperty(this, 'backFaceCulling', options.backFaceCulling);
this._backFaceCulling = this.backFaceCulling;
this._backFaceCulling = false;

// Whether to enable normal shading
this.normalShading = true;
bindProperty(this, 'normalShading', options.normalShading);
this._normalShading = this.normalShading;
this._normalShading = true;

this._opaqueRenderState = undefined;
this._translucentRenderState = undefined;
Expand Down Expand Up @@ -253,16 +249,6 @@ define([

var sizeOfUint32 = Uint32Array.BYTES_PER_ELEMENT;

function bindProperty(object, field, property) {
if (property) {
var val = property.getValue();
object[field] = val;
property.definitionChanged.addEventListener(function(newValue) {
object[field] = newValue.getValue();
});
}
}

function initialize(pointCloud, options) {
var arrayBuffer = options.arrayBuffer;
var byteOffset = defaultValue(options.byteOffset, 0);
Expand Down
4 changes: 1 addition & 3 deletions Source/Scene/PointCloud3DTileContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ define([
fragmentShaderLoaded : getFragmentShaderLoaded(this),
uniformMapLoaded : getUniformMapLoaded(this),
batchTableLoaded : getBatchTableLoaded(this),
pickIdLoaded : getPickIdLoaded(this),
normalShading : tileset.normalShading,
backfaceCulling : tileset.backfaceCulling
pickIdLoaded : getPickIdLoaded(this)
});
}

Expand Down

0 comments on commit fd5f6a6

Please sign in to comment.