[英]Size of sprites along geometry Three.js
Sprite不能使用sizeAttenuation
功能為false。 您需要使用Pointcloud
。 http://codepen.io/seanseansean/pen/EaBZEY
您要搜索的pontCloud資料中的參數是sizeAttenuation= false
。
將使所有粒子尺寸相對於畫布尺寸。 不會改變觀點。
var geometry = new THREE.Geometry();
geometry.vertices.push( new THREE.Vector3() );
var size = 32; // means 32px
var sectorIcon = new THREE.PointCloud( geometry, new THREE.PointCloudMaterial( { size: size, color: new THREE.Color( 0xffffff ), depthTest: 1, depthWrite: false, opacity: 0.5, sizeAttenuation: false, blending: THREE.AdditiveBlending, transparent: true, map: THREE.ImageUtils.loadTexture("img/sectors/"+value.image_file) } ) );
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.