Browse Source

Examples: Removed webgl_lines_sphere.

Mr.doob 2 years ago
parent
commit
8d52742320

+ 0 - 1
docs/api/en/materials/LineBasicMaterial.html

@@ -36,7 +36,6 @@
 			[example:webgl_interactive_voxelpainter WebGL / interactive / voxelpainter]<br />
 			[example:webgl_lines_colors WebGL / lines / colors]<br />
 			[example:webgl_lines_dashed WebGL / lines / dashed]<br />
-			[example:webgl_lines_sphere WebGL / lines / sphere]<br />
 			[example:webgl_materials WebGL / materials]<br />
 			[example:physics_ammo_rope physics / ammo / rope]
 		</p>

+ 0 - 1
docs/api/fr/materials/LineBasicMaterial.html

@@ -38,7 +38,6 @@
 			[example:webgl_interactive_voxelpainter WebGL / interactive / voxelpainter]<br />
 			[example:webgl_lines_colors WebGL / lines / colors]<br />
 			[example:webgl_lines_dashed WebGL / lines / dashed]<br />
-			[example:webgl_lines_sphere WebGL / lines / sphere]<br />
 			[example:webgl_materials WebGL / materials]<br />
 			[example:physics_ammo_rope physics / ammo / rope]
 		</p>

+ 0 - 1
docs/api/it/materials/LineBasicMaterial.html

@@ -38,7 +38,6 @@
 			[example:webgl_interactive_voxelpainter WebGL / interactive / voxelpainter]<br />
 			[example:webgl_lines_colors WebGL / lines / colors]<br />
 			[example:webgl_lines_dashed WebGL / lines / dashed]<br />
-			[example:webgl_lines_sphere WebGL / lines / sphere]<br />
 			[example:webgl_materials WebGL / materials]<br />
 			[example:physics_ammo_rope physics / ammo / rope]
 		</p>

+ 0 - 1
docs/api/zh/materials/LineBasicMaterial.html

@@ -38,7 +38,6 @@
 			[example:webgl_interactive_voxelpainter WebGL / interactive / voxelpainter]<br />
 			[example:webgl_lines_colors WebGL / lines / colors]<br />
 			[example:webgl_lines_dashed WebGL / lines / dashed]<br />
-			[example:webgl_lines_sphere WebGL / lines / sphere]<br />
 			[example:webgl_materials WebGL / materials]<br />
 			[example:physics_ammo_rope physics / ammo / rope]
 		</p>

+ 0 - 1
examples/files.json

@@ -71,7 +71,6 @@
 		"webgl_lines_fat",
 		"webgl_lines_fat_raycasting",
 		"webgl_lines_fat_wireframe",
-		"webgl_lines_sphere",
 		"webgl_loader_3dm",
 		"webgl_loader_3ds",
 		"webgl_loader_3mf",

BIN
examples/screenshots/webgl_lines_sphere.jpg


+ 0 - 198
examples/webgl_lines_sphere.html

