MultiLineText.html 74 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: Class: MultiLineText</title>
  6. <script src="scripts/prettify/prettify.js"> </script>
  7. <script src="scripts/prettify/lang-css.js"> </script>
  8. <!--[if lt IE 9]>
  9. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  10. <![endif]-->
  11. <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
  12. <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
  13. </head>
  14. <body>
  15. <div id="main">
  16. <h1 class="page-title">Class: MultiLineText</h1>
  17. <section>
  18. <header>
  19. <h2><span class="attribs"><span class="type-signature"></span></span>MultiLineText<span class="signature">()</span><span class="type-signature"></span></h2>
  20. </header>
  21. <article>
  22. <div class="container-overview">
  23. <h4 class="name" id="MultiLineText"><span class="type-signature"></span>new MultiLineText<span class="signature">()</span><span class="type-signature"></span></h4>
  24. <div class="description">
  25. Multiple line text drawing directly into the canvas.
  26. Has support for basic text indent and alignment.
  27. </div>
  28. <dl class="details">
  29. <dt class="tag-source">Source:</dt>
  30. <dd class="tag-source"><ul class="dummy"><li>
  31. <a href="objects_MultiLineText.js.html">objects/MultiLineText.js</a>, <a href="objects_MultiLineText.js.html#line12">line 12</a>
  32. </li></ul></dd>
  33. </dl>
  34. </div>
  35. <h3 class="subsection-title">Extends</h3>
  36. <ul>
  37. <li><a href="Text.html">Text</a></li>
  38. </ul>
  39. <h3 class="subsection-title">Members</h3>
  40. <h4 class="name" id="beingDragged"><span class="type-signature"></span>beingDragged<span class="type-signature"> :boolean</span></h4>
  41. <div class="description">
  42. Flag to indicate if the object is currently being dragged.
  43. </div>
  44. <h5>Type:</h5>
  45. <ul>
  46. <li>
  47. <span class="param-type">boolean</span>
  48. </li>
  49. </ul>
  50. <dl class="details">
  51. <dt class="inherited-from">Inherited From:</dt>
  52. <dd class="inherited-from"><ul class="dummy"><li>
  53. <a href="Object2D.html#beingDragged">Object2D#beingDragged</a>
  54. </li></ul></dd>
  55. <dt class="tag-source">Source:</dt>
  56. <dd class="tag-source"><ul class="dummy"><li>
  57. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line201">line 201</a>
  58. </li></ul></dd>
  59. </dl>
  60. <h4 class="name" id="children"><span class="type-signature"></span>children<span class="type-signature"> :Array.&lt;<a href="Object2D.html">Object2D</a>></span></h4>
  61. <div class="description">
  62. List of children objects attached to the object.
  63. </div>
  64. <h5>Type:</h5>
  65. <ul>
  66. <li>
  67. <span class="param-type">Array.&lt;<a href="Object2D.html">Object2D</a>></span>
  68. </li>
  69. </ul>
  70. <dl class="details">
  71. <dt class="inherited-from">Inherited From:</dt>
  72. <dd class="inherited-from"><ul class="dummy"><li>
  73. <a href="Object2D.html#children">Object2D#children</a>
  74. </li></ul></dd>
  75. <dt class="tag-source">Source:</dt>
  76. <dd class="tag-source"><ul class="dummy"><li>
  77. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line28">line 28</a>
  78. </li></ul></dd>
  79. </dl>
  80. <h4 class="name" id="draggable"><span class="type-signature"></span>draggable<span class="type-signature"> :boolean</span></h4>
  81. <div class="description">
  82. Draggable controls if its possible to drag the object around. Set this true to enable dragging events on this object.
  83. The onPointerDrag callback is used to update the state of the object while being dragged, by default it just updates the object position.
  84. </div>
  85. <h5>Type:</h5>
  86. <ul>
  87. <li>
  88. <span class="param-type">boolean</span>
  89. </li>
  90. </ul>
  91. <dl class="details">
  92. <dt class="inherited-from">Inherited From:</dt>
  93. <dd class="inherited-from"><ul class="dummy"><li>
  94. <a href="Object2D.html#draggable">Object2D#draggable</a>
  95. </li></ul></dd>
  96. <dt class="tag-source">Source:</dt>
  97. <dd class="tag-source"><ul class="dummy"><li>
  98. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line155">line 155</a>
  99. </li></ul></dd>
  100. </dl>
  101. <h4 class="name" id="draw"><span class="type-signature"></span>draw<span class="type-signature"></span></h4>
  102. <div class="description">
  103. Draw the object into the canvas, this is called transform() and style(), should be where the content is actually drawn into the canvas.
  104. Should be implemented by underlying classes.
  105. </div>
  106. <dl class="details">
  107. <dt class="tag-overrides">Overrides:</dt>
  108. <dd class="tag-overrides"><ul class="dummy"><li>
  109. <a href="Text.html#draw">Text#draw</a>
  110. </li></ul></dd>
  111. <dt class="tag-source">Source:</dt>
  112. <dd class="tag-source"><ul class="dummy"><li>
  113. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line487">line 487</a>
  114. </li></ul></dd>
  115. </dl>
  116. <h4 class="name" id="fillStyle"><span class="type-signature"></span>fillStyle<span class="type-signature"> :<a href="Style.html">Style</a></span></h4>
  117. <div class="description">
  118. CSS background color of the box. If set null it is ignored.
  119. </div>
  120. <h5>Type:</h5>
  121. <ul>
  122. <li>
  123. <span class="param-type"><a href="Style.html">Style</a></span>
  124. </li>
  125. </ul>
  126. <dl class="details">
  127. <dt class="inherited-from">Inherited From:</dt>
  128. <dd class="inherited-from"><ul class="dummy"><li>
  129. <a href="Text.html#fillStyle">Text#fillStyle</a>
  130. </li></ul></dd>
  131. <dt class="tag-source">Source:</dt>
  132. <dd class="tag-source"><ul class="dummy"><li>
  133. <a href="objects_Text.js.html">objects/Text.js</a>, <a href="objects_Text.js.html#line49">line 49</a>
  134. </li></ul></dd>
  135. </dl>
  136. <h4 class="name" id="font"><span class="type-signature"></span>font<span class="type-signature"> :string</span></h4>
  137. <div class="description">
  138. Font of the text.
  139. </div>
  140. <h5>Type:</h5>
  141. <ul>
  142. <li>
  143. <span class="param-type">string</span>
  144. </li>
  145. </ul>
  146. <dl class="details">
  147. <dt class="inherited-from">Inherited From:</dt>
  148. <dd class="inherited-from"><ul class="dummy"><li>
  149. <a href="Text.html#font">Text#font</a>
  150. </li></ul></dd>
  151. <dt class="tag-source">Source:</dt>
  152. <dd class="tag-source"><ul class="dummy"><li>
  153. <a href="objects_Text.js.html">objects/Text.js</a>, <a href="objects_Text.js.html#line28">line 28</a>
  154. </li></ul></dd>
  155. </dl>
  156. <h4 class="name" id="globalMatrix"><span class="type-signature"></span>globalMatrix<span class="type-signature"> :<a href="Matrix.html">Matrix</a></span></h4>
  157. <div class="description">
  158. Global transformation matrix multiplied by the parent matrix.
  159. Used to transform the object before projecting into screen coordinates.
  160. </div>
  161. <h5>Type:</h5>
  162. <ul>
  163. <li>
  164. <span class="param-type"><a href="Matrix.html">Matrix</a></span>
  165. </li>
  166. </ul>
  167. <dl class="details">
  168. <dt class="inherited-from">Inherited From:</dt>
  169. <dd class="inherited-from"><ul class="dummy"><li>
  170. <a href="Object2D.html#globalMatrix">Object2D#globalMatrix</a>
  171. </li></ul></dd>
  172. <dt class="tag-source">Source:</dt>
  173. <dd class="tag-source"><ul class="dummy"><li>
  174. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line110">line 110</a>
  175. </li></ul></dd>
  176. </dl>
  177. <h4 class="name" id="ignoreViewport"><span class="type-signature"></span>ignoreViewport<span class="type-signature"> :boolean</span></h4>
  178. <div class="description">
  179. Flag to indicate whether this object ignores the viewport transformation.
  180. </div>
  181. <h5>Type:</h5>
  182. <ul>
  183. <li>
  184. <span class="param-type">boolean</span>
  185. </li>
  186. </ul>
  187. <dl class="details">
  188. <dt class="inherited-from">Inherited From:</dt>
  189. <dd class="inherited-from"><ul class="dummy"><li>
  190. <a href="Object2D.html#ignoreViewport">Object2D#ignoreViewport</a>
  191. </li></ul></dd>
  192. <dt class="tag-source">Source:</dt>
  193. <dd class="tag-source"><ul class="dummy"><li>
  194. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line171">line 171</a>
  195. </li></ul></dd>
  196. </dl>
  197. <h4 class="name" id="inverseGlobalMatrix"><span class="type-signature"></span>inverseGlobalMatrix<span class="type-signature"> :<a href="Matrix.html">Matrix</a></span></h4>
  198. <div class="description">
  199. Inverse of the global (world) transform matrix.
  200. Used to convert pointer input points (viewport space) into object coordinates.
  201. </div>
  202. <h5>Type:</h5>
  203. <ul>
  204. <li>
  205. <span class="param-type"><a href="Matrix.html">Matrix</a></span>
  206. </li>
  207. </ul>
  208. <dl class="details">
  209. <dt class="inherited-from">Inherited From:</dt>
  210. <dd class="inherited-from"><ul class="dummy"><li>
  211. <a href="Object2D.html#inverseGlobalMatrix">Object2D#inverseGlobalMatrix</a>
  212. </li></ul></dd>
  213. <dt class="tag-source">Source:</dt>
  214. <dd class="tag-source"><ul class="dummy"><li>
  215. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line119">line 119</a>
  216. </li></ul></dd>
  217. </dl>
  218. <h4 class="name" id="layer"><span class="type-signature"></span>layer<span class="type-signature"> :number</span></h4>
  219. <div class="description">
  220. Layer of this object, objects are sorted by layer value.
  221. Lower layer value is draw first, higher layer value is drawn on top.
  222. </div>
  223. <h5>Type:</h5>
  224. <ul>
  225. <li>
  226. <span class="param-type">number</span>
  227. </li>
  228. </ul>
  229. <dl class="details">
  230. <dt class="inherited-from">Inherited From:</dt>
  231. <dd class="inherited-from"><ul class="dummy"><li>
  232. <a href="Object2D.html#layer">Object2D#layer</a>
  233. </li></ul></dd>
  234. <dt class="tag-source">Source:</dt>
  235. <dd class="tag-source"><ul class="dummy"><li>
  236. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line94">line 94</a>
  237. </li></ul></dd>
  238. </dl>
  239. <h4 class="name" id="level"><span class="type-signature"></span>level<span class="type-signature"> :number</span></h4>
  240. <div class="description">
  241. Depth level in the object tree, objects with higher depth are drawn on top.
  242. The layer value is considered first.
  243. </div>
  244. <h5>Type:</h5>
  245. <ul>
  246. <li>
  247. <span class="param-type">number</span>
  248. </li>
  249. </ul>
  250. <dl class="details">
  251. <dt class="inherited-from">Inherited From:</dt>
  252. <dd class="inherited-from"><ul class="dummy"><li>
  253. <a href="Object2D.html#level">Object2D#level</a>
  254. </li></ul></dd>
  255. <dt class="tag-source">Source:</dt>
  256. <dd class="tag-source"><ul class="dummy"><li>
  257. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line44">line 44</a>
  258. </li></ul></dd>
  259. </dl>
  260. <h4 class="name" id="lineHeight"><span class="type-signature"></span>lineHeight<span class="type-signature"> :number</span></h4>
  261. <div class="description">
  262. Height of each line of text, can be smaller or larger than the actual font size.
  263. Can be set to null to be ignored.
  264. </div>
  265. <h5>Type:</h5>
  266. <ul>
  267. <li>
  268. <span class="param-type">number</span>
  269. </li>
  270. </ul>
  271. <dl class="details">
  272. <dt class="tag-source">Source:</dt>
  273. <dd class="tag-source"><ul class="dummy"><li>
  274. <a href="objects_MultiLineText.js.html">objects/MultiLineText.js</a>, <a href="objects_MultiLineText.js.html#line32">line 32</a>
  275. </li></ul></dd>
  276. </dl>
  277. <h4 class="name" id="lineWidth"><span class="type-signature"></span>lineWidth<span class="type-signature"> :number</span></h4>
  278. <div class="description">
  279. Line width, only used if a valid strokeStyle is defined.
  280. </div>
  281. <h5>Type:</h5>
  282. <ul>
  283. <li>
  284. <span class="param-type">number</span>
  285. </li>
  286. </ul>
  287. <dl class="details">
  288. <dt class="inherited-from">Inherited From:</dt>
  289. <dd class="inherited-from"><ul class="dummy"><li>
  290. <a href="Text.html#lineWidth">Text#lineWidth</a>
  291. </li></ul></dd>
  292. <dt class="tag-source">Source:</dt>
  293. <dd class="tag-source"><ul class="dummy"><li>
  294. <a href="objects_Text.js.html">objects/Text.js</a>, <a href="objects_Text.js.html#line42">line 42</a>
  295. </li></ul></dd>
  296. </dl>
  297. <h4 class="name" id="masks"><span class="type-signature"></span>masks<span class="type-signature"> :Array.&lt;<a href="Mask.html">Mask</a>></span></h4>
  298. <div class="description">
  299. Mask objects being applied to this object. Used to mask/subtract portions of this object when rendering.
  300. Multiple masks can be used simultaneously. Same mask might be reused for multiple objects.
  301. </div>
  302. <h5>Type:</h5>
  303. <ul>
  304. <li>
  305. <span class="param-type">Array.&lt;<a href="Mask.html">Mask</a>></span>
  306. </li>
  307. </ul>
  308. <dl class="details">
  309. <dt class="inherited-from">Inherited From:</dt>
  310. <dd class="inherited-from"><ul class="dummy"><li>
  311. <a href="Object2D.html#masks">Object2D#masks</a>
  312. </li></ul></dd>
  313. <dt class="tag-source">Source:</dt>
  314. <dd class="tag-source"><ul class="dummy"><li>
  315. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line128">line 128</a>
  316. </li></ul></dd>
  317. </dl>
  318. <h4 class="name" id="matrix"><span class="type-signature"></span>matrix<span class="type-signature"> :<a href="Matrix.html">Matrix</a></span></h4>
  319. <div class="description">
  320. Local transformation matrix applied to the object.
  321. </div>
  322. <h5>Type:</h5>
  323. <ul>
  324. <li>
  325. <span class="param-type"><a href="Matrix.html">Matrix</a></span>
  326. </li>
  327. </ul>
  328. <dl class="details">
  329. <dt class="inherited-from">Inherited From:</dt>
  330. <dd class="inherited-from"><ul class="dummy"><li>
  331. <a href="Object2D.html#matrix">Object2D#matrix</a>
  332. </li></ul></dd>
  333. <dt class="tag-source">Source:</dt>
  334. <dd class="tag-source"><ul class="dummy"><li>
  335. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line101">line 101</a>
  336. </li></ul></dd>
  337. </dl>
  338. <h4 class="name" id="matrixAutoUpdate"><span class="type-signature"></span>matrixAutoUpdate<span class="type-signature"> :boolean</span></h4>
  339. <div class="description">
  340. Indicates if the transform matrix should be automatically updated every frame.
  341. Set this false for better performance. But if you do so dont forget to set matrixNeedsUpdate every time that a transform attribute is changed.
  342. </div>
  343. <h5>Type:</h5>
  344. <ul>
  345. <li>
  346. <span class="param-type">boolean</span>
  347. </li>
  348. </ul>
  349. <dl class="details">
  350. <dt class="inherited-from">Inherited From:</dt>
  351. <dd class="inherited-from"><ul class="dummy"><li>
  352. <a href="Object2D.html#matrixAutoUpdate">Object2D#matrixAutoUpdate</a>
  353. </li></ul></dd>
  354. <dt class="tag-source">Source:</dt>
  355. <dd class="tag-source"><ul class="dummy"><li>
  356. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line137">line 137</a>
  357. </li></ul></dd>
  358. </dl>
  359. <h4 class="name" id="matrixNeedsUpdate"><span class="type-signature"></span>matrixNeedsUpdate<span class="type-signature"> :boolean</span></h4>
  360. <div class="description">
  361. Indicates if the matrix needs to be updated, should be set true after changes to the object position, scale or rotation.
  362. The matrix is updated before rendering the object, after the matrix is updated this attribute is automatically reset to false.
  363. </div>
  364. <h5>Type:</h5>
  365. <ul>
  366. <li>
  367. <span class="param-type">boolean</span>
  368. </li>
  369. </ul>
  370. <dl class="details">
  371. <dt class="inherited-from">Inherited From:</dt>
  372. <dd class="inherited-from"><ul class="dummy"><li>
  373. <a href="Object2D.html#matrixNeedsUpdate">Object2D#matrixNeedsUpdate</a>
  374. </li></ul></dd>
  375. <dt class="tag-source">Source:</dt>
  376. <dd class="tag-source"><ul class="dummy"><li>
  377. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line146">line 146</a>
  378. </li></ul></dd>
  379. </dl>
  380. <h4 class="name" id="maxWidth"><span class="type-signature"></span>maxWidth<span class="type-signature"> :number</span></h4>
  381. <div class="description">
  382. Maximum width of the text content. After text reaches the max width a line break is placed.
  383. Can be set to null to be ignored.
  384. </div>
  385. <h5>Type:</h5>
  386. <ul>
  387. <li>
  388. <span class="param-type">number</span>
  389. </li>
  390. </ul>
  391. <dl class="details">
  392. <dt class="tag-source">Source:</dt>
  393. <dd class="tag-source"><ul class="dummy"><li>
  394. <a href="objects_MultiLineText.js.html">objects/MultiLineText.js</a>, <a href="objects_MultiLineText.js.html#line23">line 23</a>
  395. </li></ul></dd>
  396. </dl>
  397. <h4 class="name" id="onAdd"><span class="type-signature"></span>onAdd<span class="type-signature"></span></h4>
  398. <div class="description">
  399. Method called when the object its added to a parent.
  400. </div>
  401. <dl class="details">
  402. <dt class="inherited-from">Inherited From:</dt>
  403. <dd class="inherited-from"><ul class="dummy"><li>
  404. <a href="Object2D.html#onAdd">Object2D#onAdd</a>
  405. </li></ul></dd>
  406. <dt class="tag-source">Source:</dt>
  407. <dd class="tag-source"><ul class="dummy"><li>
  408. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line529">line 529</a>
  409. </li></ul></dd>
  410. </dl>
  411. <h4 class="name" id="onButtonDown"><span class="type-signature"></span>onButtonDown<span class="type-signature"></span></h4>
  412. <div class="description">
  413. Callback method called when the pointer button is pressed down (single time).
  414. </div>
  415. <dl class="details">
  416. <dt class="inherited-from">Inherited From:</dt>
  417. <dd class="inherited-from"><ul class="dummy"><li>
  418. <a href="Object2D.html#onButtonDown">Object2D#onButtonDown</a>
  419. </li></ul></dd>
  420. <dt class="tag-source">Source:</dt>
  421. <dd class="tag-source"><ul class="dummy"><li>
  422. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line595">line 595</a>
  423. </li></ul></dd>
  424. </dl>
  425. <h4 class="name" id="onButtonPressed"><span class="type-signature"></span>onButtonPressed<span class="type-signature"></span></h4>
  426. <div class="description">
  427. Method called while the pointer button is pressed.
  428. </div>
  429. <dl class="details">
  430. <dt class="inherited-from">Inherited From:</dt>
  431. <dd class="inherited-from"><ul class="dummy"><li>
  432. <a href="Object2D.html#onButtonPressed">Object2D#onButtonPressed</a>
  433. </li></ul></dd>
  434. <dt class="tag-source">Source:</dt>
  435. <dd class="tag-source"><ul class="dummy"><li>
  436. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line579">line 579</a>
  437. </li></ul></dd>
  438. </dl>
  439. <h4 class="name" id="onButtonUp"><span class="type-signature"></span>onButtonUp<span class="type-signature"></span></h4>
  440. <div class="description">
  441. Method called when the pointer button is released (single time).
  442. </div>
  443. <dl class="details">
  444. <dt class="inherited-from">Inherited From:</dt>
  445. <dd class="inherited-from"><ul class="dummy"><li>
  446. <a href="Object2D.html#onButtonUp">Object2D#onButtonUp</a>
  447. </li></ul></dd>
  448. <dt class="tag-source">Source:</dt>
  449. <dd class="tag-source"><ul class="dummy"><li>
  450. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line603">line 603</a>
  451. </li></ul></dd>
  452. </dl>
  453. <h4 class="name" id="onDoubleClick"><span class="type-signature"></span>onDoubleClick<span class="type-signature"></span></h4>
  454. <div class="description">
  455. Method called while the pointer button is double clicked.
  456. </div>
  457. <dl class="details">
  458. <dt class="inherited-from">Inherited From:</dt>
  459. <dd class="inherited-from"><ul class="dummy"><li>
  460. <a href="Object2D.html#onDoubleClick">Object2D#onDoubleClick</a>
  461. </li></ul></dd>
  462. <dt class="tag-source">Source:</dt>
  463. <dd class="tag-source"><ul class="dummy"><li>
  464. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line587">line 587</a>
  465. </li></ul></dd>
  466. </dl>
  467. <h4 class="name" id="onPointerDragEnd"><span class="type-signature"></span>onPointerDragEnd<span class="type-signature"></span></h4>
  468. <div class="description">
  469. Callback method called when the pointer drag ends after the button has been released.
  470. </div>
  471. <dl class="details">
  472. <dt class="inherited-from">Inherited From:</dt>
  473. <dd class="inherited-from"><ul class="dummy"><li>
  474. <a href="Object2D.html#onPointerDragEnd">Object2D#onPointerDragEnd</a>
  475. </li></ul></dd>
  476. <dt class="tag-source">Source:</dt>
  477. <dd class="tag-source"><ul class="dummy"><li>
  478. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line522">line 522</a>
  479. </li></ul></dd>
  480. </dl>
  481. <h4 class="name" id="onPointerDragStart"><span class="type-signature"></span>onPointerDragStart<span class="type-signature"></span></h4>
  482. <div class="description">
  483. Callback method called when the pointer drag start after the button was pressed
  484. </div>
  485. <dl class="details">
  486. <dt class="inherited-from">Inherited From:</dt>
  487. <dd class="inherited-from"><ul class="dummy"><li>
  488. <a href="Object2D.html#onPointerDragStart">Object2D#onPointerDragStart</a>
  489. </li></ul></dd>
  490. <dt class="tag-source">Source:</dt>
  491. <dd class="tag-source"><ul class="dummy"><li>
  492. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line514">line 514</a>
  493. </li></ul></dd>
  494. </dl>
  495. <h4 class="name" id="onPointerEnter"><span class="type-signature"></span>onPointerEnter<span class="type-signature"></span></h4>
  496. <div class="description">
  497. Callback method called when the pointer enters the object.
  498. It is not called while the pointer is inside of the object, just on the first time that the pointer enters the object for that use onPointerOver()
  499. </div>
  500. <dl class="details">
  501. <dt class="inherited-from">Inherited From:</dt>
  502. <dd class="inherited-from"><ul class="dummy"><li>
  503. <a href="Object2D.html#onPointerEnter">Object2D#onPointerEnter</a>
  504. </li></ul></dd>
  505. <dt class="tag-source">Source:</dt>
  506. <dd class="tag-source"><ul class="dummy"><li>
  507. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line555">line 555</a>
  508. </li></ul></dd>
  509. </dl>
  510. <h4 class="name" id="onPointerLeave"><span class="type-signature"></span>onPointerLeave<span class="type-signature"></span></h4>
  511. <div class="description">
  512. Method called when the was inside of the object and leaves the object.
  513. </div>
  514. <dl class="details">
  515. <dt class="inherited-from">Inherited From:</dt>
  516. <dd class="inherited-from"><ul class="dummy"><li>
  517. <a href="Object2D.html#onPointerLeave">Object2D#onPointerLeave</a>
  518. </li></ul></dd>
  519. <dt class="tag-source">Source:</dt>
  520. <dd class="tag-source"><ul class="dummy"><li>
  521. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line563">line 563</a>
  522. </li></ul></dd>
  523. </dl>
  524. <h4 class="name" id="onPointerOver"><span class="type-signature"></span>onPointerOver<span class="type-signature"></span></h4>
  525. <div class="description">
  526. Method while the pointer is over (inside) of the object.
  527. </div>
  528. <dl class="details">
  529. <dt class="inherited-from">Inherited From:</dt>
  530. <dd class="inherited-from"><ul class="dummy"><li>
  531. <a href="Object2D.html#onPointerOver">Object2D#onPointerOver</a>
  532. </li></ul></dd>
  533. <dt class="tag-source">Source:</dt>
  534. <dd class="tag-source"><ul class="dummy"><li>
  535. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line571">line 571</a>
  536. </li></ul></dd>
  537. </dl>
  538. <h4 class="name" id="onRemove"><span class="type-signature"></span>onRemove<span class="type-signature"></span></h4>
  539. <div class="description">
  540. Method called when the object gets removed from its parent
  541. </div>
  542. <dl class="details">
  543. <dt class="inherited-from">Inherited From:</dt>
  544. <dd class="inherited-from"><ul class="dummy"><li>
  545. <a href="Object2D.html#onRemove">Object2D#onRemove</a>
  546. </li></ul></dd>
  547. <dt class="tag-source">Source:</dt>
  548. <dd class="tag-source"><ul class="dummy"><li>
  549. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line536">line 536</a>
  550. </li></ul></dd>
  551. </dl>
  552. <h4 class="name" id="onUpdate"><span class="type-signature"></span>onUpdate<span class="type-signature"></span></h4>
  553. <div class="description">
  554. Callback method called every time before the object is draw into the canvas.
  555. Should be used to run object logic, any preparation code, move the object, etc.
  556. This method is called for every object before rendering.
  557. </div>
  558. <dl class="details">
  559. <dt class="inherited-from">Inherited From:</dt>
  560. <dd class="inherited-from"><ul class="dummy"><li>
  561. <a href="Object2D.html#onUpdate">Object2D#onUpdate</a>
  562. </li></ul></dd>
  563. <dt class="tag-source">Source:</dt>
  564. <dd class="tag-source"><ul class="dummy"><li>
  565. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line545">line 545</a>
  566. </li></ul></dd>
  567. </dl>
  568. <h4 class="name" id="origin"><span class="type-signature"></span>origin<span class="type-signature"> :<a href="Vector2.html">Vector2</a></span></h4>
  569. <div class="description">
  570. Origin of the object used as point of rotation.
  571. </div>
  572. <h5>Type:</h5>
  573. <ul>
  574. <li>
  575. <span class="param-type"><a href="Vector2.html">Vector2</a></span>
  576. </li>
  577. </ul>
  578. <dl class="details">
  579. <dt class="inherited-from">Inherited From:</dt>
  580. <dd class="inherited-from"><ul class="dummy"><li>
  581. <a href="Object2D.html#origin">Object2D#origin</a>
  582. </li></ul></dd>
  583. <dt class="tag-source">Source:</dt>
  584. <dd class="tag-source"><ul class="dummy"><li>
  585. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line60">line 60</a>
  586. </li></ul></dd>
  587. </dl>
  588. <h4 class="name" id="parent"><span class="type-signature"></span>parent<span class="type-signature"> :<a href="Object2D.html">Object2D</a></span></h4>
  589. <div class="description">
  590. Parent object, the object position is affected by its parent position.
  591. </div>
  592. <h5>Type:</h5>
  593. <ul>
  594. <li>
  595. <span class="param-type"><a href="Object2D.html">Object2D</a></span>
  596. </li>
  597. </ul>
  598. <dl class="details">
  599. <dt class="inherited-from">Inherited From:</dt>
  600. <dd class="inherited-from"><ul class="dummy"><li>
  601. <a href="Object2D.html#parent">Object2D#parent</a>
  602. </li></ul></dd>
  603. <dt class="tag-source">Source:</dt>
  604. <dd class="tag-source"><ul class="dummy"><li>
  605. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line35">line 35</a>
  606. </li></ul></dd>
  607. </dl>
  608. <h4 class="name" id="pointerEvents"><span class="type-signature"></span>pointerEvents<span class="type-signature"> :boolean</span></h4>
  609. <div class="description">
  610. Indicates if this object uses pointer events.
  611. Can be set false to skip the pointer interaction events, better performance if pointer events are not required.
  612. </div>
  613. <h5>Type:</h5>
  614. <ul>
  615. <li>
  616. <span class="param-type">boolean</span>
  617. </li>
  618. </ul>
  619. <dl class="details">
  620. <dt class="inherited-from">Inherited From:</dt>
  621. <dd class="inherited-from"><ul class="dummy"><li>
  622. <a href="Object2D.html#pointerEvents">Object2D#pointerEvents</a>
  623. </li></ul></dd>
  624. <dt class="tag-source">Source:</dt>
  625. <dd class="tag-source"><ul class="dummy"><li>
  626. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line164">line 164</a>
  627. </li></ul></dd>
  628. </dl>
  629. <h4 class="name" id="pointerInside"><span class="type-signature"></span>pointerInside<span class="type-signature"> :boolean</span></h4>
  630. <div class="description">
  631. Flag indicating if the pointer is inside of the element.
  632. Used to control object event.
  633. </div>
  634. <h5>Type:</h5>
  635. <ul>
  636. <li>
  637. <span class="param-type">boolean</span>
  638. </li>
  639. </ul>
  640. <dl class="details">
  641. <dt class="inherited-from">Inherited From:</dt>
  642. <dd class="inherited-from"><ul class="dummy"><li>
  643. <a href="Object2D.html#pointerInside">Object2D#pointerInside</a>
  644. </li></ul></dd>
  645. <dt class="tag-source">Source:</dt>
  646. <dd class="tag-source"><ul class="dummy"><li>
  647. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line194">line 194</a>
  648. </li></ul></dd>
  649. </dl>
  650. <h4 class="name" id="position"><span class="type-signature"></span>position<span class="type-signature"> :<a href="Vector2.html">Vector2</a></span></h4>
  651. <div class="description">
  652. Position of the object.
  653. The world position of the object is affected by its parent transform.
  654. </div>
  655. <h5>Type:</h5>
  656. <ul>
  657. <li>
  658. <span class="param-type"><a href="Vector2.html">Vector2</a></span>
  659. </li>
  660. </ul>
  661. <dl class="details">
  662. <dt class="inherited-from">Inherited From:</dt>
  663. <dd class="inherited-from"><ul class="dummy"><li>
  664. <a href="Object2D.html#position">Object2D#position</a>
  665. </li></ul></dd>
  666. <dt class="tag-source">Source:</dt>
  667. <dd class="tag-source"><ul class="dummy"><li>
  668. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line53">line 53</a>
  669. </li></ul></dd>
  670. </dl>
  671. <h4 class="name" id="restoreContextState"><span class="type-signature"></span>restoreContextState<span class="type-signature"> :boolean</span></h4>
  672. <div class="description">
  673. Flag to indicate if the context of canvas should be restored after render.
  674. </div>
  675. <h5>Type:</h5>
  676. <ul>
  677. <li>
  678. <span class="param-type">boolean</span>
  679. </li>
  680. </ul>
  681. <dl class="details">
  682. <dt class="inherited-from">Inherited From:</dt>
  683. <dd class="inherited-from"><ul class="dummy"><li>
  684. <a href="Object2D.html#restoreContextState">Object2D#restoreContextState</a>
  685. </li></ul></dd>
  686. <dt class="tag-source">Source:</dt>
  687. <dd class="tag-source"><ul class="dummy"><li>
  688. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line185">line 185</a>
  689. </li></ul></dd>
  690. </dl>
  691. <h4 class="name" id="rotation"><span class="type-signature"></span>rotation<span class="type-signature"> :number</span></h4>
  692. <div class="description">
  693. Rotation of the object relative to its center.
  694. The world rotation of the object is affected by the parent transform.
  695. </div>
  696. <h5>Type:</h5>
  697. <ul>
  698. <li>
  699. <span class="param-type">number</span>
  700. </li>
  701. </ul>
  702. <dl class="details">
  703. <dt class="inherited-from">Inherited From:</dt>
  704. <dd class="inherited-from"><ul class="dummy"><li>
  705. <a href="Object2D.html#rotation">Object2D#rotation</a>
  706. </li></ul></dd>
  707. <dt class="tag-source">Source:</dt>
  708. <dd class="tag-source"><ul class="dummy"><li>
  709. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line78">line 78</a>
  710. </li></ul></dd>
  711. </dl>
  712. <h4 class="name" id="saveContextState"><span class="type-signature"></span>saveContextState<span class="type-signature"> :boolean</span></h4>
  713. <div class="description">
  714. Flag to indicate if the context of canvas should be saved before render.
  715. </div>
  716. <h5>Type:</h5>
  717. <ul>
  718. <li>
  719. <span class="param-type">boolean</span>
  720. </li>
  721. </ul>
  722. <dl class="details">
  723. <dt class="inherited-from">Inherited From:</dt>
  724. <dd class="inherited-from"><ul class="dummy"><li>
  725. <a href="Object2D.html#saveContextState">Object2D#saveContextState</a>
  726. </li></ul></dd>
  727. <dt class="tag-source">Source:</dt>
  728. <dd class="tag-source"><ul class="dummy"><li>
  729. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line178">line 178</a>
  730. </li></ul></dd>
  731. </dl>
  732. <h4 class="name" id="scale"><span class="type-signature"></span>scale<span class="type-signature"> :<a href="Vector2.html">Vector2</a></span></h4>
  733. <div class="description">
  734. Scale of the object.
  735. The world scale of the object is affected by the parent transform.
  736. </div>
  737. <h5>Type:</h5>
  738. <ul>
  739. <li>
  740. <span class="param-type"><a href="Vector2.html">Vector2</a></span>
  741. </li>
  742. </ul>
  743. <dl class="details">
  744. <dt class="inherited-from">Inherited From:</dt>
  745. <dd class="inherited-from"><ul class="dummy"><li>
  746. <a href="Object2D.html#scale">Object2D#scale</a>
  747. </li></ul></dd>
  748. <dt class="tag-source">Source:</dt>
  749. <dd class="tag-source"><ul class="dummy"><li>
  750. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line69">line 69</a>
  751. </li></ul></dd>
  752. </dl>
  753. <h4 class="name" id="serializable"><span class="type-signature"></span>serializable<span class="type-signature"> :boolean</span></h4>
  754. <div class="description">
  755. Indicates if the object should be serialized or not as a child of another object.
  756. Used to prevent duplicate serialization data on custom objects. Should be set false for objects added on constructor.
  757. </div>
  758. <h5>Type:</h5>
  759. <ul>
  760. <li>
  761. <span class="param-type">boolean</span>
  762. </li>
  763. </ul>
  764. <dl class="details">
  765. <dt class="inherited-from">Inherited From:</dt>
  766. <dd class="inherited-from"><ul class="dummy"><li>
  767. <a href="Object2D.html#serializable">Object2D#serializable</a>
  768. </li></ul></dd>
  769. <dt class="tag-source">Source:</dt>
  770. <dd class="tag-source"><ul class="dummy"><li>
  771. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line210">line 210</a>
  772. </li></ul></dd>
  773. </dl>
  774. <h4 class="name" id="strokeStyle"><span class="type-signature"></span>strokeStyle<span class="type-signature"> :<a href="Style.html">Style</a></span></h4>
  775. <div class="description">
  776. Style of the object border line. If set null it is ignored.
  777. </div>
  778. <h5>Type:</h5>
  779. <ul>
  780. <li>
  781. <span class="param-type"><a href="Style.html">Style</a></span>
  782. </li>
  783. </ul>
  784. <dl class="details">
  785. <dt class="inherited-from">Inherited From:</dt>
  786. <dd class="inherited-from"><ul class="dummy"><li>
  787. <a href="Text.html#strokeStyle">Text#strokeStyle</a>
  788. </li></ul></dd>
  789. <dt class="tag-source">Source:</dt>
  790. <dd class="tag-source"><ul class="dummy"><li>
  791. <a href="objects_Text.js.html">objects/Text.js</a>, <a href="objects_Text.js.html#line35">line 35</a>
  792. </li></ul></dd>
  793. </dl>
  794. <h4 class="name" id="style"><span class="type-signature"></span>style<span class="type-signature"></span></h4>
  795. <div class="description">
  796. Style is called right before draw() it should not draw any content into the canvas, all context styling should be applied here (colors, fonts, etc).
  797. The draw() and style() methods can be useful for objects that share the same styling attributes but are drawing differently.
  798. Should be implemented by underlying classes.
  799. </div>
  800. <dl class="details">
  801. <dt class="inherited-from">Inherited From:</dt>
  802. <dd class="inherited-from"><ul class="dummy"><li>
  803. <a href="Object2D.html#style">Object2D#style</a>
  804. </li></ul></dd>
  805. <dt class="tag-source">Source:</dt>
  806. <dd class="tag-source"><ul class="dummy"><li>
  807. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line476">line 476</a>
  808. </li></ul></dd>
  809. </dl>
  810. <h4 class="name" id="text"><span class="type-signature"></span>text<span class="type-signature"> :string</span></h4>
  811. <div class="description">
  812. Text value displayed by this element.
  813. </div>
  814. <h5>Type:</h5>
  815. <ul>
  816. <li>
  817. <span class="param-type">string</span>
  818. </li>
  819. </ul>
  820. <dl class="details">
  821. <dt class="inherited-from">Inherited From:</dt>
  822. <dd class="inherited-from"><ul class="dummy"><li>
  823. <a href="Text.html#text">Text#text</a>
  824. </li></ul></dd>
  825. <dt class="tag-source">Source:</dt>
  826. <dd class="tag-source"><ul class="dummy"><li>
  827. <a href="objects_Text.js.html">objects/Text.js</a>, <a href="objects_Text.js.html#line21">line 21</a>
  828. </li></ul></dd>
  829. </dl>
  830. <h4 class="name" id="textAlign"><span class="type-signature"></span>textAlign<span class="type-signature"> :string</span></h4>
  831. <div class="description">
  832. Text align property. Same values as used for canvas text applies
  833. Check documentation at https://developer.mozilla.org/en-US/docs/Web/CSS/text-align for mode details about this property.
  834. </div>
  835. <h5>Type:</h5>
  836. <ul>
  837. <li>
  838. <span class="param-type">string</span>
  839. </li>
  840. </ul>
  841. <dl class="details">
  842. <dt class="inherited-from">Inherited From:</dt>
  843. <dd class="inherited-from"><ul class="dummy"><li>
  844. <a href="Text.html#textAlign">Text#textAlign</a>
  845. </li></ul></dd>
  846. <dt class="tag-source">Source:</dt>
  847. <dd class="tag-source"><ul class="dummy"><li>
  848. <a href="objects_Text.js.html">objects/Text.js</a>, <a href="objects_Text.js.html#line58">line 58</a>
  849. </li></ul></dd>
  850. </dl>
  851. <h4 class="name" id="textBaseline"><span class="type-signature"></span>textBaseline<span class="type-signature"> :string</span></h4>
  852. <div class="description">
  853. Text baseline defines the vertical position of the text relative to the imaginary line Y position. Same values as used for canvas text applies
  854. Check documentation at https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/textBaseline for mode details about this property.
  855. </div>
  856. <h5>Type:</h5>
  857. <ul>
  858. <li>
  859. <span class="param-type">string</span>
  860. </li>
  861. </ul>
  862. <dl class="details">
  863. <dt class="inherited-from">Inherited From:</dt>
  864. <dd class="inherited-from"><ul class="dummy"><li>
  865. <a href="Text.html#textBaseline">Text#textBaseline</a>
  866. </li></ul></dd>
  867. <dt class="tag-source">Source:</dt>
  868. <dd class="tag-source"><ul class="dummy"><li>
  869. <a href="objects_Text.js.html">objects/Text.js</a>, <a href="objects_Text.js.html#line67">line 67</a>
  870. </li></ul></dd>
  871. </dl>
  872. <h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"> :string</span></h4>
  873. <div class="description">
  874. Type of the object, used for data serialization and/or checking the object type.
  875. The name used should match the object constructor name. But it is not required.
  876. If this type is from an external library you can add the library name to the object type name to prevent collisions.
  877. </div>
  878. <h5>Type:</h5>
  879. <ul>
  880. <li>
  881. <span class="param-type">string</span>
  882. </li>
  883. </ul>
  884. <dl class="details">
  885. <dt class="tag-overrides">Overrides:</dt>
  886. <dd class="tag-overrides"><ul class="dummy"><li>
  887. <a href="Text.html#type">Text#type</a>
  888. </li></ul></dd>
  889. <dt class="tag-source">Source:</dt>
  890. <dd class="tag-source"><ul class="dummy"><li>
  891. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line224">line 224</a>
  892. </li></ul></dd>
  893. </dl>
  894. <h4 class="name" id="uuid"><span class="type-signature"></span>uuid<span class="type-signature"> :string</span></h4>
  895. <div class="description">
  896. UUID of the object.
  897. </div>
  898. <h5>Type:</h5>
  899. <ul>
  900. <li>
  901. <span class="param-type">string</span>
  902. </li>
  903. </ul>
  904. <dl class="details">
  905. <dt class="inherited-from">Inherited From:</dt>
  906. <dd class="inherited-from"><ul class="dummy"><li>
  907. <a href="Object2D.html#uuid">Object2D#uuid</a>
  908. </li></ul></dd>
  909. <dt class="tag-source">Source:</dt>
  910. <dd class="tag-source"><ul class="dummy"><li>
  911. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line21">line 21</a>
  912. </li></ul></dd>
  913. </dl>
  914. <h4 class="name" id="visible"><span class="type-signature"></span>visible<span class="type-signature"> :boolean</span></h4>
  915. <div class="description">
  916. Indicates if the object is visible.
  917. </div>
  918. <h5>Type:</h5>
  919. <ul>
  920. <li>
  921. <span class="param-type">boolean</span>
  922. </li>
  923. </ul>
  924. <dl class="details">
  925. <dt class="inherited-from">Inherited From:</dt>
  926. <dd class="inherited-from"><ul class="dummy"><li>
  927. <a href="Object2D.html#visible">Object2D#visible</a>
  928. </li></ul></dd>
  929. <dt class="tag-source">Source:</dt>
  930. <dd class="tag-source"><ul class="dummy"><li>
  931. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line85">line 85</a>
  932. </li></ul></dd>
  933. </dl>
  934. <h3 class="subsection-title">Methods</h3>
  935. <h4 class="name" id="add"><span class="type-signature"></span>add<span class="signature">(object)</span><span class="type-signature"></span></h4>
  936. <div class="description">
  937. Attach a children to this object.
  938. The object is set as children of this object and the transformations applied to this object are traversed to its children.
  939. </div>
  940. <h5>Parameters:</h5>
  941. <table class="params">
  942. <thead>
  943. <tr>
  944. <th>Name</th>
  945. <th>Type</th>
  946. <th class="last">Description</th>
  947. </tr>
  948. </thead>
  949. <tbody>
  950. <tr>
  951. <td class="name"><code>object</code></td>
  952. <td class="type">
  953. <span class="param-type"><a href="Object2D.html">Object2D</a></span>
  954. </td>
  955. <td class="description last">Object to attach to this object.</td>
  956. </tr>
  957. </tbody>
  958. </table>
  959. <dl class="details">
  960. <dt class="inherited-from">Inherited From:</dt>
  961. <dd class="inherited-from"><ul class="dummy"><li>
  962. <a href="Object2D.html#add">Object2D#add</a>
  963. </li></ul></dd>
  964. <dt class="tag-source">Source:</dt>
  965. <dd class="tag-source"><ul class="dummy"><li>
  966. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line368">line 368</a>
  967. </li></ul></dd>
  968. </dl>
  969. <h4 class="name" id="destroy"><span class="type-signature"></span>destroy<span class="signature">()</span><span class="type-signature"></span></h4>
  970. <div class="description">
  971. Destroy the object, removes it from the parent object.
  972. </div>
  973. <dl class="details">
  974. <dt class="inherited-from">Inherited From:</dt>
  975. <dd class="inherited-from"><ul class="dummy"><li>
  976. <a href="Object2D.html#destroy">Object2D#destroy</a>
  977. </li></ul></dd>
  978. <dt class="tag-source">Source:</dt>
  979. <dd class="tag-source"><ul class="dummy"><li>
  980. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line317">line 317</a>
  981. </li></ul></dd>
  982. </dl>
  983. <h4 class="name" id="getChildByUUID"><span class="type-signature"></span>getChildByUUID<span class="signature">(uuid)</span><span class="type-signature"> &rarr; {<a href="Object2D.html">Object2D</a>}</span></h4>
  984. <div class="description">
  985. Get a object from its children list by its UUID.
  986. </div>
  987. <h5>Parameters:</h5>
  988. <table class="params">
  989. <thead>
  990. <tr>
  991. <th>Name</th>
  992. <th>Type</th>
  993. <th class="last">Description</th>
  994. </tr>
  995. </thead>
  996. <tbody>
  997. <tr>
  998. <td class="name"><code>uuid</code></td>
  999. <td class="type">
  1000. <span class="param-type">string</span>
  1001. </td>
  1002. <td class="description last">UUID of the object to get.</td>
  1003. </tr>
  1004. </tbody>
  1005. </table>
  1006. <dl class="details">
  1007. <dt class="inherited-from">Inherited From:</dt>
  1008. <dd class="inherited-from"><ul class="dummy"><li>
  1009. <a href="Object2D.html#getChildByUUID">Object2D#getChildByUUID</a>
  1010. </li></ul></dd>
  1011. <dt class="tag-source">Source:</dt>
  1012. <dd class="tag-source"><ul class="dummy"><li>
  1013. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line346">line 346</a>
  1014. </li></ul></dd>
  1015. </dl>
  1016. <h5>Returns:</h5>
  1017. <div class="param-desc">
  1018. The object that has the UUID specified, null if the object was not found.
  1019. </div>
  1020. <dl>
  1021. <dt>
  1022. Type
  1023. </dt>
  1024. <dd>
  1025. <span class="param-type"><a href="Object2D.html">Object2D</a></span>
  1026. </dd>
  1027. </dl>
  1028. <h4 class="name" id="getWorldPointIntersections"><span class="type-signature"></span>getWorldPointIntersections<span class="signature">(point, list)</span><span class="type-signature"> &rarr; {Array.&lt;<a href="Object2D.html">Object2D</a>>}</span></h4>
  1029. <div class="description">
  1030. Check if a point in world coordinates intersects this object or its children and get a list of the objects intersected.
  1031. </div>
  1032. <h5>Parameters:</h5>
  1033. <table class="params">
  1034. <thead>
  1035. <tr>
  1036. <th>Name</th>
  1037. <th>Type</th>
  1038. <th class="last">Description</th>
  1039. </tr>
  1040. </thead>
  1041. <tbody>
  1042. <tr>
  1043. <td class="name"><code>point</code></td>
  1044. <td class="type">
  1045. <span class="param-type"><a href="Vector2.html">Vector2</a></span>
  1046. </td>
  1047. <td class="description last">Point in world coordinates.</td>
  1048. </tr>
  1049. <tr>
  1050. <td class="name"><code>list</code></td>
  1051. <td class="type">
  1052. <span class="param-type">Array.&lt;<a href="Object2D.html">Object2D</a>></span>
  1053. </td>
  1054. <td class="description last">List of objects intersected passed to children objects recursively.</td>
  1055. </tr>
  1056. </tbody>
  1057. </table>
  1058. <dl class="details">
  1059. <dt class="inherited-from">Inherited From:</dt>
  1060. <dd class="inherited-from"><ul class="dummy"><li>
  1061. <a href="Object2D.html#getWorldPointIntersections">Object2D#getWorldPointIntersections</a>
  1062. </li></ul></dd>
  1063. <dt class="tag-source">Source:</dt>
  1064. <dd class="tag-source"><ul class="dummy"><li>
  1065. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line259">line 259</a>
  1066. </li></ul></dd>
  1067. </dl>
  1068. <h5>Returns:</h5>
  1069. <div class="param-desc">
  1070. List of object intersected by this point.
  1071. </div>
  1072. <dl>
  1073. <dt>
  1074. Type
  1075. </dt>
  1076. <dd>
  1077. <span class="param-type">Array.&lt;<a href="Object2D.html">Object2D</a>></span>
  1078. </dd>
  1079. </dl>
  1080. <h4 class="name" id="isInside"><span class="type-signature"></span>isInside<span class="signature">(point)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
  1081. <div class="description">
  1082. Check if a point is inside of the object. Used by the renderer check for pointer collision (required for the object to properly process pointer events).
  1083. Point should be in local object coordinates.
  1084. To check if a point in world coordinates intersects the object the inverseGlobalMatrix should be applied to that point before calling this method.
  1085. </div>
  1086. <h5>Parameters:</h5>
  1087. <table class="params">
  1088. <thead>
  1089. <tr>
  1090. <th>Name</th>
  1091. <th>Type</th>
  1092. <th class="last">Description</th>
  1093. </tr>
  1094. </thead>
  1095. <tbody>
  1096. <tr>
  1097. <td class="name"><code>point</code></td>
  1098. <td class="type">
  1099. <span class="param-type"><a href="Vector2.html">Vector2</a></span>
  1100. </td>
  1101. <td class="description last">Point in local object coordinates.</td>
  1102. </tr>
  1103. </tbody>
  1104. </table>
  1105. <dl class="details">
  1106. <dt class="inherited-from">Inherited From:</dt>
  1107. <dd class="inherited-from"><ul class="dummy"><li>
  1108. <a href="Object2D.html#isInside">Object2D#isInside</a>
  1109. </li></ul></dd>
  1110. <dt class="tag-source">Source:</dt>
  1111. <dd class="tag-source"><ul class="dummy"><li>
  1112. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line423">line 423</a>
  1113. </li></ul></dd>
  1114. </dl>
  1115. <h5>Returns:</h5>
  1116. <div class="param-desc">
  1117. True if the point is inside of the object.
  1118. </div>
  1119. <dl>
  1120. <dt>
  1121. Type
  1122. </dt>
  1123. <dd>
  1124. <span class="param-type">boolean</span>
  1125. </dd>
  1126. </dl>
  1127. <h4 class="name" id="isWorldPointInside"><span class="type-signature"></span>isWorldPointInside<span class="signature">(point, recursive)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
  1128. <div class="description">
  1129. Check if a point in world coordinates intersects this object or some of its children.
  1130. </div>
  1131. <h5>Parameters:</h5>
  1132. <table class="params">
  1133. <thead>
  1134. <tr>
  1135. <th>Name</th>
  1136. <th>Type</th>
  1137. <th class="last">Description</th>
  1138. </tr>
  1139. </thead>
  1140. <tbody>
  1141. <tr>
  1142. <td class="name"><code>point</code></td>
  1143. <td class="type">
  1144. <span class="param-type"><a href="Vector2.html">Vector2</a></span>
  1145. </td>
  1146. <td class="description last">Point in world coordinates.</td>
  1147. </tr>
  1148. <tr>
  1149. <td class="name"><code>recursive</code></td>
  1150. <td class="type">
  1151. <span class="param-type">boolean</span>
  1152. </td>
  1153. <td class="description last">If set to true it will also check intersections with the object children.</td>
  1154. </tr>
  1155. </tbody>
  1156. </table>
  1157. <dl class="details">
  1158. <dt class="inherited-from">Inherited From:</dt>
  1159. <dd class="inherited-from"><ul class="dummy"><li>
  1160. <a href="Object2D.html#isWorldPointInside">Object2D#isWorldPointInside</a>
  1161. </li></ul></dd>
  1162. <dt class="tag-source">Source:</dt>
  1163. <dd class="tag-source"><ul class="dummy"><li>
  1164. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line289">line 289</a>
  1165. </li></ul></dd>
  1166. </dl>
  1167. <h5>Returns:</h5>
  1168. <div class="param-desc">
  1169. Returns true if the point in inside of the object.
  1170. </div>
  1171. <dl>
  1172. <dt>
  1173. Type
  1174. </dt>
  1175. <dd>
  1176. <span class="param-type">boolean</span>
  1177. </dd>
  1178. </dl>
  1179. <h4 class="name" id="onPointerDrag"><span class="type-signature"></span>onPointerDrag<span class="signature">(pointer, viewport, delta, positionWorld)</span><span class="type-signature"></span></h4>
  1180. <div class="description">
  1181. Callback method while the object is being dragged across the screen.
  1182. By default is adds the delta value to the object position (making it follow the mouse movement).
  1183. Delta is the movement of the pointer already translated into local object coordinates.
  1184. To detect when the object drag stops the onPointerDragEnd() method can be used.
  1185. </div>
  1186. <h5>Parameters:</h5>
  1187. <table class="params">
  1188. <thead>
  1189. <tr>
  1190. <th>Name</th>
  1191. <th>Type</th>
  1192. <th class="last">Description</th>
  1193. </tr>
  1194. </thead>
  1195. <tbody>
  1196. <tr>
  1197. <td class="name"><code>pointer</code></td>
  1198. <td class="type">
  1199. <span class="param-type"><a href="Pointer.html">Pointer</a></span>
  1200. </td>
  1201. <td class="description last">Pointer object that receives the user input.</td>
  1202. </tr>
  1203. <tr>
  1204. <td class="name"><code>viewport</code></td>
  1205. <td class="type">
  1206. <span class="param-type"><a href="Viewport.html">Viewport</a></span>
  1207. </td>
  1208. <td class="description last">Viewport where the object is drawn.</td>
  1209. </tr>
  1210. <tr>
  1211. <td class="name"><code>delta</code></td>
  1212. <td class="type">
  1213. <span class="param-type"><a href="Vector2.html">Vector2</a></span>
  1214. </td>
  1215. <td class="description last">Pointer movement diff in world space since the last frame.</td>
  1216. </tr>
  1217. <tr>
  1218. <td class="name"><code>positionWorld</code></td>
  1219. <td class="type">
  1220. <span class="param-type"><a href="Vector2.html">Vector2</a></span>
  1221. </td>
  1222. <td class="description last">Position of the dragging pointer in world coordinates.</td>
  1223. </tr>
  1224. </tbody>
  1225. </table>
  1226. <dl class="details">
  1227. <dt class="inherited-from">Inherited From:</dt>
  1228. <dd class="inherited-from"><ul class="dummy"><li>
  1229. <a href="Object2D.html#onPointerDrag">Object2D#onPointerDrag</a>
  1230. </li></ul></dd>
  1231. <dt class="tag-source">Source:</dt>
  1232. <dd class="tag-source"><ul class="dummy"><li>
  1233. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line503">line 503</a>
  1234. </li></ul></dd>
  1235. </dl>
  1236. <h4 class="name" id="parse"><span class="type-signature"></span>parse<span class="signature">(data, root)</span><span class="type-signature"></span></h4>
  1237. <div class="description">
  1238. Parse serialized object data and fill the object attributes.
  1239. Implementations of this method should only load the attributes added to the structure, the based method already loads common attributes.
  1240. Dont forget to register object types using the Object2D.register() method.
  1241. </div>
  1242. <h5>Parameters:</h5>
  1243. <table class="params">
  1244. <thead>
  1245. <tr>
  1246. <th>Name</th>
  1247. <th>Type</th>
  1248. <th class="last">Description</th>
  1249. </tr>
  1250. </thead>
  1251. <tbody>
  1252. <tr>
  1253. <td class="name"><code>data</code></td>
  1254. <td class="type">
  1255. <span class="param-type">Object</span>
  1256. </td>
  1257. <td class="description last">Object data loaded from JSON.</td>
  1258. </tr>
  1259. <tr>
  1260. <td class="name"><code>root</code></td>
  1261. <td class="type">
  1262. <span class="param-type"><a href="Object2D.html">Object2D</a></span>
  1263. </td>
  1264. <td class="description last">Root object being loaded can be used to get references to other objects.</td>
  1265. </tr>
  1266. </tbody>
  1267. </table>
  1268. <dl class="details">
  1269. <dt class="tag-overrides">Overrides:</dt>
  1270. <dd class="tag-overrides"><ul class="dummy"><li>
  1271. <a href="Text.html#parse">Text#parse</a>
  1272. </li></ul></dd>
  1273. <dt class="tag-source">Source:</dt>
  1274. <dd class="tag-source"><ul class="dummy"><li>
  1275. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line668">line 668</a>
  1276. </li></ul></dd>
  1277. </dl>
  1278. <h4 class="name" id="remove"><span class="type-signature"></span>remove<span class="signature">(children)</span><span class="type-signature"></span></h4>
  1279. <div class="description">
  1280. Remove object from the children list.
  1281. Resets the parent of the object to null and resets its level.
  1282. </div>
  1283. <h5>Parameters:</h5>
  1284. <table class="params">
  1285. <thead>
  1286. <tr>
  1287. <th>Name</th>
  1288. <th>Type</th>
  1289. <th class="last">Description</th>
  1290. </tr>
  1291. </thead>
  1292. <tbody>
  1293. <tr>
  1294. <td class="name"><code>children</code></td>
  1295. <td class="type">
  1296. <span class="param-type"><a href="Object2D.html">Object2D</a></span>
  1297. </td>
  1298. <td class="description last">Object to be removed.</td>
  1299. </tr>
  1300. </tbody>
  1301. </table>
  1302. <dl class="details">
  1303. <dt class="inherited-from">Inherited From:</dt>
  1304. <dd class="inherited-from"><ul class="dummy"><li>
  1305. <a href="Object2D.html#remove">Object2D#remove</a>
  1306. </li></ul></dd>
  1307. <dt class="tag-source">Source:</dt>
  1308. <dd class="tag-source"><ul class="dummy"><li>
  1309. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line391">line 391</a>
  1310. </li></ul></dd>
  1311. </dl>
  1312. <h4 class="name" id="serialize"><span class="type-signature"></span>serialize<span class="signature">(recursive)</span><span class="type-signature"> &rarr; {Object}</span></h4>
  1313. <div class="description">
  1314. Serialize the object data into a JSON object. That can be written into a file, sent using HTTP request etc.
  1315. All required attributes to recreate the object in its current state should be stored. Relations between children should be stored by their UUID only.
  1316. Data has to be parsed back into a usable object.
  1317. </div>
  1318. <h5>Parameters:</h5>
  1319. <table class="params">
  1320. <thead>
  1321. <tr>
  1322. <th>Name</th>
  1323. <th>Type</th>
  1324. <th class="last">Description</th>
  1325. </tr>
  1326. </thead>
  1327. <tbody>
  1328. <tr>
  1329. <td class="name"><code>recursive</code></td>
  1330. <td class="type">
  1331. <span class="param-type">boolean</span>
  1332. </td>
  1333. <td class="description last">If set false the children list is not serialized, otherwise all children are serialized.</td>
  1334. </tr>
  1335. </tbody>
  1336. </table>
  1337. <dl class="details">
  1338. <dt class="tag-overrides">Overrides:</dt>
  1339. <dd class="tag-overrides"><ul class="dummy"><li>
  1340. <a href="Text.html#serialize">Text#serialize</a>
  1341. </li></ul></dd>
  1342. <dt class="tag-source">Source:</dt>
  1343. <dd class="tag-source"><ul class="dummy"><li>
  1344. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line615">line 615</a>
  1345. </li></ul></dd>
  1346. </dl>
  1347. <h5>Returns:</h5>
  1348. <div class="param-desc">
  1349. Serialized object data.
  1350. </div>
  1351. <dl>
  1352. <dt>
  1353. Type
  1354. </dt>
  1355. <dd>
  1356. <span class="param-type">Object</span>
  1357. </dd>
  1358. </dl>
  1359. <h4 class="name" id="transform"><span class="type-signature"></span>transform<span class="signature">(context, viewport, canvas, renderer)</span><span class="type-signature"></span></h4>
  1360. <div class="description">
  1361. Apply the transform to the rendering context, it is assumed that the viewport transform is pre-applied to the context.
  1362. This is called before style() and draw(). It can also be used for some pre-rendering logic.
  1363. </div>
  1364. <h5>Parameters:</h5>
  1365. <table class="params">
  1366. <thead>
  1367. <tr>
  1368. <th>Name</th>
  1369. <th>Type</th>
  1370. <th class="last">Description</th>
  1371. </tr>
  1372. </thead>
  1373. <tbody>
  1374. <tr>
  1375. <td class="name"><code>context</code></td>
  1376. <td class="type">
  1377. <span class="param-type">CanvasRenderingContext2D</span>
  1378. </td>
  1379. <td class="description last">Canvas 2d drawing context.</td>
  1380. </tr>
  1381. <tr>
  1382. <td class="name"><code>viewport</code></td>
  1383. <td class="type">
  1384. <span class="param-type"><a href="Viewport.html">Viewport</a></span>
  1385. </td>
  1386. <td class="description last">Viewport applied to the canvas.</td>
  1387. </tr>
  1388. <tr>
  1389. <td class="name"><code>canvas</code></td>
  1390. <td class="type">
  1391. <span class="param-type">Element</span>
  1392. </td>
  1393. <td class="description last">DOM canvas element where the content is being drawn.</td>
  1394. </tr>
  1395. <tr>
  1396. <td class="name"><code>renderer</code></td>
  1397. <td class="type">
  1398. <span class="param-type"><a href="Renderer.html">Renderer</a></span>
  1399. </td>
  1400. <td class="description last">Renderer object being used to draw the object into the canvas.</td>
  1401. </tr>
  1402. </tbody>
  1403. </table>
  1404. <dl class="details">
  1405. <dt class="inherited-from">Inherited From:</dt>
  1406. <dd class="inherited-from"><ul class="dummy"><li>
  1407. <a href="Object2D.html#transform">Object2D#transform</a>
  1408. </li></ul></dd>
  1409. <dt class="tag-source">Source:</dt>
  1410. <dd class="tag-source"><ul class="dummy"><li>
  1411. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line460">line 460</a>
  1412. </li></ul></dd>
  1413. </dl>
  1414. <h4 class="name" id="traverse"><span class="type-signature"></span>traverse<span class="signature">(callback)</span><span class="type-signature"></span></h4>
  1415. <div class="description">
  1416. Traverse the object tree and run a function for all objects.
  1417. </div>
  1418. <h5>Parameters:</h5>
  1419. <table class="params">
  1420. <thead>
  1421. <tr>
  1422. <th>Name</th>
  1423. <th>Type</th>
  1424. <th class="last">Description</th>
  1425. </tr>
  1426. </thead>
  1427. <tbody>
  1428. <tr>
  1429. <td class="name"><code>callback</code></td>
  1430. <td class="type">
  1431. <span class="param-type">function</span>
  1432. </td>
  1433. <td class="description last">Callback function that receives the object as parameter.</td>
  1434. </tr>
  1435. </tbody>
  1436. </table>
  1437. <dl class="details">
  1438. <dt class="inherited-from">Inherited From:</dt>
  1439. <dd class="inherited-from"><ul class="dummy"><li>
  1440. <a href="Object2D.html#traverse">Object2D#traverse</a>
  1441. </li></ul></dd>
  1442. <dt class="tag-source">Source:</dt>
  1443. <dd class="tag-source"><ul class="dummy"><li>
  1444. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line330">line 330</a>
  1445. </li></ul></dd>
  1446. </dl>
  1447. <h4 class="name" id="updateMatrix"><span class="type-signature"></span>updateMatrix<span class="signature">(context)</span><span class="type-signature"></span></h4>
  1448. <div class="description">
  1449. Update the transformation matrix of the object.
  1450. </div>
  1451. <h5>Parameters:</h5>
  1452. <table class="params">
  1453. <thead>
  1454. <tr>
  1455. <th>Name</th>
  1456. <th>Type</th>
  1457. <th class="last">Description</th>
  1458. </tr>
  1459. </thead>
  1460. <tbody>
  1461. <tr>
  1462. <td class="name"><code>context</code></td>
  1463. <td class="type">
  1464. <span class="param-type">CanvasRenderingContext2D</span>
  1465. </td>
  1466. <td class="description last">Canvas 2d drawing context.</td>
  1467. </tr>
  1468. </tbody>
  1469. </table>
  1470. <dl class="details">
  1471. <dt class="inherited-from">Inherited From:</dt>
  1472. <dd class="inherited-from"><ul class="dummy"><li>
  1473. <a href="Object2D.html#updateMatrix">Object2D#updateMatrix</a>
  1474. </li></ul></dd>
  1475. <dt class="tag-source">Source:</dt>
  1476. <dd class="tag-source"><ul class="dummy"><li>
  1477. <a href="Object2D.js.html">Object2D.js</a>, <a href="Object2D.js.html#line433">line 433</a>
  1478. </li></ul></dd>
  1479. </dl>
  1480. </article>
  1481. </section>
  1482. </div>
  1483. <nav>
  1484. <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="AnimationTimer.html">AnimationTimer</a></li><li><a href="BarGraph.html">BarGraph</a></li><li><a href="BezierCurve.html">BezierCurve</a></li><li><a href="Box.html">Box</a></li><li><a href="Box2.html">Box2</a></li><li><a href="BoxMask.html">BoxMask</a></li><li><a href="Circle.html">Circle</a></li><li><a href="ColorStyle.html">ColorStyle</a></li><li><a href="DOM.html">DOM</a></li><li><a href="EventManager.html">EventManager</a></li><li><a href="FileUtils.html">FileUtils</a></li><li><a href="Gauge.html">Gauge</a></li><li><a href="GradientColorStop.html">GradientColorStop</a></li><li><a href="GradientStyle.html">GradientStyle</a></li><li><a href="Graph.html">Graph</a></li><li><a href="Helpers.html">Helpers</a></li><li><a href="Image.html">Image</a></li><li><a href="Key.html">Key</a></li><li><a href="Line.html">Line</a></li><li><a href="LinearGradientStyle.html">LinearGradientStyle</a></li><li><a href="Mask.html">Mask</a></li><li><a href="Matrix.html">Matrix</a></li><li><a href="MultiLineText.html">MultiLineText</a></li><li><a href="Node.html">Node</a></li><li><a href="NodeConnector.html">NodeConnector</a></li><li><a href="NodeGraph.html">NodeGraph</a></li><li><a href="NodeSocket.html">NodeSocket</a></li><li><a href="Object2D.html">Object2D</a></li><li><a href="Path.html">Path</a></li><li><a href="Pattern.html">Pattern</a></li><li><a href="PatternStyle.html">PatternStyle</a></li><li><a href="PieChart.html">PieChart</a></li><li><a href="Pointer.html">Pointer</a></li><li><a href="QuadraticCurve.html">QuadraticCurve</a></li><li><a href="RadialGradientStyle.html">RadialGradientStyle</a></li><li><a href="Renderer.html">Renderer</a></li><li><a href="RoundedBox.html">RoundedBox</a></li><li><a href="ScatterGraph.html">ScatterGraph</a></li><li><a href="Style.html">Style</a></li><li><a href="Text.html">Text</a></li><li><a href="UUID.html">UUID</a></li><li><a href="Vector2.html">Vector2</a></li><li><a href="Viewport.html">Viewport</a></li><li><a href="ViewportControls.html">ViewportControls</a></li></ul><h3>Global</h3><ul><li><a href="global.html#writeFile">writeFile</a></li></ul>
  1485. </nav>
  1486. <br class="clear">
  1487. <footer>
  1488. Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Sat Sep 17 2022 14:24:36 GMT+0100 (Hora de verão da Europa Ocidental)
  1489. </footer>
  1490. <script> prettyPrint(); </script>
  1491. <script src="scripts/linenumber.js"> </script>
  1492. </body>
  1493. </html>