|
@@ -16172,11 +16172,11 @@ THREE.CanvasRenderer = function ( parameters ) {
|
|
|
|
|
|
var texture = material.map;
|
|
|
|
|
|
- if ( texture !== null ) {
|
|
|
+ if ( texture !== null && texture.image !== undefined ) {
|
|
|
|
|
|
if ( texture.hasEventListener( 'update', onTextureUpdate ) === false ) {
|
|
|
|
|
|
- if ( texture.image !== undefined && texture.image.width > 0 ) {
|
|
|
+ if ( texture.image.width > 0 ) {
|
|
|
|
|
|
textureToPattern( texture );
|
|
|
|
|
@@ -16374,7 +16374,9 @@ THREE.CanvasRenderer = function ( parameters ) {
|
|
|
? strokePath( _color, material.wireframeLinewidth, material.wireframeLinecap, material.wireframeLinejoin )
|
|
|
: fillPath( _color );
|
|
|
|
|
|
- } else if ( material instanceof THREE.MeshBasicMaterial || material instanceof THREE.MeshLambertMaterial || material instanceof THREE.MeshPhongMaterial ) {
|
|
|
+ } else if ( material instanceof THREE.MeshBasicMaterial ||
|
|
|
+ material instanceof THREE.MeshLambertMaterial ||
|
|
|
+ material instanceof THREE.MeshPhongMaterial ) {
|
|
|
|
|
|
if ( material.map !== null ) {
|
|
|
|
|
@@ -20704,7 +20706,7 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
var deallocateMaterial = function ( material ) {
|
|
|
|
|
|
- var program = material.program;
|
|
|
+ var program = material.program.program;
|
|
|
|
|
|
if ( program === undefined ) return;
|
|
|
|
|
@@ -26869,8 +26871,7 @@ THREE.ImageUtils = {
|
|
|
var loader = new THREE.ImageLoader();
|
|
|
loader.crossOrigin = this.crossOrigin;
|
|
|
|
|
|
- var texture = new THREE.Texture();
|
|
|
- texture.mapping = mapping;
|
|
|
+ var texture = new THREE.Texture( undefined, mapping );
|
|
|
|
|
|
loader.load( url, function ( image ) {
|
|
|
|