InputPlaceholder
Lens Studio v3.0+
Inherits from BasePlaceholder
Description
Controls input data for a neural network used by an MLComponent. For more information, see the MLComponent Scripting guide.
Properties
data
: Float32Array
Data used as input.
texture
: Texture
Texture used as input.
Inherited Methods
getTypeName()
: String
Returns the name of this object’s type.
isOfType(String type)
: Boolean
Returns true if the object matches or derives from the passed in type.
Inherited Properties
name
: String
The name of the Placeholder.
shape
: vec3
The shape of the Placeholder’s data.
transformer
: Transformer
Transformer object for applying transformations on the PlaceHolder’s data.
Examples
//@input Component.MLComponent mlComponent
//@input Asset.Texture inputTexture
script.mlComponent.onLoadingFinished = onLoadingFinished;
function onLoadingFinished() {
var input = script.mlComponent.getInput(script.inputName);
input.texture = script.inputTexture;
}
Still Looking for help?
Visit Support