最近"WebGL 文字列"で検索される方が多いのでデモを紹介いたします. 単純な例ですとHTMLCanvasElementの下にHTMLElementをつくってしまえばOKです. Khronos.orgのDemo Repositoryに例(SpinningBox)があります. このソースの以下の部分ですね. <style type="text/css"> canvas { //border: 2px solid black; } .text { position:absolute; top:100px; left:20px; font-size:2em; color: blue; } </style> </head> <body onload="start()"> <canvas id="example"> If you're seeing this your web browser do
構文 context . fillText(text, x, y [, maxWidth ] ) context . strokeText(text, x, y [, maxWidth ] ) 指定のテキストを指定の位置に、塗りつぶす、または、(個々に)輪郭描画します。最大幅が与えられると、そのテキストは必要に応じてそれにフィットするよう伸縮されるでしょう。 仕様 fillText() と strokeText() メソッドには、 text, x, y そして任意で maxWidth の3つ、もしくは4つの引数を与えます。そして、指定された text が指定された座標 (x, y) にレンダリングされます。もし maxWidth が引数に指定された場合は、それより決して横幅が広くならないようにレンダリングされます。 レンダリングの際には、現在の font, textAlign, textB
The WebGL repository contains a number of demos that highlight WebGL functionality. The following table shows these demos and whether they are known to run in the current builds of WebGL-capable browsers. It may be out of date at any time; if in doubt, just try it! You can check out the source code for all of these demos via Git: git clone https://github.com/KhronosGroup/WebGL.git Test Originator
Chrome Experiments is a showcase of work by coders who are pushing the boundaries of web technology, creating beautiful, unique web experiences. You'll find helpful links throughout the site for creating your own experiments, and you can also explore resources like WebGL Globe and our workshop of tools.
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く