Editor.Components.StretchMode
EnumUsed with Editor.Components.BaseMeshVisual.
Index
Example
const model = this.pluginSystem.findInterface(Editor.Model.IModel) as Editor.Model.IModel;
const scene = model.project.scene;
// Create a RenderMeshVisual and set stretch mode to Fit
const obj = scene.createSceneObject('FittedMesh');
const rmv = obj.addComponent('RenderMeshVisual');
rmv.stretchMode = Editor.Components.StretchMode.Fit;
console.log(`stretchMode: ${rmv.stretchMode}`);
Enumeration Members
Fill
Fill:
number
Scale to fill the area, maintaining aspect ratio and cropping if needed.
FillAndCut
FillAndCut:
number
Scale to fill and crop to exact dimensions.
Fit
Fit:
number
Scale to fit within the area, maintaining aspect ratio with letterboxing.
FitHeight
FitHeight:
number
Scale to match height, maintaining aspect ratio.
FitWidth
FitWidth:
number
Scale to match width, maintaining aspect ratio.
Stretch
Stretch:
number
Scale to fill the area, ignoring aspect ratio.