Skip to content

Commit fc4633f

Browse files
committed
Merge branch 'master' of https://github.com/KaijuEngine/kaiju
2 parents 4b58f32 + c67da31 commit fc4633f

File tree

61 files changed

+3046
-175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+3046
-175
lines changed

AGENTS.md

Lines changed: 973 additions & 0 deletions
Large diffs are not rendered by default.

src/build/raw_game.go

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,40 @@
1-
//go:build !editor
1+
/******************************************************************************/
2+
/* raw_game.go */
3+
/******************************************************************************/
4+
/* This file is part of */
5+
/* KAIJU ENGINE */
6+
/* https://kaijuengine.com/ */
7+
/******************************************************************************/
8+
/* MIT License */
9+
/* */
10+
/* Copyright (c) 2023-present Kaiju Engine authors (AUTHORS.md). */
11+
/* Copyright (c) 2015-present Brent Farris. */
12+
/* */
13+
/* May all those that this source may reach be blessed by the LORD and find */
14+
/* peace and joy in life. */
15+
/* Everyone who drinks of this water will be thirsty again; but whoever */
16+
/* drinks of the water that I will give him shall never thirst; John 4:13-14 */
17+
/* */
18+
/* Permission is hereby granted, free of charge, to any person obtaining a */
19+
/* copy of this software and associated documentation files (the "Software"), */
20+
/* to deal in the Software without restriction, including without limitation */
21+
/* the rights to use, copy, modify, merge, publish, distribute, sublicense, */
22+
/* and/or sell copies of the Software, and to permit persons to whom the */
23+
/* Software is furnished to do so, subject to the following conditions: */
24+
/* */
25+
/* The above copyright notice and this permission notice shall be included in */
26+
/* all copies or substantial portions of the Software. */
27+
/* */
28+
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS */
29+
/* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
30+
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
31+
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
32+
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT */
33+
/* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE */
34+
/* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
35+
/******************************************************************************/
36+
37+
//go:build !editor && !generator
238

339
package build
440

src/editor/editor_controls/editor_camera.go

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
package editor_controls
3838

