Merge branch 'unstable' into feature/components
commit
d2a62e0dbe
|
@ -0,0 +1 @@
|
|||
//#define EDITOR__
|
|
@ -0,0 +1 @@
|
|||
//#define RUNTIME__
|
|
@ -62,7 +62,7 @@ gulp.task(
|
|||
|
||||
gulp.task('compileRuntime', ['build'],
|
||||
function() {
|
||||
gulp.src(['./build/defines/runtime.js', './build/game-lib.js'])
|
||||
gulp.src(['./defines/runtime.js', './build/game-lib.js'])
|
||||
.pipe(concat('game-lib-runtime.js'))
|
||||
.pipe(preprocessor(
|
||||
{
|
||||
|
@ -101,7 +101,7 @@ gulp.task('compileRuntime', ['build'],
|
|||
|
||||
gulp.task('compileEditor', ['build'],
|
||||
function() {
|
||||
gulp.src(['./build/defines/editor.js', './build/game-lib.js'])
|
||||
gulp.src(['./defines/editor.js', './build/game-lib.js'])
|
||||
.pipe(concat('game-lib-editor.js'))
|
||||
.pipe(preprocessor(
|
||||
{
|
||||
|
|
|
@ -47,12 +47,10 @@ GameLib.D3.ComponentPathControls.prototype.onUpdate = function(
|
|||
this.pathFollowingComponent.offset.x = 0;
|
||||
this.pathFollowingComponent.offset.y = 0;
|
||||
this.pathFollowingComponent.offset.z = 1;
|
||||
// also: set offset scale
|
||||
} else if (this.keyRightPressed) { // Right [l]
|
||||
this.pathFollowingComponent.offset.x = 0;
|
||||
this.pathFollowingComponent.offset.y = 0;
|
||||
this.pathFollowingComponent.offset.z = -1;
|
||||
// also: set offset scale
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
* @param accel
|
||||
* @param maxSpeed
|
||||
* @param baseOffset
|
||||
* @param maxOffset
|
||||
* @constructor
|
||||
*/
|
||||
GameLib.D3.ComponentPathFollowing = function ComponentPathFollowing(
|
||||
|
@ -14,7 +15,8 @@ GameLib.D3.ComponentPathFollowing = function ComponentPathFollowing(
|
|||
splineCurve3,
|
||||
accel,
|
||||
maxSpeed,
|
||||
baseOffset
|
||||
baseOffset,
|
||||
maxOffset
|
||||
) {
|
||||
this.id = id || GameLib.D3.Tools.RandomId();
|
||||
|
||||
|
@ -28,15 +30,16 @@ GameLib.D3.ComponentPathFollowing = function ComponentPathFollowing(
|
|||
this.maxSpeed = maxSpeed || 10.0;
|
||||
this.accel = accel || 2.0;
|
||||
this.baseOffset = baseOffset || new GameLib.D3.Vector3();
|
||||
this.maxOffset = maxOffset || new GameLib.D3.Vector3();
|
||||
|
||||
|
||||
// runtime code
|
||||
this.offset = new GameLib.D3.Vector3(); // this one is our destination offset
|
||||
|
||||
this.currentPathValue = 0.0;
|
||||
this.offset = new GameLib.D3.Vector3();
|
||||
this.currentSpeed = 0.0;
|
||||
this.direction = 0;
|
||||
|
||||
|
||||
GameLib.D3.Utils.Extend(GameLib.D3.ComponentPathFollowing, GameLib.D3.ComponentInterface);
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue