【问题标题】:Effects in cube of chrome铬立方体中的效果
【发布时间】:2017-09-27 07:52:06
【问题描述】:

早上好,我试图查找信息以对我的小魔方产生一些影响,但我找不到任何有关此的文档。

如何将立方体分开,以便它们之间有空间并且魔方更大?以及如何将其平面颜色的纹理更改为水晶颜色?。

我使用的属性是:

    var cube = new ERNO.Cube();
    document.body.appendChild( cube.domElement );
    setTimeout(function () {
        cube.twist('UDLF');
        cube.shuffle(50);
    },2500);
    cube.autoRotate = true;
    console.log(cube);
    cube.setSize(500,300);

我附上官方页面https://www.chrome.com/cubelab的例子

谢谢!

【问题讨论】:

    标签: javascript google-chrome cube


    【解决方案1】:

    寻找 setRadius(),这将增加半径,因此您可以对立方体、单个立方体、边或组等产生爆炸内爆效果。

    对于以下内容,我们包括所有 27 个小块(甚至是中间小块),但随后我们只对外部 26 个小块进行爆炸内爆,以使立方体中心的 1 个保持不动。

            function(){
    
                var excluded = new ERNO.Group( cube.cubelets ),
                included = cube.hasColors( window.R, window.Y, window.B )
    
                excluded.remove( included )
                excluded.setRadius()
                excluded.setOpacity( 0.5 )
                included.setRadius( 120 )
                included.setOpacity( 1 )
                cube.taskQueue.isReady = false
                setTimeout( () => { cube.taskQueue.isReady = true }, 6000 )
            },
            function(){
    
                cube.setRadius()
                cube.taskQueue.isReady = false
                setTimeout( () => { cube.taskQueue.isReady = true }, 3000 )
            }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-09-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-30
      • 1970-01-01
      • 1970-01-01
      • 2013-05-13
      相关资源
      最近更新 更多