Преглед на файлове

Examples: Removed webxr_vr_lorenzattractor. (#22315)

Mr.doob преди 4 години
родител
ревизия
c52b2a850b

+ 0 - 1
docs/manual/ar/introduction/How-to-create-VR-content.html

@@ -62,7 +62,6 @@ renderer.setAnimationLoop( function () {
 			[example:webxr_vr_ballshooter WebXR / VR / ballshooter]<br />
 			[example:webxr_vr_cubes WebXR / VR / cubes]<br />
 			[example:webxr_vr_dragging WebXR / VR / dragging]<br />
-			[example:webxr_vr_lorenzattractor WebXR / VR / lorenzattractor]<br />
 			[example:webxr_vr_paint WebXR / VR / paint]<br />
 			[example:webxr_vr_panorama_depth WebXR / VR / panorama_depth]<br />
 			[example:webxr_vr_panorama WebXR / VR / panorama]<br />

+ 0 - 1
docs/manual/en/introduction/How-to-create-VR-content.html

@@ -67,7 +67,6 @@ renderer.setAnimationLoop( function () {
 		[example:webxr_vr_ballshooter WebXR / VR / ballshooter]<br />
 		[example:webxr_vr_cubes WebXR / VR / cubes]<br />
 		[example:webxr_vr_dragging WebXR / VR / dragging]<br />
-		[example:webxr_vr_lorenzattractor WebXR / VR / lorenzattractor]<br />
 		[example:webxr_vr_paint WebXR / VR / paint]<br />
 		[example:webxr_vr_panorama_depth WebXR / VR / panorama_depth]<br />
 		[example:webxr_vr_panorama WebXR / VR / panorama]<br />

+ 0 - 1
docs/manual/ja/introduction/How-to-create-VR-content.html

@@ -61,7 +61,6 @@ renderer.setAnimationLoop( function () {
 		[example:webxr_vr_ballshooter WebXR / VR / ballshooter]<br />
 		[example:webxr_vr_cubes WebXR / VR / cubes]<br />
 		[example:webxr_vr_dragging WebXR / VR / dragging]<br />
-		[example:webxr_vr_lorenzattractor WebXR / VR / lorenzattractor]<br />
 		[example:webxr_vr_paint WebXR / VR / paint]<br />
 		[example:webxr_vr_panorama_depth WebXR / VR / panorama_depth]<br />
 		[example:webxr_vr_panorama WebXR / VR / panorama]<br />

+ 2 - 3
docs/manual/ko/introduction/How-to-create-VR-content.html

@@ -44,7 +44,7 @@ renderer.xr.enabled = true;
 	</code>
 
 	<p>
-        마지막으로, 자주 쓰이는 *window.requestAnimationFrame()* 기능을 활용할 수 없기 때문에, 애니메이션 루프를 수정해주어야 합니다. 
+        마지막으로, 자주 쓰이는 *window.requestAnimationFrame()* 기능을 활용할 수 없기 때문에, 애니메이션 루프를 수정해주어야 합니다.
         VR 프로젝트에서는 [page:WebGLRenderer.setAnimationLoop setAnimationLoop]를 사용합니다.
 		가장 간소화된 코드는 다음과 같습니다:
 	</p>
@@ -65,7 +65,6 @@ renderer.setAnimationLoop( function () {
 		[example:webxr_vr_ballshooter WebXR / VR / ballshooter]<br />
 		[example:webxr_vr_cubes WebXR / VR / cubes]<br />
 		[example:webxr_vr_dragging WebXR / VR / dragging]<br />
-		[example:webxr_vr_lorenzattractor WebXR / VR / lorenzattractor]<br />
 		[example:webxr_vr_paint WebXR / VR / paint]<br />
 		[example:webxr_vr_panorama_depth WebXR / VR / panorama_depth]<br />
 		[example:webxr_vr_panorama WebXR / VR / panorama]<br />
@@ -77,4 +76,4 @@ renderer.setAnimationLoop( function () {
 
 </body>
 
-</html>
+</html>

+ 0 - 1
docs/manual/zh/introduction/How-to-create-VR-content.html

@@ -67,7 +67,6 @@ renderer.setAnimationLoop( function () {
 		[example:webxr_vr_ballshooter WebXR / VR / ballshooter]<br />
 		[example:webxr_vr_cubes WebXR / VR / cubes]<br />
 		[example:webxr_vr_dragging WebXR / VR / dragging]<br />
-		[example:webxr_vr_lorenzattractor WebXR / VR / lorenzattractor]<br />
 		[example:webxr_vr_paint WebXR / VR / paint]<br />
 		[example:webxr_vr_panorama_depth WebXR / VR / panorama_depth]<br />
 		[example:webxr_vr_panorama WebXR / VR / panorama]<br />

+ 0 - 1
examples/files.json

@@ -347,7 +347,6 @@
 		"webxr_vr_handinput_pressbutton",
 		"webxr_vr_haptics",
 		"webxr_vr_layers",
-		"webxr_vr_lorenzattractor",
 		"webxr_vr_panorama",
 		"webxr_vr_panorama_depth",
 		"webxr_vr_paint",

BIN
examples/screenshots/webxr_vr_lorenzattractor.jpg


+ 0 - 175
examples/webxr_vr_lorenzattractor.html

@@ -1,175 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-	<head>
-		<title>three.js vr - lorenz attractor</title>
-		<meta charset="utf-8">
-		<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
-		<link type="text/css" rel="stylesheet" href="main.css">
-	</head>
-	<body>
-		<script type="module">
-
-			import * as THREE from '../build/three.module.js';
-			import { VRButton } from './jsm/webxr/VRButton.js';
-
-			let camera, scene, renderer;
-			let attractor, light;
-
-			let x = 15 * Math.random();
-			let y = 15 * Math.random();
-			let z = 15 * Math.random();
-
-			const scale = .02; // for reducing overall displayed size
-			const speed = 5; // integer, increase for faster visualization
-
-			const steps = 100000;
-			let current = 1;
-			const shown = 10000;
-
-			const beta = 8 / 3;
-			const rho = 28;
-			const sigma = 10;
-
-			const dt = .005;
-
-			init();
-			animate();
-
-			function draw() {
-
-				const geometry = attractor.geometry;
-
-				geometry.attributes.position.array.copyWithin( 3 );
-				geometry.attributes.color.array.copyWithin( 3 );
-
-				if ( current < steps ) {
-
-					const dx = sigma * ( y - x ) * dt;
-					const dy = ( x * ( rho - z ) - y ) * dt;
-					const dz = ( x * y - beta * z ) * dt;
-
-					x += dx;
-					y += dy;
-					z += dz;
-
-					geometry.attributes.position.set( [ scale * x, scale * y, scale * z ], 0 );
-
-					light.color.setHSL( current / steps, 1, .5 );
-
-					geometry.attributes.color.set( light.color.toArray(), 0 );
-
-				}
-
-				if ( current < steps + shown ) {
-
-					current ++;
-
-				} else {
-
-					current = 0;
-
-				}
-
-			}
-
-			function init() {
-
-				scene = new THREE.Scene();
-
-				camera = new THREE.PerspectiveCamera( 50, window.innerWidth / window.innerHeight, 0.1, 10 );
-				camera.position.set( 0, 1.6, 1 );
-
-				//
-
-				const geometry = new THREE.BufferGeometry();
-
-				const positions = new Float32Array( 3 * shown );
-
-				for ( let i = 0; i < positions.length; i += 3 ) {
-
-					positions.set( [ scale * x, scale * y, scale * z ], i );
-
-				}
-
-				geometry.setAttribute( 'position', new THREE.BufferAttribute( positions, 3 ) );
-
-				const colors = new Float32Array( 3 * shown );
-
-				for ( let i = 0; i < positions.length; i += 3 ) {
-
-					colors.set( [ 1, 0, 0 ], i );
-
-				}
-
-				geometry.setAttribute( 'color', new THREE.BufferAttribute( colors, 3 ) );
-
-				const material = new THREE.LineBasicMaterial( { vertexColors: true } );
-
-				attractor = new THREE.Line( geometry, material );
-				attractor.position.set( 0, 1.5, - 2 );
-				attractor.frustumCulled = false; // critical to avoid blackouts!
-				scene.add( attractor );
-
-				//
-
-				light = new THREE.PointLight( 0xffffff, 1 );
-				light.distance = 2;
-				attractor.add( light );
-
-				const ground = new THREE.Mesh(
-					new THREE.PlaneGeometry( 10, 10 ),
-					new THREE.MeshPhongMaterial()
-				);
-				ground.geometry.rotateX( - 90 * Math.PI / 180 );
-				scene.add( ground );
-
-				//
-
-				renderer = new THREE.WebGLRenderer( { antialias: true } );
-				renderer.setPixelRatio( window.devicePixelRatio );
-				renderer.setSize( window.innerWidth, window.innerHeight );
-				renderer.xr.enabled = true;
-				document.body.appendChild( renderer.domElement );
-
-				document.body.appendChild( VRButton.createButton( renderer ) );
-
-				//
-
-				window.addEventListener( 'resize', onWindowResize );
-
-				//
-
-				if ( typeof TESTING !== 'undefined'  ) { for ( let i = 0; i < 200; i ++ ) { render(); } };
-
-			}
-
-			function onWindowResize() {
-
-				camera.aspect = window.innerWidth / window.innerHeight;
-				camera.updateProjectionMatrix();
-
-				renderer.setSize( window.innerWidth, window.innerHeight );
-
-			}
-
-			function animate() {
-
-				renderer.setAnimationLoop( render );
-
-			}
-
-			function render() {
-
-				for ( let i = 0; i < speed; i ++ ) draw();
-
-				attractor.geometry.attributes.position.needsUpdate = true;
-				attractor.geometry.attributes.color.needsUpdate = true;
-				attractor.rotation.z += .001;
-
-				renderer.render( scene, camera );
-
-			}
-
-		</script>
-	</body>
-</html>