Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9036685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T09:03:51+00:00 2026-06-16T09:03:51+00:00

// set the scene size var WIDTH = 800; var HEIGHT = 640; //

  • 0
// set the scene size
var WIDTH = 800;
var HEIGHT = 640;

// set some camera attributes
var VIEW_ANGLE = 45,
ASPECT = WIDTH / HEIGHT,
NEAR = 0.1,
FAR = 10000;

var $container = $('#container');

// create a WebGL renderer, camera
var renderer = new THREE.WebGLRenderer();
var camera = new THREE.PerspectiveCamera(VIEW_ANGLE,
                                         ASPECT,
                                         NEAR,
                                         FAR);
var scene = new THREE.Scene();

// the camera starts at 0,0,0 so pull it back
camera.position.z = 1000;

// start the renderer
renderer.setSize(WIDTH, HEIGHT);

// attach the render-supplied DOM element
$container.append(renderer.domElement);

// create the sphere's material
var sphereMaterial = new THREE.MeshLambertMaterial({
  color: 0xCC0000
});

// set up the sphere vars
var radius = 50, segments = 16, rings = 16;

// create a new mesh with sphere geometry -
// we will cover the sphereMaterial next!
var sphere = new THREE.Mesh(
  new THREE.SphereGeometry(radius, segments, rings),
  sphereMaterial);

sphere.position.x = 20;
sphere.doubleSided = true;

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

// and the camera
scene.add(camera);

/* Light it up */
var pointLight = new THREE.PointLight(0xFFFFFF);
pointLight.position.x = 10;
pointLight.position.y = 50;
pointLight.position.z = 130;
scene.add(pointLight);

window.setInterval(update, 16.66666666);

var keyboard = new THREEx.KeyboardState();

function update() {
  if (keyboard.pressed("W")) {
    camera.position.z -= 5;
  } else if (keyboard.pressed("S")) {
    camera.position.z += 5;
  }

  renderer.render(scene, camera);
}

That is my code, a simple demow here using W and S keys makes me go zoom in/out a 3D Sphere.

However, when I get “inside” the sphere, I can’t see it’s back face, even though I put sphere.doubleSided = true;.

I tried putting renderer.setFaceCulling(true); (and false too), but none of them fixed it.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T09:03:52+00:00Added an answer on June 16, 2026 at 9:03 am

    use side: THREE.DoubleSide in material

    which version of three.js are you using ?

    jsfiddle

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

// set the scene size var WIDTH = 1650, HEIGHT = 700; // set
To set the scene, I'm currently working on an XML adapter for Android that
Let me set the scene: I'm a PHP developer that needs to take info
I will try and set the scene as best i can. *lights candle What
I set up my scene (Android app, OpenGL ES) like this: GLU.gluPerspective(gl, 60, viewRatio,
I have some scenes set up and already embedded them in the navigation stack
This is maybe unusual so let me set the scene: We have an SVN
I am trying to set an image with size of 960x640 pixels... My device
I'm currently using OpenGL on Android to draw set width lines, which work great
This is my quandary. Let me just set the scene: I have a grid

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.