🥞

ShortStack

make games in Lens Studio quick, easy, and juicy without code

1.555mb | 20 downloads
Download Button
+
Shortcut Description
ShortStack 101 How to use ShortStack
1. ShortStack is a component you can add to any object

2. ShortStacks make objects do things like move, play sound

3. ShortStacks are made of states

happy:
sad:


4. States consist of comma-separated shortcuts

log("hello world"),color("red"),wallAnchor,move(5)

5. States + Shortcuts decide what the object is doing

happy:log("I'm happy!"),color("yellow")
sad:log("I'm sad.."),color("blue")


6. Only one state runs at a time

first:log("hello"),go("second")
second:log("world")


7. The first state runs automatically

init:log("hello world")

8. Shortcuts execute left to right

log("first"),log("second"),log("third")

9. Shortcuts can influence each other

font("Arial"),text("Hello")

10. Shortcuts can pause or block

log("waiting.."),tap,log("tapped!")

11. Shortcuts can be customized with parameters

wobble or wobble(5,10)

ShortStack component image
ShortStack 201 How to use ShortStack Pt. 2
1. ShortStacks can change the state of their children

Mom
init:goDeep("love")
 â¤· Kid
    init:
love:log("i love u mom")



2. ShortStacks can change the state of their parents

Mom
init:
love:log("i love u too")

 â¤· Kid
    init:goUp("love")


