Skip to content

Commit a030086

Browse files
committed
texture.loaded = truetexture.image.loaded = true
1 parent e7f5f38 commit a030086

File tree

10 files changed

+304
-309
lines changed

10 files changed

+304
-309
lines changed

build/Three.js

Lines changed: 65 additions & 65 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/ThreeDebug.js

Lines changed: 55 additions & 55 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/ThreeExtras.js

Lines changed: 76 additions & 76 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/geometry_panorama.html

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
var camera, scene, renderer;
4141

4242
var fov = 75,
43-
texture_placeholder, wireframe,
43+
texture_placeholder,
4444
isUserInteracting = false,
4545
onMouseDownMouseX = 0, onMouseDownMouseY = 0,
4646
lon = 90, onMouseDownLon = 0,
@@ -63,19 +63,20 @@
6363
texture_placeholder.width = 128;
6464
texture_placeholder.height = 128;
6565

66-
wireframe = new THREE.MeshBasicMaterial( { color: 0xffffff, opacity: 0, wireframe: true } );
67-
6866
var context = texture_placeholder.getContext( '2d' );
6967
context.fillStyle = 'rgb( 200, 200, 200 )';
7068
context.fillRect( 0, 0, texture_placeholder.width, texture_placeholder.height );
7169

72-
var materials = [];
73-
materials.push( [ loadTexture( 'textures/cube/skybox/px.jpg' ), wireframe ] ); // right
74-
materials.push( [ loadTexture( 'textures/cube/skybox/nx.jpg' ), wireframe ] ); // left
75-
materials.push( [ loadTexture( 'textures/cube/skybox/py.jpg' ), wireframe ] ); // top
76-
materials.push( [ loadTexture( 'textures/cube/skybox/ny.jpg' ), wireframe ] ); // bottom
77-
materials.push( [ loadTexture( 'textures/cube/skybox/pz.jpg' ), wireframe ] ); // back
78-
materials.push( [ loadTexture( 'textures/cube/skybox/nz.jpg' ), wireframe ] ); // front
70+
var materials = [
71+
72+
loadTexture( 'textures/cube/skybox/px.jpg' ), // right
73+
loadTexture( 'textures/cube/skybox/nx.jpg' ), // left
74+
loadTexture( 'textures/cube/skybox/py.jpg' ), // top
75+
loadTexture( 'textures/cube/skybox/ny.jpg' ), // bottom
76+
loadTexture( 'textures/cube/skybox/pz.jpg' ), // back
77+
loadTexture( 'textures/cube/skybox/nz.jpg' ) // front
78+
79+
];
7980

8081
mesh = new THREE.Mesh( new Cube( 300, 300, 300, 7, 7, materials, true ), new THREE.MeshFaceMaterial() );
8182
mesh.overdraw = true;
@@ -104,8 +105,8 @@
104105

105106
image.onload = function () {
106107

108+
this.loaded = true;
107109
material.map.image = this;
108-
material.map.loaded = true;
109110
render();
110111

111112
};
@@ -121,8 +122,6 @@
121122

122123
isUserInteracting = true;
123124

124-
wireframe.opacity = 0.2;
125-
126125
onPointerDownPointerX = event.clientX;
127126
onPointerDownPointerY = event.clientY;
128127

@@ -145,7 +144,6 @@
145144
function onDocumentMouseUp( event ) {
146145

147146
isUserInteracting = false;
148-
wireframe.opacity = 0;
149147
render();
150148

151149
}

examples/geometry_panorama_fisheye.html

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
var camera, scene, renderer;
4040

4141
var fov = 75,
42-
texture_placeholder, wireframe,
42+
texture_placeholder,
4343
isUserInteracting = false,
4444
onMouseDownMouseX = 0, onMouseDownMouseY = 0,
4545
lon = 90, onMouseDownLon = 0,
@@ -62,19 +62,20 @@
6262
texture_placeholder.width = 128;
6363
texture_placeholder.height = 128;
6464

65-
wireframe = new THREE.MeshBasicMaterial( { color: 0xffffff, opacity: 0, wireframe: true } );
66-
6765
var context = texture_placeholder.getContext( '2d' );
6866
context.fillStyle = 'rgb( 200, 200, 200 )';
6967
context.fillRect( 0, 0, texture_placeholder.width, texture_placeholder.height );
7068

71-
var materials = [];
72-
materials.push( [ loadTexture( 'textures/cube/skybox/px.jpg' ), wireframe ] ); // right
73-
materials.push( [ loadTexture( 'textures/cube/skybox/nx.jpg' ), wireframe ] ); // left
74-
materials.push( [ loadTexture( 'textures/cube/skybox/py.jpg' ), wireframe ] ); // top
75-
materials.push( [ loadTexture( 'textures/cube/skybox/ny.jpg' ), wireframe ] ); // bottom
76-
materials.push( [ loadTexture( 'textures/cube/skybox/pz.jpg' ), wireframe ] ); // back
77-
materials.push( [ loadTexture( 'textures/cube/skybox/nz.jpg' ), wireframe ] ); // front
69+
var materials = [
70+
71+
loadTexture( 'textures/cube/skybox/px.jpg' ), // right
72+
loadTexture( 'textures/cube/skybox/nx.jpg' ), // left
73+
loadTexture( 'textures/cube/skybox/py.jpg' ), // top
74+
loadTexture( 'textures/cube/skybox/ny.jpg' ), // bottom
75+
loadTexture( 'textures/cube/skybox/pz.jpg' ), // back
76+
loadTexture( 'textures/cube/skybox/nz.jpg' ) // front
77+
78+
];
7879

7980
mesh = new THREE.Mesh( new Cube( 300, 300, 300, 7, 7, materials, true ), new THREE.MeshFaceMaterial() );
8081
mesh.overdraw = true;
@@ -113,8 +114,8 @@
113114

114115
image.onload = function () {
115116

117+
this.loaded = true;
116118
material.map.image = this;
117-
material.map.loaded = true;
118119
render();
119120

120121
};
@@ -130,8 +131,6 @@
130131

131132
isUserInteracting = true;
132133

133-
wireframe.opacity = 0.2;
134-
135134
onPointerDownPointerX = event.clientX;
136135
onPointerDownPointerY = event.clientY;
137136

@@ -154,7 +153,6 @@
154153
function onDocumentMouseUp( event ) {
155154

156155
isUserInteracting = false;
157-
wireframe.opacity = 0;
158156
render();
159157

160158
}

examples/geometry_terrain.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
var heightMap = height( 1024, 1024 );
7171

7272
var texture = new THREE.Texture( shadow( heightMap ) );
73-
texture.loaded = true;
73+
texture.image.loaded = true;
7474

7575
var material = new THREE.MeshBasicMaterial( { map: texture } );
7676

examples/materials_video.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
//
7575

7676
texture = document.createElement( 'canvas' );
77+
texture.loaded = true;
7778
texture.width = 480;
7879
texture.height = 204;
7980

@@ -82,11 +83,11 @@
8283
textureContext.fillRect( 0, 0, 480, 204 );
8384

8485
var map = new THREE.Texture( texture );
85-
map.loaded = true;
8686

8787
var material = new THREE.MeshBasicMaterial( { map: map } );
8888

8989
textureReflection = document.createElement( 'canvas' );
90+
textureReflection.loaded = true;
9091
textureReflection.width = 480;
9192
textureReflection.height = 204;
9293

0 commit comments

Comments
 (0)