Class WGLWidget.JavaScriptVector

  • Enclosing class:
    WGLWidget

    public static class WGLWidget.JavaScriptVector
    extends java.lang.Object
    A client-side JavaScript vector.

    Using a WGLWidget.JavaScriptVector, GL parameters can be modified without communication with the server. The value of the WGLWidget.JavaScriptMatrix4x4 is updated server-side whenever an event is sent to the server.

    The WGLWidget.JavaScriptVector is represented in JavaScript as an array, either as a Float32Array or as a plain JavaScript array.

    • Method Detail

      • getId

        public int getId()
      • isInitialized

        public boolean isInitialized()
        Returns whether this JavaScriptVector has been initialized.
      • hasContext

        public boolean hasContext()
        Returns whether this JavaScriptVector has been assigned to a WGLWidget.
      • getJsRef

        public java.lang.String getJsRef()
        Returns the JavaScript reference to this WGLWidget.JavaScriptVector.

        In order to get a valid JavaScript reference, this vector should have been added to a WGLWidget.

      • getValue

        public java.util.List<java.lang.Float> getValue()
        Returns the current server-side value.

        Client-side changes to the WGLWidget.JavaScriptVector are automatically synchronized.