lesson.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. <!-- Licensed under a BSD license. See license.html for license -->
  2. 'use strict';
  3. (function($){
  4. function getQueryParams() {
  5. const params = {};
  6. if (window.location.search) {
  7. window.location.search.substring(1).split('&').forEach(function(pair) {
  8. const keyValue = pair.split('=').map(function(kv) {
  9. return decodeURIComponent(kv);
  10. });
  11. params[keyValue[0]] = keyValue[1];
  12. });
  13. }
  14. return params;
  15. }
  16. $(document).ready(function($){
  17. const codeKeywordLinks = {
  18. AnimationAction: 'https://threejs.org/docs/api/animation/AnimationAction.html',
  19. AnimationClip: 'https://threejs.org/docs/api/animation/AnimationClip.html',
  20. AnimationMixer: 'https://threejs.org/docs/api/animation/AnimationMixer.html',
  21. AnimationObjectGroup: 'https://threejs.org/docs/api/animation/AnimationObjectGroup.html',
  22. AnimationUtils: 'https://threejs.org/docs/api/animation/AnimationUtils.html',
  23. KeyframeTrack: 'https://threejs.org/docs/api/animation/KeyframeTrack.html',
  24. PropertyBinding: 'https://threejs.org/docs/api/animation/PropertyBinding.html',
  25. PropertyMixer: 'https://threejs.org/docs/api/animation/PropertyMixer.html',
  26. BooleanKeyframeTrack: 'https://threejs.org/docs/api/animation/tracks/BooleanKeyframeTrack.html',
  27. ColorKeyframeTrack: 'https://threejs.org/docs/api/animation/tracks/ColorKeyframeTrack.html',
  28. NumberKeyframeTrack: 'https://threejs.org/docs/api/animation/tracks/NumberKeyframeTrack.html',
  29. QuaternionKeyframeTrack: 'https://threejs.org/docs/api/animation/tracks/QuaternionKeyframeTrack.html',
  30. StringKeyframeTrack: 'https://threejs.org/docs/api/animation/tracks/StringKeyframeTrack.html',
  31. VectorKeyframeTrack: 'https://threejs.org/docs/api/animation/tracks/VectorKeyframeTrack.html',
  32. Audio: 'https://threejs.org/docs/api/audio/Audio.html',
  33. AudioAnalyser: 'https://threejs.org/docs/api/audio/AudioAnalyser.html',
  34. AudioContext: 'https://threejs.org/docs/api/audio/AudioContext.html',
  35. AudioListener: 'https://threejs.org/docs/api/audio/AudioListener.html',
  36. PositionalAudio: 'https://threejs.org/docs/api/audio/PositionalAudio.html',
  37. ArrayCamera: 'https://threejs.org/docs/api/cameras/ArrayCamera.html',
  38. Camera: 'https://threejs.org/docs/api/cameras/Camera.html',
  39. CubeCamera: 'https://threejs.org/docs/api/cameras/CubeCamera.html',
  40. OrthographicCamera: 'https://threejs.org/docs/api/cameras/OrthographicCamera.html',
  41. PerspectiveCamera: 'https://threejs.org/docs/api/cameras/PerspectiveCamera.html',
  42. StereoCamera: 'https://threejs.org/docs/api/cameras/StereoCamera.html',
  43. Animation: 'https://threejs.org/docs/api/constants/Animation.html',
  44. Core: 'https://threejs.org/docs/api/constants/Core.html',
  45. CustomBlendingEquation: 'https://threejs.org/docs/api/constants/CustomBlendingEquations.html',
  46. DrawModes: 'https://threejs.org/docs/api/constants/DrawModes.html',
  47. Materials: 'https://threejs.org/docs/api/constants/Materials.html',
  48. Renderer: 'https://threejs.org/docs/api/constants/Renderer.html',
  49. Textures: 'https://threejs.org/docs/api/constants/Textures.html',
  50. BufferAttribute: 'https://threejs.org/docs/api/core/BufferAttribute.html',
  51. BufferGeometry: 'https://threejs.org/docs/api/core/BufferGeometry.html',
  52. Clock: 'https://threejs.org/docs/api/core/Clock.html',
  53. DirectGeometry: 'https://threejs.org/docs/api/core/DirectGeometry.html',
  54. EventDispatcher: 'https://threejs.org/docs/api/core/EventDispatcher.html',
  55. Face3: 'https://threejs.org/docs/api/core/Face3.html',
  56. Geometry: 'https://threejs.org/docs/api/core/Geometry.html',
  57. InstancedBufferAttribute: 'https://threejs.org/docs/api/core/InstancedBufferAttribute.html',
  58. InstancedBufferGeometry: 'https://threejs.org/docs/api/core/InstancedBufferGeometry.html',
  59. InstancedInterleavedBuffer: 'https://threejs.org/docs/api/core/InstancedInterleavedBuffer.html',
  60. InterleavedBuffer: 'https://threejs.org/docs/api/core/InterleavedBuffer.html',
  61. InterleavedBufferAttribute: 'https://threejs.org/docs/api/core/InterleavedBufferAttribute.html',
  62. Layers: 'https://threejs.org/docs/api/core/Layers.html',
  63. Object3D: 'https://threejs.org/docs/api/core/Object3D.html',
  64. Raycaster: 'https://threejs.org/docs/api/core/Raycaster.html',
  65. Uniform: 'https://threejs.org/docs/api/core/Uniform.html',
  66. BufferAttributeTypes: 'https://threejs.org/docs/api/core/bufferAttributeTypes/BufferAttributeTypes.html',
  67. Earcut: 'https://threejs.org/docs/api/extras/Earcut.html',
  68. ShapeUtils: 'https://threejs.org/docs/api/extras/ShapeUtils.html',
  69. Curve: 'https://threejs.org/docs/api/extras/core/Curve.html',
  70. CurvePath: 'https://threejs.org/docs/api/extras/core/CurvePath.html',
  71. Font: 'https://threejs.org/docs/api/extras/core/Font.html',
  72. Interpolations: 'https://threejs.org/docs/api/extras/core/Interpolations.html',
  73. Path: 'https://threejs.org/docs/api/extras/core/Path.html',
  74. Shape: 'https://threejs.org/docs/api/extras/core/Shape.html',
  75. ShapePath: 'https://threejs.org/docs/api/extras/core/ShapePath.html',
  76. ArcCurve: 'https://threejs.org/docs/api/extras/curves/ArcCurve.html',
  77. CatmullRomCurve3: 'https://threejs.org/docs/api/extras/curves/CatmullRomCurve3.html',
  78. CubicBezierCurve: 'https://threejs.org/docs/api/extras/curves/CubicBezierCurve.html',
  79. CubicBezierCurve3: 'https://threejs.org/docs/api/extras/curves/CubicBezierCurve3.html',
  80. EllipseCurve: 'https://threejs.org/docs/api/extras/curves/EllipseCurve.html',
  81. LineCurve: 'https://threejs.org/docs/api/extras/curves/LineCurve.html',
  82. LineCurve3: 'https://threejs.org/docs/api/extras/curves/LineCurve3.html',
  83. QuadraticBezierCurve: 'https://threejs.org/docs/api/extras/curves/QuadraticBezierCurve.html',
  84. QuadraticBezierCurve3: 'https://threejs.org/docs/api/extras/curves/QuadraticBezierCurve3.html',
  85. SplineCurve: 'https://threejs.org/docs/api/extras/curves/SplineCurve.html',
  86. ImmediateRenderObject: 'https://threejs.org/docs/api/extras/objects/ImmediateRenderObject.html',
  87. BoxBufferGeometry: 'https://threejs.org/docs/api/geometries/BoxBufferGeometry.html',
  88. BoxGeometry: 'https://threejs.org/docs/api/geometries/BoxGeometry.html',
  89. CircleBufferGeometry: 'https://threejs.org/docs/api/geometries/CircleBufferGeometry.html',
  90. CircleGeometry: 'https://threejs.org/docs/api/geometries/CircleGeometry.html',
  91. ConeBufferGeometry: 'https://threejs.org/docs/api/geometries/ConeBufferGeometry.html',
  92. ConeGeometry: 'https://threejs.org/docs/api/geometries/ConeGeometry.html',
  93. CylinderBufferGeometry: 'https://threejs.org/docs/api/geometries/CylinderBufferGeometry.html',
  94. CylinderGeometry: 'https://threejs.org/docs/api/geometries/CylinderGeometry.html',
  95. DodecahedronBufferGeometry: 'https://threejs.org/docs/api/geometries/DodecahedronBufferGeometry.html',
  96. DodecahedronGeometry: 'https://threejs.org/docs/api/geometries/DodecahedronGeometry.html',
  97. EdgesGeometry: 'https://threejs.org/docs/api/geometries/EdgesGeometry.html',
  98. ExtrudeBufferGeometry: 'https://threejs.org/docs/api/geometries/ExtrudeBufferGeometry.html',
  99. ExtrudeGeometry: 'https://threejs.org/docs/api/geometries/ExtrudeGeometry.html',
  100. IcosahedronBufferGeometry: 'https://threejs.org/docs/api/geometries/IcosahedronBufferGeometry.html',
  101. IcosahedronGeometry: 'https://threejs.org/docs/api/geometries/IcosahedronGeometry.html',
  102. LatheBufferGeometry: 'https://threejs.org/docs/api/geometries/LatheBufferGeometry.html',
  103. LatheGeometry: 'https://threejs.org/docs/api/geometries/LatheGeometry.html',
  104. OctahedronBufferGeometry: 'https://threejs.org/docs/api/geometries/OctahedronBufferGeometry.html',
  105. OctahedronGeometry: 'https://threejs.org/docs/api/geometries/OctahedronGeometry.html',
  106. ParametricBufferGeometry: 'https://threejs.org/docs/api/geometries/ParametricBufferGeometry.html',
  107. ParametricGeometry: 'https://threejs.org/docs/api/geometries/ParametricGeometry.html',
  108. PlaneBufferGeometry: 'https://threejs.org/docs/api/geometries/PlaneBufferGeometry.html',
  109. PlaneGeometry: 'https://threejs.org/docs/api/geometries/PlaneGeometry.html',
  110. PolyhedronBufferGeometry: 'https://threejs.org/docs/api/geometries/PolyhedronBufferGeometry.html',
  111. PolyhedronGeometry: 'https://threejs.org/docs/api/geometries/PolyhedronGeometry.html',
  112. RingBufferGeometry: 'https://threejs.org/docs/api/geometries/RingBufferGeometry.html',
  113. RingGeometry: 'https://threejs.org/docs/api/geometries/RingGeometry.html',
  114. ShapeBufferGeometry: 'https://threejs.org/docs/api/geometries/ShapeBufferGeometry.html',
  115. ShapeGeometry: 'https://threejs.org/docs/api/geometries/ShapeGeometry.html',
  116. SphereBufferGeometry: 'https://threejs.org/docs/api/geometries/SphereBufferGeometry.html',
  117. SphereGeometry: 'https://threejs.org/docs/api/geometries/SphereGeometry.html',
  118. TetrahedronBufferGeometry: 'https://threejs.org/docs/api/geometries/TetrahedronBufferGeometry.html',
  119. TetrahedronGeometry: 'https://threejs.org/docs/api/geometries/TetrahedronGeometry.html',
  120. TextBufferGeometry: 'https://threejs.org/docs/api/geometries/TextBufferGeometry.html',
  121. TextGeometry: 'https://threejs.org/docs/api/geometries/TextGeometry.html',
  122. TorusBufferGeometry: 'https://threejs.org/docs/api/geometries/TorusBufferGeometry.html',
  123. TorusGeometry: 'https://threejs.org/docs/api/geometries/TorusGeometry.html',
  124. TorusKnotBufferGeometry: 'https://threejs.org/docs/api/geometries/TorusKnotBufferGeometry.html',
  125. TorusKnotGeometry: 'https://threejs.org/docs/api/geometries/TorusKnotGeometry.html',
  126. TubeBufferGeometry: 'https://threejs.org/docs/api/geometries/TubeBufferGeometry.html',
  127. TubeGeometry: 'https://threejs.org/docs/api/geometries/TubeGeometry.html',
  128. WireframeGeometry: 'https://threejs.org/docs/api/geometries/WireframeGeometry.html',
  129. ArrowHelper: 'https://threejs.org/docs/api/helpers/ArrowHelper.html',
  130. AxesHelper: 'https://threejs.org/docs/api/helpers/AxesHelper.html',
  131. BoxHelper: 'https://threejs.org/docs/api/helpers/BoxHelper.html',
  132. Box3Helper: 'https://threejs.org/docs/api/helpers/Box3Helper.html',
  133. CameraHelper: 'https://threejs.org/docs/api/helpers/CameraHelper.html',
  134. DirectionalLightHelper: 'https://threejs.org/docs/api/helpers/DirectionalLightHelper.html',
  135. FaceNormalsHelper: 'https://threejs.org/docs/api/helpers/FaceNormalsHelper.html',
  136. GridHelper: 'https://threejs.org/docs/api/helpers/GridHelper.html',
  137. PolarGridHelper: 'https://threejs.org/docs/api/helpers/PolarGridHelper.html',
  138. HemisphereLightHelper: 'https://threejs.org/docs/api/helpers/HemisphereLightHelper.html',
  139. PlaneHelper: 'https://threejs.org/docs/api/helpers/PlaneHelper.html',
  140. PointLightHelper: 'https://threejs.org/docs/api/helpers/PointLightHelper.html',
  141. RectAreaLightHelper: 'https://threejs.org/docs/api/helpers/RectAreaLightHelper.html',
  142. SkeletonHelper: 'https://threejs.org/docs/api/helpers/SkeletonHelper.html',
  143. SpotLightHelper: 'https://threejs.org/docs/api/helpers/SpotLightHelper.html',
  144. VertexNormalsHelper: 'https://threejs.org/docs/api/helpers/VertexNormalsHelper.html',
  145. AmbientLight: 'https://threejs.org/docs/api/lights/AmbientLight.html',
  146. DirectionalLight: 'https://threejs.org/docs/api/lights/DirectionalLight.html',
  147. HemisphereLight: 'https://threejs.org/docs/api/lights/HemisphereLight.html',
  148. Light: 'https://threejs.org/docs/api/lights/Light.html',
  149. PointLight: 'https://threejs.org/docs/api/lights/PointLight.html',
  150. RectAreaLight: 'https://threejs.org/docs/api/lights/RectAreaLight.html',
  151. SpotLight: 'https://threejs.org/docs/api/lights/SpotLight.html',
  152. DirectionalLightShadow: 'https://threejs.org/docs/api/lights/shadows/DirectionalLightShadow.html',
  153. LightShadow: 'https://threejs.org/docs/api/lights/shadows/LightShadow.html',
  154. SpotLightShadow: 'https://threejs.org/docs/api/lights/shadows/SpotLightShadow.html',
  155. AnimationLoader: 'https://threejs.org/docs/api/loaders/AnimationLoader.html',
  156. AudioLoader: 'https://threejs.org/docs/api/loaders/AudioLoader.html',
  157. BufferGeometryLoader: 'https://threejs.org/docs/api/loaders/BufferGeometryLoader.html',
  158. Cache: 'https://threejs.org/docs/api/loaders/Cache.html',
  159. CompressedTextureLoader: 'https://threejs.org/docs/api/loaders/CompressedTextureLoader.html',
  160. CubeTextureLoader: 'https://threejs.org/docs/api/loaders/CubeTextureLoader.html',
  161. DataTextureLoader: 'https://threejs.org/docs/api/loaders/DataTextureLoader.html',
  162. FileLoader: 'https://threejs.org/docs/api/loaders/FileLoader.html',
  163. FontLoader: 'https://threejs.org/docs/api/loaders/FontLoader.html',
  164. ImageBitmapLoader: 'https://threejs.org/docs/api/loaders/ImageBitmapLoader.html',
  165. ImageLoader: 'https://threejs.org/docs/api/loaders/ImageLoader.html',
  166. JSONLoader: 'https://threejs.org/docs/api/loaders/JSONLoader.html',
  167. Loader: 'https://threejs.org/docs/api/loaders/Loader.html',
  168. LoaderUtils: 'https://threejs.org/docs/api/loaders/LoaderUtils.html',
  169. MaterialLoader: 'https://threejs.org/docs/api/loaders/MaterialLoader.html',
  170. ObjectLoader: 'https://threejs.org/docs/api/loaders/ObjectLoader.html',
  171. TextureLoader: 'https://threejs.org/docs/api/loaders/TextureLoader.html',
  172. DefaultLoadingManager: 'https://threejs.org/docs/api/loaders/managers/DefaultLoadingManager.html',
  173. LoadingManager: 'https://threejs.org/docs/api/loaders/managers/LoadingManager.html',
  174. LineBasicMaterial: 'https://threejs.org/docs/api/materials/LineBasicMaterial.html',
  175. LineDashedMaterial: 'https://threejs.org/docs/api/materials/LineDashedMaterial.html',
  176. Material: 'https://threejs.org/docs/api/materials/Material.html',
  177. MeshBasicMaterial: 'https://threejs.org/docs/api/materials/MeshBasicMaterial.html',
  178. MeshDepthMaterial: 'https://threejs.org/docs/api/materials/MeshDepthMaterial.html',
  179. MeshLambertMaterial: 'https://threejs.org/docs/api/materials/MeshLambertMaterial.html',
  180. MeshNormalMaterial: 'https://threejs.org/docs/api/materials/MeshNormalMaterial.html',
  181. MeshPhongMaterial: 'https://threejs.org/docs/api/materials/MeshPhongMaterial.html',
  182. MeshPhysicalMaterial: 'https://threejs.org/docs/api/materials/MeshPhysicalMaterial.html',
  183. MeshStandardMaterial: 'https://threejs.org/docs/api/materials/MeshStandardMaterial.html',
  184. MeshToonMaterial: 'https://threejs.org/docs/api/materials/MeshToonMaterial.html',
  185. PointsMaterial: 'https://threejs.org/docs/api/materials/PointsMaterial.html',
  186. RawShaderMaterial: 'https://threejs.org/docs/api/materials/RawShaderMaterial.html',
  187. ShaderMaterial: 'https://threejs.org/docs/api/materials/ShaderMaterial.html',
  188. ShadowMaterial: 'https://threejs.org/docs/api/materials/ShadowMaterial.html',
  189. SpriteMaterial: 'https://threejs.org/docs/api/materials/SpriteMaterial.html',
  190. Box2: 'https://threejs.org/docs/api/math/Box2.html',
  191. Box3: 'https://threejs.org/docs/api/math/Box3.html',
  192. Color: 'https://threejs.org/docs/api/math/Color.html',
  193. Cylindrical: 'https://threejs.org/docs/api/math/Cylindrical.html',
  194. Euler: 'https://threejs.org/docs/api/math/Euler.html',
  195. Frustum: 'https://threejs.org/docs/api/math/Frustum.html',
  196. Interpolant: 'https://threejs.org/docs/api/math/Interpolant.html',
  197. Line3: 'https://threejs.org/docs/api/math/Line3.html',
  198. Math: 'https://threejs.org/docs/api/math/Math.html',
  199. Matrix3: 'https://threejs.org/docs/api/math/Matrix3.html',
  200. Matrix4: 'https://threejs.org/docs/api/math/Matrix4.html',
  201. Plane: 'https://threejs.org/docs/api/math/Plane.html',
  202. Quaternion: 'https://threejs.org/docs/api/math/Quaternion.html',
  203. Ray: 'https://threejs.org/docs/api/math/Ray.html',
  204. Sphere: 'https://threejs.org/docs/api/math/Sphere.html',
  205. Spherical: 'https://threejs.org/docs/api/math/Spherical.html',
  206. Triangle: 'https://threejs.org/docs/api/math/Triangle.html',
  207. Vector2: 'https://threejs.org/docs/api/math/Vector2.html',
  208. Vector3: 'https://threejs.org/docs/api/math/Vector3.html',
  209. Vector4: 'https://threejs.org/docs/api/math/Vector4.html',
  210. CubicInterpolant: 'https://threejs.org/docs/api/math/interpolants/CubicInterpolant.html',
  211. DiscreteInterpolant: 'https://threejs.org/docs/api/math/interpolants/DiscreteInterpolant.html',
  212. LinearInterpolant: 'https://threejs.org/docs/api/math/interpolants/LinearInterpolant.html',
  213. QuaternionLinearInterpolant: 'https://threejs.org/docs/api/math/interpolants/QuaternionLinearInterpolant.html',
  214. Bone: 'https://threejs.org/docs/api/objects/Bone.html',
  215. Group: 'https://threejs.org/docs/api/objects/Group.html',
  216. Line: 'https://threejs.org/docs/api/objects/Line.html',
  217. LineLoop: 'https://threejs.org/docs/api/objects/LineLoop.html',
  218. LineSegments: 'https://threejs.org/docs/api/objects/LineSegments.html',
  219. LOD: 'https://threejs.org/docs/api/objects/LOD.html',
  220. Mesh: 'https://threejs.org/docs/api/objects/Mesh.html',
  221. Points: 'https://threejs.org/docs/api/objects/Points.html',
  222. Skeleton: 'https://threejs.org/docs/api/objects/Skeleton.html',
  223. SkinnedMesh: 'https://threejs.org/docs/api/objects/SkinnedMesh.html',
  224. Sprite: 'https://threejs.org/docs/api/objects/Sprite.html',
  225. WebGLRenderer: 'https://threejs.org/docs/api/renderers/WebGLRenderer.html',
  226. WebGLRenderTarget: 'https://threejs.org/docs/api/renderers/WebGLRenderTarget.html',
  227. WebGLRenderTargetCube: 'https://threejs.org/docs/api/renderers/WebGLRenderTargetCube.html',
  228. ShaderChunk: 'https://threejs.org/docs/api/renderers/shaders/ShaderChunk.html',
  229. ShaderLib: 'https://threejs.org/docs/api/renderers/shaders/ShaderLib.html',
  230. UniformsLib: 'https://threejs.org/docs/api/renderers/shaders/UniformsLib.html',
  231. UniformsUtils: 'https://threejs.org/docs/api/renderers/shaders/UniformsUtils.html',
  232. Fog: 'https://threejs.org/docs/api/scenes/Fog.html',
  233. FogExp2: 'https://threejs.org/docs/api/scenes/FogExp2.html',
  234. Scene: 'https://threejs.org/docs/api/scenes/Scene.html',
  235. CanvasTexture: 'https://threejs.org/docs/api/textures/CanvasTexture.html',
  236. CompressedTexture: 'https://threejs.org/docs/api/textures/CompressedTexture.html',
  237. CubeTexture: 'https://threejs.org/docs/api/textures/CubeTexture.html',
  238. DataTexture: 'https://threejs.org/docs/api/textures/DataTexture.html',
  239. DepthTexture: 'https://threejs.org/docs/api/textures/DepthTexture.html',
  240. Texture: 'https://threejs.org/docs/api/textures/Texture.html',
  241. VideoTexture: 'https://threejs.org/docs/api/textures/VideoTexture.html',
  242. CCDIKSolver: 'https://threejs.org/docs/examples/animations/CCDIKSolver.html',
  243. MMDAnimationHelper: 'https://threejs.org/docs/examples/animations/MMDAnimationHelper.html',
  244. MMDPhysics: 'https://threejs.org/docs/examples/animations/MMDPhysics.html',
  245. OrbitControls: 'https://threejs.org/docs/examples/controls/OrbitControls.html',
  246. ConvexBufferGeometry: 'https://threejs.org/docs/examples/geometries/ConvexBufferGeometry.html',
  247. ConvexGeometry: 'https://threejs.org/docs/examples/geometries/ConvexGeometry.html',
  248. DecalGeometry: 'https://threejs.org/docs/examples/geometries/DecalGeometry.html',
  249. BabylonLoader: 'https://threejs.org/docs/examples/loaders/BabylonLoader.html',
  250. GLTFLoader: 'https://threejs.org/docs/examples/loaders/GLTFLoader.html',
  251. MMDLoader: 'https://threejs.org/docs/examples/loaders/MMDLoader.html',
  252. MTLLoader: 'https://threejs.org/docs/examples/loaders/MTLLoader.html',
  253. OBJLoader: 'https://threejs.org/docs/examples/loaders/OBJLoader.html',
  254. OBJLoader2: 'https://threejs.org/docs/examples/loaders/OBJLoader2.html',
  255. LoaderSupport: 'https://threejs.org/docs/examples/loaders/LoaderSupport.html',
  256. PCDLoader: 'https://threejs.org/docs/examples/loaders/PCDLoader.html',
  257. PDBLoader: 'https://threejs.org/docs/examples/loaders/PDBLoader.html',
  258. SVGLoader: 'https://threejs.org/docs/examples/loaders/SVGLoader.html',
  259. TGALoader: 'https://threejs.org/docs/examples/loaders/TGALoader.html',
  260. PRWMLoader: 'https://threejs.org/docs/examples/loaders/PRWMLoader.html',
  261. Lensflare: 'https://threejs.org/docs/examples/objects/Lensflare.html',
  262. GLTFExporter: 'https://threejs.org/docs/examples/exporters/GLTFExporter.html',
  263. };
  264. $('code').filter(function() {
  265. return codeKeywordLinks[this.textContent] &&
  266. this.parentElement.nodeName !== 'A';
  267. }).wrap(function() {
  268. const a = document.createElement('a');
  269. a.href = codeKeywordLinks[this.textContent];
  270. return a;
  271. });
  272. var linkImgs = function(bigHref) {
  273. return function() {
  274. var a = document.createElement('a');
  275. a.href = bigHref;
  276. a.title = this.alt;
  277. a.className = this.className;
  278. a.setAttribute('align', this.align);
  279. this.setAttribute('align', '');
  280. this.className = '';
  281. this.style.border = '0px';
  282. return a;
  283. };
  284. };
  285. var linkSmallImgs = function(ext) {
  286. return function() {
  287. var src = this.src;
  288. return linkImgs(src.substr(0, src.length - 7) + ext);
  289. };
  290. };
  291. var linkBigImgs = function() {
  292. var src = $(this).attr('big');
  293. return linkImgs(src);
  294. };
  295. $('img[big$=".jpg"]').wrap(linkBigImgs);
  296. $('img[src$="-sm.jpg"]').wrap(linkSmallImgs('.jpg'));
  297. $('img[src$="-sm.gif"]').wrap(linkSmallImgs('.gif'));
  298. $('img[src$="-sm.png"]').wrap(linkSmallImgs('.png'));
  299. $('pre>code')
  300. .unwrap()
  301. .replaceWith(function() {
  302. return $('<pre class="prettyprint showlinemods">' + this.innerHTML + '</pre>');
  303. });
  304. if (window.prettyPrint) {
  305. window.prettyPrint();
  306. }
  307. var params = getQueryParams();
  308. if (params.doubleSpace || params.doublespace) {
  309. document.body.className = document.body.className + ' doubleSpace';
  310. }
  311. $('.language').on('change', function() {
  312. window.location.href = this.value;
  313. });
  314. });
  315. }(jQuery));