Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 4 additions & 17 deletions examples/misc_fps.html
Original file line number Diff line number Diff line change
Expand Up @@ -262,22 +262,12 @@

// init 3D stuff

function makePlatform( jsonUrl, textureUrl, textureQuality ) {
function makePlatform( url ) {

var placeholder = new THREE.Object3D();

var texture = new THREE.TextureLoader().load( textureUrl );
texture.minFilter = THREE.LinearFilter;
texture.anisotropy = textureQuality;

var loader = new THREE.JSONLoader();
loader.load( jsonUrl, function ( geometry ) {

geometry.computeFaceNormals();

var platform = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { map: texture } ) );

platform.name = "platform";
var loader = new THREE.ObjectLoader();
loader.load( url, function ( platform ) {

placeholder.add( platform );

Expand Down Expand Up @@ -308,12 +298,9 @@
scene.background = envMap;

scene.add( makePlatform(
'models/platform/platform.json',
'models/platform/platform.jpg',
renderer.capabilities.getMaxAnisotropy()
'models/json/platform/platform.json'
) );


// start the game

var start = function ( gameLoop, gameViewportSize ) {
Expand Down
1 change: 1 addition & 0 deletions examples/models/json/platform/platform.json

Large diffs are not rendered by default.

Loading