123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524 |
- "use strict";
- var GraphicalMusicPage_1 = require("./GraphicalMusicPage");
- //import {MusicSymbol} from "./MusicSymbol";
- var logging_1 = require("../../Common/logging");
- var EngravingRules = (function () {
- function EngravingRules() {
- this.noteDistances = [1.0, 1.0, 1.3, 1.6, 2.0, 2.5, 3.0, 4.0];
- this.noteDistancesScalingFactors = [1.0, 2.0, 4.0, 8.0, 16.0, 32.0, 64.0, 128.0];
- this.durationDistanceDict = {};
- this.durationScalingDistanceDict = {};
- this.samplingUnit = EngravingRules.unit * 3;
- this.sheetTitleHeight = 4.0;
- this.sheetSubtitleHeight = 2.0;
- this.sheetMinimumDistanceBetweenTitleAndSubtitle = 1.0;
- this.sheetComposerHeight = 2.0;
- this.sheetAuthorHeight = 2.0;
- this.pagePlacementEnum = GraphicalMusicPage_1.PagePlacementEnum.Down;
- this.pageHeight = 100001.0;
- this.pageTopMargin = 5.0;
- this.pageBottomMargin = 5.0;
- this.pageLeftMargin = 5.0;
- this.pageRightMargin = 5.0;
- this.titleTopDistance = 9.0;
- this.titleBottomDistance = 1.0;
- this.staffDistance = 7.0;
- this.betweenStaffDistance = 5.0;
- this.staffHeight = 4.0;
- this.betweenStaffLinesDistance = EngravingRules.unit;
- this.systemDistance = 10.0;
- this.systemLeftMargin = 0.0;
- this.systemRightMargin = 0.0;
- this.firstSystemMargin = 15.0;
- this.systemLabelsRightMargin = 2.0;
- this.systemComposerDistance = 2.0;
- this.instrumentLabelTextHeight = 2;
- this.minimumAllowedDistanceBetweenSystems = 3.0;
- this.lastSystemMaxScalingFactor = 1.4;
- this.beamWidth = EngravingRules.unit / 2.0;
- this.beamSpaceWidth = EngravingRules.unit / 3.0;
- this.beamForwardLength = 1.25 * EngravingRules.unit;
- this.clefLeftMargin = 0.5;
- this.clefRightMargin = 0.75;
- this.betweenKeySymbolsDistance = 0.2;
- this.keyRightMargin = 0.75;
- this.rhythmRightMargin = 1.25;
- this.inStaffClefScalingFactor = 0.8;
- this.distanceBetweenNaturalAndSymbolWhenCancelling = 0.4;
- this.noteHelperLinesOffset = 0.25;
- this.measureLeftMargin = 0.7;
- this.measureRightMargin = 0.0;
- this.distanceBetweenLastInstructionAndRepetitionBarline = 1.0;
- this.arpeggioDistance = 0.6;
- this.staccatoShorteningFactor = 2;
- this.idealStemLength = 3.0;
- this.stemNoteHeadBorderYOffset = 0.2;
- this.stemWidth = 0.13;
- this.stemMargin = 0.2;
- this.stemMinLength = 2.5;
- this.stemMaxLength = 4.5;
- this.beamSlopeMaxAngle = 10.0;
- this.stemMinAllowedDistanceBetweenNoteHeadAndBeamLine = 1.0;
- this.graceNoteScalingFactor = 0.6;
- this.graceNoteXOffset = 0.2;
- this.wedgeOpeningLength = 1.2;
- this.wedgeMeasureEndOpeningLength = 0.75;
- this.wedgeMeasureBeginOpeningLength = 0.75;
- this.wedgePlacementAboveY = -1.5;
- this.wedgePlacementBelowY = 1.5;
- this.wedgeHorizontalMargin = 0.6;
- this.wedgeVerticalMargin = 0.5;
- this.distanceOffsetBetweenTwoHorizontallyCrossedWedges = 0.3;
- this.wedgeMinLength = 2.0;
- this.distanceBetweenAdjacentDynamics = 0.75;
- this.tempoChangeMeasureValitidy = 4;
- this.tempoContinousFactor = 0.7;
- this.staccatoScalingFactor = 0.8;
- this.betweenDotsDistance = 0.8;
- this.ornamentAccidentalScalingFactor = 0.65;
- this.chordSymbolTextHeight = 2.0;
- this.fingeringLabelFontHeight = 1.7;
- this.measureNumberLabelHeight = 1.5 * EngravingRules.unit;
- this.measureNumberLabelOffset = 2;
- this.tupletNumberLabelHeight = 1.5 * EngravingRules.unit;
- this.tupletNumberYOffset = 0.5;
- this.labelMarginBorderFactor = 0.1;
- this.tupletVerticalLineLength = 0.5;
- this.bezierCurveStepSize = 1000;
- this.calculateCurveParametersArrays();
- this.tieGhostObjectWidth = 0.75;
- this.tieYPositionOffsetFactor = 0.3;
- this.minimumNeededXspaceForTieGhostObject = 1.0;
- this.tieHeightMinimum = 0.28;
- this.tieHeightMaximum = 1.2;
- this.tieHeightInterpolationK = 0.0288;
- this.tieHeightInterpolationD = 0.136;
- this.slurNoteHeadYOffset = 0.5;
- this.slurStemXOffset = 0.3;
- this.slurSlopeMaxAngle = 15.0;
- this.slurTangentMinAngle = 30.0;
- this.slurTangentMaxAngle = 80.0;
- this.slursStartingAtSameStaffEntryYOffset = 0.8;
- this.repetitionEndingLabelHeight = 2.0;
- this.repetitionEndingLabelXOffset = 0.5;
- this.repetitionEndingLabelYOffset = 0.3;
- this.repetitionEndingLineYLowerOffset = 0.5;
- this.repetitionEndingLineYUpperOffset = 0.3;
- this.lyricsHeight = 2.0;
- this.verticalBetweenLyricsDistance = 0.5;
- this.betweenSyllabelMaximumDistance = 10.0;
- this.minimumDistanceBetweenDashes = 5.0;
- this.instantaniousTempoTextHeight = 2.3;
- this.continuousDynamicTextHeight = 2.3;
- this.moodTextHeight = 2.3;
- this.unknownTextHeight = 2.0;
- this.continuousTempoTextHeight = 2.3;
- this.staffLineWidth = 0.12;
- this.ledgerLineWidth = 0.12;
- this.wedgeLineWidth = 0.12;
- this.tupletLineWidth = 0.12;
- this.lyricUnderscoreLineWidth = 0.12;
- this.systemThinLineWidth = 0.12;
- this.systemBoldLineWidth = EngravingRules.unit / 2.0;
- this.systemRepetitionEndingLineWidth = 0.12;
- this.systemDotWidth = EngravingRules.unit / 5.0;
- this.distanceBetweenVerticalSystemLines = 0.35;
- this.distanceBetweenDotAndLine = 0.7;
- this.octaveShiftLineWidth = 0.12;
- this.octaveShiftVerticalLineLength = EngravingRules.unit;
- this.graceLineWidth = this.staffLineWidth * this.GraceNoteScalingFactor;
- this.minimumStaffLineDistance = 1.0;
- this.minimumCrossedBeamDifferenceMargin = 0.0001;
- this.displacedNoteMargin = 0.1;
- this.minNoteDistance = 2.0;
- this.subMeasureXSpacingThreshold = 35;
- this.measureDynamicsMaxScalingFactor = 2.5;
- this.populateDictionaries();
- try {
- this.maxInstructionsConstValue = this.ClefLeftMargin + this.ClefRightMargin + this.KeyRightMargin + this.RhythmRightMargin + 11;
- }
- catch (ex) {
- logging_1.Logging.log("EngravingRules()", ex);
- }
- }
- Object.defineProperty(EngravingRules, "Rules", {
- get: function () {
- return EngravingRules.rules !== undefined ? EngravingRules.rules : (EngravingRules.rules = new EngravingRules());
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SamplingUnit", {
- get: function () {
- return this.samplingUnit;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SheetTitleHeight", {
- get: function () {
- return this.sheetTitleHeight;
- },
- set: function (value) {
- this.sheetTitleHeight = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SheetSubtitleHeight", {
- get: function () {
- return this.sheetSubtitleHeight;
- },
- set: function (value) {
- this.sheetSubtitleHeight = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SheetMinimumDistanceBetweenTitleAndSubtitle", {
- get: function () {
- return this.sheetMinimumDistanceBetweenTitleAndSubtitle;
- },
- set: function (value) {
- this.sheetMinimumDistanceBetweenTitleAndSubtitle = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SheetComposerHeight", {
- get: function () {
- return this.sheetComposerHeight;
- },
- set: function (value) {
- this.sheetComposerHeight = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SheetAuthorHeight", {
- get: function () {
- return this.sheetAuthorHeight;
- },
- set: function (value) {
- this.sheetAuthorHeight = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "PagePlacement", {
- get: function () {
- return this.pagePlacementEnum;
- },
- set: function (value) {
- this.pagePlacementEnum = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "PageHeight", {
- get: function () {
- return this.pageHeight;
- },
- set: function (value) {
- this.pageHeight = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "PageTopMargin", {
- get: function () {
- return this.pageTopMargin;
- },
- set: function (value) {
- this.pageTopMargin = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "PageBottomMargin", {
- get: function () {
- return this.pageBottomMargin;
- },
- set: function (value) {
- this.pageBottomMargin = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "PageLeftMargin", {
- get: function () {
- return this.pageLeftMargin;
- },
- set: function (value) {
- this.pageLeftMargin = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "PageRightMargin", {
- get: function () {
- return this.pageRightMargin;
- },
- set: function (value) {
- this.pageRightMargin = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "TitleTopDistance", {
- get: function () {
- return this.titleTopDistance;
- },
- set: function (value) {
- this.titleTopDistance = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "TitleBottomDistance", {
- get: function () {
- return this.titleBottomDistance;
- },
- set: function (value) {
- this.titleBottomDistance = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SystemComposerDistance", {
- get: function () {
- return this.systemComposerDistance;
- },
- set: function (value) {
- this.systemComposerDistance = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "InstrumentLabelTextHeight", {
- get: function () {
- return this.instrumentLabelTextHeight;
- },
- set: function (value) {
- this.instrumentLabelTextHeight = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SystemDistance", {
- get: function () {
- return this.systemDistance;
- },
- set: function (value) {
- this.systemDistance = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SystemLeftMargin", {
- get: function () {
- return this.systemLeftMargin;
- },
- set: function (value) {
- this.systemLeftMargin = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SystemRightMargin", {
- get: function () {
- return this.systemRightMargin;
- },
- set: function (value) {
- this.systemRightMargin = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "FirstSystemMargin", {
- get: function () {
- return this.firstSystemMargin;
- },
- set: function (value) {
- this.firstSystemMargin = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SystemLabelsRightMargin", {
- get: function () {
- return this.systemLabelsRightMargin;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "MinimumAllowedDistanceBetweenSystems", {
- get: function () {
- return this.minimumAllowedDistanceBetweenSystems;
- },
- set: function (value) {
- this.minimumAllowedDistanceBetweenSystems = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "LastSystemMaxScalingFactor", {
- get: function () {
- return this.lastSystemMaxScalingFactor;
- },
- set: function (value) {
- this.lastSystemMaxScalingFactor = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "StaffDistance", {
- get: function () {
- return this.staffDistance;
- },
- set: function (value) {
- this.staffDistance = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "BetweenStaffDistance", {
- get: function () {
- return this.betweenStaffDistance;
- },
- set: function (value) {
- this.betweenStaffDistance = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "StaffHeight", {
- get: function () {
- return this.staffHeight;
- },
- set: function (value) {
- this.staffHeight = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "BetweenStaffLinesDistance", {
- get: function () {
- return this.betweenStaffLinesDistance;
- },
- set: function (value) {
- this.betweenStaffLinesDistance = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "BeamWidth", {
- get: function () {
- return this.beamWidth;
- },
- set: function (value) {
- this.beamWidth = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "BeamSpaceWidth", {
- get: function () {
- return this.beamSpaceWidth;
- },
- set: function (value) {
- this.beamSpaceWidth = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "BeamForwardLength", {
- get: function () {
- return this.beamForwardLength;
- },
- set: function (value) {
- this.beamForwardLength = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "BetweenKeySymbolsDistance", {
- get: function () {
- return this.betweenKeySymbolsDistance;
- },
- set: function (value) {
- this.betweenKeySymbolsDistance = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "ClefLeftMargin", {
- get: function () {
- return this.clefLeftMargin;
- },
- set: function (value) {
- this.clefLeftMargin = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "ClefRightMargin", {
- get: function () {
- return this.clefRightMargin;
- },
- set: function (value) {
- this.clefRightMargin = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "KeyRightMargin", {
- get: function () {
- return this.keyRightMargin;
- },
- set: function (value) {
- this.keyRightMargin = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "RhythmRightMargin", {
- get: function () {
- return this.rhythmRightMargin;
- },
- set: function (value) {
- this.rhythmRightMargin = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "InStaffClefScalingFactor", {
- get: function () {
- return this.inStaffClefScalingFactor;
- },
- set: function (value) {
- this.inStaffClefScalingFactor = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "DistanceBetweenNaturalAndSymbolWhenCancelling", {
- get: function () {
- return this.distanceBetweenNaturalAndSymbolWhenCancelling;
- },
- set: function (value) {
- this.distanceBetweenNaturalAndSymbolWhenCancelling = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "NoteHelperLinesOffset", {
- get: function () {
- return this.noteHelperLinesOffset;
- },
- set: function (value) {
- this.noteHelperLinesOffset = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "MeasureLeftMargin", {
- get: function () {
- return this.measureLeftMargin;
- },
- set: function (value) {
- this.measureLeftMargin = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "MeasureRightMargin", {
- get: function () {
- return this.measureRightMargin;
- },
- set: function (value) {
- this.measureRightMargin = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "DistanceBetweenLastInstructionAndRepetitionBarline", {
- get: function () {
- return this.distanceBetweenLastInstructionAndRepetitionBarline;
- },
- set: function (value) {
- this.distanceBetweenLastInstructionAndRepetitionBarline = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "ArpeggioDistance", {
- get: function () {
- return this.arpeggioDistance;
- },
- set: function (value) {
- this.arpeggioDistance = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "StaccatoShorteningFactor", {
- get: function () {
- return this.staccatoShorteningFactor;
- },
- set: function (value) {
- this.staccatoShorteningFactor = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "IdealStemLength", {
- get: function () {
- return this.idealStemLength;
- },
- set: function (value) {
- this.idealStemLength = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "StemNoteHeadBorderYOffset", {
- get: function () {
- return this.stemNoteHeadBorderYOffset;
- },
- set: function (value) {
- this.stemNoteHeadBorderYOffset = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "StemWidth", {
- get: function () {
- return this.stemWidth;
- },
- set: function (value) {
- this.stemWidth = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "StemMargin", {
- get: function () {
- return this.stemMargin;
- },
- set: function (value) {
- this.stemMargin = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "StemMinLength", {
- get: function () {
- return this.stemMinLength;
- },
- set: function (value) {
- this.stemMinLength = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "StemMaxLength", {
- get: function () {
- return this.stemMaxLength;
- },
- set: function (value) {
- this.stemMaxLength = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "BeamSlopeMaxAngle", {
- get: function () {
- return this.beamSlopeMaxAngle;
- },
- set: function (value) {
- this.beamSlopeMaxAngle = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "StemMinAllowedDistanceBetweenNoteHeadAndBeamLine", {
- get: function () {
- return this.stemMinAllowedDistanceBetweenNoteHeadAndBeamLine;
- },
- set: function (value) {
- this.stemMinAllowedDistanceBetweenNoteHeadAndBeamLine = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "GraceNoteScalingFactor", {
- get: function () {
- return this.graceNoteScalingFactor;
- },
- set: function (value) {
- this.graceNoteScalingFactor = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "GraceNoteXOffset", {
- get: function () {
- return this.graceNoteXOffset;
- },
- set: function (value) {
- this.graceNoteXOffset = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "WedgeOpeningLength", {
- get: function () {
- return this.wedgeOpeningLength;
- },
- set: function (value) {
- this.wedgeOpeningLength = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "WedgeMeasureEndOpeningLength", {
- get: function () {
- return this.wedgeMeasureEndOpeningLength;
- },
- set: function (value) {
- this.wedgeMeasureEndOpeningLength = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "WedgeMeasureBeginOpeningLength", {
- get: function () {
- return this.wedgeMeasureBeginOpeningLength;
- },
- set: function (value) {
- this.wedgeMeasureBeginOpeningLength = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "WedgePlacementAboveY", {
- get: function () {
- return this.wedgePlacementAboveY;
- },
- set: function (value) {
- this.wedgePlacementAboveY = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "WedgePlacementBelowY", {
- get: function () {
- return this.wedgePlacementBelowY;
- },
- set: function (value) {
- this.wedgePlacementBelowY = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "WedgeHorizontalMargin", {
- get: function () {
- return this.wedgeHorizontalMargin;
- },
- set: function (value) {
- this.wedgeHorizontalMargin = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "WedgeVerticalMargin", {
- get: function () {
- return this.wedgeVerticalMargin;
- },
- set: function (value) {
- this.wedgeVerticalMargin = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "DistanceOffsetBetweenTwoHorizontallyCrossedWedges", {
- get: function () {
- return this.distanceOffsetBetweenTwoHorizontallyCrossedWedges;
- },
- set: function (value) {
- this.distanceOffsetBetweenTwoHorizontallyCrossedWedges = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "WedgeMinLength", {
- get: function () {
- return this.wedgeMinLength;
- },
- set: function (value) {
- this.wedgeMinLength = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "DistanceBetweenAdjacentDynamics", {
- get: function () {
- return this.distanceBetweenAdjacentDynamics;
- },
- set: function (value) {
- this.distanceBetweenAdjacentDynamics = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "TempoChangeMeasureValitidy", {
- get: function () {
- return this.tempoChangeMeasureValitidy;
- },
- set: function (value) {
- this.tempoChangeMeasureValitidy = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "TempoContinousFactor", {
- get: function () {
- return this.tempoContinousFactor;
- },
- set: function (value) {
- this.tempoContinousFactor = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "StaccatoScalingFactor", {
- get: function () {
- return this.staccatoScalingFactor;
- },
- set: function (value) {
- this.staccatoScalingFactor = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "BetweenDotsDistance", {
- get: function () {
- return this.betweenDotsDistance;
- },
- set: function (value) {
- this.betweenDotsDistance = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "OrnamentAccidentalScalingFactor", {
- get: function () {
- return this.ornamentAccidentalScalingFactor;
- },
- set: function (value) {
- this.ornamentAccidentalScalingFactor = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "ChordSymbolTextHeight", {
- get: function () {
- return this.chordSymbolTextHeight;
- },
- set: function (value) {
- this.chordSymbolTextHeight = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "FingeringLabelFontHeight", {
- get: function () {
- return this.fingeringLabelFontHeight;
- },
- set: function (value) {
- this.fingeringLabelFontHeight = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "MeasureNumberLabelHeight", {
- get: function () {
- return this.measureNumberLabelHeight;
- },
- set: function (value) {
- this.measureNumberLabelHeight = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "MeasureNumberLabelOffset", {
- get: function () {
- return this.measureNumberLabelOffset;
- },
- set: function (value) {
- this.measureNumberLabelOffset = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "TupletNumberLabelHeight", {
- get: function () {
- return this.tupletNumberLabelHeight;
- },
- set: function (value) {
- this.tupletNumberLabelHeight = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "TupletNumberYOffset", {
- get: function () {
- return this.tupletNumberYOffset;
- },
- set: function (value) {
- this.tupletNumberYOffset = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "LabelMarginBorderFactor", {
- get: function () {
- return this.labelMarginBorderFactor;
- },
- set: function (value) {
- this.labelMarginBorderFactor = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "TupletVerticalLineLength", {
- get: function () {
- return this.tupletVerticalLineLength;
- },
- set: function (value) {
- this.tupletVerticalLineLength = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "RepetitionEndingLabelHeight", {
- get: function () {
- return this.repetitionEndingLabelHeight;
- },
- set: function (value) {
- this.repetitionEndingLabelHeight = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "RepetitionEndingLabelXOffset", {
- get: function () {
- return this.repetitionEndingLabelXOffset;
- },
- set: function (value) {
- this.repetitionEndingLabelXOffset = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "RepetitionEndingLabelYOffset", {
- get: function () {
- return this.repetitionEndingLabelYOffset;
- },
- set: function (value) {
- this.repetitionEndingLabelYOffset = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "RepetitionEndingLineYLowerOffset", {
- get: function () {
- return this.repetitionEndingLineYLowerOffset;
- },
- set: function (value) {
- this.repetitionEndingLineYLowerOffset = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "RepetitionEndingLineYUpperOffset", {
- get: function () {
- return this.repetitionEndingLineYUpperOffset;
- },
- set: function (value) {
- this.repetitionEndingLineYUpperOffset = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "LyricsHeight", {
- get: function () {
- return this.lyricsHeight;
- },
- set: function (value) {
- this.lyricsHeight = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "VerticalBetweenLyricsDistance", {
- get: function () {
- return this.verticalBetweenLyricsDistance;
- },
- set: function (value) {
- this.verticalBetweenLyricsDistance = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "BetweenSyllabelMaximumDistance", {
- get: function () {
- return this.betweenSyllabelMaximumDistance;
- },
- set: function (value) {
- this.betweenSyllabelMaximumDistance = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "MinimumDistanceBetweenDashes", {
- get: function () {
- return this.minimumDistanceBetweenDashes;
- },
- set: function (value) {
- this.minimumDistanceBetweenDashes = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "BezierCurveStepSize", {
- get: function () {
- return this.bezierCurveStepSize;
- },
- set: function (value) {
- this.bezierCurveStepSize = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "TPow3", {
- get: function () {
- return this.tPower3;
- },
- set: function (value) {
- this.tPower3 = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "OneMinusTPow3", {
- get: function () {
- return this.oneMinusTPower3;
- },
- set: function (value) {
- this.oneMinusTPower3 = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "BezierFactorOne", {
- get: function () {
- return this.factorOne;
- },
- set: function (value) {
- this.factorOne = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "BezierFactorTwo", {
- get: function () {
- return this.factorTwo;
- },
- set: function (value) {
- this.factorTwo = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "TieGhostObjectWidth", {
- get: function () {
- return this.tieGhostObjectWidth;
- },
- set: function (value) {
- this.tieGhostObjectWidth = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "TieYPositionOffsetFactor", {
- get: function () {
- return this.tieYPositionOffsetFactor;
- },
- set: function (value) {
- this.tieYPositionOffsetFactor = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "MinimumNeededXspaceForTieGhostObject", {
- get: function () {
- return this.minimumNeededXspaceForTieGhostObject;
- },
- set: function (value) {
- this.minimumNeededXspaceForTieGhostObject = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "TieHeightMinimum", {
- get: function () {
- return this.tieHeightMinimum;
- },
- set: function (value) {
- this.tieHeightMinimum = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "TieHeightMaximum", {
- get: function () {
- return this.tieHeightMaximum;
- },
- set: function (value) {
- this.tieHeightMaximum = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "TieHeightInterpolationK", {
- get: function () {
- return this.tieHeightInterpolationK;
- },
- set: function (value) {
- this.tieHeightInterpolationK = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "TieHeightInterpolationD", {
- get: function () {
- return this.tieHeightInterpolationD;
- },
- set: function (value) {
- this.tieHeightInterpolationD = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SlurNoteHeadYOffset", {
- get: function () {
- return this.slurNoteHeadYOffset;
- },
- set: function (value) {
- this.slurNoteHeadYOffset = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SlurStemXOffset", {
- get: function () {
- return this.slurStemXOffset;
- },
- set: function (value) {
- this.slurStemXOffset = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SlurSlopeMaxAngle", {
- get: function () {
- return this.slurSlopeMaxAngle;
- },
- set: function (value) {
- this.slurSlopeMaxAngle = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SlurTangentMinAngle", {
- get: function () {
- return this.slurTangentMinAngle;
- },
- set: function (value) {
- this.slurTangentMinAngle = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SlurTangentMaxAngle", {
- get: function () {
- return this.slurTangentMaxAngle;
- },
- set: function (value) {
- this.slurTangentMaxAngle = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SlursStartingAtSameStaffEntryYOffset", {
- get: function () {
- return this.slursStartingAtSameStaffEntryYOffset;
- },
- set: function (value) {
- this.slursStartingAtSameStaffEntryYOffset = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "InstantaniousTempoTextHeight", {
- get: function () {
- return this.instantaniousTempoTextHeight;
- },
- set: function (value) {
- this.instantaniousTempoTextHeight = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "ContinuousDynamicTextHeight", {
- get: function () {
- return this.continuousDynamicTextHeight;
- },
- set: function (value) {
- this.continuousDynamicTextHeight = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "MoodTextHeight", {
- get: function () {
- return this.moodTextHeight;
- },
- set: function (value) {
- this.moodTextHeight = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "ContinuousTempoTextHeight", {
- get: function () {
- return this.continuousTempoTextHeight;
- },
- set: function (value) {
- this.continuousTempoTextHeight = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "UnknownTextHeight", {
- get: function () {
- return this.unknownTextHeight;
- },
- set: function (value) {
- this.unknownTextHeight = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "StaffLineWidth", {
- get: function () {
- return this.staffLineWidth;
- },
- set: function (value) {
- this.staffLineWidth = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "LedgerLineWidth", {
- get: function () {
- return this.ledgerLineWidth;
- },
- set: function (value) {
- this.ledgerLineWidth = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "WedgeLineWidth", {
- get: function () {
- return this.wedgeLineWidth;
- },
- set: function (value) {
- this.wedgeLineWidth = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "TupletLineWidth", {
- get: function () {
- return this.tupletLineWidth;
- },
- set: function (value) {
- this.tupletLineWidth = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "LyricUnderscoreLineWidth", {
- get: function () {
- return this.lyricUnderscoreLineWidth;
- },
- set: function (value) {
- this.lyricUnderscoreLineWidth = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SystemThinLineWidth", {
- get: function () {
- return this.systemThinLineWidth;
- },
- set: function (value) {
- this.systemThinLineWidth = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SystemBoldLineWidth", {
- get: function () {
- return this.systemBoldLineWidth;
- },
- set: function (value) {
- this.systemBoldLineWidth = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SystemRepetitionEndingLineWidth", {
- get: function () {
- return this.systemRepetitionEndingLineWidth;
- },
- set: function (value) {
- this.systemRepetitionEndingLineWidth = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SystemDotWidth", {
- get: function () {
- return this.systemDotWidth;
- },
- set: function (value) {
- this.systemDotWidth = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "DistanceBetweenVerticalSystemLines", {
- get: function () {
- return this.distanceBetweenVerticalSystemLines;
- },
- set: function (value) {
- this.distanceBetweenVerticalSystemLines = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "DistanceBetweenDotAndLine", {
- get: function () {
- return this.distanceBetweenDotAndLine;
- },
- set: function (value) {
- this.distanceBetweenDotAndLine = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "OctaveShiftLineWidth", {
- get: function () {
- return this.octaveShiftLineWidth;
- },
- set: function (value) {
- this.octaveShiftLineWidth = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "OctaveShiftVerticalLineLength", {
- get: function () {
- return this.octaveShiftVerticalLineLength;
- },
- set: function (value) {
- this.octaveShiftVerticalLineLength = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "GraceLineWidth", {
- get: function () {
- return this.graceLineWidth;
- },
- set: function (value) {
- this.graceLineWidth = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "MinimumStaffLineDistance", {
- get: function () {
- return this.minimumStaffLineDistance;
- },
- set: function (value) {
- this.minimumStaffLineDistance = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "MinimumCrossedBeamDifferenceMargin", {
- get: function () {
- return this.minimumCrossedBeamDifferenceMargin;
- },
- set: function (value) {
- this.minimumCrossedBeamDifferenceMargin = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "DisplacedNoteMargin", {
- get: function () {
- return this.displacedNoteMargin;
- },
- set: function (value) {
- this.displacedNoteMargin = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "MinNoteDistance", {
- get: function () {
- return this.minNoteDistance;
- },
- set: function (value) {
- this.minNoteDistance = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "SubMeasureXSpacingThreshold", {
- get: function () {
- return this.subMeasureXSpacingThreshold;
- },
- set: function (value) {
- this.subMeasureXSpacingThreshold = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "MeasureDynamicsMaxScalingFactor", {
- get: function () {
- return this.measureDynamicsMaxScalingFactor;
- },
- set: function (value) {
- this.measureDynamicsMaxScalingFactor = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "MaxInstructionsConstValue", {
- get: function () {
- return this.maxInstructionsConstValue;
- },
- set: function (value) {
- this.maxInstructionsConstValue = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "NoteDistances", {
- get: function () {
- return this.noteDistances;
- },
- set: function (value) {
- this.noteDistances = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "NoteDistancesScalingFactors", {
- get: function () {
- return this.noteDistancesScalingFactors;
- },
- set: function (value) {
- this.noteDistancesScalingFactors = value;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "DurationDistanceDict", {
- get: function () {
- return this.durationDistanceDict;
- },
- enumerable: true,
- configurable: true
- });
- Object.defineProperty(EngravingRules.prototype, "DurationScalingDistanceDict", {
- get: function () {
- return this.durationScalingDistanceDict;
- },
- enumerable: true,
- configurable: true
- });
- EngravingRules.prototype.populateDictionaries = function () {
- for (var i = 0; i < this.noteDistances.length; i++) {
- switch (i) {
- case 0:
- this.durationDistanceDict[0.015625] = this.noteDistances[i];
- this.durationScalingDistanceDict[0.015625] = this.noteDistancesScalingFactors[i];
- break;
- case 1:
- this.durationDistanceDict[0.03125] = this.noteDistances[i];
- this.durationScalingDistanceDict[0.03125] = this.noteDistancesScalingFactors[i];
- break;
- case 2:
- this.durationDistanceDict[0.0625] = this.noteDistances[i];
- this.durationScalingDistanceDict[0.0625] = this.noteDistancesScalingFactors[i];
- break;
- case 3:
- this.durationDistanceDict[0.125] = this.noteDistances[i];
- this.durationScalingDistanceDict[0.125] = this.noteDistancesScalingFactors[i];
- break;
- case 4:
- this.durationDistanceDict[0.25] = this.noteDistances[i];
- this.durationScalingDistanceDict[0.25] = this.noteDistancesScalingFactors[i];
- break;
- case 5:
- this.durationDistanceDict[0.5] = this.noteDistances[i];
- this.durationScalingDistanceDict[0.5] = this.noteDistancesScalingFactors[i];
- break;
- case 6:
- this.durationDistanceDict[1.0] = this.noteDistances[i];
- this.durationScalingDistanceDict[1.0] = this.noteDistancesScalingFactors[i];
- break;
- case 7:
- this.durationDistanceDict[2.0] = this.noteDistances[i];
- this.durationScalingDistanceDict[2.0] = this.noteDistancesScalingFactors[i];
- break;
- default:
- }
- }
- };
- EngravingRules.prototype.calculateCurveParametersArrays = function () {
- this.tPower3 = new Array(this.bezierCurveStepSize);
- this.oneMinusTPower3 = new Array(this.bezierCurveStepSize);
- this.factorOne = new Array(this.bezierCurveStepSize);
- this.factorTwo = new Array(this.bezierCurveStepSize);
- for (var i = 0; i < this.bezierCurveStepSize; i++) {
- var t = i / this.bezierCurveStepSize;
- this.tPower3[i] = Math.pow(t, 3);
- this.oneMinusTPower3[i] = Math.pow((1 - t), 3);
- this.factorOne[i] = 3 * Math.pow((1 - t), 2) * t;
- this.factorTwo[i] = 3 * (1 - t) * Math.pow(t, 2);
- }
- };
- EngravingRules.unit = 1.0;
- return EngravingRules;
- }());
- exports.EngravingRules = EngravingRules;
|