Created
May 30, 2019 10:25
-
-
Save kunofellasleep/269bad660fe0f622e9507f662fcbcc9f to your computer and use it in GitHub Desktop.
Text Input on Spark AR
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
// Created by @kunofellasleep on 2019/05/28. | |
const Diagnostics = require('Diagnostics'); | |
const NativeUI = require('NativeUI'); | |
const TouchGestures = require('TouchGestures'); | |
const objectName = "3dText0" | |
const defaultText = "Guest" | |
NativeUI.setText(objectName defaultText); | |
TouchGestures.onTap().subscribe(function () { | |
NativeUI.enterTextEditMode('3dText0'); | |
}); | |
NativeUI.getText(objectName).monitor().subscribe(function(textUpdate){ | |
NativeUI.setText(objectName, textUpdate.newValue); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment