|
@@ -7,7 +7,7 @@
|
|
|
|
|
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
|
|
|
-const REVISION = '137';
|
|
|
|
|
|
+const REVISION = '138dev';
|
|
const MOUSE = {
|
|
const MOUSE = {
|
|
LEFT: 0,
|
|
LEFT: 0,
|
|
MIDDLE: 1,
|
|
MIDDLE: 1,
|
|
@@ -6759,11 +6759,11 @@ class Material extends EventDispatcher {
|
|
data.stencilZFail = this.stencilZFail;
|
|
data.stencilZFail = this.stencilZFail;
|
|
data.stencilZPass = this.stencilZPass; // rotation (SpriteMaterial)
|
|
data.stencilZPass = this.stencilZPass; // rotation (SpriteMaterial)
|
|
|
|
|
|
- if (this.rotation && this.rotation !== 0) data.rotation = this.rotation;
|
|
|
|
|
|
+ if (this.rotation !== undefined && this.rotation !== 0) data.rotation = this.rotation;
|
|
if (this.polygonOffset === true) data.polygonOffset = true;
|
|
if (this.polygonOffset === true) data.polygonOffset = true;
|
|
if (this.polygonOffsetFactor !== 0) data.polygonOffsetFactor = this.polygonOffsetFactor;
|
|
if (this.polygonOffsetFactor !== 0) data.polygonOffsetFactor = this.polygonOffsetFactor;
|
|
if (this.polygonOffsetUnits !== 0) data.polygonOffsetUnits = this.polygonOffsetUnits;
|
|
if (this.polygonOffsetUnits !== 0) data.polygonOffsetUnits = this.polygonOffsetUnits;
|
|
- if (this.linewidth && this.linewidth !== 1) data.linewidth = this.linewidth;
|
|
|
|
|
|
+ if (this.linewidth !== undefined && this.linewidth !== 1) data.linewidth = this.linewidth;
|
|
if (this.dashSize !== undefined) data.dashSize = this.dashSize;
|
|
if (this.dashSize !== undefined) data.dashSize = this.dashSize;
|
|
if (this.gapSize !== undefined) data.gapSize = this.gapSize;
|
|
if (this.gapSize !== undefined) data.gapSize = this.gapSize;
|
|
if (this.scale !== undefined) data.scale = this.scale;
|
|
if (this.scale !== undefined) data.scale = this.scale;
|
|
@@ -10963,7 +10963,7 @@ function WebGLBindingStates(gl, extensions, attributes, capabilities) {
|
|
const stride = data.stride;
|
|
const stride = data.stride;
|
|
const offset = geometryAttribute.offset;
|
|
const offset = geometryAttribute.offset;
|
|
|
|
|
|
- if (data && data.isInstancedInterleavedBuffer) {
|
|
|
|
|
|
+ if (data.isInstancedInterleavedBuffer) {
|
|
for (let i = 0; i < programAttribute.locationSize; i++) {
|
|
for (let i = 0; i < programAttribute.locationSize; i++) {
|
|
enableAttributeAndDivisor(programAttribute.location + i, data.meshPerAttribute);
|
|
enableAttributeAndDivisor(programAttribute.location + i, data.meshPerAttribute);
|
|
}
|
|
}
|
|
@@ -15536,7 +15536,7 @@ function WebGLShadowMap(_renderer, _objects, _capabilities) {
|
|
_renderer.renderBufferDirect(camera, null, geometry, shadowMaterialHorizontal, fullScreenMesh, null);
|
|
_renderer.renderBufferDirect(camera, null, geometry, shadowMaterialHorizontal, fullScreenMesh, null);
|
|
}
|
|
}
|
|
|
|
|
|
- function getDepthMaterial(object, geometry, material, light, shadowCameraNear, shadowCameraFar, type) {
|
|
|
|
|
|
+ function getDepthMaterial(object, material, light, shadowCameraNear, shadowCameraFar, type) {
|
|
let result = null;
|
|
let result = null;
|
|
const customMaterial = light.isPointLight === true ? object.customDistanceMaterial : object.customDepthMaterial;
|
|
const customMaterial = light.isPointLight === true ? object.customDistanceMaterial : object.customDepthMaterial;
|
|
|
|
|
|
@@ -15617,13 +15617,13 @@ function WebGLShadowMap(_renderer, _objects, _capabilities) {
|
|
const groupMaterial = material[group.materialIndex];
|
|
const groupMaterial = material[group.materialIndex];
|
|
|
|
|
|
if (groupMaterial && groupMaterial.visible) {
|
|
if (groupMaterial && groupMaterial.visible) {
|
|
- const depthMaterial = getDepthMaterial(object, geometry, groupMaterial, light, shadowCamera.near, shadowCamera.far, type);
|
|
|
|
|
|
+ const depthMaterial = getDepthMaterial(object, groupMaterial, light, shadowCamera.near, shadowCamera.far, type);
|
|
|
|
|
|
_renderer.renderBufferDirect(shadowCamera, null, geometry, depthMaterial, object, group);
|
|
_renderer.renderBufferDirect(shadowCamera, null, geometry, depthMaterial, object, group);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else if (material.visible) {
|
|
} else if (material.visible) {
|
|
- const depthMaterial = getDepthMaterial(object, geometry, material, light, shadowCamera.near, shadowCamera.far, type);
|
|
|
|
|
|
+ const depthMaterial = getDepthMaterial(object, material, light, shadowCamera.near, shadowCamera.far, type);
|
|
|
|
|
|
_renderer.renderBufferDirect(shadowCamera, null, geometry, depthMaterial, object, null);
|
|
_renderer.renderBufferDirect(shadowCamera, null, geometry, depthMaterial, object, null);
|
|
}
|
|
}
|
|
@@ -16604,7 +16604,6 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
|
|
const texture = renderTarget.texture;
|
|
const texture = renderTarget.texture;
|
|
const renderTargetProperties = properties.get(renderTarget);
|
|
const renderTargetProperties = properties.get(renderTarget);
|
|
const textureProperties = properties.get(texture);
|
|
const textureProperties = properties.get(texture);
|
|
- if (!renderTarget) return;
|
|
|
|
|
|
|
|
if (textureProperties.__webglTexture !== undefined) {
|
|
if (textureProperties.__webglTexture !== undefined) {
|
|
_gl.deleteTexture(textureProperties.__webglTexture);
|
|
_gl.deleteTexture(textureProperties.__webglTexture);
|
|
@@ -17018,7 +17017,7 @@ function WebGLTextures(_gl, extensions, state, properties, capabilities, utils,
|
|
|
|
|
|
_gl.pixelStorei(_gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, _gl.NONE);
|
|
_gl.pixelStorei(_gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, _gl.NONE);
|
|
|
|
|
|
- const isCompressed = texture && (texture.isCompressedTexture || texture.image[0].isCompressedTexture);
|
|
|
|
|
|
+ const isCompressed = texture.isCompressedTexture || texture.image[0].isCompressedTexture;
|
|
const isDataTexture = texture.image[0] && texture.image[0].isDataTexture;
|
|
const isDataTexture = texture.image[0] && texture.image[0].isDataTexture;
|
|
const cubeImage = [];
|
|
const cubeImage = [];
|
|
|
|
|
|
@@ -20122,7 +20121,7 @@ function WebGLRenderer(parameters = {}) {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if (!!geometry && (geometry.morphAttributes.position !== undefined || geometry.morphAttributes.normal !== undefined)) {
|
|
|
|
|
|
+ if (geometry.morphAttributes.position !== undefined || geometry.morphAttributes.normal !== undefined) {
|
|
morphtargets.update(object, geometry, material, program);
|
|
morphtargets.update(object, geometry, material, program);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -23873,7 +23872,7 @@ class CurvePath extends Curve {
|
|
|
|
|
|
for (let i = 0, curves = this.curves; i < curves.length; i++) {
|
|
for (let i = 0, curves = this.curves; i < curves.length; i++) {
|
|
const curve = curves[i];
|
|
const curve = curves[i];
|
|
- const resolution = curve && curve.isEllipseCurve ? divisions * 2 : curve && (curve.isLineCurve || curve.isLineCurve3) ? 1 : curve && curve.isSplineCurve ? divisions * curve.points.length : divisions;
|
|
|
|
|
|
+ const resolution = curve.isEllipseCurve ? divisions * 2 : curve.isLineCurve || curve.isLineCurve3 ? 1 : curve.isSplineCurve ? divisions * curve.points.length : divisions;
|
|
const pts = curve.getPoints(resolution);
|
|
const pts = curve.getPoints(resolution);
|
|
|
|
|
|
for (let j = 0; j < pts.length; j++) {
|
|
for (let j = 0; j < pts.length; j++) {
|
|
@@ -26099,7 +26098,8 @@ function isUniqueEdge(start, end, edges) {
|
|
if (edges.has(hash1) === true || edges.has(hash2) === true) {
|
|
if (edges.has(hash1) === true || edges.has(hash2) === true) {
|
|
return false;
|
|
return false;
|
|
} else {
|
|
} else {
|
|
- edges.add(hash1, hash2);
|
|
|
|
|
|
+ edges.add(hash1);
|
|
|
|
+ edges.add(hash2);
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -33526,11 +33526,11 @@ class Raycaster {
|
|
}
|
|
}
|
|
|
|
|
|
setFromCamera(coords, camera) {
|
|
setFromCamera(coords, camera) {
|
|
- if (camera && camera.isPerspectiveCamera) {
|
|
|
|
|
|
+ if (camera.isPerspectiveCamera) {
|
|
this.ray.origin.setFromMatrixPosition(camera.matrixWorld);
|
|
this.ray.origin.setFromMatrixPosition(camera.matrixWorld);
|
|
this.ray.direction.set(coords.x, coords.y, 0.5).unproject(camera).sub(this.ray.origin).normalize();
|
|
this.ray.direction.set(coords.x, coords.y, 0.5).unproject(camera).sub(this.ray.origin).normalize();
|
|
this.camera = camera;
|
|
this.camera = camera;
|
|
- } else if (camera && camera.isOrthographicCamera) {
|
|
|
|
|
|
+ } else if (camera.isOrthographicCamera) {
|
|
this.ray.origin.set(coords.x, coords.y, (camera.near + camera.far) / (camera.near - camera.far)).unproject(camera); // set origin in plane of camera
|
|
this.ray.origin.set(coords.x, coords.y, (camera.near + camera.far) / (camera.near - camera.far)).unproject(camera); // set origin in plane of camera
|
|
|
|
|
|
this.ray.direction.set(0, 0, -1).transformDirection(camera.matrixWorld);
|
|
this.ray.direction.set(0, 0, -1).transformDirection(camera.matrixWorld);
|
|
@@ -34029,7 +34029,7 @@ class SkeletonHelper extends LineSegments {
|
|
function getBoneList(object) {
|
|
function getBoneList(object) {
|
|
const boneList = [];
|
|
const boneList = [];
|
|
|
|
|
|
- if (object && object.isBone) {
|
|
|
|
|
|
+ if (object.isBone === true) {
|
|
boneList.push(object);
|
|
boneList.push(object);
|
|
}
|
|
}
|
|
|
|
|