Last active
October 2, 2018 18:19
-
-
Save colormono/2cacd1a551402833de1621ef31affaae to your computer and use it in GitHub Desktop.
[Eventos para la camara] #LensStudio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Cámara delantera | |
| var eventFront = script.createEvent("CameraFrontEvent"); | |
| eventFront.bind(function (eventData){ | |
| print("front camera active"); | |
| }); | |
| // Cámara trasera | |
| var eventBack = script.createEvent("CameraBackEvent"); | |
| eventBack.bind(function (eventData){ | |
| print("back camera active"); | |
| }); | |
| // Todo el tiempo | |
| var eventUpdate = script.createEvent("UpdateEvent"); | |
| eventUpdate.bind(function (eventData){ | |
| if(global.scene.getCameraType() == "front"){ | |
| print("the front camera is active"); | |
| } | |
| else if(global.scene.getCameraType() == "back"){ | |
| print("the back camera is active"); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment