forked from LeenkxTeam/LNXSDK
		
	merge upstream
This commit is contained in:
		@ -3,7 +3,7 @@ package leenkx.logicnode;
 | 
			
		||||
import iron.object.Object;
 | 
			
		||||
import iron.math.Vec4;
 | 
			
		||||
 | 
			
		||||
class GetWorldNode extends LogicNode {
 | 
			
		||||
class GetWorldOrientationNode extends LogicNode {
 | 
			
		||||
 | 
			
		||||
	public var property0: String;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -55,9 +55,9 @@ class SetParticleDataNode extends LogicNode {
 | 
			
		||||
				@:privateAccess psys.aligny = vel.y;
 | 
			
		||||
				@:privateAccess psys.alignz = vel.z;
 | 
			
		||||
			case 'Velocity Random':
 | 
			
		||||
				psys.r.factor_random = inputs[3].get();
 | 
			
		||||
				@:privateAccess psys.r.factor_random = inputs[3].get();
 | 
			
		||||
			case 'Weight Gravity':
 | 
			
		||||
				psys.r.weight_gravity = inputs[3].get();
 | 
			
		||||
				@:privateAccess psys.r.weight_gravity = inputs[3].get();
 | 
			
		||||
				if (iron.Scene.active.raw.gravity != null) {
 | 
			
		||||
					@:privateAccess psys.gx = iron.Scene.active.raw.gravity[0] * @:privateAccess psys.r.weight_gravity;
 | 
			
		||||
					@:privateAccess psys.gy = iron.Scene.active.raw.gravity[1] * @:privateAccess psys.r.weight_gravity;
 | 
			
		||||
 | 
			
		||||
@ -313,17 +313,22 @@ def parse_texcoord(node: bpy.types.ShaderNodeTexCoord, out_socket: bpy.types.Nod
 | 
			
		||||
        state.dxdy_varying_input_value = True
 | 
			
		||||
        return 'mposition'
 | 
			
		||||
    elif out_socket == node.outputs[4]: # Camera
 | 
			
		||||
        return 'vec3(0.0)' # 'vposition'
 | 
			
		||||
        state.curshader.add_uniform('mat4 V', link='_viewMatrix')
 | 
			
		||||
        if not state.frag.contains('vec3 viewPosition;'):
 | 
			
		||||
            state.frag.write_init('vec3 viewPosition = (V * vec4(wposition, 1.0)).xyz;')
 | 
			
		||||
        state.dxdy_varying_input_value = True
 | 
			
		||||
        return 'viewPosition'
 | 
			
		||||
    elif out_socket == node.outputs[5]: # Window
 | 
			
		||||
        # TODO: Don't use gl_FragCoord here, it uses different axes on different graphics APIs
 | 
			
		||||
        state.frag.add_uniform('vec2 screenSize', link='_screenSize')
 | 
			
		||||
        state.dxdy_varying_input_value = True
 | 
			
		||||
        return f'vec3(gl_FragCoord.xy / screenSize, 0.0)'
 | 
			
		||||
    elif out_socket == node.outputs[6]: # Reflection
 | 
			
		||||
        if state.context == ParserContext.WORLD:
 | 
			
		||||
            state.dxdy_varying_input_value = True
 | 
			
		||||
            return 'n'
 | 
			
		||||
        return 'vec3(0.0)'
 | 
			
		||||
        state.curshader.add_uniform('vec3 eye', link='_cameraPosition')
 | 
			
		||||
        if not state.frag.contains('vec3 reflectionVector;'):
 | 
			
		||||
            state.frag.write_init('vec3 reflectionVector = reflect(normalize(wposition - eye), normalize(n));')
 | 
			
		||||
        state.dxdy_varying_input_value = True
 | 
			
		||||
        return 'reflectionVector'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def parse_uvmap(node: bpy.types.ShaderNodeUVMap, out_socket: bpy.types.NodeSocket, state: ParserState) -> vec3str:
 | 
			
		||||
 | 
			
		||||
@ -61,7 +61,7 @@ class StereoPanner extends Panner {
 | 
			
		||||
 | 
			
		||||
	public inline function setBalance(balance: Balance) {
 | 
			
		||||
		this._balance = balance;
 | 
			
		||||
		final volumeLeft = Math.sqrt(~balance);Add commentMore actions
 | 
			
		||||
		final volumeLeft = Math.sqrt(~balance);
 | 
			
		||||
		final volumeRight = Math.sqrt(balance);
 | 
			
		||||
		sendMessage({ id: StereoPannerMessageID.PVolumeLeft, data: volumeLeft });
 | 
			
		||||
		sendMessage({ id: StereoPannerMessageID.PVolumeRight, data: volumeRight });
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user