SlideShare a Scribd company logo
1 of 56
Download to read offline
ZENER NET WORKS
  2013/02/28
     sanoh
1.HTML5に将来はあるのか?
2.Webアプリ開発
3.開発環境準備
4.開発サンプル
1.HTML5に将来はあるのか?
2.WEBアプリ開発
3.開発環境準備
4.開発サンプル
スマートフォン(iPhone、Android、
WindowsPhone8)
スレートPC(iPad、Kindol)
スマートTV(AppleTV、GoogleTV、
KindolTV)
ディスクトップ(Windows、Mac)
コンシューマ(PS3、XBOX360、WiiU)
携帯ゲーム機(PSP、3DS)
課金
ストア   ストア     ストア
 課金    課金      課金



      ソーシャル
      グラフ     リアル
              グラフ   利益

利益

       利益
              利益
ブラウザで
 動作する
コンテンツ
チッリなコンテンツ

Flash? VS HTML5?
1.HTML5に将来はあるのか?
2.Webアプリ開発
3.開発環境準備
4.開発サンプル
FLASH               Java          Silverlight


HTML5               Ajax                CSS

          JavaScrpt(JQuery,Json・・・)


                    HTML


       HTTP                      XML


Perl           PHP(Cake,Zend)     C#(ASP・・)


MySQL             SQL Azure            Postgre

Linux             クラウド(Amazon,Azure・・・・)
HTML5

        JavaScrpt


          HTML
Canvas
SVG
Audio
Video
WebSocket
WebWorker
WegStorage
WebGL
Desktop                     iPhone          Android2.3
            IE9   FireFox   Chrome   Safari   Safari   Chrome   標準   FireFox
                  15.0.1     21.0    5.1.7     5.1       12           15.0.1

Canvas      ○       ○        ○        ○        ○        ○       ○      ○
SVG         ○       ○        ○        ○        ○        ○       ○      ○
Audio       ○       ○        ○        ○        ○        ○       ○      ○
Video       ○       ○        ○        ○        ○        ○       ○      ○
WebSocket   X       ○        ○        ○        ○        ○       X      ○
WebWorker   X       ○        ○        ○        ○        ○       X      ○
WebStrage   ○       ○        ○        ○         -        -      -      -
WebGL       X       X        ○         X        X        X      X      ○
1.HTML5に将来はあるのか?
2.Webアプリ開発
3.開発環境準備
4.開発サンプル
3.1 デバッグ環境
3.2 ローカルサーバ環境
3.3 環境の選定
IE9
F12
Firefox
Firebug(エクステンション)
Safari
Web   Inspector
Chrome
 Chromeデベロッパーツール
VisualStudio2010 / WebMatrix2
XAMPP
VirtualPC
VMware
Azure
IIS
Apache
HTML5                HTML5

 JavaScript(JQuery)   JavaScript(JQuery)



Apache      CakePHP    IIS          MVC-3、4


              PHP                   ASP.NET

             MySQL            WindowsServer
1.HTML5に将来はあるのか?
2.Webアプリ開発
3.開発環境準備
4.開発サンプル
4.1   表示
4.2   動きのある表示
4.3   色加算
4.4   パフォーマンス
4.5   Lib化
4.6   入力
4.7   ブラウザ互換
4.8   ページ遷移
4.9   バグの出にくいソース?
HTMK5
http://ie.microsoft.com/testdrive/


http://worldsbiggestpacman.com/play/#-7,6
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8"/>
<title>Sample001.html</title>

<script>
function draw() {
    var canvas = document.getElementById("canvas1");
    var c = canvas.getContext("2d");
}
</script>

</head>
<body onload="draw()">
<canvas id="canvas1" width="300" height="300"></canvas>
</body>
</html>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8"/>
<title>Sample002.html</title>

<script>
function draw() {
    var canvas = document.getElementById("canvas1");
    var c = canvas.getContext("2d");
    c.font = "38px 'MS Gothic'";
    c.fillStyle = "#666666";
    c.fillText("こんにちは", 100, 100);
}
</script>

</head>
<body onload="draw()">
<canvas id="canvas1" width="300" height="300"></canvas>
</body>
</html>
:
function draw() {
    var canvas = document.getElementById("canvas1");
    var c = canvas.getContext("2d");

        c.fillStyle = "#0099ff";
        c.fillRect (15, 15, 50, 45);

        c.fillStyle = "rgba(0, 0, 200, 0.5)";
        c.fillRect (30, 30, 50, 45);
}
    :
function draw() {
    var canvas = document.getElementById("canvas1");
    var c = canvas.getContext("2d");

    c.strokeStyle = "#ff9900";
    c.beginPath();
    c.arc(70, 70, 60, 0, Math.PI*2, false);
    c.stroke();
}

function draw() {
    var canvas = document.getElementById("canvas1");
    var c = canvas.getContext("2d");

    c.fillStyle = "#990099";
    c.beginPath();
    c.arc(70, 70, 60, 0, Math.PI*2, false);
    c.fill();
}
function draw() {
    var canvas = document.getElementById("canvas1");
    var c = canvas.getContext("2d");

    c.fillStyle = "#999999";
    c.beginPath();
    c.moveTo(10,10);
    c.lineTo(200,50);
    c.lineTo(100,120);
    c.closePath();
    c.fill();
}
function draw() {
                                                       Onloadなので読み込み終
    var canvas = document.getElementById("canvas1");
    var c = canvas.getContext("2d");
                                                       了してない

    var img = new Image();
    img.src = "img/grand001.png";
    c.drawImage(img, 0, 0);
}
function draw() {
    var canvas = document.getElementById("canvas1");
    var c = canvas.getContext("2d");

    var img = new Image();
    img.src = "img/grand001.png";
    c.drawImage(img, 0, 0, 640, 480);
}
function draw() {
    var canvas = document.getElementById("canvas1");
    var c = canvas.getContext("2d");

    var img = new Image();
    img.src = "img/tree001.png";
    c.drawImage(img, 10, 10, 64, 64, 100, 100, 128, 32);
}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8"/>
<title>Sample002.html</title>
<script>//<![CDATA[

var timerInterval = 25; //25msec
var timer1;
var c;

function draw() {
}

function init(){
    var canvas = document.getElementById("canvas1");
    c = canvas.getContext("2d");

    timer1 = setInterval("draw()", timerInterval);
}

//]]></script>
</head>
<body onload="init()">
<canvas id="canvas1" width=“300" height=“300"></canvas>
</body>
</html>
<script>//<![CDATA[

var   timerInterval = 25; //25msec                         イメージの読み
var   timer1;
var   c;                                                   込み終了を待つ
var   img;

function draw() {
}

function init(){
    var canvas = document.getElementById("canvas1");
    c = canvas.getContext("2d");

      img = new Image();
      img.src = "img/grand001.png";

      img.onload = function(){
          draw();
          timer1 = setInterval("draw()", timerInterval);
      }
}

//]]></script>
<script>//<![CDATA[

var timerInterval = 25; //25msec
var timer1;

var c;
var img;

var angle = 3;
function draw() {
  c.fillStyle = "#c0c0c0";
  c.fillRect (0, 0, 300, 300);

    c.rotate(angle * Math.PI / 180);
    c.drawImage(img, 0, 0);
}

function init(){
    var canvas = document.getElementById("canvas1");
    c = canvas.getContext("2d");

     img = new Image();
     img.src = "img/grand001.png";
     img.onload = function(){
         draw();
         timer1 = setInterval("draw()", timerInterval);
      }
}

//]]></script>
<script>                                                     function Draw(){
Var draw;                                                        draw.clearRect(0, 0, windWidth, windHeight);
Var img;
                                                                 draw.fillStyle         = "#000000";
Var partX;
                                                                 draw.fillRect(0, 0, windWidth, windHeight);
Var partY;
Var partAX;
Var partAY;                                                      draw.globalCompositeOperation        = "lighter";
                                                                 for( var i = 0 ; i < partX.length ; i++ ){
function init() {                                                    draw.drawImage(img, partX[i], partY[i]);
    var max = 60;                                                    //-----------------------------------------
    var outputcanvas = document.getElementById("canvas1");           partX[i]           += partAX[ i ];
    var ang;                                                         if( partX[i] < -128 )
                                                                     partAX[i]          = -partAX[i];
    per = new Performance();                                         if( partX[i] > windWidth-128 )
    draw = outputcanvas.getContext("2d");                                partAX[i]      = -partAX[i];
    setInterval(“Draw()", 16.7);
                                                                     partY[i]           += partAY[ i ];
    windWidth = outputcanvas.width;
    windHeight = outputcanvas.height;                                if( partY[i] < -128 )
    //--------------------------------------                             partAY[i]      = -partAY[i];
    img = new Image();                                               if( partY[i] > windHeight-128 )
    img.src = "../img/ball.png";                                         partAY[i]      = -partAY[i];
    //--------------------------------------                     }
    partX = Array( max );                                        draw.globalCompositeOperation        = "source-over";
    partY = Array( max );
    partAX = Array( max );                                   }
    partAY = Array( max );
    for( var i = 0 ; i < max ; i++ ){                        </script>
        partX[i] = Math.random() * (windWidth-128);
                                                             </head>
        partY[i] = Math.random() * (windHeight-128);
                                                             <body onload="init()">
        Ang   = Math.random() * Math.PI * 2;
        partAX[i] = Math.sin( ang );                         <canvas id="canvas1" width="640" height="400"></canvas>
        partAY[i] = Math.sin( ang );                         </body>
    }                                                        </html>
}
<script language="JavaScript“
                    src="./Performance.js"></script>

                                                       function     Performance(){
                                                           this.startTime = new Date();
var            per;                                        this.endTime = new Date();
                                                           this.fpsTime = 0;
function init() {
                                                           this.Start = function(){
      per      = new Performance();                            this.startTime = new Date();
                                                               this.fpsTime = this.startTime - this.endTime;
                                                               this.endTime = this.startTime;
                                                           }
function Draw(){                                           this.GetFPS = function( fr ){
    var      fps;                                              return Math.min(Math.floor(1000/this.fpsTime), fr )
    per.Start();                                           }
    fps      = per.GetFPS(60);                         }

             : 描画

      draw.font = "128px 'MS Gothic'";
      draw.fillStyle = "#ff0000";
      draw.fillText("FPS="+fps, 100, 150);
}
Var     Glib        = function(name){                            this.DrawPolygon3 = function(   x1, y1, x2, y2, x3, y3 ){
      this.canvas = document.getElementById(name);                   this.g.beginPath();
      this.g        = this.canvas.getContext("2d");                  this.g.moveTo(x1,y1);
      this.canvasW = this.canvas.width;                              this.g.lineTo(x2,y2);
      this.canvasH = this.canvas.height;                             this.g.lineTo(x3,y3);
      this.g.lineWidth = 1;                                          this.g.closePath();
      this.Cls = function() {                                        this.g.fill();
           this.g.clearRect(0, 0, this.canvasW, this.canvasH);   }
           this.Push();                                          this.DrawPolygon3 = function(   x1, y1, x2, y2, x3, y3, s ){
      }                                                              this.g.fillStyle = s;
      this.Cls = function(s) {                                       this.g.beginPath();
           this.g.fillStyle = s;                                     this.g.moveTo(x1,y1);
           this.g.fillRect(0, 0, this.canvasW, this.canvasH);        this.g.lineTo(x2,y2);
           this.Push();                                              this.g.lineTo(x3,y3);
      }                                                              this.g.closePath();
      this.Draw = function() {                                       this.g.fill();
           this.Pop();                                           }
      }                                                          this.DrawPolygon4 = function(   x1, y1, x2, y2, x3, y3, x4, y4 ){
      this.SetColor = function( s ){                                 this.g.beginPath();
           this.g.fillStyle = s;                                     this.g.moveTo(x1,y1);
      }                                                              this.g.lineTo(x2,y2);
      this.DrawBox = function( x, y, w, h ){                         this.g.lineTo(x3,y3);
           this.g.fillRect ( x, y, w, h);                            this.g.lineTo(x4,y4);
      }                                                              this.g.closePath();
      this.DrawBox = function( x, y, w, h, s ){                      this.g.fill();
           this.g.fillStyle = s;                                 }
           this.g.fillRect ( x, y, w, h);                        this.DrawPolygon4 = function(   x1, y1, x2, y2, x3, y3, x4, y4, s ){
      }                                                              this.g.fillStyle = s;
      this.DrawLine = function( x1, y1, x2, y2 ){                    this.g.beginPath();
           this.g.lineWidth = 2;                                     this.g.moveTo(x1,y1);
           this.g.beginPath();                                       this.g.lineTo(x2,y2);
           this.g.moveTo(x1,y1);                                     this.g.lineTo(x3,y3);
           this.g.lineTo(x2,y2);                                     this.g.lineTo(x4,y4);
           this.g.closePath();                                       this.g.closePath();
           this.g.stroke();                                          this.g.fill();
      }                                                          }
      this.DrawLine = function( x1, y1, x2, y2, s ){
           this.g.strokeStyle = s;
           this.g.beginPath();
           this.g.moveTo(x1,y1);
           this.g.lineTo(x2,y2);
           this.g.closePath();
           this.g.stroke();
      }
this.DrawImage = function( img, x, y ){
        this.g.drawImage(img, x, y);
    }
    this.DrawImage4 = function( img, x, y, w, h ){
        this.g.drawImage(img, x, y, w, h);
    }
    this.DrawImageObj = function( img, sx, sy, sw, sh ){
        this.g.drawImage(img, sx, sy, sw, sh, 0, 0, sw, sh);
    }
    this.DrawImage6 = function( img, sx, sy, sw, sh, x, y){
        this.g.drawImage(img, sx, sy, sw, sh, x, y, sw, sh);
    }
    this.DrawImage8 = function( img, sx, sy, sw, sh, x, y, w, h ){
        this.g.drawImage(img, sx, sy, sw, sh, x, y, w, h);
    }
    this.Pos     = function( x, y ){
        this.g.translate( x, y );
    }
    this.Ang     = function( a ){
        this.g.rotate( a )
    }
    this.Push    = function(){
        this.g.save();
    }
    this.Pop     = function(){
        this.g.restore();
    }
};
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
                                                          Lib化して楽しよう
<meta charset="utf-8"/>
<title>Test</title>

<script language="JavaScript" src="./Glib.js"></script>
<script>//<![CDATA[
var timerInterval = 16.7;
Var g;
var imgTmy;

function draw() {
    g.Cls("#0000ff");
    g.DrawImage( imgTmy, 40, 40);
    g.DrawLine( 0, 0, 250, 200, "#00ffff");
    g.Draw();
}
function init(){
    g            = new Glib( "canvas1");
    setInterval("draw()", timerInterval);

    imgTmy = new Image();
    imgTmy.src = "./grand001.png";
}

//]]></script>
</head>
<body onload="init()">
<canvas id="canvas1" width="300" height="300"></canvas>
</body>
</html>
SmileBoom Petit Developer
スマイルブーム

Enchant.js
Ubiquitous Entertainment Inc

FLASH
Unity
<script>//<![CDATA[
window.document.onkeydown = click_down;   イベントでキャッチ
window.document.onkeyup = click_up;

function click_down()   {
    if( event.keyCode   == 37 )
        my_add_x        = 256*2;
    if( event.keyCode   == 39 )
        my_add_x        =-256*2;
}

function click_up() {
    if( event.keyCode   ==   37 )
        my_add_x        =    0;
    if( event.keyCode   ==   39 )
        my_addx         =    0;
}

//]]></script>
function   myGetBrowser(){
    myOP   = (navigator.userAgent.indexOf("Opera",0) != -1)?1:0; //OP
    myN6   = document.getElementById; // N6 or IE
    myIE
    myN4
           = document.all;
           = document.layers;
                                       // IE
                                       // N4
                                                                        昔はブラウザ依存を
    if (myOP){                           // OP?
        document.onmousemove = myMoveOP;
    }else if (myIE){                     // IE?
                                                                        気負つける必要が
        document.onmousemove = myMoveIE;
    }else if (myN6){                     // N6?
        window.addEventListener("mousemove",myMoveN6,true);
    }else if (myN4){                     // N4?
                                                                        あった。
        window.captureEvents(Event.MOUSEMOVE);
        window.onmousemove = myMoveN4;
    }
    document.addEventListener("touchstart", touchHandler, false);
    document.addEventListener("touchmove", touchHandler, false);
    document.addEventListener("touchend", touchHandler, false);
}

function touchHandler(event) {
    Xpos = event.touches[0].pageX;
    Ypos = event.touches[0].pageY;
    Catch();
}
function myMoveOP(){ // OPŃ}EX
    Xpos = window.event.clientX;
    Ypos = window.event.clientY;
    Catch();
}
function myMoveN6(myEvent){ // N6Ń}EX
    Xpos = myEvent.clientX + window.pageXOffset;
    Ypos = myEvent.clientY + window.pageYOffset;
    Catch();
}
function myMoveIE(){ // IEŃ}EX
    Xpos = window.event.clientX + document.body.scrollLeft;
    Ypos = window.event.clientY + document.body.scrollTop;
    Catch();
}
function myMoveN4(myEvent){ // N4Ń}EX
    Xpos = myEvent.x;
    Ypos = myEvent.y;
    Catch();
}
JQuery




    Googleを使う
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">
</script>
ページ切り替え     中身切り替え

          <body>
           <div id="MainFrame">
          </body>
          </html>
var命令による変数宣言は省略しない
  比較演算子は「==」ではなく「===」を
  配列の生成にはリテラルを使う
  中括弧は省略しない
  文の途中の改行に要注意

http://blog.livedoor.jp/ryo511-web/archives/13577395.html
動かして楽しもう
JavaScript

Flash
Flash11
http://nissan-stagejuk3d.com/



  WebGL
https://code.google.com/p/webglsamples/
やっておいて損はない
質問
Mail: sanoh@zener.co.jp
Blog: http://d.hatena.ne.jp/sanoh/ (ポリゴン魂)
Facebook: 佐野 浩章
Twitter: sanoh00

More Related Content

What's hot

The Ring programming language version 1.4.1 book - Part 12 of 31
The Ring programming language version 1.4.1 book - Part 12 of 31The Ring programming language version 1.4.1 book - Part 12 of 31
The Ring programming language version 1.4.1 book - Part 12 of 31Mahmoud Samir Fayed
 
OGDC2013_Lets remake the wheel_ Mr Nguyen Trung Hung
OGDC2013_Lets remake the wheel_ Mr Nguyen Trung HungOGDC2013_Lets remake the wheel_ Mr Nguyen Trung Hung
OGDC2013_Lets remake the wheel_ Mr Nguyen Trung Hungogdc
 
Ogdc 2013 lets remake the wheel
Ogdc 2013 lets remake the wheelOgdc 2013 lets remake the wheel
Ogdc 2013 lets remake the wheelSon Aris
 
The Ring programming language version 1.7 book - Part 72 of 196
The Ring programming language version 1.7 book - Part 72 of 196The Ring programming language version 1.7 book - Part 72 of 196
The Ring programming language version 1.7 book - Part 72 of 196Mahmoud Samir Fayed
 
The Ring programming language version 1.8 book - Part 74 of 202
The Ring programming language version 1.8 book - Part 74 of 202The Ring programming language version 1.8 book - Part 74 of 202
The Ring programming language version 1.8 book - Part 74 of 202Mahmoud Samir Fayed
 
The Ring programming language version 1.5.1 book - Part 64 of 180
The Ring programming language version 1.5.1 book - Part 64 of 180The Ring programming language version 1.5.1 book - Part 64 of 180
The Ring programming language version 1.5.1 book - Part 64 of 180Mahmoud Samir Fayed
 
Html5 game programming overview
Html5 game programming overviewHtml5 game programming overview
Html5 game programming overview민태 김
 
The Ring programming language version 1.5.2 book - Part 52 of 181
The Ring programming language version 1.5.2 book - Part 52 of 181The Ring programming language version 1.5.2 book - Part 52 of 181
The Ring programming language version 1.5.2 book - Part 52 of 181Mahmoud Samir Fayed
 
The Ring programming language version 1.8 book - Part 51 of 202
The Ring programming language version 1.8 book - Part 51 of 202The Ring programming language version 1.8 book - Part 51 of 202
The Ring programming language version 1.8 book - Part 51 of 202Mahmoud Samir Fayed
 
Pixelplant - WebDev Meetup Salzburg
Pixelplant - WebDev Meetup SalzburgPixelplant - WebDev Meetup Salzburg
Pixelplant - WebDev Meetup Salzburgwolframkriesing
 
Exploring Canvas
Exploring CanvasExploring Canvas
Exploring CanvasKevin Hoyt
 
The Ring programming language version 1.5.4 book - Part 68 of 185
The Ring programming language version 1.5.4 book - Part 68 of 185The Ring programming language version 1.5.4 book - Part 68 of 185
The Ring programming language version 1.5.4 book - Part 68 of 185Mahmoud Samir Fayed
 
The Ring programming language version 1.6 book - Part 70 of 189
The Ring programming language version 1.6 book - Part 70 of 189The Ring programming language version 1.6 book - Part 70 of 189
The Ring programming language version 1.6 book - Part 70 of 189Mahmoud Samir Fayed
 
openFrameworks – パーティクルを動かす、静的配列と動的配列 - 多摩美メディアアートII
openFrameworks – パーティクルを動かす、静的配列と動的配列 - 多摩美メディアアートIIopenFrameworks – パーティクルを動かす、静的配列と動的配列 - 多摩美メディアアートII
openFrameworks – パーティクルを動かす、静的配列と動的配列 - 多摩美メディアアートIIAtsushi Tadokoro
 
The Ring programming language version 1.5.3 book - Part 15 of 184
The Ring programming language version 1.5.3 book - Part 15 of 184The Ring programming language version 1.5.3 book - Part 15 of 184
The Ring programming language version 1.5.3 book - Part 15 of 184Mahmoud Samir Fayed
 
The Ring programming language version 1.2 book - Part 35 of 84
The Ring programming language version 1.2 book - Part 35 of 84The Ring programming language version 1.2 book - Part 35 of 84
The Ring programming language version 1.2 book - Part 35 of 84Mahmoud Samir Fayed
 
Raspberry Pi à la GroovyFX
Raspberry Pi à la GroovyFXRaspberry Pi à la GroovyFX
Raspberry Pi à la GroovyFXStephen Chin
 

What's hot (20)

The Ring programming language version 1.4.1 book - Part 12 of 31
The Ring programming language version 1.4.1 book - Part 12 of 31The Ring programming language version 1.4.1 book - Part 12 of 31
The Ring programming language version 1.4.1 book - Part 12 of 31
 
OGDC2013_Lets remake the wheel_ Mr Nguyen Trung Hung
OGDC2013_Lets remake the wheel_ Mr Nguyen Trung HungOGDC2013_Lets remake the wheel_ Mr Nguyen Trung Hung
OGDC2013_Lets remake the wheel_ Mr Nguyen Trung Hung
 
Ogdc 2013 lets remake the wheel
Ogdc 2013 lets remake the wheelOgdc 2013 lets remake the wheel
Ogdc 2013 lets remake the wheel
 
The Ring programming language version 1.7 book - Part 72 of 196
The Ring programming language version 1.7 book - Part 72 of 196The Ring programming language version 1.7 book - Part 72 of 196
The Ring programming language version 1.7 book - Part 72 of 196
 
The Ring programming language version 1.8 book - Part 74 of 202
The Ring programming language version 1.8 book - Part 74 of 202The Ring programming language version 1.8 book - Part 74 of 202
The Ring programming language version 1.8 book - Part 74 of 202
 
The Ring programming language version 1.5.1 book - Part 64 of 180
The Ring programming language version 1.5.1 book - Part 64 of 180The Ring programming language version 1.5.1 book - Part 64 of 180
The Ring programming language version 1.5.1 book - Part 64 of 180
 
Html5 game programming overview
Html5 game programming overviewHtml5 game programming overview
Html5 game programming overview
 
The Ring programming language version 1.5.2 book - Part 52 of 181
The Ring programming language version 1.5.2 book - Part 52 of 181The Ring programming language version 1.5.2 book - Part 52 of 181
The Ring programming language version 1.5.2 book - Part 52 of 181
 
The Ring programming language version 1.8 book - Part 51 of 202
The Ring programming language version 1.8 book - Part 51 of 202The Ring programming language version 1.8 book - Part 51 of 202
The Ring programming language version 1.8 book - Part 51 of 202
 
Pixelplant - WebDev Meetup Salzburg
Pixelplant - WebDev Meetup SalzburgPixelplant - WebDev Meetup Salzburg
Pixelplant - WebDev Meetup Salzburg
 
Ocr code
Ocr codeOcr code
Ocr code
 
Exploring Canvas
Exploring CanvasExploring Canvas
Exploring Canvas
 
D3.js workshop
D3.js workshopD3.js workshop
D3.js workshop
 
The Ring programming language version 1.5.4 book - Part 68 of 185
The Ring programming language version 1.5.4 book - Part 68 of 185The Ring programming language version 1.5.4 book - Part 68 of 185
The Ring programming language version 1.5.4 book - Part 68 of 185
 
Proga 0622
Proga 0622Proga 0622
Proga 0622
 
The Ring programming language version 1.6 book - Part 70 of 189
The Ring programming language version 1.6 book - Part 70 of 189The Ring programming language version 1.6 book - Part 70 of 189
The Ring programming language version 1.6 book - Part 70 of 189
 
openFrameworks – パーティクルを動かす、静的配列と動的配列 - 多摩美メディアアートII
openFrameworks – パーティクルを動かす、静的配列と動的配列 - 多摩美メディアアートIIopenFrameworks – パーティクルを動かす、静的配列と動的配列 - 多摩美メディアアートII
openFrameworks – パーティクルを動かす、静的配列と動的配列 - 多摩美メディアアートII
 
The Ring programming language version 1.5.3 book - Part 15 of 184
The Ring programming language version 1.5.3 book - Part 15 of 184The Ring programming language version 1.5.3 book - Part 15 of 184
The Ring programming language version 1.5.3 book - Part 15 of 184
 
The Ring programming language version 1.2 book - Part 35 of 84
The Ring programming language version 1.2 book - Part 35 of 84The Ring programming language version 1.2 book - Part 35 of 84
The Ring programming language version 1.2 book - Part 35 of 84
 
Raspberry Pi à la GroovyFX
Raspberry Pi à la GroovyFXRaspberry Pi à la GroovyFX
Raspberry Pi à la GroovyFX
 

Viewers also liked

mendesain pengujian substantif
mendesain pengujian substantifmendesain pengujian substantif
mendesain pengujian substantifgdgdp
 
Europe in crisis mode students visiting brussels
Europe in crisis mode   students visiting brusselsEurope in crisis mode   students visiting brussels
Europe in crisis mode students visiting brusselsRobert Manchin
 
Prediksi un ipa 2013
Prediksi un ipa 2013Prediksi un ipa 2013
Prediksi un ipa 2013Hery Alazmy
 
Microfinance 090907122021-phpapp02
Microfinance 090907122021-phpapp02Microfinance 090907122021-phpapp02
Microfinance 090907122021-phpapp02manish435
 
Hay solución
Hay soluciónHay solución
Hay soluciónnenufar19
 
International recruitment project report
International recruitment project reportInternational recruitment project report
International recruitment project reportsarabethm
 
The good the bad and the ugly: how to design an effective survey
The good the bad and the ugly: how to design an effective surveyThe good the bad and the ugly: how to design an effective survey
The good the bad and the ugly: how to design an effective surveySiREN_WA
 
Livro dos Espíritos questao 179 Evangelho Cap 13 Item 3
Livro dos Espíritos questao 179 Evangelho Cap 13 Item 3Livro dos Espíritos questao 179 Evangelho Cap 13 Item 3
Livro dos Espíritos questao 179 Evangelho Cap 13 Item 3Patricia Farias
 
Beyond the Search in FamilySearch
Beyond the Search in FamilySearchBeyond the Search in FamilySearch
Beyond the Search in FamilySearchCarol Petranek
 
Magia en el internet
Magia en el internetMagia en el internet
Magia en el internetjoancarlosr
 
Educational Philosophy- an introduction
Educational Philosophy-  an introductionEducational Philosophy-  an introduction
Educational Philosophy- an introductionSupriya Prathapan
 

Viewers also liked (12)

mendesain pengujian substantif
mendesain pengujian substantifmendesain pengujian substantif
mendesain pengujian substantif
 
Europe in crisis mode students visiting brussels
Europe in crisis mode   students visiting brusselsEurope in crisis mode   students visiting brussels
Europe in crisis mode students visiting brussels
 
Prediksi un ipa 2013
Prediksi un ipa 2013Prediksi un ipa 2013
Prediksi un ipa 2013
 
Microfinance 090907122021-phpapp02
Microfinance 090907122021-phpapp02Microfinance 090907122021-phpapp02
Microfinance 090907122021-phpapp02
 
Hay solución
Hay soluciónHay solución
Hay solución
 
International recruitment project report
International recruitment project reportInternational recruitment project report
International recruitment project report
 
The good the bad and the ugly: how to design an effective survey
The good the bad and the ugly: how to design an effective surveyThe good the bad and the ugly: how to design an effective survey
The good the bad and the ugly: how to design an effective survey
 
Greenedek
GreenedekGreenedek
Greenedek
 
Livro dos Espíritos questao 179 Evangelho Cap 13 Item 3
Livro dos Espíritos questao 179 Evangelho Cap 13 Item 3Livro dos Espíritos questao 179 Evangelho Cap 13 Item 3
Livro dos Espíritos questao 179 Evangelho Cap 13 Item 3
 
Beyond the Search in FamilySearch
Beyond the Search in FamilySearchBeyond the Search in FamilySearch
Beyond the Search in FamilySearch
 
Magia en el internet
Magia en el internetMagia en el internet
Magia en el internet
 
Educational Philosophy- an introduction
Educational Philosophy-  an introductionEducational Philosophy-  an introduction
Educational Philosophy- an introduction
 

Similar to HTML5って必要?

Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Remy Sharp
 
Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02PL dream
 
JavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your codeJavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your codeLaurence Svekis ✔
 
HTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymoreHTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymoreRemy Sharp
 
The Future of CSS with Web components
The Future of CSS with Web componentsThe Future of CSS with Web components
The Future of CSS with Web componentsdevObjective
 
The Future of CSS with Web Components
The Future of CSS with Web ComponentsThe Future of CSS with Web Components
The Future of CSS with Web ComponentsColdFusionConference
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensionserwanl
 
Browsers with Wings
Browsers with WingsBrowsers with Wings
Browsers with WingsRemy Sharp
 
I wanted to change the cloudsrectangles into an actuall image it do.pdf
I wanted to change the cloudsrectangles into an actuall image it do.pdfI wanted to change the cloudsrectangles into an actuall image it do.pdf
I wanted to change the cloudsrectangles into an actuall image it do.pdffeelinggifts
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineRicardo Silva
 
HTML5 & The Open Web - at Nackademin
HTML5 & The Open Web -  at NackademinHTML5 & The Open Web -  at Nackademin
HTML5 & The Open Web - at NackademinRobert Nyman
 
Макс Грибов — Использование SpriteKit в неигровых приложениях
Макс Грибов — Использование SpriteKit в неигровых приложенияхМакс Грибов — Использование SpriteKit в неигровых приложениях
Макс Грибов — Использование SpriteKit в неигровых приложенияхCocoaHeads
 
codebits 2009 HTML5 JS APIs
codebits 2009 HTML5 JS APIscodebits 2009 HTML5 JS APIs
codebits 2009 HTML5 JS APIsRemy Sharp
 

Similar to HTML5って必要? (20)

Intro to HTML5
Intro to HTML5Intro to HTML5
Intro to HTML5
 
Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)Is HTML5 Ready? (workshop)
Is HTML5 Ready? (workshop)
 
Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02Is html5-ready-workshop-110727181512-phpapp02
Is html5-ready-workshop-110727181512-phpapp02
 
JavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your codeJavaScript Advanced - Useful methods to power up your code
JavaScript Advanced - Useful methods to power up your code
 
HTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymoreHTML5: where flash isn't needed anymore
HTML5: where flash isn't needed anymore
 
The Future of CSS with Web components
The Future of CSS with Web componentsThe Future of CSS with Web components
The Future of CSS with Web components
 
The Future of CSS with Web Components
The Future of CSS with Web ComponentsThe Future of CSS with Web Components
The Future of CSS with Web Components
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensions
 
Browsers with Wings
Browsers with WingsBrowsers with Wings
Browsers with Wings
 
Progressive What Apps?
Progressive What Apps?Progressive What Apps?
Progressive What Apps?
 
I wanted to change the cloudsrectangles into an actuall image it do.pdf
I wanted to change the cloudsrectangles into an actuall image it do.pdfI wanted to change the cloudsrectangles into an actuall image it do.pdf
I wanted to change the cloudsrectangles into an actuall image it do.pdf
 
Of class1
Of class1Of class1
Of class1
 
Event-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 EngineEvent-driven IO server-side JavaScript environment based on V8 Engine
Event-driven IO server-side JavaScript environment based on V8 Engine
 
Moustamera
MoustameraMoustamera
Moustamera
 
HTML5 & The Open Web - at Nackademin
HTML5 & The Open Web -  at NackademinHTML5 & The Open Web -  at Nackademin
HTML5 & The Open Web - at Nackademin
 
Макс Грибов — Использование SpriteKit в неигровых приложениях
Макс Грибов — Использование SpriteKit в неигровых приложенияхМакс Грибов — Использование SpriteKit в неигровых приложениях
Макс Грибов — Использование SpriteKit в неигровых приложениях
 
Shootting Game
Shootting GameShootting Game
Shootting Game
 
codebits 2009 HTML5 JS APIs
codebits 2009 HTML5 JS APIscodebits 2009 HTML5 JS APIs
codebits 2009 HTML5 JS APIs
 
Html5 For Jjugccc2009fall
Html5 For Jjugccc2009fallHtml5 For Jjugccc2009fall
Html5 For Jjugccc2009fall
 
#JavaFX.forReal()
#JavaFX.forReal()#JavaFX.forReal()
#JavaFX.forReal()
 

Recently uploaded

URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfUmakantAnnand
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 

Recently uploaded (20)

URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Concept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.CompdfConcept of Vouching. B.Com(Hons) /B.Compdf
Concept of Vouching. B.Com(Hons) /B.Compdf
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 

HTML5って必要?

  • 1. ZENER NET WORKS 2013/02/28 sanoh
  • 3.
  • 6.
  • 7.
  • 8.
  • 9. 課金 ストア ストア ストア 課金 課金 課金 ソーシャル グラフ リアル グラフ 利益 利益 利益 利益
  • 13. FLASH Java Silverlight HTML5 Ajax CSS JavaScrpt(JQuery,Json・・・) HTML HTTP XML Perl PHP(Cake,Zend) C#(ASP・・) MySQL SQL Azure Postgre Linux クラウド(Amazon,Azure・・・・)
  • 14. HTML5 JavaScrpt HTML
  • 16. Desktop iPhone Android2.3 IE9 FireFox Chrome Safari Safari Chrome 標準 FireFox 15.0.1 21.0 5.1.7 5.1 12 15.0.1 Canvas ○ ○ ○ ○ ○ ○ ○ ○ SVG ○ ○ ○ ○ ○ ○ ○ ○ Audio ○ ○ ○ ○ ○ ○ ○ ○ Video ○ ○ ○ ○ ○ ○ ○ ○ WebSocket X ○ ○ ○ ○ ○ X ○ WebWorker X ○ ○ ○ ○ ○ X ○ WebStrage ○ ○ ○ ○ - - - - WebGL X X ○ X X X X ○
  • 19. IE9 F12 Firefox Firebug(エクステンション) Safari Web Inspector Chrome Chromeデベロッパーツール VisualStudio2010 / WebMatrix2
  • 21. HTML5 HTML5 JavaScript(JQuery) JavaScript(JQuery) Apache CakePHP IIS MVC-3、4 PHP ASP.NET MySQL WindowsServer
  • 23. 4.1 表示 4.2 動きのある表示 4.3 色加算 4.4 パフォーマンス 4.5 Lib化 4.6 入力 4.7 ブラウザ互換 4.8 ページ遷移 4.9 バグの出にくいソース?
  • 25. <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"/> <title>Sample001.html</title> <script> function draw() { var canvas = document.getElementById("canvas1"); var c = canvas.getContext("2d"); } </script> </head> <body onload="draw()"> <canvas id="canvas1" width="300" height="300"></canvas> </body> </html>
  • 26. <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"/> <title>Sample002.html</title> <script> function draw() { var canvas = document.getElementById("canvas1"); var c = canvas.getContext("2d"); c.font = "38px 'MS Gothic'"; c.fillStyle = "#666666"; c.fillText("こんにちは", 100, 100); } </script> </head> <body onload="draw()"> <canvas id="canvas1" width="300" height="300"></canvas> </body> </html>
  • 27. : function draw() { var canvas = document.getElementById("canvas1"); var c = canvas.getContext("2d"); c.fillStyle = "#0099ff"; c.fillRect (15, 15, 50, 45); c.fillStyle = "rgba(0, 0, 200, 0.5)"; c.fillRect (30, 30, 50, 45); } :
  • 28. function draw() { var canvas = document.getElementById("canvas1"); var c = canvas.getContext("2d"); c.strokeStyle = "#ff9900"; c.beginPath(); c.arc(70, 70, 60, 0, Math.PI*2, false); c.stroke(); } function draw() { var canvas = document.getElementById("canvas1"); var c = canvas.getContext("2d"); c.fillStyle = "#990099"; c.beginPath(); c.arc(70, 70, 60, 0, Math.PI*2, false); c.fill(); }
  • 29. function draw() { var canvas = document.getElementById("canvas1"); var c = canvas.getContext("2d"); c.fillStyle = "#999999"; c.beginPath(); c.moveTo(10,10); c.lineTo(200,50); c.lineTo(100,120); c.closePath(); c.fill(); }
  • 30. function draw() { Onloadなので読み込み終 var canvas = document.getElementById("canvas1"); var c = canvas.getContext("2d"); 了してない var img = new Image(); img.src = "img/grand001.png"; c.drawImage(img, 0, 0); }
  • 31. function draw() { var canvas = document.getElementById("canvas1"); var c = canvas.getContext("2d"); var img = new Image(); img.src = "img/grand001.png"; c.drawImage(img, 0, 0, 640, 480); }
  • 32. function draw() { var canvas = document.getElementById("canvas1"); var c = canvas.getContext("2d"); var img = new Image(); img.src = "img/tree001.png"; c.drawImage(img, 10, 10, 64, 64, 100, 100, 128, 32); }
  • 33. <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"/> <title>Sample002.html</title> <script>//<![CDATA[ var timerInterval = 25; //25msec var timer1; var c; function draw() { } function init(){ var canvas = document.getElementById("canvas1"); c = canvas.getContext("2d"); timer1 = setInterval("draw()", timerInterval); } //]]></script> </head> <body onload="init()"> <canvas id="canvas1" width=“300" height=“300"></canvas> </body> </html>
  • 34. <script>//<![CDATA[ var timerInterval = 25; //25msec イメージの読み var timer1; var c; 込み終了を待つ var img; function draw() { } function init(){ var canvas = document.getElementById("canvas1"); c = canvas.getContext("2d"); img = new Image(); img.src = "img/grand001.png"; img.onload = function(){ draw(); timer1 = setInterval("draw()", timerInterval); } } //]]></script>
  • 35. <script>//<![CDATA[ var timerInterval = 25; //25msec var timer1; var c; var img; var angle = 3; function draw() { c.fillStyle = "#c0c0c0"; c.fillRect (0, 0, 300, 300); c.rotate(angle * Math.PI / 180); c.drawImage(img, 0, 0); } function init(){ var canvas = document.getElementById("canvas1"); c = canvas.getContext("2d"); img = new Image(); img.src = "img/grand001.png"; img.onload = function(){ draw(); timer1 = setInterval("draw()", timerInterval); } } //]]></script>
  • 36.
  • 37. <script> function Draw(){ Var draw; draw.clearRect(0, 0, windWidth, windHeight); Var img; draw.fillStyle = "#000000"; Var partX; draw.fillRect(0, 0, windWidth, windHeight); Var partY; Var partAX; Var partAY; draw.globalCompositeOperation = "lighter"; for( var i = 0 ; i < partX.length ; i++ ){ function init() { draw.drawImage(img, partX[i], partY[i]); var max = 60; //----------------------------------------- var outputcanvas = document.getElementById("canvas1"); partX[i] += partAX[ i ]; var ang; if( partX[i] < -128 ) partAX[i] = -partAX[i]; per = new Performance(); if( partX[i] > windWidth-128 ) draw = outputcanvas.getContext("2d"); partAX[i] = -partAX[i]; setInterval(“Draw()", 16.7); partY[i] += partAY[ i ]; windWidth = outputcanvas.width; windHeight = outputcanvas.height; if( partY[i] < -128 ) //-------------------------------------- partAY[i] = -partAY[i]; img = new Image(); if( partY[i] > windHeight-128 ) img.src = "../img/ball.png"; partAY[i] = -partAY[i]; //-------------------------------------- } partX = Array( max ); draw.globalCompositeOperation = "source-over"; partY = Array( max ); partAX = Array( max ); } partAY = Array( max ); for( var i = 0 ; i < max ; i++ ){ </script> partX[i] = Math.random() * (windWidth-128); </head> partY[i] = Math.random() * (windHeight-128); <body onload="init()"> Ang = Math.random() * Math.PI * 2; partAX[i] = Math.sin( ang ); <canvas id="canvas1" width="640" height="400"></canvas> partAY[i] = Math.sin( ang ); </body> } </html> }
  • 38.
  • 39. <script language="JavaScript“ src="./Performance.js"></script> function Performance(){ this.startTime = new Date(); var per; this.endTime = new Date(); this.fpsTime = 0; function init() { this.Start = function(){ per = new Performance(); this.startTime = new Date(); this.fpsTime = this.startTime - this.endTime; this.endTime = this.startTime; } function Draw(){ this.GetFPS = function( fr ){ var fps; return Math.min(Math.floor(1000/this.fpsTime), fr ) per.Start(); } fps = per.GetFPS(60); } : 描画 draw.font = "128px 'MS Gothic'"; draw.fillStyle = "#ff0000"; draw.fillText("FPS="+fps, 100, 150); }
  • 40.
  • 41. Var Glib = function(name){ this.DrawPolygon3 = function( x1, y1, x2, y2, x3, y3 ){ this.canvas = document.getElementById(name); this.g.beginPath(); this.g = this.canvas.getContext("2d"); this.g.moveTo(x1,y1); this.canvasW = this.canvas.width; this.g.lineTo(x2,y2); this.canvasH = this.canvas.height; this.g.lineTo(x3,y3); this.g.lineWidth = 1; this.g.closePath(); this.Cls = function() { this.g.fill(); this.g.clearRect(0, 0, this.canvasW, this.canvasH); } this.Push(); this.DrawPolygon3 = function( x1, y1, x2, y2, x3, y3, s ){ } this.g.fillStyle = s; this.Cls = function(s) { this.g.beginPath(); this.g.fillStyle = s; this.g.moveTo(x1,y1); this.g.fillRect(0, 0, this.canvasW, this.canvasH); this.g.lineTo(x2,y2); this.Push(); this.g.lineTo(x3,y3); } this.g.closePath(); this.Draw = function() { this.g.fill(); this.Pop(); } } this.DrawPolygon4 = function( x1, y1, x2, y2, x3, y3, x4, y4 ){ this.SetColor = function( s ){ this.g.beginPath(); this.g.fillStyle = s; this.g.moveTo(x1,y1); } this.g.lineTo(x2,y2); this.DrawBox = function( x, y, w, h ){ this.g.lineTo(x3,y3); this.g.fillRect ( x, y, w, h); this.g.lineTo(x4,y4); } this.g.closePath(); this.DrawBox = function( x, y, w, h, s ){ this.g.fill(); this.g.fillStyle = s; } this.g.fillRect ( x, y, w, h); this.DrawPolygon4 = function( x1, y1, x2, y2, x3, y3, x4, y4, s ){ } this.g.fillStyle = s; this.DrawLine = function( x1, y1, x2, y2 ){ this.g.beginPath(); this.g.lineWidth = 2; this.g.moveTo(x1,y1); this.g.beginPath(); this.g.lineTo(x2,y2); this.g.moveTo(x1,y1); this.g.lineTo(x3,y3); this.g.lineTo(x2,y2); this.g.lineTo(x4,y4); this.g.closePath(); this.g.closePath(); this.g.stroke(); this.g.fill(); } } this.DrawLine = function( x1, y1, x2, y2, s ){ this.g.strokeStyle = s; this.g.beginPath(); this.g.moveTo(x1,y1); this.g.lineTo(x2,y2); this.g.closePath(); this.g.stroke(); }
  • 42. this.DrawImage = function( img, x, y ){ this.g.drawImage(img, x, y); } this.DrawImage4 = function( img, x, y, w, h ){ this.g.drawImage(img, x, y, w, h); } this.DrawImageObj = function( img, sx, sy, sw, sh ){ this.g.drawImage(img, sx, sy, sw, sh, 0, 0, sw, sh); } this.DrawImage6 = function( img, sx, sy, sw, sh, x, y){ this.g.drawImage(img, sx, sy, sw, sh, x, y, sw, sh); } this.DrawImage8 = function( img, sx, sy, sw, sh, x, y, w, h ){ this.g.drawImage(img, sx, sy, sw, sh, x, y, w, h); } this.Pos = function( x, y ){ this.g.translate( x, y ); } this.Ang = function( a ){ this.g.rotate( a ) } this.Push = function(){ this.g.save(); } this.Pop = function(){ this.g.restore(); } };
  • 43. <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> Lib化して楽しよう <meta charset="utf-8"/> <title>Test</title> <script language="JavaScript" src="./Glib.js"></script> <script>//<![CDATA[ var timerInterval = 16.7; Var g; var imgTmy; function draw() { g.Cls("#0000ff"); g.DrawImage( imgTmy, 40, 40); g.DrawLine( 0, 0, 250, 200, "#00ffff"); g.Draw(); } function init(){ g = new Glib( "canvas1"); setInterval("draw()", timerInterval); imgTmy = new Image(); imgTmy.src = "./grand001.png"; } //]]></script> </head> <body onload="init()"> <canvas id="canvas1" width="300" height="300"></canvas> </body> </html>
  • 44.
  • 46. <script>//<![CDATA[ window.document.onkeydown = click_down; イベントでキャッチ window.document.onkeyup = click_up; function click_down() { if( event.keyCode == 37 ) my_add_x = 256*2; if( event.keyCode == 39 ) my_add_x =-256*2; } function click_up() { if( event.keyCode == 37 ) my_add_x = 0; if( event.keyCode == 39 ) my_addx = 0; } //]]></script>
  • 47. function myGetBrowser(){ myOP = (navigator.userAgent.indexOf("Opera",0) != -1)?1:0; //OP myN6 = document.getElementById; // N6 or IE myIE myN4 = document.all; = document.layers; // IE // N4 昔はブラウザ依存を if (myOP){ // OP? document.onmousemove = myMoveOP; }else if (myIE){ // IE? 気負つける必要が document.onmousemove = myMoveIE; }else if (myN6){ // N6? window.addEventListener("mousemove",myMoveN6,true); }else if (myN4){ // N4? あった。 window.captureEvents(Event.MOUSEMOVE); window.onmousemove = myMoveN4; } document.addEventListener("touchstart", touchHandler, false); document.addEventListener("touchmove", touchHandler, false); document.addEventListener("touchend", touchHandler, false); } function touchHandler(event) { Xpos = event.touches[0].pageX; Ypos = event.touches[0].pageY; Catch(); } function myMoveOP(){ // OPŃ}EX Xpos = window.event.clientX; Ypos = window.event.clientY; Catch(); } function myMoveN6(myEvent){ // N6Ń}EX Xpos = myEvent.clientX + window.pageXOffset; Ypos = myEvent.clientY + window.pageYOffset; Catch(); } function myMoveIE(){ // IEŃ}EX Xpos = window.event.clientX + document.body.scrollLeft; Ypos = window.event.clientY + document.body.scrollTop; Catch(); } function myMoveN4(myEvent){ // N4Ń}EX Xpos = myEvent.x; Ypos = myEvent.y; Catch(); }
  • 48. JQuery Googleを使う <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"> </script>
  • 49. ページ切り替え 中身切り替え <body> <div id="MainFrame"> </body> </html>
  • 50. var命令による変数宣言は省略しない 比較演算子は「==」ではなく「===」を 配列の生成にはリテラルを使う 中括弧は省略しない 文の途中の改行に要注意 http://blog.livedoor.jp/ryo511-web/archives/13577395.html
  • 56. Mail: sanoh@zener.co.jp Blog: http://d.hatena.ne.jp/sanoh/ (ポリゴン魂) Facebook: 佐野 浩章 Twitter: sanoh00