相关疑难解决方法(0)

球体内的相机

我想创建一个skydome并制作shpere,纹理加载也很好,但我无法将相机移动到球体内部.球体消失了.我知道这是一个业余问题,但无法看到球体的内部.

是某种切割或Z缓冲问题吗?

我该如何解决?

我的代码:

<html>
<head>
    <script src="js/jquery-1.8.3.min.js"></script>  
    <script src="js/three.min.js"></script>
</head>

<body>

    <div id="container">

    </div>


    <script>
        function addSpaceSphere( ){
            // set up the sphere vars
            var radius = 200,
            segments = 16,
            rings = 16;

            var material = new THREE.MeshPhongMaterial({
                color:0xFFFFFF,
                map: THREE.ImageUtils.loadTexture( 'textures/SPACE014SX.png' )
            });

            var sphere = new THREE.Mesh(
                new THREE.SphereGeometry(
                    radius,
                    segments,
                    rings
                ),
                material
            );


            // add the sphere to the scene
            scene.add(sphere);
        }

        function addLights(){
            // create a point light
            var ambient = new THREE.AmbientLight( …
Run Code Online (Sandbox Code Playgroud)

camera view three.js

1
推荐指数
1
解决办法
1936
查看次数

标签 统计

camera ×1

three.js ×1

view ×1