{"id":1549,"date":"2016-08-06T08:13:04","date_gmt":"2016-08-06T08:13:04","guid":{"rendered":"https:\/\/www.codebee.co.th\/labs\/?p=1549"},"modified":"2016-10-23T11:50:24","modified_gmt":"2016-10-23T11:50:24","slug":"html5-%e0%b9%80%e0%b8%9e%e0%b8%b4%e0%b9%88%e0%b8%a1%e0%b8%ad%e0%b8%99%e0%b8%b4%e0%b9%80%e0%b8%a1%e0%b8%8a%e0%b8%b1%e0%b9%88%e0%b8%99%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%84%e0%b8%a5%e0%b8%b7","status":"publish","type":"post","link":"https:\/\/www.codebee.co.th\/labs\/html5-%e0%b9%80%e0%b8%9e%e0%b8%b4%e0%b9%88%e0%b8%a1%e0%b8%ad%e0%b8%99%e0%b8%b4%e0%b9%80%e0%b8%a1%e0%b8%8a%e0%b8%b1%e0%b9%88%e0%b8%99%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b9%80%e0%b8%84%e0%b8%a5%e0%b8%b7\/","title":{"rendered":"HTML5 Animation \u0e40\u0e1e\u0e34\u0e48\u0e21\u0e01\u0e32\u0e23\u0e40\u0e04\u0e25\u0e37\u0e48\u0e2d\u0e19\u0e44\u0e2b\u0e27\u0e43\u0e2b\u0e49\u0e23\u0e39\u0e1b\u0e20\u0e32\u0e1e"},"content":{"rendered":"<h3>HTML5 Animation \u0e40\u0e1e\u0e34\u0e48\u0e21\u0e01\u0e32\u0e23\u0e40\u0e04\u0e25\u0e37\u0e48\u0e2d\u0e19\u0e44\u0e2b\u0e27\u0e43\u0e2b\u0e49\u0e23\u0e39\u0e1b\u0e20\u0e32\u0e1e\u0e14\u0e49\u0e27\u0e22 GSAP JS<\/h3>\n<p><\/br><br \/>\n\u0e01\u0e32\u0e23\u0e17\u0e33\u0e20\u0e32\u0e1e\u0e40\u0e04\u0e25\u0e37\u0e48\u0e2d\u0e19\u0e44\u0e2b\u0e27\u0e43\u0e19 HTML5 Canvas \u0e21\u0e35\u0e43\u0e2b\u0e49\u0e40\u0e23\u0e32\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e17\u0e33\u0e44\u0e14\u0e49\u0e2b\u0e25\u0e32\u0e01\u0e2b\u0e25\u0e32\u0e22\u0e27\u0e34\u0e18\u0e35 \u0e2b\u0e32\u0e01\u0e40\u0e23\u0e32\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 HTML5 Library<br \/>\n\u0e43\u0e19\u0e01\u0e32\u0e23\u0e40\u0e02\u0e35\u0e22\u0e19 Web Application \u0e2b\u0e23\u0e37\u0e2d Game \u0e15\u0e31\u0e27\u0e44\u0e25\u0e1a\u0e23\u0e32\u0e23\u0e35\u0e48\u0e2a\u0e48\u0e27\u0e19\u0e43\u0e2b\u0e0d\u0e48\u0e08\u0e30\u0e21\u0e35\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e48\u0e19 Tween \u0e43\u0e2b\u0e49\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e44\u0e14\u0e49\u0e2d\u0e22\u0e39\u0e48\u0e41\u0e25\u0e49\u0e27<br \/>\n<\/br><br \/>\n<!--more--><br \/>\n<strong>GSAP (GreenSock Animation Platform)<\/strong> \u0e04\u0e37\u0e2d \u0e2d\u0e19\u0e34\u0e40\u0e21\u0e0a\u0e31\u0e48\u0e19\u0e44\u0e25\u0e1a\u0e23\u0e32\u0e23\u0e35\u0e48\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e23\u0e39\u0e1b\u0e41\u0e1a\u0e1a\u0e01\u0e32\u0e23\u0e40\u0e04\u0e25\u0e37\u0e48\u0e2d\u0e19\u0e44\u0e2b\u0e27\u0e43\u0e2b\u0e49\u0e27\u0e31\u0e15\u0e16\u0e38\u0e15\u0e48\u0e32\u0e07 \u0e46<br \/>\n\u0e15\u0e31\u0e27\u0e44\u0e25\u0e1a\u0e23\u0e32\u0e23\u0e35\u0e48\u0e16\u0e39\u0e01\u0e2d\u0e2d\u0e01\u0e41\u0e1a\u0e1a\u0e21\u0e32\u0e43\u0e2b\u0e49\u0e43\u0e0a\u0e49\u0e44\u0e14\u0e49\u0e43\u0e19\u0e2b\u0e25\u0e32\u0e22 \u0e46 \u0e20\u0e32\u0e29\u0e32\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e21\u0e34\u0e48\u0e07 \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e40\u0e02\u0e35\u0e22\u0e19\u0e42\u0e1b\u0e23\u0e41\u0e01\u0e23\u0e21\u0e1a\u0e19 HTML5 Canvas<br \/>\nGSAP \u0e01\u0e47\u0e21\u0e35\u0e44\u0e25\u0e1a\u0e23\u0e32\u0e23\u0e35\u0e48\u0e17\u0e35\u0e48\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e42\u0e14\u0e22\u0e20\u0e32\u0e29\u0e32 Javascript \u0e44\u0e14\u0e49\u0e40\u0e0a\u0e48\u0e19\u0e01\u0e31\u0e19<\/p>\n<p><a href=\"http:\/\/greensock.com\" target=\"_blank\"><strong>\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07\u0e41\u0e25\u0e30\u0e14\u0e32\u0e27\u0e42\u0e2b\u0e25\u0e14 Greensock Tween JS<\/strong><\/a><br \/>\n\u0e14\u0e32\u0e27\u0e19\u0e4c\u0e42\u0e2b\u0e25\u0e14 Greensock Tween Library \u0e08\u0e32\u0e01\u0e40\u0e27\u0e47\u0e1a\u0e44\u0e0b\u0e15\u0e4c\u0e2b\u0e25\u0e31\u0e01 \u0e44\u0e1f\u0e25\u0e4c\u0e44\u0e25\u0e1a\u0e23\u0e32\u0e23\u0e35\u0e48\u0e08\u0e30\u0e21\u0e35\u0e2b\u0e25\u0e32\u0e22 \u0e46 \u0e15\u0e31\u0e27\u0e43\u0e2b\u0e49\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19<br \/>\n\u0e40\u0e25\u0e37\u0e2d\u0e01\u0e21\u0e32\u0e41\u0e04\u0e48\u0e15\u0e31\u0e27\u0e40\u0e14\u0e35\u0e22\u0e27 \u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e43\u0e0a\u0e49\u0e44\u0e14\u0e49\u0e17\u0e31\u0e49\u0e07 TweenMax \u0e41\u0e25\u0e30 TweenLite<br \/>\n<\/br><\/p>\n<h4>\u0e17\u0e14\u0e2a\u0e2d\u0e1a\u0e17\u0e33\u0e23\u0e39\u0e1b\u0e20\u0e32\u0e1e\u0e43\u0e2b\u0e49\u0e40\u0e04\u0e25\u0e37\u0e48\u0e2d\u0e19\u0e44\u0e2b\u0e27\u0e14\u0e49\u0e27\u0e22 Greensock Tween JS<\/h4>\n<p>\u0e40\u0e23\u0e34\u0e48\u0e21\u0e15\u0e49\u0e19\u0e43\u0e2b\u0e49 include \u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 Jquery \u0e41\u0e25\u0e30 Greenock JS<\/p>\n<pre class=\"lang:default decode:true \" >&lt;script src=\"https:\/\/ajax.googleapis.com\/ajax\/libs\/jquery\/3.1.0\/jquery.min.js\"&gt;&lt;\/script&gt;\r\n&lt;script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/gsap\/1.19.0\/TweenMax.min.js\"&gt;&lt;\/script&gt;<\/pre>\n<p><\/br><br \/>\n\u0e17\u0e33\u0e01\u0e32\u0e23 add event &#8220;tick&#8221; \u0e41\u0e25\u0e30\u0e43\u0e2b\u0e49\u0e17\u0e33\u0e07\u0e32\u0e19 callback function \u0e0a\u0e37\u0e48\u0e2d\u0e27\u0e48\u0e32 animate<\/p>\n<pre class=\"lang:default decode:true \" >\r\nTweenMax.ticker.addEventListener(\"tick\", animate);\r\n<\/pre>\n<p><\/br><br \/>\n\u0e43\u0e19\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e48\u0e19 animate \u0e43\u0e0a\u0e49\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07 clearRect \u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e25\u0e1a\u0e27\u0e31\u0e15\u0e16\u0e38\u0e43\u0e19\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e15\u0e48\u0e32\u0e07 \u0e46 \u0e02\u0e2d\u0e07 canvas \u0e41\u0e25\u0e30\u0e43\u0e0a\u0e49\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07 drawImage<br \/>\n\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e27\u0e32\u0e14\u0e23\u0e39\u0e1b\u0e43\u0e2b\u0e21\u0e48\u0e41\u0e25\u0e30\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e43\u0e2b\u0e21\u0e48\u0e17\u0e38\u0e01\u0e04\u0e23\u0e31\u0e49\u0e07<\/p>\n<pre class=\"lang:default decode:true \" >function animate() {\r\n\tcontext.clearRect(0,0,640,480);\r\n\tcontext.drawImage(img, img.xpos, img.ypos);\r\n}<\/pre>\n<p><\/br><br \/>\n\u0e43\u0e0a\u0e49\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07\u0e02\u0e2d\u0e07 TweenMax \u0e01\u0e33\u0e2b\u0e19\u0e14\u0e15\u0e33\u0e41\u0e2b\u0e19\u0e48\u0e07\u0e02\u0e2d\u0e07\u0e23\u0e39\u0e1b\u0e43\u0e19\u0e41\u0e19\u0e27\u0e01\u0e48\u0e2d\u0e19 ypos<\/p>\n<pre class=\"lang:default decode:true \" >\r\nTweenMax.to(img, 9, {ypos:400});\r\n<\/pre>\n<p><\/br><\/p>\n<h4>\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e01\u0e32\u0e23\u0e40\u0e04\u0e25\u0e37\u0e48\u0e2d\u0e19\u0e44\u0e2b\u0e27\u0e42\u0e14\u0e22\u0e43\u0e0a\u0e49 GSAP<\/h4>\n<p><a href=\"https:\/\/www.codebee.co.th\/labs\/examples\/HTML5-\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e2d\u0e19\u0e34\u0e40\u0e21\u0e0a\u0e31\u0e48\u0e19\u0e01\u0e32\u0e23\u0e40\u0e04\u0e25\u0e37\u0e48\u0e19\u0e44\u0e2b\u0e27\u0e43\u0e2b\u0e49-Context2D-\u0e14\u0e49\u0e27\u0e22-GSAP-JS.html\" target=\"_blank\">HTML5-\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e2d\u0e19\u0e34\u0e40\u0e21\u0e0a\u0e31\u0e48\u0e19\u0e01\u0e32\u0e23\u0e40\u0e04\u0e25\u0e37\u0e48\u0e19\u0e44\u0e2b\u0e27\u0e43\u0e2b\u0e49-Context2D-\u0e14\u0e49\u0e27\u0e22-GSAP-JS.html<\/a><br \/>\n<iframe loading=\"lazy\" src=\"https:\/\/www.codebee.co.th\/labs\/examples\/HTML5-\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e2d\u0e19\u0e34\u0e40\u0e21\u0e0a\u0e31\u0e48\u0e19\u0e01\u0e32\u0e23\u0e40\u0e04\u0e25\u0e37\u0e48\u0e19\u0e44\u0e2b\u0e27\u0e43\u0e2b\u0e49-Context2D-\u0e14\u0e49\u0e27\u0e22-GSAP-JS.html\" width=\"640\" height=\"480\" scrolling=\"no\" frameborder=\"0\"><\/iframe><\/p>\n<p><\/br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>HTML5 Animation \u0e40\u0e1e\u0e34\u0e48\u0e21\u0e01\u0e32\u0e23\u0e40\u0e04\u0e25\u0e37\u0e48\u0e2d\u0e19\u0e44\u0e2b\u0e27\u0e43\u0e2b\u0e49\u0e23\u0e39\u0e1b\u0e20\u0e32\u0e1e\u0e14\u0e49\u0e27\u0e22 GSAP JS \u0e01\u0e32\u0e23\u0e17\u0e33\u0e20\u0e32\u0e1e\u0e40\u0e04\u0e25\u0e37\u0e48\u0e2d\u0e19\u0e44\u0e2b\u0e27\u0e43\u0e19 HTML5 Canvas \u0e21\u0e35\u0e43\u0e2b\u0e49\u0e40\u0e23\u0e32\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e17\u0e33\u0e44\u0e14\u0e49\u0e2b\u0e25\u0e32\u0e01\u0e2b\u0e25\u0e32\u0e22\u0e27\u0e34\u0e18\u0e35 \u0e2b\u0e32\u0e01\u0e40\u0e23\u0e32\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 HTML5 Library \u0e43\u0e19\u0e01\u0e32\u0e23\u0e40\u0e02\u0e35\u0e22\u0e19 Web Application \u0e2b\u0e23\u0e37\u0e2d Game \u0e15\u0e31\u0e27\u0e44\u0e25\u0e1a\u0e23\u0e32\u0e23\u0e35\u0e48\u0e2a\u0e48\u0e27\u0e19\u0e43\u0e2b\u0e0d\u0e48\u0e08\u0e30\u0e21\u0e35\u0e1f\u0e31\u0e07\u0e01\u0e4c\u0e0a\u0e31\u0e48\u0e19 Tween \u0e43\u0e2b\u0e49\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19\u0e44\u0e14\u0e49\u0e2d\u0e22\u0e39\u0e48\u0e41\u0e25\u0e49\u0e27<\/p>\n","protected":false},"author":1,"featured_media":1535,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"video","meta":{"footnotes":""},"categories":[46],"tags":[414,416,415,124,413,417,933,371,614,418,549,501,935],"class_list":["post-1549","post","type-post","status-publish","format-video","has-post-thumbnail","hentry","category-website-development-","tag-canvas-animation","tag-gsap-tween","tag-html5-canvas-tween","tag-js-tween","tag-tweenlite-js-examples","tag-417","tag-933","tag-371","tag-614","tag-418","tag-549","tag-501","tag-935","post_format-post-format-video"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/posts\/1549","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/comments?post=1549"}],"version-history":[{"count":17,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/posts\/1549\/revisions"}],"predecessor-version":[{"id":1568,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/posts\/1549\/revisions\/1568"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/media\/1535"}],"wp:attachment":[{"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/media?parent=1549"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/categories?post=1549"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codebee.co.th\/labs\/wp-json\/wp\/v2\/tags?post=1549"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}