|
@@ -1795,7 +1795,7 @@ class Texture extends EventDispatcher {
|
|
|
premultiplyAlpha: this.premultiplyAlpha,
|
|
|
unpackAlignment: this.unpackAlignment
|
|
|
};
|
|
|
- if (JSON.stringify(this.userData) !== '{}') output.userData = this.userData;
|
|
|
+ if (Object.keys(this.userData).length > 0) output.userData = this.userData;
|
|
|
if (!isRootObject) {
|
|
|
meta.textures[this.uuid] = output;
|
|
|
}
|
|
@@ -5110,8 +5110,8 @@ class Object3D extends EventDispatcher {
|
|
|
this.animations = [];
|
|
|
this.userData = {};
|
|
|
}
|
|
|
- onBeforeRender() {}
|
|
|
- onAfterRender() {}
|
|
|
+ onBeforeRender( /* renderer, scene, camera, geometry, material, group */) {}
|
|
|
+ onAfterRender( /* renderer, scene, camera, geometry, material, group */) {}
|
|
|
applyMatrix4(matrix) {
|
|
|
if (this.matrixAutoUpdate) this.updateMatrix();
|
|
|
this.matrix.premultiply(matrix);
|
|
@@ -5317,7 +5317,7 @@ class Object3D extends EventDispatcher {
|
|
|
const e = this.matrixWorld.elements;
|
|
|
return target.set(e[8], e[9], e[10]).normalize();
|
|
|
}
|
|
|
- raycast() {}
|
|
|
+ raycast( /* raycaster, intersects */) {}
|
|
|
traverse(callback) {
|
|
|
callback(this);
|
|
|
const children = this.children;
|
|
@@ -5428,7 +5428,7 @@ class Object3D extends EventDispatcher {
|
|
|
if (this.visible === false) object.visible = false;
|
|
|
if (this.frustumCulled === false) object.frustumCulled = false;
|
|
|
if (this.renderOrder !== 0) object.renderOrder = this.renderOrder;
|
|
|
- if (JSON.stringify(this.userData) !== '{}') object.userData = this.userData;
|
|
|
+ if (Object.keys(this.userData).length > 0) object.userData = this.userData;
|
|
|
object.layers = this.layers.mask;
|
|
|
object.matrix = this.matrix.toArray();
|
|
|
if (this.matrixAutoUpdate === false) object.matrixAutoUpdate = false;
|
|
@@ -5839,9 +5839,9 @@ class Material extends EventDispatcher {
|
|
|
}
|
|
|
this._alphaTest = value;
|
|
|
}
|
|
|
- onBuild() {}
|
|
|
- onBeforeRender() {}
|
|
|
- onBeforeCompile() {}
|
|
|
+ onBuild( /* shaderobject, renderer */) {}
|
|
|
+ onBeforeRender( /* renderer, scene, camera, geometry, object, group */) {}
|
|
|
+ onBeforeCompile( /* shaderobject, renderer */) {}
|
|
|
customProgramCacheKey() {
|
|
|
return this.onBeforeCompile.toString();
|
|
|
}
|
|
@@ -6009,7 +6009,7 @@ class Material extends EventDispatcher {
|
|
|
if (this.visible === false) data.visible = false;
|
|
|
if (this.toneMapped === false) data.toneMapped = false;
|
|
|
if (this.fog === false) data.fog = false;
|
|
|
- if (JSON.stringify(this.userData) !== '{}') data.userData = this.userData;
|
|
|
+ if (Object.keys(this.userData).length > 0) data.userData = this.userData;
|
|
|
|
|
|
// TODO: Copied from Object3D.toJSON
|
|
|
|
|
@@ -17809,8 +17809,8 @@ function WebGLRenderer(parameters = {}) {
|
|
|
console.log('THREE.WebGLRenderer: Context Lost.');
|
|
|
_isContextLost = true;
|
|
|
}
|
|
|
- function /* event */
|
|
|
- onContextRestore() {
|
|
|
+ function onContextRestore( /* event */
|
|
|
+ ) {
|
|
|
console.log('THREE.WebGLRenderer: Context Restored.');
|
|
|
_isContextLost = false;
|
|
|
const infoAutoReset = info.autoReset;
|
|
@@ -18831,7 +18831,8 @@ class FogExp2 {
|
|
|
clone() {
|
|
|
return new FogExp2(this.color, this.density);
|
|
|
}
|
|
|
- toJSON() {
|
|
|
+ toJSON( /* meta */
|
|
|
+ ) {
|
|
|
return {
|
|
|
type: 'FogExp2',
|
|
|
color: this.color.getHex(),
|
|
@@ -18851,7 +18852,8 @@ class Fog {
|
|
|
clone() {
|
|
|
return new Fog(this.color, this.near, this.far);
|
|
|
}
|
|
|
- toJSON() {
|
|
|
+ toJSON( /* meta */
|
|
|
+ ) {
|
|
|
return {
|
|
|
type: 'Fog',
|
|
|
color: this.color.getHex(),
|
|
@@ -20218,7 +20220,8 @@ class Curve {
|
|
|
// Virtual base class method to overwrite and implement in subclasses
|
|
|
// - t [0 .. 1]
|
|
|
|
|
|
- getPoint() {
|
|
|
+ getPoint( /* t, optionalTarget */
|
|
|
+ ) {
|
|
|
console.warn('THREE.Curve: .getPoint() not implemented.');
|
|
|
return null;
|
|
|
}
|
|
@@ -25089,12 +25092,14 @@ class Interpolant {
|
|
|
|
|
|
// Template methods for derived classes:
|
|
|
|
|
|
- interpolate_() {
|
|
|
+ interpolate_( /* i1, t0, t, t1 */
|
|
|
+ ) {
|
|
|
throw new Error('call to abstract method');
|
|
|
// implementations shall return this.resultBuffer
|
|
|
}
|
|
|
|
|
|
- intervalChanged_() {
|
|
|
+ intervalChanged_( /* i1, t0, t1 */
|
|
|
+ ) {
|
|
|
|
|
|
// empty
|
|
|
}
|
|
@@ -25954,14 +25959,14 @@ class Loader {
|
|
|
this.resourcePath = '';
|
|
|
this.requestHeader = {};
|
|
|
}
|
|
|
- load() {}
|
|
|
+ load( /* url, onLoad, onProgress, onError */) {}
|
|
|
loadAsync(url, onProgress) {
|
|
|
const scope = this;
|
|
|
return new Promise(function (resolve, reject) {
|
|
|
scope.load(url, resolve, onProgress, reject);
|
|
|
});
|
|
|
}
|
|
|
- parse() {}
|
|
|
+ parse( /* data */) {}
|
|
|
setCrossOrigin(crossOrigin) {
|
|
|
this.crossOrigin = crossOrigin;
|
|
|
return this;
|