From 153c56e678c6996bb048988db8fab7332e320397 Mon Sep 17 00:00:00 2001 From: BOW Date: Sun, 21 Apr 2024 15:00:23 +0100 Subject: [PATCH] Renamed all g3n to Cyberselves to keep standalone --- README.md | 38 ++-- animation/animation.go | 2 +- animation/channel.go | 6 +- app/app-browser.go | 4 +- app/app-desktop.go | 8 +- app/app.go | 2 +- audio/audio_file.go | 4 +- audio/listener-browser.go | 6 +- audio/listener-desktop.go | 8 +- audio/player.go | 10 +- audio/windows/README.md | 2 +- camera/camera.go | 6 +- camera/orbit_control.go | 10 +- core/RenderInfo.go | 2 +- core/logger.go | 2 +- core/node.go | 4 +- experimental/collision/collision.go | 2 +- experimental/collision/contact.go | 2 +- experimental/collision/raycaster.go | 12 +- experimental/collision/shape/convexhull.go | 12 +- experimental/collision/shape/plane.go | 2 +- experimental/collision/shape/shape.go | 2 +- experimental/collision/shape/sphere.go | 2 +- experimental/physics/broadphase.go | 2 +- experimental/physics/constraint/conetwist.go | 4 +- experimental/physics/constraint/constraint.go | 4 +- experimental/physics/constraint/distance.go | 2 +- experimental/physics/constraint/hinge.go | 4 +- experimental/physics/constraint/lock.go | 4 +- .../physics/constraint/pointtopoint.go | 4 +- experimental/physics/debug.go | 14 +- experimental/physics/equation/cone.go | 2 +- experimental/physics/equation/contact.go | 2 +- experimental/physics/equation/equation.go | 2 +- experimental/physics/equation/friction.go | 2 +- experimental/physics/equation/jacobian.go | 2 +- experimental/physics/equation/rotational.go | 2 +- .../physics/equation/rotationalmotor.go | 2 +- experimental/physics/forcefield.go | 8 +- experimental/physics/logger.go | 2 +- experimental/physics/narrowphase.go | 12 +- experimental/physics/object/body.go | 12 +- experimental/physics/particle.go | 6 +- experimental/physics/simulation.go | 173 +++++++++--------- experimental/physics/solver/gs.go | 2 +- experimental/physics/solver/solver.go | 4 +- geometry/box.go | 4 +- geometry/cone-cylinder.go | 4 +- geometry/disk.go | 4 +- geometry/geometry.go | 6 +- geometry/morph.go | 4 +- geometry/plane.go | 4 +- geometry/sphere.go | 4 +- geometry/torus.go | 4 +- geometry/tube.go | 4 +- gls/gls-browser.go | 4 +- gls/gls.go | 2 +- gls/vbo.go | 2 +- go.mod | 2 +- graphic/graphic.go | 12 +- graphic/line_strip.go | 8 +- graphic/lines.go | 8 +- graphic/mesh.go | 10 +- graphic/points.go | 8 +- graphic/rigged_mesh.go | 6 +- graphic/skeleton.go | 4 +- graphic/skybox.go | 12 +- graphic/sprite.go | 10 +- gui/builder.go | 6 +- gui/builder_panel.go | 4 +- gui/button.go | 2 +- gui/chart.go | 28 +-- gui/checkradio.go | 4 +- gui/dropdown.go | 2 +- gui/edit.go | 14 +- gui/events.go | 2 +- gui/folder.go | 2 +- gui/image.go | 2 +- gui/image_button.go | 4 +- gui/imagelabel.go | 2 +- gui/itemscroller.go | 2 +- gui/label.go | 14 +- gui/list.go | 2 +- gui/logger.go | 2 +- gui/manager.go | 4 +- gui/menu.go | 6 +- gui/panel.go | 12 +- gui/scrollbar.go | 4 +- gui/scroller.go | 4 +- gui/slider.go | 2 +- gui/splitter.go | 4 +- gui/style.go | 4 +- gui/style_dark.go | 8 +- gui/style_light.go | 8 +- gui/tabbar.go | 4 +- gui/table.go | 8 +- gui/tree.go | 4 +- gui/window.go | 6 +- light/ambient.go | 6 +- light/directional.go | 6 +- light/ilight.go | 4 +- light/logger.go | 2 +- light/point.go | 6 +- light/spot.go | 6 +- loader/collada/animation.go | 4 +- loader/collada/collada.go | 18 +- loader/collada/geometry.go | 6 +- loader/collada/logger.go | 2 +- loader/collada/material.go | 6 +- loader/collada/scene.go | 10 +- loader/gltf/gltf.go | 14 +- loader/gltf/khr_materials_common.go | 6 +- .../khr_materials_pbr_specular_glossiness.go | 2 +- loader/gltf/khr_materials_unlit.go | 2 +- loader/gltf/loader.go | 18 +- loader/gltf/logger.go | 2 +- loader/gltf/material_pbr.go | 4 +- loader/obj/logger.go | 2 +- loader/obj/obj.go | 16 +- material/material.go | 6 +- material/physical.go | 6 +- material/point.go | 2 +- material/standard.go | 4 +- renderer/postprocessor.go | 2 +- renderer/renderer.go | 18 +- renderer/shaman.go | 6 +- text/atlas.go | 2 +- text/font.go | 2 +- texture/animator.go | 2 +- texture/board.go | 26 +-- texture/texture2D.go | 4 +- util/helper/axes.go | 10 +- util/helper/grid.go | 10 +- util/helper/normals.go | 12 +- util/stats/stats.go | 2 +- util/stats/table.go | 4 +- window/canvas.go | 6 +- window/glfw.go | 6 +- window/keystate.go | 2 +- window/window.go | 6 +- 140 files changed, 478 insertions(+), 517 deletions(-) diff --git a/README.md b/README.md index 7a36a6fb..816bc788 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@

G3N Banner

- Godoc - Go Report Card + Godoc + Go Report Card Discord

