LSQuickScripts - A scripting cheat sheet
Hi! I'm sharing a script with functions that I use a lot, which might save you some time.
I will update this every once in a while. There's an example project included!
Installation: Just throw the LSQuickScripts.js on a SceneObject and leave it at 'Initialized'. Now you can call all functions from any script in the project.
Some examples of these functions visualised:
https://gfycat.com/dishonestflimsyafricanmolesnake
You can get the script here:
https://github.com/max-van-leeuwen/SnapLensStudio-LSQuickScripts
Examples of some functions that are in it:
- global.rotationToEulerDeg( Rotation <quat> ) -> vec3
Converts the quaternion rotation of a transform (as returned using getWorldRotation()) to a human-readable Euler variant (as seen in the Inspector).
- global.HSVtoRGB( Hue <float>, Saturation <float>, Value <float> ) -> vec3
Returns the RGB colour for a given Hue (arg 0), Saturation (arg 1), and Value (arg 2). All inputs and outputs are in range 0-1.
- global.delayFunction( Function <function>, Wait time <float>, Arguments <array> ) -> None
Runs a function (arg 0) after a certain amount of seconds (arg 1) with all arguments in the given array (arg 2).
- global.instSound( Audio Asset <Asset.AudioTrackAsset> ) -> None
Plays a sound on a newly instantiated temporary sound component, which allows for multiple plays simultaneously without the audio clipping when it restarts. Instances are removed when done.
Really nice stuff Max!
I have these filter I did them by my self drawing I been working so hard for doing these filters all the time I fix them it say not acceptable and they give me an a general reasons I wanted to know why they not acceptable I wish there is someone who answer me here.



This is very good,
Thank you for this script.
Very good wok, thanks again
thanks
This is my work today
I hope it is accepted
AND FIXED THIS FILTER