Update version to v2.0.0-alpha

This commit is contained in:
Hajime Hoshi 2020-10-04 02:35:13 +09:00
parent eb38324021
commit bf515bb594
206 changed files with 498 additions and 595 deletions

View File

@ -1,97 +0,0 @@
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- libasound2-dev
- libgl1-mesa-dev
- libalut-dev
- libxcursor-dev
- libxi-dev
- libxinerama-dev
- libxrandr-dev
- libxxf86vm-dev
chrome: stable
services:
- xvfb
install:
# Install Go 1.15.2 manualy
# See https://travis-ci.community/t/goos-js-goarch-wasm-go-run-fails-panic-newosproc-not-implemented/1651
- wget -O go.tar.gz https://dl.google.com/go/go1.15.2.linux-amd64.tar.gz
- tar -C ~ -xzf go.tar.gz
- rm go.tar.gz
- export GOROOT=~/go
- export GOPATH=/home/travis/gopath
- export PATH=$GOROOT/bin:$PATH
- go version
- go env
# Install Go 1.12.16
- go get golang.org/dl/go1.12.16
- go1.12.16 download
# Make the working directory
- mkdir /tmp/work
- cd /tmp/work
- go mod init example.com/m
- go get github.com/hajimehoshi/ebiten
- wget -O ebiten.zip https://github.com/$TRAVIS_REPO_SLUG/archive/$TRAVIS_COMMIT.zip
- unzip ebiten.zip
- mv ./ebiten-$TRAVIS_COMMIT ebiten
- go mod edit -replace=github.com/hajimehoshi/ebiten=./ebiten
# wasmbrowsertest
- GO111MODULE=off go get github.com/agnivade/wasmbrowsertest
- mv $GOPATH/bin/wasmbrowsertest $GOPATH/bin/go_js_wasm_exec
# GopherJS
- GO111MODULE=off go1.12.16 get github.com/gopherjs/gopherjs
- mkdir -p $GOPATH/src/github.com/hajimehoshi
- cd $GOPATH/src/github.com/hajimehoshi
- unzip /tmp/work/ebiten.zip
- mv ./ebiten-$TRAVIS_COMMIT ebiten
- cd ./ebiten
- GO111MODULE=off go get -d -tags=example ./...
- cd /tmp/work
# gjbt
- GO111MODULE=off go1.12.16 get myitcv.io/cmd/gjbt
# Chrome
- mkdir /tmp/google-chrome-bin
- ln -s /usr/bin/google-chrome-stable /tmp/google-chrome-bin/google-chrome
- export PATH=/tmp/google-chrome-bin:$PATH
- curl -s https://chromedriver.storage.googleapis.com/2.38/chromedriver_linux64.zip > /tmp/chromedriver_linux64.zip
- unzip -d /tmp/chromedriver_linux64 /tmp/chromedriver_linux64.zip
- export PATH=/tmp/chromedriver_linux64:$PATH
before_script:
- export DISPLAY=:99.0
script:
- cd /tmp/work
# go vet
- go vet -tags=example -v github.com/hajimehoshi/ebiten/...
# go build
- go build -tags=example -v github.com/hajimehoshi/ebiten/...
- GOOS=windows GOARCH=amd64 go build -tags=example -v github.com/hajimehoshi/ebiten/...
- GOOS=windows GOARCH=386 go build -tags=example -v github.com/hajimehoshi/ebiten/...
# go test
- go test -v github.com/hajimehoshi/ebiten/...
- GOOS=js GOARCH=wasm go test -v github.com/hajimehoshi/ebiten/...
# GopherJS
- GO111MODULE=off go1.12.16 run github.com/gopherjs/gopherjs build --tags=example -v github.com/hajimehoshi/ebiten/examples/blocks
- GO111MODULE=off go1.12.16 run myitcv.io/cmd/gjbt github.com/hajimehoshi/ebiten # TODO: Test the subdirectories
# - test -z $(gofmt -s -l $GOPATH/src/github.com/hajimehoshi/ebiten)
notifications:
email:
recipients:
- hajimehoshi@gmail.com

View File

@ -19,7 +19,7 @@ import (
"testing"
"time"
. "github.com/hajimehoshi/ebiten/audio"
. "github.com/hajimehoshi/ebiten/v2/audio"
)
var context *Context

View File

@ -18,7 +18,7 @@ import (
"io"
"sync"
"github.com/hajimehoshi/ebiten/internal/hooks"
"github.com/hajimehoshi/ebiten/v2/internal/hooks"
)
type context interface {

View File

@ -20,7 +20,7 @@ import (
"math"
"testing"
. "github.com/hajimehoshi/ebiten/audio/internal/convert"
. "github.com/hajimehoshi/ebiten/v2/audio/internal/convert"
)
type f32reader struct {

View File

@ -19,8 +19,8 @@ import (
"math"
"testing"
"github.com/hajimehoshi/ebiten/audio"
. "github.com/hajimehoshi/ebiten/audio/internal/convert"
"github.com/hajimehoshi/ebiten/v2/audio"
. "github.com/hajimehoshi/ebiten/v2/audio/internal/convert"
)
func soundAt(timeInSecond float64) float64 {

View File

@ -17,7 +17,7 @@ package convert
import (
"io"
"github.com/hajimehoshi/ebiten/audio"
"github.com/hajimehoshi/ebiten/v2/audio"
)
type Stereo16 struct {

View File

@ -19,7 +19,7 @@ import (
"math"
"testing"
. "github.com/hajimehoshi/ebiten/audio"
. "github.com/hajimehoshi/ebiten/v2/audio"
)
func TestInfiniteLoop(t *testing.T) {

View File

@ -26,7 +26,7 @@ import (
"syscall/js"
"time"
"github.com/hajimehoshi/ebiten/audio"
"github.com/hajimehoshi/ebiten/v2/audio"
)
// TODO: This just uses decodeAudioData, that can treat audio files other than MP3.

View File

@ -26,8 +26,8 @@ import (
"github.com/hajimehoshi/go-mp3"
"github.com/hajimehoshi/ebiten/audio"
"github.com/hajimehoshi/ebiten/audio/internal/convert"
"github.com/hajimehoshi/ebiten/v2/audio"
"github.com/hajimehoshi/ebiten/v2/audio/internal/convert"
)
// Stream is a decoded stream.

View File

@ -20,8 +20,8 @@ import (
"io"
"runtime"
"github.com/hajimehoshi/ebiten/audio"
"github.com/hajimehoshi/ebiten/audio/internal/convert"
"github.com/hajimehoshi/ebiten/v2/audio"
"github.com/hajimehoshi/ebiten/v2/audio/internal/convert"
)
// Stream is a decoded audio stream.

View File

@ -20,8 +20,8 @@ package vorbis
import (
"io/ioutil"
"github.com/hajimehoshi/ebiten/audio"
"github.com/hajimehoshi/ebiten/audio/vorbis/internal/stb"
"github.com/hajimehoshi/ebiten/v2/audio"
"github.com/hajimehoshi/ebiten/v2/audio/vorbis/internal/stb"
)
type decoderImpl struct {

View File

@ -19,7 +19,7 @@ package vorbis
import (
"github.com/jfreymuth/oggvorbis"
"github.com/hajimehoshi/ebiten/audio"
"github.com/hajimehoshi/ebiten/v2/audio"
)
func newDecoder(in audio.ReadSeekCloser) (decoder, error) {

View File

@ -19,8 +19,8 @@ import (
"github.com/jfreymuth/oggvorbis"
"github.com/hajimehoshi/ebiten/audio"
. "github.com/hajimehoshi/ebiten/audio/vorbis"
"github.com/hajimehoshi/ebiten/v2/audio"
. "github.com/hajimehoshi/ebiten/v2/audio/vorbis"
)
var audioContext *audio.Context

View File

@ -21,8 +21,8 @@ import (
"io"
"runtime"
"github.com/hajimehoshi/ebiten/audio"
"github.com/hajimehoshi/ebiten/audio/internal/convert"
"github.com/hajimehoshi/ebiten/v2/audio"
"github.com/hajimehoshi/ebiten/v2/audio/internal/convert"
)
// Stream is a decoded audio stream.

View File

@ -183,7 +183,7 @@ func doBind(args []string, flagset *flag.FlagSet, buildOS string) error {
prefixLower := bindPrefix + pkgs[0].Name
prefixUpper := strings.Title(bindPrefix) + strings.Title(pkgs[0].Name)
args = append(args, "github.com/hajimehoshi/ebiten/mobile/ebitenmobileview")
args = append(args, "github.com/hajimehoshi/ebiten/v2/mobile/ebitenmobileview")
if buildO == "" {
fmt.Fprintln(os.Stderr, "-o must be specified.")

View File

@ -19,7 +19,7 @@ import (
"image/color"
"github.com/hajimehoshi/ebiten/internal/affine"
"github.com/hajimehoshi/ebiten/v2/internal/affine"
)
// ColorMDim is a dimension of a ColorM.

View File

@ -19,7 +19,7 @@ import (
"math"
"testing"
. "github.com/hajimehoshi/ebiten"
. "github.com/hajimehoshi/ebiten/v2"
)
func TestColorMInit(t *testing.T) {

View File

@ -14,7 +14,7 @@
package ebiten
import "github.com/hajimehoshi/ebiten/internal/driver"
import "github.com/hajimehoshi/ebiten/v2/internal/driver"
// A CursorModeType represents
// a render and coordinate mode of a mouse cursor.

View File

@ -17,8 +17,8 @@ package ebitenutil
import (
"image"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil/internal/assets"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil/internal/assets"
)
var (

View File

@ -23,7 +23,7 @@ import (
"io"
"sync"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/v2"
)
type recorder struct {

View File

@ -21,7 +21,7 @@ package ebitenutil
import (
"image"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/v2"
)
// NewImageFromFile loads the file with path and returns ebiten.Image and image.Image.

View File

@ -18,8 +18,8 @@ import (
"image/color"
"math"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/internal/colormcache"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/internal/colormcache"
)
var (

View File

@ -18,7 +18,7 @@ import (
"image"
"net/http"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/v2"
)
// NewImageFromURL creates a new ebiten.Image from the given URL.

View File

@ -17,7 +17,7 @@ package twenty48
import (
"errors"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/v2"
)
var taskTerminated = errors.New("twenty48: task terminated")

View File

@ -18,7 +18,7 @@ import (
"math/rand"
"time"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/v2"
)
func init() {

View File

@ -15,8 +15,8 @@
package twenty48
import (
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
// Dir represents a direction.

View File

@ -25,9 +25,9 @@ import (
"golang.org/x/image/font"
"golang.org/x/image/font/opentype"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/examples/resources/fonts"
"github.com/hajimehoshi/ebiten/text"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/examples/resources/fonts"
"github.com/hajimehoshi/ebiten/v2/text"
)
var (

View File

@ -15,7 +15,7 @@
package twenty48_test
import (
. "github.com/hajimehoshi/ebiten/examples/2048/2048"
. "github.com/hajimehoshi/ebiten/v2/examples/2048/2048"
"fmt"
"testing"

View File

@ -19,8 +19,8 @@ package main
import (
"log"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/examples/2048/2048"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/examples/2048/2048"
)
func main() {

View File

@ -23,8 +23,8 @@ import (
_ "image/png"
"log"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
)
const (

View File

@ -22,9 +22,9 @@ import (
_ "image/png"
"log"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
)
const (

View File

@ -25,9 +25,9 @@ import (
"log"
"math"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
)
const (

View File

@ -23,8 +23,8 @@ import (
_ "image/png"
"log"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
)
const (

View File

@ -22,8 +22,8 @@ import (
_ "image/png"
"log"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
)
const (

View File

@ -26,14 +26,14 @@ import (
"log"
"time"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/audio"
"github.com/hajimehoshi/ebiten/audio/mp3"
"github.com/hajimehoshi/ebiten/audio/vorbis"
"github.com/hajimehoshi/ebiten/audio/wav"
"github.com/hajimehoshi/ebiten/ebitenutil"
raudio "github.com/hajimehoshi/ebiten/examples/resources/audio"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/audio"
"github.com/hajimehoshi/ebiten/v2/audio/mp3"
"github.com/hajimehoshi/ebiten/v2/audio/vorbis"
"github.com/hajimehoshi/ebiten/v2/audio/wav"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
raudio "github.com/hajimehoshi/ebiten/v2/examples/resources/audio"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
const (

View File

@ -21,11 +21,11 @@ import (
"log"
"time"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/audio"
"github.com/hajimehoshi/ebiten/audio/vorbis"
"github.com/hajimehoshi/ebiten/ebitenutil"
raudio "github.com/hajimehoshi/ebiten/examples/resources/audio"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/audio"
"github.com/hajimehoshi/ebiten/v2/audio/vorbis"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
raudio "github.com/hajimehoshi/ebiten/v2/examples/resources/audio"
)
const (

View File

@ -25,12 +25,12 @@ import (
"math"
"time"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/audio"
"github.com/hajimehoshi/ebiten/audio/vorbis"
"github.com/hajimehoshi/ebiten/ebitenutil"
raudio "github.com/hajimehoshi/ebiten/examples/resources/audio"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/audio"
"github.com/hajimehoshi/ebiten/v2/audio/vorbis"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
raudio "github.com/hajimehoshi/ebiten/v2/examples/resources/audio"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
)
const (

View File

@ -15,7 +15,7 @@
package blocks
import (
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/v2"
)
const maxFlushCount = 20

View File

@ -22,9 +22,9 @@ import (
"golang.org/x/image/font"
"golang.org/x/image/font/opentype"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/examples/resources/fonts"
"github.com/hajimehoshi/ebiten/text"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/examples/resources/fonts"
"github.com/hajimehoshi/ebiten/v2/text"
)
const (

View File

@ -15,7 +15,7 @@
package blocks
import (
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/v2"
)
const (

View File

@ -17,8 +17,8 @@ package blocks
import (
"fmt"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
type virtualGamepadButton int

View File

@ -19,8 +19,8 @@ import (
"image/color"
"strings"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
type GamepadScene struct {

View File

@ -24,10 +24,10 @@ import (
"strconv"
"time"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
var (

View File

@ -15,8 +15,8 @@
package blocks
import (
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
// Input manages the input state including gamepads and keyboards.

View File

@ -19,8 +19,8 @@ import (
"image"
_ "image/png"
"github.com/hajimehoshi/ebiten"
rblocks "github.com/hajimehoshi/ebiten/examples/resources/images/blocks"
"github.com/hajimehoshi/ebiten/v2"
rblocks "github.com/hajimehoshi/ebiten/v2/examples/resources/images/blocks"
)
var imageBlocks *ebiten.Image

View File

@ -15,7 +15,7 @@
package blocks
import (
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/v2"
)
var (

View File

@ -20,9 +20,9 @@ import (
"image/color"
_ "image/png"
"github.com/hajimehoshi/ebiten"
rblocks "github.com/hajimehoshi/ebiten/examples/resources/images/blocks"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
rblocks "github.com/hajimehoshi/ebiten/v2/examples/resources/images/blocks"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
var imageBackground *ebiten.Image

View File

@ -22,8 +22,8 @@ import (
"os"
"runtime/pprof"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/examples/blocks/blocks"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/examples/blocks/blocks"
)
var cpuProfile = flag.String("cpuprofile", "", "write cpu profile to file")

View File

@ -22,8 +22,8 @@ import (
_ "image/jpeg"
"log"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
)
const (
@ -55,7 +55,7 @@ func (g *Game) Draw(screen *ebiten.Image) {
// Alpha scale should be 1.0/49.0, but accumulating 1/49 49 times doesn't reach to 1, because
// the final color is affected by the destination alpha when CompositeModeSourceOver is used.
// This composite mode is the default mode. See how this is calculated at the doc:
// https://pkg.go.dev/github.com/hajimehoshi/ebiten#CompositeMode
// https://pkg.go.dev/github.com/hajimehoshi/ebiten/v2#CompositeMode
//
// Use a higher value than 1.0/49.0. Here, 1.0/25.0 here to get a reasonable result.
op.ColorM.Scale(1, 1, 1, 1.0/25.0)

View File

@ -26,9 +26,9 @@ import (
"golang.org/x/image/math/f64"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
)
const (
@ -173,7 +173,7 @@ func (g *Game) Draw(screen *ebiten.Image) {
// Draw each tile with each DrawImage call.
// As the source images of all DrawImage calls are always same,
// this rendering is done very effectively.
// For more detail, see https://pkg.go.dev/github.com/hajimehoshi/ebiten#Image.DrawImage
// For more detail, see https://pkg.go.dev/github.com/hajimehoshi/ebiten/v2#Image.DrawImage
for _, l := range g.layers {
for i, t := range l {
op := &ebiten.DrawImageOptions{}

View File

@ -22,8 +22,8 @@ import (
"log"
"math/rand"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/jakecoffman/cp"
)

View File

@ -27,10 +27,10 @@ import (
"syscall/js"
"time"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
const (

View File

@ -22,7 +22,7 @@ import (
"math/rand"
"time"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/v2"
)
const (

View File

@ -25,10 +25,10 @@ import (
"math/rand"
"time"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
func init() {

View File

@ -22,9 +22,9 @@ import (
_ "image/png"
"log"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
)
const (

View File

@ -30,16 +30,16 @@ import (
"golang.org/x/image/font"
"golang.org/x/image/font/opentype"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/audio"
"github.com/hajimehoshi/ebiten/audio/vorbis"
"github.com/hajimehoshi/ebiten/audio/wav"
"github.com/hajimehoshi/ebiten/ebitenutil"
raudio "github.com/hajimehoshi/ebiten/examples/resources/audio"
"github.com/hajimehoshi/ebiten/examples/resources/fonts"
resources "github.com/hajimehoshi/ebiten/examples/resources/images/flappy"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/text"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/audio"
"github.com/hajimehoshi/ebiten/v2/audio/vorbis"
"github.com/hajimehoshi/ebiten/v2/audio/wav"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
raudio "github.com/hajimehoshi/ebiten/v2/examples/resources/audio"
"github.com/hajimehoshi/ebiten/v2/examples/resources/fonts"
resources "github.com/hajimehoshi/ebiten/v2/examples/resources/images/flappy"
"github.com/hajimehoshi/ebiten/v2/inpututil"
"github.com/hajimehoshi/ebiten/v2/text"
)
func init() {

View File

@ -23,8 +23,8 @@ import (
_ "image/png"
"log"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
)
const (

View File

@ -27,9 +27,9 @@ import (
"golang.org/x/image/font"
"golang.org/x/image/font/opentype"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/examples/resources/fonts"
"github.com/hajimehoshi/ebiten/text"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/examples/resources/fonts"
"github.com/hajimehoshi/ebiten/v2/text"
)
const (

View File

@ -29,10 +29,10 @@ import (
"golang.org/x/image/font"
"golang.org/x/image/font/opentype"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/examples/resources/fonts"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/text"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/examples/resources/fonts"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2/text"
)
var (

View File

@ -23,9 +23,9 @@ import (
"strconv"
"strings"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
const (

View File

@ -21,8 +21,8 @@ import (
_ "image/jpeg"
"log"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
)
var (

View File

@ -24,10 +24,10 @@ import (
"log"
"math"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
const (

View File

@ -23,8 +23,8 @@ import (
"log"
"math"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
)
const (

View File

@ -23,9 +23,9 @@ import (
_ "image/png"
"log"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
)
const (

View File

@ -32,8 +32,8 @@ import (
"golang.org/x/image/font"
"golang.org/x/image/font/opentype"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/text"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/text"
)
const (
@ -282,7 +282,7 @@ package keyboard
import (
"image"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/v2"
)
var keyboardKeyRects = map[ebiten.Key]image.Rectangle{}

View File

@ -19,7 +19,7 @@ package keyboard
import (
"image"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/v2"
)
var keyboardKeyRects = map[ebiten.Key]image.Rectangle{}

View File

@ -23,10 +23,10 @@ import (
"log"
"strings"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/examples/keyboard/keyboard"
rkeyabord "github.com/hajimehoshi/ebiten/examples/resources/images/keyboard"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/examples/keyboard/keyboard"
rkeyabord "github.com/hajimehoshi/ebiten/v2/examples/resources/images/keyboard"
)
const (

View File

@ -30,7 +30,7 @@ import (
"math/rand"
"time"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/v2"
)
func init() {

View File

@ -20,7 +20,7 @@ import (
"log"
"math"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/v2"
)
const (

View File

@ -26,8 +26,8 @@ import (
"math/rand"
"time"
"github.com/hajimehoshi/ebiten"
rmascot "github.com/hajimehoshi/ebiten/examples/resources/images/mascot"
"github.com/hajimehoshi/ebiten/v2"
rmascot "github.com/hajimehoshi/ebiten/v2/examples/resources/images/mascot"
)
const (

View File

@ -24,8 +24,8 @@ import (
"log"
"math"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
)
const (

View File

@ -27,10 +27,10 @@ import (
"log"
"math"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
const (

View File

@ -22,8 +22,8 @@ package main
import (
"log"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
const (

View File

@ -22,8 +22,8 @@ import (
_ "image/jpeg"
"log"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
)
const (

View File

@ -21,8 +21,8 @@ import (
"image"
"log"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
)
const (

View File

@ -23,8 +23,8 @@ import (
"log"
"math"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
)
const (

View File

@ -28,9 +28,9 @@ import (
"math/rand"
"time"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
)
func init() {

View File

@ -21,9 +21,9 @@ import (
"math"
"strings"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/audio"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/audio"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
)
const (

View File

@ -22,8 +22,8 @@ import (
_ "image/jpeg"
"log"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
)
const (

View File

@ -25,12 +25,12 @@ import (
"golang.org/x/image/font"
"golang.org/x/image/font/opentype"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/audio"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/examples/resources/fonts"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/text"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/audio"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/examples/resources/fonts"
"github.com/hajimehoshi/ebiten/v2/inpututil"
"github.com/hajimehoshi/ebiten/v2/text"
)
var (

View File

@ -22,10 +22,10 @@ import (
"image"
_ "image/png"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
rplatformer "github.com/hajimehoshi/ebiten/examples/resources/images/platformer"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
rplatformer "github.com/hajimehoshi/ebiten/v2/examples/resources/images/platformer"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
const (

View File

@ -22,9 +22,9 @@ import (
"log"
"math"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
const (

View File

@ -27,10 +27,10 @@ import (
"math"
"sort"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
const (

View File

@ -23,8 +23,8 @@ import (
"log"
"math"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
)
const (

View File

@ -23,8 +23,8 @@ import (
"math/rand"
"time"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
)
const (

View File

@ -22,10 +22,10 @@ import (
_ "image/png"
"log"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
resources "github.com/hajimehoshi/ebiten/examples/resources/images/shader"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
resources "github.com/hajimehoshi/ebiten/v2/examples/resources/images/shader"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
const (

View File

@ -22,8 +22,8 @@ import (
"log"
"math"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
)
const (

View File

@ -21,9 +21,9 @@ import (
"log"
"math"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/audio"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/audio"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
)
const (

View File

@ -23,9 +23,9 @@ import (
"math/rand"
"time"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
const (

View File

@ -25,9 +25,9 @@ import (
"math"
"math/rand"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
)
const (
@ -194,7 +194,7 @@ func (g *Game) Draw(screen *ebiten.Image) {
// the actual draw call to GPU is very few since these calls satisfy
// some conditions e.g. all the rendering sources and targets are same.
// For more detail, see:
// https://pkg.go.dev/github.com/hajimehoshi/ebiten#Image.DrawImage
// https://pkg.go.dev/github.com/hajimehoshi/ebiten/v2#Image.DrawImage
w, h := ebitenImage.Size()
for i := 0; i < g.sprites.num; i++ {
s := g.sprites.sprites[i]

View File

@ -26,10 +26,10 @@ import (
"math"
"math/rand"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
const (
@ -180,7 +180,7 @@ func (g *Game) Draw(screen *ebiten.Image) {
// the actual draw call to GPU is very few since these calls satisfy
// some conditions e.g. all the rendering sources and targets are same.
// For more detail, see:
// https://pkg.go.dev/github.com/hajimehoshi/ebiten#Image.DrawImage
// https://pkg.go.dev/github.com/hajimehoshi/ebiten/v2#Image.DrawImage
w, h := ebitenImage.Size()
for i := 0; i < g.sprites.num; i++ {
s := g.sprites.sprites[i]

View File

@ -25,9 +25,9 @@ import (
"math/rand"
"time"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
const (

View File

@ -25,10 +25,10 @@ import (
"golang.org/x/image/font"
"golang.org/x/image/font/opentype"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/examples/resources/fonts"
"github.com/hajimehoshi/ebiten/text"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/examples/resources/fonts"
"github.com/hajimehoshi/ebiten/v2/text"
)
const (

View File

@ -23,9 +23,9 @@ import (
_ "image/png"
"log"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
)
const (
@ -71,7 +71,7 @@ func (g *Game) Draw(screen *ebiten.Image) {
// Draw each tile with each DrawImage call.
// As the source images of all DrawImage calls are always same,
// this rendering is done very effectively.
// For more detail, see https://pkg.go.dev/github.com/hajimehoshi/ebiten#Image.DrawImage
// For more detail, see https://pkg.go.dev/github.com/hajimehoshi/ebiten/v2#Image.DrawImage
const xNum = screenWidth / tileSize
for _, l := range g.layers {
for i, t := range l {

View File

@ -20,9 +20,9 @@ import (
"log"
"strings"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
const (

View File

@ -28,10 +28,10 @@ import (
"golang.org/x/image/font/gofont/goregular"
"golang.org/x/image/font/opentype"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/text"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2/inpututil"
"github.com/hajimehoshi/ebiten/v2/text"
)
const (

View File

@ -22,9 +22,9 @@ import (
"log"
"math"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/vector"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/vector"
)
const (

View File

@ -19,11 +19,11 @@ package main
import (
"log"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/audio"
"github.com/hajimehoshi/ebiten/audio/wav"
"github.com/hajimehoshi/ebiten/ebitenutil"
raudio "github.com/hajimehoshi/ebiten/examples/resources/audio"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/audio"
"github.com/hajimehoshi/ebiten/v2/audio/wav"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
raudio "github.com/hajimehoshi/ebiten/v2/examples/resources/audio"
)
const (

View File

@ -21,8 +21,8 @@ import (
"image/color"
"log"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
)
var pointerImage *ebiten.Image

View File

@ -29,10 +29,10 @@ import (
"strings"
"time"
"github.com/hajimehoshi/ebiten"
"github.com/hajimehoshi/ebiten/ebitenutil"
"github.com/hajimehoshi/ebiten/examples/resources/images"
"github.com/hajimehoshi/ebiten/inpututil"
"github.com/hajimehoshi/ebiten/v2"
"github.com/hajimehoshi/ebiten/v2/ebitenutil"
"github.com/hajimehoshi/ebiten/v2/examples/resources/images"
"github.com/hajimehoshi/ebiten/v2/inpututil"
)
var (

Some files were not shown because too many files have changed in this diff Show More