@@ -71,7 +71,7 @@ Install the development files of OpenAL and Vorbis using [Homebrew](https://brew The following set of commands will download and install the engine along with all its Go dependencies: ``` -git clone https://github.com/g3n/engine g3n-engine +git clone https://github.com/Cyberselves/engine g3n-engine cd g3n-engine go install ./... ``` @@ -108,19 +108,19 @@ The code below is a basic "hello world" application ([hellog3n](https://github.c package main import ( - "github.com/g3n/engine/app" - "github.com/g3n/engine/camera" - "github.com/g3n/engine/core" - "github.com/g3n/engine/geometry" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/graphic" - "github.com/g3n/engine/gui" - "github.com/g3n/engine/light" - "github.com/g3n/engine/material" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/renderer" - "github.com/g3n/engine/util/helper" - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/app" + "github.com/Cyberselves/engine/camera" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/geometry" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/graphic" + "github.com/Cyberselves/engine/gui" + "github.com/Cyberselves/engine/light" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/renderer" + "github.com/Cyberselves/engine/util/helper" + "github.com/Cyberselves/engine/window" "time" ) @@ -199,12 +199,12 @@ For more complex demos please see the [G3N demo program](https://github.com/g3n/ ## Documentation -The complete engine API reference can be found here: [![GoDoc](https://godoc.org/github.com/g3n/engine?status.svg)](https://godoc.org/github.com/g3n/engine). +The complete engine API reference can be found here: [![GoDoc](https://godoc.org/github.com/Cyberselves/engine?status.svg)](https://godoc.org/github.com/Cyberselves/engine). There is also the beginning of a Getting Started Guide, and a newly created list of Guides and Tutorials: -* [Getting Started](https://github.com/g3n/engine/wiki/Getting-Started-(WIP)) -* [Guides and Tutorials](https://github.com/g3n/engine/wiki/Guides-and-Tutorials) +* [Getting Started](https://github.com/Cyberselves/engine/wiki/Getting-Started-(WIP)) +* [Guides and Tutorials](https://github.com/Cyberselves/engine/wiki/Guides-and-Tutorials) Along with those, a good way to learn how to use the engine is to see the source code of [G3ND - the G3N demo](https://github.com/g3n/g3nd). diff --git a/animation/animation.go b/animation/animation.go index 4653c30f..dc96ca0c 100644 --- a/animation/animation.go +++ b/animation/animation.go @@ -5,7 +5,7 @@ // Package animation package animation -import "github.com/g3n/engine/util/logger" +import "github.com/Cyberselves/engine/util/logger" // Package logger var log = logger.New("ANIMATION", logger.Default) diff --git a/animation/channel.go b/animation/channel.go index 9a1f5a46..c4224122 100644 --- a/animation/channel.go +++ b/animation/channel.go @@ -5,9 +5,9 @@ package animation import ( - "github.com/g3n/engine/core" - "github.com/g3n/engine/geometry" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/geometry" + "github.com/Cyberselves/engine/math32" ) // A Channel associates an animation parameter channel to an interpolation sampler diff --git a/app/app-browser.go b/app/app-browser.go index 704d1506..ce19c784 100644 --- a/app/app-browser.go +++ b/app/app-browser.go @@ -9,8 +9,8 @@ package app import ( "fmt" - "github.com/g3n/engine/renderer" - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/renderer" + "github.com/Cyberselves/engine/window" "syscall/js" "time" ) diff --git a/app/app-desktop.go b/app/app-desktop.go index 9215dde3..a0a751bf 100644 --- a/app/app-desktop.go +++ b/app/app-desktop.go @@ -11,10 +11,10 @@ import ( "fmt" "time" - "github.com/g3n/engine/audio/al" - "github.com/g3n/engine/audio/vorbis" - "github.com/g3n/engine/renderer" - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/audio/al" + "github.com/Cyberselves/engine/audio/vorbis" + "github.com/Cyberselves/engine/renderer" + "github.com/Cyberselves/engine/window" ) // Application diff --git a/app/app.go b/app/app.go index 740228fc..3de27554 100644 --- a/app/app.go +++ b/app/app.go @@ -5,7 +5,7 @@ // Package app implements a cross-platform G3N app. package app -import "github.com/g3n/engine/util/logger" +import "github.com/Cyberselves/engine/util/logger" // Package logger var log = logger.New("APP", logger.Default) diff --git a/audio/audio_file.go b/audio/audio_file.go index ba874d65..20543ca1 100644 --- a/audio/audio_file.go +++ b/audio/audio_file.go @@ -13,8 +13,8 @@ import ( "os" "unsafe" - "github.com/g3n/engine/audio/al" - "github.com/g3n/engine/audio/ov" + "github.com/Cyberselves/engine/audio/al" + "github.com/Cyberselves/engine/audio/ov" ) const ( diff --git a/audio/listener-browser.go b/audio/listener-browser.go index 404eb324..5ecf5077 100644 --- a/audio/listener-browser.go +++ b/audio/listener-browser.go @@ -8,9 +8,9 @@ package audio import ( - "github.com/g3n/engine/core" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" ) // Listener is an audio listener positioned in space. diff --git a/audio/listener-desktop.go b/audio/listener-desktop.go index 99f305d6..f4d2e3d6 100644 --- a/audio/listener-desktop.go +++ b/audio/listener-desktop.go @@ -8,10 +8,10 @@ package audio import ( - "github.com/g3n/engine/audio/al" - "github.com/g3n/engine/core" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/audio/al" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" ) // Listener is an audio listener positioned in space. diff --git a/audio/player.go b/audio/player.go index 9ba340ba..92b67b3a 100644 --- a/audio/player.go +++ b/audio/player.go @@ -15,10 +15,10 @@ import ( "time" "unsafe" - "github.com/g3n/engine/audio/al" - "github.com/g3n/engine/core" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/audio/al" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" ) const ( @@ -136,7 +136,7 @@ func (p *Player) Play() error { // Starts playing and starts goroutine to fill buffers al.SourcePlay(p.source) go p.run() - + return nil } diff --git a/audio/windows/README.md b/audio/windows/README.md index a94f6c0a..d0a997ff 100644 --- a/audio/windows/README.md +++ b/audio/windows/README.md @@ -9,7 +9,7 @@ The G3N engine audio support currently depends on the following external librari These libraries are easily installed in Linux systems using the distribution package manager. -For Windows, the directory `/src/github.com/g3n/engine/audio/windows` +For Windows, the directory `/src/github.com/Cyberselves/engine/audio/windows` contains the sources of these libraries, and the subdirectory `bin` contains the compiled DLLs, used during the link process. To run a G3N application in Windows you will need to copy these DLLs to the directory from which you will run your application. diff --git a/camera/camera.go b/camera/camera.go index a305da90..e2c92db4 100644 --- a/camera/camera.go +++ b/camera/camera.go @@ -6,9 +6,9 @@ package camera import ( - "github.com/g3n/engine/core" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/util/logger" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/util/logger" ) // Package logger diff --git a/camera/orbit_control.go b/camera/orbit_control.go index e790d162..a15da98e 100644 --- a/camera/orbit_control.go +++ b/camera/orbit_control.go @@ -7,10 +7,10 @@ package camera import ( "math" - "github.com/g3n/engine/core" - "github.com/g3n/engine/gui" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/gui" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/window" ) // OrbitEnabled specifies which control types are enabled. @@ -121,7 +121,7 @@ func (oc *OrbitControl) Target() math32.Vector3 { return oc.target } -//Set camera orbit target Vector3 +// Set camera orbit target Vector3 func (oc *OrbitControl) SetTarget(v math32.Vector3) { oc.target = v } diff --git a/core/RenderInfo.go b/core/RenderInfo.go index b21bc0fe..d68335b9 100644 --- a/core/RenderInfo.go +++ b/core/RenderInfo.go @@ -5,7 +5,7 @@ package core import ( - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/math32" ) // RenderInfo is passed into Render/RenderSetup calls diff --git a/core/logger.go b/core/logger.go index 76eee0e9..22eda54e 100644 --- a/core/logger.go +++ b/core/logger.go @@ -1,7 +1,7 @@ package core import ( - "github.com/g3n/engine/util/logger" + "github.com/Cyberselves/engine/util/logger" ) // Package logger diff --git a/core/node.go b/core/node.go index 1a2ae237..d75a6678 100644 --- a/core/node.go +++ b/core/node.go @@ -8,8 +8,8 @@ import ( "math" "strings" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" ) // INode is the interface for all node types. diff --git a/experimental/collision/collision.go b/experimental/collision/collision.go index 66c1ae86..8ecb4f3a 100644 --- a/experimental/collision/collision.go +++ b/experimental/collision/collision.go @@ -6,7 +6,7 @@ // WARNING: Parts of this package are experimental and incomplete! package collision -import "github.com/g3n/engine/geometry" +import "github.com/Cyberselves/engine/geometry" // TODO collision checking function dependent on collision shapes diff --git a/experimental/collision/contact.go b/experimental/collision/contact.go index 14c075c3..1a7bbf9d 100644 --- a/experimental/collision/contact.go +++ b/experimental/collision/contact.go @@ -4,7 +4,7 @@ package collision -import "github.com/g3n/engine/math32" +import "github.com/Cyberselves/engine/math32" // Contact describes a contact point, normal, and depth. type Contact struct { diff --git a/experimental/collision/raycaster.go b/experimental/collision/raycaster.go index 1aa6f671..73108618 100644 --- a/experimental/collision/raycaster.go +++ b/experimental/collision/raycaster.go @@ -7,12 +7,12 @@ package collision import ( "sort" - "github.com/g3n/engine/camera" - "github.com/g3n/engine/core" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/graphic" - "github.com/g3n/engine/material" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/camera" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/graphic" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/math32" ) // Raycaster represents an empty object that can cast rays and check for ray intersections. diff --git a/experimental/collision/shape/convexhull.go b/experimental/collision/shape/convexhull.go index 3784f89b..309844a1 100644 --- a/experimental/collision/shape/convexhull.go +++ b/experimental/collision/shape/convexhull.go @@ -5,9 +5,9 @@ package shape import ( - "github.com/g3n/engine/experimental/collision" - "github.com/g3n/engine/geometry" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/experimental/collision" + "github.com/Cyberselves/engine/geometry" + "github.com/Cyberselves/engine/math32" ) // ConvexHull is a convex triangle-based geometry used for collision detection and contact resolution. @@ -247,7 +247,7 @@ func (ch *ConvexHull) ProjectOntoWorldAxis(worldAxis, pos *math32.Vector3, quat // ===================================================================== -//{array} result The an array of contact point objects, see clipFaceAgainstHull +// {array} result The an array of contact point objects, see clipFaceAgainstHull func (ch *ConvexHull) ClipAgainstHull(chB *ConvexHull, posA, posB *math32.Vector3, quatA, quatB *math32.Quaternion, penAxis *math32.Vector3, minDist, maxDist float32) []collision.Contact { var contacts []collision.Contact @@ -295,8 +295,8 @@ func (ch *ConvexHull) WorldFace(face [3]math32.Vector3, pos *math32.Vector3, qua } // Clip a face against a hull. -//@param {Array} worldVertsB1 An array of Vec3 with vertices in the world frame. -//@param Array result Array to store resulting contact points in. Will be objects with properties: point, depth, normal. These are represented in world coordinates. +// @param {Array} worldVertsB1 An array of Vec3 with vertices in the world frame. +// @param Array result Array to store resulting contact points in. Will be objects with properties: point, depth, normal. These are represented in world coordinates. func (ch *ConvexHull) clipFaceAgainstHull(posA, penAxis *math32.Vector3, quatA *math32.Quaternion, worldClosestFaceB [3]math32.Vector3, minDist, maxDist float32) []collision.Contact { contacts := make([]collision.Contact, 0) diff --git a/experimental/collision/shape/plane.go b/experimental/collision/shape/plane.go index f0baaa29..4633a846 100644 --- a/experimental/collision/shape/plane.go +++ b/experimental/collision/shape/plane.go @@ -4,7 +4,7 @@ package shape -import "github.com/g3n/engine/math32" +import "github.com/Cyberselves/engine/math32" // Plane is an analytical collision Plane. // A plane, facing in the +Z direction. The plane has its surface at z=0 and everything below z=0 is assumed to be solid. diff --git a/experimental/collision/shape/shape.go b/experimental/collision/shape/shape.go index 0ee90a5b..33c3137e 100644 --- a/experimental/collision/shape/shape.go +++ b/experimental/collision/shape/shape.go @@ -4,7 +4,7 @@ package shape -import "github.com/g3n/engine/math32" +import "github.com/Cyberselves/engine/math32" // IShape is the interface for all collision shapes. // Shapes in this package satisfy this interface and also geometry.Geometry. diff --git a/experimental/collision/shape/sphere.go b/experimental/collision/shape/sphere.go index 0937d921..d35ea126 100644 --- a/experimental/collision/shape/sphere.go +++ b/experimental/collision/shape/sphere.go @@ -4,7 +4,7 @@ package shape -import "github.com/g3n/engine/math32" +import "github.com/Cyberselves/engine/math32" // Sphere is an analytical collision sphere. type Sphere struct { diff --git a/experimental/physics/broadphase.go b/experimental/physics/broadphase.go index 74a4696a..89fd12e1 100644 --- a/experimental/physics/broadphase.go +++ b/experimental/physics/broadphase.go @@ -6,7 +6,7 @@ package physics import ( - "github.com/g3n/engine/experimental/physics/object" + "github.com/Cyberselves/engine/experimental/physics/object" ) // CollisionPair is a pair of bodies that may be colliding. diff --git a/experimental/physics/constraint/conetwist.go b/experimental/physics/constraint/conetwist.go index 6230fdf2..c2f61abb 100644 --- a/experimental/physics/constraint/conetwist.go +++ b/experimental/physics/constraint/conetwist.go @@ -5,8 +5,8 @@ package constraint import ( - "github.com/g3n/engine/experimental/physics/equation" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/experimental/physics/equation" + "github.com/Cyberselves/engine/math32" ) // ConeTwist constraint. diff --git a/experimental/physics/constraint/constraint.go b/experimental/physics/constraint/constraint.go index 6ac9760a..e20bcdb7 100644 --- a/experimental/physics/constraint/constraint.go +++ b/experimental/physics/constraint/constraint.go @@ -6,8 +6,8 @@ package constraint import ( - "github.com/g3n/engine/experimental/physics/equation" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/experimental/physics/equation" + "github.com/Cyberselves/engine/math32" ) type IBody interface { diff --git a/experimental/physics/constraint/distance.go b/experimental/physics/constraint/distance.go index fb8eaa5d..6e1ad8c1 100644 --- a/experimental/physics/constraint/distance.go +++ b/experimental/physics/constraint/distance.go @@ -5,7 +5,7 @@ package constraint import ( - "github.com/g3n/engine/experimental/physics/equation" + "github.com/Cyberselves/engine/experimental/physics/equation" ) // Distance is a distance constraint. diff --git a/experimental/physics/constraint/hinge.go b/experimental/physics/constraint/hinge.go index 94557f7f..b89a80ed 100644 --- a/experimental/physics/constraint/hinge.go +++ b/experimental/physics/constraint/hinge.go @@ -5,8 +5,8 @@ package constraint import ( - "github.com/g3n/engine/experimental/physics/equation" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/experimental/physics/equation" + "github.com/Cyberselves/engine/math32" ) // Hinge constraint. diff --git a/experimental/physics/constraint/lock.go b/experimental/physics/constraint/lock.go index a8edbb1c..72531e22 100644 --- a/experimental/physics/constraint/lock.go +++ b/experimental/physics/constraint/lock.go @@ -5,8 +5,8 @@ package constraint import ( - "github.com/g3n/engine/experimental/physics/equation" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/experimental/physics/equation" + "github.com/Cyberselves/engine/math32" ) // Lock constraint. diff --git a/experimental/physics/constraint/pointtopoint.go b/experimental/physics/constraint/pointtopoint.go index 3096ca16..9a2db6da 100644 --- a/experimental/physics/constraint/pointtopoint.go +++ b/experimental/physics/constraint/pointtopoint.go @@ -5,8 +5,8 @@ package constraint import ( - "github.com/g3n/engine/experimental/physics/equation" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/experimental/physics/equation" + "github.com/Cyberselves/engine/math32" ) // PointToPoint is an offset constraint. diff --git a/experimental/physics/debug.go b/experimental/physics/debug.go index 20909b58..2cc5688e 100644 --- a/experimental/physics/debug.go +++ b/experimental/physics/debug.go @@ -5,13 +5,13 @@ package physics import ( - "github.com/g3n/engine/core" - "github.com/g3n/engine/experimental/collision" - "github.com/g3n/engine/geometry" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/graphic" - "github.com/g3n/engine/material" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/experimental/collision" + "github.com/Cyberselves/engine/geometry" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/graphic" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/math32" ) // This file contains helpful infrastructure for debugging physics diff --git a/experimental/physics/equation/cone.go b/experimental/physics/equation/cone.go index 6a47c5f5..5e7ba6e3 100644 --- a/experimental/physics/equation/cone.go +++ b/experimental/physics/equation/cone.go @@ -5,7 +5,7 @@ package equation import ( - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/math32" ) // Cone is a cone constraint equation. diff --git a/experimental/physics/equation/contact.go b/experimental/physics/equation/contact.go index ec0c5627..8f6ac997 100644 --- a/experimental/physics/equation/contact.go +++ b/experimental/physics/equation/contact.go @@ -5,7 +5,7 @@ package equation import ( - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/math32" ) // Contact is a contact/non-penetration constraint equation. diff --git a/experimental/physics/equation/equation.go b/experimental/physics/equation/equation.go index 8f1a46f3..d0974709 100644 --- a/experimental/physics/equation/equation.go +++ b/experimental/physics/equation/equation.go @@ -9,7 +9,7 @@ package equation import ( - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/math32" ) // IBody is the interface of all body types. diff --git a/experimental/physics/equation/friction.go b/experimental/physics/equation/friction.go index 39ca0ef9..d6338f7d 100644 --- a/experimental/physics/equation/friction.go +++ b/experimental/physics/equation/friction.go @@ -5,7 +5,7 @@ package equation import ( - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/math32" ) // Friction is a friction constraint equation. diff --git a/experimental/physics/equation/jacobian.go b/experimental/physics/equation/jacobian.go index 6952a381..fe03c932 100644 --- a/experimental/physics/equation/jacobian.go +++ b/experimental/physics/equation/jacobian.go @@ -4,7 +4,7 @@ package equation -import "github.com/g3n/engine/math32" +import "github.com/Cyberselves/engine/math32" // JacobianElement contains 6 entries, 3 spatial and 3 rotational degrees of freedom. type JacobianElement struct { diff --git a/experimental/physics/equation/rotational.go b/experimental/physics/equation/rotational.go index de363eab..a8361ff3 100644 --- a/experimental/physics/equation/rotational.go +++ b/experimental/physics/equation/rotational.go @@ -5,7 +5,7 @@ package equation import ( - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/math32" ) // Rotational is a rotational constraint equation. diff --git a/experimental/physics/equation/rotationalmotor.go b/experimental/physics/equation/rotationalmotor.go index 7d4895c3..49b67139 100644 --- a/experimental/physics/equation/rotationalmotor.go +++ b/experimental/physics/equation/rotationalmotor.go @@ -5,7 +5,7 @@ package equation import ( - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/math32" ) // RotationalMotor is a rotational motor constraint equation. diff --git a/experimental/physics/forcefield.go b/experimental/physics/forcefield.go index 015559ee..b5344714 100644 --- a/experimental/physics/forcefield.go +++ b/experimental/physics/forcefield.go @@ -4,17 +4,15 @@ package physics -import "github.com/g3n/engine/math32" +import "github.com/Cyberselves/engine/math32" // ForceField represents a force field. A force is defined for every point. type ForceField interface { ForceAt(pos *math32.Vector3) math32.Vector3 } -// // ConstantForceField is a constant force field. // It can be used to simulate surface gravity. -// type ConstantForceField struct { force math32.Vector3 } @@ -45,11 +43,9 @@ func (g *ConstantForceField) ForceAt(pos *math32.Vector3) math32.Vector3 { return g.force } -// // AttractorForceField is a force field where all forces point to a single point. // The force strength changes with the inverse distance squared. // This can be used to model planetary attractions. -// type AttractorForceField struct { position math32.Vector3 mass float32 @@ -109,10 +105,8 @@ func (pa *AttractorForceField) ForceAt(pos *math32.Vector3) math32.Vector3 { return *dir } -// // RepellerForceField is a force field where all forces point away from a single point. // The force strength changes with the inverse distance squared. -// type RepellerForceField struct { position math32.Vector3 mass float32 diff --git a/experimental/physics/logger.go b/experimental/physics/logger.go index 86020e06..c3601728 100644 --- a/experimental/physics/logger.go +++ b/experimental/physics/logger.go @@ -5,7 +5,7 @@ package physics import ( - "github.com/g3n/engine/util/logger" + "github.com/Cyberselves/engine/util/logger" ) // Package logger diff --git a/experimental/physics/narrowphase.go b/experimental/physics/narrowphase.go index 94cd3108..f6b1eed1 100644 --- a/experimental/physics/narrowphase.go +++ b/experimental/physics/narrowphase.go @@ -5,10 +5,10 @@ package physics import ( - "github.com/g3n/engine/experimental/collision/shape" - "github.com/g3n/engine/experimental/physics/equation" - "github.com/g3n/engine/experimental/physics/object" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/experimental/collision/shape" + "github.com/Cyberselves/engine/experimental/physics/equation" + "github.com/Cyberselves/engine/experimental/physics/object" + "github.com/Cyberselves/engine/math32" ) // Narrowphase @@ -149,8 +149,8 @@ func (n *Narrowphase) GenerateEquations(pairs []CollisionPair) ([]*equation.Cont // For now these collisions are ignored // TODO future: just want to check for collision (in order to dispatch events) and not create equations justTest := (bodyTypeA == object.Kinematic) && (bodyTypeB == object.Static) || - (bodyTypeA == object.Static) && (bodyTypeB == object.Kinematic) || - (bodyTypeA == object.Kinematic) && (bodyTypeB == object.Kinematic) + (bodyTypeA == object.Static) && (bodyTypeB == object.Kinematic) || + (bodyTypeA == object.Kinematic) && (bodyTypeB == object.Kinematic) // Get contacts if !justTest { diff --git a/experimental/physics/object/body.go b/experimental/physics/object/body.go index e23847ac..cb360e4c 100644 --- a/experimental/physics/object/body.go +++ b/experimental/physics/object/body.go @@ -5,10 +5,10 @@ package object import ( - "github.com/g3n/engine/experimental/collision/shape" - "github.com/g3n/engine/graphic" - "github.com/g3n/engine/material" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/experimental/collision/shape" + "github.com/Cyberselves/engine/graphic" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/math32" ) // Body represents a physics-driven body. @@ -512,8 +512,8 @@ func (b *Body) Sleeping() bool { // CollidableWith returns whether the body can collide with the specified body. func (b *Body) CollidableWith(other *Body) bool { - if (b.colFilterGroup & other.colFilterMask == 0) || - (other.colFilterGroup & b.colFilterMask == 0) || + if (b.colFilterGroup&other.colFilterMask == 0) || + (other.colFilterGroup&b.colFilterMask == 0) || (b.bodyType == Static) && (other.bodyType == Static) { return false } diff --git a/experimental/physics/particle.go b/experimental/physics/particle.go index b79184d7..6b31fa07 100644 --- a/experimental/physics/particle.go +++ b/experimental/physics/particle.go @@ -5,8 +5,8 @@ package physics //import ( -// "github.com/g3n/engine/math32" -// "github.com/g3n/engine/graphic" +// "github.com/Cyberselves/engine/math32" +// "github.com/Cyberselves/engine/graphic" //) // //// Particle represents a physics-driven particle. @@ -28,4 +28,4 @@ package physics // p.mass = 1 // p.radius = 1 // return p -//} \ No newline at end of file +//} diff --git a/experimental/physics/simulation.go b/experimental/physics/simulation.go index 8bf5a5cb..ccc6fbec 100644 --- a/experimental/physics/simulation.go +++ b/experimental/physics/simulation.go @@ -5,14 +5,14 @@ package physics import ( - "github.com/g3n/engine/experimental/physics/equation" - "github.com/g3n/engine/experimental/physics/solver" - "github.com/g3n/engine/experimental/physics/constraint" - "github.com/g3n/engine/experimental/collision" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/experimental/physics/object" - "github.com/g3n/engine/core" - "github.com/g3n/engine/experimental/collision/shape" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/experimental/collision" + "github.com/Cyberselves/engine/experimental/collision/shape" + "github.com/Cyberselves/engine/experimental/physics/constraint" + "github.com/Cyberselves/engine/experimental/physics/equation" + "github.com/Cyberselves/engine/experimental/physics/object" + "github.com/Cyberselves/engine/experimental/physics/solver" + "github.com/Cyberselves/engine/math32" ) // Simulation represents a physics simulation. @@ -21,25 +21,25 @@ type Simulation struct { forceFields []ForceField // Bodies under simulation - bodies []*object.Body // Slice of bodies. May contain nil values. - nilBodies []int // Array keeps track of which indices of the 'bodies' array are nil + bodies []*object.Body // Slice of bodies. May contain nil values. + nilBodies []int // Array keeps track of which indices of the 'bodies' array are nil // Collision tracking collisionMatrix collision.Matrix // Boolean triangular matrix indicating which pairs of bodies are colliding prevCollisionMatrix collision.Matrix // CollisionMatrix from the previous step. - allowSleep bool // Makes bodies go to sleep when they've been inactive - paused bool + allowSleep bool // Makes bodies go to sleep when they've been inactive + paused bool - quatNormalizeSkip int // How often to normalize quaternions. Set to 0 for every step, 1 for every second etc.. - // A larger value increases performance. - // If bodies tend to explode, set to a smaller value (zero to be sure nothing can go wrong). + quatNormalizeSkip int // How often to normalize quaternions. Set to 0 for every step, 1 for every second etc.. + // A larger value increases performance. + // If bodies tend to explode, set to a smaller value (zero to be sure nothing can go wrong). quatNormalizeFast bool // Set to true to use fast quaternion normalization. It is often enough accurate to use. If bodies tend to explode, set to false. - time float32 // The wall-clock time since simulation start - stepnumber int // Number of timesteps taken since start + time float32 // The wall-clock time since simulation start + stepnumber int // Number of timesteps taken since start default_dt float32 // Default and last timestep sizes - dt float32 // Currently / last used timestep. Is set to -1 if not available. This value is updated before each internal step, which means that it is "fresh" inside event callbacks. + dt float32 // Currently / last used timestep. Is set to -1 if not available. This value is updated before each internal step, which means that it is "fresh" inside event callbacks. accumulator float32 // Time accumulator for interpolation. See http://gafferongames.com/game-physics/fix-your-timestep/ @@ -47,16 +47,16 @@ type Simulation struct { narrowphase *Narrowphase // The narrowphase algorithm to use solver solver.ISolver // The solver algorithm to use, default is Gauss-Seidel - constraints []constraint.IConstraint // All constraints + constraints []constraint.IConstraint // All constraints - materials []*Material // All added materials - cMaterials []*ContactMaterial + materials []*Material // All added materials + cMaterials []*ContactMaterial //contactMaterialTable map[intPair]*ContactMaterial // Used to look up a ContactMaterial given two instances of Material. //defaultMaterial *Material defaultContactMaterial *ContactMaterial - doProfiling bool + doProfiling bool } // NewSimulation creates and returns a pointer to a new physics simulation. @@ -65,7 +65,7 @@ func NewSimulation(scene *core.Node) *Simulation { s := new(Simulation) s.time = 0 s.dt = -1 - s.default_dt = 1/60 + s.default_dt = 1 / 60 s.scene = scene // Set up broadphase, narrowphase, and solver @@ -125,7 +125,7 @@ func (s *Simulation) AddBody(body *object.Body, name string) { nilLen := len(s.nilBodies) if nilLen > 0 { idx = s.nilBodies[nilLen] - s.nilBodies = s.nilBodies[0:nilLen-1] + s.nilBodies = s.nilBodies[0 : nilLen-1] } else { idx = len(s.bodies) s.bodies = append(s.bodies, body) @@ -176,7 +176,7 @@ func (s *Simulation) RemoveBody(body *object.Body) bool { // Bodies returns the slice of bodies under simulation. // The slice may contain nil values! -func (s *Simulation) Bodies() []*object.Body{ +func (s *Simulation) Bodies() []*object.Body { return s.bodies } @@ -186,7 +186,6 @@ func (s *Simulation) Step(frameDelta float32) { s.StepPlus(frameDelta, 0, 10) } - // Step steps the simulation. // maxSubSteps should be 10 by default func (s *Simulation) StepPlus(frameDelta float32, timeSinceLastCalled float32, maxSubSteps int) { @@ -195,35 +194,35 @@ func (s *Simulation) StepPlus(frameDelta float32, timeSinceLastCalled float32, m return } - dt := frameDelta//float32(frameDelta.Seconds()) + dt := frameDelta //float32(frameDelta.Seconds()) - //if timeSinceLastCalled == 0 { // Fixed, simple stepping + //if timeSinceLastCalled == 0 { // Fixed, simple stepping - s.internalStep(dt) + s.internalStep(dt) - // Increment time - //s.time += dt + // Increment time + //s.time += dt - //} else { + //} else { // - // s.accumulator += timeSinceLastCalled - // var substeps = 0 - // for s.accumulator >= dt && substeps < maxSubSteps { - // // Do fixed steps to catch up - // s.internalStep(dt) - // s.accumulator -= dt - // substeps++ - // } + // s.accumulator += timeSinceLastCalled + // var substeps = 0 + // for s.accumulator >= dt && substeps < maxSubSteps { + // // Do fixed steps to catch up + // s.internalStep(dt) + // s.accumulator -= dt + // substeps++ + // } // - // var t = (s.accumulator % dt) / dt - // for j := 0; j < len(s.bodies); j++ { - // var b = s.bodies[j] - // b.previousPosition.lerp(b.position, t, b.interpolatedPosition) - // b.previousQuaternion.slerp(b.quaternion, t, b.interpolatedQuaternion) - // b.previousQuaternion.normalize() - // } - // s.time += timeSinceLastCalled - //} + // var t = (s.accumulator % dt) / dt + // for j := 0; j < len(s.bodies); j++ { + // var b = s.bodies[j] + // b.previousPosition.lerp(b.position, t, b.interpolatedPosition) + // b.previousQuaternion.slerp(b.quaternion, t, b.interpolatedQuaternion) + // b.previousQuaternion.normalize() + // } + // s.time += timeSinceLastCalled + //} } @@ -242,7 +241,7 @@ func (s *Simulation) Paused() bool { // ClearForces sets all body forces in the world to zero. func (s *Simulation) ClearForces() { - for i:=0; i < len(s.bodies); i++ { + for i := 0; i < len(s.bodies); i++ { s.bodies[i].ClearForces() } } @@ -293,7 +292,6 @@ func (s *Simulation) GetContactMaterial(bodyA, bodyB *object.Body) *ContactMater return cm } - // Events ===================== type CollideEvent struct { @@ -315,7 +313,6 @@ const ( // =========================== - // ApplySolution applies the specified solution to the bodies under simulation. // The solution is a set of linear and angular velocity deltas for each body. // This method alters the solution arrays. @@ -393,24 +390,24 @@ func (s *Simulation) internalStep(dt float32) { } } - // Find pairs of bodies that are potentially colliding (broadphase) + // Find pairs of bodies that are potentially colliding (broadphase) pairs := s.broadphase.FindCollisionPairs(s.bodies) // Remove some pairs before proceeding to narrowphase based on constraints' colConn property // which specifies if constrained bodies should collide with one another - s.prunePairs(pairs) // TODO review/implement + s.prunePairs(pairs) // TODO review/implement // Precompute world normals/edges only for convex bodies that will undergo narrowphase for _, body := range s.uniqueBodiesFromPairs(pairs) { - if ch, ok := body.Shape().(*shape.ConvexHull); ok{ + if ch, ok := body.Shape().(*shape.ConvexHull); ok { ch.ComputeWorldFaceNormalsAndUniqueEdges(body.Quaternion()) } } // Switch collision matrices (to keep track of which collisions started/ended) - s.collisionMatrixTick() + s.collisionMatrixTick() - // Resolve collisions and generate contact and friction equations + // Resolve collisions and generate contact and friction equations contactEqs, frictionEqs := s.narrowphase.GenerateEquations(pairs) // Add all friction equations to solver @@ -424,16 +421,16 @@ func (s *Simulation) internalStep(dt float32) { s.updateSleepAndCollisionMatrix(contactEqs[i]) } - // Add all equations from user-added constraints to the solver + // Add all equations from user-added constraints to the solver userAddedEquations := 0 - for i := 0; i < len(s.constraints); i++ { + for i := 0; i < len(s.constraints); i++ { s.constraints[i].Update() - eqs := s.constraints[i].Equations() - for j := 0; j < len(eqs); j++ { + eqs := s.constraints[i].Equations() + for j := 0; j < len(eqs); j++ { userAddedEquations++ - s.solver.AddEquation(eqs[j]) - } - } + s.solver.AddEquation(eqs[j]) + } + } // Emit events TODO implement s.emitContactEvents() @@ -450,7 +447,7 @@ func (s *Simulation) internalStep(dt float32) { } // If we have any equations to solve - if len(frictionEqs) + len(contactEqs) + userAddedEquations > 0 { + if len(frictionEqs)+len(contactEqs)+userAddedEquations > 0 { // Update effective mass for all bodies for i := 0; i < len(s.bodies); i++ { s.bodies[i].UpdateEffectiveMassProperties() @@ -463,39 +460,39 @@ func (s *Simulation) internalStep(dt float32) { s.solver.ClearEquations() } - // Apply damping (only to dynamic bodies) - // See http://code.google.com/p/bullet/issues/detail?id=74 for details - for _, body := range s.bodies { - if body != nil && body.BodyType() == object.Dynamic { + // Apply damping (only to dynamic bodies) + // See http://code.google.com/p/bullet/issues/detail?id=74 for details + for _, body := range s.bodies { + if body != nil && body.BodyType() == object.Dynamic { body.ApplyDamping(dt) - } - } + } + } - // TODO s.Dispatch(World_step_preStepEvent) + // TODO s.Dispatch(World_step_preStepEvent) // Integrate the forces into velocities and the velocities into position deltas for all bodies - // TODO future: quatNormalize := s.stepnumber % (s.quatNormalizeSkip + 1) == 0 - for _, body := range s.bodies { + // TODO future: quatNormalize := s.stepnumber % (s.quatNormalizeSkip + 1) == 0 + for _, body := range s.bodies { if body != nil { body.Integrate(dt, true, s.quatNormalizeFast) } - } - s.ClearForces() + } + s.ClearForces() - // TODO s.broadphase.dirty = true ? + // TODO s.broadphase.dirty = true ? - // Update world time - s.time += dt - s.stepnumber += 1 + // Update world time + s.time += dt + s.stepnumber += 1 - // TODO s.Dispatch(World_step_postStepEvent) + // TODO s.Dispatch(World_step_postStepEvent) - // Sleeping update - if s.allowSleep { - for i := 0; i < len(s.bodies); i++ { - s.bodies[i].SleepTick(s.time) - } - } + // Sleeping update + if s.allowSleep { + for i := 0; i < len(s.bodies); i++ { + s.bodies[i].SleepTick(s.time) + } + } } @@ -580,4 +577,4 @@ func (s *Simulation) updateSleepAndCollisionMatrix(contactEq *equation.Contact) func (s *Simulation) emitContactEvents() { //TODO -} \ No newline at end of file +} diff --git a/experimental/physics/solver/gs.go b/experimental/physics/solver/gs.go index ad7eae45..c0c7c9d9 100644 --- a/experimental/physics/solver/gs.go +++ b/experimental/physics/solver/gs.go @@ -6,7 +6,7 @@ package solver import ( - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/math32" ) // GaussSeidel equation solver. diff --git a/experimental/physics/solver/solver.go b/experimental/physics/solver/solver.go index b18f99fc..77f3c66d 100644 --- a/experimental/physics/solver/solver.go +++ b/experimental/physics/solver/solver.go @@ -6,8 +6,8 @@ package solver import ( - "github.com/g3n/engine/experimental/physics/equation" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/experimental/physics/equation" + "github.com/Cyberselves/engine/math32" ) // ISolver is the interface type for all constraint solvers. diff --git a/geometry/box.go b/geometry/box.go index 9f518bde..49a6db17 100644 --- a/geometry/box.go +++ b/geometry/box.go @@ -5,8 +5,8 @@ package geometry import ( - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" ) // NewCube creates a cube geometry with the specified size. diff --git a/geometry/cone-cylinder.go b/geometry/cone-cylinder.go index e24fecda..74b3e33b 100644 --- a/geometry/cone-cylinder.go +++ b/geometry/cone-cylinder.go @@ -7,8 +7,8 @@ package geometry import ( "math" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" ) // NewCone creates a cone geometry with the specified base radius, height, diff --git a/geometry/disk.go b/geometry/disk.go index 44d9ca91..6e3c48b6 100644 --- a/geometry/disk.go +++ b/geometry/disk.go @@ -7,8 +7,8 @@ package geometry import ( "math" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" ) // NewDisk creates a disk (filled circle) geometry with the specified diff --git a/geometry/geometry.go b/geometry/geometry.go index 449c3d67..980fb734 100644 --- a/geometry/geometry.go +++ b/geometry/geometry.go @@ -9,9 +9,9 @@ import ( "math" "strconv" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/util/logger" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/util/logger" ) // Package logger diff --git a/geometry/morph.go b/geometry/morph.go index c543a46a..c5a964cc 100644 --- a/geometry/morph.go +++ b/geometry/morph.go @@ -8,8 +8,8 @@ import ( "sort" "strconv" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" ) // MorphGeometry represents a base geometry and its morph targets. diff --git a/geometry/plane.go b/geometry/plane.go index 6e628a3d..4a0f6f12 100644 --- a/geometry/plane.go +++ b/geometry/plane.go @@ -5,8 +5,8 @@ package geometry import ( - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" ) // NewPlane creates a plane geometry with the specified width and height. diff --git a/geometry/sphere.go b/geometry/sphere.go index 27670656..daf9408b 100644 --- a/geometry/sphere.go +++ b/geometry/sphere.go @@ -7,8 +7,8 @@ package geometry import ( "math" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" ) // NewSphere creates a sphere geometry with the specified radius and number of radial segments in each dimension. diff --git a/geometry/torus.go b/geometry/torus.go index b4eb689b..83a06de4 100644 --- a/geometry/torus.go +++ b/geometry/torus.go @@ -7,8 +7,8 @@ package geometry import ( "math" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" ) // NewTorus creates a torus geometry with the specified revolution radius, tube radius, diff --git a/geometry/tube.go b/geometry/tube.go index a80ba880..e066307f 100644 --- a/geometry/tube.go +++ b/geometry/tube.go @@ -8,8 +8,8 @@ package geometry import ( "math" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" ) func CalculateNormals(indices math32.ArrayU32, positions, normals math32.ArrayF32) math32.ArrayF32 { diff --git a/gls/gls-browser.go b/gls/gls-browser.go index f63b892d..b82692d1 100644 --- a/gls/gls-browser.go +++ b/gls/gls-browser.go @@ -9,7 +9,7 @@ package gls import ( "fmt" - "github.com/g3n/engine/util/wasm" + "github.com/Cyberselves/engine/util/wasm" "syscall/js" "unsafe" ) @@ -736,7 +736,7 @@ func (gs *GLS) Uniform4f(location int32, v0, v1, v2, v3 float32) { gs.stats.Unisets++ } -//// UniformMatrix3fv sets the value of one or many 3x3 float matrices for the current program object. +// // UniformMatrix3fv sets the value of one or many 3x3 float matrices for the current program object. func (gs *GLS) UniformMatrix3fv(location int32, count int32, transpose bool, pm *float32) { data := (*[1 << 30]float32)(unsafe.Pointer(pm))[:9*count] diff --git a/gls/gls.go b/gls/gls.go index c68ec54d..0402277d 100644 --- a/gls/gls.go +++ b/gls/gls.go @@ -16,7 +16,7 @@ import ( "math" "unsafe" - "github.com/g3n/engine/util/logger" + "github.com/Cyberselves/engine/util/logger" ) // Package logger diff --git a/gls/vbo.go b/gls/vbo.go index 7a20557a..ebb1c0d9 100644 --- a/gls/vbo.go +++ b/gls/vbo.go @@ -5,7 +5,7 @@ package gls import ( - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/math32" ) // VBO abstracts an OpenGL Vertex Buffer Object. diff --git a/go.mod b/go.mod index 8cf55fca..2f50f78f 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/g3n/engine +module github.com/Cyberselves/engine go 1.13 diff --git a/graphic/graphic.go b/graphic/graphic.go index 12787dd6..af81a879 100644 --- a/graphic/graphic.go +++ b/graphic/graphic.go @@ -6,12 +6,12 @@ package graphic import ( - "github.com/g3n/engine/core" - "github.com/g3n/engine/geometry" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/material" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/util/logger" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/geometry" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/util/logger" ) // Package logger diff --git a/graphic/line_strip.go b/graphic/line_strip.go index 9ec53044..06a5e9d8 100644 --- a/graphic/line_strip.go +++ b/graphic/line_strip.go @@ -5,10 +5,10 @@ package graphic import ( - "github.com/g3n/engine/core" - "github.com/g3n/engine/geometry" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/material" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/geometry" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/material" ) // LineStrip is a Graphic which is rendered as a collection of connected lines. diff --git a/graphic/lines.go b/graphic/lines.go index b12b5fb4..762521c4 100644 --- a/graphic/lines.go +++ b/graphic/lines.go @@ -5,10 +5,10 @@ package graphic import ( - "github.com/g3n/engine/core" - "github.com/g3n/engine/geometry" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/material" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/geometry" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/material" ) // Lines is a Graphic which is rendered as a collection of independent lines. diff --git a/graphic/mesh.go b/graphic/mesh.go index 00433a74..1844fbd6 100644 --- a/graphic/mesh.go +++ b/graphic/mesh.go @@ -5,11 +5,11 @@ package graphic import ( - "github.com/g3n/engine/core" - "github.com/g3n/engine/geometry" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/material" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/geometry" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/math32" ) // Mesh is a Graphic with uniforms for the model, view, projection, and normal matrices. diff --git a/graphic/points.go b/graphic/points.go index 7196052e..38fff7d0 100644 --- a/graphic/points.go +++ b/graphic/points.go @@ -5,10 +5,10 @@ package graphic import ( - "github.com/g3n/engine/core" - "github.com/g3n/engine/geometry" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/material" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/geometry" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/material" ) // Points represents a geometry containing only points diff --git a/graphic/rigged_mesh.go b/graphic/rigged_mesh.go index b835fcf6..c2e17e49 100644 --- a/graphic/rigged_mesh.go +++ b/graphic/rigged_mesh.go @@ -7,9 +7,9 @@ package graphic import ( "strconv" - "github.com/g3n/engine/core" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" ) // MaxBoneInfluencers is the maximum number of bone influencers per vertex. diff --git a/graphic/skeleton.go b/graphic/skeleton.go index da894117..3c9a3755 100644 --- a/graphic/skeleton.go +++ b/graphic/skeleton.go @@ -5,8 +5,8 @@ package graphic import ( - "github.com/g3n/engine/core" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/math32" ) // Skeleton contains armature information. diff --git a/graphic/skybox.go b/graphic/skybox.go index d0cd7495..50d66cea 100644 --- a/graphic/skybox.go +++ b/graphic/skybox.go @@ -5,12 +5,12 @@ package graphic import ( - "github.com/g3n/engine/core" - "github.com/g3n/engine/geometry" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/material" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/texture" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/geometry" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/texture" ) // Skybox is the Graphic that represents a skybox. diff --git a/graphic/sprite.go b/graphic/sprite.go index bd45673b..1080216e 100644 --- a/graphic/sprite.go +++ b/graphic/sprite.go @@ -5,11 +5,11 @@ package graphic import ( - "github.com/g3n/engine/core" - "github.com/g3n/engine/geometry" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/material" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/geometry" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/math32" ) // Sprite is a potentially animated image positioned in space that always faces the camera. diff --git a/gui/builder.go b/gui/builder.go index 340d0c04..1c0a3494 100644 --- a/gui/builder.go +++ b/gui/builder.go @@ -12,9 +12,9 @@ import ( "strconv" "strings" - "github.com/g3n/engine/gui/assets/icon" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/gui/assets/icon" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/window" "gopkg.in/yaml.v2" ) diff --git a/gui/builder_panel.go b/gui/builder_panel.go index 1f713765..a4124de3 100644 --- a/gui/builder_panel.go +++ b/gui/builder_panel.go @@ -7,8 +7,8 @@ package gui import ( "path/filepath" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/window" ) // buildPanel builds an object of type Panel diff --git a/gui/button.go b/gui/button.go index 76c528b0..b40970e6 100644 --- a/gui/button.go +++ b/gui/button.go @@ -5,7 +5,7 @@ package gui import ( - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/window" ) /*************************************** diff --git a/gui/chart.go b/gui/chart.go index da015764..b0dc4803 100644 --- a/gui/chart.go +++ b/gui/chart.go @@ -8,13 +8,13 @@ import ( "fmt" "math" - "github.com/g3n/engine/core" - "github.com/g3n/engine/geometry" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/graphic" - "github.com/g3n/engine/material" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/renderer/shaders" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/geometry" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/graphic" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/renderer/shaders" ) func init() { @@ -23,10 +23,8 @@ func init() { shaders.AddProgram("shaderChart", "shaderChartVertex", "shaderChartFrag") } -// // Chart implements a panel which can contain a title, an x scale, // an y scale and several graphs -// type Chart struct { Panel // Embedded panel left float32 // Left margin in pixels @@ -440,10 +438,8 @@ func (ch *Chart) recalc() { } } -// // chartScaleX is a panel with GL_LINES geometry which draws the chart X horizontal scale axis, // vertical lines and line labels. -// type chartScaleX struct { Panel // Embedded panel chart *Chart // Container chart @@ -519,10 +515,8 @@ func (sx *chartScaleX) RenderSetup(gs *gls.GLS, rinfo *core.RenderInfo) { gs.Uniform4f(location, sx.pospix.X, float32(height)-sx.pospix.Y, sx.width, sx.height) } -// // ChartScaleY is a panel with LINE geometry which draws the chart Y vertical scale axis, // horizontal and labels. -// type chartScaleY struct { Panel // Embedded panel chart *Chart // Container chart @@ -604,10 +598,8 @@ func (sy *chartScaleY) RenderSetup(gs *gls.GLS, rinfo *core.RenderInfo) { gs.Uniform4f(location, sy.pospix.X, float32(height)-sy.pospix.Y, sy.width, sy.height) } -// // Graph is the GUI element that represents a single plotted function. // A Chart has an array of Graph objects. -// type Graph struct { Panel // Embedded panel chart *Chart // Container chart @@ -717,9 +709,7 @@ func (lg *Graph) RenderSetup(gs *gls.GLS, rinfo *core.RenderInfo) { gs.Uniform4f(location, lg.pospix.X, float32(height)-lg.pospix.Y, lg.width, lg.height) } -// // Chart material -// type chartMaterial struct { material.Material // Embedded material color math32.Color // emissive color @@ -741,9 +731,7 @@ func (cm *chartMaterial) RenderSetup(gs *gls.GLS) { gs.Uniform3f(cm.uniColor.Location(gs), cm.color.R, cm.color.G, cm.color.B) } -// // Vertex Shader template -// const shaderChartVertex = ` // Vertex attributes #include @@ -766,9 +754,7 @@ void main() { } ` -// // Fragment Shader template -// const shaderChartFrag = ` precision highp float; diff --git a/gui/checkradio.go b/gui/checkradio.go index fd399e6c..0b1b807c 100644 --- a/gui/checkradio.go +++ b/gui/checkradio.go @@ -5,8 +5,8 @@ package gui import ( - "github.com/g3n/engine/gui/assets/icon" - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/gui/assets/icon" + "github.com/Cyberselves/engine/window" ) const ( diff --git a/gui/dropdown.go b/gui/dropdown.go index afa7e8eb..ddc87229 100644 --- a/gui/dropdown.go +++ b/gui/dropdown.go @@ -5,7 +5,7 @@ package gui import ( - "github.com/g3n/engine/gui/assets/icon" + "github.com/Cyberselves/engine/gui/assets/icon" ) // DropDown represents a dropdown GUI element. diff --git a/gui/edit.go b/gui/edit.go index 949b8ffe..f8fcb9db 100644 --- a/gui/edit.go +++ b/gui/edit.go @@ -8,9 +8,9 @@ import ( "strings" "time" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/text" - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/text" + "github.com/Cyberselves/engine/window" ) // Edit represents a text edit box GUI element @@ -394,7 +394,7 @@ func (ed *Edit) CursorInput(s string) { // Checks if new text exceeds edit width width, _ := ed.Label.font.MeasureText(newText) - if float32(width) / float32(ed.Label.font.ScaleX()) + editMarginX + float32(1) >= ed.Label.ContentWidth() { + if float32(width)/float32(ed.Label.font.ScaleX())+editMarginX+float32(1) >= ed.Label.ContentWidth() { return } @@ -413,7 +413,7 @@ func (ed *Edit) redraw(caret bool) { line := 0 scaleX, _ := window.Get().GetScale() - ed.Label.setTextCaret(ed.text, editMarginX, int(float64(ed.width) * scaleX), caret, line, ed.col, ed.selStart, ed.selEnd) + ed.Label.setTextCaret(ed.text, editMarginX, int(float64(ed.width)*scaleX), caret, line, ed.col, ed.selStart, ed.selEnd) } // onKey receives subscribed key events @@ -500,7 +500,7 @@ func (ed *Edit) handleMouse(mouseX float32, dragged bool) { for nchars = 1; nchars <= text.StrCount(ed.text); nchars++ { width, _ := ed.Label.font.MeasureText(text.StrPrefix(ed.text, nchars)) posx := mouseX - ed.pospix.X - if posx < editMarginX + float32(float64(width) / ed.Label.font.ScaleX()) { + if posx < editMarginX+float32(float64(width)/ed.Label.font.ScaleX()) { break } } @@ -600,7 +600,7 @@ func (ed *Edit) applyStyle(s *EditStyle) { if !ed.focus && len(ed.text) == 0 && len(ed.placeHolder) > 0 { scaleX, _ := window.Get().GetScale() ed.Label.SetColor4(&s.HolderColor) - ed.Label.setTextCaret(ed.placeHolder, editMarginX, int(float64(ed.width) * scaleX), false, -1, ed.col, ed.selStart, ed.selEnd) + ed.Label.setTextCaret(ed.placeHolder, editMarginX, int(float64(ed.width)*scaleX), false, -1, ed.col, ed.selStart, ed.selEnd) } else { ed.Label.SetColor4(&s.FgColor) ed.redraw(ed.focus) diff --git a/gui/events.go b/gui/events.go index 404f25a8..3932de9a 100644 --- a/gui/events.go +++ b/gui/events.go @@ -5,7 +5,7 @@ package gui import ( - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/window" ) // Core events sent by the GUI manager. diff --git a/gui/folder.go b/gui/folder.go index 51296dc5..32bf48e9 100644 --- a/gui/folder.go +++ b/gui/folder.go @@ -5,7 +5,7 @@ package gui import ( - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/math32" ) // Folder represents a folder GUI element. diff --git a/gui/image.go b/gui/image.go index 7626ab95..994eab07 100644 --- a/gui/image.go +++ b/gui/image.go @@ -7,7 +7,7 @@ package gui import ( "image" - "github.com/g3n/engine/texture" + "github.com/Cyberselves/engine/texture" ) // Image is a Panel which contains a single Image diff --git a/gui/image_button.go b/gui/image_button.go index 672833ed..6af8b7d0 100644 --- a/gui/image_button.go +++ b/gui/image_button.go @@ -5,8 +5,8 @@ package gui import ( - "github.com/g3n/engine/texture" - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/texture" + "github.com/Cyberselves/engine/window" ) // ImageButton represents an image button GUI element diff --git a/gui/imagelabel.go b/gui/imagelabel.go index 1c6ef382..79a3d8c0 100644 --- a/gui/imagelabel.go +++ b/gui/imagelabel.go @@ -5,7 +5,7 @@ package gui import ( - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/math32" ) /*************************************** diff --git a/gui/itemscroller.go b/gui/itemscroller.go index 53a1ed06..132c24fd 100644 --- a/gui/itemscroller.go +++ b/gui/itemscroller.go @@ -7,7 +7,7 @@ package gui import ( "math" - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/window" ) // ItemScroller is the GUI element that allows scrolling of IPanels diff --git a/gui/label.go b/gui/label.go index 7a72f2f4..a702bc8c 100644 --- a/gui/label.go +++ b/gui/label.go @@ -5,11 +5,11 @@ package gui import ( - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/text" - "github.com/g3n/engine/texture" - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/text" + "github.com/Cyberselves/engine/texture" + "github.com/Cyberselves/engine/window" ) // Label is a panel which contains a texture with text. @@ -104,7 +104,7 @@ func (l *Label) SetText(text string) { // Update label panel dimensions width, height := float32(textImage.Rect.Dx()), float32(textImage.Rect.Dy()) // since we enlarged the font texture for higher quality, we have to scale it back to it's original point size - width, height = width / float32(scaleX), height / float32(scaleY) + width, height = width/float32(scaleX), height/float32(scaleY) l.Panel.SetContentSize(width, height) } @@ -247,6 +247,6 @@ func (l *Label) setTextCaret(msg string, mx, width int, drawCaret bool, line, co l.tex.SetMinFilter(gls.NEAREST) // Updates label panel dimensions - l.Panel.SetContentSize(float32(width) / float32(scaleX), float32(height) / float32(scaleY)) + l.Panel.SetContentSize(float32(width)/float32(scaleX), float32(height)/float32(scaleY)) l.text = msg } diff --git a/gui/list.go b/gui/list.go index da2d786c..f533a959 100644 --- a/gui/list.go +++ b/gui/list.go @@ -5,7 +5,7 @@ package gui import ( - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/window" ) // List represents a list GUI element diff --git a/gui/logger.go b/gui/logger.go index fddca2b5..0afa8eb7 100644 --- a/gui/logger.go +++ b/gui/logger.go @@ -5,7 +5,7 @@ package gui import ( - "github.com/g3n/engine/util/logger" + "github.com/Cyberselves/engine/util/logger" ) // Package logger diff --git a/gui/manager.go b/gui/manager.go index e05ce63b..8df579a2 100644 --- a/gui/manager.go +++ b/gui/manager.go @@ -5,8 +5,8 @@ package gui import ( - "github.com/g3n/engine/core" - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/window" ) // manager singleton diff --git a/gui/menu.go b/gui/menu.go index dff9e451..1a5a914d 100644 --- a/gui/menu.go +++ b/gui/menu.go @@ -5,9 +5,9 @@ package gui import ( - "github.com/g3n/engine/gui/assets/icon" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/gui/assets/icon" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/window" "time" ) diff --git a/gui/panel.go b/gui/panel.go index b4a3c9a1..6bcea2d8 100644 --- a/gui/panel.go +++ b/gui/panel.go @@ -5,12 +5,12 @@ package gui import ( - "github.com/g3n/engine/core" - "github.com/g3n/engine/geometry" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/graphic" - "github.com/g3n/engine/material" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/geometry" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/graphic" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/math32" ) /********************************************* diff --git a/gui/scrollbar.go b/gui/scrollbar.go index 51fb6f0b..499928ed 100644 --- a/gui/scrollbar.go +++ b/gui/scrollbar.go @@ -5,8 +5,8 @@ package gui import ( - "github.com/g3n/engine/math32" - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/window" ) /*************************************** diff --git a/gui/scroller.go b/gui/scroller.go index 951d86c9..e45dc04b 100644 --- a/gui/scroller.go +++ b/gui/scroller.go @@ -5,8 +5,8 @@ package gui import ( - "github.com/g3n/engine/math32" - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/window" ) // Scroller is the GUI element that allows scrolling of a target IPanel. diff --git a/gui/slider.go b/gui/slider.go index 45f931fb..fe997848 100644 --- a/gui/slider.go +++ b/gui/slider.go @@ -5,7 +5,7 @@ package gui import ( - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/window" ) /*************************************** diff --git a/gui/splitter.go b/gui/splitter.go index 81b65a77..3bfa8f4e 100644 --- a/gui/splitter.go +++ b/gui/splitter.go @@ -5,8 +5,8 @@ package gui import ( - "github.com/g3n/engine/math32" - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/window" ) // Splitter is a GUI element that splits two panels and can be adjusted diff --git a/gui/style.go b/gui/style.go index 728b1f99..7ceaade0 100644 --- a/gui/style.go +++ b/gui/style.go @@ -5,8 +5,8 @@ package gui import ( - "github.com/g3n/engine/math32" - "github.com/g3n/engine/text" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/text" ) // Style contains the styles for all GUI elements diff --git a/gui/style_dark.go b/gui/style_dark.go index 828bf086..a49b43c2 100644 --- a/gui/style_dark.go +++ b/gui/style_dark.go @@ -5,10 +5,10 @@ package gui import ( - "github.com/g3n/engine/gui/assets" - "github.com/g3n/engine/gui/assets/icon" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/text" + "github.com/Cyberselves/engine/gui/assets" + "github.com/Cyberselves/engine/gui/assets/icon" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/text" ) // NewDarkStyle creates and returns a pointer to the a new "dark" style diff --git a/gui/style_light.go b/gui/style_light.go index 5e848015..65316aff 100644 --- a/gui/style_light.go +++ b/gui/style_light.go @@ -5,10 +5,10 @@ package gui import ( - "github.com/g3n/engine/gui/assets" - "github.com/g3n/engine/gui/assets/icon" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/text" + "github.com/Cyberselves/engine/gui/assets" + "github.com/Cyberselves/engine/gui/assets/icon" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/text" ) // NewLightStyle creates and returns a pointer to the a new "light" style diff --git a/gui/tabbar.go b/gui/tabbar.go index f478500d..4f14cfed 100644 --- a/gui/tabbar.go +++ b/gui/tabbar.go @@ -7,7 +7,7 @@ package gui import ( "fmt" - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/window" ) // TabBar is a panel which can contain other panels arranged in horizontal Tabs. @@ -380,9 +380,7 @@ func (tb *TabBar) update() { tb.applyStyle(&tb.styles.Normal) } -// // Tab describes an individual tab of the TabBar -// type Tab struct { tb *TabBar // Pointer to parent *TabBar styles *TabStyles // Pointer to Tab current styles diff --git a/gui/table.go b/gui/table.go index 871dc35e..fb4ff665 100644 --- a/gui/table.go +++ b/gui/table.go @@ -10,9 +10,9 @@ import ( "sort" "strconv" - "github.com/g3n/engine/gui/assets/icon" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/gui/assets/icon" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/window" ) const ( @@ -56,10 +56,8 @@ const ( tableErrInvCol = "Invalid column id" ) -// // Table implements a panel which can contains child panels // organized in rows and columns. -// type Table struct { Panel // Embedded panel styles *TableStyles // pointer to current styles diff --git a/gui/tree.go b/gui/tree.go index eb1ec290..12b0ea03 100644 --- a/gui/tree.go +++ b/gui/tree.go @@ -5,8 +5,8 @@ package gui import ( - "github.com/g3n/engine/math32" - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/window" ) // Tree is the tree structure GUI element. diff --git a/gui/window.go b/gui/window.go index a5c1bc38..c38e6dda 100644 --- a/gui/window.go +++ b/gui/window.go @@ -5,9 +5,9 @@ package gui import ( - "github.com/g3n/engine/gui/assets/icon" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/window" + "github.com/Cyberselves/engine/gui/assets/icon" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/window" ) /********************************************* diff --git a/light/ambient.go b/light/ambient.go index 82604245..2de06668 100644 --- a/light/ambient.go +++ b/light/ambient.go @@ -5,9 +5,9 @@ package light import ( - "github.com/g3n/engine/core" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" ) // Ambient represents an ambient light diff --git a/light/directional.go b/light/directional.go index efb0cc11..e3d5b557 100644 --- a/light/directional.go +++ b/light/directional.go @@ -5,9 +5,9 @@ package light import ( - "github.com/g3n/engine/core" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" ) // Directional represents a directional, positionless light diff --git a/light/ilight.go b/light/ilight.go index 58a414ea..a3b27cc2 100644 --- a/light/ilight.go +++ b/light/ilight.go @@ -5,8 +5,8 @@ package light import ( - "github.com/g3n/engine/core" - "github.com/g3n/engine/gls" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/gls" ) // ILight is the interface that must be implemented for all light types. diff --git a/light/logger.go b/light/logger.go index 6cc8d9e9..8bea3ff2 100644 --- a/light/logger.go +++ b/light/logger.go @@ -5,7 +5,7 @@ package light import ( - "github.com/g3n/engine/util/logger" + "github.com/Cyberselves/engine/util/logger" ) // Package logger diff --git a/light/point.go b/light/point.go index 2655a6d7..7208f5d2 100644 --- a/light/point.go +++ b/light/point.go @@ -5,9 +5,9 @@ package light import ( - "github.com/g3n/engine/core" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" ) // Point is an omnidirectional light source diff --git a/light/spot.go b/light/spot.go index 11d14565..2f152ad3 100644 --- a/light/spot.go +++ b/light/spot.go @@ -5,9 +5,9 @@ package light import ( - "github.com/g3n/engine/core" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" ) // Spot represents a spotlight diff --git a/loader/collada/animation.go b/loader/collada/animation.go index 6fa69d9b..5311c961 100644 --- a/loader/collada/animation.go +++ b/loader/collada/animation.go @@ -8,8 +8,8 @@ import ( "fmt" "strings" - "github.com/g3n/engine/core" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/math32" ) // AnimationTarget contains all animation channels for an specific target node diff --git a/loader/collada/collada.go b/loader/collada/collada.go index 46128642..8223a178 100644 --- a/loader/collada/collada.go +++ b/loader/collada/collada.go @@ -11,9 +11,9 @@ import ( "io" "os" - "github.com/g3n/engine/geometry" - "github.com/g3n/engine/material" - "github.com/g3n/engine/texture" + "github.com/Cyberselves/engine/geometry" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/texture" ) // Decoder contains all decoded data from collada file @@ -66,9 +66,7 @@ func (d *Decoder) SetDirImages(path string) { d.dirImages = path } -// // Collada DOM root -// type Collada struct { Version string Asset Asset @@ -82,10 +80,8 @@ type Collada struct { Scene *Scene } -// // Dump writes to the specified writer a text dump of the decoded Collada DOM // to aid debugging. -// func (d *Decoder) Dump(out io.Writer, indent int) { fmt.Fprintf(out, "%sCollada version:%s\n", sIndent(indent), d.dom.Version) @@ -100,9 +96,7 @@ func (d *Decoder) Dump(out io.Writer, indent int) { d.dom.Scene.Dump(out, indent+step) } -// // Contributor -// type Contributor struct { Author string AuthorEmail string @@ -141,9 +135,7 @@ func (c *Contributor) Dump(out io.Writer, indent int) { } } -// // Asset -// type Asset struct { Contributor Contributor Created string @@ -162,9 +154,7 @@ func (a *Asset) Dump(out io.Writer, indent int) { fmt.Fprintf(out, "%sUpAxis:%s\n", sIndent(ind), a.UpAxis) } -// // Scene -// type Scene struct { InstanceVisualScene *InstanceVisualScene } @@ -177,9 +167,7 @@ func (s *Scene) Dump(out io.Writer, indent int) { s.InstanceVisualScene.Dump(out, ind) } -// // InstanceVisualScene -// type InstanceVisualScene struct { Sid string Name string diff --git a/loader/collada/geometry.go b/loader/collada/geometry.go index 8bfb9586..820cc029 100644 --- a/loader/collada/geometry.go +++ b/loader/collada/geometry.go @@ -9,9 +9,9 @@ import ( "reflect" "strings" - "github.com/g3n/engine/geometry" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/geometry" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" ) // GetGeometry returns a pointer to an instance of the geometry diff --git a/loader/collada/logger.go b/loader/collada/logger.go index 5f8629f0..4fc963c6 100644 --- a/loader/collada/logger.go +++ b/loader/collada/logger.go @@ -5,7 +5,7 @@ package collada import ( - "github.com/g3n/engine/util/logger" + "github.com/Cyberselves/engine/util/logger" ) // Package logger diff --git a/loader/collada/material.go b/loader/collada/material.go index 27187a84..8f741f42 100644 --- a/loader/collada/material.go +++ b/loader/collada/material.go @@ -9,9 +9,9 @@ import ( "path/filepath" "strings" - "github.com/g3n/engine/material" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/texture" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/texture" ) // GetMaterial returns a pointer to an instance of the material diff --git a/loader/collada/scene.go b/loader/collada/scene.go index ebaaf2ea..5ba099d4 100644 --- a/loader/collada/scene.go +++ b/loader/collada/scene.go @@ -8,11 +8,11 @@ import ( "fmt" "strings" - "github.com/g3n/engine/core" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/graphic" - "github.com/g3n/engine/material" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/graphic" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/math32" ) // NewScene returns a new collada empty scene diff --git a/loader/gltf/gltf.go b/loader/gltf/gltf.go index 19349179..97ff0bc6 100644 --- a/loader/gltf/gltf.go +++ b/loader/gltf/gltf.go @@ -8,13 +8,13 @@ package gltf import ( "image" - "github.com/g3n/engine/animation" - "github.com/g3n/engine/camera" - "github.com/g3n/engine/core" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/graphic" - "github.com/g3n/engine/material" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/animation" + "github.com/Cyberselves/engine/camera" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/graphic" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/math32" ) // glTF Extensions. diff --git a/loader/gltf/khr_materials_common.go b/loader/gltf/khr_materials_common.go index 1099b1e4..308b0db4 100644 --- a/loader/gltf/khr_materials_common.go +++ b/loader/gltf/khr_materials_common.go @@ -1,9 +1,9 @@ package gltf import ( - "github.com/g3n/engine/material" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/texture" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/texture" ) // loadMaterialCommon receives an interface value describing a KHR_materials_common extension, diff --git a/loader/gltf/khr_materials_pbr_specular_glossiness.go b/loader/gltf/khr_materials_pbr_specular_glossiness.go index 3a06bc4e..8958bfd2 100644 --- a/loader/gltf/khr_materials_pbr_specular_glossiness.go +++ b/loader/gltf/khr_materials_pbr_specular_glossiness.go @@ -1,7 +1,7 @@ package gltf import ( - "github.com/g3n/engine/material" + "github.com/Cyberselves/engine/material" ) // TODO diff --git a/loader/gltf/khr_materials_unlit.go b/loader/gltf/khr_materials_unlit.go index 35d08797..b43350d7 100644 --- a/loader/gltf/khr_materials_unlit.go +++ b/loader/gltf/khr_materials_unlit.go @@ -1,7 +1,7 @@ package gltf import ( - "github.com/g3n/engine/material" + "github.com/Cyberselves/engine/material" ) // TODO diff --git a/loader/gltf/loader.go b/loader/gltf/loader.go index 83d0f47a..a0a5a91a 100644 --- a/loader/gltf/loader.go +++ b/loader/gltf/loader.go @@ -19,15 +19,15 @@ import ( "strings" "unsafe" - "github.com/g3n/engine/animation" - "github.com/g3n/engine/camera" - "github.com/g3n/engine/core" - "github.com/g3n/engine/geometry" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/graphic" - "github.com/g3n/engine/material" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/texture" + "github.com/Cyberselves/engine/animation" + "github.com/Cyberselves/engine/camera" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/geometry" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/graphic" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/texture" ) // ParseJSON parses the glTF data from the specified JSON file diff --git a/loader/gltf/logger.go b/loader/gltf/logger.go index 686ab1f5..2e60e639 100644 --- a/loader/gltf/logger.go +++ b/loader/gltf/logger.go @@ -5,7 +5,7 @@ package gltf import ( - "github.com/g3n/engine/util/logger" + "github.com/Cyberselves/engine/util/logger" ) // Package logger diff --git a/loader/gltf/material_pbr.go b/loader/gltf/material_pbr.go index 7fa34c9c..f0364180 100644 --- a/loader/gltf/material_pbr.go +++ b/loader/gltf/material_pbr.go @@ -3,8 +3,8 @@ package gltf import ( "fmt" - "github.com/g3n/engine/material" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/math32" ) func (g *GLTF) loadMaterialPBR(m *Material) (material.IMaterial, error) { diff --git a/loader/obj/logger.go b/loader/obj/logger.go index 649ede95..c3c7342f 100644 --- a/loader/obj/logger.go +++ b/loader/obj/logger.go @@ -5,7 +5,7 @@ package obj import ( - "github.com/g3n/engine/util/logger" + "github.com/Cyberselves/engine/util/logger" ) // Package logger diff --git a/loader/obj/obj.go b/loader/obj/obj.go index febc9b41..ca1a85e9 100644 --- a/loader/obj/obj.go +++ b/loader/obj/obj.go @@ -18,13 +18,13 @@ import ( "strconv" "strings" - "github.com/g3n/engine/core" - "github.com/g3n/engine/geometry" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/graphic" - "github.com/g3n/engine/material" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/texture" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/geometry" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/graphic" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/texture" ) // Decoder contains all decoded data from the obj and mtl files @@ -145,7 +145,7 @@ func DecodeReader(objreader, mtlreader io.Reader) (*Decoder, error) { return nil, err } - if (mtlreader != nil) { + if mtlreader != nil { // Parses mtl lines // 1) try passed in mtlreader, // 2) try file in mtllib line diff --git a/material/material.go b/material/material.go index 77a4ba15..e3e88b59 100644 --- a/material/material.go +++ b/material/material.go @@ -7,9 +7,9 @@ package material import ( - "github.com/g3n/engine/gls" - "github.com/g3n/engine/texture" - "github.com/g3n/engine/util/logger" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/texture" + "github.com/Cyberselves/engine/util/logger" ) // Package logger diff --git a/material/physical.go b/material/physical.go index a8bc8557..901989ba 100644 --- a/material/physical.go +++ b/material/physical.go @@ -5,9 +5,9 @@ package material import ( - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/texture" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/texture" ) // Physical is a physically based rendered material which uses the metallic-roughness model. diff --git a/material/point.go b/material/point.go index 4ff4f139..215bba0f 100644 --- a/material/point.go +++ b/material/point.go @@ -5,7 +5,7 @@ package material import ( - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/math32" ) // Point material is normally used for single point sprites diff --git a/material/standard.go b/material/standard.go index 73ff1c87..637382f0 100644 --- a/material/standard.go +++ b/material/standard.go @@ -5,8 +5,8 @@ package material import ( - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" ) // Standard material supports the classic lighting model with diff --git a/renderer/postprocessor.go b/renderer/postprocessor.go index 1ae66172..e38026e5 100644 --- a/renderer/postprocessor.go +++ b/renderer/postprocessor.go @@ -5,7 +5,7 @@ // Package renderer implements the scene renderer. package renderer -import "github.com/g3n/engine/gls" +import "github.com/Cyberselves/engine/gls" type Postprocessor struct { Width int32 diff --git a/renderer/renderer.go b/renderer/renderer.go index cf77fb1c..41e217fa 100644 --- a/renderer/renderer.go +++ b/renderer/renderer.go @@ -8,15 +8,15 @@ package renderer import ( "sort" - "github.com/g3n/engine/camera" - "github.com/g3n/engine/core" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/graphic" - "github.com/g3n/engine/gui" - "github.com/g3n/engine/light" - "github.com/g3n/engine/material" - "github.com/g3n/engine/math32" - "github.com/g3n/engine/util/logger" + "github.com/Cyberselves/engine/camera" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/graphic" + "github.com/Cyberselves/engine/gui" + "github.com/Cyberselves/engine/light" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/math32" + "github.com/Cyberselves/engine/util/logger" ) // Package logger diff --git a/renderer/shaman.go b/renderer/shaman.go index 1b210442..09d845ed 100644 --- a/renderer/shaman.go +++ b/renderer/shaman.go @@ -11,9 +11,9 @@ import ( "strconv" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/material" - "github.com/g3n/engine/renderer/shaders" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/renderer/shaders" ) // Regular expression to parse #include [quantity] directive diff --git a/text/atlas.go b/text/atlas.go index a6f8d917..2e40a491 100644 --- a/text/atlas.go +++ b/text/atlas.go @@ -12,7 +12,7 @@ import ( "os" "unicode/utf8" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/math32" ) // CharInfo contains the information to locate a character in an Atlas diff --git a/text/font.go b/text/font.go index e096f535..d7634575 100644 --- a/text/font.go +++ b/text/font.go @@ -12,7 +12,7 @@ import ( "math" "strings" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/math32" "github.com/golang/freetype/truetype" "golang.org/x/image/font" "golang.org/x/image/math/fixed" diff --git a/texture/animator.go b/texture/animator.go index 28b24431..0445ee4d 100644 --- a/texture/animator.go +++ b/texture/animator.go @@ -7,7 +7,7 @@ package texture import ( "time" - "github.com/g3n/engine/gls" + "github.com/Cyberselves/engine/gls" ) // Animator can generate a texture animation based on a texture sheet diff --git a/texture/board.go b/texture/board.go index 3ec5a643..c0b2cbf5 100644 --- a/texture/board.go +++ b/texture/board.go @@ -5,25 +5,25 @@ package texture import ( - "github.com/g3n/engine/gls" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/math32" ) // NewBoard creates and returns a pointer to a new checker board 2D texture. // A checker board texture contains up to 4 different colors arranged in // the following order: -// +------+------+ -// | | | -// | c3 | c4 | -// | | | -// +------+------+ -// | | | -// | c1 | c2 | height (pixels) -// | | | -// +------+------+ -// width -// (pixels) // +// +------+------+ +// | | | +// | c3 | c4 | +// | | | +// +------+------+ +// | | | +// | c1 | c2 | height (pixels) +// | | | +// +------+------+ +// width +// (pixels) func NewBoard(width, height int, c1, c2, c3, c4 *math32.Color, alpha float32) *Texture2D { // Generates texture data diff --git a/texture/texture2D.go b/texture/texture2D.go index 9a00c2fd..325b6190 100644 --- a/texture/texture2D.go +++ b/texture/texture2D.go @@ -14,9 +14,9 @@ import ( _ "image/png" "os" - "github.com/g3n/engine/util/logger" + "github.com/Cyberselves/engine/util/logger" - "github.com/g3n/engine/gls" + "github.com/Cyberselves/engine/gls" ) // Package logger diff --git a/util/helper/axes.go b/util/helper/axes.go index 37b56f74..3149c705 100644 --- a/util/helper/axes.go +++ b/util/helper/axes.go @@ -5,11 +5,11 @@ package helper import ( - "github.com/g3n/engine/geometry" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/graphic" - "github.com/g3n/engine/material" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/geometry" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/graphic" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/math32" ) // Axes is a visual representation of the three axes. diff --git a/util/helper/grid.go b/util/helper/grid.go index 2b60b2b5..48e4934d 100644 --- a/util/helper/grid.go +++ b/util/helper/grid.go @@ -5,11 +5,11 @@ package helper import ( - "github.com/g3n/engine/geometry" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/graphic" - "github.com/g3n/engine/material" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/geometry" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/graphic" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/math32" ) // Grid is a visual representation of a grid. diff --git a/util/helper/normals.go b/util/helper/normals.go index 147446aa..53be8401 100644 --- a/util/helper/normals.go +++ b/util/helper/normals.go @@ -5,12 +5,12 @@ package helper import ( - "github.com/g3n/engine/core" - "github.com/g3n/engine/geometry" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/graphic" - "github.com/g3n/engine/material" - "github.com/g3n/engine/math32" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/geometry" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/graphic" + "github.com/Cyberselves/engine/material" + "github.com/Cyberselves/engine/math32" ) // Normals is the visual representation of the normals of a target object. diff --git a/util/stats/stats.go b/util/stats/stats.go index fd1adf3b..48bfde4c 100644 --- a/util/stats/stats.go +++ b/util/stats/stats.go @@ -4,7 +4,7 @@ import ( "runtime" "time" - "github.com/g3n/engine/gls" + "github.com/Cyberselves/engine/gls" ) // Stats contains several statistics useful for performance evaluation diff --git a/util/stats/table.go b/util/stats/table.go index 57ca2d32..277bfd1e 100644 --- a/util/stats/table.go +++ b/util/stats/table.go @@ -1,8 +1,8 @@ package stats import ( - "github.com/g3n/engine/gls" - "github.com/g3n/engine/gui" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/gui" ) // StatsTable is a gui.Table panel with statistics diff --git a/window/canvas.go b/window/canvas.go index 34ca663a..e140388c 100644 --- a/window/canvas.go +++ b/window/canvas.go @@ -9,9 +9,9 @@ package window import ( "fmt" - "github.com/g3n/engine/core" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/util/wasm" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/util/wasm" _ "image/png" "syscall/js" ) diff --git a/window/glfw.go b/window/glfw.go index 9910b6d4..1b2911d7 100644 --- a/window/glfw.go +++ b/window/glfw.go @@ -15,9 +15,9 @@ import ( "os" "runtime" - "github.com/g3n/engine/core" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/gui/assets" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/gui/assets" "github.com/go-gl/glfw/v3.3/glfw" ) diff --git a/window/keystate.go b/window/keystate.go index 8fd78ccb..38c27148 100644 --- a/window/keystate.go +++ b/window/keystate.go @@ -4,7 +4,7 @@ package window -import "github.com/g3n/engine/core" +import "github.com/Cyberselves/engine/core" // KeyState keeps track of the state of all keys. type KeyState struct { diff --git a/window/window.go b/window/window.go index 14849d7c..fb0c35d5 100644 --- a/window/window.go +++ b/window/window.go @@ -9,9 +9,9 @@ package window import ( "fmt" - "github.com/g3n/engine/core" - "github.com/g3n/engine/gls" - "github.com/g3n/engine/util/logger" + "github.com/Cyberselves/engine/core" + "github.com/Cyberselves/engine/gls" + "github.com/Cyberselves/engine/util/logger" ) // Package logger