mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
rename Ebiten -> Ebitengine
This commit is contained in:
parent
1202e66114
commit
c379873a1f
@ -1,11 +1,11 @@
|
|||||||
# Ebiten (v2)
|
# Ebitengine (v2)
|
||||||
|
|
||||||
[![Go Reference](https://pkg.go.dev/badge/github.com/hajimehoshi/ebiten/v2.svg)](https://pkg.go.dev/github.com/hajimehoshi/ebiten/v2)
|
[![Go Reference](https://pkg.go.dev/badge/github.com/hajimehoshi/ebiten/v2.svg)](https://pkg.go.dev/github.com/hajimehoshi/ebiten/v2)
|
||||||
[![Build Status](https://github.com/hajimehoshi/ebiten/workflows/test/badge.svg)](https://github.com/hajimehoshi/ebiten/actions?query=workflow%3Atest)
|
[![Build Status](https://github.com/hajimehoshi/ebiten/workflows/test/badge.svg)](https://github.com/hajimehoshi/ebiten/actions?query=workflow%3Atest)
|
||||||
|
|
||||||
**A dead simple 2D game library for Go**
|
**A dead simple 2D game library for Go**
|
||||||
|
|
||||||
Ebiten is an open source game library for the Go programming language. Ebiten's simple API allows you to quickly and easily develop 2D games that can be deployed across multiple platforms.
|
Ebitengine (formerly known as Ebiten) is an open source game library for the Go programming language. Ebitengine's simple API allows you to quickly and easily develop 2D games that can be deployed across multiple platforms.
|
||||||
|
|
||||||
* [Website (ebiten.org)](https://ebiten.org)
|
* [Website (ebiten.org)](https://ebiten.org)
|
||||||
* [API Reference](https://pkg.go.dev/github.com/hajimehoshi/ebiten/v2)
|
* [API Reference](https://pkg.go.dev/github.com/hajimehoshi/ebiten/v2)
|
||||||
@ -57,6 +57,6 @@ For installation on desktops, see [the installation instruction](https://ebiten.
|
|||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
Ebiten is licensed under Apache license version 2.0. See [LICENSE](LICENSE) file.
|
Ebitengine is licensed under Apache license version 2.0. See [LICENSE](LICENSE) file.
|
||||||
|
|
||||||
[The Ebiten logo](https://ebiten.org/images/logo.png) by Hajime Hoshi is licensed under [the Creative Commons Attribution-NoDerivatives 4.0](https://creativecommons.org/licenses/by-nd/4.0/).
|
[The Ebitengine logo](https://ebiten.org/images/logo.png) by Hajime Hoshi is licensed under [the Creative Commons Attribution-NoDerivatives 4.0](https://creativecommons.org/licenses/by-nd/4.0/).
|
||||||
|
8
doc.go
8
doc.go
@ -50,7 +50,7 @@
|
|||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// In the API document, 'the main thread' means the goroutine in init(), main() and their callees without 'go'
|
// In the API document, 'the main thread' means the goroutine in init(), main() and their callees without 'go'
|
||||||
// statement. It is assured that 'the main thread' runs on the OS main thread. There are some Ebiten functions (e.g.,
|
// statement. It is assured that 'the main thread' runs on the OS main thread. There are some Ebitengine functions (e.g.,
|
||||||
// DeviceScaleFactor) that must be called on the main thread under some conditions (typically, before ebiten.RunGame
|
// DeviceScaleFactor) that must be called on the main thread under some conditions (typically, before ebiten.RunGame
|
||||||
// is called).
|
// is called).
|
||||||
//
|
//
|
||||||
@ -69,7 +69,7 @@
|
|||||||
// If the specified graphics library is not available, RunGame returns an error.
|
// If the specified graphics library is not available, RunGame returns an error.
|
||||||
// This can take one of the following value:
|
// This can take one of the following value:
|
||||||
//
|
//
|
||||||
// "auto": Ebiten chooses the graphics library automatically. This is the default value.
|
// "auto": Ebitengine chooses the graphics library automatically. This is the default value.
|
||||||
// "opengl": OpenGL, OpenGL ES, or WebGL.
|
// "opengl": OpenGL, OpenGL ES, or WebGL.
|
||||||
// "directx": DirectX. This works only on Windows.
|
// "directx": DirectX. This works only on Windows.
|
||||||
// "metal": Metal. This works only on macOS or iOS.
|
// "metal": Metal. This works only on macOS or iOS.
|
||||||
@ -82,12 +82,12 @@
|
|||||||
//
|
//
|
||||||
// Build tags
|
// Build tags
|
||||||
//
|
//
|
||||||
// `ebitendebug` outputs a log of graphics commands. This is useful to know what happens in Ebiten. In general, the
|
// `ebitendebug` outputs a log of graphics commands. This is useful to know what happens in Ebitengine. In general, the
|
||||||
// number of graphics commands affects the performance of your game.
|
// number of graphics commands affects the performance of your game.
|
||||||
//
|
//
|
||||||
// `ebitenwebgl1` forces to use WebGL 1 on browsers.
|
// `ebitenwebgl1` forces to use WebGL 1 on browsers.
|
||||||
//
|
//
|
||||||
// `ebitensinglethread` disables Ebiten's thread safety to unlock maximum performance. If you use this you will have
|
// `ebitensinglethread` disables Ebitengine's thread safety to unlock maximum performance. If you use this you will have
|
||||||
// to manage threads yourself. Functions like IsKeyPressed will no longer be concurrent-safe with this build tag.
|
// to manage threads yourself. Functions like IsKeyPressed will no longer be concurrent-safe with this build tag.
|
||||||
// They must be called from the main thread or the same goroutine as the given game's callback functions like Update
|
// They must be called from the main thread or the same goroutine as the given game's callback functions like Update
|
||||||
// to RunGame.
|
// to RunGame.
|
||||||
|
@ -737,7 +737,7 @@ func keyNamesLess(k []string) func(i, j int) bool {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const license = `// Copyright 2013 The Ebiten Authors
|
const license = `// Copyright 2013 The Ebitengine Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
6
image.go
6
image.go
@ -137,7 +137,7 @@ type DrawImageOptions struct {
|
|||||||
// * All Filter values are same
|
// * All Filter values are same
|
||||||
//
|
//
|
||||||
// Even when all the above conditions are satisfied, multiple draw commands can
|
// Even when all the above conditions are satisfied, multiple draw commands can
|
||||||
// be used in really rare cases. Ebiten images usually share an internal
|
// be used in really rare cases. Ebitengine images usually share an internal
|
||||||
// automatic texture atlas, but when you consume the atlas, or you create a huge
|
// automatic texture atlas, but when you consume the atlas, or you create a huge
|
||||||
// image, those images cannot be on the same texture atlas. In this case, draw
|
// image, those images cannot be on the same texture atlas. In this case, draw
|
||||||
// commands are separated.
|
// commands are separated.
|
||||||
@ -820,7 +820,7 @@ func NewImageFromImage(source image.Image) *Image {
|
|||||||
panic(fmt.Sprintf("ebiten: NewImage cannot be called after RunGame finishes"))
|
panic(fmt.Sprintf("ebiten: NewImage cannot be called after RunGame finishes"))
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the given image is an Ebiten image, use DrawImage instead of reading pixels from the source.
|
// If the given image is an Ebitengine image, use DrawImage instead of reading pixels from the source.
|
||||||
// This works even before the game loop runs.
|
// This works even before the game loop runs.
|
||||||
if source, ok := source.(*Image); ok {
|
if source, ok := source.(*Image); ok {
|
||||||
size := source.Bounds().Size()
|
size := source.Bounds().Size()
|
||||||
@ -857,7 +857,7 @@ func NewImageFromImage(source image.Image) *Image {
|
|||||||
//
|
//
|
||||||
// NOTE: this is only safe when not using a custom Kage shader,
|
// NOTE: this is only safe when not using a custom Kage shader,
|
||||||
// as custom shaders may be using vertex colors for different purposes
|
// as custom shaders may be using vertex colors for different purposes
|
||||||
// than colorization. However, currently there are no Ebiten APIs that
|
// than colorization. However, currently there are no Ebitengine APIs that
|
||||||
// support both shaders and color matrices.
|
// support both shaders and color matrices.
|
||||||
func colorMToScale(colorm affine.ColorM) (newColorM affine.ColorM, r, g, b, a float32) {
|
func colorMToScale(colorm affine.ColorM) (newColorM affine.ColorM, r, g, b, a float32) {
|
||||||
if colorm.IsIdentity() {
|
if colorm.IsIdentity() {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2013 The Ebiten Authors
|
// Copyright 2013 The Ebitengine Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2013 The Ebiten Authors
|
// Copyright 2013 The Ebitengine Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2013 The Ebiten Authors
|
// Copyright 2013 The Ebitengine Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2013 The Ebiten Authors
|
// Copyright 2013 The Ebitengine Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2013 The Ebiten Authors
|
// Copyright 2013 The Ebitengine Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
2
keys.go
2
keys.go
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2013 The Ebiten Authors
|
// Copyright 2013 The Ebitengine Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2013 The Ebiten Authors
|
// Copyright 2013 The Ebitengine Authors
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
16
run.go
16
run.go
@ -28,7 +28,7 @@ type Game interface {
|
|||||||
// Update updates only the game logic and Draw draws the screen.
|
// Update updates only the game logic and Draw draws the screen.
|
||||||
//
|
//
|
||||||
// You can assume that Update is always called TPS-times per second (60 by default), and you can assume
|
// You can assume that Update is always called TPS-times per second (60 by default), and you can assume
|
||||||
// that the time delta between two Updates is always 1 / TPS [s] (1/60[s] by default). As Ebiten already
|
// that the time delta between two Updates is always 1 / TPS [s] (1/60[s] by default). As Ebitengine already
|
||||||
// adjusts the number of Update calls, you don't have to measure time deltas in Update by e.g. OS timers.
|
// adjusts the number of Update calls, you don't have to measure time deltas in Update by e.g. OS timers.
|
||||||
//
|
//
|
||||||
// An actual TPS is available by CurrentTPS(), and the result might slightly differ from your expected TPS,
|
// An actual TPS is available by CurrentTPS(), and the result might slightly differ from your expected TPS,
|
||||||
@ -110,7 +110,7 @@ func IsScreenClearedEveryFrame() bool {
|
|||||||
return ui.IsScreenClearedEveryFrame()
|
return ui.IsScreenClearedEveryFrame()
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetScreenFilterEnabled enables/disables the use of the "screen" filter Ebiten uses.
|
// SetScreenFilterEnabled enables/disables the use of the "screen" filter Ebitengine uses.
|
||||||
//
|
//
|
||||||
// The "screen" filter is a box filter from game to display resolution.
|
// The "screen" filter is a box filter from game to display resolution.
|
||||||
//
|
//
|
||||||
@ -123,7 +123,7 @@ func SetScreenFilterEnabled(enabled bool) {
|
|||||||
ui.SetScreenFilterEnabled(enabled)
|
ui.SetScreenFilterEnabled(enabled)
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsScreenFilterEnabled returns true if Ebiten's "screen" filter is enabled.
|
// IsScreenFilterEnabled returns true if Ebitengine's "screen" filter is enabled.
|
||||||
//
|
//
|
||||||
// IsScreenFilterEnabled is concurrent-safe.
|
// IsScreenFilterEnabled is concurrent-safe.
|
||||||
func IsScreenFilterEnabled() bool {
|
func IsScreenFilterEnabled() bool {
|
||||||
@ -166,12 +166,12 @@ func (i *imageDumperGame) Layout(outsideWidth, outsideHeight int) (screenWidth,
|
|||||||
//
|
//
|
||||||
// game's functions are called on the same goroutine.
|
// game's functions are called on the same goroutine.
|
||||||
//
|
//
|
||||||
// On browsers, it is strongly recommended to use iframe if you embed an Ebiten application in your website.
|
// On browsers, it is strongly recommended to use iframe if you embed an Ebitengine application in your website.
|
||||||
//
|
//
|
||||||
// RunGame must be called on the main thread.
|
// RunGame must be called on the main thread.
|
||||||
// Note that Ebiten bounds the main goroutine to the main OS thread by runtime.LockOSThread.
|
// Note that Ebitengine bounds the main goroutine to the main OS thread by runtime.LockOSThread.
|
||||||
//
|
//
|
||||||
// Ebiten tries to call game's Update function 60 times a second by default. In other words,
|
// Ebitengine tries to call game's Update function 60 times a second by default. In other words,
|
||||||
// TPS (ticks per second) is 60 by default.
|
// TPS (ticks per second) is 60 by default.
|
||||||
// This is not related to framerate (display's refresh rate).
|
// This is not related to framerate (display's refresh rate).
|
||||||
//
|
//
|
||||||
@ -205,7 +205,7 @@ func isRunGameEnded() bool {
|
|||||||
// The adopted monitor is the 'current' monitor which the window belongs to.
|
// The adopted monitor is the 'current' monitor which the window belongs to.
|
||||||
// The returned value can be given to Run or SetSize function if the perfectly fit fullscreen is needed.
|
// The returned value can be given to Run or SetSize function if the perfectly fit fullscreen is needed.
|
||||||
//
|
//
|
||||||
// On browsers, ScreenSizeInFullscreen returns the 'window' (global object) size, not 'screen' size since an Ebiten
|
// On browsers, ScreenSizeInFullscreen returns the 'window' (global object) size, not 'screen' size since an Ebitengine
|
||||||
// game should not know the outside of the window object.
|
// game should not know the outside of the window object.
|
||||||
//
|
//
|
||||||
// On mobiles, ScreenSizeInFullscreen returns (0, 0) so far.
|
// On mobiles, ScreenSizeInFullscreen returns (0, 0) so far.
|
||||||
@ -275,7 +275,7 @@ func IsFullscreen() bool {
|
|||||||
// In fullscreen mode, the game screen is automatically enlarged
|
// In fullscreen mode, the game screen is automatically enlarged
|
||||||
// to fit with the monitor. The current scale value is ignored.
|
// to fit with the monitor. The current scale value is ignored.
|
||||||
//
|
//
|
||||||
// On desktops, Ebiten uses 'windowed' fullscreen mode, which doesn't change
|
// On desktops, Ebitengine uses 'windowed' fullscreen mode, which doesn't change
|
||||||
// your monitor's resolution.
|
// your monitor's resolution.
|
||||||
//
|
//
|
||||||
// On browsers, triggering fullscreen requires a user gesture otherwise SetFullscreen does nothing but leave an error message in console.
|
// On browsers, triggering fullscreen requires a user gesture otherwise SetFullscreen does nothing but leave an error message in console.
|
||||||
|
Loading…
Reference in New Issue
Block a user