A collection of code snippets gathered from the Spark AR Community group.
Here is a basic rundown of what some of these scripts do:
Learn basics ❤️:
- get3DPosition.js see how to access the position of an object (and send it back to the patch editor)
- tapToChangeMat.js change an object's material on change
Slightly more advanced 💪:
- ColorSpaceConvert.js showcases how to create a material with a color that changes randomly
- dynamicInstanceOnTap.js learn how to instance objects dynamically
Really useful 👀:
- EmitterParticleFade.js fade particles over time
- getTextureBasedOnUserLanguage.js change which assets are used based on language!
There are many more scripts and projects not included in this brief overview, feel free to explore or contribute your own