提交 33fa020e 编写于 作者: M Mr.doob

Some tweaks to the new additions to the docs.

上级 b697b0c6
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
color: #555; color: #555;
font-family: 'inconsolata'; font-family: 'inconsolata';
font-size: 15px; font-size: 15px;
line-height: 18px;
overflow: hidden; overflow: hidden;
} }
...@@ -47,7 +48,7 @@ ...@@ -47,7 +48,7 @@
font-size: 25px; font-size: 25px;
font-weight: normal; font-weight: normal;
margin-top: 25px; margin-top: 20px;
margin-left: 20px; margin-left: 20px;
} }
...@@ -134,20 +135,18 @@ ...@@ -134,20 +135,18 @@
function goTo( section, category, name ) { function goTo( section, category, name ) {
var path = pages[ section ][ category ][ name ]; window.document.title = 'three.js - documentation - ' + section + ' - ' + name;
window.document.title = 'three.js - documentation - ' + section + ': ' + name; window.location.hash = section + '/' + category + '/' + name.replace(/\ /g, '-');
window.location.hash = section + '/' + category + '/' + name; viewer.src = pages[ section ][ category ][ name ] + '.html';
section = section.toLowerCase();
viewer.src = section + '/' + path + '.html';
} }
function goToHash() { function goToHash() {
var hash = window.location.hash.substring( 1 ).split('/'); var hash = window.location.hash.substring( 1 ).split('/');
goTo( hash[0], hash[1], hash[2] ); goTo( hash[0], hash[1], hash[2].replace(/\-/g, ' ') );
} }
......
...@@ -2,204 +2,204 @@ var list = { ...@@ -2,204 +2,204 @@ var list = {
"Manual": { "Manual": {
"Introduction": [ "Introduction": [
[ "Creating a scene", "introduction/creating-a-scene" ] [ "Creating a scene", "manual/introduction/Creating-a-scene" ]
] ]
}, },
"API": { "Reference": {
"Cameras": [ "Cameras": [
[ "Camera", "cameras/Camera" ], [ "Camera", "api/cameras/Camera" ],
[ "OrthographicCamera", "cameras/OrthographicCamera" ], [ "OrthographicCamera", "api/cameras/OrthographicCamera" ],
[ "PerspectiveCamera", "cameras/PerspectiveCamera" ] [ "PerspectiveCamera", "api/cameras/PerspectiveCamera" ]
], ],
"Core": [ "Core": [
[ "Clock", "core/Clock" ], [ "Clock", "api/core/Clock" ],
[ "Color", "core/Color" ], [ "Color", "api/core/Color" ],
[ "Face3", "core/Face3" ], [ "Face3", "api/core/Face3" ],
[ "Face4", "core/Face4" ], [ "Face4", "api/core/Face4" ],
[ "Frustum", "core/Frustum" ], [ "Frustum", "api/core/Frustum" ],
[ "Geometry", "core/Geometry" ], [ "Geometry", "api/core/Geometry" ],
[ "Math", "core/Math" ], [ "Math", "api/core/Math" ],
[ "Matrix3", "core/Matrix3" ], [ "Matrix3", "api/core/Matrix3" ],
[ "Matrix4", "core/Matrix4" ], [ "Matrix4", "api/core/Matrix4" ],
[ "Object3D", "core/Object3D" ], [ "Object3D", "api/core/Object3D" ],
[ "Projector", "core/Projector" ], [ "Projector", "api/core/Projector" ],
[ "Quaternion", "core/Quaternion" ], [ "Quaternion", "api/core/Quaternion" ],
[ "Ray", "core/Ray" ], [ "Ray", "api/core/Ray" ],
[ "Rectangle", "core/Rectangle" ], [ "Rectangle", "api/core/Rectangle" ],
[ "Spline", "core/Spline" ], [ "Spline", "api/core/Spline" ],
[ "UV", "core/UV" ], [ "UV", "api/core/UV" ],
[ "Vector2", "core/Vector2" ], [ "Vector2", "api/core/Vector2" ],
[ "Vector3", "core/Vector3" ], [ "Vector3", "api/core/Vector3" ],
[ "Vector4", "core/Vector4" ] [ "Vector4", "api/core/Vector4" ]
], ],
"Lights": [ "Lights": [
[ "Light", "lights/Light" ], [ "Light", "api/lights/Light" ],
[ "AmbientLight", "lights/AmbientLight" ], [ "AmbientLight", "api/lights/AmbientLight" ],
[ "DirectionalLight", "lights/DirectionalLight" ], [ "DirectionalLight", "api/lights/DirectionalLight" ],
[ "PointLight", "lights/PointLight" ], [ "PointLight", "api/lights/PointLight" ],
[ "SpotLight", "lights/SpotLight" ] [ "SpotLight", "api/lights/SpotLight" ]
], ],
"Loaders": [ "Loaders": [
[ "Loader", "loaders/Loader" ], [ "Loader", "api/loaders/Loader" ],
[ "BinaryLoader", "loaders/BinaryLoader" ], [ "BinaryLoader", "api/loaders/BinaryLoader" ],
[ "GeometryLoader", "loaders/GeometryLoader" ], [ "GeometryLoader", "api/loaders/GeometryLoader" ],
[ "ImageLoader", "loaders/ImageLoader" ], [ "ImageLoader", "api/loaders/ImageLoader" ],
[ "JSONLoader", "loaders/JSONLoader" ], [ "JSONLoader", "api/loaders/JSONLoader" ],
[ "LoadingMonitor", "loaders/LoadingMonitor" ], [ "LoadingMonitor", "api/loaders/LoadingMonitor" ],
[ "SceneLoader", "loaders/SceneLoader" ], [ "SceneLoader", "api/loaders/SceneLoader" ],
[ "TextureLoader", "loaders/TextureLoader" ], [ "TextureLoader", "api/loaders/TextureLoader" ],
], ],
"Materials": [ "Materials": [
[ "Material", "materials/Material" ], [ "Material", "api/materials/Material" ],
[ "LineBasicMaterial", "materials/LineBasicMaterial" ], [ "LineBasicMaterial", "api/materials/LineBasicMaterial" ],
[ "MeshBasicMaterial", "materials/MeshBasicMaterial" ], [ "MeshBasicMaterial", "api/materials/MeshBasicMaterial" ],
[ "MeshDepthMaterial", "materials/MeshDepthMaterial" ], [ "MeshDepthMaterial", "api/materials/MeshDepthMaterial" ],
[ "MeshFaceMaterial", "materials/MeshFaceMaterial" ], [ "MeshFaceMaterial", "api/materials/MeshFaceMaterial" ],
[ "MeshLambertMaterial", "materials/MeshLambertMaterial" ], [ "MeshLambertMaterial", "api/materials/MeshLambertMaterial" ],
[ "MeshNormalMaterial", "materials/MeshNormalMaterial" ], [ "MeshNormalMaterial", "api/materials/MeshNormalMaterial" ],
[ "MeshPhongMaterial", "materials/MeshPhongMaterial" ], [ "MeshPhongMaterial", "api/materials/MeshPhongMaterial" ],
[ "ParticleBasicMaterial", "materials/ParticleBasicMaterial" ], [ "ParticleBasicMaterial", "api/materials/ParticleBasicMaterial" ],
[ "ParticleCanvasMaterial", "materials/ParticleCanvasMaterial" ], [ "ParticleCanvasMaterial", "api/materials/ParticleCanvasMaterial" ],
[ "ParticleDOMMaterial", "materials/ParticleDOMMaterial" ], [ "ParticleDOMMaterial", "api/materials/ParticleDOMMaterial" ],
[ "ShaderMaterial", "materials/ShaderMaterial" ] [ "ShaderMaterial", "api/materials/ShaderMaterial" ]
], ],
"Objects": [ "Objects": [
[ "Bone", "objects/Bone" ], [ "Bone", "api/objects/Bone" ],
[ "Line", "objects/Line" ], [ "Line", "api/objects/Line" ],
[ "LOD", "objects/LOD" ], [ "LOD", "api/objects/LOD" ],
[ "Mesh", "objects/Mesh" ], [ "Mesh", "api/objects/Mesh" ],
[ "MorphAnimMesh", "objects/MorphAnimMesh" ], [ "MorphAnimMesh", "api/objects/MorphAnimMesh" ],
[ "Particle", "objects/Particle" ], [ "Particle", "api/objects/Particle" ],
[ "ParticleSystem", "objects/ParticleSystem" ], [ "ParticleSystem", "api/objects/ParticleSystem" ],
[ "Ribbon", "objects/Ribbon" ], [ "Ribbon", "api/objects/Ribbon" ],
[ "SkinnedMesh", "objects/SkinnedMesh" ], [ "SkinnedMesh", "api/objects/SkinnedMesh" ],
[ "Sprite", "objects/Sprite" ] [ "Sprite", "api/objects/Sprite" ]
], ],
"Renderers": [ "Renderers": [
[ "CanvasRenderer", "renderers/CanvasRenderer" ], [ "CanvasRenderer", "api/renderers/CanvasRenderer" ],
[ "DOMRenderer", "renderers/DOMRenderer" ], [ "DOMRenderer", "api/renderers/DOMRenderer" ],
[ "SVGRenderer", "renderers/SVGRenderer" ], [ "SVGRenderer", "api/renderers/SVGRenderer" ],
[ "WebGLRenderer", "renderers/WebGLRenderer" ], [ "WebGLRenderer", "api/renderers/WebGLRenderer" ],
[ "WebGLRenderTarget", "renderers/WebGLRenderTarget" ], [ "WebGLRenderTarget", "api/renderers/WebGLRenderTarget" ],
[ "WebGLRenderTargetCube", "renderers/WebGLRenderTargetCube" ], [ "WebGLRenderTargetCube", "api/renderers/WebGLRenderTargetCube" ],
[ "WebGLShaders", "renderers/WebGLShaders" ] [ "WebGLShaders", "api/renderers/WebGLShaders" ]
], ],
"Renderers / Renderables": [ "Renderers / Renderables": [
[ "RenderableFace3", "renderers/renderables/RenderableFace3" ], [ "RenderableFace3", "api/renderers/renderables/RenderableFace3" ],
[ "RenderableFace4", "renderers/renderables/RenderableFace4" ], [ "RenderableFace4", "api/renderers/renderables/RenderableFace4" ],
[ "RenderableLine", "renderers/renderables/RenderableLine" ], [ "RenderableLine", "api/renderers/renderables/RenderableLine" ],
[ "RenderableObject", "renderers/renderables/RenderableObject" ], [ "RenderableObject", "api/renderers/renderables/RenderableObject" ],
[ "RenderableParticle", "renderers/renderables/RenderableParticle" ], [ "RenderableParticle", "api/renderers/renderables/RenderableParticle" ],
[ "RenderableVertex", "renderers/renderables/RenderableVertex" ] [ "RenderableVertex", "api/renderers/renderables/RenderableVertex" ]
], ],
"Scenes": [ "Scenes": [
[ "Fog", "scenes/Fog" ], [ "Fog", "api/scenes/Fog" ],
[ "FogExp2", "scenes/FogExp2" ], [ "FogExp2", "api/scenes/FogExp2" ],
[ "Scene", "scenes/Scene" ] [ "Scene", "api/scenes/Scene" ]
], ],
"Textures": [ "Textures": [
[ "DataTexture", "textures/DataTexture" ], [ "DataTexture", "api/textures/DataTexture" ],
[ "Texture", "textures/Texture" ] [ "Texture", "api/textures/Texture" ]
], ],
"Extras": [ "Extras": [
[ "ColorUtils", "extras/ColorUtils" ], [ "ColorUtils", "api/extras/ColorUtils" ],
[ "GeometryUtils", "extras/GeometryUtils" ], [ "GeometryUtils", "api/extras/GeometryUtils" ],
[ "ImageUtils", "extras/ImageUtils" ], [ "ImageUtils", "api/extras/ImageUtils" ],
[ "SceneUtils", "extras/SceneUtils" ], [ "SceneUtils", "api/extras/SceneUtils" ],
[ "ShaderUtils", "extras/ShaderUtils" ] [ "ShaderUtils", "api/extras/ShaderUtils" ]
], ],
"Extras / Animation": [ "Extras / Animation": [
[ "Animation", "extras/animation/Animation" ], [ "Animation", "api/extras/animation/Animation" ],
[ "AnimationHandler", "extras/animation/AnimationHandler" ], [ "AnimationHandler", "api/extras/animation/AnimationHandler" ],
[ "AnimationMorphTarget", "extras/animation/AnimationMorphTarget" ], [ "AnimationMorphTarget", "api/extras/animation/AnimationMorphTarget" ],
[ "KeyFrameAnimation", "extras/animation/KeyFrameAnimation" ] [ "KeyFrameAnimation", "api/extras/animation/KeyFrameAnimation" ]
], ],
"Extras / Cameras": [ "Extras / Cameras": [
[ "CombinedCamera", "extras/cameras/CombinedCamera" ], [ "CombinedCamera", "api/extras/cameras/CombinedCamera" ],
[ "CubeCamera", "extras/cameras/CubeCamera" ] [ "CubeCamera", "api/extras/cameras/CubeCamera" ]
], ],
"Extras / Controls": [ "Extras / Controls": [
[ "FirstPersonControls", "extras/controls/FirstPersonControls" ], [ "FirstPersonControls", "api/extras/controls/FirstPersonControls" ],
[ "FlyControls", "extras/controls/FlyControls" ], [ "FlyControls", "api/extras/controls/FlyControls" ],
[ "PathControls", "extras/controls/PathControls" ], [ "PathControls", "api/extras/controls/PathControls" ],
[ "RollControls", "extras/controls/RollControls" ], [ "RollControls", "api/extras/controls/RollControls" ],
[ "TrackballControls", "extras/controls/TrackballControls" ] [ "TrackballControls", "api/extras/controls/TrackballControls" ]
], ],
"Extras / Core": [ "Extras / Core": [
[ "BufferGeometry", "extras/core/BufferGeometry" ], [ "BufferGeometry", "api/extras/core/BufferGeometry" ],
[ "Curve", "extras/core/Curve" ], [ "Curve", "api/extras/core/Curve" ],
[ "CurvePath", "extras/core/CurvePath" ], [ "CurvePath", "api/extras/core/CurvePath" ],
[ "EventTarget", "extras/core/EventTarget" ], [ "EventTarget", "api/extras/core/EventTarget" ],
[ "Gyroscope", "extras/core/Gyroscope" ], [ "Gyroscope", "api/extras/core/Gyroscope" ],
[ "Path", "extras/core/Path" ], [ "Path", "api/extras/core/Path" ],
[ "Shape", "extras/core/Shape" ], [ "Shape", "api/extras/core/Shape" ],
[ "TextPath", "extras/core/TextPath" ] [ "TextPath", "api/extras/core/TextPath" ]
], ],
"Extras / Geometries": [ "Extras / Geometries": [
[ "CubeGeometry", "extras/geometries/CubeGeometry" ], [ "CubeGeometry", "api/extras/geometries/CubeGeometry" ],
[ "CylinderGeometry", "extras/geometries/CylinderGeometry" ], [ "CylinderGeometry", "api/extras/geometries/CylinderGeometry" ],
[ "ExtrudeGeometry", "extras/geometries/ExtrudeGeometry" ], [ "ExtrudeGeometry", "api/extras/geometries/ExtrudeGeometry" ],
[ "IcosahedronGeometry", "extras/geometries/IcosahedronGeometry" ], [ "IcosahedronGeometry", "api/extras/geometries/IcosahedronGeometry" ],
[ "LatheGeometry", "extras/geometries/LatheGeometry" ], [ "LatheGeometry", "api/extras/geometries/LatheGeometry" ],
[ "OctahedronGeometry", "extras/geometries/OctahedronGeometry" ], [ "OctahedronGeometry", "api/extras/geometries/OctahedronGeometry" ],
[ "PlaneGeometry", "extras/geometries/PlaneGeometry" ], [ "PlaneGeometry", "api/extras/geometries/PlaneGeometry" ],
[ "PolyhedronGeometry", "extras/geometries/PolyhedronGeometry" ], [ "PolyhedronGeometry", "api/extras/geometries/PolyhedronGeometry" ],
[ "SphereGeometry", "extras/geometries/SphereGeometry" ], [ "SphereGeometry", "api/extras/geometries/SphereGeometry" ],
[ "TetrahedronGeometry", "extras/geometries/TetrahedronGeometry" ], [ "TetrahedronGeometry", "api/extras/geometries/TetrahedronGeometry" ],
[ "TextGeometry", "extras/geometries/TextGeometry" ], [ "TextGeometry", "api/extras/geometries/TextGeometry" ],
[ "TorusGeometry", "extras/geometries/TorusGeometry" ], [ "TorusGeometry", "api/extras/geometries/TorusGeometry" ],
[ "TorusKnotGeometry", "extras/geometries/TorusKnotGeometry" ] [ "TorusKnotGeometry", "api/extras/geometries/TorusKnotGeometry" ]
], ],
"Extras / Helpers": [ "Extras / Helpers": [
[ "AxisHelper", "extras/helpers/AxisHelper" ], [ "AxisHelper", "api/extras/helpers/AxisHelper" ],
[ "CameraHelper", "extras/helpers/CameraHelper" ] [ "CameraHelper", "api/extras/helpers/CameraHelper" ]
], ],
"Extras / Modifiers": [ "Extras / Modifiers": [
[ "SubdivisionModifier", "extras/modifiers/SubdivisionModifier" ] [ "SubdivisionModifier", "api/extras/modifiers/SubdivisionModifier" ]
], ],
"Extras / Objects": [ "Extras / Objects": [
[ "LensFlare", "extras/objects/LensFlare" ], [ "LensFlare", "api/extras/objects/LensFlare" ],
[ "MarchingCubes", "extras/objects/MarchingCubes" ] [ "MarchingCubes", "api/extras/objects/MarchingCubes" ]
], ],
"Extras / Renderers / Effects": [ "Extras / Renderers / Effects": [
[ "AnaglyphEffect", "extras/renderers/effects/AnaglyphEffect" ], [ "AnaglyphEffect", "api/extras/renderers/effects/AnaglyphEffect" ],
[ "CrosseyedEffect", "extras/renderers/effects/CrosseyedEffect" ], [ "CrosseyedEffect", "api/extras/renderers/effects/CrosseyedEffect" ],
[ "ParallaxBarrierEffect", "extras/renderers/effects/ParallaxBarrierEffect" ], [ "ParallaxBarrierEffect", "api/extras/renderers/effects/ParallaxBarrierEffect" ],
[ "StereoEffect", "extras/renderers/effects/StereoEffect" ] [ "StereoEffect", "api/extras/renderers/effects/StereoEffect" ]
], ],
"Extras / Renderers / Plugins": [ "Extras / Renderers / Plugins": [
[ "LensFlarePlugin", "extras/renderers/plugins/LensFlarePlugin" ], [ "LensFlarePlugin", "api/extras/renderers/plugins/LensFlarePlugin" ],
[ "ShadowMapPlugin", "extras/renderers/plugins/ShadowMapPlugin" ], [ "ShadowMapPlugin", "api/extras/renderers/plugins/ShadowMapPlugin" ],
[ "SpritePlugin", "extras/renderers/plugins/SpritePlugin" ] [ "SpritePlugin", "api/extras/renderers/plugins/SpritePlugin" ]
], ],
"Extras / Shaders": [ "Extras / Shaders": [
[ "ShaderFlares", "extras/shaders/ShaderFlares" ], [ "ShaderFlares", "api/extras/shaders/ShaderFlares" ],
[ "ShaderSprite", "extras/shaders/ShaderSprite" ] [ "ShaderSprite", "api/extras/shaders/ShaderSprite" ]
] ]
} }
......
...@@ -10,6 +10,7 @@ body { ...@@ -10,6 +10,7 @@ body {
color: #555; color: #555;
font-family: 'inconsolata'; font-family: 'inconsolata';
font-size: 15px; font-size: 15px;
line-height: 18px;
overflow: auto; overflow: auto;
} }
...@@ -21,7 +22,6 @@ h1 { ...@@ -21,7 +22,6 @@ h1 {
color: #333; color: #333;
font-size: 25px; font-size: 25px;
font-weight: normal; font-weight: normal;
text-transform: capitalize;
margin-top: 10px; margin-top: 10px;
} }
...@@ -43,7 +43,7 @@ h3 { ...@@ -43,7 +43,7 @@ h3 {
} }
div { div {
padding-left: 30px; /* padding-left: 30px; */
margin-bottom: 20px; margin-bottom: 20px;
} }
......
var onDocumentLoad = function ( event ) { var onDocumentLoad = function ( event ) {
var path;
var section = /\/(manual|api)\//.exec( window.location.pathname )[ 1 ].toString().split( '.html' )[ 0 ]; var section = /\/(manual|api)\//.exec( window.location.pathname )[ 1 ].toString().split( '.html' )[ 0 ];
var name = /[-A-z0-9]+\.html/.exec( window.location.pathname ).toString().split( '.html' )[ 0 ]; var name = /[\-A-z0-9]+\.html/.exec( window.location.pathname ).toString().split( '.html' )[ 0 ];
var path;
if ( section == 'manual' ) { if ( section == 'manual' ) {
name = name.replace(/\-/g, ' '); name = name.replace(/\-/g, ' ');
path = window.location.pathname.replace( /\ /g, '-' ); path = window.location.pathname.replace( /\ /g, '-' );
path = /\/manual\/[-a-z0-9\/]+/.exec( path ).toString().substr( 8 ); path = /\/manual\/[-a-z0-9\/]+/.exec( path ).toString().substr( 8 );
} else { } else {
path = /\/api\/[A-z0-9\/]+/.exec( window.location.pathname ).toString().substr( 5 ); path = /\/api\/[A-z0-9\/]+/.exec( window.location.pathname ).toString().substr( 5 );
} }
var text = document.body.innerHTML; var text = document.body.innerHTML;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册