iddev5
7a9b3de37a
glfw: Use i32 for position in Window.setMonitor
...
This partially reverts ``d3feaed ``
2022-07-09 15:07:55 -07:00
iddev5
b74cfa838e
js-runtime: Implement `fn format()` for js.Value for easier debugging
...
and logging
2022-07-09 14:36:43 -07:00
iddev5
852278ebe7
js-runtime: Add Function.paramCount to get the number of parameters
2022-07-09 14:36:43 -07:00
iddev5
e8f5ca9117
js-runtime: Add Object.attributeCount to get the number of user added
...
attributes to that object
2022-07-09 14:36:43 -07:00
iddev5
1919595adc
js-runtime: Use the same tag for both func_js and func_zig
...
There is no technical different between the ways they are used. So its
better to merge them.
This commit further removes the internal ValueTag which worked under
Tag. On doing that tag type ``.ref`` has been renamed to ``.object``.
2022-07-09 14:36:43 -07:00
iddev5
3b00b478ce
js: Implement Value.instanceOf method which performs Js' `instanceof`
...
check
2022-07-09 14:36:43 -07:00
iddev5
c587350c71
js-runtime: Support js functions in zig.readObject
2022-07-09 14:36:43 -07:00
iddev5
e67fdd75e3
js-runtime: Add Value.eql function, equivalent to Js's === operator
2022-07-09 14:36:43 -07:00
iddev5
8ec61055e3
js-runtime: Create String view type and renamed Value.value() to
...
Value.view() without allocator param
2022-07-08 18:14:50 -07:00
iddev5
51c702aebc
js-runtime: Have value_map as a map instead of array to save memory
2022-07-08 18:14:50 -07:00
iddev5
7ceb30bdf1
js-runtime: Add constructor calling capability (new operator on Js types)
2022-07-08 18:14:50 -07:00
iddev5
97e5c57bc8
js-runtime: Move function call logic to a common function
2022-07-08 18:14:50 -07:00
Jane Petrovna
04013379db
glfw: respect negative coordinates in window
2022-07-08 18:01:51 -07:00
iddev5
77a6e0605d
js-runtime: Add license information
2022-07-07 04:35:19 -07:00
iddev5
0ff8edebd9
mach: Add js-runtime as a dependency for wasm applications
...
This is a workaround for a limitation right now. The html-generator has
no way to dynamically add JS sources (and that can't be done without
using a preprocessor library) so we hardcode js-runtime in it.
In the future, I think the correct behavior would be to move tools/
inside js-runtime along with a wasm application building SDK and get rid
of any direct JS access we have today (which is just
src/platform/wasm.zig and src/platform/mach.js).
2022-07-07 04:35:19 -07:00
iddev5
d10ab25c5d
js-runtime: Upload source code from upstream
2022-07-07 04:35:19 -07:00
iddev5
34514699a1
mach: wasm: Use default log level
2022-07-06 05:55:04 -07:00
iddev5
81e6de55f8
mach: wasm: Build textured-cube and ecs-app examples
2022-07-06 05:55:04 -07:00
iddev5
5f0d54bd1b
mach: wasm: Specify base dir to be mach root dir for html-generator
...
tools/html-generator references www/template.html which was outside the
main-pkg-path of html-generator
2022-07-06 05:55:04 -07:00
PiergiorgioZagaria
4107b1d5fe
freetype: Use @embedFile()
2022-07-06 05:52:56 -07:00
PiergiorgioZagaria
b4ac18ec57
freetype: support compiling with stage2 (-fno-stage1)
2022-07-06 05:52:56 -07:00
Stephen Gutekanst
d3b03901fb
examples: add initial ecs-app
...
This is a temporary application to begin iterating on high-level ECS applications.
Eventually, this will be removed - for now it's just here so we can see how this API
looks today and improve it.
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-04 22:25:39 -07:00
Stephen Gutekanst
6ec27861b4
mach: initial support for high-level ECS applications
...
Adds experimental support for high-level ECS-based applications
following hexops/mach#349
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-04 22:25:39 -07:00
Stephen Gutekanst
167f2d3a4f
{examples,shaderexp}: make const App public
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-04 21:32:38 -07:00
Stephen Gutekanst
72ea652dca
mach: require a 'pub const App' to be exposed
...
This requires apps expose a `pub const App` from their `main.zig`, effectively adopting
the high-level/low-level application API outlined in hexops/mach#349
If `pub const App` does not exist, a clear compiler error is produced:
```
./src/platform/common.zig:5:9: error: expected e.g. `pub const App = mach.App(modules, init)' (App definition missing in your main Zig file)
@compileError("expected e.g. `pub const App = mach.App(modules, init)' (App definition missing in your main Zig file)");
^
./src/platform/native.zig:13:28: note: called from here
common.checkApplication(app_pkg);
^
./src/platform/native.zig:12:10: note: called from here
comptime {
^
./src/platform/native.zig:15:20: error: container '.app' has no member called 'App'
const App = app_pkg.App;
^
```
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-04 21:32:38 -07:00
Stephen Gutekanst
1b97c9f1e5
{examples,shaderexp}: rename mach.Engine -> mach.Core
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-04 20:14:27 -07:00
Stephen Gutekanst
e79c9e075a
mach: rename mach.Engine -> mach.Core
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-04 20:14:27 -07:00
Stephen Gutekanst
6f7f17c5e8
ecs: initial systems & message sending functionality
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-04 09:12:19 -07:00
Stephen Gutekanst
98ec7f5190
ecs: remove half-baked system implementation
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-04 09:12:19 -07:00
Stephen Gutekanst
f74faf90df
ecs: add support for module global values
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-04 09:12:19 -07:00
Stephen Gutekanst
3fddb687bc
ecs: add modules concept
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-04 09:12:19 -07:00
Stephen Gutekanst
5c4c2d3850
ecs: add namespaced components
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-04 09:12:19 -07:00
Stephen Gutekanst
87ecd8b29e
ecs: correct build pkg filepath
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-04 09:12:19 -07:00
Stephen Gutekanst
6227f11af4
ecs: correct public symbols set
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-04 09:12:19 -07:00
Stephen Gutekanst
25afe5ccf4
ecs: make [set/remove/get]Component globally type safe
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-04 09:12:19 -07:00
Stephen Gutekanst
1f7ea529f4
ecs: pass an all_components parameter to everything
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-04 09:12:19 -07:00
Ayush
858c14bbae
{mach,examples}: Fix memory leaks ( #384 )
2022-07-03 08:47:47 -07:00
Stephen Gutekanst
39e07df150
audio: link against AudioToolbox on macOS (required at least with macOS 12+)
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-01 19:05:27 -07:00
Stephen Gutekanst
b9dd94698d
glfw: update macOS system_sdk to include AudioToolbox
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-01 19:05:27 -07:00
alichraghi
fe8614d4d6
audio: add soundio-sine-wave example
2022-07-01 19:05:27 -07:00
alichraghi
0e3461e25f
audio: increase soundio binding coverage for running sine-wine example
2022-07-01 19:05:27 -07:00
alichraghi
d3b7df882e
audio: add options parameter to link()
2022-07-01 19:05:27 -07:00
dweiller
f406f42005
ecs: fix memory leak in ArchetypeStorage
2022-07-01 16:48:35 -07:00
dweiller
2d923ea9b7
ecs: fix memory corruption in set/removeComponent
2022-07-01 16:48:35 -07:00
dweiller
0893c14893
mach: native: deinit gpa for leak detection in debug builds
2022-07-01 16:48:35 -07:00
Jamie Brandon
5bb740f89e
mach: flesh out mach.Event ( #377 )
...
* Flesh out mach.Event
2022-07-01 16:47:06 -07:00
Stephen Gutekanst
da046f340d
audio: rename 'mach-audio' pkg to just 'audio'
2022-06-29 20:58:14 -07:00
alichraghi
84f8532c43
audio: make buildSoundIo private and point package to ./main.zig
2022-06-29 20:58:14 -07:00
PiergiorgioZagaria
0e8b53d840
glfw: allow to choose platform in InitHints
2022-06-29 20:54:04 -07:00
PiergiorgioZagaria
bb503b6928
glfw: do not link to wayland-client (no longer necessary, loaded at runtime by GLFW)
2022-06-29 20:54:04 -07:00