pnext / three-loader

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

Gradients #132

Open mandre96 opened 3 months ago

mandre96 commented 3 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.