-1

如何使用 three.js 制作圆角立方体?我读过它不能使用css来完成。有人可以告诉我该怎么做吗?

http://jsfiddle.net/rajkumart08/8YK2n/embedded/result/

/*
|------------------------------------------|
| MelonHTML5 - 3D Cube Gallery             |
|------------------------------------------|
| @author:  Lee Le (lee@melonhtml5.com)    |
| @version: 1.02 (09 Jan 2013)             |
| @website: www.melonhtml5.com             |
|------------------------------------------|
*/
Gallery = {
    _config: {
        speed: 500,
        size: 100,
        lightbox: !0,
        closeOnEsc: !0,
        animation: "default",
        slideshow: !1,
        slideshow_speed: 3E3,
        cube_speed: 1E3
    },
    lightbox_speed: 300,
    window_width: null,
    window_height: null,
    _cube_timeout: null,
    _gallery: null,
    _overlay: null,
    _lightbox: null,
    _current: null,
    _in_slideshow: !1,
    init: function () {
        Gallery._buildContainer(!0, !0);
        Gallery.window_width = $(window).width();
        Gallery.window_height = $(window).height();
        $(document).keydown(Gallery.Events.keyDown);
        $(window).resize(Gallery.Events.windowResize);
        Gallery._startCube()
    },
4

1 回答 1

1

这是一个使用细分修改器的 three.js 代码示例的链接,它将生成一个圆形立方体。

http://stemkoski.github.com/Three.js/Subdivision-Cube.html

于 2013-03-12T22:12:38.887 回答