Jump to content
Search Community

nofear87

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by nofear87

  1. I have used the following code to create a mesh object

    var defaultPartGeometry = new THREE.BoxGeometry(0.5, 0.5, 0.5);
    var defaultPartMaterial = new THREE.MeshBasicMaterial({color: 0xff0000, wireframe: false});
    default = new THREE.Mesh(defaultPartGeometry, defaultPartMaterial); 
    default.position.set(0,0.25,0); 
    scene.add(default)

    How can I make this invisible? Setting the opacity for this object to null did not work.

     

    I adress the object by its ID and then try to set the opacity (I also have tried to adress the material (object.material))

    object = .scene.getObjectByName(ID);
    tweens.push(tl.to(object, 2, {opacity: 0}, e.time));
    

    Tween the position is working:

    tweens.push(tl.to(object.position, 2, {x: target.X, z: target.Y}, e.time))

    Hope you can help.

  2. app.animation(".test", function() {
      return {
         enter: function(element, done) {
          TweenMax.from(element, 3, {x: 500, opacity:0, onComplete:done});
         }, 
         leave: function(element, done) {
            TweenMax.to(element, 3, {x: 500, opacity:0, onComplete:done});
         }
      }
    });

    When I add this class to a simple div with text it works well. But when i add it to a bootstrap class like col or row. The toggle works, but the animation didn't fire.

×
×
  • Create New...