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

r127

上级 afccc97c
......@@ -9,7 +9,7 @@
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.THREE = {}));
}(this, (function (exports) { 'use strict';
const REVISION = '127dev';
const REVISION = '127';
const MOUSE = {
LEFT: 0,
MIDDLE: 1,
......@@ -303,6 +303,14 @@
mapLinear: function (x, a1, a2, b1, b2) {
return b1 + (x - a1) * (b2 - b1) / (a2 - a1);
},
// https://www.gamedev.net/tutorials/programming/general-and-gameplay-programming/inverse-lerp-a-super-useful-yet-often-overlooked-function-r5230/
inverseLerp: function (x, y, value) {
if (x !== y) {
return (value - x) / (y - x);
} else {
return 0;
}
},
// https://en.wikipedia.org/wiki/Linear_interpolation
lerp: function (x, y, t) {
return (1 - t) * x + t * y;
......@@ -18389,10 +18397,10 @@
WebGL1Renderer.prototype.isWebGL1Renderer = true;
class FogExp2 {
constructor(color, density) {
constructor(color, density = 0.00025) {
this.name = '';
this.color = new Color(color);
this.density = density !== undefined ? density : 0.00025;
this.density = density;
}
clone() {
......@@ -18414,11 +18422,11 @@
FogExp2.prototype.isFogExp2 = true;
class Fog {
constructor(color, near, far) {
constructor(color, near = 1, far = 1000) {
this.name = '';
this.color = new Color(color);
this.near = near !== undefined ? near : 1;
this.far = far !== undefined ? far : 1000;
this.near = near;
this.far = far;
}
clone() {
此差异已折叠。
......@@ -3,7 +3,7 @@
* Copyright 2010-2021 Three.js Authors
* SPDX-License-Identifier: MIT
*/
const REVISION = '127dev';
const REVISION = '127';
const MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 };
const TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 };
const CullFaceNone = 0;
......@@ -347,6 +347,22 @@ const MathUtils = {
},
// https://www.gamedev.net/tutorials/programming/general-and-gameplay-programming/inverse-lerp-a-super-useful-yet-often-overlooked-function-r5230/
inverseLerp: function ( x, y, value ) {
if ( x !== y ) {
return ( value - x ) / ( y - x );
} else {
return 0;
}
},
// https://en.wikipedia.org/wiki/Linear_interpolation
lerp: function ( x, y, t ) {
......@@ -25275,12 +25291,12 @@ WebGL1Renderer.prototype.isWebGL1Renderer = true;
class FogExp2 {
constructor( color, density ) {
constructor( color, density = 0.00025 ) {
this.name = '';
this.color = new Color( color );
this.density = ( density !== undefined ) ? density : 0.00025;
this.density = density;
}
......@@ -25306,14 +25322,14 @@ FogExp2.prototype.isFogExp2 = true;
class Fog {
constructor( color, near, far ) {
constructor( color, near = 1, far = 1000 ) {
this.name = '';
this.color = new Color( color );
this.near = ( near !== undefined ) ? near : 1;
this.far = ( far !== undefined ) ? far : 1000;
this.near = near;
this.far = far;
}
const cacheName = 'threejs-editor-r126';
const cacheName = 'threejs-editor-r127';
const assets = [
'./',
......
{
"name": "three",
"version": "0.126.0",
"version": "0.127.0",
"description": "JavaScript 3D library",
"main": "build/three.js",
"module": "build/three.module.js",
......
export const REVISION = '127dev';
export const REVISION = '127';
export const MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2, ROTATE: 0, DOLLY: 1, PAN: 2 };
export const TOUCH = { ROTATE: 0, PAN: 1, DOLLY_PAN: 2, DOLLY_ROTATE: 3 };
export const CullFaceNone = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册