mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-27 04:08:53 +01:00
Modify styles
This commit is contained in:
parent
189445a472
commit
b2055e3719
@ -1,5 +1,20 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
{{comment .License}}
|
{{comment .License}}
|
||||||
|
<style>
|
||||||
|
table.examples td {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
table.examples td.code {
|
||||||
|
border-color: #999;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 1px;
|
||||||
|
}
|
||||||
|
table.examples td.code pre {
|
||||||
|
height: 240px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
<h1>Ebiten (海老天) v1.0.0-alpha</h1>
|
<h1>Ebiten (海老天) v1.0.0-alpha</h1>
|
||||||
<ul>
|
<ul>
|
||||||
<li>A simple 2D game library in Go</li>
|
<li>A simple 2D game library in Go</li>
|
||||||
@ -21,10 +36,12 @@
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2>Example</h2>
|
<h2>Example</h2>
|
||||||
<table>
|
<table class="examples">
|
||||||
{{range .Examples}}
|
{{range .Examples}}
|
||||||
<tr>
|
<tr>
|
||||||
<td><pre><code>{{.Source}}</code></pre></td>
|
<td class="code"><pre><code>// <b>{{.Name}}</b>
|
||||||
|
|
||||||
|
{{.Source}}</code></pre></td>
|
||||||
<td><img src="{{.Name}}.gif" width="320" height="240"></td>
|
<td><img src="{{.Name}}.gif" width="320" height="240"></td>
|
||||||
</tr>
|
</tr>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -12,6 +12,21 @@ distributed under the License is distributed on an "AS IS" BASIS,
|
|||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.-->
|
limitations under the License.-->
|
||||||
|
<style>
|
||||||
|
table.examples td {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
table.examples td.code {
|
||||||
|
border-color: #999;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 1px;
|
||||||
|
}
|
||||||
|
table.examples td.code pre {
|
||||||
|
height: 240px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
<h1>Ebiten (海老天) v1.0.0-alpha</h1>
|
<h1>Ebiten (海老天) v1.0.0-alpha</h1>
|
||||||
<ul>
|
<ul>
|
||||||
<li>A simple 2D game library in Go</li>
|
<li>A simple 2D game library in Go</li>
|
||||||
@ -33,10 +48,12 @@ limitations under the License.-->
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2>Example</h2>
|
<h2>Example</h2>
|
||||||
<table>
|
<table class="examples">
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><pre><code>package main
|
<td class="code"><pre><code>// <b>hue</b>
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/hajimehoshi/ebiten"
|
"github.com/hajimehoshi/ebiten"
|
||||||
@ -59,10 +76,10 @@ var (
|
|||||||
func update(screen *ebiten.Image) error {
|
func update(screen *ebiten.Image) error {
|
||||||
count++
|
count++
|
||||||
w, h := gophersImage.Size()
|
w, h := gophersImage.Size()
|
||||||
geo := ebiten.TranslateGeo(float64(screenWidth - w)/2, float64(screenHeight - h) / 2)
|
geo := ebiten.TranslateGeo(float64(screenWidth-w)/2, float64(screenHeight-h)/2)
|
||||||
clr := ebiten.RotateHue(float64(count%360) * 2 * math.Pi / 360)
|
clr := ebiten.RotateHue(float64(count%360) * 2 * math.Pi / 360)
|
||||||
if err := screen.DrawImage(gophersImage, &ebiten.DrawImageOptions{
|
if err := screen.DrawImage(gophersImage, &ebiten.DrawImageOptions{
|
||||||
GeoM: geo,
|
GeoM: geo,
|
||||||
ColorM: clr,
|
ColorM: clr,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -85,7 +102,9 @@ func main() {
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><pre><code>package main
|
<td class="code"><pre><code>// <b>mosaic</b>
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/hajimehoshi/ebiten"
|
"github.com/hajimehoshi/ebiten"
|
||||||
@ -136,7 +155,9 @@ func main() {
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><pre><code>package main
|
<td class="code"><pre><code>// <b>perspective</b>
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/hajimehoshi/ebiten"
|
"github.com/hajimehoshi/ebiten"
|
||||||
@ -191,7 +212,9 @@ func main() {
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><pre><code>package main
|
<td class="code"><pre><code>// <b>rotate</b>
|
||||||
|
|
||||||
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/hajimehoshi/ebiten"
|
"github.com/hajimehoshi/ebiten"
|
||||||
|
Loading…
Reference in New Issue
Block a user