language:javascript:kinetic
차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판이전 판다음 판 | 이전 판다음 판양쪽 다음 판 | ||
language:javascript:kinetic [2021/07/02 17:29] – kieuns | language:javascript:kinetic [2021/07/05 10:14] – kieuns | ||
---|---|---|---|
줄 3: | 줄 3: | ||
<note warning> | <note warning> | ||
- | ====== GlobalObject ====== | + | |
- | + | * [[https://threejs.org/]] 이게 대세인 모양 | |
- | = frame : stage class의 onFrame() 로 설정하는 콜백 함수의 파라미터. | + | |
- | = : time, timeDiff, lastTime 값이 있다. | + | |
- | = : timeDiff : 프레임간 시간 간격. | + | |
- | + | ||
- | ====== Kinetic.Node ====== | + | |
- | + | ||
- | transitionTo( json-config ) | + | |
- | + | ||
- | 파라미터 | + | |
- | < | + | |
- | rotation | + | |
- | radius | + | |
- | x, y | + | |
- | duration | + | |
- | alpha | + | |
- | easing | + | |
- | callback | + | |
- | </ | + | |
- | + | ||
- | = callback : transition이 끝나면 호출되는 함수를 지정한다. 자기 자신을 설정해도 무한 재귀 호출이 발생되지는 않았다. | + | |
- | + | ||
- | < | + | |
- | function somethingMove() | + | |
- | { | + | |
- | _movParam = | + | |
- | { | + | |
- | rotation: Math.random() * Math.PI * 2, | + | |
- | radius: Math.random() * 100 + 20, | + | |
- | x: Math.random() * Main.Global.firstStage.getWidth(), | + | |
- | y: Math.random() * Main.Global.firstStage.getHeight(), | + | |
- | //alpha: Math.random(), | + | |
- | duration: Math.random() * 5 + 0.5, | + | |
- | easing: ' | + | |
- | callback: somethingMove // | + | |
- | }; | + | |
- | _SomeKineticObject.transitionTo( _movParam ); | + | |
- | + | ||
- | // callback 부분을 " | + | |
- | // " | + | |
- | } | + | |
- | </ | + | |
- | + | ||
- | ====== fish move ref ====== | + | |
- | + | ||
- | | + | |
- | * [[http:// | + | |
- | * [[http:// | + | |
- | * [[http:// | + | |
- | * [[http:// | + | |
- | * [[http://www.html5canvastutorials.com/ | + | |
- | * [[http:// | + | |
- | * [[http:// | + | |
- | * [[http:// | + |
language/javascript/kinetic.txt · 마지막으로 수정됨: 2024/04/23 22:44 저자 127.0.0.1