Commit graph

1561 commits

Author SHA1 Message Date
iddev5
c22e54bcd7 sysaudio: webaudio: Set internal buffer size to 512
It was 4096 before. Lower values means lower latency but higher values
are needed for clear audio. It should be properly tested across multiple
browsers to find out the correct default value, or create a formula to
auto calculate it. It should always be a multiple of 2 in the range 256,
512, ..., 8192, 16384.
2022-07-17 09:48:26 -07:00
iddev5
4c264c80cd sysjs: Allow passing arbitary values (called 'captures') alongside native functions 2022-07-17 09:48:26 -07:00
iddev5
b39261a655 sysjs: Fix passing arguments into constructor 2022-07-17 09:48:26 -07:00
Lucas Romanó
7de47a8f2d examples: add map-async example
Signed-off-by: Lucas Romanó <9062026+lucasromanosantos@users.noreply.github.com>
2022-07-17 09:27:29 -07:00
alichraghi
a825965208 dev: make update-zig work on linux 2022-07-17 09:26:29 -07:00
alichraghi
be9d2b431f {frreetype,sysaudio}: use std.refAllDeclsRecursive
added to stdlib via #12103
2022-07-17 09:26:29 -07:00
Stephen Gutekanst
0ff83ba517 gpu-dawn: update to Zig 0.10.0-dev.3027+0e26c6149 (iterate / OpenDirOptions stdlib change)
This breaking change in the Zig stdlib is not available as a nightly build yet, so our CI will
be broken for the next day or so until that becomes available and we can update it.

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-17 09:20:48 -07:00
Stephen Gutekanst
bbb276854b all: update to Zig 0.10.0-dev.3027+0e26c6149
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-17 09:20:48 -07:00
Lucas Romanó
a787265af2 examples: add image-blur example
Signed-off-by: Lucas Romanó <9062026+lucasromanosantos@users.noreply.github.com>
2022-07-15 12:02:17 -07:00
Zachary Huang
9ece370059 libmach: initial API bindings for mach core 2022-07-14 22:44:44 -07:00
iddev5
02c7fe9a75 mach: build: Add sysaudio dependency package 2022-07-14 21:55:32 -07:00
iddev5
94c4d3a679 sysaudio: webaudio: Use device descriptor to create suitable audio
context
2022-07-14 21:55:32 -07:00
iddev5
43936df45b sysaudio: webaudio: Add device start and pause 2022-07-14 21:55:32 -07:00
iddev5
21f3efe78e sysaudio: webaudio: Add intitial implementation and boilerplate 2022-07-14 21:55:32 -07:00
iddev5
a3b9bb7469 sysaudio: Add mach-sysjs dependency and prepararation for WebAudio backend 2022-07-14 21:55:32 -07:00
dweiller
ebc09ee55e ecs: generic iterator type
This change makes the the Iterator generic over the components being
queried. This restores the api to the previous style with components
given to the query() function and next() having no parameters (other
that the iterator itself).
2022-07-14 21:49:20 -07:00
dweiller
b9fc04de6a ecs: make Entities.query take a typed query 2022-07-14 21:49:20 -07:00
alichraghi
f8f4dcf55f audio: rename to 'sysaudio' 2022-07-13 01:31:08 -07:00
alichraghi
0fb712d19e audio: update upstream 2022-07-13 01:31:08 -07:00
alichraghi
2794a7438f freetype: remove deinit error logs
the error only happens when handle is null wich is unreachable
2022-07-13 01:31:08 -07:00
iddev5
7a0d39c274 mach: Rename `js-runtime subproject to sysjs` 2022-07-13 01:30:10 -07:00
dweiller
05b0df052d ecs: fix pointer invalidation in get/setComponent
The reference to the old archetype is invalidated by getOrPut() calls of
std.ArrayHashMap. The implementation of std.ArrayHashMap means that
pointers can be invalidated on getOrPut() calls even if the key exists
in the map. This means that the reference to the old archetype needs to
be refreshed unconditionally (i.e. not only if the new archetype didn't
exist previously).
2022-07-12 06:56:49 -07:00
iddev5
54780c9af8 js-runtime: Change return type of constructor methods to js.Object 2022-07-12 06:55:40 -07:00
iddev5
7b27544cce mach: build: Add platform field in App to simplify target checking
Also now add js-runtime package to app for web platform.
2022-07-12 06:55:40 -07:00
alichraghi
e712969a87 audio: add main tests 2022-07-12 06:54:00 -07:00
alichraghi
caef084a1c audio: initial interface 2022-07-12 06:54:00 -07:00
alichraghi
f1845c0f41 audio: add InStream and more functiosn coverage to soundio binding 2022-07-12 06:54:00 -07:00
alichraghi
751cceb94a audio: improve soundio-sine-wave example 2022-07-12 06:54:00 -07:00
alichraghi
d5e4c41266 freetype: don't require buffer in getGlyphName 2022-07-12 06:54:00 -07:00
iddev5
dd0a6064fb mach: Cast window positions (i64) to i32 on window resize 2022-07-09 15:07:55 -07:00
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