@@ -15,11 +15,11 @@ import { SCRIPT_INITIALIZE, SCRIPT_POST_INITIALIZE } from './constants.js';
15
15
* At its core, a script is simply a collection of methods that are called at various points in the
16
16
* Engine's lifecycle. These methods are:
17
17
*
18
- * { @link Script#initialize} - Called once when the script is initialized
19
- * { @link Script#postInitialize} - Called once after all scripts have been initialized
20
- * { @link Script#update} - Called every frame, if the script is enabled
21
- * { @link Script#postUpdate} - Called every frame, after all scripts have been updated
22
- * { @link Script#swap} - Called when a script is redefined
18
+ * - ` Script#initialize` - Called once when the script is initialized.
19
+ * - ` Script#postInitialize` - Called once after all scripts have been initialized.
20
+ * - ` Script#update` - Called every frame, if the script is enabled.
21
+ * - ` Script#postUpdate` - Called every frame, after all scripts have been updated.
22
+ * - ` Script#swap` - Called when a script is redefined.
23
23
*
24
24
* These methods are entirely optional, but provide a useful way to manage the lifecycle of a
25
25
* script and perform any necessary setup and cleanup.
@@ -28,7 +28,7 @@ import { SCRIPT_INITIALIZE, SCRIPT_POST_INITIALIZE } from './constants.js';
28
28
* @example
29
29
* ```javascript
30
30
* class EntityRotator extends Script {
31
- * update() {
31
+ * update(dt ) {
32
32
* this.entity.rotateLocal(0, 1, 0);
33
33
* }
34
34
* }
@@ -153,14 +153,14 @@ export class Script extends EventHandler {
153
153
static EVENT_ERROR = 'error' ;
154
154
155
155
/**
156
- * The {@link AppBase} that the instance of this type belongs to.
156
+ * The {@link AppBase} that the instance of this script belongs to.
157
157
*
158
158
* @type {AppBase }
159
159
*/
160
160
app ;
161
161
162
162
/**
163
- * The {@link Entity} that the instance of this type belongs to.
163
+ * The {@link Entity} that the instance of this script belongs to.
164
164
*
165
165
* @type {Entity }
166
166
*/
@@ -206,11 +206,11 @@ export class Script extends EventHandler {
206
206
}
207
207
208
208
/**
209
- * True if the instance of this type is in running state. False when script is not running,
209
+ * True if the instance of this script is in running state. False when script is not running,
210
210
* because the Entity or any of its parents are disabled or the {@link ScriptComponent} is
211
- * disabled or the Script Instance is disabled. When disabled no update methods will be called
212
- * on each tick. initialize and postInitialize methods will run once when the script instance
213
- * is in `enabled` state during app tick.
211
+ * disabled or the Script Instance is disabled. When disabled, no update methods will be called
212
+ * on each tick. ` initialize` and ` postInitialize` methods will run once when the script
213
+ * instance is in the `enabled` state during an app tick.
214
214
*
215
215
* @type {boolean }
216
216
*/
0 commit comments