Skip to content

Commit

Permalink
Add click me graphic to test button
Browse files Browse the repository at this point in the history
  • Loading branch information
brianpeiris committed Nov 23, 2016
1 parent 2c2a61d commit dc65320
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/tests/fullspace/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
doc.rotateY(Math.PI / 4);
sim.scene.add(doc);

var button = meshHelpers.makeBox(0, boxSize * 1.5, 0);
var button = meshHelpers.makeBox(0, boxSize * 1.5, 0, '../../images/click-me.jpg');
button.userData.altspace.collider.enabled = true;
adjustToFullspace(enclosure, button, doc);
button.addEventListener('cursordown', function () {
Expand Down
5 changes: 4 additions & 1 deletion examples/tests/fullspace/meshHelpers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
var meshHelpers = (function () {
function makeBox(x, y, z) {
function makeBox(x, y, z, texUrl) {
var boxMesh = new THREE.Mesh(boxGeo, boxMat.clone());
if (texUrl) {
boxMesh.material.map = new THREE.TextureLoader().load(texUrl);
}
boxMesh.userData.altspace = {collider: {enabled: false}};
boxMesh.position.set(x, y, z);
sim.scene.add(boxMesh);
Expand Down

0 comments on commit dc65320

Please sign in to comment.