Zoom
Zooms the view in on any point of the screen, smoothly or held in place the whole time. Say where to zoom, how close, and whether it repeats back and forth.
Camera feed, hand and face tracking, touch, tilt, haptics, and sound.
Made with this blockInputs
durationfloatDuration on the zoom effect
sizefloatZoom intensity - how much to zoom in. Range from 0 to 1 0 means no zoom at all, and at zoom level 1, the view zooms in extremely close - so close that only about 4% of the original image remains visible.
zoomXPositionfloatDefines where the final zoom point is centered horizontally (X axis), range from 0 to 1, where 0 is right edge of the screen and 1 is left edge of the screen
zoomYPositionfloatDefines where the final zoom point is centered vertically (Y axis), range from 0 to 1, where 0 is top edge of the screen and 1 is bottom edge of the screen
zoomTypeintType of zoom:
2 values
- 0
- Zoom in: The camera starts at the normal view and smoothly moves toward the selected zoom level over the specified duration, creating a zoom-in effect.
- 1
- Zoom out: The camera starts at the chosen zoomed-in state and smoothly moves back to the normal view over the duration, creating a zoom-out effect.
loopOptionsintDefines how the zoom animation loops: 0 - The zoom restarts from the beginning after each cycle 1 - Ping-pong. The zoom alternates direction (zooms in, then out or vice versa)
infiniteLoopbooleanEnable continuous zoom loop. When enabled, the zoom animation will repeat endlessly
loopCountintSpecifies how many times the zoom animation will repeat. A value of 0 means no repetition, and there's no upper limit.
More in Camera, Audio & Sensors
- Device CameraGives your Lens the camera picture, live or frozen as a still. Your Lens can show that picture on a surface, or keep the still to use later.
- Face EventsMakes your Lens react when you open your mouth, smile, kiss, raise your eyebrows or tilt your head. It also tells the Lens where your eyes, nose and mouth are on screen.
- Face MLChanges your face with one ready-made effect, for example an anime look, a meme grin or a skull. Say the look you want, and your Lens keeps that one effect.
- FaceLandmarksFollows where your eyes, nose, mouth and forehead are, so a sticker or text can sit on them and move with you. Ask for hearts on your eyes.
- GyroscopeTurns tilting and shaking your phone into a control for your Lens. Ask for a tilt game, for example a maze where you roll a ball to the exit.
- Hand TrackingFollows your hands and reads gestures like a fist, a pinch, a thumbs up or a peace sign. Ask for something your hand controls, for example drawing with a pinch.
- HapticsMakes your phone vibrate at the moments you choose. Ask for a buzz when you tap the screen or score a point.
- Picture in PicturePuts a frame with the live camera on the screen, with or without a border. Tap the frame to swap in a photo from your device.
- Selfie WidgetShows a small live camera view on the screen, as a circle or a rectangle. Choose where it sits and how big it is, for example in the corner of a game.
- SoundPlays a sound in the Lens. Add the sound you want, and the Lens can start it, pause it and resume it.
- Touch EventsAdds tap, drag and swipe controls, so you touch the screen to control the Lens. Say what each touch does, for example tap to drop a coin.
- Voice ChangerChanges your voice while you speak. Ask for the effect you want, for example a deep voice, a robot, an alien or an echo.
