javascript - Programming a holeempty space in three.js - Stack Overflow

i'd like to programm something like a hole in three.js.it should be like, e.g. a 3x3x3 cube with

i'd like to programm something like a hole in three.js. it should be like, e.g. a 3x3x3 cube with an 1x1x1 hole in it. is there a possibility, that i first use something like cubegeometry and afterwards another "geometry" that cuts out the stuff that i want to have deleted? an deletion geometry? :D

Thanks :)

i'd like to programm something like a hole in three.js. it should be like, e.g. a 3x3x3 cube with an 1x1x1 hole in it. is there a possibility, that i first use something like cubegeometry and afterwards another "geometry" that cuts out the stuff that i want to have deleted? an deletion geometry? :D

Thanks :)

Share Improve this question asked Aug 1, 2012 at 21:28 ApplecowApplecow 8423 gold badges15 silver badges39 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 10

If you are looking to "cut" things out in certain shapes, you may be interested in this post on a Constructive Solid Geometry library. It es with a wrapper for THREE.js objects.

It lets you do things like this:

var cube = new CSG.cube();
var sphere = CSG.sphere({radius: 1.3, stacks: 16});
var geometry = cube.subtract(sphere);

=>

Here is another short tutorial on the subject.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744218675a4563675.html

相关推荐

  • javascript - Programming a holeempty space in three.js - Stack Overflow

    i'd like to programm something like a hole in three.js.it should be like, e.g. a 3x3x3 cube with

    8天前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信