TransformerBuilder
ClassBuilds Transformer objects for MLComponent.
- Available on all platforms
Index
Methods
Example
var transformer = MachineLearning.createTransformerBuilder()
.setVerticalAlignment(VerticalAlignment.Center)
.setHorizontalAlignment(HorizontalAlignment.Center)
.setRotation(TransformerRotation.Rotate180)
.setFillColor(new vec4(0, 0, 0, 1))
.build();
var outputBuilder = MachineLearning.createOutputBuilder();
outputBuilder.setName("probs");
outputBuilder.setShape(new vec3(1, 1, 200));
outputBuilder.setOutputMode(MachineLearning.OutputMode.Data);
outputBuilder.setTransformer(transformer);
var outputPlaceholder = outputBuilder.build();
Extends
Methods
build()
build():
Transformer
Builds and returns a Transformer object based on the current settings.
Returns
Since
Lens Scripting Version 145
getTypeName()
staticgetTypeName():TypeName<TransformerBuilder>
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<TransformerBuilder>
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
setFillColor()
setFillColor(
color):TransformerBuilder
Sets the fill value used.
Parameters
| Parameter | Type |
|---|---|
color | vec4 |
Returns
TransformerBuilder
setFlipX()
setFlipX(
value):TransformerBuilder
Enables or disables horizontal flipping.
Parameters
| Parameter | Type |
|---|---|
value | boolean |
Returns
TransformerBuilder
setFlipY()
setFlipY(
value):TransformerBuilder
Enables or disables vertical flipping.
Parameters
| Parameter | Type |
|---|---|
value | boolean |
Returns
TransformerBuilder
setHorizontalAlignment()
setHorizontalAlignment(
mode):TransformerBuilder
Sets the horizontal alignment type used.
Parameters
| Parameter | Type |
|---|---|
mode | HorizontalAlignment |
Returns
TransformerBuilder
setRotation()
setRotation(
mode):TransformerBuilder
Sets the rotation type used.
Parameters
| Parameter | Type |
|---|---|
mode | TransformerRotation |
Returns
TransformerBuilder
setStretch()
setStretch(
value):TransformerBuilder
Sets the stretching type used.
Parameters
| Parameter | Type |
|---|---|
value | boolean |
Returns
TransformerBuilder
setVerticalAlignment()
setVerticalAlignment(
mode):TransformerBuilder
Sets the vertical alignment type used.
Parameters
| Parameter | Type |
|---|---|
mode | VerticalAlignment |
Returns
TransformerBuilder