Skip to content

Commit

Permalink
oplan
Browse files Browse the repository at this point in the history
  • Loading branch information
pandrr committed Jul 3, 2024
1 parent 2ed3b7b commit 3534e54
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/libs/cables/plan.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ const Plan = class extends Events
this._patch = op.patch;
this._patch.plans = this._patch.plans || {};

this._anim = new CABLES.Anim();

this._data = null;
this._currentPlaceName = "";
this.setName("unknown");
Expand All @@ -34,8 +36,22 @@ const Plan = class extends Events
this._patch.emitEvent("plansChanged");
}

getProgress()
{
return this._anim.getValue();
}

getDuration()
{
return 1.0;
}

setCurrentPlaceName(name)
{
this._anim.clear();
this._anim.setValue(0, 0);
this._anim.setValue(this.getDuration(name), 1);

this._currentPlaceName = name;
this.emitEvent("stateChanged");
}
Expand Down

0 comments on commit 3534e54

Please sign in to comment.