1. 首页
  2. 编程语言
  3. 其他
  4. papervision3d相机旋转(papervision3d camera orbit)

papervision3d相机旋转(papervision3d camera orbit)

上传者: 2021-05-23 10:16:41上传 .TXT文件 3.38 KB 热度 22次

1

package

2

{

3

import

flash.events.MouseEvent;

4

5

import

org.papervision3d.lights.PointLight3D;

6

import

org.papervision3d.materials.shadematerials.FlatShadeMaterial;

7

import

org.papervision3d.objects.DisplayObject3D;

8

import

org.papervision3d.objects.primitives.Sphere;

9

import

org.papervision3d.view.BasicView;

10

11

[SWF(width

=

"

640

"

, height

=

"

480

"

, backgroundColor

=

"

#000000

"

, frameRate

=

"

60

"

)]

12

public

class

OrbitingCameraExample

extends

BasicView

13

{

14

private

var isOribiting:Boolean;

15

private

var cameraPitch:Number

=

90

;

16

private

var cameraYaw:Number

=

270

;

17

private

var cameraTarget:DisplayObject3D

=

DisplayObject3D.ZERO;

18

private

var previousMouseX:Number;

19

private

var previousMouseY:Number;

20

用户评论