ShortStack component image
yay Logs "yay!" to the console, used for sanity checks
yay yay or yay()
log Logs a new message to the console
log(message:string) log("hello world")
spawn Spawns a new instance of an object
Add your prefab assets to any AssetManager to make them available to spawn(). You can add as many AssetManagers as you want and even categorize them. Prefabs will spawn at the position of their parent Asset Manager image
spawn(assetName:string) spawn("banana")
spawn(assetName:string, parent:bool) spawn("dog",true)
spawn(assetName:string, parent:string) spawn("lens","CAMERA")
spawn(assetName:string, parent:any, entryState:string) spawn("fire",true,"lit")
sfx Plays a sound effect
Add your audio clip to any AudioManager to make them available to sfx(). You can add as many AudioManagers as you want and even categorize them. Audio will spawn at the position of the object and automatically be spatialized if you have an AudioListener attached to your camera Audio Manager image
sfx(audioName:string) sfx("pop")
sfx(audioName:string, volume:number) sfx("pop",0.1)
sfx(audioName:string, volume:number, loop:boolean) spawn("pop",0.1,true)
music Plays background music
music() automatically manages fading between music tracks to create a nice audio experience and avoid doubling up on sound. Add your audio clip to any AudioManager to make them available to music(). You can add as many AudioManagers as you want and even categorize them. Music Manager image
music(audioName:string) music("music")
music(audioName:string, fadeTime:number) music("music",0.4)
tap Detects tap on object
tap tap,log("$name was tapped!")
tap(stateName:string) init:tap("tapped"),log("waiting for tap..")
tapped:log("$name was tapped!")
anyTap Detect a tap, any tap
anyTap anyTap,log("I tapped the screen!")
tap(stateName:string) init:anyTap("tapped"),log("waiting for tap..")
tapped:log("I tapped the screen!")
physics Auto-setup physics
physics physics
physics(colliderType:string) physics("mesh")
physics("box")
physics("capsule")
physics("box")
physics("cone")
physics(colliderType:string, size:number) physics("box",40)
collide Waits until collision is detected
collide collide,log("I collided!")
collide(nameOrId:string) collide("ground"),log("I collided with the ground!")
collide(layerId:number) collide(0),log("I collided with default layer")
collide(nameOrId:string,stateName:string) init:collide(null,"collided")
collided:log("I collided!")
hitter Trigger collision on another object
hitter lets you conveniently trigger the hit: state on another object. Also assigns hitter as hit object's target, and hit object as target if selfStateName is set Hitter Example image
hitter hitter
hitter(stateName:string) hitter("customHit")
hitter(stateName:string, selfStateName:string) init:hitter(null,"hitted")
hitted:log("I hit $targetId!")
text Auto setup a text component
Add your fonts to any FontManager to make them available to text() or font(). You can add as many FontManagers as you want and even categorize them. Font Manager image
text(text:string) text("hello world")
text(text:string,size:number) text("hello world",256)
text(text:string,size:number,font:string) text("hello world",256,"freesansbold")
delay Delays next shortcut
delay(duration: number) delay(2),log("2 seconds later!")
go Switch to another state
go() allows switching to a different states in the same ShortStack ShortStack with go()
go(stateName: string) go("bananas")
goUp Switch state on the top-most shortstack
goUp() changes the state on the top-most parent of the ShortStack with that state. Combine with goDeep() to enable child objects to alter the state of the stack ShortStack with goUp()
goUp(stateName: string) goUp("bananas")
goDeep Switch state on all sub-shortstacks
goDeep() applies a state change across all sub-ShortStacks, ideal for synchronizing complex behaviors. You can also call goDeep("bananas") from within state "bananas" without issue ShortStack with goDeep()
goDeep(stateName: string) goDeep("bananas")
id Sets the ID of an object
id gives an object a unique identifier allowing enablign you to target it with target("id") or parent with parent("id")
id(identifier:string) id("pancake")
target Sets the target
target sets the target for functions like move, lookAt, follow, parent, etc. The default target is always the player camera ("CAMERA"). Target can be changed without affecting previous targets
target(identifier:string) target("pancake"),follow(5)
target("pancake"),parent
target("pancake"),move,target("CAMERA"),lookAt(3)
ease Apply ease effect to next shortcut
ease(easeType:string) ease("easeOutElastic"),scale(10)
ease("easeOutQuint"),color("green")
ease("easeOutBounce"),move(5)
• easeLinear
• easeOut
• easeIn
• easeInOut
• easeInExpo
• easeOutExpo
• easeInOutExpo
• easeInQuint
• easeOutQuint
• easeInOutQuint
• easeInCubic
• easeOutCubic
• easeInOutCubic
• easeOutBack
• easeInBack
• easeInOutBack
• easeInQuart
• easeOutQuart
• easeInOutQuart
• easeInSine
• easeOutSine
• easeInOutSine
• easeInElastic
• easeOutElastic
• easeInOutElastic
• easeOutBounce
• easeInBounce
• easeInOutBounce
follow Smoothly follow target
follow(speed:number) follow(5)
follow(identifier:string,speed:number) follow("zelda",3)
move Moves an object
move target("finishline")
move(speed:number) target("finishline"),move(2)
move(x:number, y:number, z:number) move(0,50,-150)
move(x:number, y:number, z:number, time:number) move(0,50,-150,1)
combine with ease! ease("easeOutElastic"),move(0,50,-150,1)
target("finishline"),ease("easeOut"),move(1)
rotate Rotates an object
rotate(x:number, y:number, z:number) rotate(0,3,0)
rotate(x:number, y:number, z:number, time:number) rotate(0,45,0,1)
combine with ease! ease("easeInOut"),rotate(0,70,0,1)
scale Scales an object
scale(size:number) scale(100)
scale(size:number, time:number) scale(100, 1)
scale(x:number, y:number, z:number) scale(50,3,10)
scale(x:number, y:number, z:number, time:number) scale(2,100,2,1)
combine with ease! ease("easeOutElastic"),scale(100,1)
lookAt Makes an object look at target
by default the target is the player camera ("CAMERA")
lookAt(speed: number) lookAt(6)
lookAt(speed: number, xOffset:number, yOffset:number, zOffset:number) lookAt(null,90,0,0)
lookTowards Makes an object look towards target
by default the target is the player camera ("CAMERA")
lookTowards(speed: number) lookTowards(6)
lookTowards(speed: number, xOffset:number, yOffset:number, zOffset:number) lookTowards(null,90,0,0)
cameraAnchor Generate a target that stays aligned with camera
cameraAnchor(distance: number) cameraAnchor(160)
cameraAnchor(distance: number, upOffset: number, sideOffset: number) cameraAnchor(160,40,-20)
cameraPosition Generate a target point aligned with camera
cameraPosition(distance: number) cameraPosition(160)
cameraPosition(distance: number, upOffset: number, sideOffset: number) cameraPosition(160,40,-20)
forwardAnchor Generate a target point that stays in front of user
forwardAnchor(distance: number) forwardAnchor(160)
forwardAnchor(distance: number, upOffset: number, sideOffset: number) forwardAnchor(160,50,-20)
forwardPosition Generate a target point in front of user
forwardPosition(distance: number) forwardPosition(160)
forwardPosition(distance: number, upOffset: number, sideOffset: number) forwardPosition(160,50,-20)
sphere Creates a sphere shape
sphere(size: number) sphere(30)
plane Creates a plane shape
plane(size: number) plane(100)
box Creates a box shape
box(size: number) box(50)
cone Creates a cone shape
cone(size: number) cone(40)
capsule Creates a capsule shape
capsule(size: number) capsule(15)
pyramid Creates a pyramid shape
pyramid(size: number) pyramid(33)
cylinder Creates a cylinder shape
cylinder(size: number) cylinder(40)
anim Plays an animation
anim() plays an animation clip if an Animation Player is present Animation Player Example
anim(clipName:string) anim("Dance")
anim(clipName:string,blend:boolean) anim("Dance",false)
pulse Applies a pulsing effect
pulse pulse
pulse(speed:number) pulse(2.22)
pulse(speed:number, multiplier:number) pulse(3,1.1)
pulse(speedX:number, speedY:number, speedZ:number, multiplierX:number, multiplierY:number, multiplierZ:number) pulse(5,5,5,1,2.2,1)
bob Makes object bob up and down and around
bob bob
bob(amount:number) bob(10)
bob(amount:number, speed:number) bob(10,5)
bob(x:number, y:number, z:number, speed:number) bob(5,0,0,2)
jiggle Makes object jiggle
jiggle jiggle
jiggle(intensity: number) jiggle(0.4)
jiggle(intensity: number, duration: number) jiggle(0.4,1)
wobble Makes object wobble about
wobble wobble
wobble(speed:number) wobble(15)
wobble(x:number, y:number, z:number, speed:number) wobble(0.5,3,0,5)
wobble(x:number, y:number, z:number, xSpeed:number, ySpeed:number, zSpeed:number) wobble(0.5,3,0,2,10,0)
flash Makes object flash (good for hit effect)
Popular effect you see in many Nintendo games to show hits or pickups. flash requires the object material to have emission toggled ON Flash Effect Example
flash flash
flash(color:string) flash("white")
flash(intensity:number) flash(2)
flash(intensity:number, fadeTime:number) flash(2,0.4)
flash(color:string, intensity:number) flash(2,0.4)
flash(color:string, intensity:number, fadeTime:number) flash("yellow",2,0.4)
flash(r:number, g:number, b:number, intensity:number, fadeTime:number) flash(1,0,0,2,0.4)
color Sets the color
color(color:string) color("red")
color(color:string, time:number) color("red",1)
color(r:number, g:number, b:number) color(0.4,1,0.55)
color(r:number, g:number, b:number, time:number) color(0.4,1,0.55,1)
alpha Sets the alpha (transparency)
alpha requires the object material blend mode to support transparency Alpha Example
alpha(a:number) alpha(0.1)
alpha(a:number, time:number) alpha(0.1, 0.5)
is If statement
is(condition: any) is("score>10"),log("yay, score is $score!")
is("cool=true"),log("I'm cool 8)")
newVar("cool2",false),is("cool=cool2")
or Else statement
or is("score>=10"),log("you win!"),or,log("you lose!")
newVar Creates a new variable
newVar(name: string, value: any) newVar("score", 0)
newVar("cool",true)
newVar("message","yo")
updateVar Updates an existing variable
updateVar(operation:string) updateVar("score+=10")
updateVar("cool=!cool")
updaeVar("message='hello world'")
updateVar(operation:string, minValue:number, maxValue:number) updateVar("score-=1000",0,99999)
getVar Retrieves the value of a variable
getVar(name:string) getVar("score")
getVar(name:string, defaultValue:number) getVar("score",0)
getVar(name:string, defaultValue:number, forceRefresh:boolean) getVar("score",0,true)
clearVar Clears the value of a variable
clearVar(name:string) clearVar("score")
passVar Passes a variable to another function or context
passVar is a powerful way to pass data between ShortStacks during events such as spawn(), collide(), goUp() Asset Manager image
passVar(name:string) passVar("score")
passVar(name:string, value:any) passVar("color","blue"),spawn("ball")
passVar("level",3),goUp("newLevel")
newVar("hitpoints",3),passVar("hitpoints"),hitter
awaitVar Waits for a variable to meet a condition
awaitVar(name:string) log("wait"),awaitVar("username"),log("username is $username!")
clampVar Clamps a variable's value within a range
clampVar(name:string, min:number, max:number) clampVar("score", 0, 100)
storeVar Stores a variable persistently
storeVar(name:string) storeVar("score")
unstoreVar Removes a stored variable
unstoreVar(name:string) unstoreVar("score")
unstoreAllVars Clears all stored variables
unstoreAllVars unstoreAllVars
broadcast Sends an event to multiple receivers
broadcast(eventName:string) broadcast("gameOver")
listen Listens for specific event
listen(eventName:string) listen("gameOver"),log("game over!")
listen(eventName:string, stateName:string) init:listen("gameOver","gameover")
gameover:log("game over!")
listen(eventName:string, stateName:string, alwaysListen:boolean) init:listen("gameOver","gameover",true),go("game")
game:log("doing other stuff")
gameover:log("game over!")
near Waits until target is near object
near(distance:number) target("ENEMY"),near(200),log("within 200cm of the enemy!")
near(identifier:string, distance:number) near("ENEMY",200),log("within 200cm of the enemy!")
near(identifier:string, distance:number, stateName:string) init:near("ENEMY",200,"runAway"),log("awaiting")
runAway:log("run!")
far Waits until target is far from object
far(identifier:string, distance:number) target("HOME"),far(1000),log("you are far from home")
far(identifier:string, distance:number) far("HOME",1000),log("you are far from home")
far(identifier:string, distance:number, stateName:string) init:far("HOME",1000,"warning"),log("awaiting warning")
warning:log("you are far from home")
onscreen Waits until object is onscreen
onscreen onscreen,log("im on screen!")
onscreen(margin:number) onscreen(0.3),log("im fully on screen!")
offscreen Waits until object is offscreen
offscreen offscreen,log("im off screen!")
offscreen(margin:number) offscreen(0.3),log("im fully off screen!")
touchingFloor Waits until object is in contact with the floor
touchingFloor fakeFly,touchingFloor,log("im on the floor!")
fov Waits until target is in object's field of view
fov target("food"),fov,log("I see food!")
fov(distance:number) target("food"),fov(100),log("I see food close!")
fov(distance:number, stateName:string) init:target("player"),fov(1000,"chase"),log("awaiting chase..")
chase:move(3)
pauseGame Pauses the game
yes, you can actually pause the whole game with ShortStack! Automatically skips any ShortStack in SYSTEM runtime layer
pauseGame pauseGame
pauseGame(skipLayer:string) pauseGame("MENU")
resumeGame Resumes the game
resumeGame resumeGame
pauseLayer Pauses a specific runtime layer
pauseLayer(layerName:string) pauseLayer("UI")
unpauseLayer Unpauses a specific runtime layer
unpauseLayer(layerName:string) unpauseLayer("UI")
moveLocal move() but local
moveLocal target("localPoint"),moveLocal
moveLocal(speed:number) target("localPoint"),moveLocal(2)
moveLocal(x:number, y:number, z:number) moveLocal(0,50,-150)
moveLocal(x:number, y:number, z:number, time:number) moveLocal(0,50,-150,1)
combine with ease! ease("easeOutElastic"),moveLocal(0,50,-150,1)
moveForward Moves an object on its forward axis
moveForward(speed:number) moveForward(5)
position Move to a specific position
position target("anchorPoint"),position
position(time:number) target("anchorPoint"),position(1)
position(x:number, y:number, z:number) position(0,50,-150)
position(x:number, y:number, z:number, time:number) position(0,50,-150,1)
combine with ease! ease("easeOutElastic"),position(0,50,-150,1)
rotation Rotate to a specific rotation
rotation target("anchorPoint"),rotation
rotation(time:number) target("anchorPoint"),rotation(1)
rotation(x:number, y:number, z:number) rotation(0,45,0)
rotation(x:number, y:number, z:number, time:number) rotation(0,45,0,1)
combine with ease! ease("easeOutElastic"),rotation(0,45,0,1)
lookForward Look towards the direction it's moving
lookForward lookForward
lookForward(speed:number) lookForward(5)
lookForward(speed:number, notUpOrDown:boolean) lookForward(5,true)
lookTowardsOnce Makes an object look towards target once
lookTowardsOnce lookTowardsOnce
lookTowardsOnce(xOffset:number, yOffset:number, zOffset:number) lookTowardsOnce(90,0,0)
lookAtOnce Makes an object look at target once
lookAtOnce lookAtOnce
lookAtOnce(xOffset:number, yOffset:number, zOffset:number) lookAtOnce(90,0,0)
hopTurn Makes an object hop to face target
hopTurn target("CAMERA"),hopTurn
hopTurn(angle:number, time:number, height:number) target("CAMERA"),hopTurn(180, 0.6, 20)
fakeFly Simulates toss with gravity
fakeFly fakeFly,touchFloor,log("fell on floor!")
fakeFly(x:number, y:number, z:number) fakeFly(r(-2,2),5,r(-2,2))
orbit Makes an object orbit around its origin
orbit(radius:number) orbit(100)
orbit(radius:number, speed:number) orbit(100,10)
parent Sets the parent
parent cameraAnchor(160),parent
parent(identifier:string) parent("CAMERA")
parent(identifier:string, recenter:boolean) parent("CAMERA",true)
unparent Removes the parent
unparent unparent
unparentChildren Unparents all children
unparentChildren unparentChildren
unparentChildren(stateName:string) unparentChildren("init")
fakeParent Copies position and rotation of target
fakeParent cameraAnchor(160),fakeParent
fakeParent(identifier:string) fakeParent("CAMERA")
enable Enables the object
enable enable
disable Disables the object
disable disable
hide Hides an object renderer
hide hide
unhide Unhides an object renderer
unhide unhide
destroy Destroys the object
destroy destroy
destroyChildren Destroys all children
destroyChildren destroyChildren
material Sets the material
Add your material assets to any MaterialManager to make them available to material(). You can add as many MaterialManagers as you want and even categorize them. Materials are automatically instanced for customizing Material Manager image
material(materialName:string) material("Unlit")
material(materialName:string, textureName:string) material("Unlit","icon")
texture Sets the texture
Add your texture assets to any TextureManager to make them available to texture(). You can add as many TextureManagers as you want and even categorize them Texture Manager image Texture Manager image
texture(textureName:string) texture("icon")
texture(textureCategory:string, index:number) texture("GRASS",r(0,3))
mesh Changes or creates the mesh
Add your mesh assets to any MeshManager to make them available to mesh(). You can add as many Meshmanagers as you want and even categorize them Mesh Manager image
mesh(meshName:string) mesh("Box")
texPos Sets the texture UV position
Material must be setup to use Transform UV 2 to have texture position changed Material Transform UV 2 image
texPos(x:number, y:number) texPos(0.5,0.5)
texScale Scales the texture UV scale
Material must be setup to use Transform UV 2 to have texture scale changed Material Transform UV 2 image
texScale(xScale:number, yScale:number) texScale(6,6)
texProp Sets texture property
texProp(property:string,value:any) texProp("emissiveColor",new vec3(1,1,1))
texProp("myCustomProp",0.3)
texScroll Scrolls the texture
Add your material assets to any MaterialManager to make them available to material(). You can add as many MaterialManagers as you want and even categorize them. Materials are automatically instanced for customizing Material Transform UV 2 image
texScroll(xSpeed:number, ySpeed:number) texScroll(0.2,0.2)
blendMode Sets the blend mode of material
blendMode(blendMode:string) blendMode("additive")
blendMode("normal")
rainbow Applies a rainbow color effect
rainbow(speed:number) rainbow(3)
blendshape Applies a blendshape animation
blendshape(blendName:string) blendshape("poseA")
blendshape(blendName:string, weight:number) blendshape("poseA", 0.8)
blendshape(blendName:string, weight:number, time:number) blendshape("poseA", 0.8, 1)
blendshape(blendName:string, startWeight:number, endWeight:number, time:number) blendshape("poseA", 0.2, 0.8, 1)
hop Makes an object hop or jump
hop hop
hop(height:number, time:number) hop(40,0.5)
twirl Makes an object twirl or rotate in place
twirl twirl
twirl(time:number) twirl(1)
twirl(time:number,rotations:number) twirl(1,3)
combine with ease! ease("easeOut"),twirl
hitWobble Makes an object wobble like hit
hitWobble hitWobble
hitWobble(intensity:number, time:number) hitWobble(30,1)
hitEffect Plays a visual effect when an object is hit
hitEffect hitEffect
unmusic Stops the background music
unmusic unmusic
collider Sets up a physics collider
collider collider
collider(colliderType:string) collider("mesh")
collider("box")
collider("capsule")
collider("box")
collider("cone")
collider(colliderType:string, size:number) collider("box",40)
dynamic Sets an object to be dynamic
dynamic dynamic
undynamic Sets an object to be undynamic
undynamic undynamic
force Applies a force
force(force:number) force(1000) //goes forward
force(force:number,direction:string) force(1000,"up")
force(xForce:number, yForce:number, zForce:number) force(0,500,1000)
bouncy Sets physics properties to be bouncy
bouncy bouncy
bouncy(bounciness:number) bouncy(0.6)
zeroGravity Sets physics properties to be zero gravity
zeroGravity zeroGravity
tangible Makes an object tangible (collidable)
tangible tangible
intangible Makes an object intangible (non-collidable)
intangible intangible
mass Sets the mass
mass(mass:number) mass(10)
friction Sets the friction
friction(friction:number) friction(box, 0.5)
friction(friction:number, angularFriction:number) friction(0.5, 0.5)
unforce Removes force
unforce unforce
unphysics Removes physics
unphysics unphysics
uncollide Waits until collision is exited
uncollide uncollide,log("I uncollided!")
uncollide(nameOrId:string) uncollide("ground"),log("I uncollided with the ground!")
uncollide(layerId:number) uncollide(0),log("I uncollided with default layer")
uncollide(nameOrId:string,stateName:string) init:uncollide(null,"uncollided")
uncollided:log("I uncollided!")
debug Enables debug mode
debug debug
r Generates a random float number
r(min:number, max:number) r(-99,99)
rInt Generates a random integer
rInt(min:number, max:number) rInt(1, 10)
rArray Picks a random entry in array variable
rArray(array: any[]) rArray(["red","green","blue"])
rArray(getVar("colors"))
color(rArray($colors))
offset Adds time offset to transforms, effects, and animations
offset offset
offset(multiple:number) offset(3)
font Sets the font of a text component
Add your fonts to any FontManager to make them available to text() or font(). You can add as many FontManagers as you want and even categorize them. Font Manager image
font(fontName:string) font("freesansbold"),text("hello world")
typewriter Applies a typewriter effect to text
typewriter(time:number) typewriter(dialogue, 1)
typewriter(text:string, time:number) typewriter("hello!", 1)
worldAnchor Create anchor on real world surface
worldAnchor(distance:number) worldAnchor(500),position,rotation
wallAnchor Creates anchor on wall
wallAnchor(distance:number) wallAnchor(500),position,rotation
floorAnchor Creates anchor on floor
floorAnchor(distance:number) floorAnchor(500),position,rotation
findFloor Find floor below object
findFloor(distance:number) findFloor,follow(5)
button instant SIK button
button button,log("button pressed!!")
button(label:string) button("Click Me")
button(label:string, stateName:string) init:button("Go Home","home")
home:log("I'm home!")
combine with color, font, etc. rainbow,font("freesansbold"),button("Party!")
poke make object respond to poke
poke poke,log("poked!")
poke(stateName:string) init:poke("belly")
belly:log("he he!")
pinch make object respond to pinch
pinch poke,log("pinched!")
pinch(stateName:string) init:pinch("cheek")
cheek:log("ouch!")
grab make object grabbable
grab grab,log("grabbed!")
grab(stateName:string) init:grab("baby")
baby:log("hold me!")
unbutton undo SIK button
unbutton button,log("pressed!"),unbutton
unpoke make object respond to unpoke
unpoke poke,log("poked!"),unpoke,log("unpoked!")
unpoke(stateName:string) init:poke("belly")
belly:log("he he!"),unpoke("init")
ungrab make object respond to ungrab
ungrab grab,log("grabbed!"),ungrab,log("ungrabbed!")
ungrab(stateName:string) init:grab("baby")
baby:log("hold me!"),ungrab("init")
cursor toggle SIK cursor on
cursor cursor
uncursor toggle SIK cursor off
uncursor uncursor
isHandTracking Checks if hand tracking is active
isHandTracking isHandTracking,log("hand is tracking!")
isHandTracking(callback:string) init:isHandTracking("tracked")
tracked:log("hand is tracking!")
isHandTracking(callback:string, hand:string) isHandTracking(null,"left"),log("left hand is tracking!")
isHandTrackingLost Checks if hand tracking has been lost
isHandTrackingLost isHandTrackingLost,log("hand lost tracking!")
isHandTrackingLost(stateName:string) init:isHandTrackingLost("untracked")
untracked:log("hand lost tracking!")
isHandTrackingLost(stateName:string, hand:string) isHandTrackingLost(null,"left"),log("left hand lost tracking!")
anyPinch Detects any pinch gesture
anyPinch anyPinch,log("pinched!")
anyPinch(stateName:string) init:anyPinch("activate")
activate:log("activate!")
anyPinch(stateName:string, hand:string) anyPinch(null,"left"),log("left hand pinched!")
anyUnpinch Detects any unpinch gesture
anyUnpinch anyUnpinch,log("unpinched!")
anyUnpinch(stateName:string) init:anyUnpinch("unactivate")
unactivate:log("unactivated!")
anyUnpinch(stateName:string, hand:string) anyUnpinch(null,"left"),log("left hand unpinched!")
palmUp Detects if the palm is facing upwards
palmUp palmUp,log("palm up!")
palmUp(hand:string) palmUp("left"),log("left palm up")
palmDown Detects if the palm is facing downwards
palmDown palmDown,log("palm down!")
palmDown(hand:string) palmDown("left"),log("left palm down")
Connect with SIK Button
ShortStack comes with a convenient way to connect with Spectacles Interaction Kit components Texture Manager image
create a state called click: init:
click:log("SIK Button Connected!")