Skip to content

Instantly share code, notes, and snippets.

@positlabs
Created June 20, 2019 12:28
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save positlabs/1a9e00e39fc98509b8be3b50f9d1ecc0 to your computer and use it in GitHub Desktop.
Save positlabs/1a9e00e39fc98509b8be3b50f9d1ecc0 to your computer and use it in GitHub Desktop.
Spark AR script to resize plane to match screen size
/*
Resize plane to match screen size
*/
const Scene = require('Scene')
const camera = Scene.root.find('Camera')
const plane = Scene.root.find('plane0')
plane.width = camera.focalPlane.width
plane.height = camera.focalPlane.height
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment