docstring_tokens
stringlengths
0
76.5k
code_tokens
stringlengths
75
1.81M
label_window
listlengths
4
2.12k
html_url
stringlengths
74
116
file_name
stringlengths
3
311
/** * Register a function that will be executed after the physics step */
<mask> BABYLON.Tools.Warn("Function to remove was not found"); <mask> } <mask> }; <mask> PhysicsImpostor.prototype.registerAfterPhysicsStep = function (func) { <mask> this._onAfterPhysicsStepCallbacks.push(func); <mask> }; <mask> PhysicsImpo...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804
src/Physics/babylon.physicsImpostor.js
/** * register a function that will be executed when this impostor collides against a different body. */
<mask> } <mask> }; <mask> PhysicsImpostor.prototype.registerOnPhysicsCollide = function (func) { <mask> this._onPhysicsCollideCallbacks.push(func); <mask> }; <mask> PhysicsImpostor.prototype.unregisterOnPhysicsCollide = function (func) { <mask> ...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804
src/Physics/babylon.physicsImpostor.js
/** * Apply a force */
<mask> else { <mask> BABYLON.Tools.Warn("Function to remove was not found"); <mask> } <mask> }; <mask> PhysicsImpostor.prototype.applyForce = function (force, contactPoint) { <mask> this._physicsEngine.getPhysicsPlugin().applyForce(this, force, c...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804
src/Physics/babylon.physicsImpostor.js
/** * Apply an impulse */
<mask> this._physicsEngine.getPhysicsPlugin().applyForce(this, force, contactPoint); <mask> }; <mask> PhysicsImpostor.prototype.applyImpulse = function (force, contactPoint) { <mask> this._physicsEngine.getPhysicsPlugin().applyImpulse(this, force, contactPoint); <mask> ...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804
src/Physics/babylon.physicsImpostor.js
/** * A help function to create a joint. */
<mask> this._physicsEngine.getPhysicsPlugin().applyImpulse(this, force, contactPoint); <mask> }; <mask> PhysicsImpostor.prototype.createJoint = function (otherImpostor, jointType, jointData) { <mask> var joint = new BABYLON.PhysicsJoint(jointType, jointData); <mask> ...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804
src/Physics/babylon.physicsImpostor.js
/** * Add a joint to this impostor with a different impostor. */
<mask> var joint = new BABYLON.PhysicsJoint(jointType, jointData); <mask> this.addJoint(otherImpostor, joint); <mask> }; <mask> PhysicsImpostor.prototype.addJoint = function (otherImpostor, joint) { <mask> this._joints.push({ <mask> otherImpostor...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804
src/Physics/babylon.physicsImpostor.js
<mask> joint: joint <mask> }); <mask> this._physicsEngine.addJoint(this, otherImpostor, joint); <mask> }; <mask> //TODO <mask> PhysicsImpostor.prototype.dispose = function (disposeChildren) { <mask> if (disposeChildren === void 0) { disp...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804
src/Physics/babylon.physicsImpostor.js
})();
<mask> PhysicsImpostor.CylinderImpostor = 7; <mask> PhysicsImpostor.ConvexHullImpostor = 8; <mask> PhysicsImpostor.HeightmapImpostor = 9; <mask> return PhysicsImpostor; <mask> }()); <mask> BABYLON.PhysicsImpostor = PhysicsImpostor; <mask> })(BABYLON || (BABYLON = {})); </...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804
src/Physics/babylon.physicsImpostor.js
public getOptions(): any { }
<mask> } <mask> <mask> /** <mask> * Set the body's velocity. <mask> */ <mask> public setVelocity(velocity: Vector3) { <mask> this._physicsEngine.getPhysicsPlugin().setVelocity(this, velocity); <mask> } </s> Building with latest physics engine Fixin...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804
src/Physics/babylon.physicsImpostor.ts
})();
<mask> //Similar to a Ball-Joint. Different in params <mask> //TODO check!! <mask> PhysicsJoint.PointToPointJoint = 8; <mask> return PhysicsJoint; <mask> }()); <mask> BABYLON.PhysicsJoint = PhysicsJoint; <mask> })(BABYLON || (BABYLON = {})); </s> Building with latest phys...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804
src/Physics/babylon.physicsJoint.js
})();
<mask> Scene._FOGMODE_LINEAR = 3; <mask> Scene.MinDeltaTime = 1.0; <mask> Scene.MaxDeltaTime = 1000.0; <mask> return Scene; <mask> }()); <mask> BABYLON.Scene = Scene; <mask> })(BABYLON || (BABYLON = {})); </s> Building with latest physics engine Fixing issue with ArcRotat...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804
src/babylon.scene.js
this.anisotropicFilteringLevel = 1;
<mask> this.wrapU = Texture.CLAMP_ADDRESSMODE; <mask> this.wrapV = Texture.CLAMP_ADDRESSMODE; <mask> <mask> this._texture = this._getFromCache(url, true); <mask> <mask> if (!this._texture) { </s> Fix Color grading Arifacts Former-commit-id: 62265c80...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/92c4c2dc959d600e0c5e903782002c51a8a74b8a
src/Materials/Textures/babylon.colorGradingTexture.ts
var texture = this.getScene().getEngine().createRawTexture(null, 1, 1, BABYLON.Engine.TEXTUREFORMAT_RGBA, false, false, Texture.BILINEAR_SAMPLINGMODE);
<mask> private load3dlTexture() { <mask> <mask> var mipLevels = 0; <mask> var floatArrayView: Float32Array = null; <mask> var texture = this.getScene().getEngine().createRawTexture(null, 1, 1, BABYLON.Engine.TEXTUREFORMAT_RGB, false, false, Texture.BILINEAR_SAMPLINGMODE...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/92c4c2dc959d600e0c5e903782002c51a8a74b8a
src/Materials/Textures/babylon.colorGradingTexture.ts
data = new Uint8Array(size * size * size * 4); // volume texture of side size and rgb 8 tempData = new Float32Array(size * size * size * 4);
<mask> var words = line.split(" "); <mask> if (size === 0) { <mask> // Number of space + one <mask> size = words.length; <mask> data = new Uint8Array(size * size * size * 3); // volume texture of side si...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/92c4c2dc959d600e0c5e903782002c51a8a74b8a
src/Materials/Textures/babylon.colorGradingTexture.ts
var pixelStorageIndex = (pixelIndexW + pixelIndexSlice * size + pixelIndexH * size * size) * 4;
<mask> maxColor = Math.max(r, maxColor); <mask> maxColor = Math.max(g, maxColor); <mask> maxColor = Math.max(b, maxColor); <mask> <mask> var pixelStorageIndex = (pixelIndexW + pixelIndexSlice * ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/92c4c2dc959d600e0c5e903782002c51a8a74b8a
src/Materials/Textures/babylon.colorGradingTexture.ts
tempData[pixelStorageIndex + 3] = 0;
<mask> <mask> tempData[pixelStorageIndex + 0] = r; <mask> tempData[pixelStorageIndex + 1] = g; <mask> tempData[pixelStorageIndex + 2] = b; <mask> <mask> pixelIndexSlice...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/92c4c2dc959d600e0c5e903782002c51a8a74b8a
src/Materials/Textures/babylon.colorGradingTexture.ts
this.getScene().getEngine().updateRawTexture(texture, data, BABYLON.Engine.TEXTUREFORMAT_RGBA, false);
<mask> data[i] = (value / maxColor * 255); <mask> } <mask> <mask> this.getScene().getEngine().updateTextureSize(texture, size * size, size); <mask> this.getScene().getEngine().updateRawTexture(texture, data, BABYLON.Engine.TEXTURE...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/92c4c2dc959d600e0c5e903782002c51a8a74b8a
src/Materials/Textures/babylon.colorGradingTexture.ts
<mask> public updateRawTexture(texture: WebGLTexture, data: ArrayBufferView, format: number, invertY: boolean, compression: string = null): void { <mask> var internalFormat = this._getInternalFormat(format); <mask> this._gl.bindTexture(this._gl.TEXTURE_2D, texture); <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/92c4c2dc959d600e0c5e903782002c51a8a74b8a
src/babylon.engine.ts
private _dataFetched: boolean = false; // check if the has been fetched the data. If not, do cleanup
<mask> private _strength: number; <mask> private _falloff: PhysicsRadialImpulseFallof; <mask> private _tickCallback: any; <mask> private _radialSphere: Mesh; <mask> private _dataRequested: boolean = false; // check if the has been requested the data. If not, do cleanup <mas...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9542dc1c4b706819230d2376259e04c5c93d5e60
src/Physics/babylon.physicsHelper.ts
public getData() { this._dataFetched = true; return { radialSphere: this._radialSphere, };
<mask> this._falloff = falloff; <mask> this._tickCallback = this._tick.bind(this); <mask> } <mask> <mask> public getData(callback: (data: PhysicsGravitationalFieldEventData) => void) { <mask> this._dataRequested = true; <mask> <mask> var self = t...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9542dc1c4b706819230d2376259e04c5c93d5e60
src/Physics/babylon.physicsHelper.ts
this._tickCallback.call(this);
<mask> <mask> public enable() { <mask> this._scene.registerBeforeRender(this._tickCallback); <mask> } <mask> <mask> public disable() { <mask> this._scene.unregisterBeforeRender(this._tickCallback); </s> Fixed issue with getData() callback Former-commit-id: 179...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9542dc1c4b706819230d2376259e04c5c93d5e60
src/Physics/babylon.physicsHelper.ts
if (!self._dataFetched) {
<mask> this._radialSphere.dispose(); <mask> } else { <mask> var self = this; <mask> setTimeout(function () { <mask> if (!self._dataRequested) { <mask> self._radialSphere.dispose(); <mask> }...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9542dc1c4b706819230d2376259e04c5c93d5e60
src/Physics/babylon.physicsHelper.ts
* @returns a boolean indicating if the animation is running
<mask> * @param to defines the upper bound of the animation range <mask> * @param loop defines if the current animation must loop <mask> * @param speedRatio defines the current speed ratio <mask> * @param weight defines the weight of the animation (default is -1 so no weight) <m...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9571f549c7531be659fc948de26ee3afdc807d9c
src/Animations/babylon.runtimeAnimation.ts
<mask> this._stopped = true; <mask> return false; <mask> } <mask> <mask> let keys = this._animation.getKeys(); <mask> <mask> // Return immediately if there is only one key frame. <mask> if (keys.length === 1) { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9571f549c7531be659fc948de26ee3afdc807d9c
src/Animations/babylon.runtimeAnimation.ts
let keys = this._animation.getKeys();
<mask> <mask> var returnValue = true; <mask> <mask> // Adding a start key at frame 0 if missing <mask> if (keys[0].frame !== 0) { <mask> var newKey = { frame: 0, value: keys[0].value }; <mask> keys.splice(0, 0, newKey); </s> Fix bug when anim...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9571f549c7531be659fc948de26ee3afdc807d9c
src/Animations/babylon.runtimeAnimation.ts
// Adding a duplicate key when there is only one key at frame zero else if (keys.length === 1) { var newKey = { frame: 0.001, value: keys[0].value }; keys.push(newKey); }
<mask> var newKey = { frame: 0, value: keys[0].value }; <mask> keys.splice(0, 0, newKey); <mask> } <mask> <mask> // Check limits <mask> if (from < keys[0].frame || from > keys[keys.length - 1].frame) { <mask> from = keys[0].fram...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9571f549c7531be659fc948de26ee3afdc807d9c
src/Animations/babylon.runtimeAnimation.ts
/** * Given three orthogonal normalized left-handed oriented Vector3 axis in space (target system),
<mask> center.scaleInPlace(0.5); <mask> return center; <mask> } <mask> <mask> /** <mask> * Given three orthogonal left-handed oriented Vector3 axis in space (target system), <mask> * RotationFromAxis() returns the rotation Euler angles (ex : rotation.x...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9621e54f38ac66daccab3604565225515b6ec8ed
src/Math/babylon.math.ts
var u = axis1.normalize(); var w = axis3.normalize();
<mask> /** <mask> * The same than RotationFromAxis but updates the passed ref Vector3 parameter. <mask> */ <mask> public static RotationFromAxisToRef(axis1: Vector3, axis2: Vector3, axis3: Vector3, ref: Vector3): void { <mask> var u = Vector3.Normalize(axis1); <mask>...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9621e54f38ac66daccab3604565225515b6ec8ed
src/Math/babylon.math.ts
var cross: Vector3 = Vector3.Zero();
<mask> var z = 0.0; <mask> var t = 0.0; <mask> var sign = -1.0; <mask> var nbRevert = 0; <mask> var cross: Vector3; <mask> var dot = 0.0; <mask> <mask> // step 1 : rotation around w <mask> // Rv3(u) = u1, and u1 b...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9621e54f38ac66daccab3604565225515b6ec8ed
src/Math/babylon.math.ts
<mask> // step 1 : rotation around w <mask> // Rv3(u) = u1, and u1 belongs to plane xOz <mask> // Rv3(w) = w1 = w invariant <mask> var u1: Vector3; <mask> var v1: Vector3; <mask> if (Tools.WithinEpsilon(w.z, 0, Engine.Epsilon)) { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9621e54f38ac66daccab3604565225515b6ec8ed
src/Math/babylon.math.ts
Vector3.CrossToRef(u, u1, cross); // returns same direction as w (=local z) if positive angle : cross(source, image)
<mask> } <mask> <mask> u1 = new Vector3(x, y, z); <mask> u1.normalize(); <mask> v1 = Vector3.Cross(w, u1); // v1 image of v through rotation around w <mask> v1.normalize(); <mask> cross = Vector3.Cross(u, u1); // returns same direction...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9621e54f38ac66daccab3604565225515b6ec8ed
src/Math/babylon.math.ts
<mask> <mask> if (Vector3.Dot(u1, X) < 0) { // checks X orientation <mask> roll = Math.PI + roll; <mask> u1 = u1.scaleInPlace(-1); <mask> v1 = v1.scaleInPlace(-1); <mask> nbRevert++; <mask> } <mask> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9621e54f38ac66daccab3604565225515b6ec8ed
src/Math/babylon.math.ts
sign = -1.0;
<mask> var v2: Vector3; <mask> x = 0.0; <mask> y = 0.0; <mask> z = 0.0; <mask> sign = -1; <mask> if (Tools.WithinEpsilon(w.z, 0, Engine.Epsilon)) { <mask> x = 1.0; <mask> } <mask> else { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9621e54f38ac66daccab3604565225515b6ec8ed
src/Math/babylon.math.ts
Vector3.CrossToRef(w, w2, cross); // returns same direction as u1 (=local x) if positive angle : cross(source, image)
<mask> w2 = new Vector3(x, y, z); <mask> w2.normalize(); <mask> v2 = Vector3.Cross(w2, u1); // v2 image of v1 through rotation around u1 <mask> v2.normalize(); <mask> cross = Vector3.Cross(w, w2); // returns same direction as u1 (=local x) if positive a...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9621e54f38ac66daccab3604565225515b6ec8ed
src/Math/babylon.math.ts
<mask> dot = (Math.min(1.0, Math.max(-1.0, dot))); // to force dot to be in the range [-1, 1] <mask> pitch = Math.acos(dot) * sign; <mask> if (Vector3.Dot(v2, Y) < 0) { // checks for Y orientation <mask> pitch = Math.PI + pitch; <mask> v2 = v2.sca...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9621e54f38ac66daccab3604565225515b6ec8ed
src/Math/babylon.math.ts
sign = -1.0; Vector3.CrossToRef(X, u1, cross); // returns same direction as Y if positive angle : cross(source, image)
<mask> } <mask> <mask> // step 3 : rotate around v2 <mask> // Rv2(u1) = X, same as Rv2(w2) = Z, with X=(1,0,0) and Z=(0,0,1) <mask> sign = -1; <mask> cross = Vector3.Cross(X, u1); // returns same direction as Y if positive angle : cross(sour...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9621e54f38ac66daccab3604565225515b6ec8ed
src/Math/babylon.math.ts
/** * new Path3D(path, normal, raw)
<mask> private _normals = new Array<Vector3>(); <mask> private _binormals = new Array<Vector3>(); <mask> private _raw: boolean; <mask> <mask> /** <mask> * new Path3D(path, normal, raw) <mask> * path : an array of Vector3, the curve axis of the Path3D <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9621e54f38ac66daccab3604565225515b6ec8ed
src/Math/babylon.math.ts
/** * Gets the glossiness component */ readonly glossiness: NodeMaterialConnectionPoint;
<mask> private _codeVariableName: string; <mask> /** @hidden */ <mask> private _inputs: NodeMaterialConnectionPoint[]; <mask> /** <mask> * Gets or sets the name of the block <mask> */ <mask> name: string; <mask> /** </s> Few fixes for nme #6012 Former-commit-...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/968b1d891807ca5d6b0abb9089cddb128807a775
Playground/babylon.d.txt
UNSAFE_componentWillUpdate(nextProps: ITexturePropertyTabComponentProps, nextState: {isEmbedded: boolean}) { let texture = nextProps.node.texture as BaseTexture; nextState.isEmbedded = !texture || texture.name.substring(0, 4) !== "http"; }
<mask> } <mask> <mask> private _generateRandomForCache() { <mask> return 'xxxxxxxxxxxxxxxxxxxx'.replace(/[x]/g, (c) => { <mask> var r = Math.random() * 10 | 0; <mask> return r.toString(); <mask> }); <mask> } </s> Few fixes for nme #6012 Former-commit-id: e...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/968b1d891807ca5d6b0abb9089cddb128807a775
nodeEditor/src/components/diagram/texture/texturePropertyTabComponent.tsx
import { faPlay, faStop, faPalette, faCheckDouble, faSun, faLocationArrow } from '@fortawesome/free-solid-svg-icons';
<mask> <mask> import * as React from "react"; <mask> import { GlobalState } from '../../globalState'; <mask> import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; <mask> import { faPlay, faStop, faPalette, faCheckDouble } from '@fortawesome/free-solid-svg-icons'; <mask> import { Color3, Color4 } from...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/968b1d891807ca5d6b0abb9089cddb128807a775
nodeEditor/src/components/preview/previewAreaComponent.tsx
import { DirectionalLight } from 'babylonjs/Lights/directionalLight';
<mask> import { SceneLoader } from 'babylonjs/Loading/sceneLoader'; <mask> import { TransformNode } from 'babylonjs/Meshes/transformNode'; <mask> import { AbstractMesh } from 'babylonjs/Meshes/abstractMesh'; <mask> import { FramingBehavior } from 'babylonjs/Behaviors/Cameras/framingBehavior'; <mask> <mask> expor...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/968b1d891807ca5d6b0abb9089cddb128807a775
nodeEditor/src/components/preview/previewManager.ts
private _onLightUpdatedObserver: Nullable<Observer<void>>;
<mask> private _onAnimationCommandActivatedObserver: Nullable<Observer<void>>; <mask> private _onUpdateRequiredObserver: Nullable<Observer<void>>; <mask> private _onPreviewBackgroundChangedObserver: Nullable<Observer<void>>; <mask> private _onBackFaceCullingChangedObserver: Nullable<Observer<void>>;...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/968b1d891807ca5d6b0abb9089cddb128807a775
nodeEditor/src/components/preview/previewManager.ts
<mask> private _onPreviewBackgroundChangedObserver: Nullable<Observer<void>>; <mask> private _onBackFaceCullingChangedObserver: Nullable<Observer<void>>; <mask> private _engine: Engine; <mask> private _scene: Scene; <mask> private _light: HemisphericLight; <mask> private _meshes: AbstractM...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/968b1d891807ca5d6b0abb9089cddb128807a775
nodeEditor/src/components/preview/previewManager.ts
this._onLightUpdatedObserver = globalState.onLightUpdated.add(() => { this._prepareLights(); });
<mask> this._refreshPreviewMesh(); <mask> }); <mask> <mask> this._onUpdateRequiredObserver = globalState.onUpdateRequiredObservable.add(() => { <mask> let serializationObject = this._nodeMaterial.serialize(); <mask> this._updatePreview(serializationObject); <m...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/968b1d891807ca5d6b0abb9089cddb128807a775
nodeEditor/src/components/preview/previewManager.ts
private _prepareLights() { // Remove current lights let currentLights = this._scene.lights.slice(0); for (var light of currentLights) { light.dispose(); } // Create new lights based on settings if (this._globalState.hemisphericLight) { ...
<mask> } <mask> } <mask> } <mask> <mask> private _prepareMeshes() { <mask> // Light <mask> if (!this._scene.lights.length) { <mask> this._light = new HemisphericLight("light", new Vector3(0, 1, 0), this._scene); <mask> } <mask> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/968b1d891807ca5d6b0abb9089cddb128807a775
nodeEditor/src/components/preview/previewManager.ts
} private _prepareMeshes() { this._prepareLights();
<mask> new DirectionalLight("Directional light #0", new Vector3(-1, -1, 0), this._scene); <mask> } <mask> <mask> // Framing <mask> this._camera.useFramingBehavior = true; <mask> <mask> var framingBehavior = this._camera.getBehaviorByName("Framing") as Fra...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/968b1d891807ca5d6b0abb9089cddb128807a775
nodeEditor/src/components/preview/previewManager.ts
this._globalState.onLightUpdated.remove(this._onLightUpdatedObserver);
<mask> this._globalState.onPreviewBackgroundChanged.remove(this._onPreviewBackgroundChangedObserver); <mask> this._globalState.onBackFaceCullingChanged.remove(this._onBackFaceCullingChangedObserver); <mask> <mask> if (this._material) { <mask> this._material.dispose(); <mask> ...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/968b1d891807ca5d6b0abb9089cddb128807a775
nodeEditor/src/components/preview/previewManager.ts
<mask> for (var mesh of this._meshes) { <mask> mesh.dispose(); <mask> } <mask> <mask> if (this._light) { <mask> this._light.dispose(); <mask> } <mask> <mask> this._scene.dispose(); <mask> this._engine.dispose(); <mask> } <mask> } ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/968b1d891807ca5d6b0abb9089cddb128807a775
nodeEditor/src/components/preview/previewManager.ts
onLightUpdated = new Observable<void>();
<mask> onErrorMessageDialogRequiredObservable = new Observable<string>(); <mask> onPreviewCommandActivated = new Observable<void>(); <mask> onPreviewBackgroundChanged = new Observable<void>(); <mask> onBackFaceCullingChanged = new Observable<void>(); <mask> onAnimationCommandActivated = new Obs...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/968b1d891807ca5d6b0abb9089cddb128807a775
nodeEditor/src/globalState.ts
hemisphericLight: boolean; directionalLight0: boolean;
<mask> rotatePreview: boolean; <mask> backgroundColor: Color4; <mask> backFaceCulling: boolean; <mask> blockKeyboardEvents = false; <mask> <mask> customSave?: {label: string, action: (data: string) => Promise<void>}; <mask> <mask> public constructor() { <mask> this.preview...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/968b1d891807ca5d6b0abb9089cddb128807a775
nodeEditor/src/globalState.ts
this.hemisphericLight = DataStorage.ReadBoolean("HemisphericLight", true); this.directionalLight0 = DataStorage.ReadBoolean("DirectionalLight0", true);
<mask> this.previewMeshType = DataStorage.ReadNumber("PreviewMeshType", PreviewMeshType.Box); <mask> this.backFaceCulling = DataStorage.ReadBoolean("BackFaceCulling", true); <mask> <mask> let r = DataStorage.ReadNumber("BackgroundColorR", 0.37); <mask> let g = DataStorage.ReadNumbe...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/968b1d891807ca5d6b0abb9089cddb128807a775
nodeEditor/src/globalState.ts
this.registerInput("glossiness", NodeMaterialBlockConnectionPointTypes.Float, true, NodeMaterialBlockTargets.Fragment);
<mask> this.registerInput("worldPosition", NodeMaterialBlockConnectionPointTypes.Vector4, false, NodeMaterialBlockTargets.Vertex); <mask> this.registerInput("worldNormal", NodeMaterialBlockConnectionPointTypes.Vector4, false, NodeMaterialBlockTargets.Fragment); <mask> this.registerInput("came...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/968b1d891807ca5d6b0abb9089cddb128807a775
src/Materials/Node/Blocks/Dual/lightBlock.ts
/** * Gets the glossiness component */ public get glossiness(): NodeMaterialConnectionPoint { return this._inputs[3]; }
<mask> return this._inputs[2]; <mask> } <mask> <mask> /** <mask> * Gets the diffuse output component <mask> */ <mask> public get diffuseOutput(): NodeMaterialConnectionPoint { <mask> return this._outputs[0]; </s> Few fixes for nme #6012 Former-commit-id: e2950af1ccd5f47...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/968b1d891807ca5d6b0abb9089cddb128807a775
src/Materials/Node/Blocks/Dual/lightBlock.ts
state.compilationString += `float glossiness = ${this.glossiness.isConnected ? this.glossiness.associatedVariableName : "64.0"};\r\n`;
<mask> state.compilationString += `vec3 viewDirectionW = normalize(${this.cameraPosition.associatedVariableName} - ${"v_" + worldPos.associatedVariableName}.xyz);\r\n`; <mask> } <mask> state.compilationString += `lightingInfo info;\r\n`; <mask> state.compilationSt...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/968b1d891807ca5d6b0abb9089cddb128807a775
src/Materials/Node/Blocks/Dual/lightBlock.ts
function DynamicTexture(name, options, scene, generateMipMaps, samplingMode) { if (typeof samplingMode === "undefined") { samplingMode = BABYLON.Texture.TRILINEAR_SAMPLINGMODE; }
<mask> var BABYLON; <mask> (function (BABYLON) { <mask> var DynamicTexture = (function (_super) { <mask> __extends(DynamicTexture, _super); <mask> function DynamicTexture(name, options, scene, generateMipMaps) { <mask> _super.call(this, null, scene, !generateMipMaps); <mask> <ma...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9767ac43b76a388d23dad7df0fb39f04aabf6bb1
Babylon/Materials/textures/babylon.dynamicTexture.js
this._texture = scene.getEngine().createDynamicTexture(options.width, options.height, generateMipMaps, samplingMode);
<mask> this._generateMipMaps = generateMipMaps; <mask> <mask> if (options.getContext) { <mask> this._canvas = options; <mask> this._texture = scene.getEngine().createDynamicTexture(options.width, options.height, generateMipMaps); <mask> } else {...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9767ac43b76a388d23dad7df0fb39f04aabf6bb1
Babylon/Materials/textures/babylon.dynamicTexture.js
this._texture = scene.getEngine().createDynamicTexture(options.width, options.height, generateMipMaps, samplingMode);
<mask> } else { <mask> this._canvas = document.createElement("canvas"); <mask> <mask> if (options.width) { <mask> this._texture = scene.getEngine().createDynamicTexture(options.width, options.height, generateMipMaps); <mask> } else {...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9767ac43b76a388d23dad7df0fb39f04aabf6bb1
Babylon/Materials/textures/babylon.dynamicTexture.js
this._texture = scene.getEngine().createDynamicTexture(options, options, generateMipMaps, samplingMode);
<mask> <mask> if (options.width) { <mask> this._texture = scene.getEngine().createDynamicTexture(options.width, options.height, generateMipMaps); <mask> } else { <mask> this._texture = scene.getEngine().createDynamicTexture(options, options, ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9767ac43b76a388d23dad7df0fb39f04aabf6bb1
Babylon/Materials/textures/babylon.dynamicTexture.js
constructor(name: string, options: any, scene: Scene, generateMipMaps: boolean, samplingMode: number = Texture.TRILINEAR_SAMPLINGMODE) {
<mask> private _generateMipMaps: boolean; <mask> private _canvas: HTMLCanvasElement; <mask> private _context: CanvasRenderingContext2D; <mask> <mask> constructor(name, options, scene, generateMipMaps) { <mask> super(null, scene, !generateMipMaps); <mask> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9767ac43b76a388d23dad7df0fb39f04aabf6bb1
Babylon/Materials/textures/babylon.dynamicTexture.ts
this._texture = scene.getEngine().createDynamicTexture(options.width, options.height, generateMipMaps, samplingMode);
<mask> this._generateMipMaps = generateMipMaps; <mask> <mask> if (options.getContext) { <mask> this._canvas = options; <mask> this._texture = scene.getEngine().createDynamicTexture(options.width, options.height, generateMipMaps); <mask> } else {...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9767ac43b76a388d23dad7df0fb39f04aabf6bb1
Babylon/Materials/textures/babylon.dynamicTexture.ts
this._texture = scene.getEngine().createDynamicTexture(options.width, options.height, generateMipMaps, samplingMode);
<mask> } else { <mask> this._canvas = document.createElement("canvas"); <mask> <mask> if (options.width) { <mask> this._texture = scene.getEngine().createDynamicTexture(options.width, options.height, generateMipMaps); <mask> } else {...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9767ac43b76a388d23dad7df0fb39f04aabf6bb1
Babylon/Materials/textures/babylon.dynamicTexture.ts
this._texture = scene.getEngine().createDynamicTexture(options, options, generateMipMaps, samplingMode);
<mask> <mask> if (options.width) { <mask> this._texture = scene.getEngine().createDynamicTexture(options.width, options.height, generateMipMaps); <mask> } else { <mask> this._texture = scene.getEngine().createDynamicTexture(options, options, ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9767ac43b76a388d23dad7df0fb39f04aabf6bb1
Babylon/Materials/textures/babylon.dynamicTexture.ts
function Texture(url, scene, noMipmap, invertY, samplingMode) { if (typeof samplingMode === "undefined") { samplingMode = Texture.TRILINEAR_SAMPLINGMODE; }
<mask> var BABYLON; <mask> (function (BABYLON) { <mask> var Texture = (function (_super) { <mask> __extends(Texture, _super); <mask> function Texture(url, scene, noMipmap, invertY) { <mask> _super.call(this, scene); <mask> this.uOffset = 0; <mask> this.vOf...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9767ac43b76a388d23dad7df0fb39f04aabf6bb1
Babylon/Materials/textures/babylon.texture.js
this._samplingMode = samplingMode;
<mask> this._noMipmap = noMipmap; <mask> this._invertY = invertY; <mask> <mask> if (!url) { <mask> return; <mask> } </s> Fixing nearest filter Former-commit-id: b6e150aeabe99ad36e64c9c09ad1087207183b93 </s> remove constructor(url: string,...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9767ac43b76a388d23dad7df0fb39f04aabf6bb1
Babylon/Materials/textures/babylon.texture.js
this._texture = scene.getEngine().createTexture(url, noMipmap, invertY, scene, this._samplingMode);
<mask> this._texture = this._getFromCache(url, noMipmap); <mask> <mask> if (!this._texture) { <mask> if (!scene.useDelayedTextureLoading) { <mask> this._texture = scene.getEngine().createTexture(url, noMipmap, invertY, scene); <mask> } e...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9767ac43b76a388d23dad7df0fb39f04aabf6bb1
Babylon/Materials/textures/babylon.texture.js
this._texture = this.getScene().getEngine().createTexture(this.url, this._noMipmap, this._invertY, this.getScene(), this._samplingMode);
<mask> this.delayLoadState = BABYLON.Engine.DELAYLOADSTATE_LOADED; <mask> this._texture = this._getFromCache(this.url, this._noMipmap); <mask> <mask> if (!this._texture) { <mask> this._texture = this.getScene().getEngine().createTexture(this.url, this._noMipmap,...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9767ac43b76a388d23dad7df0fb39f04aabf6bb1
Babylon/Materials/textures/babylon.texture.js
<mask> t.y += 0.5; <mask> t.z += 0.5; <mask> }; <mask> <mask> Texture.prototype.forceSamplingMode = function (mode) { <mask> this.getScene().getEngine().setSamplingMode(this._texture, mode); <mask> }; <mask> <mask> Texture.prototype.getTextu...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9767ac43b76a388d23dad7df0fb39f04aabf6bb1
Babylon/Materials/textures/babylon.texture.js
private _samplingMode: number;
<mask> private _cachedUAng: number; <mask> private _cachedVAng: number; <mask> private _cachedWAng: number; <mask> private _cachedCoordinatesMode: number; <mask> <mask> constructor(url: string, scene: Scene, noMipmap?: boolean, invertY?: boolean, samplingMode: number = Tex...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9767ac43b76a388d23dad7df0fb39f04aabf6bb1
Babylon/Materials/textures/babylon.texture.ts
constructor(url: string, scene: Scene, noMipmap?: boolean, invertY?: boolean, samplingMode: number = Texture.TRILINEAR_SAMPLINGMODE) {
<mask> private _cachedVAng: number; <mask> private _cachedWAng: number; <mask> private _cachedCoordinatesMode: number; <mask> <mask> constructor(url: string, scene: Scene, noMipmap?: boolean, invertY?: boolean) { <mask> super(scene); <mask> <mask> this.n...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9767ac43b76a388d23dad7df0fb39f04aabf6bb1
Babylon/Materials/textures/babylon.texture.ts
this._samplingMode = samplingMode;
<mask> this._noMipmap = noMipmap; <mask> this._invertY = invertY; <mask> <mask> if (!url) { <mask> return; <mask> } </s> Fixing nearest filter Former-commit-id: b6e150aeabe99ad36e64c9c09ad1087207183b93
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9767ac43b76a388d23dad7df0fb39f04aabf6bb1
Babylon/Materials/textures/babylon.texture.ts
this._texture = scene.getEngine().createTexture(url, noMipmap, invertY, scene, this._samplingMode);
<mask> this._texture = this._getFromCache(url, noMipmap); <mask> <mask> if (!this._texture) { <mask> if (!scene.useDelayedTextureLoading) { <mask> this._texture = scene.getEngine().createTexture(url, noMipmap, invertY, scene); <mask> } e...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9767ac43b76a388d23dad7df0fb39f04aabf6bb1
Babylon/Materials/textures/babylon.texture.ts
const entry: GPUBindGroupLayoutEntry = { binding: j, visibility, }; entries.push(entry);
<mask> } <mask> <mask> if (bindingDefinition.isSampler) { <mask> entry.sampler = { <mask> type: bindingDefinition.isComparisonSampler ? WebGPUConstants.SamplerBindingType.Comparison : WebGPUConstants.SamplerBindingType.Filtering <mask> ...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9777a68571d82ab084f429ee1cf98a6fd631beaf
src/Engines/WebGPU/webgpuCacheRenderPipeline.ts
entry.sampler = { type: bindingDefinition.isComparisonSampler ? WebGPUConstants.SamplerBindingType.Comparison : WebGPUConstants.SamplerBindingType.Filtering };
<mask> visibility = visibility | WebGPUConstants.ShaderStage.Fragment; <mask> } <mask> <mask> if (bindingDefinition.isSampler) { <mask> entries.push({ <mask> binding: j, <mask> visibility, <m...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9777a68571d82ab084f429ee1cf98a6fd631beaf
src/Engines/WebGPU/webgpuCacheRenderPipeline.ts
entry.texture = { sampleType: bindingDefinition.sampleType,
<mask> visibility, <mask> type: bindingDefinition.isComparisonSampler ? WebGPUConstants.BindingType.ComparisonSampler : WebGPUConstants.BindingType.Sampler <mask> }); <mask> } else if (bindingDefinition.isTexture) { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9777a68571d82ab084f429ee1cf98a6fd631beaf
src/Engines/WebGPU/webgpuCacheRenderPipeline.ts
multisampled: false, };
<mask> binding: j, <mask> visibility, <mask> type: WebGPUConstants.BindingType.SampledTexture, <mask> viewDimension: bindingDefinition.textureDimension, <mask> textureComponentType: bindingDefini...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9777a68571d82ab084f429ee1cf98a6fd631beaf
src/Engines/WebGPU/webgpuCacheRenderPipeline.ts
entry.buffer = { type: WebGPUConstants.BufferBindingType.Uniform, };
<mask> // storageTextureFormat?: GPUTextureFormat; <mask> // minBufferBindingSize?: number; <mask> }); <mask> } else { <mask> entries.push({ <mask> binding: j, <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9777a68571d82ab084f429ee1cf98a6fd631beaf
src/Engines/WebGPU/webgpuCacheRenderPipeline.ts
<mask> Sint = "sint", <mask> Uint = "uint" <mask> } <mask> <mask> // TODO WEBGPU to be removed <mask> export enum TextureComponentType { <mask> Float = "float", <mask> Sint = "sint", <mask> Uint = "uint", <mask> // Texture is used with comparison sampling only. <mask> DepthCompar...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9777a68571d82ab084f429ee1cf98a6fd631beaf
src/Engines/WebGPU/webgpuConstants.ts
<mask> ReadOnly = "read-only", <mask> WriteOnly = "write-only" <mask> } <mask> <mask> // TODO WEBGPU to be removed <mask> export enum BindingType { <mask> UniformBuffer = "uniform-buffer", <mask> StorageBuffer = "storage-buffer", <mask> ReadonlyStorageBuffer = "readonly-storage-buffer", <...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9777a68571d82ab084f429ee1cf98a6fd631beaf
src/Engines/WebGPU/webgpuConstants.ts
sampleType?: GPUTextureSampleType;
<mask> isSampler: boolean; <mask> isComparisonSampler?: boolean; <mask> <mask> isTexture: boolean; <mask> componentType?: GPUTextureComponentType; <mask> textureDimension?: GPUTextureViewDimension; <mask> } <mask> <mask> /** <mask> * @hidden </s> Remove warnings from Chrome Former-co...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9777a68571d82ab084f429ee1cf98a6fd631beaf
src/Engines/WebGPU/webgpuShaderProcessingContext.ts
sampleType: isComparisonSampler ? WebGPUConstants.TextureSampleType.Depth : componentType === 'u' ? WebGPUConstants.TextureSampleType.Uint : componentType === 'i' ? WebGPUConstants.TextureSampleType.Sint : WebG...
<mask> if (!webgpuProcessingContext.orderedUBOsAndSamplers[textureSetIndex][textureBindingIndex]) { <mask> webgpuProcessingContext.orderedUBOsAndSamplers[textureSetIndex][textureBindingIndex] = { <mask> isSampler: false, <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9777a68571d82ab084f429ee1cf98a6fd631beaf
src/Engines/WebGPU/webgpuShaderProcessors.ts
interface GPUBindGroupLayoutEntry {
<mask> } <mask> <mask> type GPUShaderStageFlags = number; <mask> <mask> interface GPUBindGroupLayoutEntry2 { <mask> binding: GPUIndex32; <mask> visibility: GPUShaderStageFlags; <mask> <mask> buffer?: GPUBufferBindingLayout; <mask> sampler?: GPUSamplerBindingLayout; </s> Remove warnings fro...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9777a68571d82ab084f429ee1cf98a6fd631beaf
src/LibDeclarations/webgpu.d.ts
minBindingSize?: GPUSize64; /* default=0 */
<mask> <mask> interface GPUBufferBindingLayout { <mask> type?: GPUBufferBindingType; /* default="uniform" */ <mask> hasDynamicOffset?: boolean; /* default=false */ <mask> minBindingSize?:GPUSize64; /* default=0 */ <mask> }; <mask> <mask> type GPUSamplerBindingType = "filtering" | "non-filtering" |...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9777a68571d82ab084f429ee1cf98a6fd631beaf
src/LibDeclarations/webgpu.d.ts
// TODO WEBGPU: below to be removed when GPURenderPipelineDescriptor2 implemented by Chrome
<mask> depth?: GPUIntegerCoordinate; /* default=1 */ <mask> } <mask> type GPUExtent3D = [GPUIntegerCoordinate, GPUIntegerCoordinate, GPUIntegerCoordinate] | GPUExtent3DDict; <mask> <mask> <mask> <mask> interface GPURenderPipelineDescriptor extends GPUPipelineDescriptorBase { <mask> vertexStage: GPUPr...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/9777a68571d82ab084f429ee1cf98a6fd631beaf
src/LibDeclarations/webgpu.d.ts
<mask> type GPUExtent3D = [GPUIntegerCoordinate, GPUIntegerCoordinate, GPUIntegerCoordinate] | GPUExtent3DDict; <mask> <mask> <mask> <mask> <mask> <mask> <mask> <mask> <mask> <mask> <mask> <mask> <mask> interface GPUBindGroupLayoutEntry { <mask> binding: GPUIndex32; <mask> visibility...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "re...
https://github.com/BabylonJS/Babylon.js/commit/9777a68571d82ab084f429ee1cf98a6fd631beaf
src/LibDeclarations/webgpu.d.ts
public static readonly GPUTextureUsage_COPY_SRC = 1; public static readonly GPUTextureUsage_COPY_DST = 2;
<mask> public static readonly GPUTextureAspect_depthOnly: GPUTextureAspect = "depth-only"; <mask> public static readonly GPUTextureAspect_stencilOnly: GPUTextureAspect = "stencil-only"; <mask> <mask> public static readonly GPUTextureUsage_NONE = 0; <mask> public static readonly GPUTextureUsage_TRA...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/97c3396fc6741760888732472ccf7d8814de67f2
src/Engines/WebGPU/webgpuConstants.ts
/** * Defines wether MSAA is enabled on the canvas. */ antialiasing?: boolean;
<mask> * Defines the requested Swap Chain Format. <mask> */ <mask> swapChainFormat?: GPUTextureFormat; <mask> } <mask> <mask> /** <mask> * The web GPU engine class provides support for WebGPU version of babylon.js. <mask> */ </s> Local Dev + MSAA !!! BOOM Former-commit-id: e1b3f398754641c5cd...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/97c3396fc6741760888732472ccf7d8814de67f2
src/Engines/webgpuEngine.ts
<mask> export class WebGPUEngine extends Engine { <mask> // Page Life cycle and constants <mask> private readonly _uploadEncoderDescriptor = { label: "upload" }; <mask> private readonly _renderEncoderDescriptor = { label: "render" }; <mask> private readonly _blitDescriptor = { label: "upload" }; <...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/97c3396fc6741760888732472ccf7d8814de67f2
src/Engines/webgpuEngine.ts
private readonly _defaultSampleCount = 4; // Only supported value for now.
<mask> private readonly _renderEncoderDescriptor = { label: "render" }; <mask> private readonly _blitDescriptor = { label: "upload" }; <mask> private readonly _clearDepthValue = 1; <mask> private readonly _clearStencilValue = 0; <mask> private readonly _defaultSampleCount = 1; <mask> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/97c3396fc6741760888732472ccf7d8814de67f2
src/Engines/webgpuEngine.ts
private _mainPassSampleCount: number;
<mask> private _context: GPUCanvasContext; <mask> private _swapChain: GPUSwapChain; <mask> <mask> // Some of the internal state might change during the render pass. <mask> // This happens mainly during clear for the state <mask> // And when the frame starts to swap the target texture from the...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/97c3396fc6741760888732472ccf7d8814de67f2
src/Engines/webgpuEngine.ts
<mask> // This happens mainly during clear for the state <mask> // And when the frame starts to swap the target texture from the swap chain <mask> private _mainTexture: GPUTexture; <mask> private _depthTexture: GPUTexture; <mask> private _mainTextureCopyView: GPUTextureCopyView; <mask> pri...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/97c3396fc6741760888732472ccf7d8814de67f2
src/Engines/webgpuEngine.ts
<mask> <mask> // Frame Life Cycle (recreated each frame) <mask> private _uploadEncoder: GPUCommandEncoder; <mask> private _renderEncoder: GPUCommandEncoder; <mask> private _blitEncoder: GPUCommandEncoder; <mask> <mask> private _commandBuffers: GPUCommandBuffer[] = [null as any, null as any]...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/97c3396fc6741760888732472ccf7d8814de67f2
src/Engines/webgpuEngine.ts
options.antialiasing = options.antialiasing === undefined ? true : options.antialiasing;
<mask> options.deviceDescriptor = options.deviceDescriptor || { }; <mask> options.swapChainFormat = options.swapChainFormat || WebGPUConstants.GPUTextureFormat_bgra8unorm; <mask> <mask> this._decodeEngine.getCaps().textureFloat = false; <mask> this._decodeEngine.getCaps().textureFl...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/97c3396fc6741760888732472ccf7d8814de67f2
src/Engines/webgpuEngine.ts
<mask> <mask> this._canvas = canvas; <mask> this._options = options; <mask> <mask> // TODO WEBGPU. RESIZE and SCALING. <mask> this._hardwareScalingLevel = 1; <mask> <mask> this._sharedInit(canvas, !!options.doNotHandleTouchAction, options.audioEngine); <mask> } <...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/97c3396fc6741760888732472ccf7d8814de67f2
src/Engines/webgpuEngine.ts
this._mainPassSampleCount = options.antialiasing ? this._defaultSampleCount : 1;
<mask> this._options = options; <mask> <mask> this._hardwareScalingLevel = 1; <mask> <mask> this._sharedInit(canvas, !!options.doNotHandleTouchAction, options.audioEngine); <mask> } <mask> </s> Local Dev + MSAA !!! BOOM Former-commit-id: e1b3f398754641c5cd225a52616a7cc2725302e0 ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/97c3396fc6741760888732472ccf7d8814de67f2
src/Engines/webgpuEngine.ts
public initAsync(shadercOptions: any = null): Promise<void> {
<mask> * Initializes the WebGPU context and dependencies. <mask> * @param shadercOptions Defines the ShaderC compiler options if necessary <mask> * @returns a promise notifying the readiness of the engine. <mask> */ <mask> public initEngineAsync(shadercOptions: any = null): Promise<void> { ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/97c3396fc6741760888732472ccf7d8814de67f2
src/Engines/webgpuEngine.ts
usage: WebGPUConstants.GPUTextureUsage_OUTPUT_ATTACHMENT | WebGPUConstants.GPUTextureUsage_COPY_SRC,
<mask> this._context = this._canvas.getContext('gpupresent') as unknown as GPUCanvasContext; <mask> this._swapChain = this._context.configureSwapChain({ <mask> device: this._device, <mask> format: this._options.swapChainFormat!, <mask> usage: WebGPUConstants.GPUT...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/97c3396fc6741760888732472ccf7d8814de67f2
src/Engines/webgpuEngine.ts
<mask> }); <mask> } <mask> <mask> // Set default values as WebGL with depth and stencil attachment for the broadest Compat. <mask> // TODO WEBGPU. Reinit on resize. <mask> private _initializeMainAttachments(): void { <mask> this._mainTextureExtends = { <mask> width: ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/97c3396fc6741760888732472ccf7d8814de67f2
src/Engines/webgpuEngine.ts
if (this._options.antialiasing) { const mainTextureDescriptor = { size: this._mainTextureExtends, arrayLayerCount: 1, mipLevelCount: 1, sampleCount: this._mainPassSampleCount, dimension: WebGPUConstants.GPUTextureD...
<mask> height: this.getRenderHeight(), <mask> depth: 1 <mask> }; <mask> <mask> const mainTextureDescriptor = { <mask> size: this._mainTextureExtends, <mask> arrayLayerCount: 1, <mask> mipLevelCount: 1, <mask> sampleCount: ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/97c3396fc6741760888732472ccf7d8814de67f2
src/Engines/webgpuEngine.ts
if (this._mainTexture) { this._mainTexture.destroy(); } this._mainTexture = this._device.createTexture(mainTextureDescriptor); this._mainColorAttachments = [{ attachment: this._mainTexture.createDefaultView(), loadValu...
<mask> format: WebGPUConstants.GPUTextureFormat_bgra8unorm, <mask> usage: WebGPUConstants.GPUTextureUsage_OUTPUT_ATTACHMENT | WebGPUConstants.GPUTextureUsage_TRANSFER_SRC, <mask> }; <mask> <mask> if (this._mainTexture) { <mask> this._mainTexture.destroy(); <ma...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/97c3396fc6741760888732472ccf7d8814de67f2
src/Engines/webgpuEngine.ts
<mask> <mask> if (this._mainTexture) { <mask> this._mainTexture.destroy(); <mask> } <mask> this._mainTexture = this._device.createTexture(mainTextureDescriptor); <mask> const mainTextureView = this._mainTexture.createDefaultView(); <mask> this._mainTextureCopy...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "k...
https://github.com/BabylonJS/Babylon.js/commit/97c3396fc6741760888732472ccf7d8814de67f2
src/Engines/webgpuEngine.ts