mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
doc: Pass W3C validator
This commit is contained in:
parent
4a13267590
commit
f36aae4275
@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../scripts/force-https.js"></script>
|
||||
<link rel="shortcut icon" href="../favicon.png" type="image/png" >
|
||||
<link rel="icon" href="../favicon.png" type="image/png" >
|
||||
<title>Ebiten example - {{.Example.Name}}</title>
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="../stylesheets/ebiten.css">
|
||||
@ -23,7 +25,7 @@
|
||||
{{with .Example}}
|
||||
<h2>Ebiten example - {{.Name}}</h2>
|
||||
<iframe src="{{.Name}}.content.html" width="{{.Width}}" height="{{.Height}}"></iframe>
|
||||
<pre class="card"><div class="card-body"><code class="language-go">{{.Source}}</code></div></pre>
|
||||
<div class="card"><pre class="card-body"><code class="language-go">{{.Source}}</code></pre></div>
|
||||
{{end}}
|
||||
</div></main>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
@ -26,4 +27,5 @@ window.addEventListener('load', function() {
|
||||
document.body.appendChild(s);
|
||||
});
|
||||
</script>
|
||||
<title>(Example)</title>
|
||||
<p id="notice" style="color: white;">Now Loading...</p>
|
||||
|
@ -1,9 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="./scripts/force-https.js"></script>
|
||||
<meta name="description" content="Ebiten - A simple 2D game library in Go">
|
||||
<link rel="shortcut icon" href="./favicon.png" type="image/png">
|
||||
<link rel="icon" href="./favicon.png" type="image/png">
|
||||
<title>Ebiten - A simple 2D game library in Go</title>
|
||||
|
||||
<link rel="stylesheet" href="./stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="./stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="./stylesheets/ebiten.css">
|
||||
@ -59,16 +61,16 @@
|
||||
<div class="row">
|
||||
{{range .Examples -}}
|
||||
<div class="col-3">
|
||||
<a scrolling="no" href="examples/{{.Name}}.html"><img src="images/examples/{{.Name}}.png" width="{{.ThumbWidth}}" height="{{.ThumbHeight}}" alt="Ebiten example: {{.Name}}" class="img-thumbnail example"></a>
|
||||
<a href="examples/{{.Name}}.html"><img src="images/examples/{{.Name}}.png" width="{{.ThumbWidth}}" height="{{.ThumbHeight}}" alt="Ebiten example: {{.Name}}" class="img-thumbnail example"></a>
|
||||
</div>
|
||||
{{- end}}
|
||||
</div>
|
||||
<p><a href="https://blog.golang.org/go-programming-language-turns-two">The Gopher photographs by Chris Nokleberg</a> are licensed under <a href="https://creativecommons.org/licenses/by/3.0/">the Creative Commons 3.0 Attributions License</a>.</p>
|
||||
|
||||
<h3>Execute the examples</h2>
|
||||
<pre class="card"><div class="card-body"><code class="language-bash">go get github.com/hajimehoshi/ebiten/...
|
||||
<h3>Execute the examples</h3>
|
||||
<div class="card"><pre class="card-body"><code class="language-bash">go get github.com/hajimehoshi/ebiten/...
|
||||
cd $GOPATH/src/github.com/hajimehoshi/ebiten/examples
|
||||
go run -tags=example rotate/main.go</div></code></pre>
|
||||
go run -tags=example rotate/main.go</code></pre></div>
|
||||
<p>Note that you need to add <code>-tags=example</code> to run examples.</p>
|
||||
|
||||
<h2 id="getting-started">Getting Started</h2>
|
||||
@ -78,7 +80,7 @@ First create a new directory (<code>mkdir hello_world</code>), and change
|
||||
into it (<code>cd hello_world</code>). Type the following code into
|
||||
the <code>main.go</code> file:</p>
|
||||
|
||||
<pre class="card"><div class="card-body"><code class="language-go">package main
|
||||
<div class="card"><pre class="card-body"><code class="language-go">package main
|
||||
|
||||
import (
|
||||
"github.com/hajimehoshi/ebiten"
|
||||
@ -93,7 +95,7 @@ func update(screen *ebiten.Image) error {
|
||||
func main() {
|
||||
ebiten.Run(update, 320, 240, 2, "Hello world!")
|
||||
}
|
||||
</div></code></pre>
|
||||
</code></pre></div>
|
||||
|
||||
<p>Run the <code>go run</code> command to start the
|
||||
game. There you have it, your first Ebiten game!</p>
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
@ -26,4 +27,5 @@ window.addEventListener('load', function() {
|
||||
document.body.appendChild(s);
|
||||
});
|
||||
</script>
|
||||
<title>(Example)</title>
|
||||
<p id="notice" style="color: white;">Now Loading...</p>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../scripts/force-https.js"></script>
|
||||
<link rel="shortcut icon" href="../favicon.png" type="image/png" >
|
||||
<link rel="icon" href="../favicon.png" type="image/png" >
|
||||
<title>Ebiten example - 2048</title>
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="../stylesheets/ebiten.css">
|
||||
@ -23,7 +25,7 @@
|
||||
|
||||
<h2>Ebiten example - 2048</h2>
|
||||
<iframe src="2048.content.html" width="420" height="600"></iframe>
|
||||
<pre class="card"><div class="card-body"><code class="language-go">// Please read examples/2048/main.go and examples/2048/2048/*.go</code></div></pre>
|
||||
<div class="card"><pre class="card-body"><code class="language-go">// Please read examples/2048/main.go and examples/2048/2048/*.go</code></pre></div>
|
||||
|
||||
</div></main>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
@ -26,4 +27,5 @@ window.addEventListener('load', function() {
|
||||
document.body.appendChild(s);
|
||||
});
|
||||
</script>
|
||||
<title>(Example)</title>
|
||||
<p id="notice" style="color: white;">Now Loading...</p>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../scripts/force-https.js"></script>
|
||||
<link rel="shortcut icon" href="../favicon.png" type="image/png" >
|
||||
<link rel="icon" href="../favicon.png" type="image/png" >
|
||||
<title>Ebiten example - alphablending</title>
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="../stylesheets/ebiten.css">
|
||||
@ -23,7 +25,7 @@
|
||||
|
||||
<h2>Ebiten example - alphablending</h2>
|
||||
<iframe src="alphablending.content.html" width="640" height="480"></iframe>
|
||||
<pre class="card"><div class="card-body"><code class="language-go">// +build example
|
||||
<div class="card"><pre class="card-body"><code class="language-go">// +build example
|
||||
|
||||
package main
|
||||
|
||||
@ -82,7 +84,7 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
</code></div></pre>
|
||||
</code></pre></div>
|
||||
|
||||
</div></main>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
@ -26,4 +27,5 @@ window.addEventListener('load', function() {
|
||||
document.body.appendChild(s);
|
||||
});
|
||||
</script>
|
||||
<title>(Example)</title>
|
||||
<p id="notice" style="color: white;">Now Loading...</p>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../scripts/force-https.js"></script>
|
||||
<link rel="shortcut icon" href="../favicon.png" type="image/png" >
|
||||
<link rel="icon" href="../favicon.png" type="image/png" >
|
||||
<title>Ebiten example - audio</title>
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="../stylesheets/ebiten.css">
|
||||
@ -23,7 +25,7 @@
|
||||
|
||||
<h2>Ebiten example - audio</h2>
|
||||
<iframe src="audio.content.html" width="640" height="480"></iframe>
|
||||
<pre class="card"><div class="card-body"><code class="language-go">// +build example
|
||||
<div class="card"><pre class="card-body"><code class="language-go">// +build example
|
||||
|
||||
// This is an example to implement an audio player.
|
||||
// See examples/wav for a simpler example to play a sound file.
|
||||
@ -54,18 +56,10 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
playerBarImage *ebiten.Image
|
||||
playerCurrentImage *ebiten.Image
|
||||
playerBarColor = color.RGBA{0x80, 0x80, 0x80, 0xff}
|
||||
playerCurrentColor = color.RGBA{0xff, 0xff, 0xff, 0xff}
|
||||
)
|
||||
|
||||
func init() {
|
||||
playerBarImage, _ = ebiten.NewImage(300, 4, ebiten.FilterNearest)
|
||||
playerBarImage.Fill(&color.RGBA{0x80, 0x80, 0x80, 0xff})
|
||||
|
||||
playerCurrentImage, _ = ebiten.NewImage(4, 10, ebiten.FilterNearest)
|
||||
playerCurrentImage.Fill(&color.RGBA{0xff, 0xff, 0xff, 0xff})
|
||||
}
|
||||
|
||||
type Input struct {
|
||||
mouseButtonStates map[ebiten.MouseButton]int
|
||||
keyStates map[ebiten.Key]int
|
||||
@ -114,7 +108,7 @@ var (
|
||||
)
|
||||
|
||||
func playerBarRect() (x, y, w, h int) {
|
||||
w, h = playerBarImage.Size()
|
||||
w, h = 300, 4
|
||||
x = (screenWidth - w) / 2
|
||||
y = screenHeight - h - 16
|
||||
return
|
||||
@ -256,10 +250,10 @@ func (p *Player) close() error {
|
||||
}
|
||||
|
||||
func (p *Player) draw(screen *ebiten.Image) {
|
||||
op := &ebiten.DrawImageOptions{}
|
||||
// Bar
|
||||
x, y, w, h := playerBarRect()
|
||||
op.GeoM.Translate(float64(x), float64(y))
|
||||
screen.DrawImage(playerBarImage, op)
|
||||
ebitenutil.DrawRect(screen, float64(x), float64(y), float64(w), float64(h), playerBarColor)
|
||||
|
||||
currentTimeStr := "00:00"
|
||||
|
||||
// Current Time
|
||||
@ -268,13 +262,11 @@ func (p *Player) draw(screen *ebiten.Image) {
|
||||
s := (c / time.Second) % 60
|
||||
currentTimeStr = fmt.Sprintf("%02d:%02d", m, s)
|
||||
|
||||
// Bar
|
||||
cw, ch := playerCurrentImage.Size()
|
||||
// Cursor
|
||||
cw, ch := 4, 10
|
||||
cx := int(time.Duration(w)*c/p.total) + x - cw/2
|
||||
cy := y - (ch-h)/2
|
||||
op = &ebiten.DrawImageOptions{}
|
||||
op.GeoM.Translate(float64(cx), float64(cy))
|
||||
screen.DrawImage(playerCurrentImage, op)
|
||||
ebitenutil.DrawRect(screen, float64(cx), float64(cy), float64(cw), float64(ch), playerCurrentColor)
|
||||
|
||||
msg := fmt.Sprintf(`FPS: %0.2f
|
||||
Press S to toggle Play/Pause
|
||||
@ -315,7 +307,7 @@ func main() {
|
||||
}
|
||||
}
|
||||
}
|
||||
</code></div></pre>
|
||||
</code></pre></div>
|
||||
|
||||
</div></main>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
@ -26,4 +27,5 @@ window.addEventListener('load', function() {
|
||||
document.body.appendChild(s);
|
||||
});
|
||||
</script>
|
||||
<title>(Example)</title>
|
||||
<p id="notice" style="color: white;">Now Loading...</p>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../scripts/force-https.js"></script>
|
||||
<link rel="shortcut icon" href="../favicon.png" type="image/png" >
|
||||
<link rel="icon" href="../favicon.png" type="image/png" >
|
||||
<title>Ebiten example - blocks</title>
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="../stylesheets/ebiten.css">
|
||||
@ -23,8 +25,8 @@
|
||||
|
||||
<h2>Ebiten example - blocks</h2>
|
||||
<iframe src="blocks.content.html" width="512" height="480"></iframe>
|
||||
<pre class="card"><div class="card-body"><code class="language-go">// Please read examples/blocks/main.go and examples/blocks/blocks/*.go
|
||||
// NOTE: If Gamepad API is available in your browswer, you can use gamepads. Try it out!</code></div></pre>
|
||||
<div class="card"><pre class="card-body"><code class="language-go">// Please read examples/blocks/main.go and examples/blocks/blocks/*.go
|
||||
// NOTE: If Gamepad API is available in your browswer, you can use gamepads. Try it out!</code></pre></div>
|
||||
|
||||
</div></main>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
@ -26,4 +27,5 @@ window.addEventListener('load', function() {
|
||||
document.body.appendChild(s);
|
||||
});
|
||||
</script>
|
||||
<title>(Example)</title>
|
||||
<p id="notice" style="color: white;">Now Loading...</p>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../scripts/force-https.js"></script>
|
||||
<link rel="shortcut icon" href="../favicon.png" type="image/png" >
|
||||
<link rel="icon" href="../favicon.png" type="image/png" >
|
||||
<title>Ebiten example - font</title>
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="../stylesheets/ebiten.css">
|
||||
@ -23,7 +25,7 @@
|
||||
|
||||
<h2>Ebiten example - font</h2>
|
||||
<iframe src="font.content.html" width="640" height="480"></iframe>
|
||||
<pre class="card"><div class="card-body"><code class="language-go">// +build example
|
||||
<div class="card"><pre class="card-body"><code class="language-go">// +build example
|
||||
|
||||
package main
|
||||
|
||||
@ -174,7 +176,7 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
</code></div></pre>
|
||||
</code></pre></div>
|
||||
|
||||
</div></main>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
@ -26,4 +27,5 @@ window.addEventListener('load', function() {
|
||||
document.body.appendChild(s);
|
||||
});
|
||||
</script>
|
||||
<title>(Example)</title>
|
||||
<p id="notice" style="color: white;">Now Loading...</p>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../scripts/force-https.js"></script>
|
||||
<link rel="shortcut icon" href="../favicon.png" type="image/png" >
|
||||
<link rel="icon" href="../favicon.png" type="image/png" >
|
||||
<title>Ebiten example - gamepad</title>
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="../stylesheets/ebiten.css">
|
||||
@ -23,7 +25,7 @@
|
||||
|
||||
<h2>Ebiten example - gamepad</h2>
|
||||
<iframe src="gamepad.content.html" width="640" height="480"></iframe>
|
||||
<pre class="card"><div class="card-body"><code class="language-go">// +build example
|
||||
<div class="card"><pre class="card-body"><code class="language-go">// +build example
|
||||
|
||||
package main
|
||||
|
||||
@ -79,7 +81,7 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
</code></div></pre>
|
||||
</code></pre></div>
|
||||
|
||||
</div></main>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
@ -26,4 +27,5 @@ window.addEventListener('load', function() {
|
||||
document.body.appendChild(s);
|
||||
});
|
||||
</script>
|
||||
<title>(Example)</title>
|
||||
<p id="notice" style="color: white;">Now Loading...</p>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../scripts/force-https.js"></script>
|
||||
<link rel="shortcut icon" href="../favicon.png" type="image/png" >
|
||||
<link rel="icon" href="../favicon.png" type="image/png" >
|
||||
<title>Ebiten example - hsv</title>
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="../stylesheets/ebiten.css">
|
||||
@ -23,7 +25,7 @@
|
||||
|
||||
<h2>Ebiten example - hsv</h2>
|
||||
<iframe src="hsv.content.html" width="640" height="480"></iframe>
|
||||
<pre class="card"><div class="card-body"><code class="language-go">// +build example
|
||||
<div class="card"><pre class="card-body"><code class="language-go">// +build example
|
||||
|
||||
package main
|
||||
|
||||
@ -114,7 +116,7 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
</code></div></pre>
|
||||
</code></pre></div>
|
||||
|
||||
</div></main>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
@ -26,4 +27,5 @@ window.addEventListener('load', function() {
|
||||
document.body.appendChild(s);
|
||||
});
|
||||
</script>
|
||||
<title>(Example)</title>
|
||||
<p id="notice" style="color: white;">Now Loading...</p>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../scripts/force-https.js"></script>
|
||||
<link rel="shortcut icon" href="../favicon.png" type="image/png" >
|
||||
<link rel="icon" href="../favicon.png" type="image/png" >
|
||||
<title>Ebiten example - hue</title>
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="../stylesheets/ebiten.css">
|
||||
@ -23,7 +25,7 @@
|
||||
|
||||
<h2>Ebiten example - hue</h2>
|
||||
<iframe src="hue.content.html" width="640" height="480"></iframe>
|
||||
<pre class="card"><div class="card-body"><code class="language-go">// +build example
|
||||
<div class="card"><pre class="card-body"><code class="language-go">// +build example
|
||||
|
||||
package main
|
||||
|
||||
@ -69,7 +71,7 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
</code></div></pre>
|
||||
</code></pre></div>
|
||||
|
||||
</div></main>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
@ -26,4 +27,5 @@ window.addEventListener('load', function() {
|
||||
document.body.appendChild(s);
|
||||
});
|
||||
</script>
|
||||
<title>(Example)</title>
|
||||
<p id="notice" style="color: white;">Now Loading...</p>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../scripts/force-https.js"></script>
|
||||
<link rel="shortcut icon" href="../favicon.png" type="image/png" >
|
||||
<link rel="icon" href="../favicon.png" type="image/png" >
|
||||
<title>Ebiten example - infinitescroll</title>
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="../stylesheets/ebiten.css">
|
||||
@ -23,7 +25,7 @@
|
||||
|
||||
<h2>Ebiten example - infinitescroll</h2>
|
||||
<iframe src="infinitescroll.content.html" width="640" height="480"></iframe>
|
||||
<pre class="card"><div class="card-body"><code class="language-go">// +build example
|
||||
<div class="card"><pre class="card-body"><code class="language-go">// +build example
|
||||
|
||||
package main
|
||||
|
||||
@ -132,7 +134,7 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
</code></div></pre>
|
||||
</code></pre></div>
|
||||
|
||||
</div></main>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
@ -26,4 +27,5 @@ window.addEventListener('load', function() {
|
||||
document.body.appendChild(s);
|
||||
});
|
||||
</script>
|
||||
<title>(Example)</title>
|
||||
<p id="notice" style="color: white;">Now Loading...</p>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../scripts/force-https.js"></script>
|
||||
<link rel="shortcut icon" href="../favicon.png" type="image/png" >
|
||||
<link rel="icon" href="../favicon.png" type="image/png" >
|
||||
<title>Ebiten example - keyboard</title>
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="../stylesheets/ebiten.css">
|
||||
@ -23,7 +25,7 @@
|
||||
|
||||
<h2>Ebiten example - keyboard</h2>
|
||||
<iframe src="keyboard.content.html" width="640" height="480"></iframe>
|
||||
<pre class="card"><div class="card-body"><code class="language-go">// +build example
|
||||
<div class="card"><pre class="card-body"><code class="language-go">// +build example
|
||||
|
||||
package main
|
||||
|
||||
@ -134,7 +136,7 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
</code></div></pre>
|
||||
</code></pre></div>
|
||||
|
||||
</div></main>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
@ -26,4 +27,5 @@ window.addEventListener('load', function() {
|
||||
document.body.appendChild(s);
|
||||
});
|
||||
</script>
|
||||
<title>(Example)</title>
|
||||
<p id="notice" style="color: white;">Now Loading...</p>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../scripts/force-https.js"></script>
|
||||
<link rel="shortcut icon" href="../favicon.png" type="image/png" >
|
||||
<link rel="icon" href="../favicon.png" type="image/png" >
|
||||
<title>Ebiten example - life</title>
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="../stylesheets/ebiten.css">
|
||||
@ -23,7 +25,7 @@
|
||||
|
||||
<h2>Ebiten example - life</h2>
|
||||
<iframe src="life.content.html" width="640" height="480"></iframe>
|
||||
<pre class="card"><div class="card-body"><code class="language-go">// +build example
|
||||
<div class="card"><pre class="card-body"><code class="language-go">// +build example
|
||||
|
||||
package main
|
||||
|
||||
@ -184,7 +186,7 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
</code></div></pre>
|
||||
</code></pre></div>
|
||||
|
||||
</div></main>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
@ -26,4 +27,5 @@ window.addEventListener('load', function() {
|
||||
document.body.appendChild(s);
|
||||
});
|
||||
</script>
|
||||
<title>(Example)</title>
|
||||
<p id="notice" style="color: white;">Now Loading...</p>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../scripts/force-https.js"></script>
|
||||
<link rel="shortcut icon" href="../favicon.png" type="image/png" >
|
||||
<link rel="icon" href="../favicon.png" type="image/png" >
|
||||
<title>Ebiten example - masking</title>
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="../stylesheets/ebiten.css">
|
||||
@ -23,7 +25,7 @@
|
||||
|
||||
<h2>Ebiten example - masking</h2>
|
||||
<iframe src="masking.content.html" width="640" height="480"></iframe>
|
||||
<pre class="card"><div class="card-body"><code class="language-go">// +build example
|
||||
<div class="card"><pre class="card-body"><code class="language-go">// +build example
|
||||
|
||||
package main
|
||||
|
||||
@ -136,7 +138,7 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
</code></div></pre>
|
||||
</code></pre></div>
|
||||
|
||||
</div></main>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
@ -26,4 +27,5 @@ window.addEventListener('load', function() {
|
||||
document.body.appendChild(s);
|
||||
});
|
||||
</script>
|
||||
<title>(Example)</title>
|
||||
<p id="notice" style="color: white;">Now Loading...</p>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../scripts/force-https.js"></script>
|
||||
<link rel="shortcut icon" href="../favicon.png" type="image/png" >
|
||||
<link rel="icon" href="../favicon.png" type="image/png" >
|
||||
<title>Ebiten example - mosaic</title>
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="../stylesheets/ebiten.css">
|
||||
@ -23,7 +25,7 @@
|
||||
|
||||
<h2>Ebiten example - mosaic</h2>
|
||||
<iframe src="mosaic.content.html" width="640" height="480"></iframe>
|
||||
<pre class="card"><div class="card-body"><code class="language-go">// +build example
|
||||
<div class="card"><pre class="card-body"><code class="language-go">// +build example
|
||||
|
||||
package main
|
||||
|
||||
@ -72,7 +74,7 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
</code></div></pre>
|
||||
</code></pre></div>
|
||||
|
||||
</div></main>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
@ -26,4 +27,5 @@ window.addEventListener('load', function() {
|
||||
document.body.appendChild(s);
|
||||
});
|
||||
</script>
|
||||
<title>(Example)</title>
|
||||
<p id="notice" style="color: white;">Now Loading...</p>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../scripts/force-https.js"></script>
|
||||
<link rel="shortcut icon" href="../favicon.png" type="image/png" >
|
||||
<link rel="icon" href="../favicon.png" type="image/png" >
|
||||
<title>Ebiten example - noise</title>
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="../stylesheets/ebiten.css">
|
||||
@ -23,7 +25,7 @@
|
||||
|
||||
<h2>Ebiten example - noise</h2>
|
||||
<iframe src="noise.content.html" width="640" height="480"></iframe>
|
||||
<pre class="card"><div class="card-body"><code class="language-go">// +build example
|
||||
<div class="card"><pre class="card-body"><code class="language-go">// +build example
|
||||
|
||||
package main
|
||||
|
||||
@ -83,7 +85,7 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
</code></div></pre>
|
||||
</code></pre></div>
|
||||
|
||||
</div></main>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
@ -26,4 +27,5 @@ window.addEventListener('load', function() {
|
||||
document.body.appendChild(s);
|
||||
});
|
||||
</script>
|
||||
<title>(Example)</title>
|
||||
<p id="notice" style="color: white;">Now Loading...</p>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../scripts/force-https.js"></script>
|
||||
<link rel="shortcut icon" href="../favicon.png" type="image/png" >
|
||||
<link rel="icon" href="../favicon.png" type="image/png" >
|
||||
<title>Ebiten example - paint</title>
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="../stylesheets/ebiten.css">
|
||||
@ -23,7 +25,7 @@
|
||||
|
||||
<h2>Ebiten example - paint</h2>
|
||||
<iframe src="paint.content.html" width="640" height="480"></iframe>
|
||||
<pre class="card"><div class="card-body"><code class="language-go">// +build example
|
||||
<div class="card"><pre class="card-body"><code class="language-go">// +build example
|
||||
|
||||
package main
|
||||
|
||||
@ -108,7 +110,7 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
</code></div></pre>
|
||||
</code></pre></div>
|
||||
|
||||
</div></main>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
@ -26,4 +27,5 @@ window.addEventListener('load', function() {
|
||||
document.body.appendChild(s);
|
||||
});
|
||||
</script>
|
||||
<title>(Example)</title>
|
||||
<p id="notice" style="color: white;">Now Loading...</p>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../scripts/force-https.js"></script>
|
||||
<link rel="shortcut icon" href="../favicon.png" type="image/png" >
|
||||
<link rel="icon" href="../favicon.png" type="image/png" >
|
||||
<title>Ebiten example - perspective</title>
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="../stylesheets/ebiten.css">
|
||||
@ -23,7 +25,7 @@
|
||||
|
||||
<h2>Ebiten example - perspective</h2>
|
||||
<iframe src="perspective.content.html" width="640" height="480"></iframe>
|
||||
<pre class="card"><div class="card-body"><code class="language-go">// +build example
|
||||
<div class="card"><pre class="card-body"><code class="language-go">// +build example
|
||||
|
||||
package main
|
||||
|
||||
@ -77,7 +79,7 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
</code></div></pre>
|
||||
</code></pre></div>
|
||||
|
||||
</div></main>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
@ -26,4 +27,5 @@ window.addEventListener('load', function() {
|
||||
document.body.appendChild(s);
|
||||
});
|
||||
</script>
|
||||
<title>(Example)</title>
|
||||
<p id="notice" style="color: white;">Now Loading...</p>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../scripts/force-https.js"></script>
|
||||
<link rel="shortcut icon" href="../favicon.png" type="image/png" >
|
||||
<link rel="icon" href="../favicon.png" type="image/png" >
|
||||
<title>Ebiten example - piano</title>
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="../stylesheets/ebiten.css">
|
||||
@ -23,7 +25,7 @@
|
||||
|
||||
<h2>Ebiten example - piano</h2>
|
||||
<iframe src="piano.content.html" width="640" height="480"></iframe>
|
||||
<pre class="card"><div class="card-body"><code class="language-go">// +build example
|
||||
<div class="card"><pre class="card-body"><code class="language-go">// +build example
|
||||
|
||||
package main
|
||||
|
||||
@ -212,7 +214,7 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
</code></div></pre>
|
||||
</code></pre></div>
|
||||
|
||||
</div></main>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
@ -26,4 +27,5 @@ window.addEventListener('load', function() {
|
||||
document.body.appendChild(s);
|
||||
});
|
||||
</script>
|
||||
<title>(Example)</title>
|
||||
<p id="notice" style="color: white;">Now Loading...</p>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../scripts/force-https.js"></script>
|
||||
<link rel="shortcut icon" href="../favicon.png" type="image/png" >
|
||||
<link rel="icon" href="../favicon.png" type="image/png" >
|
||||
<title>Ebiten example - rotate</title>
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="../stylesheets/ebiten.css">
|
||||
@ -23,7 +25,7 @@
|
||||
|
||||
<h2>Ebiten example - rotate</h2>
|
||||
<iframe src="rotate.content.html" width="640" height="480"></iframe>
|
||||
<pre class="card"><div class="card-body"><code class="language-go">// +build example
|
||||
<div class="card"><pre class="card-body"><code class="language-go">// +build example
|
||||
|
||||
package main
|
||||
|
||||
@ -70,7 +72,7 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
</code></div></pre>
|
||||
</code></pre></div>
|
||||
|
||||
</div></main>
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script>
|
||||
'use strict';
|
||||
window.addEventListener('load', function() {
|
||||
@ -26,4 +27,5 @@ window.addEventListener('load', function() {
|
||||
document.body.appendChild(s);
|
||||
});
|
||||
</script>
|
||||
<title>(Example)</title>
|
||||
<p id="notice" style="color: white;">Now Loading...</p>
|
||||
|
@ -1,8 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="../scripts/force-https.js"></script>
|
||||
<link rel="shortcut icon" href="../favicon.png" type="image/png" >
|
||||
<link rel="icon" href="../favicon.png" type="image/png" >
|
||||
<title>Ebiten example - sprites</title>
|
||||
|
||||
<link rel="stylesheet" href="../stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="../stylesheets/ebiten.css">
|
||||
@ -23,7 +25,7 @@
|
||||
|
||||
<h2>Ebiten example - sprites</h2>
|
||||
<iframe src="sprites.content.html" width="640" height="480"></iframe>
|
||||
<pre class="card"><div class="card-body"><code class="language-go">// +build example
|
||||
<div class="card"><pre class="card-body"><code class="language-go">// +build example
|
||||
|
||||
package main
|
||||
|
||||
@ -165,7 +167,7 @@ func main() {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
</code></div></pre>
|
||||
</code></pre></div>
|
||||
|
||||
</div></main>
|
||||
|
||||
|
@ -1,9 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="./scripts/force-https.js"></script>
|
||||
<meta name="description" content="Ebiten - A simple 2D game library in Go">
|
||||
<link rel="shortcut icon" href="./favicon.png" type="image/png">
|
||||
<link rel="icon" href="./favicon.png" type="image/png">
|
||||
<title>Ebiten - A simple 2D game library in Go</title>
|
||||
|
||||
<link rel="stylesheet" href="./stylesheets/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="./stylesheets/highlight-github.css">
|
||||
<link rel="stylesheet" href="./stylesheets/ebiten.css">
|
||||
@ -58,51 +60,51 @@
|
||||
<h2 id="examples">Examples</h2>
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<a scrolling="no" href="examples/alphablending.html"><img src="images/examples/alphablending.png" width="320" height="240" alt="Ebiten example: alphablending" class="img-thumbnail example"></a>
|
||||
<a href="examples/alphablending.html"><img src="images/examples/alphablending.png" width="320" height="240" alt="Ebiten example: alphablending" class="img-thumbnail example"></a>
|
||||
</div><div class="col-3">
|
||||
<a scrolling="no" href="examples/audio.html"><img src="images/examples/audio.png" width="320" height="240" alt="Ebiten example: audio" class="img-thumbnail example"></a>
|
||||
<a href="examples/audio.html"><img src="images/examples/audio.png" width="320" height="240" alt="Ebiten example: audio" class="img-thumbnail example"></a>
|
||||
</div><div class="col-3">
|
||||
<a scrolling="no" href="examples/font.html"><img src="images/examples/font.png" width="320" height="240" alt="Ebiten example: font" class="img-thumbnail example"></a>
|
||||
<a href="examples/font.html"><img src="images/examples/font.png" width="320" height="240" alt="Ebiten example: font" class="img-thumbnail example"></a>
|
||||
</div><div class="col-3">
|
||||
<a scrolling="no" href="examples/hsv.html"><img src="images/examples/hsv.png" width="320" height="240" alt="Ebiten example: hsv" class="img-thumbnail example"></a>
|
||||
<a href="examples/hsv.html"><img src="images/examples/hsv.png" width="320" height="240" alt="Ebiten example: hsv" class="img-thumbnail example"></a>
|
||||
</div><div class="col-3">
|
||||
<a scrolling="no" href="examples/hue.html"><img src="images/examples/hue.png" width="320" height="240" alt="Ebiten example: hue" class="img-thumbnail example"></a>
|
||||
<a href="examples/hue.html"><img src="images/examples/hue.png" width="320" height="240" alt="Ebiten example: hue" class="img-thumbnail example"></a>
|
||||
</div><div class="col-3">
|
||||
<a scrolling="no" href="examples/gamepad.html"><img src="images/examples/gamepad.png" width="320" height="240" alt="Ebiten example: gamepad" class="img-thumbnail example"></a>
|
||||
<a href="examples/gamepad.html"><img src="images/examples/gamepad.png" width="320" height="240" alt="Ebiten example: gamepad" class="img-thumbnail example"></a>
|
||||
</div><div class="col-3">
|
||||
<a scrolling="no" href="examples/infinitescroll.html"><img src="images/examples/infinitescroll.png" width="320" height="240" alt="Ebiten example: infinitescroll" class="img-thumbnail example"></a>
|
||||
<a href="examples/infinitescroll.html"><img src="images/examples/infinitescroll.png" width="320" height="240" alt="Ebiten example: infinitescroll" class="img-thumbnail example"></a>
|
||||
</div><div class="col-3">
|
||||
<a scrolling="no" href="examples/keyboard.html"><img src="images/examples/keyboard.png" width="320" height="240" alt="Ebiten example: keyboard" class="img-thumbnail example"></a>
|
||||
<a href="examples/keyboard.html"><img src="images/examples/keyboard.png" width="320" height="240" alt="Ebiten example: keyboard" class="img-thumbnail example"></a>
|
||||
</div><div class="col-3">
|
||||
<a scrolling="no" href="examples/life.html"><img src="images/examples/life.png" width="320" height="240" alt="Ebiten example: life" class="img-thumbnail example"></a>
|
||||
<a href="examples/life.html"><img src="images/examples/life.png" width="320" height="240" alt="Ebiten example: life" class="img-thumbnail example"></a>
|
||||
</div><div class="col-3">
|
||||
<a scrolling="no" href="examples/masking.html"><img src="images/examples/masking.png" width="320" height="240" alt="Ebiten example: masking" class="img-thumbnail example"></a>
|
||||
<a href="examples/masking.html"><img src="images/examples/masking.png" width="320" height="240" alt="Ebiten example: masking" class="img-thumbnail example"></a>
|
||||
</div><div class="col-3">
|
||||
<a scrolling="no" href="examples/mosaic.html"><img src="images/examples/mosaic.png" width="320" height="240" alt="Ebiten example: mosaic" class="img-thumbnail example"></a>
|
||||
<a href="examples/mosaic.html"><img src="images/examples/mosaic.png" width="320" height="240" alt="Ebiten example: mosaic" class="img-thumbnail example"></a>
|
||||
</div><div class="col-3">
|
||||
<a scrolling="no" href="examples/noise.html"><img src="images/examples/noise.png" width="320" height="240" alt="Ebiten example: noise" class="img-thumbnail example"></a>
|
||||
<a href="examples/noise.html"><img src="images/examples/noise.png" width="320" height="240" alt="Ebiten example: noise" class="img-thumbnail example"></a>
|
||||
</div><div class="col-3">
|
||||
<a scrolling="no" href="examples/paint.html"><img src="images/examples/paint.png" width="320" height="240" alt="Ebiten example: paint" class="img-thumbnail example"></a>
|
||||
<a href="examples/paint.html"><img src="images/examples/paint.png" width="320" height="240" alt="Ebiten example: paint" class="img-thumbnail example"></a>
|
||||
</div><div class="col-3">
|
||||
<a scrolling="no" href="examples/perspective.html"><img src="images/examples/perspective.png" width="320" height="240" alt="Ebiten example: perspective" class="img-thumbnail example"></a>
|
||||
<a href="examples/perspective.html"><img src="images/examples/perspective.png" width="320" height="240" alt="Ebiten example: perspective" class="img-thumbnail example"></a>
|
||||
</div><div class="col-3">
|
||||
<a scrolling="no" href="examples/piano.html"><img src="images/examples/piano.png" width="320" height="240" alt="Ebiten example: piano" class="img-thumbnail example"></a>
|
||||
<a href="examples/piano.html"><img src="images/examples/piano.png" width="320" height="240" alt="Ebiten example: piano" class="img-thumbnail example"></a>
|
||||
</div><div class="col-3">
|
||||
<a scrolling="no" href="examples/rotate.html"><img src="images/examples/rotate.png" width="320" height="240" alt="Ebiten example: rotate" class="img-thumbnail example"></a>
|
||||
<a href="examples/rotate.html"><img src="images/examples/rotate.png" width="320" height="240" alt="Ebiten example: rotate" class="img-thumbnail example"></a>
|
||||
</div><div class="col-3">
|
||||
<a scrolling="no" href="examples/sprites.html"><img src="images/examples/sprites.png" width="320" height="240" alt="Ebiten example: sprites" class="img-thumbnail example"></a>
|
||||
<a href="examples/sprites.html"><img src="images/examples/sprites.png" width="320" height="240" alt="Ebiten example: sprites" class="img-thumbnail example"></a>
|
||||
</div><div class="col-3">
|
||||
<a scrolling="no" href="examples/2048.html"><img src="images/examples/2048.png" width="210" height="300" alt="Ebiten example: 2048" class="img-thumbnail example"></a>
|
||||
<a href="examples/2048.html"><img src="images/examples/2048.png" width="210" height="300" alt="Ebiten example: 2048" class="img-thumbnail example"></a>
|
||||
</div><div class="col-3">
|
||||
<a scrolling="no" href="examples/blocks.html"><img src="images/examples/blocks.png" width="256" height="240" alt="Ebiten example: blocks" class="img-thumbnail example"></a>
|
||||
<a href="examples/blocks.html"><img src="images/examples/blocks.png" width="256" height="240" alt="Ebiten example: blocks" class="img-thumbnail example"></a>
|
||||
</div>
|
||||
</div>
|
||||
<p><a href="https://blog.golang.org/go-programming-language-turns-two">The Gopher photographs by Chris Nokleberg</a> are licensed under <a href="https://creativecommons.org/licenses/by/3.0/">the Creative Commons 3.0 Attributions License</a>.</p>
|
||||
|
||||
<h3>Execute the examples</h2>
|
||||
<pre class="card"><div class="card-body"><code class="language-bash">go get github.com/hajimehoshi/ebiten/...
|
||||
<h3>Execute the examples</h3>
|
||||
<div class="card"><pre class="card-body"><code class="language-bash">go get github.com/hajimehoshi/ebiten/...
|
||||
cd $GOPATH/src/github.com/hajimehoshi/ebiten/examples
|
||||
go run -tags=example rotate/main.go</div></code></pre>
|
||||
go run -tags=example rotate/main.go</code></pre></div>
|
||||
<p>Note that you need to add <code>-tags=example</code> to run examples.</p>
|
||||
|
||||
<h2 id="getting-started">Getting Started</h2>
|
||||
@ -112,7 +114,7 @@ First create a new directory (<code>mkdir hello_world</code>), and change
|
||||
into it (<code>cd hello_world</code>). Type the following code into
|
||||
the <code>main.go</code> file:</p>
|
||||
|
||||
<pre class="card"><div class="card-body"><code class="language-go">package main
|
||||
<div class="card"><pre class="card-body"><code class="language-go">package main
|
||||
|
||||
import (
|
||||
"github.com/hajimehoshi/ebiten"
|
||||
@ -127,7 +129,7 @@ func update(screen *ebiten.Image) error {
|
||||
func main() {
|
||||
ebiten.Run(update, 320, 240, 2, "Hello world!")
|
||||
}
|
||||
</div></code></pre>
|
||||
</code></pre></div>
|
||||
|
||||
<p>Run the <code>go run</code> command to start the
|
||||
game. There you have it, your first Ebiten game!</p>
|
||||
|
@ -28,6 +28,10 @@ img.example {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
pre.card-body {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
nav {
|
||||
background-color: #657378;
|
||||
color: #fff;
|
||||
|
Loading…
Reference in New Issue
Block a user