Class Effect.CppProxy

  • All Implemented Interfaces:
    Effect
    Enclosing interface:
    Effect

    public static final class Effect.CppProxy
    extends java.lang.Object
    implements Effect
    • Nested Class Summary

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void _djinni_private_destroy()  
      void activate​(int fxWidth, int fxHeight, int surfaceWidth, int surfaceHeight)
      activate current effect MUST be called from the render thread for OpenGL backends.
      void callJsMethod​(java.lang.String methodName, java.lang.String params)
      Call js method in effect.
      void deserialize​(java.lang.String resolvedUrl, java.lang.String configOverride)
      Deserialize effect from the provided `resoved_url`.
      void dump()  
      void dumpFs​(java.lang.String outDir)  
      java.lang.String dumpJson()  
      void evalJs​(java.lang.String script, JsCallback resultCallback)
      Evaluate the `script` in effect.
      java.lang.String evalJsSync​(java.lang.String script)
      Evaluate the `script` in effect.
      protected void finalize()  
      void reset()
      Reset effect state MUST be called from the render thread
      Scene scene()
      If effect is based on Scene engine and it is activated completly - returns Scene object from the effect.
      EffectStatus status()  
      void update()
      Update effect state (evaluate scheduled JS calls) MUST be called from the render thread
      java.lang.String url()
      Thread-safe.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • _djinni_private_destroy

        public void _djinni_private_destroy()
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable
      • url

        public java.lang.String url()
        Description copied from interface: Effect
        Thread-safe. May be called from any thread
        Specified by:
        url in interface Effect
      • callJsMethod

        public void callJsMethod​(java.lang.String methodName,
                                 java.lang.String params)
        Description copied from interface: Effect
        Call js method in effect.
        Specified by:
        callJsMethod in interface Effect
        Parameters:
        methodName - JS global function name. Member functions are not supported.
        params - Function arguments.
      • evalJs

        public void evalJs​(java.lang.String script,
                           JsCallback resultCallback)
        Description copied from interface: Effect
        Evaluate the `script` in effect. This method is thread safe.
        Specified by:
        evalJs in interface Effect
      • evalJsSync

        public java.lang.String evalJsSync​(java.lang.String script)
        Description copied from interface: Effect
        Evaluate the `script` in effect. MUST be called from the render thread
        Specified by:
        evalJsSync in interface Effect
        Returns:
        JS evaluation result
      • reset

        public void reset()
        Description copied from interface: Effect
        Reset effect state MUST be called from the render thread
        Specified by:
        reset in interface Effect
      • update

        public void update()
        Description copied from interface: Effect
        Update effect state (evaluate scheduled JS calls) MUST be called from the render thread
        Specified by:
        update in interface Effect
      • scene

        public Scene scene()
        Description copied from interface: Effect
        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.
        Specified by:
        scene in interface Effect
      • deserialize

        public void deserialize​(java.lang.String resolvedUrl,
                                java.lang.String configOverride)
        Description copied from interface: Effect
        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.
        Specified by:
        deserialize in interface Effect
      • activate

        public void activate​(int fxWidth,
                             int fxHeight,
                             int surfaceWidth,
                             int surfaceHeight)
        Description copied from interface: Effect
        activate current effect MUST be called from the render thread for OpenGL backends.
        Specified by:
        activate in interface Effect
      • dumpFs

        public void dumpFs​(java.lang.String outDir)
        Specified by:
        dumpFs in interface Effect
      • dump

        public void dump()
        Specified by:
        dump in interface Effect
      • dumpJson

        public java.lang.String dumpJson()
        Specified by:
        dumpJson in interface Effect