Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple startPoints at AMFlow#put(get)StartPoint() #3

Merged
merged 7 commits into from
Feb 5, 2019

Conversation

yu-ogi
Copy link
Contributor

@yu-ogi yu-ogi commented Jan 31, 2019

このPullRequestが解決する内容

AMFlow の仕様に合わせて AMFLowStore の実装を修正します。

this.startPoints.filter(s => s.timestamp <= opts.timestamp).sort((a, b) => (a.timestamp < b.timestamp ? 1 : -1))[0] || null
);
}
return this.startPoints.find(s => s.frame === 0) || null;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/akashic-games/amflow/blob/b06ed86fadc82f639c3cee834d555d3e14a8ac13/src/AMFlow.ts
以下の定義に従って開始地点情報を取得します。

  1. オプションとしてフレーム番号もタイムスタンプも指定しない場合は、0フレーム目の開始地点情報を取得する。
  2. オプションを指定した場合は、条件を満たすの直近の開始地点情報を取得する。
  3. frame または timestamp がしていされた場合、その値よりも小さい内で最大の frame または timestamp を持つ開始地点情報を取得する。
  4. frametimestamp と同時に指定された場合、動作は不定である。
  1. に関しては、本実装では frame の値を優先して参照します。

@yu-ogi yu-ogi requested review from dera- and xnv January 31, 2019 03:48
@yu-ogi yu-ogi merged commit b83f10a into master Feb 5, 2019
@yu-ogi yu-ogi deleted the fix-amflow-start-point branch February 5, 2019 00:50
@yu-ogi yu-ogi added the enhancement New feature or request label Apr 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants