You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGES.md
+4-1
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,10 @@ Change Log
4
4
### 1.50 - 2018-10-01
5
5
6
6
##### Additions :tada:
7
+
* Added support for glTF extension [KHR_materials_pbrSpecularGlossiness](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_pbrSpecularGlossiness)[#7006](https://github.com/AnalyticalGraphicsInc/cesium/pull/7006).
8
+
* Added support for glTF extension [KHR_materials_unlit](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_materials_unlit)[#6977](https://github.com/AnalyticalGraphicsInc/cesium/pull/6977).
9
+
* Added support for glTF extensions [KHR_techniques_webgl](https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Khronos/KHR_techniques_webgl) and [KHR_blend](https://github.com/KhronosGroup/glTF/pull/1302). [#6805](https://github.com/AnalyticalGraphicsInc/cesium/pull/6805)
10
+
* Update [gltf-pipeline](https://github.com/AnalyticalGraphicsInc/gltf-pipeline/) to 2.0. [#6805](https://github.com/AnalyticalGraphicsInc/cesium/pull/6805)
7
11
* Added `cartographicLimitRectangle` to `Globe`. Use this to limit terrain and imagery to a specific `Rectangle` area. [#6987](https://github.com/AnalyticalGraphicsInc/cesium/pull/6987)
8
12
* Added `OpenCageGeocoderService`, which provides geocoding via [OpenCage](https://opencagedata.com/). [#7015](https://github.com/AnalyticalGraphicsInc/cesium/pull/7015)
9
13
@@ -28,7 +32,6 @@ Change Log
28
32
* Added `GeocoderViewModel.destinationFound` for specifying a function that is called upon a successful geocode. The default behavior is to fly to the destination found by the geocoder. [#6915](https://github.com/AnalyticalGraphicsInc/cesium/pull/6915
29
33
* Added `ClippingPlaneCollection.planeAdded` and `ClippingPlaneCollection.planeRemoved` events. `planeAdded` is raised when a new plane is added to the collection and `planeRemoved` is raised when a plane is removed. [#6875](https://github.com/AnalyticalGraphicsInc/cesium/pull/6875)
30
34
* Added `Matrix4.setScale` for setting the scale on an affine transformation matrix [#6888](https://github.com/AnalyticalGraphicsInc/cesium/pull/6888)
31
-
)
32
35
* Added optional `width` and `height` to `Scene.drillPick` for specifying a search area. [#6922](https://github.com/AnalyticalGraphicsInc/cesium/pull/6922)
33
36
* Added `Cesium3DTileset.root` for getting the root tile of a tileset. [#6944](https://github.com/AnalyticalGraphicsInc/cesium/pull/6944)
34
37
* Added `Cesium3DTileset.extras` and `Cesium3DTile.extras` for getting application specific metadata from 3D Tiles. [#6974](https://github.com/AnalyticalGraphicsInc/cesium/pull/6974)
* @param {Object} [options] Object with the following properties:
106
-
* @param {Object|ArrayBuffer|Uint8Array} options.gltf The object for the glTF JSON or an arraybuffer of Binary glTF defined by the KHR_binary_glTF extension.
107
-
* @param {Resource|String} [options.basePath=''] The base path that paths in the glTF JSON are relative to.
96
+
* @param {Object} options Object with the following properties:
97
+
* @param {ArrayBuffer|Uint8Array} options.gltf A binary glTF buffer.
108
98
* @param {Boolean} [options.show=true] Determines if the model primitive will be shown.
109
99
* @param {Matrix4} [options.modelMatrix=Matrix4.IDENTITY] The 4x4 transformation matrix that transforms the model from model to world coordinates.
110
100
* @param {Boolean} [options.debugShowBoundingVolume=false] For debugging only. Draws the bounding sphere for each draw command in the model.
111
101
* @param {Boolean} [options.debugWireframe=false] For debugging only. Draws the model in wireframe.
112
102
* @param {ClassificationType} [options.classificationType] What this model will classify.
113
103
*
114
-
* @exception {DeveloperError} bgltf is not a valid Binary glTF file.
115
-
* @exception {DeveloperError} Only glTF Binary version 1 is supported.
116
104
* @exception {RuntimeError} Only binary glTF is supported.
105
+
* @exception {RuntimeError} Buffer data must be embedded in the binary glTF.
117
106
* @exception {RuntimeError} Only one node is supported for classification and it must have a mesh.
118
107
* @exception {RuntimeError} Only one mesh is supported when using b3dm for classification.
119
108
* @exception {RuntimeError} Only one primitive per mesh is supported when using b3dm for classification.
@@ -129,15 +118,22 @@ define([
129
118
}
130
119
131
120
if(gltfinstanceofUint8Array){
132
-
// Binary glTF
133
-
gltf=parseBinaryGltf(gltf);// Updates to 2.0 and adds pipeline extras
121
+
// Parse and update binary glTF
122
+
gltf=parseGlb(gltf);
123
+
updateVersion(gltf);
134
124
addDefaults(gltf);
135
125
processModelMaterialsCommon(gltf);
136
-
processPbrMetallicRoughness(gltf);
126
+
processPbrMaterials(gltf);
137
127
}else{
138
128
thrownewRuntimeError('Only binary glTF is supported as a classifier.');
139
129
}
140
130
131
+
ForEach.buffer(gltf,function(buffer){
132
+
if(!defined(buffer.extras._pipeline.source)){
133
+
thrownewRuntimeError('Buffer data must be embedded in the binary gltf.');
134
+
}
135
+
});
136
+
141
137
vargltfNodes=gltf.nodes;
142
138
vargltfMeshes=gltf.meshes;
143
139
@@ -168,9 +164,6 @@ define([
168
164
169
165
this._gltf=gltf;
170
166
171
-
varbasePath=defaultValue(options.basePath,'');
172
-
this._resource=Resource.createIfNeeded(basePath);
173
-
174
167
/**
175
168
* Determines if the model primitive will be shown.
176
169
*
@@ -288,26 +281,6 @@ define([
288
281
}
289
282
},
290
283
291
-
/**
292
-
* The base path that paths in the glTF JSON are relative to. The base
293
-
* path is the same path as the path containing the .gltf file
294
-
* minus the .gltf file, when binary, image, and shader files are
295
-
* in the same directory as the .gltf. When this is <code>''</code>,
296
-
* the app's base path is used.
297
-
*
298
-
* @memberof ClassificationModel.prototype
299
-
*
300
-
* @type {String}
301
-
* @readonly
302
-
*
303
-
* @default ''
304
-
*/
305
-
basePath : {
306
-
get : function(){
307
-
returnthis._resource.url;
308
-
}
309
-
},
310
-
311
284
/**
312
285
* The model's bounding sphere in its local coordinate system.
0 commit comments