Banuba SDK
|
#import <BNBEffect.h>
Instance Methods | |
(nonnull NSString *) | - url |
Thread-safe. More... | |
(void) | - callJsMethod:params: |
Call js method in effect. More... | |
(void) | - evalJs:resultCallback: |
Evaluate the script in effect. More... | |
(nonnull NSString *) | - evalJsSync: |
Evaluate the script in effect. More... | |
(void) | - reset |
Reset effect state MUST be called from the render thread. More... | |
(void) | - update |
Update effect state (evaluate scheduled JS calls) MUST be called from the render thread. More... | |
(nullable BNBScene *) | - scene |
If effect is based on Scene engine and it is activated completly - returns Scene object from the effect. More... | |
(void) | - deserialize:configOverride: |
Deserialize effect from the provided resoved_url . More... | |
(void) | - activate:fxHeight:surfaceWidth:surfaceHeight: |
activate current effect MUST be called from the render thread for OpenGL backends. More... | |
(void) | - dumpFs: |
(void) | - dump |
(nonnull NSString *) | - dumpJson |
(BNBEffectStatus) | - status |
Definition at line 16 of file BNBEffect.h.
- (void) activate: | (int32_t) | fxWidth | |
fxHeight: | (int32_t) | fxHeight | |
surfaceWidth: | (int32_t) | surfaceWidth | |
surfaceHeight: | (int32_t) | surfaceHeight | |
activate current effect MUST be called from the render thread for OpenGL backends.
- (void) callJsMethod: | (nonnull NSString *) | methodName | |
params: | (nonnull NSString *) | params | |
Call js method in effect.
methodName | JS global function name. Member functions are not supported. |
params | Function arguments. @depreacted Use evalJs instead. |
- (void) deserialize: | (nonnull NSString *) | resolvedUrl | |
configOverride: | (nonnull NSString *) | configOverride | |
Deserialize effect from the provided resoved_url
.
If configOverride
is an empty string, will use config.json
under provided resolvedUrl
, otherwise content of configOverride
will be used.
Can be called from any thread.
- (void) dump |
- (void) dumpFs: | (nonnull NSString *) | outDir |
- (nonnull NSString *) dumpJson |
- (void) evalJs: | (nonnull NSString *) | script | |
resultCallback: | (nullable id< BNBJsCallback >) | resultCallback | |
Evaluate the script
in effect.
This method is thread safe.
sctipt | JS string to execute |
js_callback | Callback for result, will be called in render thread. |
- (nonnull NSString *) evalJsSync: | (nonnull NSString *) | script |
Evaluate the script
in effect.
MUST be called from the render thread
sctipt | JS string to execute |
- (void) reset |
Reset effect state MUST be called from the render thread.
- (nullable BNBScene *) scene |
If effect is based on Scene engine and it is activated completly - returns Scene object from the effect.
Otherwise returns null. MUST be called from the render thread Returned Scene object MUST be used only from the render thread and only while the effect is in the activated state.
- (BNBEffectStatus) status |
- (void) update |
Update effect state (evaluate scheduled JS calls) MUST be called from the render thread.
- (nonnull NSString *) url |
Thread-safe.
May be called from any thread