| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- /**
- * @author mr.doob / http://mrdoob.com/
- * @author alteredq / http://alteredqualia.com/
- *
- * parameters = {
- * color: <hex>,
- * map: new THREE.UVMap( <Image> ),
- * opacity: <float>,
- * blending: THREE.NormalBlending,
- * wireframe: <boolean>,
- * wireframe_linewidth: <float>
- * }
- */
- THREE.MeshBasicMaterial = function ( parameters ) {
- this.id = THREE.MeshBasicMaterialCounter.value ++;
- this.color = new THREE.Color( 0xff0000 );
- this.map = null;
- this.opacity = 1;
- this.blending = THREE.NormalBlending;
- this.wireframe = false;
- this.wireframe_linewidth = 1;
- 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;
- if ( parameters.wireframe !== undefined ) this.wireframe = parameters.wireframe;
- if ( parameters.wireframe_linewidth !== undefined ) this.wireframe_linewidth = parameters.wireframe_linewidth;
- }
- this.toString = function () {
- return 'THREE.MeshBasicMaterial (<br/>' +
- 'id: ' + this.id + '<br/>' +
- 'color: ' + this.color + '<br/>' +
- 'map: ' + this.map + '<br/>' +
- 'opacity: ' + this.opacity + '<br/>' +
- 'blending: ' + this.blending + '<br/>' +
- 'wireframe: ' + this.wireframe + '<br/>' +
- 'wireframe_linewidth: ' + this.wireframe_linewidth +'<br/>' +
- ')';
- };
- }
- THREE.MeshBasicMaterialCounter = { value: 0 };
|