Skip to content

Commit 67df2ed

Browse files
authored
Update builds. (mrdoob#21832)
1 parent be73fc9 commit 67df2ed

File tree

4 files changed

+42
-11
lines changed

4 files changed

+42
-11
lines changed

build/three.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4532,8 +4532,8 @@
45324532
return this;
45334533
}
45344534

4535-
makeShear(x, y, z) {
4536-
this.set(1, y, z, 0, x, 1, z, 0, x, y, 1, 0, 0, 0, 0, 1);
4535+
makeShear(xy, xz, yx, yz, zx, zy) {
4536+
this.set(1, yx, zx, 0, xy, 1, zy, 0, xz, yz, 1, 0, 0, 0, 0, 1);
45374537
return this;
45384538
}
45394539

@@ -5279,6 +5279,16 @@
52795279
return this;
52805280
}
52815281

5282+
removeFromParent() {
5283+
const parent = this.parent;
5284+
5285+
if (parent !== null) {
5286+
parent.remove(this);
5287+
}
5288+
5289+
return this;
5290+
}
5291+
52825292
clear() {
52835293
for (let i = 0; i < this.children.length; i++) {
52845294
const object = this.children[i];
@@ -14666,8 +14676,10 @@
1466614676

1466714677
let currentTextureSlot = null;
1466814678
let currentBoundTextures = {};
14669-
const currentScissor = new Vector4(0, 0, gl.canvas.width, gl.canvas.height);
14670-
const currentViewport = new Vector4(0, 0, gl.canvas.width, gl.canvas.height);
14679+
const scissorParam = gl.getParameter(gl.SCISSOR_BOX);
14680+
const viewportParam = gl.getParameter(gl.VIEWPORT);
14681+
const currentScissor = new Vector4().fromArray(scissorParam);
14682+
const currentViewport = new Vector4().fromArray(viewportParam);
1467114683

1467214684
function createTexture(type, target, count) {
1467314685
const data = new Uint8Array(4); // 4 is required to match default unpack alignment of 4.

build/three.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/three.module.js

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5973,13 +5973,13 @@ class Matrix4 {
59735973

59745974
}
59755975

5976-
makeShear( x, y, z ) {
5976+
makeShear( xy, xz, yx, yz, zx, zy ) {
59775977

59785978
this.set(
59795979

5980-
1, y, z, 0,
5981-
x, 1, z, 0,
5982-
x, y, 1, 0,
5980+
1, yx, zx, 0,
5981+
xy, 1, zy, 0,
5982+
xz, yz, 1, 0,
59835983
0, 0, 0, 1
59845984

59855985
);
@@ -6912,6 +6912,20 @@ class Object3D extends EventDispatcher {
69126912

69136913
}
69146914

6915+
removeFromParent() {
6916+
6917+
const parent = this.parent;
6918+
6919+
if ( parent !== null ) {
6920+
6921+
parent.remove( this );
6922+
6923+
}
6924+
6925+
return this;
6926+
6927+
}
6928+
69156929
clear() {
69166930

69176931
for ( let i = 0; i < this.children.length; i ++ ) {
@@ -19641,8 +19655,11 @@ function WebGLState( gl, extensions, capabilities ) {
1964119655
let currentTextureSlot = null;
1964219656
let currentBoundTextures = {};
1964319657

19644-
const currentScissor = new Vector4( 0, 0, gl.canvas.width, gl.canvas.height );
19645-
const currentViewport = new Vector4( 0, 0, gl.canvas.width, gl.canvas.height );
19658+
const scissorParam = gl.getParameter( 3088 );
19659+
const viewportParam = gl.getParameter( 2978 );
19660+
19661+
const currentScissor = new Vector4().fromArray( scissorParam );
19662+
const currentViewport = new Vector4().fromArray( viewportParam );
1964619663

1964719664
function createTexture( type, target, count ) {
1964819665

utils/build/rollup.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ export function glconstants() {
3939
CULL_FACE: 2884,
4040
DEPTH_TEST: 2929,
4141
STENCIL_TEST: 2960,
42+
VIEWPORT: 2978,
4243
BLEND: 3042,
44+
SCISSOR_BOX: 3088,
4345
SCISSOR_TEST: 3089,
4446
UNPACK_ALIGNMENT: 3317,
4547
MAX_TEXTURE_SIZE: 3379,

0 commit comments

Comments
 (0)