merge
This commit is contained in:
commit
26061e1cd8
|
@ -20,6 +20,11 @@ namespace Beatsaber {
|
|||
|
||||
static const uint32_t LINECOUNT = 4;
|
||||
static const uint32_t LAYERCOUNT = 3;
|
||||
static const double LINESPACING = 0.6;
|
||||
static const double LAYERSPACING = 0.6;
|
||||
static const double LAYEROFFSET = 0.6;
|
||||
static const double LINEOFFSET = LINESPACING/2;
|
||||
|
||||
|
||||
BeatLevelRenderHelperImpl::BeatLevelRenderHelperImpl(std::shared_ptr<const BeatLevel> level) : level(level) {
|
||||
bps = level->getBeatMap()->getBPM() / 60.0;
|
||||
|
@ -35,11 +40,10 @@ void BeatLevelRenderHelperImpl::setMat(float* mat, double time, uint32_t note) {
|
|||
|
||||
const Note& n = level->getNotes().at(note);
|
||||
|
||||
|
||||
//get matrix parameters
|
||||
float offsetx = (n.line - (LINECOUNT / 2.0));
|
||||
float offsety = n.layer;
|
||||
float offsetz = n.time - beat;
|
||||
float offsetx = ((n.line - (LINECOUNT / 2.0)) * LINESPACING) + LINEOFFSET;
|
||||
float offsety = (n.layer * LAYERSPACING) + LAYEROFFSET;
|
||||
float offsetz = -(n.time - beat);
|
||||
|
||||
float rotationz = ROTLOOKUP[n.cutdir];
|
||||
|
||||
|
@ -50,21 +54,16 @@ void BeatLevelRenderHelperImpl::setMat(float* mat, double time, uint32_t note) {
|
|||
mat[ 0] = cosrotz;
|
||||
mat[ 1] = -sinrotz;
|
||||
mat[ 2] = 0;
|
||||
mat[ 3] = cosrotz*offsetx - sinrotz*offsety;
|
||||
mat[ 3] = offsetx;
|
||||
|
||||
mat[ 4] = sinrotz;
|
||||
mat[ 5] = cosrotz;
|
||||
mat[ 6] = 0;
|
||||
mat[ 7] = sinrotz*offsetx - cosrotz*offsety;
|
||||
|
||||
mat[ 8] = 0;
|
||||
mat[ 9] = 0;
|
||||
mat[10] = 1;
|
||||
mat[11] = 0;
|
||||
|
||||
mat[12] = offsetx;
|
||||
mat[13] = offsety;
|
||||
mat[14] = offsetz;
|
||||
mat[ 7] = offsety;
|
||||
mat[11] = offsetz;
|
||||
mat[12] = 0;
|
||||
mat[13] = 0;
|
||||
mat[14] = 0;
|
||||
mat[15] = 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue