three.js

Black background for three.js sprites with depthTest true

放肆的年华 提交于 2020-12-11 08:52:34
问题 I have been experimenting with converting the custom attribute BufferGeometry example (https://threejs.org/examples/webgl_buffergeometry_custom_attributes_particles.html) into a fly through animation and I find that the sprites have dark backgrounds (and those that I create myself as well) if depthTest is set to true. See the image. The sprite in the custom attribute example has a transparent background but this appears to be ignored when it is rendered if depthTest is set to true. I have

Black background for three.js sprites with depthTest true

↘锁芯ラ 提交于 2020-12-11 08:47:05
问题 I have been experimenting with converting the custom attribute BufferGeometry example (https://threejs.org/examples/webgl_buffergeometry_custom_attributes_particles.html) into a fly through animation and I find that the sprites have dark backgrounds (and those that I create myself as well) if depthTest is set to true. See the image. The sprite in the custom attribute example has a transparent background but this appears to be ignored when it is rendered if depthTest is set to true. I have

Drawing a Pyraminx with triangles

我与影子孤独终老i 提交于 2020-12-06 15:48:51
问题 I'm trying to code a Pyraminx which is a tetrahedon composed with multiples triangles. The way I do it must not be very accurate. Here is my code, also available at https://codepen.io/jeffprod/pen/XWbBZLN . The problem is that i'im writing the facesVectors coordinates handly. It seems ok for the yellow and blue side. But it is going difficult to set the position of red and green triangles. Is there a simple way to do ? var scene = new THREE.Scene(); var camera = new THREE.PerspectiveCamera(60

Does mobile browser support Three.js application

只愿长相守 提交于 2020-12-06 04:05:35
问题 I have my application which bases on Three.js library. However, it doesn't run on mobile browser when I used WebGLRender. I checked some application from Mr.doob (http://threejs.org/examples/#webgl_panorama_equirectangular). I wonder whether or not mobile browser support three.js or I missed something to run its application on device? Tks 回答1: According to caniusel.com WebGL is completely supported by the following mobile browsers Safari on iOS 8 Blackberry Browser 10 Opera Mobile 22+ Its

Does mobile browser support Three.js application

前提是你 提交于 2020-12-06 04:05:11
问题 I have my application which bases on Three.js library. However, it doesn't run on mobile browser when I used WebGLRender. I checked some application from Mr.doob (http://threejs.org/examples/#webgl_panorama_equirectangular). I wonder whether or not mobile browser support three.js or I missed something to run its application on device? Tks 回答1: According to caniusel.com WebGL is completely supported by the following mobile browsers Safari on iOS 8 Blackberry Browser 10 Opera Mobile 22+ Its

使用three.js实现3D轮播效果

强颜欢笑 提交于 2020-12-05 18:02:48
1、前言 需求驱动技术研究:最近项目上要求3d效果居多,轮播效果我们以前一般用swiper就能实现,但是这次界面要求颇高,不得不研究一下three.js 2、学习历程 1、找相关技术博客,未找到符合的 2、琢磨官网,花时间看了看官方文档的介绍,发现three.js的文档不是很通熟易懂 3、开始动手实现一些简单的元素、材质、简单位移动画 4、查找文档和博客一步步实现需求 3、代码 github: https://github.com/Promise-23/threeJs 代码写得比较乱,在此不贴代码了,有兴趣的可以down下来看下,功能基本实现但略显单薄 喜欢的可以帮忙点个start,感谢! 4、写在最后 1、three.js的功能还是非常强大的,值得深入学习研究 2、数学功底略差,导致一个拉近功能完善不了,拉近角度一直控制不了,后续有思路再实现 3、下面感谢一些博主给的思路和指导! https://blog.csdn.net/qq_30100043/article/details/80275413 https://blog.csdn.net/qq_30100043/article/details/80114794 https://www.cnblogs.com/v-weiwang/p/6072235.html https://blog.csdn.net/mariosss

Working around gl_PointSize limitations in three.js / webGL

假装没事ソ 提交于 2020-12-01 07:18:50
问题 I'm using three.js to create an interactive data visualisation. This visualisation involves rendering 68000 nodes, where each different node has a different size and color. Initially I tried to do this by rendering meshes, but that proved to be very expensive. My current attempt is to use a three.js particle system, with each point being a node in the visualisation. I can control the color * size of the point, but only to a certain point. On my card, the maximum size for a gl point seems to

Working around gl_PointSize limitations in three.js / webGL

血红的双手。 提交于 2020-12-01 07:18:01
问题 I'm using three.js to create an interactive data visualisation. This visualisation involves rendering 68000 nodes, where each different node has a different size and color. Initially I tried to do this by rendering meshes, but that proved to be very expensive. My current attempt is to use a three.js particle system, with each point being a node in the visualisation. I can control the color * size of the point, but only to a certain point. On my card, the maximum size for a gl point seems to

How to load three-orbitcontrols with import syntax?

牧云@^-^@ 提交于 2020-11-29 04:18:11
问题 Has anyone tried using the OrbitControls function with ReactJS? Here is the sample code I wrote: import React, { Component } from 'react'; import 'tachyons'; import * as THREE from 'react'; import OrbitControls from 'three-orbitcontrols'; class App extends Component { render() { ... //Controls const controls = new OrbitControls(camera, renderer.domElement) controls.dampingFactor = 0.25 controls.enableZoom = false It returns the following error: ./node_modules/three-orbitcontrols/OrbitControls

How to load three-orbitcontrols with import syntax?

五迷三道 提交于 2020-11-29 04:16:32
问题 Has anyone tried using the OrbitControls function with ReactJS? Here is the sample code I wrote: import React, { Component } from 'react'; import 'tachyons'; import * as THREE from 'react'; import OrbitControls from 'three-orbitcontrols'; class App extends Component { render() { ... //Controls const controls = new OrbitControls(camera, renderer.domElement) controls.dampingFactor = 0.25 controls.enableZoom = false It returns the following error: ./node_modules/three-orbitcontrols/OrbitControls