Skip to content

Instantly share code, notes, and snippets.

@kunofellasleep
Created May 30, 2019 10:25
Show Gist options
  • Save kunofellasleep/269bad660fe0f622e9507f662fcbcc9f to your computer and use it in GitHub Desktop.
Save kunofellasleep/269bad660fe0f622e9507f662fcbcc9f to your computer and use it in GitHub Desktop.
Text Input on Spark AR
// 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