Constructor
new Timeline(_objects, _datasets)
타임라인 생성에 필요한 각종 값들을 설정하고 마우스 이벤트를 등록한다.
Parameters:
Name | Type | Description |
---|---|---|
_objects |
object | 타임라인 생성에 필요한 각종 오브젝트들 |
_datasets |
object | 타임라인 생성에 필요한 데이터셋 전체 |
- Source:
Members
alpha :number
Timeline의 투명도
- Source:
barGraphics :Graphics
Timeline에 bar를 그려줄 Graphics
- Source:
chart :ChartJS
Chart.js에서 생성된 차트 오브젝트
- Source:
circleX :number
control의 x좌표
- Source:
color :number
Timeline의 주 색상 ( 16진수 )
- Source:
controlDown :boolean
control에 mounsedown 여부
- Source:
controlGraphics :Graphics
Timeline에 control을 그려줄 Graphics
- Source:
controlIn :boolean
control에 mouseover 여부
- Source:
current :number
현재 Timeline의 위치
- Source:
datasets :object
타임라인 생성에 필요한 데이터셋 전체
- Source:
hitLength :number
Timeline의 전체 넓이에서 하나의 넓이
- Source:
hitPoint :array
Timeline에서 시간별 위치
- Source:
marginLRValue :number
좌우 여백 퍼센트의 실제 값
- Source:
option :object
차트를 생성할 때 사용자들이 설정했던 옵션
- Source:
parent :Gamify
Chart 클래스에서 생성하지만 부모는 Chart클래스의 부모와 동일하게 설정
- Source:
pixi :PIXI
PIXI 오브젝트
- Source:
radius :number
control의 원 크기
- Source:
text :Text
Timeline의 텍스트들
- Source:
Methods
changeDataset(index)
인덱스를 통해 데이터셋을 변경시켜 데이터의 시간을 바꾼다.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | 변경시킬 인덱스 |
- Source:
drawTimeline(state, e)
Timeline을 현재 상태를 바탕으로 그려줌
Parameters:
Name | Type | Description |
---|---|---|
state |
string | 현재 Timeline에 가해진 이벤트 상태 |
e |
object | 이벤트 상테에서 가져온 event 오브젝트 ( 마우스 위치 ) |
- Source:
findNearest(array, value) → {number}
제시한 수를 배열에서 검색해서 가장 가까운 값의 인덱스를 찾아줌
Parameters:
Name | Type | Description |
---|---|---|
array |
array | 검색할 배열 |
value |
number | 찾을 수 |
- Source:
timeToString(index) → {string}
시간을 제시한 포맷으로 변경시켜줌
Parameters:
Name | Type | Description |
---|---|---|
index |
index | 제시한 포맷으로 변경시킬 시간 |
- Source: