Panda3D手册:附带的示例程序

The Panda3D Distribution includes quite a few sample programs. The following is a list of what's included, and which features of the engine each sample demonstrates. If you are just learning Panda3D, take a look at the ones marked as "Beginner" difficulty.

Panda3D 安装包中附带有许多示例程序。下面的列表中列出的这些程序演示了引擎的各种功能。如果您是出学者,请先看带有 “新手” 标志的程序。

To run a sample program, you need to install Panda3D. If you're a Windows user, you'll find the sample programs in your Start Menu. If you're a Linux user, you'll find the sample programs in /usr/share/panda3d. On Mac OS X, you'll find them in /Applications/Panda3D/X.X.X/samples.

运行示例程序前要先安装好 Panda3D 。如果您是 Windows 用户,您可以在开始菜单里找到示例程序。如果您是 Linux 用户,您可以在 /usr/share/panda3d 中找到示例程序。在 Mac OS X 下,您可以在 /Applications/Panda3D/X.X.X/samples 中找到。

Sample Programs: Asteroids 小行星

  • Difficulty: Advanced
  • 难度:高级
  • Creating tasks (routines that get called every frame)
  • 创建人物(即每帧被调用的程序)
  • Using 2D graphics
  • 2D 绘图

Sample Programs: Ball in Maze 迷宫中的球

  • Difficulty: Intermediate
  • 难度:中级
  • Using the collision detector
  • 启用碰撞检测
  • Reading the mouse
  • 检测鼠标

Sample Programs: Boxing Robots 拳击机器人

  • Difficulty: Intermediate
  • 难度:中级
  • Loading animated actors and playing animations
  • 载入动画并且播放 animation。

Sample Programs: Carousel 旋转木马

  • Difficulty: Beginner
  • 难度:初级
  • Relative positioning
  • 相对定位
  • Intervals (automatic movement)
  • interval(自动运行)

Sample Programs: Cartoon Shader 卡通渲染

  • Difficulty: Intermediate (or Advanced)
  • 难度:中级(或高级)
  • Enables per-pixel lighting
  • 启用像素光照
  • Explicit Shaders
  • 启用 Shader
  • Image Postprocessing
  • 处理图像
  • Render-to-Texture
  • 渲染到纹理

Sample Programs: Chessboard 棋盘

  • Difficulty: Intermediate
  • 难度:中级
  • Selecting an object with the mouse
  • 用鼠标选取对象

Sample Programs: Disco Lights 迪斯科的灯光

  • Difficulty: Intermediate
  • 难度:中级
  • Using vertex lighting
  • 使用顶点光照
  • Enables per-pixel lighting
  • 使用像素光照

Sample Programs: Distortion 畸变

  • Difficulty: Advanced
  • 难度:高级
  • Creates a interesting shader effect where the entire screen is rendered into a texture
  • 创建一个有意思的 shader 功能,它能把整个窗口渲染成纹理

Sample Programs: Fireflies 萤火虫

  • Difficulty: Very Advanced
  • 难度:非常高
  • Deferred shading - a complex shader-based algorithm
  • 延期着色——一个很复杂的 shader 算法

Sample Programs: Fractal Plants 分形植物

  • Difficulty: Very Advanced
  • 难度:非常高
  • Creates a 3D model without loading it from disk
  • 不通过模型文件来创建一个 3D 模型

Sample Programs: Glow Filter 发光滤镜

  • Difficulty: Intermediate (or Advanced)
  • 难度:中级(或高级)
  • Enabling per-pixel lighting
  • 启用像素光照
  • Explicit Shaders
  • 启用 Shader
  • Image Postprocessing
  • 处理图像
  • Render-to-Texture
  • 渲染到纹理

Sample Programs: Infinite Tunnel 无限隧道

  • Difficulty: Intermediate
  • 难度:中级
  • Using fog to hide artifacts in the distance
  • 启用景深

Sample Programs: Looking and Gripping 寻找和握住

  • Difficulty: Intermediate
  • 难度:中级
  • Controlling a character's head procedurally
  • 用程序控制人物的头
  • Causing a character to grip an object
  • 让人物握住物品

Sample Programs: Media Player 媒体播放器

  • Difficulty: Beginner
  • 难度:初级
  • Loading a texture from an AVI file
  • 从 AVI 文件中载入纹理
  • Loading a sound from an AVI file
  • 从 AVI 文件中载入声音
  • Synchronizing audio and video
  • 让音频和视频同步

Sample Programs: Motion Trails 运动轨迹

  • Difficulty: Advanced
  • 难度:高级
  • Captures contents of screen and reuses it later.
  • 捕捉屏幕内容

Sample Programs: Music Box 八音盒

  • Difficulty: Intermediate
  • 难度:中级
  • Playing sounds
  • 播放声音
  • GUI buttons and sliders
  • 按钮和滑块界面

Sample Programs: Normal Mapping 法线贴图

  • Difficulty: Intermediate (or Advanced)
  • 难度:中级(或高级)
  • Enables per-pixel lighting
  • 启用像素光照
  • Explicit Shaders
  • 启用 Shader

Sample Programs: Particles 粒子

  • Difficulty: Advanced
  • 难度:高级
  • Demonstrates the particle system
  • 演示粒子系统

Sample Programs: Procedural Cube 生成立方体

  • Difficulty: Advanced
  • 难度:高级
  • Creates a 3D model without loading it
  • 不通过模型文件来创建一个 3D 模型

Sample Programs: Roaming Ralph 漫游的拉尔夫

  • Difficulty: Advanced
  • 难度:高级
  • A character walks around a terrain
  • 让人物在地面上走动
  • Uses collision system to detect height of terrain
  • 碰撞检测和地形系统

Sample Programs: Shadows 阴影

  • Difficulty: Advanced
  • 难度:高级
  • Explicit Shaders
  • 启用 Shader
  • Dynamic Shadows: shadow mapping
  • 动态阴影:阴影映射

Sample Programs: Solar System 太阳系

  • Difficulty: Beginner Tutorial
  • 难度:初级教程
  • Tutorial structure shows development steps
  • 演示开发过程
  • Shows how objects can move relative to other objects
  • 演示如何让一个物体相对于另一个物体移动

Sample Programs: Teapot on TV 电视里面有茶壶

  • Difficulty: Intermediate
  • 难度:中级
  • Render-to-texture
  • 渲染到纹理
  • Places rendered texture on model in scene
  • 在模型上渲染纹理

Sample Programs: Texture Swapping 交换纹理

  • Difficulty: Intermediate
  • 难度:中级
  • Swaps textures on models to create interesting effects
  • 让两个模型的纹理交换,效果很有趣

我试着将示例程序中的注释翻译了一下,您可以在这里下载注释经过简单翻译的源代码。感谢 Ubuntu 提供的网络空间。