Created
October 11, 2011 23:30
-
-
Save cjcliffe/1279794 to your computer and use it in GitHub Desktop.
Example of new animation constructor /w .get(xml/json) support
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
// SceneObject with motion constructor, xml/json/id/url compatible. | |
var boxObject = new CubicVR.SceneObject({ | |
mesh:boxMesh, | |
motion: { | |
position: { | |
0.0: { x: 0, y: 1 }, | |
1.0: { x: 1 }, | |
2.0: { x: -1, y: 0 }, | |
3.0: { x: -0.5 }, | |
4.0: { x: 0, y: 1 }, | |
}, | |
envelope: { | |
outBehavior: "repeat" | |
} | |
} | |
}); |
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
// SceneObject with motion constructor, xml/json/id/url compatible. | |
var boxObject = new CubicVR.SceneObject({ | |
mesh:boxMesh, | |
motion: { | |
position: { | |
0.0: { x: 0, y: 1 }, | |
1.0: { x: 1 }, | |
2.0: { x: -1, y: 0 }, | |
3.0: { x: -0.5 }, | |
4.0: { x: 0, y: 1 }, | |
}, | |
rotation: { | |
0.0: { x: 0, z: 0 }, | |
1.0: { x: 90, z: 45 }, | |
envelope: { | |
outBehavior: "offset" | |
} | |
}, | |
envelope: { | |
outBehavior: "repeat" | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment