Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed deprecated code in other post-processing examples #7961

Merged
merged 1 commit into from
Jan 14, 2016
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
2 changes: 1 addition & 1 deletion examples/js/crossfade/scenes.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function Scene ( type, numObjects, cameraZ, fov, rotationSpeed, clearColor ) {
this.scene.add( light );

this.rotationSpeed = rotationSpeed;
defaultMaterial = new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.FlatShading, vertexColors: THREE.VertexColors } );
defaultMaterial = new THREE.MeshPhongMaterial( { color: 0xffffff, shading: THREE.FlatShading, vertexColors: THREE.VertexColors } );
this.mesh = new THREE.Mesh( generateGeometry( type, numObjects ), defaultMaterial );
this.scene.add( this.mesh );

Expand Down
2 changes: 1 addition & 1 deletion examples/js/crossfade/transition.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function Transition ( sceneA, sceneB ) {

this.textures = [];
for ( var i = 0; i < 6; i ++ )
this.textures[ i ] = new THREE.ImageUtils.loadTexture( 'textures/transition/transition' + ( i + 1 ) + '.png' );
this.textures[ i ] = new THREE.TextureLoader().load( 'textures/transition/transition' + ( i + 1 ) + '.png' );

this.quadmaterial = new THREE.ShaderMaterial( {

Expand Down
8 changes: 3 additions & 5 deletions examples/webgl_postprocessing_dof.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
font-size:13px;
text-align:center;
font-weight: bold;
text-align:center;
}

a {
Expand Down Expand Up @@ -62,8 +63,7 @@
var camera, scene, renderer,
materials = [], objects = [],
singleMaterial, zmaterial = [],
parameters, i, j, k, h, color, x, y, z, s, n, nobjects,
material_depth, cubeMaterial;
parameters, i, j, k, h, color, x, y, z, s, n, nobjects, cubeMaterial;

var mouseX = 0, mouseY = 0;

Expand Down Expand Up @@ -95,8 +95,6 @@

renderer.sortObjects = false;

material_depth = new THREE.MeshDepthMaterial();

var path = "textures/cube/SwedishRoyalCastle/";
var format = '.jpg';
var urls = [
Expand All @@ -105,7 +103,7 @@
path + 'pz' + format, path + 'nz' + format
];

var textureCube = THREE.ImageUtils.loadTextureCube( urls );
var textureCube = new THREE.CubeTextureLoader().load( urls );

parameters = { color: 0xff1100, envMap: textureCube, shading: THREE.FlatShading };
cubeMaterial = new THREE.MeshBasicMaterial( parameters );
Expand Down
26 changes: 8 additions & 18 deletions examples/webgl_postprocessing_dof2.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,12 @@

#info {
color:#fff;

position: relative;
top: 0px;

position: absolute;
width: 100em;
margin: 0 auto -2.1em;
padding: 5px;
width: 500px;
z-index: 5;

left: 50px;

z-index:100;
}
</style>
</head>
Expand All @@ -41,23 +37,17 @@
-->
<body>
<script src="../build/three.min.js"></script>

<script src="js/shaders/BokehShader2.js"></script>

<script src="js/Detector.js"></script>
<script src="js/libs/stats.min.js"></script>

<script src='js/libs/dat.gui.min.js'></script>

<div id="info">


<a href="http://threejs.org" target="_blank">three.js</a> - webgl realistic depth-of-field bokeh example<br/>
shader ported from <a href="http://blenderartists.org/forum/showthread.php?237488-GLSL-depth-of-field-with-bokeh-v2-4-(update)">Martins Upitis</a>

<a href="http://threejs.org" target="_blank">three.js</a> - webgl realistic depth-of-field bokeh example -
shader ported from <a href="http://blenderartists.org/forum/showthread.php?237488-GLSL-depth-of-field-with-bokeh-v2-4-(update)">Martins Upitis</a>
</div>


<script src="js/shaders/BokehShader2.js"></script>
<script>

if ( ! Detector.webgl ) Detector.addGetWebGLMessage();
Expand Down Expand Up @@ -120,7 +110,7 @@
r + "posy.jpg", r + "negy.jpg",
r + "posz.jpg", r + "negz.jpg" ];

var textureCube = THREE.ImageUtils.loadTextureCube( urls );
var textureCube = new THREE.CubeTextureLoader().load( urls );
textureCube.format = THREE.RGBFormat;

// Skybox
Expand Down