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: packages/engine/Source/DataSources/BillboardGraphics.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ import createPropertyDescriptor from "./createPropertyDescriptor.js";
10
10
* Initialization options for the BillboardGraphics constructor
11
11
*
12
12
* @property {Property | boolean} [show=true] A boolean Property specifying the visibility of the billboard.
13
-
* @property {Property | string | HTMLCanvasElement} [image] A Property specifying the Image, URI, or Canvas to use for the billboard.
13
+
* @property {Property | string | HTMLImageElement | HTMLCanvasElement} [image] A Property specifying the Image, URI, or Canvas to use for the billboard.
14
14
* @property {Property | number} [scale=1.0] A numeric Property specifying the scale to apply to the image size.
15
15
* @property {Property | Cartesian2} [pixelOffset=Cartesian2.ZERO] A {@link Cartesian2} Property specifying the pixel offset.
16
16
* @property {Property | Cartesian3} [eyeOffset=Cartesian3.ZERO] A {@link Cartesian3} Property specifying the eye offset.
Copy file name to clipboardExpand all lines: packages/engine/Source/Renderer/TextureAtlas.js
+14-5Lines changed: 14 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -648,9 +648,11 @@ async function resolveImage(image, id) {
648
648
* @param {string} id An identifier to detect whether the image already exists in the atlas.
649
649
* @param {HTMLImageElement|HTMLCanvasElement|string|Resource|Promise|TextureAtlas.CreateImageCallback} image An image or canvas to add to the texture atlas,
650
650
* or a URL to an Image, or a Promise for an image, or a function that creates an image.
651
+
* @param {number} width A number specifying the width of the texture. If undefined, the image width will be used.
652
+
* @param {number} height A number specifying the height of the texture. If undefined, the image height will be used.
651
653
* @returns {Promise<number>} A Promise that resolves to the image region index, or -1 if resources are in the process of being destroyed.
@@ -32,7 +34,7 @@ import SplitDirection from "./SplitDirection.js";
32
34
* @property {Cartesian3} position The cartesian position of the billboard.
33
35
* @property {*} [id] A user-defined object to return when the billboard is picked with {@link Scene#pick}.
34
36
* @property {boolean} [show=true] Determines if this billboard will be shown.
35
-
* @property {string | HTMLCanvasElement} [image] A loaded HTMLImageElement, ImageData, or a url to an image to use for the billboard.
37
+
* @property {string | HTMLImageElement | HTMLCanvasElement} [image] A loaded HTMLImageElement, ImageData, or a url to an image to use for the billboard.
36
38
* @property {number} [scale=1.0] A number specifying the uniform scale that is multiplied with the billboard's image size in pixels.
37
39
* @property {Cartesian2} [pixelOffset=Cartesian2.ZERO] A {@link Cartesian2} Specifying the pixel offset in screen space from the origin of this billboard.
38
40
* @property {Cartesian3} [eyeOffset=Cartesian3.ZERO] A {@link Cartesian3} Specifying the 3D Cartesian offset applied to this billboard in eye coordinates.
@@ -190,28 +192,26 @@ function Billboard(options, billboardCollection) {
/** Arbitrary limit on allocated SVG size, in pixels. Raster images use image resolution. */
1271
+
constSVG_MAX_SIZE_PX=512;
1272
+
1273
+
/**
1274
+
* Computes billboard texture ID, width, and height. For raster images, width and height are left
1275
+
* undefined, defaulting to image resolution. For SVG, use billboard pixel width and height.
1276
+
* @param {string | undefined} id The id of the image.
1277
+
* @param {string | HTMLImageElement | HTMLCanvasElement | undefined} image A loaded HTMLImageElement, ImageData, or a url to an image to use for the billboard.
Copy file name to clipboardExpand all lines: packages/engine/Source/Scene/BillboardTexture.js
+9-2Lines changed: 9 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -160,8 +160,15 @@ BillboardTexture.prototype.unload = async function () {
160
160
* @param {string} id An identifier to detect whether the image already exists in the atlas.
161
161
* @param {HTMLImageElement|HTMLCanvasElement|string|Resource|Promise|TextureAtlas.CreateImageCallback} image An image or canvas to add to the texture atlas,
162
162
* or a URL to an Image, or a Promise for an image, or a function that creates an image.
163
+
* @param {number} width A number specifying the width of the texture. If undefined, the image width will be used.
164
+
* @param {number} height A number specifying the height of the texture. If undefined, the image height will be used.
0 commit comments