CaptureFrameHelper
CaptureFrameHelper is a helper class to capture camera output.
| Type | Name | Interface Description |
|---|---|---|
| Functions | constructor() | |
| Static Functions | captureCameraOutput(camera: Camera, cropRect?: Rect, resolutionRatio?: number): Texture | null | • Function: capture camera output to a texture Parameters • • • Returns The captured texture, or null if capture failed. |
Examples
constructor()
let obj = new APJS.CaptureFrameHelper();
captureCameraOutput(camera: Camera, cropRect?: Rect, resolutionRatio?: number): Texture | null
const texture = CaptureFrameHelper.captureCameraOutput(camera, new Rect(0, 0, 1, 1), 0.5);
Use Case
@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use CaptureFrameHelper here
}
onUpdate(deltaTime: number) {
}
}