Package eu.webtoolkit.jwt
Class WGLWidget.JavaScriptVector
- java.lang.Object
-
- eu.webtoolkit.jwt.WGLWidget.JavaScriptVector
-
- Enclosing class:
- WGLWidget
public static class WGLWidget.JavaScriptVector extends java.lang.ObjectA client-side JavaScript vector.Using a
WGLWidget.JavaScriptVector, GL parameters can be modified without communication with the server. The value of theWGLWidget.JavaScriptMatrix4x4is updated server-side whenever an event is sent to the server.The
WGLWidget.JavaScriptVectoris represented in JavaScript as an array, either as a Float32Array or as a plain JavaScript array.
-
-
Constructor Summary
Constructors Constructor Description JavaScriptVector(int length)Create a temporarily invalidWGLWidget.JavaScriptVector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetId()java.lang.StringgetJsRef()Returns the JavaScript reference to thisWGLWidget.JavaScriptVector.intgetLength()Returns the length (number of items) of thisWGLWidget.JavaScriptVector.java.util.List<java.lang.Float>getValue()Returns the current server-side value.booleanhasContext()Returns whether this JavaScriptVector has been assigned to aWGLWidget.booleanisInitialized()Returns whether this JavaScriptVector has been initialized.
-
-
-
Constructor Detail
-
JavaScriptVector
public JavaScriptVector(int length)
Create a temporarily invalidWGLWidget.JavaScriptVector.Should be added to a WGLWidget with
WGLWidget#addJavaScriptVector(), and initialized withWGLWidget#initJavaScriptVector().
-
-
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 aWGLWidget.
-
getLength
public int getLength()
Returns the length (number of items) of thisWGLWidget.JavaScriptVector.
-
getJsRef
public java.lang.String getJsRef()
Returns the JavaScript reference to thisWGLWidget.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.JavaScriptVectorare automatically synchronized.
-
-