File tree Expand file tree Collapse file tree 5 files changed +78
-5
lines changed
utils/docs/template/static/scripts Expand file tree Collapse file tree 5 files changed +78
-5
lines changed Original file line number Diff line number Diff line change @@ -17,5 +17,4 @@ test/treeshake/index.webgpu.nodes.bundle.min.js
1717test /e2e /chromium
1818test /e2e /output-screenshots
1919
20- ** /node_modules
21- ** /docs_new
20+ ** /node_modules
Original file line number Diff line number Diff line change 11import earcut from './lib/earcut.js' ;
22
3+ /**
4+ * An implementation of the earcut polygon triangulation algorithm.
5+ * The code is a port of [mapbox/earcut](https://github.com/mapbox/earcut).
6+ *
7+ * @see https://github.com/mapbox/earcut
8+ */
39class Earcut {
410
511 /**
Original file line number Diff line number Diff line change 1- // Bezier Curves formulas obtained from: https://en.wikipedia.org/wiki/B%C3%A9zier_curve
1+ /**
2+ * Interpolations contains spline and Bézier functions internally used by concrete curve classes.
3+ *
4+ * Bezier Curves formulas obtained from: https://en.wikipedia.org/wiki/B%C3%A9zier_curve
5+ *
6+ * @module Interpolations
7+ */
28
39/**
410 * Computes a point on a Catmull-Rom spline.
Original file line number Diff line number Diff line change 11import { ColorManagement } from '../../math/ColorManagement.js' ;
22import { warn } from '../../utils.js' ;
33
4- // Uniform Utilities
5-
4+ /**
5+ * Provides utility functions for managing uniforms.
6+ *
7+ * @module UniformsUtils
8+ */
9+
10+ /**
11+ * Clones the given uniform definitions by performing a deep-copy. That means
12+ * if the value of a uniform refers to an object like a Vector3 or Texture,
13+ * the cloned uniform will refer to a new object reference.
14+ *
15+ * @param {Object } src - An object representing uniform definitions.
16+ * @return {Object } The cloned uniforms.
17+ */
618export function cloneUniforms ( src ) {
719
820 const dst = { } ;
@@ -49,6 +61,14 @@ export function cloneUniforms( src ) {
4961
5062}
5163
64+ /**
65+ * Merges the given uniform definitions into a single object. Since the
66+ * method internally uses cloneUniforms(), it performs a deep-copy when
67+ * producing the merged uniform definitions.
68+ *
69+ * @param {Array } uniforms - An array of objects containing uniform definitions.
70+ * @return {Object } The merged uniforms.
71+ */
5272export function mergeUniforms ( uniforms ) {
5373
5474 const merged = { } ;
Original file line number Diff line number Diff line change 1+ ( function handleLegacyURLs ( ) {
2+
3+ const hash = window . location . hash ;
4+
5+ if ( hash . startsWith ( '#api/' ) || hash . startsWith ( '#examples/' ) ) {
6+
7+ const mappings = {
8+
9+ '3DMLoader' : 'Rhino3dmLoader' ,
10+
11+ 'BufferGeometryUtils' : 'module-BufferGeometryUtils' ,
12+ 'CameraUtils' : 'module-CameraUtils' ,
13+ 'SceneUtils' : 'module-SceneUtils' ,
14+ 'SkeletonUtils' : 'module-SkeletonUtils' ,
15+ 'UniformsUtils' : 'module-UniformsUtils' ,
16+
17+ 'DefaultLoadingManager' : 'LoadingManager' ,
18+ 'Interpolations' : 'module-Interpolations' ,
19+
20+ 'Animation' : 'global' ,
21+ 'BufferAttributeUsage' : 'global' ,
22+ 'Core' : 'global' ,
23+ 'CustomBlendingEquations' : 'global' ,
24+ 'Materials' : 'global' ,
25+ 'Textures' : 'global'
26+ } ;
27+
28+ const parts = hash . split ( '/' ) ;
29+ let className = parts [ parts . length - 1 ] ;
30+
31+ if ( className ) {
32+
33+ if ( className in mappings ) className = mappings [ className ] ;
34+
35+ window . location . href = `${ className } .html` ;
36+
37+ }
38+
39+ }
40+
41+ } ) ( ) ;
42+
143const panel = document . getElementById ( 'panel' ) ;
244const panelScrim = document . getElementById ( 'panelScrim' ) ;
345const expandButton = document . getElementById ( 'expandButton' ) ;
You can’t perform that action at this time.
0 commit comments