docs: Update (playground URL)

This commit is contained in:
Hajime Hoshi 2018-03-22 01:27:44 +09:00
parent a3bf8ebf83
commit 4c906dfbef
5 changed files with 7 additions and 39 deletions

View File

@ -17,7 +17,7 @@ Website: https://hajimehoshi.github.io/ebiten/
* [Android](https://github.com/hajimehoshi/ebiten/wiki/Android)
* [iOS](https://github.com/hajimehoshi/ebiten/wiki/iOS)
* [Web browsers (Chrome, Firefox, Safari and Edge on desktops)](https://github.com/hajimehoshi/ebiten/wiki/Web-Browsers) (powered by [GopherJS](http://gopherjs.org/))
* [jsgo.io Playground by Dave Brophy](https://goo.gl/Qtz8ur)
* [jsgo.io Playground by Dave Brophy](https://jsgo.io/dave/jsgo/playground#9b4d11ce563df53cb7dff937baa707c3fd41310c)
Note: Gamepad and keyboard are not available on Android/iOS.

View File

@ -25,7 +25,7 @@
<li class="nav-item"><a class="nav-link" href="https://github.com/hajimehoshi/ebiten">GitHub</a></li>
<li class="nav-item"><a class="nav-link" href="https://godoc.org/github.com/hajimehoshi/ebiten">GoDoc</a></li>
<li class="nav-item"><a class="nav-link" href="https://github.com/hajimehoshi/ebiten/wiki">Wiki</a>
<li class="nav-item"><a class="nav-link" href="https://goo.gl/Qtz8ur">Playground (jsgo.io)</a>
<li class="nav-item"><a class="nav-link" href="https://jsgo.io/dave/jsgo/playground#9b4d11ce563df53cb7dff937baa707c3fd41310c">Playground (jsgo.io)</a>
</ul>
</div>
</div></nav>
@ -45,7 +45,7 @@
<dt class="col-2 text-right">Mobiles</dt>
<dd class="col-10"><a href="https://github.com/hajimehoshi/ebiten/wiki/Android">Android</a>, <a href="https://github.com/hajimehoshi/ebiten/wiki/iOS">iOS</a></dd>
<dt class="col-2 text-right">Web browsers</dt>
<dd class="col-10"><a href="https://github.com/hajimehoshi/ebiten/wiki/Web-Browsers">Chrome, Firefox, Safari and Edge on desktops</a> (powered by <a href="https://github.com/gopherjs/gopherjs">GopherJS</a>), <a href="https://goo.gl/Qtz8ur">jsgo.io Playground by Dave Brophy</a></dd>
<dd class="col-10"><a href="https://github.com/hajimehoshi/ebiten/wiki/Web-Browsers">Chrome, Firefox, Safari and Edge on desktops</a> (powered by <a href="https://github.com/gopherjs/gopherjs">GopherJS</a>), <a href="https://jsgo.io/dave/jsgo/playground#9b4d11ce563df53cb7dff937baa707c3fd41310c">jsgo.io Playground by Dave Brophy</a></dd>
</dl>
<p><small>Note: Gamepads and keyboard are not available on Android/iOS.</small></p>

View File

@ -33,10 +33,8 @@ package main
import (
&#34;fmt&#34;
&#34;image&#34;
_ &#34;image/jpeg&#34;
&#34;log&#34;
&#34;net/http&#34;
&#34;github.com/hajimehoshi/ebiten&#34;
&#34;github.com/hajimehoshi/ebiten/ebitenutil&#34;
@ -55,23 +53,11 @@ func init() {
// Load the image asynchronously.
go func() {
res, err := http.Get(url)
img, err := ebitenutil.NewImageFromURL(url)
if err != nil {
log.Fatal(err)
}
defer res.Body.Close()
img, _, err := image.Decode(res.Body)
if err != nil {
log.Fatal(err)
}
eimg, err := ebiten.NewImageFromImage(img, ebiten.FilterDefault)
if err != nil {
log.Fatal(err)
}
highDPIImageCh &lt;- eimg
highDPIImageCh &lt;- img
close(highDPIImageCh)
}()
}

View File

@ -34,7 +34,6 @@ package main
import (
&#34;errors&#34;
&#34;fmt&#34;
&#34;io&#34;
&#34;log&#34;
&#34;math&#34;
@ -88,23 +87,6 @@ func (s *stream) Read(data []byte) (int, error) {
return len(data), nil
}
// Seek is io.Seeker&#39;s Seek.
//
// whence must be io.SeekStart or io.SeekCurrent.
func (s *stream) Seek(offset int64, whence int) (int64, error) {
const length = sampleRate / frequency
switch whence {
case io.SeekStart:
s.position = offset
case io.SeekCurrent:
s.position &#43;= offset
default:
return 0, errors.New(&#34;whence must be io.SeekStart or io.SeekCurrent&#34;)
}
s.position %= length * 4
return s.position, nil
}
// Close is io.Closer&#39;s Close.
func (s *stream) Close() error {
return nil

View File

@ -25,7 +25,7 @@
<li class="nav-item"><a class="nav-link" href="https://github.com/hajimehoshi/ebiten">GitHub</a></li>
<li class="nav-item"><a class="nav-link" href="https://godoc.org/github.com/hajimehoshi/ebiten">GoDoc</a></li>
<li class="nav-item"><a class="nav-link" href="https://github.com/hajimehoshi/ebiten/wiki">Wiki</a>
<li class="nav-item"><a class="nav-link" href="https://goo.gl/Qtz8ur">Playground (jsgo.io)</a>
<li class="nav-item"><a class="nav-link" href="https://jsgo.io/dave/jsgo/playground#9b4d11ce563df53cb7dff937baa707c3fd41310c">Playground (jsgo.io)</a>
</ul>
</div>
</div></nav>
@ -45,7 +45,7 @@
<dt class="col-2 text-right">Mobiles</dt>
<dd class="col-10"><a href="https://github.com/hajimehoshi/ebiten/wiki/Android">Android</a>, <a href="https://github.com/hajimehoshi/ebiten/wiki/iOS">iOS</a></dd>
<dt class="col-2 text-right">Web browsers</dt>
<dd class="col-10"><a href="https://github.com/hajimehoshi/ebiten/wiki/Web-Browsers">Chrome, Firefox, Safari and Edge on desktops</a> (powered by <a href="https://github.com/gopherjs/gopherjs">GopherJS</a>), <a href="https://goo.gl/Qtz8ur">jsgo.io Playground by Dave Brophy</a></dd>
<dd class="col-10"><a href="https://github.com/hajimehoshi/ebiten/wiki/Web-Browsers">Chrome, Firefox, Safari and Edge on desktops</a> (powered by <a href="https://github.com/gopherjs/gopherjs">GopherJS</a>), <a href="https://jsgo.io/dave/jsgo/playground#9b4d11ce563df53cb7dff937baa707c3fd41310c">jsgo.io Playground by Dave Brophy</a></dd>
</dl>
<p><small>Note: Gamepads and keyboard are not available on Android/iOS.</small></p>