Package org.spout.api.model

Examples of org.spout.api.model.Model


  @Override
  public void onAttached() {
    super.onAttached();
    if (getOwner().getEngine() instanceof Client) {
      final SkydomeComponent skydome = getOwner().add(SkydomeComponent.class);
      final Model model = Spout.getFileSystem().getResource("model://Vanilla/materials/sky/skydome.spm");
      skydome.setModel(model);
      model.getRenderMaterial().addRenderEffect(VanillaEffects.SKY);
    }
    getOwner().setSkyLight(MAX_SKY_LIGHT);
  }
View Full Code Here


    //This code launch the first animation finded on the first model
    //TODO : play with animation API

    switch (message.getAnimation()) {
      case SWING_ARM:
        Model model = models.getModels().get(0);//get first model

        if (model == null) {
          return;
        }

        if (model.getAnimations() == null || model.getAnimations().isEmpty()) {
          return;
        }

        Animation animation = model.getAnimations().values().iterator().next();

        animations.playAnimation(model, animation);

        break;
      default:
View Full Code Here

TOP

Related Classes of org.spout.api.model.Model

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.