rename requestAnimationFrame to requestFrame
This commit is contained in:
@@ -587,7 +587,7 @@ class FFIFilamentApp extends FilamentApp<Pointer> {
|
|||||||
completer.complete(true);
|
completer.complete(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
RenderThread_requestAnimationFrame(callback.nativeFunction.cast());
|
RenderThread_requestFrame(callback.nativeFunction.cast());
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await completer.future.timeout(Duration(seconds: 1));
|
await completer.future.timeout(Duration(seconds: 1));
|
||||||
@@ -669,6 +669,7 @@ class FFIFilamentApp extends FilamentApp<Pointer> {
|
|||||||
PixelDataFormat pixelDataFormat = PixelDataFormat.RGBA,
|
PixelDataFormat pixelDataFormat = PixelDataFormat.RGBA,
|
||||||
PixelDataType pixelDataType = PixelDataType.FLOAT,
|
PixelDataType pixelDataType = PixelDataType.FLOAT,
|
||||||
Future Function(View)? beforeRender}) async {
|
Future Function(View)? beforeRender}) async {
|
||||||
|
|
||||||
if (swapChain == null) {
|
if (swapChain == null) {
|
||||||
if (_swapChains.isEmpty) {
|
if (_swapChains.isEmpty) {
|
||||||
throw Exception("No swapchains registered");
|
throw Exception("No swapchains registered");
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace thermion
|
|||||||
|
|
||||||
EMSCRIPTEN_KEEPALIVE void RenderThread_create();
|
EMSCRIPTEN_KEEPALIVE void RenderThread_create();
|
||||||
EMSCRIPTEN_KEEPALIVE void RenderThread_destroy();
|
EMSCRIPTEN_KEEPALIVE void RenderThread_destroy();
|
||||||
EMSCRIPTEN_KEEPALIVE void RenderThread_requestAnimationFrame(void (*onComplete)());
|
EMSCRIPTEN_KEEPALIVE void RenderThread_requestFrame(void (*onComplete)());
|
||||||
EMSCRIPTEN_KEEPALIVE void RenderThread_setRenderTicker(TRenderTicker *tRenderTicker);
|
EMSCRIPTEN_KEEPALIVE void RenderThread_setRenderTicker(TRenderTicker *tRenderTicker);
|
||||||
EMSCRIPTEN_KEEPALIVE void RenderThread_addTask(void (*task)());
|
EMSCRIPTEN_KEEPALIVE void RenderThread_addTask(void (*task)());
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ extern "C"
|
|||||||
_renderThread->setRenderTicker(renderTicker);
|
_renderThread->setRenderTicker(renderTicker);
|
||||||
}
|
}
|
||||||
|
|
||||||
EMSCRIPTEN_KEEPALIVE void RenderThread_requestAnimationFrame(void (*onComplete)()) {
|
EMSCRIPTEN_KEEPALIVE void RenderThread_requestFrame(void (*onComplete)()) {
|
||||||
_renderThread->requestFrame(onComplete);
|
_renderThread->requestFrame(onComplete);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user