diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-03-14 11:17:46 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2018-03-14 11:59:26 +0000 |
commit | 758a9017b738408c513b06425137bd6d891ac3f6 (patch) | |
tree | 93e790568e7a8de143e480b72b6643d1358a0039 /tests | |
parent | 98d06b5130d18d32e32e059cb1197c93b05bd169 (diff) |
Hook up input manager to actions
Running an action is not yet implemented.
Change-Id: I493ccd39895eb1a4843186ce8c8c0c7b4cddfd3f
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/scenes/barrel/Barrel.uip | 4 | ||||
-rw-r--r-- | tests/scenes/barrel/ClickableBarrel.uip | 60 |
2 files changed, 60 insertions, 4 deletions
diff --git a/tests/scenes/barrel/Barrel.uip b/tests/scenes/barrel/Barrel.uip index 8498905..105759d 100644 --- a/tests/scenes/barrel/Barrel.uip +++ b/tests/scenes/barrel/Barrel.uip @@ -32,10 +32,6 @@ <AnimationTrack property="rotation.x" type="EaseInOut" >0 90 100 100 5 64 100 100 10 90 100 100</AnimationTrack> <AnimationTrack property="rotation.y" type="EaseInOut" >0 0 100 100 5 -302 100 100 10 0 100 100</AnimationTrack> <AnimationTrack property="rotation.z" type="EaseInOut" >0 0 100 100 5 0 100 100 10 0 100 100</AnimationTrack> - <Action id="Barrel-Action" eyeball="True" triggerObject="#Barrel" event="onPressureDown" targetObject="#Material" handler="Set Property" > - <HandlerArgument name="Property Name" type="String" argtype="Property" value="diffuse" /> - <HandlerArgument name="Property Value" type="Float3" argtype="Dependent" value="0.447059 0.611765 1" /> - </Action> </Add> <Add ref="#Material" bumpamount="0" diffusemap="#Material_diffusemap" emissivemap="#Material_emissivemap" fresnelPower="25" normalmap="#Material_normalmap" specularamount="4" specularmap="#Material_specularmap" specularmodel="Default" specularroughness="0.001" > <AnimationTrack property="bumpamount" type="EaseInOut" >0 0 100 100 5 1 100 100</AnimationTrack> diff --git a/tests/scenes/barrel/ClickableBarrel.uip b/tests/scenes/barrel/ClickableBarrel.uip new file mode 100644 index 0000000..8498905 --- /dev/null +++ b/tests/scenes/barrel/ClickableBarrel.uip @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<UIP version="3" > + <Project > + <ProjectSettings author="" company="" presentationWidth="800" presentationHeight="480" maintainAspect="False" > + <CustomColors count="16" >#ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff #ffffff</CustomColors> + </ProjectSettings> + <Graph > + <Scene id="Scene" > + <Layer id="Layer" > + <Camera id="Camera" /> + <Light id="Light" /> + <Model id="Barrel" > + <Material id="Material" > + <Image id="Material_diffusemap" /> + <Image id="Material_normalmap" /> + <Image id="Material_emissivemap" /> + <Image id="Material_specularmap" /> + </Material> + </Model> + <Text id="Text" /> + </Layer> + </Scene> + </Graph> + <Logic > + <State name="Master Slide" component="#Scene" > + <Add ref="#Layer" /> + <Add ref="#Camera" /> + <Add ref="#Light" /> + <State id="Scene-Slide1" name="Slide1" playmode="Looping" > + <Add ref="#Barrel" name="Barrel" position="0 -42 -483" rotation="90 0 0" scale="100 100 100" sourcepath=".\barrel\meshes\Barrel.mesh#1" > + <AnimationTrack property="opacity" type="EaseInOut" /> + <AnimationTrack property="rotation.x" type="EaseInOut" >0 90 100 100 5 64 100 100 10 90 100 100</AnimationTrack> + <AnimationTrack property="rotation.y" type="EaseInOut" >0 0 100 100 5 -302 100 100 10 0 100 100</AnimationTrack> + <AnimationTrack property="rotation.z" type="EaseInOut" >0 0 100 100 5 0 100 100 10 0 100 100</AnimationTrack> + <Action id="Barrel-Action" eyeball="True" triggerObject="#Barrel" event="onPressureDown" targetObject="#Material" handler="Set Property" > + <HandlerArgument name="Property Name" type="String" argtype="Property" value="diffuse" /> + <HandlerArgument name="Property Value" type="Float3" argtype="Dependent" value="0.447059 0.611765 1" /> + </Action> + </Add> + <Add ref="#Material" bumpamount="0" diffusemap="#Material_diffusemap" emissivemap="#Material_emissivemap" fresnelPower="25" normalmap="#Material_normalmap" specularamount="4" specularmap="#Material_specularmap" specularmodel="Default" specularroughness="0.001" > + <AnimationTrack property="bumpamount" type="EaseInOut" >0 0 100 100 5 1 100 100</AnimationTrack> + </Add> + <Add ref="#Material_diffusemap" sourcepath=".\maps\barrel_barrel_Diffuse.png" /> + <Add ref="#Material_normalmap" sourcepath=".\maps\barrel_barrel_Normal.png" /> + <Add ref="#Material_emissivemap" sourcepath=".\maps\barrel_barrel_Emissive.png" /> + <Add ref="#Material_specularmap" sourcepath=".\maps\barrel_barrel_Specular.png" /> + <Add ref="#Text" name="Text" font="Arimo-Regular" position="-486.418 297.128 50.5569" textcolor="0 1 0" textstring="Barrel!" tracking="0" > + <AnimationTrack property="opacity" type="EaseInOut" >0 100 100 100 5.009 43.75 100 100 10 100 100 100</AnimationTrack> + <AnimationTrack property="rotation.x" type="EaseInOut" >0 0 100 100 4.997 0 100 100 5.009 0 100 100 10 0 100 100</AnimationTrack> + <AnimationTrack property="rotation.y" type="EaseInOut" >0 0 100 100 4.997 0 100 100 5.009 0 100 100 10 360 100 100</AnimationTrack> + <AnimationTrack property="rotation.z" type="EaseInOut" >0 0 100 100 4.997 0 100 100 5.009 0 100 100 10 0 100 100</AnimationTrack> + <AnimationTrack property="textcolor.x" type="EaseInOut" >0 0 100 100 5.009 0.501961 100 100 10 0 100 100</AnimationTrack> + <AnimationTrack property="textcolor.y" type="EaseInOut" >0 1 100 100 5.009 0.235294 100 100 10 1 100 100</AnimationTrack> + <AnimationTrack property="textcolor.z" type="EaseInOut" >0 0 100 100 5.009 0.333333 100 100 10 0 100 100</AnimationTrack> + </Add> + </State> + </State> + </Logic> + </Project> +</UIP> |