Skip to content

Commit

Permalink
Improve JSDocs for RigidBodyComponent (#4836)
Browse files Browse the repository at this point in the history
* Improve JSDocs for RigidBodyComponent

* Lint fixes
  • Loading branch information
willeastcott authored Nov 11, 2022
1 parent b286609 commit a8ef694
Show file tree
Hide file tree
Showing 2 changed files with 129 additions and 157 deletions.
8 changes: 6 additions & 2 deletions src/framework/components/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,13 @@ class Component extends EventHandler {
* The ComponentSystem used to create this Component.
*
* @type {import('./system.js').ComponentSystem}
* @ignore
*/
system;

/**
* The Entity that this Component is attached to.
*
* @type {import('../entity.js').Entity}
* @ignore
*/
entity;

Expand Down Expand Up @@ -49,6 +47,7 @@ class Component extends EventHandler {
this.on('set_enabled', this.onSetEnabled, this);
}

/** @ignore */
static _buildAccessors(obj, schema) {
// Create getter/setter pairs for each property defined in the schema
schema.forEach(function (descriptor) {
Expand All @@ -73,10 +72,12 @@ class Component extends EventHandler {
obj._accessorsBuilt = true;
}

/** @ignore */
buildAccessors(schema) {
Component._buildAccessors(this, schema);
}

/** @ignore */
onSetEnabled(name, oldValue, newValue) {
if (oldValue !== newValue) {
if (this.entity.enabled) {
Expand All @@ -89,12 +90,15 @@ class Component extends EventHandler {
}
}

/** @ignore */
onEnable() {
}

/** @ignore */
onDisable() {
}

/** @ignore */
onPostStateChange() {
}

Expand Down
Loading

0 comments on commit a8ef694

Please sign in to comment.