Created
April 2, 2020 03:42
-
-
Save oliverbooth/26884ff37290f7fadd52df2bfbe9ac62 to your computer and use it in GitHub Desktop.
Floating-like objects using UAssembly by VRChat
This file contains hidden or 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
.data_start | |
.export amplitude | |
.export frequency | |
.sync x, smooth | |
.sync y, smooth | |
Vector3_tmp: %UnityEngineVector3, null | |
instance_0: %UnityEngineTransform, this | |
amplitude: %SystemSingle, 0.25 | |
frequency: %SystemSingle, 1 | |
x: %SystemSingle, null | |
y: %SystemSingle, null | |
float_tmp0: %SystemSingle, null | |
float_tmp1: %SystemSingle, null | |
tau: %SystemSingle, 6.28318530718 | |
.data_end | |
.code_start | |
.export _start | |
_start: | |
# Vector3_tmp = instance_0.position | |
PUSH, instance_0 | |
PUSH, Vector3_tmp | |
EXTERN, "UnityEngineTransform.__get_position__UnityEngineVector3" | |
# y = Vector3_tmp.y | |
PUSH, Vector3_tmp | |
PUSH, y | |
EXTERN, "UnityEngineVector3.__get_y__SystemSingle" | |
JUMP, 0xFFFFFFFC | |
.export _update | |
_update: | |
# float_tmp0 = Time.deltaTime | |
PUSH, float_tmp0 | |
EXTERN, "UnityEngineTime.__get_deltaTime__SystemSingle" | |
# float_tmp1 = float_tmp0 * frequency | |
PUSH, float_tmp0 | |
PUSH, frequency | |
PUSH, float_tmp1 | |
EXTERN, "SystemSingle.__op_Multiplication__SystemSingle_SystemSingle__SystemSingle" | |
# float_tmp0 = x + float_tmp1 | |
PUSH, x | |
PUSH, float_tmp1 | |
PUSH, float_tmp0 | |
EXTERN, "SystemSingle.__op_Addition__SystemSingle_SystemSingle__SystemSingle" | |
# x = float_tmp0 % tau | |
PUSH, float_tmp0 | |
PUSH, tau | |
PUSH, x | |
EXTERN, "SystemSingle.__op_Remainder__SystemSingle_SystemSingle__SystemSingle" | |
# Vector3_tmp = transform.position | |
PUSH, instance_0 | |
PUSH, Vector3_tmp | |
EXTERN, "UnityEngineTransform.__get_position__UnityEngineVector3" | |
# float_tmp0 = sin(x) | |
PUSH, x | |
PUSH, float_tmp0 | |
EXTERN, "UnityEngineMathf.__Sin__SystemSingle__SystemSingle" | |
# float_tmp1 = float_tmp0 * amplitude | |
PUSH, float_tmp0 | |
PUSH, amplitude | |
PUSH, float_tmp1 | |
EXTERN, "SystemSingle.__op_Multiplication__SystemSingle_SystemSingle__SystemSingle" | |
# float_tmp0 = float_tmp1 + y | |
PUSH, float_tmp1 | |
PUSH, y | |
PUSH, float_tmp0 | |
EXTERN, "SystemSingle.__op_Addition__SystemSingle_SystemSingle__SystemSingle" | |
# Vector3_tmp.y = float_tmp0 | |
PUSH, Vector3_tmp | |
PUSH, float_tmp0 | |
EXTERN, "UnityEngineVector3.__set_y__SystemSingle" | |
# instance_0.position = Vector3_tmp | |
PUSH, instance_0 | |
PUSH, Vector3_tmp | |
EXTERN, "UnityEngineTransform.__set_position__UnityEngineVector3__SystemVoid" | |
JUMP, 0xFFFFFFFC | |
.code_end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment