FBXLoader修改

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
function loadTexture( textureNode, loader, images, connections ) {

var fileName;

var currentPath = loader.path;
var children = connections.get( textureNode.id ).children;

if ( children !== undefined && children.length > 0 && images[ children[ 0 ].ID ] !== undefined ) {

fileName = images[ children[ 0 ].ID ];

if ( fileName.indexOf( 'blob:' ) === 0 || fileName.indexOf( 'data:' ) === 0 ) {

loader.setPath( undefined );

}

}

var texture;

if ( textureNode.FileName.slice( -3 ).toLowerCase() === 'tga' ) {
//texture = THREE.Loader.Handlers.get( '.tga' ).load( fileName );
texture = THREE.Loader.Handlers.get( '.tga' ).load( currentPath+textureNode.FileName );
} else {

texture = loader.load( currentPath+'/'+textureNode.FileName );

}

loader.setPath( currentPath );

return texture;

}

banner

这个banner是去年公司塞班行的第一天早上起床在肯辛顿的阳台拍的,当时被那种景色震惊了

下面有一些当时拍视频

Read More

关于cache-control

问题

发现更新文章后,浏览器不会及时更新,html被缓存了,只能手动清除

解决

配置nginx的Cache-Control

不缓存

1
2
3
location ~ .*\.(css|js|swf|php|htm|html )$ {
add_header Cache-Control no-store;
}

限制缓存时间

1
2
3
location ~ .*\.(css|js|swf|php|htm|html )$ {
add_header Cache-Control max-age=3600;
}