This file contains 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
// | |
// Async loading modules | |
// | |
const AsyncModules = async () => { | |
// Load and setup forms | |
let formEls = [...document.querySelectorAll('.Form--ajax')]; | |
if (formEls.length) { | |
const Forms = await import(/* webpackChunkName: "forms" */ './components/Forms'); | |
formEls.map(formEl => new Forms(formEl)); |
This file contains 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
const D = require('Diagnostics'); | |
const Scene = require('Scene'); | |
const Time = require('Time'); | |
const R = require('Reactive'); | |
const S = require('Shaders'); | |
const Mat = require('Materials'); | |
const Tex = require('Textures'); | |
const Patches = require('Patches'); | |
// |
This file contains 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
const D = require('Diagnostics'); | |
const Scene = require('Scene'); | |
const Time = require('Time'); | |
const R = require('Reactive'); | |
const FaceTracking = require('FaceTracking'); | |
// | |
// Define constants | |
// | |
const OPENNESS_THRESHOLD = 0.5; |
This file contains 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
const t = require('Time'); | |
const D = require('Diagnostics'); | |
const Scene = require('Scene'); | |
const objText = Scene.root.find('2dText0'); | |
let frame = 0; | |
const round = (val, precision = 1) => { | |
const multiplier = Math.pow(10, precision || 0); | |
return Math.round(val * multiplier) / multiplier; |
This file contains 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
const D = require('Diagnostics'); | |
const Patches = require('Patches'); | |
// | |
// RECVIEVING SIGNALS FROM PATCHES | |
// | |
// | |
// Old way | |
// |
This file contains 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
// Put everything that needs to be loaded | |
// into 1 promise. | |
Promise.all([ | |
Scene.root.findFirst('directionalLight01'), | |
Scene.root.findFirst('number'), | |
Patches.outputs.getScalar('score'), | |
]).then( (loadedItems) => { | |
// When everything is loaded | |
// this function will trigger |
This file contains 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
//============================================================================== | |
// The following example demonstrates how to control audio playback by tapping | |
// on the screen. | |
// | |
// Project setup: | |
// - Import an audio file (M4A, Mono, 44.1kHz, 16 bit) | |
// - Create an audio playback controller and set the audio to the imported file | |
// - Insert a speaker and set the audio to the playback controller | |
// - Add the Tap Gesture capability to the project under Touch Gestures | |
//============================================================================== |
This file contains 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
// | |
// In this script we show how to fade out particles from | |
// a emitter. | |
// | |
// Original post was created by Josh Beckwith | |
// URL: https://www.facebook.com/groups/SparkARcommunity/permalink/683989935346385/ | |
// | |
// | |
// Include modules |
This file contains 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
I am attesting that this GitHub handle lassemt is linked to the Tezos account tz1LyJAACoEgDbWppjCUBgrfcfkdmf4obMLW for tzprofiles | |
sig:edsigthM4hxQfKTir6cWXa6wCCubaaj5VVg3ihtk7oWVARLRcix4AydE6BfCvF9cjPeVT8zM2xcVDAz4prtS15HmRf7dLykykzU |