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 |
|---|---|---|---|---|
updateMouseIcon() {
let canvas = document.getElementById("workbench-canvas") as HTMLCanvasElement;
canvas.style.cursor = "move";
}
| <mask> }
<mask>
<mask> loadFromJson(serializationObject: any) {
<mask> this.globalState.onSelectionChangedObservable.notifyObservers(null);
<mask> this.globalState.guiTexture.parseContent(serializationObject);
<mask> this.loadToEditor();
<mask> }
<mask>
</s> hot key css wi... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/34d54a95ab5687605c5fd9039b5aa176bcfa88d2 | guiEditor/src/diagram/workbench.tsx |
const zoomFnScrollWheel = (p: PointerInfo, e: EventState) => {
| <mask> const wheelPrecisionFn = () => {
<mask> camera.wheelPrecision = (1 / camera.radius) * 1000;
<mask> };
<mask>
<mask> const zoomFn = (p: PointerInfo, e: EventState) => {
<mask> const delta = this.zoomWheel(p, e, camera);
<mask> this.zooming(delta,... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/34d54a95ab5687605c5fd9039b5aa176bcfa88d2 | guiEditor/src/diagram/workbench.tsx |
const zoomFnMouse = (p: PointerInfo, e: EventState) => {
const newPos = this.getPosition(scene, camera, plane);
const deltaVector = initialPos.subtract(newPos);
this.zooming(deltaVector.x > 0? -15: 15, scene, camera, plane, inertialPanning);
};
| <mask> const delta = this.zoomWheel(p, e, camera);
<mask> this.zooming(delta, scene, camera, plane, inertialPanning);
<mask> };
<mask>
<mask> const removeObservers = () => {
<mask> scene.onPointerObservable.removeCallback(panningFn);
<mask> scene.o... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/34d54a95ab5687605c5fd9039b5aa176bcfa88d2 | guiEditor/src/diagram/workbench.tsx |
scene.onPointerObservable.removeCallback(zoomFnMouse);
| <mask> const removeObservers = () => {
<mask> scene.onPointerObservable.removeCallback(panningFn);
<mask> };
<mask>
<mask> scene.onPointerObservable.add((p: PointerInfo, e: EventState) => {
<mask> removeObservers();
</s> hot key css with blakc bar
Former-commit-... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/34d54a95ab5687605c5fd9039b5aa176bcfa88d2 | guiEditor/src/diagram/workbench.tsx |
initialPos = this.getPosition(scene, camera, plane);
scene.onPointerObservable.add(zoomFnMouse, PointerEventTypes.POINTERMOVE);
| <mask> scene.onPointerObservable.add(panningFn, PointerEventTypes.POINTERMOVE);
<mask> this._panning = true;
<mask> }
<mask> else if (this._forceZooming) {
<mask> scene.onPointerObservable.add(zoomFn, PointerEventTypes.POINTERMOVE);
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/34d54a95ab5687605c5fd9039b5aa176bcfa88d2 | guiEditor/src/diagram/workbench.tsx |
scene.onKeyboardObservable.add((k: KeyboardInfo, e: KeyboardEventTypes) => {
switch (k.event.key) {
case "q": //select?
if (!this._forceSelecting)
this.globalState.onSelectionObservable.notifyObservers();
break;
... | <mask> this._panning = false;
<mask> removeObservers();
<mask> }, PointerEventTypes.POINTERUP);
<mask>
<mask> scene.onPointerObservable.add(zoomFn, PointerEventTypes.POINTERWHEEL);
<mask> scene.onBeforeRenderObservable.add(inertialPanningFn);
<mask> scene.... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/34d54a95ab5687605c5fd9039b5aa176bcfa88d2 | guiEditor/src/diagram/workbench.tsx |
<mask> padding: 0;
<mask> font: 14px "acumin-pro";
<mask> user-select: none;
<mask> overflow: hidden;
<mask> cursor: move;
<mask> background-image:
<mask> linear-gradient(to right, #4F4E4F 1px, transparent 1px),
<mask> linear-gradient(to bottom, #4F4E4F 1... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/34d54a95ab5687605c5fd9039b5aa176bcfa88d2 | guiEditor/src/diagram/workbenchCanvas.scss | |
.active {
| <mask> &:hover {
<mask> background-color: #666666;
<mask> }
<mask>
<mask> &:active {
<mask> transform-origin: center;
<mask> transform: scale(0.95);
<mask> }
<mask>
<mask> img {
</s> hot key css with blakc bar
Former-com... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/34d54a95ab5687605c5fd9039b5aa176bcfa88d2 | guiEditor/src/scss/commandBar.scss |
background-color: #666666;
| <mask> }
<mask>
<mask> &:active {
<mask> transform-origin: center;
<mask> transform: scale(0.95);
<mask> }
<mask>
<mask> img {
<mask> &.active {
<mask> filter: invert(100%);
</s> hot key css with blakc bar
Former... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/34d54a95ab5687605c5fd9039b5aa176bcfa88d2 | guiEditor/src/scss/commandBar.scss |
background-color: #666666;
| <mask> }
<mask>
<mask> img {
<mask> &.active {
<mask> filter: invert(100%);
<mask> }
<mask> }
<mask> }
<mask>
<mask> .command-dropdown-root {
</s> hot key css with blakc bar
Former-commit-id: 33f0279622fc432fa160a7374e5572e1c0ad85a0 ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/34d54a95ab5687605c5fd9039b5aa176bcfa88d2 | guiEditor/src/scss/commandBar.scss |
childImpostor.parent = mainImpostor;
| <mask> if (childImpostor.physicsBody) {
<mask> this.removePhysicsBody(childImpostor);
<mask> childImpostor.physicsBody = null;
<mask> }
<mask> (childImpostor as any).p... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/3633f1e43a5140f0e9e170f1cbae347c20829e85 | src/Physics/Plugins/babylon.cannonJSPlugin.ts |
public get parent(): PhysicsImpostor {
| <mask> public get physicsBody(): any {
<mask> return this._parent ? this._parent.physicsBody : this._physicsBody;
<mask> }
<mask>
<mask> public get parent() {
<mask> return this._parent;
<mask> }
<mask>
<mask> /**
<mask> * Set the phys... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/3633f1e43a5140f0e9e170f1cbae347c20829e85 | src/Physics/babylon.physicsImpostor.ts |
public set parent(value: PhysicsImpostor) {
this._parent = value;
}
| <mask> public get parent(): PhysicsImpostor {
<mask> return this._parent;
<mask> }
<mask>
<mask> /**
<mask> * Set the physics body. Used mainly by the physics engine/plugin
<mask> */
<mask> public set physicsBody(physicsBody: any) {
<mask> ... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/3633f1e43a5140f0e9e170f1cbae347c20829e85 | src/Physics/babylon.physicsImpostor.ts |
transaction.onabort = (event) => {
| <mask> // Open a transaction to the database
<mask> var transaction = this.db.transaction([targetStore], "readwrite");
<mask>
<mask> // the transaction could abort because of a QuotaExceededError error
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/3633f1e43a5140f0e9e170f1cbae347c20829e85 | src/Tools/babylon.database.ts |
this.hasReachedQuota = true;
| <mask> transaction.onabort = function (event) {
<mask> try {
<mask> //backwards compatibility with ts 1.0, srcElement doesn't have an "error" according to ts 1.3
<mask> if (event.srcEl... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/3633f1e43a5140f0e9e170f1cbae347c20829e85 | src/Tools/babylon.database.ts |
{
texture &&
<CheckBoxLineComponent
label="Disable multiplying by level"
propertyName="disableLevelMultiplication"
target={this.props.block}
... | <mask> <CheckBoxLineComponent label="Is in gamma space" propertyName="gammaSpace" target={texture} onValueChanged={() => {
<mask> this.props.globalState.onUpdateRequiredObservable.notifyObservers();
<mask> }}/>
<mask... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36d34d331a9e58bc99a91f5a7bf9bfa6ebaa0912 | nodeEditor/src/diagram/properties/texturePropertyTabComponent.tsx |
<mask> <GenericPropertyTabComponent globalState={this.props.globalState} block={this.props.block}/>
<mask> </div>
<mask> );
<mask> }
<mask> } </s> Allow skipping texture level multiplication for NodeMaterial's TextureBlock
Reference discussion: https://forum.babylonjs.com/t... | [
"keep",
"keep",
"keep",
"keep",
"replace"
] | https://github.com/BabylonJS/Babylon.js/commit/36d34d331a9e58bc99a91f5a7bf9bfa6ebaa0912 | nodeEditor/src/diagram/properties/texturePropertyTabComponent.tsx | |
/**
* Gets or sets a boolean indicating if multiplication of texture with level should be disabled
*/
public disableLevelMultiplication = false;
| <mask> */
<mask> public convertToLinearSpace = false;
<mask>
<mask> /**
<mask> * Create a new TextureBlock
<mask> * @param name defines the block name
<mask> */
</s> Allow skipping texture level multiplication for NodeMaterial's TextureBlock
Reference discussion: https://forum.baby... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36d34d331a9e58bc99a91f5a7bf9bfa6ebaa0912 | src/Materials/Node/Blocks/Dual/textureBlock.ts |
this.registerOutput("level", NodeMaterialBlockConnectionPointTypes.Float, NodeMaterialBlockTargets.Neutral);
| <mask> this.registerOutput("a", NodeMaterialBlockConnectionPointTypes.Float, NodeMaterialBlockTargets.Neutral);
<mask>
<mask> this._inputs[0].acceptedConnectionPointTypes.push(NodeMaterialBlockConnectionPointTypes.Vector3);
<mask> this._inputs[0].acceptedConnectionPointTypes.push(NodeMateri... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36d34d331a9e58bc99a91f5a7bf9bfa6ebaa0912 | src/Materials/Node/Blocks/Dual/textureBlock.ts |
/**
* Gets the level output component
*/
public get level(): NodeMaterialConnectionPoint {
return this._outputs[6];
}
| <mask> return this._outputs[5];
<mask> }
<mask>
<mask> public get target() {
<mask> if (this._fragmentOnly) {
<mask> return NodeMaterialBlockTargets.Fragment;
<mask> }
<mask>
</s> Allow skipping texture level multiplication for NodeMaterial's TextureBlock
Referenc... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36d34d331a9e58bc99a91f5a7bf9bfa6ebaa0912 | src/Materials/Node/Blocks/Dual/textureBlock.ts |
this.level.associatedVariableName = this._textureInfoName;
| <mask> this._transformedUVName = state._getFreeVariableName("transformedUV");
<mask> this._textureTransformName = state._getFreeVariableName("textureTransform");
<mask> this._textureInfoName = state._getFreeVariableName("textureInfoName");
<mask>
<mask> state._emitVaryingFromString... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36d34d331a9e58bc99a91f5a7bf9bfa6ebaa0912 | src/Materials/Node/Blocks/Dual/textureBlock.ts |
if (output.hasEndpoints && output.name !== "level") {
| <mask>
<mask> this._writeTextureRead(state, true);
<mask>
<mask> for (var output of this._outputs) {
<mask> if (output.hasEndpoints) {
<mask> this._writeOutput(state, output, output.name, true);
<mask> }
<mask> }
<mask> }
<mask>
</s> Allo... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36d34d331a9e58bc99a91f5a7bf9bfa6ebaa0912 | src/Materials/Node/Blocks/Dual/textureBlock.ts |
let complement = "";
| <mask> state.compilationString += `${this._declareOutput(output, state)} = ${this._tempTextureRead}.${swizzle};\r\n`;
<mask> this._generateConversionCode(state, output, swizzle);
<mask> return;
<mask> }
<mask>
<mask> if (!this.disableLevelMultiplication) {
<ma... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36d34d331a9e58bc99a91f5a7bf9bfa6ebaa0912 | src/Materials/Node/Blocks/Dual/textureBlock.ts |
<mask> this.invertY = serializationObject.invertY;
<mask> }
<mask> }
<mask>
<mask> _TypeStore.RegisteredTypes["BABYLON.PerturbNormalBlock"] = PerturbNormalBlock; </s> Allow skipping texture level multiplication for NodeMaterial's TextureBlock
Reference discussion: https://forum.babylonjs.com/t/nme-ma... | [
"keep",
"keep",
"keep",
"keep",
"replace"
] | https://github.com/BabylonJS/Babylon.js/commit/36d34d331a9e58bc99a91f5a7bf9bfa6ebaa0912 | src/Materials/Node/Blocks/Fragment/perturbNormalBlock.ts | |
<mask> #else
<mask> varying vec2 vBumpUV;
<mask> #endif
<mask> uniform sampler2D bumpSampler;
<mask>
<mask> vec3 perturbNormal(mat3 cotangentFrame, vec2 uv)
<mask> {
<mask> return perturbNormal(cotangentFrame, texture2D(bumpSampler, uv).xyz, vBumpInfos.y);
<mask> }
<mask> #endif
<mask>
<mask> #... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36d34d331a9e58bc99a91f5a7bf9bfa6ebaa0912 | src/Shaders/ShadersInclude/bumpFragmentFunctions.fx | |
import { IModelAnimation, AnimationState } from '../model/modelAnimation';
| <mask> import { SpotLight, MirrorTexture, Plane, ShadowGenerator, Texture, BackgroundMaterial, Observable, ShadowLight, CubeTexture, BouncingBehavior, FramingBehavior, Behavior, Light, Engine, Scene, AutoRotationBehavior, AbstractMesh, Quaternion, StandardMaterial, ArcRotateCamera, ImageProcessingConfiguration, Color3... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36d5ebef9c5aed3c1162526114d7f0fdd8ac3d9b | Viewer/src/viewer/defaultViewer.ts |
private _resumePlay: boolean;
| <mask> private _animationList: string[];
<mask> private _currentAnimation: IModelAnimation;
<mask> private _isAnimationPaused: boolean;
<mask>
<mask> private _handlePointerDown = (event: EventCallback) => {
<mask>
<mask> let pointerDown = <PointerEvent>event.event;
<mask> if (p... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36d5ebef9c5aed3c1162526114d7f0fdd8ac3d9b | Viewer/src/viewer/defaultViewer.ts |
case "progress-wrapper":
this._resumePlay = !this._isAnimationPaused;
if (this._resumePlay) {
this._togglePlayPause(true);
}
| <mask> var speed = element.dataset["value"];
<mask> if (speed)
<mask> this._updateAnimationSpeed(speed);
<mask> break;
<mask> case "progress-bar-container":
<mask> if (!this._currentAnimation) return;
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36d5ebef9c5aed3c1162526114d7f0fdd8ac3d9b | Viewer/src/viewer/defaultViewer.ts |
private _togglePlayPause = (noUiUpdate?: boolean) => {
| <mask>
<mask> /**
<mask> * Plays or Pauses animation
<mask> */
<mask> private _togglePlayPause = () => {
<mask> if (!this._currentAnimation) {
<mask> return;
<mask> }
<mask> if (this._isAnimationPaused) {
<mask> this._currentAnimation.restart(... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36d5ebef9c5aed3c1162526114d7f0fdd8ac3d9b | Viewer/src/viewer/defaultViewer.ts |
if (noUiUpdate) return;
| <mask> }
<mask>
<mask> this._isAnimationPaused = !this._isAnimationPaused;
<mask>
<mask> let navbar = this.templateManager.getTemplate('navBar');
<mask> if (!navbar) return;
<mask>
<mask> navbar.updateParams({
<mask> paused: this._isAnimationPaused,
</s> ... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36d5ebef9c5aed3c1162526114d7f0fdd8ac3d9b | Viewer/src/viewer/defaultViewer.ts |
private _oldIdleRotationValue: number;
| <mask> paused: this._isAnimationPaused,
<mask> });
<mask> }
<mask>
<mask> /**
<mask> * Control progress bar position based on animation current frame
<mask> */
<mask> private _updateProgressBar = () => {
<mask> let navbar = this.templateManager.getTemplate('na... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36d5ebef9c5aed3c1162526114d7f0fdd8ac3d9b | Viewer/src/viewer/defaultViewer.ts |
let navbar = this.templateManager.getTemplate('navBar');
if (!navbar) return;
var progressSlider = <HTMLInputElement>navbar.parent.querySelector("input.progress-wrapper");
if (progressSlider && this._currentAnimation) {
| <mask> /**
<mask> * Control progress bar position based on animation current frame
<mask> */
<mask> private _updateProgressBar = () => {
<mask> var progressWrapper = document.getElementById("progress-wrapper");
<mask> if (progressWrapper && this._currentAnimation) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36d5ebef9c5aed3c1162526114d7f0fdd8ac3d9b | Viewer/src/viewer/defaultViewer.ts |
var currentValue = progressSlider.valueAsNumber;
if (Math.abs(currentValue - progress) > 0.1) { // Only move if greater than a 1% change
progressSlider.value = '' + progress;
}
if (this._currentAnimation.state === AnimationState.PLAYING) {
... | <mask> private _updateProgressBar = () => {
<mask> var progressWrapper = document.getElementById("progress-wrapper");
<mask> if (progressWrapper && this._currentAnimation) {
<mask> const progress = this._currentAnimation.currentFrame / this._currentAnimation.frames * 100;
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36d5ebef9c5aed3c1162526114d7f0fdd8ac3d9b | Viewer/src/viewer/defaultViewer.ts |
paramsObject.selectedAnimation = (this._animationList.indexOf(label) + 1);
paramsObject.selectedAnimationName = label;
| <mask> this._currentAnimation = this.sceneManager.models[0].setCurrentAnimationByName(label);
<mask> }
<mask>
<mask> if (paramsObject) {
<mask> paramsObject.selectedAnimation = (this._animationList.indexOf(label) + 1)
<mask> } else {
<mask> navbar.upda... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36d5ebef9c5aed3c1162526114d7f0fdd8ac3d9b | Viewer/src/viewer/defaultViewer.ts |
selectedAnimationName: label
| <mask> paramsObject.selectedAnimationName = label;
<mask> } else {
<mask> navbar.updateParams({
<mask> selectedAnimation: (this._animationList.indexOf(label) + 1),
<mask> });
<mask> }
<mask>
<mask> this._updateAnimationSpeed("1.0", par... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36d5ebef9c5aed3c1162526114d7f0fdd8ac3d9b | Viewer/src/viewer/defaultViewer.ts |
import { Observable, Engine, Scene, ArcRotateCamera, Vector3, SceneLoader, AbstractMesh, Mesh, HemisphericLight } from 'babylonjs';
| <mask> import { TemplateManager } from './../templateManager';
<mask> import configurationLoader from './../configuration/loader';
<mask> import { Observable, Engine, Scene, ArcRotateCamera, Vector3, SceneLoader, Mesh, HemisphericLight } from 'babylonjs';
<mask> import { ViewerConfiguration } from '../configuration... | [
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36e7b378d66c4e1422b185a27f7cf8aa113b1abd | Viewer/src/viewer/viewer.ts |
}).then(() => {
return this.initEnvironment();
| <mask> return this.initCameras();
<mask> }).then(() => {
<mask> return this.initLights();
<mask> }).then(() => {
<mask> return this.loadModel();
<mask> }).then(() => {
<mask> return this;
</s> added environment setup and onModelLoaded
For... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36e7b378d66c4e1422b185a27f7cf8aa113b1abd | Viewer/src/viewer/viewer.ts |
var scale = Math.max(0.5, 1 / (window.devicePixelRatio || 2));
this.engine.setHardwareScalingLevel(scale);
| <mask> this.engine.resize();
<mask> });
<mask>
<mask> return Promise.resolve(this.engine);
<mask> }
<mask>
<mask> protected initScene(): Promise<Scene> {
<mask> this.scene = new Scene(this.engine);
</s> added environment setup and onModelLoaded
Former-commit-id: ... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36e7b378d66c4e1422b185a27f7cf8aa113b1abd | Viewer/src/viewer/viewer.ts |
this.engine.runRenderLoop(() => {
this.scene.render();
});
| <mask>
<mask> protected initScene(): Promise<Scene> {
<mask> this.scene = new Scene(this.engine);
<mask> return Promise.resolve(this.scene);
<mask> }
<mask>
<mask> protected abstract initCameras(): Promise<Scene>;
</s> added environment setup and onModelLoaded
Former-commit-id: 6... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36e7b378d66c4e1422b185a27f7cf8aa113b1abd | Viewer/src/viewer/viewer.ts |
protected onModelLoaded(meshes: Array<AbstractMesh>): Promise<Scene> {
console.log("model loaded");
return Promise.resolve(this.scene);
}
public abstract initEnvironment(): Promise<Scene>;
| <mask> protected abstract initLights(): Promise<Scene>;
<mask>
<mask> public abstract loadModel(model?: string): Promise<Scene>;
<mask>
<mask> } </s> added environment setup and onModelLoaded
Former-commit-id: 6e7d13002b53ddb042ac6d248842b9d8ba776f3b </s> remove import { Observable, Engine, Scene, ArcR... | [
"keep",
"keep",
"keep",
"add",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/36e7b378d66c4e1422b185a27f7cf8aa113b1abd | Viewer/src/viewer/viewer.ts |
detachControl: (element: Nullable<HTMLElement>) => void;
| <mask> camera: Nullable<TCamera>;
<mask> getClassName(): string;
<mask> getSimpleName(): string;
<mask> attachControl: (element: HTMLElement, noPreventDefault?: boolean) => void;
<mask> detachControl: (element: HTMLElement) => void;
<mask> checkInputs?: () => void;
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37ddac5d1ed6b4d0b39f3f4115ab85532224b1f8 | src/Cameras/babylon.cameraInputsManager.ts |
if (input === inputToRemove) {
| <mask>
<mask> public remove(inputToRemove: ICameraInput<TCamera>) {
<mask> for (var cam in this.attached) {
<mask> var input = this.attached[cam];
<mask> if (input === inputToRemove && this.attachedElement) {
<mask> input.detachControl(this.... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37ddac5d1ed6b4d0b39f3f4115ab85532224b1f8 | src/Cameras/babylon.cameraInputsManager.ts |
if (input.getClassName() === inputType) {
| <mask>
<mask> public removeByType(inputType: string) {
<mask> for (var cam in this.attached) {
<mask> var input = this.attached[cam];
<mask> if (input.getClassName() === inputType && this.attachedElement) {
<mask> input.detachControl(this.at... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37ddac5d1ed6b4d0b39f3f4115ab85532224b1f8 | src/Cameras/babylon.cameraInputsManager.ts |
/**
* Gets a boolean indicating if depth testing is enabled
* @param enable defines the state to set
*/
public getDepthBuffer(): boolean {
return this._depthCullingState.depthTest;
}
| <mask> public getZOffset(): number {
<mask> return this._depthCullingState.zOffset;
<mask> }
<mask>
<mask> /**
<mask> * Enable or disable depth buffering
<mask> * @param enable defines the state to set
<mask> */
</s> Add support for depth/stencil textures
Former-commit-id:... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/engine.ts |
* @param name The texture name
| <mask> * @param uniform The uniform to set
<mask> * @param texture The render target texture containing the depth stencil texture to apply
<mask> */
<mask> public setDepthStencilTexture(channel: number, uniform: Nullable<WebGLUniformLocation>, texture: Nullable<RenderTargetTexture>, name?: string... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/engine.ts |
public setDepthStencilTexture(channel: number, uniform: Nullable<WebGLUniformLocation>, texture: Nullable<RenderTargetTexture>, name?: string): void {
| <mask> * @param channel The texture channel
<mask> * @param uniform The uniform to set
<mask> * @param texture The render target texture containing the depth stencil texture to apply
<mask> */
<mask> public setDepthStencilTexture(channel: number, uniform: Nullable<WebGLUniformLocation>, tex... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/engine.ts |
this._setTexture(channel, null, undefined, undefined, name);
| <mask> this._boundUniforms[channel] = uniform;
<mask> }
<mask>
<mask> if (!texture || !texture.depthStencilTexture) {
<mask> this._setTexture(channel, null);
<mask> }
<mask> else {
<mask> this._setTexture(channel, texture, false, true);
<mask... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/engine.ts |
this._setTexture(channel, texture, false, true, name);
| <mask> if (!texture || !texture.depthStencilTexture) {
<mask> this._setTexture(channel, null);
<mask> }
<mask> else {
<mask> this._setTexture(channel, texture, false, true);
<mask> }
<mask> }
<mask>
<mask> /**
<mask> * Sets a texture to the... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/engine.ts |
supportDepthStencilTexture: false,
supportShadowSamplers: false,
| <mask> forceBitmapOverHTMLImageElement: false,
<mask> supportRenderAndCopyToLodForFloatTextures: false,
<mask> framebuffersHaveYTopToBottom: false,
<mask> };
<mask>
<mask> /**
<mask> * Returns a string describing the current engine
<mask> */
<mask> public get desc... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/thinEngine.ts |
ThinEngine.Features.supportDepthStencilTexture = this._webGLVersion !== 1;
ThinEngine.Features.supportShadowSamplers = this._webGLVersion !== 1;
| <mask> }
<mask>
<mask> ThinEngine.Features.supportRenderAndCopyToLodForFloatTextures = this._webGLVersion !== 1;
<mask>
<mask> // Ensures a consistent color space unpacking of textures cross browser.
<mask> this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL, this._g... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/thinEngine.ts |
protected _setTexture(channel: number, texture: Nullable<BaseTexture>, isPartOfTextureArray = false, depthStencilTexture = false, name = ""): boolean {
| <mask> }
<mask> return this._gl.REPEAT;
<mask> }
<mask>
<mask> protected _setTexture(channel: number, texture: Nullable<BaseTexture>, isPartOfTextureArray = false, depthStencilTexture = false): boolean {
<mask> // Not ready?
<mask> if (!texture) {
<mask> if (... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/thinEngine.ts |
declare type RenderTargetTexture = import("../Materials/Textures/renderTargetTexture").RenderTargetTexture;
| <mask>
<mask> declare type VideoTexture = import("../Materials/Textures/videoTexture").VideoTexture;
<mask>
<mask> // TODO WEBGPU remove when not needed anymore
<mask> function assert(condition: any, msg?: string): asserts condition {
<mask> if (!condition) {
</s> Add support for depth/stencil textures
F... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/webgpuEngine.ts |
ThinEngine.Features.supportDepthStencilTexture = true;
ThinEngine.Features.supportShadowSamplers = true;
| <mask> ThinEngine.Features.forceBitmapOverHTMLImageElement = true;
<mask> ThinEngine.Features.supportRenderAndCopyToLodForFloatTextures = false; // TODO WEBGPU should be true but needs RTT support first for env texture to be generated correctly with this flag on
<mask> ThinEngine.Features.fra... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/webgpuEngine.ts |
options.antialiasing = false; //options.antialiasing === undefined ? true : options.antialiasing;
| <mask> ThinEngine.Features.framebuffersHaveYTopToBottom = true;
<mask>
<mask> options.deviceDescriptor = options.deviceDescriptor || { };
<mask> options.swapChainFormat = options.swapChainFormat || WebGPUConstants.TextureFormat.BGRA8Unorm;
<mask> options.antialiasing = false;//opti... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/webgpuEngine.ts |
format: this._getDepthTextureFormat(),
| <mask> size: this._mainTextureExtends,
<mask> mipLevelCount: 1,
<mask> sampleCount: this._mainPassSampleCount,
<mask> dimension: WebGPUConstants.TextureDimension.E2d,
<mask> format: this.isStencilEnable ? WebGPUConstants.TextureFormat.Depth24PlusStencil8 ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/webgpuEngine.ts |
this.__colorWrite = true;
| <mask> this._alphaState.reset();
<mask> this._alphaMode = Constants.ALPHA_ADD;
<mask> this._alphaEquation = Constants.ALPHA_DISABLE;
<mask>
<mask> this._colorWrite = true;
<mask> this._colorWriteChanged = true;
<mask> }
<mask>
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/webgpuEngine.ts |
private _getDepthTextureFormat(): GPUTextureFormat {
return this.isStencilEnable ? WebGPUConstants.TextureFormat.Depth24PlusStencil8 : WebGPUConstants.TextureFormat.Depth32Float;
}
| <mask> // Textures
<mask> //------------------------------------------------------------------------------
<mask>
<mask> /** @hidden */
<mask> public _createHardwareTexture(): HardwareTextureWrapper {
<mask> return new WebGPUHardwareTexture();
<mask> }
<... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/webgpuEngine.ts |
this._setTexture(channel, texture, false, false, name);
}
protected _setTexture(channel: number, texture: Nullable<BaseTexture>, isPartOfTextureArray = false, depthStencilTexture = false, name = ""): boolean {
| <mask>
<mask> public setTexture(channel: number, _: Nullable<WebGLUniformLocation>, texture: Nullable<BaseTexture>, name: string): void {
<mask> if (this._currentEffect) {
<mask> const webgpuPipelineContext = this._currentEffect._pipelineContext as WebGPUPipelineContext;
<mask> ... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/webgpuEngine.ts |
return false;
}
// Video
if ((<VideoTexture>texture).video) {
this._activeChannel = channel;
(<VideoTexture>texture).update();
} else if (texture.delayLoadState === Constants.DELAYLOADSTATE_NOTLOADED) { // Delay load... | <mask> if (webgpuPipelineContext.samplers[name] && webgpuPipelineContext.samplers[name]!.texture) {
<mask> webgpuPipelineContext.bindGroups = null as any; // the bind groups need to be rebuilt (at least the bind group owning this texture, but it's easier to just have them all rebui... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/webgpuEngine.ts |
<mask> webgpuPipelineContext.samplers[name] = null;
<mask> return;
<mask> }
<mask>
<mask> const internalTexture = texture!.getInternalTexture();
<mask> if (internalTexture) {
<mask> internalTexture._cachedWrapU = texture.wrapU;
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/webgpuEngine.ts | |
}
| <mask>
<mask> this._setInternalTexture(name, internalTexture);
<mask>
<mask> return true;
<mask> }
<mask>
<mask> /** @hidden */
<mask> public _setAnisotropicLevel(target: number, internalTexture: InternalTexture, anisotropicFilteringLevel: number) {
</s> Add support for depth... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/webgpuEngine.ts |
return true;
}
/** @hidden */
public _setAnisotropicLevel(target: number, internalTexture: InternalTexture, anisotropicFilteringLevel: number) {
if (internalTexture.samplingMode !== Constants.TEXTURE_LINEAR_LINEAR_MIPNEAREST
&& internalTexture.samplingMode !== Constants.TE... | <mask> }
<mask>
<mask> this._setInternalTexture(name, internalTexture);
<mask>
<mask> // Video
<mask> if ((<VideoTexture>texture).video) {
<mask> this._activeChannel = channel;
<mask> (<VideoTexture>texture).update();
<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/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/webgpuEngine.ts |
texture._source === InternalTextureSource.Depth ? WebGPUConstants.TextureUsage.Sampled | WebGPUConstants.TextureUsage.OutputAttachment : -1;
| <mask> gpuTextureWrapper.format = this._getWebGPUTextureFormat(texture.type, texture.format);
<mask>
<mask> const textureUsages =
<mask> texture._source === InternalTextureSource.RenderTarget ? WebGPUConstants.TextureUsage.Sampled | WebGPUConstants.TextureUsage.OutputAttachment :
<mask... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/webgpuEngine.ts |
internalTexture.format = internalOptions.generateStencil && this.isStencilEnable ? Constants.TEXTUREFORMAT_DEPTH24_STENCIL8 : Constants.TEXTUREFORMAT_DEPTH32_FLOAT;
| <mask> generateStencil: false,
<mask> ...options
<mask> };
<mask>
<mask> internalTexture.format = internalOptions.generateStencil ? Constants.TEXTUREFORMAT_DEPTH24_STENCIL8 : Constants.TEXTUREFORMAT_DEPTH32_FLOAT;
<mask>
<mask> this._setupDepthStencilTexture(inte... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/webgpuEngine.ts |
const depthStencilTexture = internalTexture._depthStencilTexture;
const gpuDepthStencilTexture = depthStencilTexture?._hardwareTexture?.underlyingResource;
| <mask> private _createRenderPassForRenderTarget(internalTexture: InternalTexture, clearColor: Nullable<IColor4Like>, clearDepth: boolean, clearStencil: boolean = false): GPURenderPassEncoder {
<mask> const gpuTexture = (internalTexture._hardwareTexture as WebGPUHardwareTexture).underlyingResource!;
<mask... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/webgpuEngine.ts |
depthStencilAttachment: depthStencilTexture && gpuDepthStencilTexture ? {
attachment: (depthStencilTexture._hardwareTexture as WebGPUHardwareTexture).view!,
depthLoadValue: clearDepth && depthStencilTexture._generateDepthBuffer ? this._clearDepthValue : WebGPUConstants.Load... | <mask> attachment: colorTextureView,
<mask> loadValue: clearColor !== null ? clearColor : WebGPUConstants.LoadOp.Load,
<mask> storeOp: WebGPUConstants.StoreOp.Store
<mask> }],
<mask> depthStencilAttachment: (internalTexture._generateDepthBuffe... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/webgpuEngine.ts |
stencilLoadValue: clearStencil && depthStencilTexture._generateStencilBuffer ? this._clearStencilValue : WebGPUConstants.LoadOp.Load,
| <mask> depthStencilAttachment: (internalTexture._generateDepthBuffer || internalTexture._generateStencilBuffer) && depthTexture ? {
<mask> attachment: (internalTexture._depthStencilTexture?._hardwareTexture as WebGPUHardwareTexture).view!,
<mask> depthLoadValue: clearDepth... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/webgpuEngine.ts |
assert(this._currentRenderTarget === null || (this._currentRenderTarget !== null && texture === this._currentRenderTarget), "unBindFramebuffer - the texture we wan't to unbind is not the same than the currentRenderTarget! texture=" + texture + ", this._currentRenderTarget=" + this._currentRenderTarget);
| <mask> }
<mask>
<mask> public unBindFramebuffer(texture: InternalTexture, disableGenerateMipMaps = false, onBeforeUnbind?: () => void): void {
<mask> // TODO WEBGPU remove the assert debugging code
<mask> assert(texture === this._currentRenderTarget);
<mask>
<mask> this._current... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/webgpuEngine.ts |
depthCompare: this.getDepthBuffer() ? this._getCompareFunction(this.getDepthFunction()) : WebGPUConstants.CompareFunction.Always,
format: this._currentRenderTarget && this._currentRenderTarget._depthStencilTexture ? this._getWebGPUTextureFormat(-1, this._currentRenderTarget._depthStencilTexture... | <mask> };
<mask>
<mask> return {
<mask> depthWriteEnabled: this.getDepthWrite(),
<mask> depthCompare: this._getCompareFunction(this.getDepthFunction()),
<mask> format: this._currentRenderTarget && this._currentRenderTarget._depthStencilTexture ? this._getWebGPU... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Engines/webgpuEngine.ts |
import { ThinEngine } from '../../Engines/thinEngine';
| <mask> import { Observable } from '../../Misc/observable';
<mask> import { _DevTools } from '../../Misc/devTools';
<mask> import { EffectFallbacks } from '../../Materials/effectFallbacks';
<mask> import { RenderingManager } from '../../Rendering/renderingManager';
<mask>
<mask> const tmpMatrix = new Matrix(),
<... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Lights/Shadows/shadowGenerator.ts |
if (!ThinEngine.Features.supportShadowSamplers) {
| <mask> }
<mask>
<mask> // Weblg1 fallback for PCF.
<mask> if (value === ShadowGenerator.FILTER_PCF || value === ShadowGenerator.FILTER_PCSS) {
<mask> if (this._scene.getEngine().webGLVersion === 1) {
<mask> this.usePoissonSampling = true;
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Lights/Shadows/shadowGenerator.ts |
if (ThinEngine.Features.supportDepthStencilTexture) {
| <mask> this._initializeShadowMap();
<mask> }
<mask>
<mask> protected _createTargetRenderTexture(): void {
<mask> let engine = this._scene.getEngine();
<mask> if (engine.webGLVersion > 1) {
<mask> this._shadowMap = new RenderTargetTexture(this._light.name + "_shadowMap... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Lights/Shadows/shadowGenerator.ts |
this._engine.setDepthStencilTexture(this._samplers[channel], this._uniforms[channel], texture, channel);
| <mask> * @param channel Name of the sampler variable.
<mask> * @param texture Texture to set.
<mask> */
<mask> public setDepthStencilTexture(channel: string, texture: Nullable<RenderTargetTexture>): void {
<mask> this._engine.setDepthStencilTexture(this._samplers[channel], this._uniforms... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Materials/effect.ts |
#if defined(WEBGL2) || defined(WEBGPU)
| <mask> #ifdef NUM_SAMPLES
<mask> #if NUM_SAMPLES > 0
<mask>
<mask> #ifdef WEBGL2
<mask> // https://learnopengl.com/PBR/IBL/Specular-IBL
<mask> // Hammersley
<mask> float radicalInverse_VdC(uint bits)
<mask> {
<mask> bits = (bits << 16u) | (bits >> 16u);
</... | [
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Shaders/ShadersInclude/hdrFilteringFunctions.fx |
#if defined(WEBGL2) || defined(WEBGPU)
| <mask> float maxLevel = filteringInfo.y;
<mask> float dim0 = filteringInfo.x;
<mask> float omegaP = (4. * PI) / (6. * dim0 * dim0);
<mask>
<mask> #ifdef WEBGL2
<mask> for(uint i = 0u; i < NUM_SAMPLES; ++i)
<mask> #else
<mask> f... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Shaders/ShadersInclude/hdrFilteringFunctions.fx |
#if defined(WEBGL2) || defined(WEBGPU)
| <mask> float dim0 = filteringInfo.x;
<mask> float omegaP = (4. * PI) / (6. * dim0 * dim0);
<mask>
<mask> float weight = 0.;
<mask> #ifdef WEBGL2
<mask> for(uint i = 0u; i < NUM_SAMPLES; ++i)
<mask> #else
<mask> for(int i = 0; i... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Shaders/ShadersInclude/hdrFilteringFunctions.fx |
#if defined(WEBGL2) || defined(WEBGPU)
| <mask>
<mask> return esm;
<mask> }
<mask>
<mask> #ifdef WEBGL2
<mask> #define inline
<mask> float computeShadowCSM(float layer, vec4 vPositionFromLight, float depthMetric, highp sampler2DArray shadowSampler, float darkness, float frustumEdgeFalloff)
<mask> {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Shaders/ShadersInclude/shadowsFragmentFunctions.fx |
#if defined(WEBGL2) || defined(WEBGPU)
| <mask> return computeFallOff(esm, clipSpace.xy, frustumEdgeFalloff);
<mask> }
<mask> }
<mask>
<mask> #ifdef WEBGL2
<mask> #define GREATEST_LESS_THAN_ONE 0.99999994
<mask>
<mask> // Shadow PCF kernel size 1 with a single tap (lowest quality)
<mask> #define i... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Shaders/ShadersInclude/shadowsFragmentFunctions.fx |
//uvDepth.y = 1.0 - uvDepth.y;
| <mask> {
<mask> vec3 clipSpace = vPositionFromLight.xyz / vPositionFromLight.w;
<mask> vec3 uvDepth = vec3(0.5 * clipSpace.xyz + vec3(0.5));
<mask>
<mask> vec2 uv = uvDepth.xy * shadowMapSizeAndInverse.x; // uv in texel units
<mask> uv +... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/37df4171a3f5f7087abf8c01da0d73a3695cd059 | src/Shaders/ShadersInclude/shadowsFragmentFunctions.fx |
defines["LIGHT" + lightIndex] = false;
| <mask> var light = scene.lights[index];
<mask>
<mask> if (!light.isEnabled()) {
<mask> if (defines["LIGHT" + lightIndex] !== undefined) {
<mask> defines["LIGHT" + lightIndex] = undefined;
<mask> }
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/380d55b41d5f500d6471e7cba6c09b4982220bd6 | src/Materials/babylon.materialHelper.ts |
defines["LIGHT" + lightIndex] = false;
| <mask> }
<mask>
<mask> if (!light.canAffectMesh(mesh)) {
<mask> if (defines["LIGHT" + lightIndex] !== undefined) {
<mask> defines["LIGHT" + lightIndex] = undefined;
<mask> }
<mask> continue;
<mas... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/380d55b41d5f500d6471e7cba6c09b4982220bd6 | src/Materials/babylon.materialHelper.ts |
defines["LIGHT" + lightIndex] = false;
| <mask>
<mask> // Resetting all other lights if any
<mask> for (var index = scene.lights.length; index < maxSimultaneousLights; index++) {
<mask> if (defines["LIGHT" + lightIndex] !== undefined) {
<mask> defines["LIGHT" + lightIndex] = undefined;
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/380d55b41d5f500d6471e7cba6c09b4982220bd6 | src/Materials/babylon.materialHelper.ts |
import { ProceduralTexture } from '../Materials';
| <mask> import { Light } from "./light";
<mask> import { ShadowLight } from "./shadowLight";
<mask> import { Texture } from '../Materials/Textures/texture';
<mask>
<mask> Node.AddNodeConstructor("Light_Type_2", (name, scene) => {
<mask> return () => new SpotLight(name, Vector3.Zero(), Vector3.Zero(), 0, 0, sc... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/3831f6f14180d347cd3a274972e11db2a90c35fa | src/Lights/spotLight.ts |
if (SpotLight._IsProceduralTexture(this._projectionTexture)) {
this._projectionTexture.getEffect().executeWhenCompiled(() => {
this._markMeshesAsLightDirty();
});
}
else if (SpotLight._IsTexture(this._projectionTexture)) {
... | <mask> }
<mask> this._projectionTexture = value;
<mask> this._projectionTextureDirty = true;
<mask> if (this._projectionTexture && !this._projectionTexture.isReady()) {
<mask> let texture = this._projectionTexture as Texture;
<mask> if (texture.onLoadObserva... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/3831f6f14180d347cd3a274972e11db2a90c35fa | src/Lights/spotLight.ts |
private static _IsProceduralTexture(texture: BaseTexture): texture is ProceduralTexture {
return (texture as ProceduralTexture).onGeneratedObservable !== undefined;
}
private static _IsTexture(texture: BaseTexture): texture is Texture {
return (texture as Texture).onLoadObservable !== ... | <mask> }
<mask>
<mask> private _projectionTextureViewLightDirty = true;
<mask> private _projectionTextureProjectionLightDirty = true;
<mask> private _projectionTextureDirty = true;
<mask> private _projectionTextureViewTargetVector = Vector3.Zero();
<mask> private _projectionTextureViewLi... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/3831f6f14180d347cd3a274972e11db2a90c35fa | src/Lights/spotLight.ts |
module.exports = function (varName, moduleName, subModule, extendsRoot) { | <mask> var gutil = require('gulp-util');
<mask> var through = require('through2');
<mask>
<mask> module.exports = function (varName, moduleName, subModule) {
<mask> return through.obj(function (file, enc, cb) {
<mask>
<mask> var moduleExportsAddition =
<mask> `/// <reference types="bab... | [
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/395680965f3809a0cf13ca62ef65ffabee40c47d | Tools/Gulp/gulp-addDtsExport.js |
let exportText = "BABYLON";
if (subModule && !extendsRoot) {
exportText += '.' + varName;
}
| <mask> return through.obj(function (file, enc, cb) {
<mask>
<mask> var moduleExportsAddition =
<mask> `/// <reference types="babylonjs"/>
<mask>
<mask> declare module '${moduleName}' {
<mask> export = ${exportText};
</s> correctly handling export=
Former-commit-id: f20c63dd6650... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/395680965f3809a0cf13ca62ef65ffabee40c47d | Tools/Gulp/gulp-addDtsExport.js |
export = ${exportText}; | <mask> var moduleExportsAddition =
<mask> `/// <reference types="babylonjs"/>
<mask>
<mask> declare module '${moduleName}' {
<mask> export = ${(subModule ? 'BABYLON.' : '')}${varName};
<mask> }
<mask> `;
<mask>
<mask> //'export = ' + (subModule ? 'BABYLON.' : '') + varName +... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/395680965f3809a0cf13ca62ef65ffabee40c47d | Tools/Gulp/gulp-addDtsExport.js |
.pipe(addDtsExport(library.moduleDeclaration, library.moduleName, true, library.extendsRoot)) | <mask>
<mask> if (library.buildAsModule) {
<mask> var dts2 = tsProcess.dts
<mask> .pipe(concat(library.output))
<mask> .pipe(addDtsExport(library.moduleDeclaration, library.moduleName, true))
<mask> .pipe(rename({ extname: ".module.d.ts" }))
<m... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/395680965f3809a0cf13ca62ef65ffabee40c47d | Tools/Gulp/gulpfile.js |
this.unbindAllAttributes();
| <mask>
<mask> let attributesCount = effect.getAttributesCount();
<mask>
<mask> var offset = 0;
<mask> for (var index = 0; index < attributesCount; index++) {
<mask>
<mask> if (index < vertexDeclaration.length) {
<mask>
</s> Fixed vertexAtt... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/399156c264e255f1740c9254716473d8d1657592 | src/babylon.engine.ts |
this._gl.enableVertexAttribArray(order);
this._vertexAttribArraysEnabled[order] = true;
| <mask>
<mask> var order = effect.getAttributeLocation(index);
<mask>
<mask> if (order >= 0) {
<mask> if (!this._vertexAttribArraysEnabled[order]) {
<mask> this._gl.enableVertexAttribArray(order);
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/399156c264e255f1740c9254716473d8d1657592 | src/babylon.engine.ts |
<mask> this.vertexAttribPointer(vertexBuffer, order, vertexDeclaration[index], this._gl.FLOAT, false, vertexStrideSize, offset);
<mask> }
<mask>
<mask> offset += vertexDeclaration[index] * 4;
<mask>
<mask> } else {
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/399156c264e255f1740c9254716473d8d1657592 | src/babylon.engine.ts | |
this.unbindAllAttributes();
| <mask>
<mask> var attributes = effect.getAttributesNames();
<mask>
<mask> for (var index = 0; index < attributes.length; index++) {
<mask> var order = effect.getAttributeLocation(index);
<mask>
<mask> if (order >= 0) {
<mask> ... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/399156c264e255f1740c9254716473d8d1657592 | src/babylon.engine.ts |
<mask> if (order >= 0) {
<mask> var vertexBuffer = vertexBuffers[attributes[index]];
<mask>
<mask> if (!vertexBuffer) {
<mask> if (this._vertexAttribArraysEnabled[order]) {
<mask> this.... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/399156c264e255f1740c9254716473d8d1657592 | src/babylon.engine.ts | |
this._gl.enableVertexAttribArray(order);
this._vertexAttribArraysEnabled[order] = true;
| <mask> }
<mask> continue;
<mask> }
<mask>
<mask> if (!this._vertexAttribArraysEnabled[order]) {
<mask> this._gl.enableVertexAttribArray(order);
<mask> t... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/399156c264e255f1740c9254716473d8d1657592 | src/babylon.engine.ts |
if (this._vertexAttribArraysEnabled[i]) {
this._gl.disableVertexAttribArray(i);
this._vertexAttribArraysEnabled[i] = false;
}
| <mask> for (var i = 0, ul = this._vertexAttribArraysEnabled.length; i < ul; i++) {
<mask> if (i >= this._caps.maxVertexAttribs || !this._vertexAttribArraysEnabled[i]) {
<mask> continue;
<mask> }
<mask> this._gl.disableVertexAttribArray... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/399156c264e255f1740c9254716473d8d1657592 | src/babylon.engine.ts |
import { ICanvasGraphServiceSettings, IPerfMinMax, IGraphDrawableArea, IPerfMousePanningPosition, IPerfIndexBounds } from "./graphSupportingTypes";
| <mask> import { ICanvasGraphServiceSettings, IPerfMinMax, IGraphDrawableArea, IPerfMousePanningPosition } from "./graphSupportingTypes";
<mask> import { IPerfDataset, IPerfPoint } from "babylonjs/Misc/interfaces/iPerfViewer";
<mask> import { Scalar } from "babylonjs/Maths/math.scalar";
<mask>
<mask> const default... | [
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/39a4db0f8b7e6bc18cf59b97484cd1c46cc1d027 | inspector/src/components/graph/canvasGraphService.ts |
private _datasetBounds: Map<string, IPerfIndexBounds>;
| <mask> private _sizeOfWindow: number = 300;
<mask> private _ticks: number[];
<mask> private _panPosition: IPerfMousePanningPosition | null;
<mask> private _positions: Map<string, number>;
<mask> public readonly datasets: IPerfDataset[];
<mask>
<mask> /**
<mask> * Creates an instanc... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/39a4db0f8b7e6bc18cf59b97484cd1c46cc1d027 | inspector/src/components/graph/canvasGraphService.ts |
this._datasetBounds = new Map<string, IPerfIndexBounds>();
| <mask> this._height = canvas.height;
<mask> this._ticks = [];
<mask> this._panPosition = null;
<mask> this._positions = new Map<string, number>();
<mask>
<mask> this.datasets = settings.datasets;
<mask>
<mask> this._attachEventListeners(canvas);
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/39a4db0f8b7e6bc18cf59b97484cd1c46cc1d027 | inspector/src/components/graph/canvasGraphService.ts |
// First we must get the end positions of each dataset.
this.datasets.forEach((dataset: IPerfDataset) => {
| <mask>
<mask> // Get global min max of time axis (across all datasets).
<mask> const globalTimeMinMax = {min: Infinity, max: 0};
<mask>
<mask> // TODO: Perhaps see if i can reduce the number of allocations.
<mask> // Keep only visible and non empty datasets and get a certain wind... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/39a4db0f8b7e6bc18cf59b97484cd1c46cc1d027 | inspector/src/components/graph/canvasGraphService.ts |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.