Package eu.webtoolkit.jwt
Class WGLWidget.JavaScriptVector
java.lang.Object
eu.webtoolkit.jwt.WGLWidget.JavaScriptVector
- Enclosing class:
WGLWidget
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.
-
Constructor Summary
ConstructorsConstructorDescriptionJavaScriptVector(int length) Create a temporarily invalidWGLWidget.JavaScriptVector. -
Method Summary
Modifier and TypeMethodDescriptionintgetId()getJsRef()Returns the JavaScript reference to thisWGLWidget.JavaScriptVector.intReturns the length (number of items) of thisWGLWidget.JavaScriptVector.getValue()Returns the current server-side value.booleanReturns whether this JavaScriptVector has been assigned to aWGLWidget.booleanReturns whether this JavaScriptVector has been initialized.
-
Constructor Details
-
JavaScriptVector
public JavaScriptVector(int length) Create a temporarily invalidWGLWidget.JavaScriptVector.Should be added to a WGLWidget with
WGLWidget#addJavaScriptVector(), and initialized withWGLWidget#initJavaScriptVector().
-
-
Method Details
-
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
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
Returns the current server-side value.Client-side changes to the
WGLWidget.JavaScriptVectorare automatically synchronized.
-