https://bl.ocks.org/andreasplesch/0894babf2acb9d3afac23c5980d36b7b
Last active
December 7, 2017 02:10
-
-
Save andreasplesch/0894babf2acb9d3afac23c5980d36b7b to your computer and use it in GitHub Desktop.
PlaneSensor axisRotation test
This file contains 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
<html> | |
<head> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<script type="text/javascript" src="https://www.x3dom.org/download/dev/x3dom-full.debug.js"> </script> | |
<link rel="stylesheet" type="text/css" href="https://www.x3dom.org/download/dev/x3dom.css"> | |
<title>PlaneSensor axisRotation</title> | |
</head> | |
<body> | |
<h1>PlaneSensor non-default axisRotation Example</h1> | |
<div id="content"> | |
<x3d width='400px' height='400px'> | |
<scene> | |
<inline url='PlaneSensorAxisRotation.x3d'></inline> | |
</scene> | |
</x3d> | |
<x3d width='400px' height='400px'> | |
<scene> | |
<inline url='PlaneSensorAxisRotation2.x3d'></inline> | |
</scene> | |
</x3d> | |
</div> | |
</body> |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<X3D> | |
<Scene> | |
<Viewpoint position='0 0 5' orientation='0 0 1 0' /> | |
<Background skyColor='0.4 0.4 0.4'/> | |
<Transform DEF='G1'> | |
<Group DEF='trackpointCursor'> | |
<Shape> | |
<Appearance><Material emissiveColor='1 1 0'/></Appearance> | |
<Sphere radius='.03'/> | |
</Shape> | |
</Group> | |
</Transform> | |
<Transform translation='-2 0 0'> | |
<Shape DEF='pad'> | |
<Appearance><Material diffuseColor='0.7 0.2 0.2'></Material></Appearance> | |
<Box size='1.5 1.5 .01'/> | |
</Shape> | |
<PlaneSensor DEF='PS1' axisRotation='0 0 1 1.57'/> | |
<ROUTE fromNode='PS1' fromField='translation_changed' toNode='G1' toField='translation' /> | |
</Transform> | |
<Transform translation='0 0 0'> | |
<Shape DEF='pad2'> | |
<Appearance><Material diffuseColor='0.7 0.2 0.2'></Material></Appearance> | |
<Box size='1.5 1.5 .01'/> | |
</Shape> | |
<PlaneSensor DEF='PS2'/> | |
<ROUTE fromNode='PS2' fromField='translation_changed' toNode='G1' toField='translation' /> | |
</Transform> | |
<Transform translation='2 0 0'> | |
<Shape DEF='pad3'> | |
<Appearance><Material diffuseColor='0.7 0.2 0.2'></Material></Appearance> | |
<Box size='1.5 1.5 .01'/> | |
</Shape><PlaneSensor DEF='PS3' axisRotation='0 1 0 1.57'/> | |
<ROUTE fromNode='PS3' fromField='translation_changed' toNode='G1' toField='translation' /> | |
</Transform> | |
</Scene> | |
</X3D> |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<X3D> | |
<Scene> | |
<Viewpoint position='0 0 5' orientation='0 0 1 0' /> | |
<Background skyColor='0.4 0.4 0.4'/> | |
<Transform DEF='G1'> | |
<Group DEF='trackpointCursor'> | |
<Shape> | |
<Appearance><Material emissiveColor='1 1 0'/></Appearance> | |
<Sphere radius='.03'/> | |
</Shape> | |
</Group> | |
</Transform> | |
<Transform translation='-2 0 0'> | |
<Shape DEF='pad'> | |
<Appearance><Material diffuseColor='0.7 0.2 0.2'></Material></Appearance> | |
<Box size='1.5 1.5 .01'/> | |
</Shape> | |
<PlaneSensor DEF='PS1' minPosition='-1 0' maxPosition='1 0' axisRotation='0 0 1 0.78'/> | |
<ROUTE fromNode='PS1' fromField='translation_changed' toNode='G1' toField='translation' /> | |
</Transform> | |
<Transform translation='0 0 0'> | |
<Shape DEF='pad2'> | |
<Appearance><Material diffuseColor='0.7 0.2 0.2'></Material></Appearance> | |
<Box size='1.5 1.5 .01'/> | |
</Shape> | |
<PlaneSensor minPosition='-1 0' maxPosition='1 0' DEF='PS2'/> | |
<ROUTE fromNode='PS2' fromField='translation_changed' toNode='G1' toField='translation' /> | |
</Transform> | |
<Transform translation='2 0 0' rotation='0 0 1 -0.78'> | |
<Transform rotation='0 0 1 0.78'> | |
<Shape DEF='pad3'> | |
<Appearance><Material diffuseColor='0.7 0.2 0.2'></Material></Appearance> | |
<Box size='1.5 1.5 .01'/> | |
</Shape> | |
</Transform> | |
<PlaneSensor minPosition='-1 0' maxPosition='1 0' DEF='PS3' /> | |
<ROUTE fromNode='PS3' fromField='translation_changed' toNode='G1' toField='translation' /> | |
</Transform> | |
</Scene> | |
</X3D> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment