mirror of
https://github.com/wahyd4/three.js.git
synced 2026-08-29 06:45:57 +10:00
ParticleCircleMaterial working again with CanvasRenderer
This commit is contained in:
@@ -1,15 +1,40 @@
|
||||
/**
|
||||
* @author mr.doob / http://mrdoob.com/
|
||||
*
|
||||
* parameters = {
|
||||
* color: <hex>,
|
||||
* map: new THREE.UVMap( <Image> ),
|
||||
* opacity: <float>,
|
||||
* blending: THREE.NormalBlending
|
||||
* }
|
||||
*/
|
||||
|
||||
THREE.ParticleBitmapMaterial = function ( bitmap ) {
|
||||
THREE.ParticleBasicMaterial = function ( parameters ) {
|
||||
|
||||
this.bitmap = bitmap;
|
||||
this.offset = new THREE.Vector2();
|
||||
this.color = new THREE.Color( 0xff0000 );
|
||||
this.map = null;
|
||||
this.opacity = 1;
|
||||
this.blending = THREE.NormalBlending;
|
||||
|
||||
this.offset = new THREE.Vector2(); // TODO: expose to parameters
|
||||
|
||||
if ( parameters ) {
|
||||
|
||||
if ( parameters.color !== undefined ) this.color.setHex( parameters.color );
|
||||
if ( parameters.map !== undefined ) this.map = parameters.map;
|
||||
if ( parameters.opacity !== undefined ) this.opacity = parameters.opacity;
|
||||
if ( parameters.blending !== undefined ) this.blending = parameters.blending;
|
||||
|
||||
}
|
||||
|
||||
this.toString = function () {
|
||||
|
||||
return 'THREE.ParticleBitmapMaterial ( bitmap: ' + this.bitmap + ' )';
|
||||
return 'THREE.ParticleBasicMaterial (<br/>' +
|
||||
'color: ' + this.color + '<br/>' +
|
||||
'map: ' + this.map + '<br/>' +
|
||||
'opacity: ' + this.opacity + '<br/>' +
|
||||
'blending: ' + this.blending + '<br/>' +
|
||||
')';
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user