pnext / three-loader

Point cloud loader for ThreeJS, based on the core parts of Potree
Other
212 stars 92 forks source link

Gradients #132

Open mandre96 opened 8 months ago

mandre96 commented 8 months ago

Does someone was able to use gradients in point cloud material shading?

public loadTestLargeCloud() { const urlEntity = 'https://cdn.rawgit.com/potree/potree/develop/pointclouds/vol_total/'; this._potree .loadPointCloud( // The name of the point cloud which is to be loaded. 'cloud.js', // Given the relative URL of a file, should return a full URL (e.g. // signed). (relativeUrl) =>${urlEntity}${relativeUrl} ) .then((pco) => { pco.position.set(0, 0, 0); pco.material.size = 1.0; this._largeScaleClouds.push(pco); pco.material.gradient = RAINBOW; pco.material.elevationRange = [720, 800]; pco.material.pointColorType = PointColorType.ELEVATION; this._dunaApp.addObject(pco, ''); // Add the loaded point cloud to // the map and specific layer. }); }

I'm only getting the same color through out the point cloud.