three.js

After using the threeBSP method, the created spheres are not smooth

坚强是说给别人听的谎言 提交于 2021-02-10 16:22:01
问题 I'm trying to change the number of segments of the sphere, but I can't cut it if I have reached the 45 limit, and there's no other way to make the sphere a little smoother. var result; var sphereG = new THREE.SphereGeometry( 115, 45, 45 ); var sphereM = new THREE.MeshPhongMaterial({color:"#fff"} ); var sphere = new THREE.Mesh(sphereG,sphereM); var polyhedronG = new THREE.Geometry(); polyhedronG.vertices.push( new THREE.Vector3(-200,200,-200), //A 0 new THREE.Vector3(-200,-200,200), //B 1 new

Maintain aspect on Three.js texture

社会主义新天地 提交于 2021-02-10 15:57:16
问题 I'm trying to keep a texture centered when it's shown in a different sized box. I've seen this answer Three.js: Make image texture fit object without distorting or repeating But it's not quite doing it for me. this.texture = new THREE.Texture(this.image) const vec = new THREE.Vector3() new THREE.Box3().setFromObject( this.rounded ).getSize(vec) const imageAspect = this.image.width/this.image.height const boxAspect = vec.x/vec.y this.texture.wrapT = THREE.RepeatWrapping; this.texture.offset.y

Maintain aspect on Three.js texture

廉价感情. 提交于 2021-02-10 15:56:48
问题 I'm trying to keep a texture centered when it's shown in a different sized box. I've seen this answer Three.js: Make image texture fit object without distorting or repeating But it's not quite doing it for me. this.texture = new THREE.Texture(this.image) const vec = new THREE.Vector3() new THREE.Box3().setFromObject( this.rounded ).getSize(vec) const imageAspect = this.image.width/this.image.height const boxAspect = vec.x/vec.y this.texture.wrapT = THREE.RepeatWrapping; this.texture.offset.y

Maintain aspect on Three.js texture

Deadly 提交于 2021-02-10 15:56:13
问题 I'm trying to keep a texture centered when it's shown in a different sized box. I've seen this answer Three.js: Make image texture fit object without distorting or repeating But it's not quite doing it for me. this.texture = new THREE.Texture(this.image) const vec = new THREE.Vector3() new THREE.Box3().setFromObject( this.rounded ).getSize(vec) const imageAspect = this.image.width/this.image.height const boxAspect = vec.x/vec.y this.texture.wrapT = THREE.RepeatWrapping; this.texture.offset.y

Converting CanvasRenderer to WebGLRenderer

空扰寡人 提交于 2021-02-10 15:04:10
问题 I would like to take the example here: https://threejs.org/examples/?q=canvas#canvas_particles_waves And use it with the WebGLRenderer, by changing: renderer = new THREE.CanvasRenderer(); to renderer = new THREE.WebGLRenderer(); So that I can combine this effect with another that is already using WebGL. However, doing so results in errors with the particles being rendered, like so: three.js:18501 Uncaught TypeError: Cannot read property 'offset' of undefined at WebGLSpriteRenderer.render

How to make sure three.js is mobile friendly

淺唱寂寞╮ 提交于 2021-02-10 12:33:34
问题 This last week I have been building myself a personal website. It has some information in semi transparent divs in front of an animation of a spinning cube. (pretty basic stuff right?) Well here's the rub, I noticed that examples at threjs.org/examples run on mobile well and despite my best efforts to do things likewise my site doesn't appear to be rendering threejs components on mobile. So far I have tried a few things: First to ensure that I was rolling back gracefully from webgl I included

Three.js Raycasting with Camera as Origin

亡梦爱人 提交于 2021-02-10 07:55:41
问题 I'm trying to determine whether a point in space is visible to the camera or hidden behind other objects in the scene. I'm doing this by casting a ray from the position of the camera to that point in space and testing if that ray is intersected by an set of intersectable objects. My problem is no intersections occur until the camera position itself intersects one of the objects in the set of intersectable objects. I've created a jsfiddle in which, if an intersection is detected, a line is

Unexpected result using ThreeCSG

混江龙づ霸主 提交于 2021-02-10 06:42:26
问题 I'm experimenting with the ThreeCSG library and am attempting to swap out the sphere or normal geometry for a custom made Shape, in this case the heart shape from the 3js examples. Unfortunately I'm getting an odd result on the side that faces the camera. Here's a code sample: (function onLoad() { var container, camera, scene, renderer; var grey = 0xD3D3D3; init(); animate(); function init() { container = document.getElementById('container'); initScene(); addGridHelper(); addCamera();

ThreeJS weird stripes shadow

放肆的年华 提交于 2021-02-10 05:17:51
问题 I am trying to make room light inside this kitchen http://bozoou.com/plocice3D/ You can notice wierd horizontal strikes of shadow on kitchen element. I have suspect in spotLight which is in middle of x,y, and top of z axis. If I move source of light for only 1 point along y-axis (room is 500x300), I got this strikes of shadow on whole floor: http://bozoou.com/plocice3D/?moveLight=1 Same problem happens if I move light for 1 or 50. All elements cast and receive shadow. 回答1: This problem is

【更新】LEADTOOLS v20最新版发布(二)

牧云@^-^@ 提交于 2021-02-09 02:03:06
在数码图象开发工具领域中的全球领导者—— LEADTOOLS v20 已正式发布,本站将以连载的形式为大家介绍新版本新增内容。本文主要介绍LEADTOOLS v20文档引擎的新功能。 LEAD Technologies已经正式推出LEADTOOLS v20。这个新的版本将LEAD的成像技术扩展到新的快速增长的开发市场,新版本的库利用.NET Standard来针对Xamarin应用程序模型定位.NET Framework,.NET Core和Visual Studio Tools ,以及Microsoft Azure服务。除此之外,LEAD文档,医疗和多媒体产品线中的现有技术也增加了新的功能,速度也得到提升。 LEADTOOLS v20 (Windows、Linux、IOS/macOS)下载>>> 文档引擎新功能: 识别引擎 改进LEAD OCR引擎(以前的Advantage Engine)的速度和准确性 改善条形码和MICR精度,并将速度提高到之前的10倍 添加了新的条形码预处理选项,目的是在识别质量差的图像时提高准确性 CMC-7 MICR字体 用于高级OMR表单识别的答案区域和OMR日期字段 文档查看器(HTML5 / JavaScript) 提高内部SVG引擎的速度和准确性 使用DPI打印 打印可见区域/屏幕截图 添加了无盘模式,允许用户安全地加载,保存