Skip to content

Instantly share code, notes, and snippets.

@reinhrst
Last active May 15, 2021 06:55
Show Gist options
  • Select an option

  • Save reinhrst/99de8d5fdb5c7278b42f1fa63d1289b6 to your computer and use it in GitHub Desktop.

Select an option

Save reinhrst/99de8d5fdb5c7278b42f1fa63d1289b6 to your computer and use it in GitHub Desktop.
Ball
<x3d width='500px' height='400px'>
<scene>
<transform DEF="ball">
<shape>
<appearance>
<material diffuseColor='1 0 0'></material>
</appearance>
<box onclick="alert('click')"></box>
</shape>
</transform>
<timeSensor DEF="time" cycleInterval="2" loop="true"></timeSensor>
<PositionInterpolator DEF="move" key="0 0.5 1" keyValue="0 0 0 0 3 0 0 0 0"></PositionInterpolator>
<Route fromNode="time" fromField ="fraction_changed" toNode="move" toField="set_fraction"></Route>
<Route fromNode="move" fromField ="value_changed" toNode="ball" toField="translation"></Route>
<script>
alert('hi');
</script>
</scene>
</x3d>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment