Skip to content

Commit

Permalink
Merge pull request #47 from discordier/hotfix/cleanup
Browse files Browse the repository at this point in the history
Global: Clean up.
  • Loading branch information
Mugen87 committed May 15, 2021
2 parents 73c0581 + a2c9f16 commit 0a59875
Show file tree
Hide file tree
Showing 17 changed files with 36 additions and 9 deletions.
2 changes: 2 additions & 0 deletions examples/fsm/src/Girl.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ class Girl extends GameEntity {

this.mixer.update( delta );

return this;

}

}
Expand Down
4 changes: 4 additions & 0 deletions examples/fuzzy/src/Soldier.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ class Soldier extends GameEntity {

this.zombie = this.manager.getEntityByName( 'zombie' );

return this;

}

update() {
Expand All @@ -53,6 +55,8 @@ class Soldier extends GameEntity {

this.ui.currentWeapon.textContent = ( this.assaultRifle.visible ) ? 'Assault Rifle' : 'Shotgun';

return this;

}

selectWeapon() {
Expand Down
2 changes: 2 additions & 0 deletions examples/goal/src/Girl.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ class Girl extends Vehicle {

this.mixer.update( delta );

return this;

}

tired() {
Expand Down
2 changes: 2 additions & 0 deletions examples/misc/savegame/src/CustomEntity.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class CustomEntity extends GameEntity {

}

return super.update( delta );

}

generatePosition() {
Expand Down
2 changes: 1 addition & 1 deletion examples/misc/savegame/src/CustomVehicle.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class CustomVehicle extends Vehicle {
const seekBehavior = this.steering.behaviors[ 0 ];
seekBehavior.target.copy( this.target.position );

super.update( delta );
return super.update( delta );

}

Expand Down
2 changes: 1 addition & 1 deletion examples/navigation/firstperson/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@
player.position.set( - 13, - 0.75, - 9 );

controls = new FirstPersonControls( player );
controls.lookSpeed = 2;
controls.lookingSpeed = 2;
controls.setRotation( - 2.2, 0.2 );

controls.sounds.set( 'rightStep', step1 );
Expand Down
2 changes: 2 additions & 0 deletions examples/navigation/navmeshPerformance/src/CustomVehicle.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class CustomVehicle extends Vehicle {

}

return this;

}


Expand Down
4 changes: 4 additions & 0 deletions examples/perception/memorySystem/src/CustomEntity.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class CustomEntity extends GameEntity {
this.target = target;
this.vision.addObstacle( obstacle );

return this;

}

update( delta ) {
Expand Down Expand Up @@ -88,6 +90,8 @@ class CustomEntity extends GameEntity {

}

return this;

}

updateVision() {
Expand Down
2 changes: 2 additions & 0 deletions examples/playground/hideAndSeek/src/Bullet.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ class Bullet extends MovingEntity {

}

return this;

}

}
Expand Down
4 changes: 4 additions & 0 deletions examples/playground/hideAndSeek/src/Enemy.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class Enemy extends Vehicle {
const hideBehavior = new HideBehavior( this.manager, player );
this.steering.add( hideBehavior );

return this;

}

update( delta ) {
Expand Down Expand Up @@ -73,6 +75,8 @@ class Enemy extends Vehicle {

}

return this;

}

handleMessage() {
Expand Down
2 changes: 2 additions & 0 deletions examples/playground/hideAndSeek/src/HideBehavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ class HideBehavior extends SteeringBehavior {

}

return force;

}

_obstacleAvoidance( vehicle ) {
Expand Down
2 changes: 1 addition & 1 deletion examples/playground/hideAndSeek/src/Player.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class Player extends MovingEntity {

}

super.update( delta );
return super.update( delta );

}

Expand Down
3 changes: 1 addition & 2 deletions examples/playground/hideAndSeek/src/World.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ class World {
if ( obstalce.geometry.intersectRay( ray, obstalce.worldMatrix, false, intersection.point, intersection.normal ) !== null ) {

const squaredDistance = intersection.point.squaredDistanceTo( ray.origin );
obstalce.squaredDistance = squaredDistance;

if ( squaredDistance < minDistance ) {

Expand Down Expand Up @@ -464,7 +463,7 @@ class World {
const player = this.player;

this.controls = new FirstPersonControls( player );
this.controls.lookSpeed = 2;
this.controls.lookingSpeed = 2;

const intro = this.ui.intro;
const crosshairs = this.ui.crosshairs;
Expand Down
2 changes: 2 additions & 0 deletions examples/playground/shooter/src/Bullet.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ class Bullet extends MovingEntity {

}

return this;

}

}
Expand Down
2 changes: 2 additions & 0 deletions examples/playground/shooter/src/Target.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ class Target extends GameEntity {

}

return this;

}

handleMessage() {
Expand Down
2 changes: 1 addition & 1 deletion examples/playground/shooter/src/World.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ class World {
const player = this.player;

this.controls = new FirstPersonControls( player );
this.controls.lookSpeed = 2;
this.controls.lookingSpeed = 2;

const intro = this.ui.intro;
const crosshairs = this.ui.crosshairs;
Expand Down
6 changes: 3 additions & 3 deletions src/navigation/navmesh/NavMeshLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class NavMeshLoader {
* to influence the parsing of the navigation mesh.
*
* @param {String} url - The URL of the glTF asset.
* @param {Object} options - The (optional) configuration object.
* @param {Object} [options] - The (optional) configuration object.
* @return {Promise} A promise representing the loading and parsing process.
*/
load( url, options ) {
Expand Down Expand Up @@ -74,8 +74,8 @@ class NavMeshLoader {
* in node.js.
*
* @param {ArrayBuffer} arrayBuffer - The array buffer.
* @param {String} url - The (optional) URL.
* @param {Object} options - The (optional) configuration object.
* @param {String} [url] - The (optional) URL.
* @param {Object} [options] - The (optional) configuration object.
* @return {Promise} A promise representing the parsing process.
*/
parse( arrayBuffer, url, options ) {
Expand Down

0 comments on commit 0a59875

Please sign in to comment.