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
+8
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,14 @@
1
1
Change Log
2
2
==========
3
3
4
+
### 1.63 - 2019-11-01
5
+
6
+
##### Additions :tada:
7
+
* Added `pixelRatio` parameter to `Camera.getPixelSize`, `OrthographicFrustum.getPixelDimensions`, `OrthographicOffCenterFrustum.getPixelDimensions`, `PerspectiveFrustum.getPixelDimensions`, and `PerspectiveOffCenterFrustum.getPixelDimensions`. Pass in `scene.pixelRatio` for css pixel sizes or `1.0` for native device pixel sizes.
8
+
9
+
##### Fixes :wrench:
10
+
* Fixed css pixel usage for `BillboardCollection`, `Model`, `Primitive`, and `PointPrimtiveCollection`. [#8113](https://github.com/AnalyticalGraphicsInc/cesium/issues/8113)
Copy file name to clipboardexpand all lines: Source/Core/OrthographicFrustum.js
+5-3
Original file line number
Diff line number
Diff line change
@@ -209,21 +209,23 @@ define([
209
209
*
210
210
* @param {Number} drawingBufferWidth The width of the drawing buffer.
211
211
* @param {Number} drawingBufferHeight The height of the drawing buffer.
212
+
* @param {Number} pixelRatio The scaling factor from pixel space to coordinate space.
212
213
* @param {Number} distance The distance to the near plane in meters.
213
214
* @param {Cartesian2} result The object onto which to store the result.
214
215
* @returns {Cartesian2} The modified result parameter or a new instance of {@link Cartesian2} with the pixel's width and height in the x and y properties, respectively.
215
216
*
216
217
* @exception {DeveloperError} drawingBufferWidth must be greater than zero.
217
218
* @exception {DeveloperError} drawingBufferHeight must be greater than zero.
219
+
* @exception {DeveloperError} pixelRatio must be greater than zero.
218
220
*
219
221
* @example
220
222
* // Example 1
221
223
* // Get the width and height of a pixel.
222
-
* var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 0.0, new Cesium.Cartesian2());
224
+
* var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, scene.pixelRatio, 0.0, new Cesium.Cartesian2());
Copy file name to clipboardexpand all lines: Source/Core/OrthographicOffCenterFrustum.js
+12-4
Original file line number
Diff line number
Diff line change
@@ -283,19 +283,21 @@ define([
283
283
*
284
284
* @param {Number} drawingBufferWidth The width of the drawing buffer.
285
285
* @param {Number} drawingBufferHeight The height of the drawing buffer.
286
+
* @param {Number} pixelRatio The scaling factor from pixel space to coordinate space.
286
287
* @param {Number} distance The distance to the near plane in meters.
287
288
* @param {Cartesian2} result The object onto which to store the result.
288
289
* @returns {Cartesian2} The modified result parameter or a new instance of {@link Cartesian2} with the pixel's width and height in the x and y properties, respectively.
289
290
*
290
291
* @exception {DeveloperError} drawingBufferWidth must be greater than zero.
291
292
* @exception {DeveloperError} drawingBufferHeight must be greater than zero.
293
+
* @exception {DeveloperError} pixelRatio must be greater than zero.
292
294
*
293
295
* @example
294
296
* // Example 1
295
297
* // Get the width and height of a pixel.
296
-
* var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 0.0, new Cesium.Cartesian2());
298
+
* var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, scene.pixelRatio, 0.0, new Cesium.Cartesian2());
Copy file name to clipboardexpand all lines: Source/Core/PerspectiveFrustum.js
+6-4
Original file line number
Diff line number
Diff line change
@@ -293,17 +293,19 @@ define([
293
293
*
294
294
* @param {Number} drawingBufferWidth The width of the drawing buffer.
295
295
* @param {Number} drawingBufferHeight The height of the drawing buffer.
296
+
* @param {Number} pixelRatio The scaling factor from pixel space to coordinate space.
296
297
* @param {Number} distance The distance to the near plane in meters.
297
298
* @param {Cartesian2} result The object onto which to store the result.
298
299
* @returns {Cartesian2} The modified result parameter or a new instance of {@link Cartesian2} with the pixel's width and height in the x and y properties, respectively.
299
300
*
300
301
* @exception {DeveloperError} drawingBufferWidth must be greater than zero.
301
302
* @exception {DeveloperError} drawingBufferHeight must be greater than zero.
303
+
* @exception {DeveloperError} pixelRatio must be greater than zero.
302
304
*
303
305
* @example
304
306
* // Example 1
305
307
* // Get the width and height of a pixel.
306
-
* var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 1.0, new Cesium.Cartesian2());
308
+
* var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, scene.pixelRatio, 1.0, new Cesium.Cartesian2());
307
309
*
308
310
* @example
309
311
* // Example 2
@@ -314,11 +316,11 @@ define([
314
316
* var toCenter = Cesium.Cartesian3.subtract(primitive.boundingVolume.center, position, new Cesium.Cartesian3()); // vector from camera to a primitive
315
317
* var toCenterProj = Cesium.Cartesian3.multiplyByScalar(direction, Cesium.Cartesian3.dot(direction, toCenter), new Cesium.Cartesian3()); // project vector onto camera direction vector
316
318
* var distance = Cesium.Cartesian3.magnitude(toCenterProj);
317
-
* var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, distance, new Cesium.Cartesian2());
319
+
* var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, scene.pixelRatio, distance, new Cesium.Cartesian2());
Copy file name to clipboardexpand all lines: Source/Core/PerspectiveOffCenterFrustum.js
+13-5
Original file line number
Diff line number
Diff line change
@@ -322,17 +322,19 @@ define([
322
322
*
323
323
* @param {Number} drawingBufferWidth The width of the drawing buffer.
324
324
* @param {Number} drawingBufferHeight The height of the drawing buffer.
325
+
* @param {Number} pixelRatio The scaling factor from pixel space to coordinate space.
325
326
* @param {Number} distance The distance to the near plane in meters.
326
327
* @param {Cartesian2} result The object onto which to store the result.
327
328
* @returns {Cartesian2} The modified result parameter or a new instance of {@link Cartesian2} with the pixel's width and height in the x and y properties, respectively.
328
329
*
329
330
* @exception {DeveloperError} drawingBufferWidth must be greater than zero.
330
331
* @exception {DeveloperError} drawingBufferHeight must be greater than zero.
332
+
* @exception {DeveloperError} pixelRatio must be greater than zero.
331
333
*
332
334
* @example
333
335
* // Example 1
334
336
* // Get the width and height of a pixel.
335
-
* var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, 1.0, new Cesium.Cartesian2());
337
+
* var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, scene.pixelRatio, 1.0, new Cesium.Cartesian2());
336
338
*
337
339
* @example
338
340
* // Example 2
@@ -343,9 +345,9 @@ define([
343
345
* var toCenter = Cesium.Cartesian3.subtract(primitive.boundingVolume.center, position, new Cesium.Cartesian3()); // vector from camera to a primitive
344
346
* var toCenterProj = Cesium.Cartesian3.multiplyByScalar(direction, Cesium.Cartesian3.dot(direction, toCenter), new Cesium.Cartesian3()); // project vector onto camera direction vector
345
347
* var distance = Cesium.Cartesian3.magnitude(toCenterProj);
346
-
* var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, distance, new Cesium.Cartesian2());
348
+
* var pixelSize = camera.frustum.getPixelDimensions(scene.drawingBufferWidth, scene.drawingBufferHeight, scene.pixelRatio, distance, new Cesium.Cartesian2());
0 commit comments