用户名: 密码: 免费注册 忘记密码? 网站地图 | 加入收藏 | 设为首页
首页 | 新闻 | 工具 | 系统 | 办公 | 聊天 | 多媒体 | 网页 | 运营 | 平面 | 欣赏 | 数据库 | 程序 | 服务器 | 组网
网页 | 3dmax | Ghost | Windows Xp| Dreamweaver | photoshop | Flash | office | Alexa | Css | QQ | Asp | PHP | Jsp | Access
Flash MX 2004入门 | 网站推广策略 | CorelDRAW入门 | ASP学习 | 网站建设大师功 | Word入门
  iTbulo.com > 学院 > 多媒体教程 > Director教程 > 文章正文
Director 3D 基础(之四)
iTbulo.COM 2006-2-12 十年磨一剑()

七、添加贴图(texture)

添加了材质球之后,点击字样为“Add Texture”的文本运行建立贴图的行为。脚本如下:

on mouseUp(me)
if voidP(sprite(1).member.shader(‘‘newTexture‘‘)) then
tSprite = sprite(1)
tMember = tSprite.member
tTexture = tMember.newTexture(‘‘newTexture‘‘, \
#fromCastMember, member(‘‘Colors‘‘))

tMember.model(‘‘newSphere‘‘).shader.texture = tTexture
tMember.model(‘‘newSphere‘‘).shader.textureMode = #none
go next
end if
end

脚本流程:
1、确定是否有贴图加于球体上了。
2、如果没有,脚本使用原先已经被创建的名称叫“Colors”的位图演员创建一个新的贴图。
3、然后脚本应用贴图于材质球中,于是就显示在球体的表面上。
4、材质球的textureMode属性被设为#none,结果是贴图被应用于没有特别设定的状态。

[1] [2] [3] [4] 下一页

文章搜索
相关资讯
相关文章 相关下载
DIRECTOR去背技法步步高(二)
DIRECTOR去背技法步步高(一)
Director怎样制作自定义光标
Director 3D 基础(之七)
Director 3D 基础(之六)
焦点信息