ExporterHelper Class
A helper used by all exporters.
Item Index
Methods
- applyScaling static
- computeImageSize static
- exportTextures static
- getAssetName static
- getAssetPath static
- initialize
- round
Methods
applyScaling
(
static
-
An
Applies a scaling factor to a group of meshes or on a single mesh.
Parameters:
-
An
Array | Mesharray of
Mesh
or a singleMesh
.
computeImageSize
(
static
-
image
Computes the size of an image.
Parameters:
-
image
HTMLImageElementThe image.
exportTextures
(
static
-
textures
-
zip
-
completeCallback
Adds the selected textures into a zip file. Textures are stored in the assetPath
folder.
getAssetName
(
String
static
-
url
Gets the relative path with extension of an asset by its url. GET paramters are removed.
Parameters:
-
url
StringThe asset's url.
Returns:
String:
Returns the asset's name with its extension.
getAssetPath
(
String
static
-
url
Gets the asset path of an asset (see assetPath
).
Parameters:
-
url
StringThe asset's url.
Returns:
String:
Returns the asset's path.
initialize
(
-
options
Initializes the helper with options.
Parameters:
-
options
ObjectAn object that contains options: precision (float), assetPath (string), scaleFactor (float).
round
(
Float
-
value
Gets a rounded float value determined by the precision
property.
Parameters:
-
value
NumberThe value to use.
Returns:
Float:
Returns a rounded value.