InputBuilder
ClassBuilds InputPlaceHolders for MLComponent.
- Available on all platforms
Index
Example
//@input vec2 inputSize = {64, 64}
//@input string inputName = "input"
var inputChannels = 3;
var inputBuilder = MachineLearning.createInputBuilder();
inputBuilder.setName(script.inputName);
inputBuilder.setShape(new vec3(script.inputSize.x, script.inputSize.y, inputChannels));
var inputPlaceholder = inputBuilder.build();
Extends
Methods
build()
build():
InputPlaceholder
Builds and returns a new InputPlaceholder.
Returns
Since
Lens Scripting Version 145
getTypeName()
staticgetTypeName():TypeName<InputBuilder>
Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().
Returns
TypeName<InputBuilder>
Overrides
getTypeName()
getTypeName():
string
Returns the name of this object's type.
Returns
string
Inherited from
isOfType()
isOfType(
type):boolean
Returns true if the object matches or derives from the passed in type.
Parameters
| Parameter | Type |
|---|---|
type | string |
Returns
boolean
Inherited from
isSame()
isSame(
other):boolean
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Parameters
| Parameter | Type |
|---|---|
other | ScriptObject |
Returns
boolean
Inherited from
setInputTexture()
setInputTexture(
texture):InputBuilder
Sets the input texture of the InputPlaceholder to be built.
Parameters
| Parameter | Type |
|---|---|
texture | Texture |
Returns
InputBuilder
setName()
setName(
name):InputBuilder
Sets the name of the InputPlaceholder to be built.
Parameters
| Parameter | Type |
|---|---|
name | string |
Returns
InputBuilder
setSampler()
setSampler(
sampler):InputBuilder
Sets sampler for input placeholder builder.
Parameters
| Parameter | Type |
|---|---|
sampler | Sampler |
Returns
InputBuilder
Since
Lens Scripting Version 210
setShape()
setShape(
shape):InputBuilder
Sets the shape of the InputPlaceholder to be built.
Parameters
| Parameter | Type |
|---|---|
shape | vec3 |
Returns
InputBuilder
Since
Lens Scripting Version 310
setTransformer()
setTransformer(
transformer):InputBuilder
Sets the Transformer of the InputPlaceholder to be built.
Parameters
| Parameter | Type |
|---|---|
transformer | Transformer |
Returns
InputBuilder