3939
import (
40+
"math"
41+
4042
"kaijuengine.com/editor/editor_settings"
4143
"kaijuengine.com/engine"
4244
"kaijuengine.com/engine/cameras"
@@ -46,7 +48,6 @@ import (
4648
"kaijuengine.com/matrix"
4749
"kaijuengine.com/platform/hid"
4850
"kaijuengine.com/platform/profiler/tracing"
49-
"math"
5051
)
5152

5253
const (
@@ -82,7 +83,6 @@ type EditorCamera struct {
8283
mode EditorCameraMode
8384
resizeId events.Id
8485
flyCamStarted bool
85-
flyCamFlickerFix bool
8686
flySpeedModifier float32
8787
}
8888

@@ -144,8 +144,7 @@ func (e *EditorCamera) Update(host *engine.Host, delta float64) (changed bool) {
144144
lockX, lockY := win.Width()/2, win.Height()/2
145145
host.Window.HideCursor()
146146
host.Window.LockCursor(lockX, lockY)
147-
e.lastMousePos = m.Position()
148-
e.flyCamFlickerFix = false
147+
e.lastMousePos = matrix.Vec2{matrix.Float(lockX), matrix.Float(win.Height() - lockY)}
149148
e.flyCamStarted = true
150149
return true
151150
} else if e.flyCamStarted && !kb.HasAlt() && m.Released(hid.MouseButtonRight) {
@@ -154,12 +153,6 @@ func (e *EditorCamera) Update(host *engine.Host, delta float64) (changed bool) {
154153
host.Window.ShowCursor()
155154
return false
156155
} else if e.flyCamStarted && !kb.HasAlt() && m.Held(hid.MouseButtonRight) {
157-
// TODO: This is annoying and unfortunate, but functional,
158-
// basically skip one update to prevent camera jumping
159-
if !e.flyCamFlickerFix {
160-
e.flyCamFlickerFix = true
161-
return false
162-
}
163156
e.update3dFly(host, delta)
164157
return true
165158
} else {
@@ -245,9 +238,11 @@ func (e *EditorCamera) update3dFly(host *engine.Host, deltaTime float64) (change
245238
tc := e.camera.(*cameras.TurntableCamera)
246239
mouse := &host.Window.Mouse
247240
kb := &host.Window.Keyboard
248-
mp := mouse.Position()
249-
md := e.lastMousePos.Subtract(mp)
250-
tc.FlyRotate(md.X()*xSensitivity, -md.Y()*ySensitivity)
241+
if mouse.Moved() {
242+
mp := mouse.Position()
243+
md := e.lastMousePos.Subtract(mp)
244+
tc.FlyRotate(md.X()*xSensitivity, -md.Y()*ySensitivity)
245+
}
251246
cp := e.camera.Position()
252247
cl := e.camera.LookAt()
253248
var delta matrix.Vec3

src/editor/editor_overlay/sponsors/sponsors_overlay.go

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1+
/******************************************************************************/
2+
/* sponsors_overlay.go */
3+
/******************************************************************************/
4+
/* This file is part of */
5+
/* KAIJU ENGINE */
6+
/* https://kaijuengine.com/ */
7+
/******************************************************************************/
8+
/* MIT License */
9+
/* */
10+
/* Copyright (c) 2023-present Kaiju Engine authors (AUTHORS.md). */
11+
/* Copyright (c) 2015-present Brent Farris. */
12+
/* */
13+
/* May all those that this source may reach be blessed by the LORD and find */
14+
/* peace and joy in life. */
15+
/* Everyone who drinks of this water will be thirsty again; but whoever */
16+
/* drinks of the water that I will give him shall never thirst; John 4:13-14 */
17+
/* */
18+
/* Permission is hereby granted, free of charge, to any person obtaining a */
19+
/* copy of this software and associated documentation files (the "Software"), */
20+
/* to deal in the Software without restriction, including without limitation */
21+
/* the rights to use, copy, modify, merge, publish, distribute, sublicense, */
22+
/* and/or sell copies of the Software, and to permit persons to whom the */
23+
/* Software is furnished to do so, subject to the following conditions: */
24+
/* */
25+
/* The above copyright notice and this permission notice shall be included in */
26+
/* all copies or substantial portions of the Software. */
27+
/* */
28+
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS */
29+
/* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
30+
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
31+
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
32+
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT */
33+
/* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE */
34+
/* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
35+
/******************************************************************************/
36+
137
package sponsors
238

339
import (

src/editor/editor_workspace/stage_workspace/stage_workspace_editor_interface.go

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1+
/******************************************************************************/
2+
/* stage_workspace_editor_interface.go */
3+
/******************************************************************************/
4+
/* This file is part of */
5+
/* KAIJU ENGINE */
6+
/* https://kaijuengine.com/ */
7+
/******************************************************************************/
8+
/* MIT License */
9+
/* */
10+
/* Copyright (c) 2023-present Kaiju Engine authors (AUTHORS.md). */
11+
/* Copyright (c) 2015-present Brent Farris. */
12+
/* */
13+
/* May all those that this source may reach be blessed by the LORD and find */
14+
/* peace and joy in life. */
15+
/* Everyone who drinks of this water will be thirsty again; but whoever */
16+
/* drinks of the water that I will give him shall never thirst; John 4:13-14 */
17+
/* */
18+
/* Permission is hereby granted, free of charge, to any person obtaining a */
19+
/* copy of this software and associated documentation files (the "Software"), */
20+
/* to deal in the Software without restriction, including without limitation */
21+
/* the rights to use, copy, modify, merge, publish, distribute, sublicense, */
22+
/* and/or sell copies of the Software, and to permit persons to whom the */
23+
/* Software is furnished to do so, subject to the following conditions: */
24+
/* */
25+
/* The above copyright notice and this permission notice shall be included in */
26+
/* all copies or substantial portions of the Software. */
27+
/* */
28+
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS */
29+
/* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
30+
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
31+
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
32+
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT */
33+
/* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE */
34+
/* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
35+
/******************************************************************************/
36+
137
package stage_workspace
238

339
import (

src/editor/project/project_database/content_previews/content_previewer.go

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1+
/******************************************************************************/
2+
/* content_previewer.go */
3+
/******************************************************************************/
4+
/* This file is part of */
5+
/* KAIJU ENGINE */
6+
/* https://kaijuengine.com/ */
7+
/******************************************************************************/
8+
/* MIT License */
9+
/* */
10+
/* Copyright (c) 2023-present Kaiju Engine authors (AUTHORS.md). */
11+
/* Copyright (c) 2015-present Brent Farris. */
12+
/* */
13+
/* May all those that this source may reach be blessed by the LORD and find */
14+
/* peace and joy in life. */
15+
/* Everyone who drinks of this water will be thirsty again; but whoever */
16+
/* drinks of the water that I will give him shall never thirst; John 4:13-14 */
17+
/* */
18+
/* Permission is hereby granted, free of charge, to any person obtaining a */
19+
/* copy of this software and associated documentation files (the "Software"), */
20+
/* to deal in the Software without restriction, including without limitation */
21+
/* the rights to use, copy, modify, merge, publish, distribute, sublicense, */
22+
/* and/or sell copies of the Software, and to permit persons to whom the */
23+
/* Software is furnished to do so, subject to the following conditions: */
24+
/* */
25+
/* The above copyright notice and this permission notice shall be included in */
26+
/* all copies or substantial portions of the Software. */
27+
/* */
28+
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS */
29+
/* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
30+
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
31+
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
32+
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT */
33+
/* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE */
34+
/* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
35+
/******************************************************************************/
36+
137
package content_previews
238

339
import (

src/editor/project/project_database/content_previews/content_previews_editor_interface.go

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1+
/******************************************************************************/
2+
/* content_previews_editor_interface.go */
3+
/******************************************************************************/
4+
/* This file is part of */
5+
/* KAIJU ENGINE */
6+
/* https://kaijuengine.com/ */
7+
/******************************************************************************/
8+
/* MIT License */
9+
/* */
10+
/* Copyright (c) 2023-present Kaiju Engine authors (AUTHORS.md). */
11+
/* Copyright (c) 2015-present Brent Farris. */
12+
/* */
13+
/* May all those that this source may reach be blessed by the LORD and find */
14+
/* peace and joy in life. */
15+
/* Everyone who drinks of this water will be thirsty again; but whoever */
16+
/* drinks of the water that I will give him shall never thirst; John 4:13-14 */
17+
/* */
18+
/* Permission is hereby granted, free of charge, to any person obtaining a */
19+
/* copy of this software and associated documentation files (the "Software"), */
20+
/* to deal in the Software without restriction, including without limitation */
21+
/* the rights to use, copy, modify, merge, publish, distribute, sublicense, */
22+
/* and/or sell copies of the Software, and to permit persons to whom the */
23+
/* Software is furnished to do so, subject to the following conditions: */
24+
/* */
25+
/* The above copyright notice and this permission notice shall be included in */
26+
/* all copies or substantial portions of the Software. */
27+
/* */
28+
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS */
29+
/* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
30+
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
31+
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
32+
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT */
33+
/* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE */
34+
/* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
35+
/******************************************************************************/
36+
137
package content_previews
238

339
import (

src/editor/project/project_database/content_previews/material_content_preview.go

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1+
/******************************************************************************/
2+
/* material_content_preview.go */
3+
/******************************************************************************/
4+
/* This file is part of */
5+
/* KAIJU ENGINE */
6+
/* https://kaijuengine.com/ */
7+
/******************************************************************************/
8+
/* MIT License */
9+
/* */
10+
/* Copyright (c) 2023-present Kaiju Engine authors (AUTHORS.md). */
11+
/* Copyright (c) 2015-present Brent Farris. */
12+
/* */
13+
/* May all those that this source may reach be blessed by the LORD and find */
14+
/* peace and joy in life. */
15+
/* Everyone who drinks of this water will be thirsty again; but whoever */
16+
/* drinks of the water that I will give him shall never thirst; John 4:13-14 */
17+
/* */
18+
/* Permission is hereby granted, free of charge, to any person obtaining a */
19+
/* copy of this software and associated documentation files (the "Software"), */
20+
/* to deal in the Software without restriction, including without limitation */
21+
/* the rights to use, copy, modify, merge, publish, distribute, sublicense, */
22+
/* and/or sell copies of the Software, and to permit persons to whom the */
23+
/* Software is furnished to do so, subject to the following conditions: */
24+
/* */
25+
/* The above copyright notice and this permission notice shall be included in */
26+
/* all copies or substantial portions of the Software. */
27+
/* */
28+
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS */
29+
/* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
30+
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
31+
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
32+
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT */
33+
/* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE */
34+
/* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
35+
/******************************************************************************/
36+
137
package content_previews
238

339
import (

0 commit comments

Comments
 (0)