Skip to content

Commit

Permalink
Graphics documentation and typing fixes (#5544)
Browse files Browse the repository at this point in the history
  • Loading branch information
btmorex authored and bigtimebuddy committed Mar 27, 2019
1 parent 6f8b433 commit 849b7cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/graphics/src/Graphics.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ let defaultShader = null;
* The Graphics class contains methods used to draw primitive shapes such as lines, circles and
* rectangles to the display, and to color and fill them.
*
* Note that because Graphics can share a GraphicsGeometry with other instances,
* it is necessary to call `destroy()` to properly dereference the underlying
* GraphicsGeometry and avoid a memory leak. Alternatively, keep using the same
* Graphics instance and call `clear()` between redraws.
*
* @class
* @extends PIXI.Container
* @memberof PIXI
Expand All @@ -50,7 +55,7 @@ export default class Graphics extends Container
* Includes vertex positions, face indices, normals, colors, UVs, and
* custom attributes within buffers, reducing the cost of passing all
* this data to the GPU. Can be shared between multiple Mesh or Graphics objects.
* @member {PIXI.Geometry}
* @member {PIXI.GraphicsGeometry}
* @readonly
*/
this.geometry = geometry || new GraphicsGeometry();
Expand Down
2 changes: 2 additions & 0 deletions packages/graphics/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export * from './const';
export { default as FillStyle } from './styles/FillStyle';
export { default as Graphics } from './Graphics';
export { default as GraphicsData } from './GraphicsData';
export { default as GraphicsGeometry } from './GraphicsGeometry';
export { default as LineStyle } from './styles/LineStyle';

0 comments on commit 849b7cb

Please sign in to comment.