@@ -1,198 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
-		<title>three.js webgl - lines - spheres</title>
-		<meta charset="utf-8">
-		<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
-		<link type="text/css" rel="stylesheet" href="main.css">
-	</head>
-	<body>
-
-		<div id="info">
-			<a href="https://threejs.org" target="_blank" rel="noopener">three.js</a> - lines WebGL demo
-		</div>
-
-		<!-- Import maps polyfill -->
-		<!-- Remove this when import maps will be widely supported -->
-		<script async src="https://unpkg.com/[email protected]/dist/es-module-shims.js"></script>
-
-		<script type="importmap">
-			{
-				"imports": {
-					"three": "../build/three.module.js",
-					"three/addons/": "./jsm/"
-				}
-			}
-		</script>
-
-		<script type="module">
-
-			import * as THREE from 'three';
-
-			const SCREEN_WIDTH = window.innerWidth,
-				SCREEN_HEIGHT = window.innerHeight,
-
-				r = 450;
-
-			let mouseY = 0,
-
-				windowHalfY = window.innerHeight / 2,
-
-				camera, scene, renderer;
-
-			init();
-			animate();
-
-			function init() {
-
-				camera = new THREE.PerspectiveCamera( 80, SCREEN_WIDTH / SCREEN_HEIGHT, 1, 3000 );
-				camera.position.z = 1000;
-
-				scene = new THREE.Scene();
-
-				const parameters = [[ 0.25, 0xff7700, 1 ], [ 0.5, 0xff9900, 1 ], [ 0.75, 0xffaa00, 0.75 ], [ 1, 0xffaa00, 0.5 ], [ 1.25, 0x000833, 0.8 ],
-					[ 3.0, 0xaaaaaa, 0.75 ], [ 3.5, 0xffffff, 0.5 ], [ 4.5, 0xffffff, 0.25 ], [ 5.5, 0xffffff, 0.125 ]];
-
-				const geometry = createGeometry();
-
-				for ( let i = 0; i < parameters.length; ++ i ) {
-
-					const p = parameters[ i ];
-
-					const material = new THREE.LineBasicMaterial( { color: p[ 1 ], opacity: p[ 2 ] } );
-
-					const line = new THREE.LineSegments( geometry, material );
-					line.scale.x = line.scale.y = line.scale.z = p[ 0 ];
-					line.userData.originalScale = p[ 0 ];
-					line.rotation.y = Math.random() * Math.PI;
-					line.updateMatrix();
-					scene.add( line );
-
-				}
-
-				renderer = new THREE.WebGLRenderer( { antialias: true } );
-				renderer.setPixelRatio( window.devicePixelRatio );
-				renderer.setSize( SCREEN_WIDTH, SCREEN_HEIGHT );
-				document.body.appendChild( renderer.domElement );
-
-				document.body.style.touchAction = 'none';
-				document.body.addEventListener( 'pointermove', onPointerMove );
-
-				//
-
-				window.addEventListener( 'resize', onWindowResize );
-
-				// test geometry swapability
-
-				setInterval( function () {
-
-					const geometry = createGeometry();
-
-					scene.traverse( function ( object ) {
-
-						if ( object.isLine ) {
-
-							object.geometry.dispose();
-							object.geometry = geometry;
-
-						}
-
-					} );
-
-				}, 1000 );
-
-			}
-
-			function createGeometry() {
-
-				const geometry = new THREE.BufferGeometry();
-				const vertices = [];
-
-				const vertex = new THREE.Vector3();
-
-				for ( let i = 0; i < 1500; i ++ ) {
-
-					vertex.x = Math.random() * 2 - 1;
-					vertex.y = Math.random() * 2 - 1;
-					vertex.z = Math.random() * 2 - 1;
-					vertex.normalize();
-					vertex.multiplyScalar( r );
-
-					vertices.push( vertex.x, vertex.y, vertex.z );
-
-					vertex.multiplyScalar( Math.random() * 0.09 + 1 );
-
-					vertices.push( vertex.x, vertex.y, vertex.z );
-
-				}
-
-				geometry.setAttribute( 'position', new THREE.Float32BufferAttribute( vertices, 3 ) );
-
-				return geometry;
-
-			}
-
-			function onWindowResize() {
-
-				windowHalfY = window.innerHeight / 2;
-
-				camera.aspect = window.innerWidth / window.innerHeight;
-				camera.updateProjectionMatrix();
-
-				renderer.setSize( window.innerWidth, window.innerHeight );
-
-			}
-
-			function onPointerMove( event ) {
-
-				if ( event.isPrimary === false ) return;
-
-				mouseY = event.clientY - windowHalfY;
-
-			}
-
-			//
-
-			function animate() {
-
-				requestAnimationFrame( animate );
-
-				render();
-
-			}
-
-			function render() {
-
-				camera.position.y += ( - mouseY + 200 - camera.position.y ) * .05;
-				camera.lookAt( scene.position );
-
-				renderer.render( scene, camera );
-
-				const time = Date.now() * 0.0001;
-
-				for ( let i = 0; i < scene.children.length; i ++ ) {
-
-					const object = scene.children[ i ];
-
-					if ( object.isLine ) {
-
-						object.rotation.y = time * ( i < 4 ? ( i + 1 ) : - ( i + 1 ) );
-
-						if ( i < 5 ) {
-
-							const scale = object.userData.originalScale * ( i / 5 + 1 ) * ( 1 + 0.5 * Math.sin( 7 * time ) );
-
-							object.scale.x = object.scale.y = object.scale.z = scale;
-
-						}
-
-					}
-
-				}
-
-			}
-
-
-		</script>
-	</body>
-</html>

+ 0 - 1
test/e2e/puppeteer.js

@@ -72,7 +72,6 @@ const exceptionList = [
 	'webgl_buffergeometry_glbufferattribute',
 	'webgl_clipping_advanced',
 	'webgl_lensflares',
-	'webgl_lines_sphere',
 	'webgl_lights_spotlights',
 	'webgl_loader_imagebitmap',
 	'webgl_loader_texture_lottie',