小编eng*_*g27的帖子

如何在reveal.js中设置图像样式?

我现在正试图将reveal.js中的透明png图像放入:

<div class="slides">
    <section>
        <img src="sample.png">
        <p>sample image</p>
    </section>
</div>
Run Code Online (Sandbox Code Playgroud)

其中数字"sample.png"如下.

在此输入图像描述

但是,有:

  • 白线出现在图的边界
  • 而且这个数字并不完美透明.(包含一些白色?)

我们怎样才能删除它?

在此输入图像描述

reveal.js

24
推荐指数
3
解决办法
2万
查看次数

如何在three.js中优化多个sphereGeometry的渲染?

我想在three.js中优化sphereGeometry的渲染,因为它在我的程序中成为瓶颈.javascript程序如下所示:

var sphereThree = [];
for(var idSphere = 0; idSphere < numSphere; idSphere++){
    var sphereGeometry = new THREE.SphereGeometry(1.0);
    var sphereMaterial = new THREE.MeshLambertMaterial({color: 'rgb(255, 0, 0)'});

    sphereThree[idSphere] = new THREE.Mesh(sphereGeometry, sphereMaterial);

    sphereThree[idSphere].position.x = x[idSphere];
    sphereThree[idSphere].position.y = y[idSphere];
    sphereThree[idSphere].position.z = z[idSphere];

    scene.add(sphereThree[idSphere]);
}
Run Code Online (Sandbox Code Playgroud)

如下面的链接中所述:
- 使用Three.js动画百万个字母
- 优化Three.js性能:模拟数以千计的独立移动对象,
他们指出我们不应单独添加对象,更好地添加相同类型的对象同时,进行优化.但是,由于我是这个领域的新手,因此在使用SphereGeometry时我不知道如何编写此优化代码.

如果有人知道如何使用SphereGeometry编写这些代码,或者知道一种有效方法来渲染许多(10,000或更多)球体的人,你会教我们吗?

谢谢!

javascript optimization webgl three.js

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

如何将html文本文件分成多个文件?

关于HTML的非常基本的问题.

因为<body>太长了,我想把文件分成多个文件.它不是关于使用iframe等,而只是想包含多个文本文件来创建<body>html文件.

谢谢!

html css

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

标签 统计

css ×1

html ×1

javascript ×1

optimization ×1

reveal.js ×1

three.js ×1

webgl ×1