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

Some tweaks to the new additions to the docs.

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