瀏覽代碼

Editor: Removed unused TeapotGeometry code.

Mr.doob 2 年之前
父節點
當前提交
d6fe1558c1
共有 3 個文件被更改,包括 0 次插入137 次删除
  1. 0 29
      editor/js/Menubar.Add.js
  2. 0 105
      editor/js/Sidebar.Geometry.TeapotGeometry.js
  3. 0 3
      editor/sw.js

+ 0 - 29
editor/js/Menubar.Add.js

@@ -303,35 +303,6 @@ function MenubarAdd( editor ) {
 	} );
 	options.add( option );
 
-	/*
-	// Teapot
-
-	option = new UIRow();
-	option.setClass( 'option' );
-	option.setTextContent( 'Teapot' );
-	option.onClick( function () {
-
-		let size = 50;
-		let segments = 10;
-		let bottom = true;
-		let lid = true;
-		let body = true;
-		let fitLid = false;
-		let blinnScale = true;
-
-		let material = new THREE.MeshStandardMaterial();
-
-		let geometry = new TeapotGeometry( size, segments, bottom, lid, body, fitLid, blinnScale );
-		let mesh = new THREE.Mesh( geometry, material );
-		mesh.name = 'Teapot';
-
-		editor.addObject( mesh );
-		editor.select( mesh );
-
-	} );
-	options.add( option );
-	*/
-
 	//
 
 	options.add( new UIHorizontalRule() );

+ 0 - 105
editor/js/Sidebar.Geometry.TeapotGeometry.js

@@ -1,105 +0,0 @@
-import { UIDiv, UIRow, UIText, UIInteger, UICheckbox, UINumber } from './libs/ui.js';
-
-import { TeapotGeometry } from 'three/addons/geometries/TeapotGeometry.js';
-
-function GeometryParametersPanel( signals, object ) {
-
-	const container = new UIDiv();
-
-	const parameters = object.geometry.parameters;
-
-	// size
-
-	const sizeRow = new UIRow();
-	const size = new UINumber( parameters.size ).onChange( update );
-
-	sizeRow.add( new UIText( 'Size' ).setWidth( '90px' ) );
-	sizeRow.add( size );
-
-	container.add( sizeRow );
-
-	// segments
-
-	const segmentsRow = new UIRow();
-	const segments = new UIInteger( parameters.segments ).setRange( 1, Infinity ).onChange( update );
-
-	segmentsRow.add( new UIText( 'Segments' ).setWidth( '90px' ) );
-	segmentsRow.add( segments );
-
-	container.add( segmentsRow );
-
-	// bottom
-
-	const bottomRow = new UIRow();
-	const bottom = new UICheckbox( parameters.bottom ).onChange( update );
-
-	bottomRow.add( new UIText( 'Bottom' ).setWidth( '90px' ) );
-	bottomRow.add( bottom );
-
-	container.add( bottomRow );
-
-	// lid
-
-	const lidRow = new UIRow();
-	const lid = new UICheckbox( parameters.lid ).onChange( update );
-
-	lidRow.add( new UIText( 'Lid' ).setWidth( '90px' ) );
-	lidRow.add( lid );
-
-	container.add( lidRow );
-
-	// body
-
-	const bodyRow = new UIRow();
-	const body = new UICheckbox( parameters.body ).onChange( update );
-
-	bodyRow.add( new UIText( 'Body' ).setWidth( '90px' ) );
-	bodyRow.add( body );
-
-	container.add( bodyRow );
-
-	// fitted lid
-
-	const fitLidRow = new UIRow();
-	const fitLid = new UICheckbox( parameters.fitLid ).onChange( update );
-
-	fitLidRow.add( new UIText( 'Fitted Lid' ).setWidth( '90px' ) );
-	fitLidRow.add( fitLid );
-
-	container.add( fitLidRow );
-
-	// blinn-sized
-
-	const blinnRow = new UIRow();
-	const blinn = new UICheckbox( parameters.blinn ).onChange( update );
-
-	blinnRow.add( new UIText( 'Blinn-scaled' ).setWidth( '90px' ) );
-	blinnRow.add( blinn );
-
-	container.add( blinnRow );
-
-	function update() {
-
-		object.geometry.dispose();
-
-		object.geometry = new TeapotGeometry(
-			size.getValue(),
-			segments.getValue(),
-			bottom.getValue(),
-			lid.getValue(),
-			body.getValue(),
-			fitLid.getValue(),
-			blinn.getValue()
-		);
-
-		object.geometry.computeBoundingSphere();
-
-		signals.geometryChanged.dispatch( object );
-
-	}
-
-	return container;
-
-}
-
-export { GeometryParametersPanel };

+ 0 - 3
editor/sw.js

@@ -77,8 +77,6 @@ const assets = [
 
 	'../examples/jsm/helpers/VertexNormalsHelper.js',
 
-	'../examples/jsm/geometries/TeapotGeometry.js',
-
 	'../examples/jsm/webxr/VRButton.js',
 	'../examples/jsm/webxr/XRControllerModelFactory.js',
 
@@ -179,7 +177,6 @@ const assets = [
 	'./js/Sidebar.Geometry.TorusGeometry.js',
 	'./js/Sidebar.Geometry.TorusKnotGeometry.js',
 	'./js/Sidebar.Geometry.TubeGeometry.js',
-	'./js/Sidebar.Geometry.TeapotGeometry.js',
 	'./js/Sidebar.Material.js',
 	'./js/Sidebar.Material.BooleanProperty.js',
 	'./js/Sidebar.Material.ColorProperty.js',