Closed Filyus closed 4 months ago
I don't see rlGetCullDistanceNear
in the current js/wasm I am building. Is this some later-version raylib fork of raylib-wasm?
These functions are inside of the /src/raylib.js
file.
In the repository file I don't see the problem with this
, but when building the file changes and this
disappears.
PS: Maybe this is better to rename it to /src/main.js
to prevent confusion with /build/raylib.js
.
Maybe this is because of wrong tools/api/rlgl.json
:
{
"name": "rlGetCullDistanceNear",
"description": "Get cull plane distance near",
"returnType": "double",
"params": [
{
"type": "",
"name": ""
}
]
},
{
"name": "rlGetCullDistanceFar",
"description": "Get cull plane distance far",
"returnType": "double",
"params": [
{
"type": "",
"name": ""
}
]
},
In the source rlgl.h
file there no parameters at all:
// Get cull plane distance near
double rlGetCullDistanceNear(void)
{
return rlCullDistanceNear;
}
// Get cull plane distance far
double rlGetCullDistanceFar(void)
{
return rlCullDistanceFar;
}
If I search the js generated by my current code, I don't see rlGetCullDistanceNear
, which makes me think your js (and tools/api/rlgl.json
) are generated from some other version of raylib.
You can see here it's not in any of my code.
I see it here which is not in 4.5, which is what I use. If you want to PR to update this repo to use 5, go for it, but last time I tried it was a bit complicated, and I could not get it working.
Maybe you need to add versions at git clone
in tools/build.sh
to make the code stable.
You are welcome to PR for it. Considering your other issue, as well, I am a bit confused why you even need to build it, at all. if you use the version I built, it works fine.
The reason is simple - the build
folder is in .gitignore
:
https://github.com/konsumer/raylib-wasm/blob/18785588e6b900671924e7d1f48e51f546bc0d44/.gitignore#L7
The reason is simple - the build folder is in .gitignore:
No, that is where output and downloaded files, created/collected in the build-process go. It is intentionally ignored.
Again, if you want to PR for the 1 line in build.sh line to set the tag to 4.5, I will accept it. I still recommend just using the prebuilt wasm/js, though, unless you are actually working on making changes to raylib-wasm.
If you want to get raylib-wasm working with raylib 5, that would also be great. I didn't have the time to get it updated myself, and there are a lot of changes, but it'd be great if it was up to date.
The short answer to the original issue "Missing this in raylib.js" is to use raylib 4.5, if you are trying to build, or just use the prebuilt.
I am going to close this, in favor of #7 The this
problem is trying to use raylib 5 with this repo, and we just don't have support for that, yet.
I locked in versions for raygui and raylib, and also included the built-files in repo (so people who just want to work on web stuff don't need all the build things.)
probably must be