|
@@ -4532,8 +4532,8 @@
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
- makeShear(x, y, z) {
|
|
|
- this.set(1, y, z, 0, x, 1, z, 0, x, y, 1, 0, 0, 0, 0, 1);
|
|
|
+ makeShear(xy, xz, yx, yz, zx, zy) {
|
|
|
+ this.set(1, yx, zx, 0, xy, 1, zy, 0, xz, yz, 1, 0, 0, 0, 0, 1);
|
|
|
return this;
|
|
|
}
|
|
|
|
|
@@ -5279,6 +5279,16 @@
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
+ removeFromParent() {
|
|
|
+ const parent = this.parent;
|
|
|
+
|
|
|
+ if (parent !== null) {
|
|
|
+ parent.remove(this);
|
|
|
+ }
|
|
|
+
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+
|
|
|
clear() {
|
|
|
for (let i = 0; i < this.children.length; i++) {
|
|
|
const object = this.children[i];
|
|
@@ -14666,8 +14676,10 @@
|
|
|
|
|
|
let currentTextureSlot = null;
|
|
|
let currentBoundTextures = {};
|
|
|
- const currentScissor = new Vector4(0, 0, gl.canvas.width, gl.canvas.height);
|
|
|
- const currentViewport = new Vector4(0, 0, gl.canvas.width, gl.canvas.height);
|
|
|
+ const scissorParam = gl.getParameter(gl.SCISSOR_BOX);
|
|
|
+ const viewportParam = gl.getParameter(gl.VIEWPORT);
|
|
|
+ const currentScissor = new Vector4().fromArray(scissorParam);
|
|
|
+ const currentViewport = new Vector4().fromArray(viewportParam);
|
|
|
|
|
|
function createTexture(type, target, count) {
|
|
|
const data = new Uint8Array(4); // 4 is required to match default unpack alignment of 4.
|