Skip to content

Commit

Permalink
Small update to JSDocs of the exporters (playcanvas#5965)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
  • Loading branch information
mvaligursky and Martin Valigursky authored Jan 23, 2024
1 parent 7123962 commit 2c9437f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
7 changes: 7 additions & 0 deletions extras/exporters/core-exporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ const textureBlitFragmentShader = `
gl_FragColor = texture2D(blitTexture, uv0);
}`;

/**
* The base class for the exporters, implementing shared functionality.
*
* @category Exporter
*/
class CoreExporter {
/**
* Create a new instance of the exporter.
Expand All @@ -33,6 +38,8 @@ class CoreExporter {
* @param {import('playcanvas').Color} [options.color] - The tint color to modify the texture with.
* @param {number} [options.maxTextureSize] - Maximum texture size. Texture is resized if over the size.
* @returns {Promise<HTMLCanvasElement>|Promise<undefined>} - The canvas element containing the image.
*
* @ignore
*/
textureToCanvas(texture, options = {}) {

Expand Down
2 changes: 2 additions & 0 deletions extras/exporters/gltf-exporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ const textureSemantics = [

/**
* Implementation of the GLTF 2.0 format exporter.
*
* @category Exporter
*/
class GltfExporter extends CoreExporter {
/**
Expand Down
2 changes: 2 additions & 0 deletions extras/exporters/usdz-exporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ const materialValueTemplate = (type, name, value) => ` ${type

/**
* Implementation of the USDZ format exporter. Note that ASCII version of the format (USDA) is used.
*
* @category Exporter
*/
class UsdzExporter extends CoreExporter {
/**
Expand Down

0 comments on commit 2c9437f

Please sign in to comment.