Skip to content

Commit e660369

Browse files
authored
[DOCS] Document pc.AnimationComponent#skeleton and pc.AnimationComponent#animations (playcanvas#1967)
* add pc.AnimationComponent#getSkeleton * change function getSkeleton to property skeleton * remove setter since it already exists (but undocumented). * add jsdoc documentation for existing animations property * add missing character * fix linting issue * document skeleton as read-only * add comment about skeleton being null when model is gltf/glb
1 parent 3226086 commit e660369

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/framework/components/animation/component.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ Object.assign(pc, function () {
1313
* @property {boolean} activate If true the first animation asset will begin playing when the scene is loaded.
1414
* @property {pc.Asset[]|number[]} assets The array of animation assets - can also be an array of asset ids.
1515
* @property {number} currentTime Get or Set the current time position (in seconds) of the animation.
16-
* @property {number} duration Get the duration in seconds of the current animation.
16+
* @property {number} duration Get the duration in seconds of the current animation. [read only]
17+
* @property {pc.Skeleton|null} skeleton Get the skeleton for the current model; unless model is from glTF/glb, then skeleton is null. [read only]
18+
* @property {object<string, pc.Animation>} animations Get or Set dictionary of animations by name.
1719
*/
1820
var AnimationComponent = function (system, entity) {
1921
pc.Component.call(this, system, entity);

0 commit comments

Comments
 (0)