pv3d 2.0版本的一篇英文教程翻译 5 基础纹理

pv3d 2.0版本的一篇英文教程翻译 5 基础纹理
2009年12月21日
  http://papervision2.com/5-basic-texturing/ 将用到得文件请这里下载
  5 基础纹理
  原文:Before starting this tutorial, please note that it follows on from Tutorial 4 - Basic Template Usage. If you haven't followed that tutorial, I suggest that you do so.
  Be modifying a few lines, we're going to give our spinning cone a texture. The result will be something like this:
  翻译:在开始这个教程前,请注意它是第4片教程的继续,基础模板使用方法。如果你没有看过那篇教程,我建议你去看一看。
  通过修改几行代码,我们将给我们的旋转椎体一个纹理。结果大约如下。(源地址是flash 这里使用的截图。)
  
  
  
  原文:Firstly, open up the project that you made in tutorial 4. I'm going to show you how to use the BitmapFileMaterial, so before we start, you need to import org.papervision3d.materials.BitmapFileMaterial. To do this, find where you have two lines starting with import and just below them, add the line:
  翻译:首先,打开你在第四篇教程创建的项目,我将演示如何使用"BitmapFileMaterial"。那么在我们开始前,你需要导入BitmapFileMaterial类,要这样做,你得找到以"import"开头的两行,然则在他们下面添加:
  import org.papervision3d.materials.BitmapFileMaterial;
  原文:That line will import the BitmapFileMaterial package into your project, so that you can use it.
  翻译:这一行将导入BitmapFileMaterial 包到你的项目中,这样你就可以使用它了。
  原文:Now, we need to add a BitmapFileMaterial to our cone. We can do this when we create it, but first I'll explain BitmapFileMaterial.
  翻译:现在,我们需要添加BitmapFileMaterial 到我们的圆锥。我们可以在创建它的时候做添加。但是,首先我要讲解一下BitmapFileMaterial.这个类。
  原文:BitmapFileMaterial is a papervision 3d material which takes a url of an image file, and creates a texture from it. This is very useful when loading collada models, and it opens possibilities of having things like user-uploaded textures.
  翻译:BitmapFileMaterial 是一种 papervision 3d 材质,它包含图片文件的url路径,用这个图片创建纹理。当我们加载collada(拉风?)模型时它是非常有用的,而且它使用户上传纹理成为可能。
  原文:When you create a new BitmapFileMaterial object, you pass it a URL from which the texture will be fetched.
  翻译:当你创建了一个新的BitmapFileMaterial对象,你传递给它一个url地址,你创建的对象将从这个地址获得一个相应的纹理。
  原文:To add the material to our cone, we're going to pass a BitmapFileMaterial object to the cone when we create it. This is really simple to do, simply change the line:
  翻译:要给我们的圆锥添加材质,我们将在创建它的时候赋予它一个BitmapFileMaterial 材质对象,这很简单,仅仅修改这一行:
  public var cone:Cone = new Cone();
  to:
  public var cone:Cone = new Cone(new BitmapFileMaterial("http://papervision2.com/wp-content/downloads/ourtex.jpg" ));
  原文:This will now get the file from my server and use it as the texture on your cone.
  翻译:这样将从我的服务器获取文件,并将它作为纹理使用在你的圆锥上。
  原文:Now, when you run your code you'll see the red and white texture on your cone. Simple!
  翻译:现在,当你运行你的代码,你会看到红白相间的纹理在你的圆锥上。非常简单。
  My final code looks like this:
  package {
  import PaperBase;
  import org.papervision3d.objects.primitives.Cone;
  import org.papervision3d.materials.BitmapFileMaterial;
  public class Main extends PaperBase {
  public var cone:Cone = new Cone(new BitmapFileMaterial("http://papervision2.com/wp-content/downloads/ourtex.jpg"), 20, 200);
  // I've added a width and height to change the shape of my cone.
  public function Main() {
  init();
  }
  override protected function init3d():void {
  cone.scale = 3;
  cone.pitch( -30);
  default_scene.addChild(cone);
  }
  override protected function processFrame():void {
  cone.yaw(20);
  // Here, I've made my cone spin faster by increasing the amount sent to yaw();
  }
  }
  }
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
基于微信小程序的家政服务预约系统采用PHP语言和微信小程序技术,数据库采用Mysql,运行软件为微信开发者工具。本系统实现了管理员和客户、员工三个角色的功能。管理员的功能为客户管理、员工管理、家政服务管理、服务预约管理、员工风采管理、客户需求管理、接单管理等。客户的功能为查看家政服务进行预约和发布自己的需求以及管理预约信息和接单信息等。员工可以查看预约信息和进行接单。本系统实现了网上预约家政服务的流程化管理,可以帮助工作人员的管理工作和帮助客户查询家政服务的相关信息,改变了客户找家政服务的方式,提高了预约家政服务的效率。 本系统是针对网上预约家政服务开发的工作管理系统,包括到所有的工作内容。可以使网上预约家政服务的工作合理化和流程化。本系统包括手机端设计和电脑端设计,有界面和数据库。本系统的使用角色分为管理员和客户、员工三个身份。管理员可以管理系统里的所有信息。员工可以发布服务信息和查询客户的需求进行接单。客户可以发布需求和预约家政服务以及管理预约信息、接单信息。 本功能可以实现家政服务信息的查询和删除,管理员添加家政服务信息功能填写正确的信息就可以实现家政服务信息的添加,点击家政服务信息管理功能可以看到基于微信小程序的家政服务预约系统里所有家政服务的信息,在添加家政服务信息的界面里需要填写标题信息,当信息填写不正确就会造成家政服务信息添加失败。员工风采信息可以使客户更好的了解员工。员工风采信息管理的流程为,管理员点击员工风采信息管理功能,查看员工风采信息,点击员工风采信息添加功能,输入员工风采信息然后点击提交按钮就可以完成员工风采信息的添加。客户需求信息关系着客户的家政服务预约,管理员可以查询和修改客户需求信息,还可以查看客户需求的添加时间。接单信息属于本系统里的核心数据,管理员可以对接单的信息进行查询。本功能设计的目的可以使家政服务进行及时的安排。管理员可以查询员工信息,可以进行修改删除。 客户可以查看自己的预约和修改自己的资料并发布需求以及管理接单信息等。 在首页里可以看到管理员添加和管理的信息,客户可以在首页里进行家政服务的预约和公司介绍信息的了解。 员工可以查询客户需求进行接单以及管理家政服务信息和留言信息、收藏信息等。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值