简体   繁体   中英

Size of sprites along geometry Three.js

I want to show an animation of sprites along the figure. specifically moving sprites walking figure. so as shown here:

http://armsglobe.chromeexperiments.com/

I am basing on the answer to this question:

http://stackoverflow.com/questions/25898635/three-js-how-to-animate-particles-along-a-line

在此处输入图片说明

This is my result, sprites start out small, then they get bigger. I want who are the same size.

but I need you all sprites the same size. I looked at the code but does not know what to do for all sprites the same size .

I would greatly appreciate if you can help. 在此处输入图片说明

Sprite cannot use sizeAttenuation feature to be false. You need to use Pointcloud . http://codepen.io/seanseansean/pen/EaBZEY

Parameter in pontCloud material you searching for is the sizeAttenuation= false .

Will make all particles size relative to canvas size. will not change in perspective.

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) } ) );

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM