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
<mask> } <mask> serializationObject.fov = camera.fov; <mask> serializationObject.minZ = camera.minZ; <mask> serializationObject.maxZ = camera.maxZ; <mask> serializationObject.speed = camera.speed; <mask> serializationObject.inertia = camera.inertia; <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a7ad3eaaae6d253c54b290dac53199221b7a19e0
babylon.2.1-alpha.debug.js
//setting the type if (camera instanceof BABYLON.FreeCamera) { serializationObject.type = "FreeCamera"; } else if (camera instanceof BABYLON.ArcRotateCamera) { serializationObject.type = "ArcRotateCamera"; } else if (camera instanceof BABYLON.Anagl...
<mask> serializationObject.minZ = camera.minZ; <mask> serializationObject.maxZ = camera.maxZ; <mask> serializationObject.speed = camera.speed; <mask> serializationObject.inertia = camera.inertia; <mask> serializationObject.checkCollisions = camera.checkCollisions; <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a7ad3eaaae6d253c54b290dac53199221b7a19e0
babylon.2.1-alpha.debug.js
serializationObject.cameras.push(serializeCamera(camera));
<mask> // Cameras <mask> serializationObject.cameras = []; <mask> for (index = 0; index < scene.cameras.length; index++) { <mask> var camera = scene.cameras[index]; <mask> if (camera instanceof BABYLON.FreeCamera) { <mask> ser...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a7ad3eaaae6d253c54b290dac53199221b7a19e0
babylon.2.1-alpha.debug.js
shadowGenerator.bias = parsedShadowGenerator.bias;
<mask> else if (parsedShadowGenerator.useBlurVarianceShadowMap) { <mask> shadowGenerator.useBlurVarianceShadowMap = true; <mask> } <mask> if (parsedShadowGenerator.bias) { <mask> shadowGenerator.setBias(parsedShadowGenerator.bias); <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a7ad3eaaae6d253c54b290dac53199221b7a19e0
babylon.2.1-alpha.debug.js
//# sourceMappingURL=babylon.audioEngine.js.mapvar BABYLON;
<mask> return AudioEngine; <mask> })(); <mask> BABYLON.AudioEngine = AudioEngine; <mask> })(BABYLON || (BABYLON = {})); <mask> //# sourceMappingURL=babylon.audioengine.js.mapvar BABYLON; <mask> (function (BABYLON) { <mask> var Sound = (function () { <mask> /** <mask> * Creat...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a7ad3eaaae6d253c54b290dac53199221b7a19e0
babylon.2.1-alpha.debug.js
button.style.height = "24px"; button.style.color = "#444444"; button.style.border = "1px solid white";
<mask> DebugLayer.prototype._generateButton = function (root, title, task, tag) { <mask> if (tag === void 0) { tag = null; } <mask> var button = document.createElement("button"); <mask> button.innerHTML = title; <mask> button.style.height = "20px"; <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a7ad3eaaae6d253c54b290dac53199221b7a19e0
babylon.2.1-alpha.debug.js
<mask> return LensRenderingPipeline; <mask> })(BABYLON.PostProcessRenderPipeline); <mask> BABYLON.LensRenderingPipeline = LensRenderingPipeline; <mask> })(BABYLON || (BABYLON = {})); <mask> //# sourceMappingURL=babylon.lensRenderingPipeline.js.map </s> Integrating latest PR Former-commit-id: 5eee...
[ "keep", "keep", "keep", "keep", "replace" ]
https://github.com/BabylonJS/Babylon.js/commit/a7ad3eaaae6d253c54b290dac53199221b7a19e0
babylon.2.1-alpha.debug.js
import { VRCameraMetrics } from '../../Cameras/VR/vrCameraMetrics';
<mask> import { SineEase, EasingFunction, CircleEase } from "../../Animations/easing"; <mask> import { Animation } from "../../Animations/animation"; <mask> <mask> import "../../Meshes/Builders/groundBuilder"; <mask> import "../../Meshes/Builders/torusBuilder"; <mask> import "../../Meshes/Builders/cylinderBuilde...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a82d46ba1ef157059a12b88a93a6f59245f2ee84
src/Cameras/VR/vrExperienceHelper.ts
/** * Distortion metrics for the fallback vrDeviceOrientationCamera (default: VRCameraMetrics.Default) */ vrDeviceOrientationCameraMetrics?: VRCameraMetrics;
<mask> */ <mask> floorMeshes?: Mesh[]; <mask> } <mask> <mask> class VRExperienceHelperGazer implements IDisposable { <mask> /** @hidden */ <mask> public _gazeTracker: Mesh; </s> expose metric param Former-commit-id: 45bdd6453aba2071997ffaa5db351a1201c68adb </s> remove this._vrDev...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a82d46ba1ef157059a12b88a93a6f59245f2ee84
src/Cameras/VR/vrExperienceHelper.ts
this._vrDeviceOrientationCamera = new VRDeviceOrientationFreeCamera("VRDeviceOrientationVRHelper", this._position, this._scene, true, webVROptions.vrDeviceOrientationCameraMetrics);
<mask> } <mask> <mask> // Create VR cameras <mask> if (webVROptions.createFallbackVRDeviceOrientationFreeCamera) { <mask> this._vrDeviceOrientationCamera = new VRDeviceOrientationFreeCamera("VRDeviceOrientationVRHelper", this._position, this._scene); <mask> this._v...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a82d46ba1ef157059a12b88a93a6f59245f2ee84
src/Cameras/VR/vrExperienceHelper.ts
notifiers: { activatePreviewCommand: true, callback: (scene, block) => { const sceneDepthBlock = block as SceneDepthBlock; let retVal = false; if (sceneDepthBlock.useNonLinearDepth) { sceneDepthBlock.storeCameraSpa...
<mask> /** <mask> * Defines if the depth renderer should be setup in non linear mode <mask> */ <mask> @editableInPropertyPage("Use non linear depth", PropertyTypeForEdition.Boolean, "ADVANCED", { <mask> notifiers: { activatePreviewCommand: true, callback: (scene) => scene.disableDepthRend...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9a53a8900233d1fdf3954df49aef68daa6e617d
packages/dev/core/src/Materials/Node/Blocks/Dual/sceneDepthBlock.ts
const depthRenderer = scene.enableDepthRenderer(undefined, this.useNonLinearDepth, this.force32itsFloat, undefined, this.storeCameraSpaceZ);
<mask> return NodeMaterialBlockTargets.Fragment; <mask> } <mask> <mask> private _getTexture(scene: Scene): BaseTexture { <mask> const depthRenderer = scene.enableDepthRenderer(undefined, this.useNonLinearDepth, this.force32itsFloat); <mask> <mask> return depthRenderer.getDepthMa...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9a53a8900233d1fdf3954df49aef68daa6e617d
packages/dev/core/src/Materials/Node/Blocks/Dual/sceneDepthBlock.ts
serializationObject.storeCameraSpaceZ = this.storeCameraSpaceZ;
<mask> const serializationObject = super.serialize(); <mask> <mask> serializationObject.useNonLinearDepth = this.useNonLinearDepth; <mask> serializationObject.force32itsFloat = this.force32itsFloat; <mask> <mask> return serializationObject; <mask> } <mask> </s> Add storeC...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9a53a8900233d1fdf3954df49aef68daa6e617d
packages/dev/core/src/Materials/Node/Blocks/Dual/sceneDepthBlock.ts
this.storeCameraSpaceZ = !!serializationObject.storeCameraSpaceZ;
<mask> <mask> this.useNonLinearDepth = serializationObject.useNonLinearDepth; <mask> this.force32itsFloat = serializationObject.force32itsFloat; <mask> } <mask> } <mask> </s> Add storeCameraSpaceZ property to SceneDepth block </s> remove this._depthRenderer[camera.id] = new DepthRen...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9a53a8900233d1fdf3954df49aef68daa6e617d
packages/dev/core/src/Materials/Node/Blocks/Dual/sceneDepthBlock.ts
callback?: (scene: Scene, block: NodeMaterialBlock) => void | boolean;
<mask> update?: boolean; <mask> /** the onPreviewCommandActivated observer of the preview manager should be triggered */ <mask> activatePreviewCommand?: boolean; <mask> /** a callback to trigger */ <mask> callback?: (scene: Scene, block: NodeMaterialBlock) => void; <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9a53a8900233d1fdf3954df49aef68daa6e617d
packages/dev/core/src/Materials/Node/nodeMaterialDecorator.ts
this.clearColor = new Color4(storeCameraSpaceZ ? 1e8 : 1.0, 0.0, 0.0, 1.0);
<mask> this.isPacked = type === Constants.TEXTURETYPE_UNSIGNED_BYTE; <mask> if (this.isPacked) { <mask> this.clearColor = new Color4(1.0, 1.0, 1.0, 1.0); <mask> } else { <mask> this.clearColor = new Color4(1.0, 0.0, 0.0, 1.0); <mask> } <mask> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9a53a8900233d1fdf3954df49aef68daa6e617d
packages/dev/core/src/Rendering/depthRenderer.ts
* @param storeCameraSpaceZ Defines whether the depth stored is the Z coordinate in camera space. If true, storeNonLinearDepth has no effect. (Default: false)
<mask> * @param camera The camera to create the depth renderer on (default: scene's active camera) <mask> * @param storeNonLinearDepth Defines whether the depth is stored linearly like in Babylon Shadows or directly like glFragCoord.z <mask> * @param force32bitsFloat Forces 32 bits float w...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9a53a8900233d1fdf3954df49aef68daa6e617d
packages/dev/core/src/Rendering/depthRendererSceneComponent.ts
enableDepthRenderer( camera?: Nullable<Camera>, storeNonLinearDepth?: boolean, force32bitsFloat?: boolean, samplingMode?: number, storeCameraSpaceZ?: boolean ): DepthRenderer;
<mask> * @param force32bitsFloat Forces 32 bits float when supported (else 16 bits float is prioritized over 32 bits float if supported) <mask> * @param samplingMode The sampling mode to be used with the render target (Linear, Nearest...) <mask> * @returns the created depth renderer <mask...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9a53a8900233d1fdf3954df49aef68daa6e617d
packages/dev/core/src/Rendering/depthRendererSceneComponent.ts
samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE, storeCameraSpaceZ: boolean = false
<mask> Scene.prototype.enableDepthRenderer = function ( <mask> camera?: Nullable<Camera>, <mask> storeNonLinearDepth = false, <mask> force32bitsFloat: boolean = false, <mask> samplingMode = Constants.TEXTURE_TRILINEAR_SAMPLINGMODE <mask> ): DepthRenderer { <mask> camera = camera || this.activ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9a53a8900233d1fdf3954df49aef68daa6e617d
packages/dev/core/src/Rendering/depthRendererSceneComponent.ts
this._depthRenderer[camera.id] = new DepthRenderer(this, textureType, camera, storeNonLinearDepth, samplingMode, storeCameraSpaceZ);
<mask> textureType = Constants.TEXTURETYPE_FLOAT; <mask> } else { <mask> textureType = Constants.TEXTURETYPE_UNSIGNED_BYTE; <mask> } <mask> this._depthRenderer[camera.id] = new DepthRenderer(this, textureType, camera, storeNonLinearDepth, samplingMode); <mask> }...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9a53a8900233d1fdf3954df49aef68daa6e617d
packages/dev/core/src/Rendering/depthRendererSceneComponent.ts
const rebuild = notifiers?.callback?.((this.props.stateManager.data as GlobalState).nodeMaterial.getScene(), this.props.nodeData.data as NodeMaterialBlock) ?? false; if (rebuild) { this.props.stateManager.onRebuildRequiredObservable.notifyObservers(true); }
<mask> if (notifiers?.activatePreviewCommand) { <mask> (this.props.stateManager.data as GlobalState).onPreviewCommandActivated.notifyObservers(true); <mask> } <mask> <mask> notifiers?.callback?.((this.props.stateManager.data as GlobalState).nodeMaterial.getScene(), this.props.n...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9a53a8900233d1fdf3954df49aef68daa6e617d
packages/tools/nodeEditor/src/graphSystem/properties/genericNodePropertyComponent.tsx
return;
<mask> * @param checked is true when Selector is checked <mask> */ <mask> public addSelector(label: string, func = () => {} , checked = false): void { <mask> if(this.type === "S") { <mask> return <mask> } <mask> switch(this.type) { <mask> case "C": ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9b36101ffb97d95c8ebf5a3fc79b69d558847e5
gui/src/2D/controls/selector.ts
return;
<mask> * @param onVal is the function used to format the value displayed, eg radians to degrees <mask> */ <mask> public addSlider(label: string, func = () => {}, unit: string = "Units", min: number = 0, max: number = 0, value: number = 0, onVal = (v:number)=>{return v | 0}): void { <mask> if(t...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9b36101ffb97d95c8ebf5a3fc79b69d558847e5
gui/src/2D/controls/selector.ts
return;
<mask> <mask> /** removes the selector/slider at the given position */ <mask> public removeSelector(selectorNb: number) { <mask> if(selectorNb < 0) { <mask> return <mask> } <mask> this._groupPanel.removeControl(this._selectors[selectorNb]); <mask> this._selec...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9b36101ffb97d95c8ebf5a3fc79b69d558847e5
gui/src/2D/controls/selector.ts
this._selectors.push(_selector);
<mask> _selector.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT; <mask> _selector.left = "4px"; <mask> _selector.children[0].name = text; <mask> this._groupPanel.addControl(_selector); <mask> this._selectors.push(_selector) <mask> <mask> if(this....
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9b36101ffb97d95c8ebf5a3fc79b69d558847e5
gui/src/2D/controls/selector.ts
constructor(public name: string, public groups: SelectorGroup[] = []) {
<mask> * Creates a new SelectorGroup <mask> * @param name of SelectionPanel <mask> * @param groups is an array of SelectionGroups <mask> */ <mask> constructor(public name: string, public groups?: SelectorGroup[]) { <mask> super(name); <mask> if (groups === void 0) { groups = n...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9b36101ffb97d95c8ebf5a3fc79b69d558847e5
gui/src/2D/controls/selector.ts
<mask> * @param groups is an array of SelectionGroups <mask> */ <mask> constructor(public name: string, public groups?: SelectorGroup[]) { <mask> super(name); <mask> if (groups === void 0) { groups = new Array() }; <mask> this._groups = groups; <mask> this.thickness = ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9b36101ffb97d95c8ebf5a3fc79b69d558847e5
gui/src/2D/controls/selector.ts
return;
<mask> <mask> /** Sets color of separator bar */ <mask> public set barColor(color: string) { <mask> if(this._barColor === color) { <mask> return <mask> } <mask> <mask> this._barColor = color; <mask> this._setBarColor(); <mask> } </s> missing ; s add...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9b36101ffb97d95c8ebf5a3fc79b69d558847e5
gui/src/2D/controls/selector.ts
return;
<mask> * @param groupNb is the position of the group in the list <mask> */ <mask> public removeGroup(groupNb: number): void { <mask> if(groupNb < 0 || groupNb >= this._groups.length) { <mask> return <mask> } <mask> var group = this._groups[groupNb]; <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9b36101ffb97d95c8ebf5a3fc79b69d558847e5
gui/src/2D/controls/selector.ts
return;
<mask> * @param selectorNb is optional and when present is the number of the selector within a group to relabel <mask> * */ <mask> public relabel(label: string, groupNb: number, selectorNb?: number): void { <mask> if(groupNb < 0 || groupNb >= this._groups.length) { <mask> return ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9b36101ffb97d95c8ebf5a3fc79b69d558847e5
gui/src/2D/controls/selector.ts
return;
<mask> (<TextBlock>group.group.children[0]).text = label; <mask> } <mask> else { <mask> if(selectorNb < 0 || selectorNb >= group.selectors.length) { <mask> return <mask> } <mask> if(group.type === "C" || group.type === "R") { <mask>...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9b36101ffb97d95c8ebf5a3fc79b69d558847e5
gui/src/2D/controls/selector.ts
return;
<mask> * @param selectorNB is the number of the selector within the group <mask> */ <mask> public removeFromGroupSelector(groupNb: number, selectorNb: number): void { <mask> if(groupNb < 0 || groupNb >= this._groups.length) { <mask> return <mask> } <mask> var gro...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9b36101ffb97d95c8ebf5a3fc79b69d558847e5
gui/src/2D/controls/selector.ts
return;
<mask> return <mask> } <mask> var group = this._groups[groupNb]; <mask> if(selectorNb < 0 || selectorNb >= group.selectors.length) { <mask> return <mask> } <mask> group.removeSelector(selectorNb); <mask> } <mask> <mask> /** For a given g...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9b36101ffb97d95c8ebf5a3fc79b69d558847e5
gui/src/2D/controls/selector.ts
return;
<mask> * @param checked is true when Selector is checked <mask> */ <mask> public addToGroupSelector(groupNb: number, label: string, func = () => {} , checked: boolean = false): void { <mask> if(groupNb < 0 || groupNb >= this._groups.length) { <mask> return <mask> } <mask...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9b36101ffb97d95c8ebf5a3fc79b69d558847e5
gui/src/2D/controls/selector.ts
return;
<mask> * @param onVal is the function used to format the value displayed, eg radians to degrees <mask> */ <mask> public addToGroupSlider(groupNb: number, label: string, func = () => {}, unit: string = "Units", min: number = 0, max: number = 0, value: number = 0, onVal = (v:number)=>{return v | 0}): voi...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/a9b36101ffb97d95c8ebf5a3fc79b69d558847e5
gui/src/2D/controls/selector.ts
<mask> } <mask> <mask> /** <mask> * Creates a new InstancedMesh from the current mesh. <mask> * - name (string) : the cloned mesh name <mask> * - newParent (optional Node) : the optional Node to parent the clone to. <mask> * - doNotCloneChildren (optional boolean, default `false`) : ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/Meshes/instancedMesh.ts
* @param name the cloned mesh name * @param newParent the optional Node to parent the clone to. * @param doNotCloneChildren if `true` the model children aren't cloned. * @param newSourceMesh if set this mesh will be used as the source mesh instead of ths instance's one * @returns the clone
<mask> * - newParent (optional Node) : the optional Node to parent the clone to. <mask> * - doNotCloneChildren (optional boolean, default `false`) : if `true` the model children aren't cloned. <mask> * <mask> * Returns the clone. <mask> * @param name <mask> * @param newParent <mask>...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/Meshes/instancedMesh.ts
public clone(name: string, newParent: Nullable<Node> = null, doNotCloneChildren?: boolean, newSourceMesh?: Mesh): InstancedMesh { const result = (newSourceMesh || this._sourceMesh).createInstance(name);
<mask> * @param name <mask> * @param newParent <mask> * @param doNotCloneChildren <mask> */ <mask> public clone(name: string, newParent: Nullable<Node> = null, doNotCloneChildren?: boolean): InstancedMesh { <mask> const result = this._sourceMesh.createInstance(name); <mask> <mas...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/Meshes/instancedMesh.ts
// instancedMesh should have a different sourced mesh if (child.getClassName() === "InstancedMesh" && instance.getClassName() === "Mesh") { (child as InstancedMesh).instantiateHierarchy( instance, { doNotInstant...
<mask> onNewNodeCreated(this, instance); <mask> } <mask> <mask> for (const child of this.getChildTransformNodes(true)) { <mask> child.instantiateHierarchy(instance, options, onNewNodeCreated); <mask> } <mask> <mask> return instance; <mask> } <mask>...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/Meshes/mesh.ts
import type { InstancedMesh } from "./Meshes/instancedMesh";
<mask> import type { Node } from "./node"; <mask> import type { Observer } from "./Misc/observable"; <mask> import type { ThinEngine } from "./Engines/thinEngine"; <mask> <mask> /** <mask> * Set of assets to keep when moving a scene into an asset container. <mask> */ </s> InstancedMesh should be cloned with ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/assetContainer.ts
const conversionMap: { [key: number]: number } = {};
<mask> nameFunction?: (sourceName: string) => string, <mask> cloneMaterials = false, <mask> options?: { doNotInstantiate?: boolean | ((node: TransformNode) => boolean); predicate?: (entity: any) => boolean } <mask> ): InstantiatedEntries { <mask> const convertionMap: { [key: num...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/assetContainer.ts
conversionMap[source.uniqueId] = clone.uniqueId;
<mask> localOptions.doNotInstantiate = (node) => !!(node as AbstractMesh).skeleton; <mask> } <mask> <mask> const onClone = (source: TransformNode, clone: TransformNode) => { <mask> convertionMap[source.uniqueId] = clone.uniqueId; <mask> storeMap[clone.uniqueId]...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/assetContainer.ts
conversionMap[oldTarget.uniqueId] = newTarget.uniqueId;
<mask> for (let index = 0; index < oldMorphTargetManager.numTargets; index++) { <mask> const oldTarget = oldMorphTargetManager.getTarget(index); <mask> const newTarget = clonedMesh.morphTargetManager.getTarget(index); <mask> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/assetContainer.ts
// check if there are instanced meshes in the array, to set their new source mesh const instancesExist = this.meshes.some((m) => m.getClassName() === "InstancedMesh"); const instanceSourceMap: TransformNode[] = [];
<mask> } <mask> } <mask> }); <mask> <mask> this.meshes.forEach((o) => { <mask> if (localOptions.predicate && !localOptions.predicate(o)) { <mask> return; <mask> } <mask> <mask> if (!o.parent) { <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/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/assetContainer.ts
const onNewCreated = (source: TransformNode, clone: TransformNode) => { onClone(source, clone);
<mask> if (!o.parent) { <mask> const newOne = o.instantiateHierarchy(null, localOptions, (source, clone) => { <mask> onClone(source, clone); <mask> <mask> if ((clone as any).material) { <mask> const mesh = clone as Abstra...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/assetContainer.ts
if ((clone as any).material) { const mesh = clone as AbstractMesh;
<mask> <mask> if ((clone as any).material) { <mask> const mesh = clone as AbstractMesh; <mask> <mask> if (mesh.material) { <mask> if (cloneMaterials) { <mask> const sourceMaterial = (...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/assetContainer.ts
if (mesh.material) { if (cloneMaterials) { const sourceMaterial = (source as AbstractMesh).material!;
<mask> if (mesh.material) { <mask> if (cloneMaterials) { <mask> const sourceMaterial = (source as AbstractMesh).material!; <mask> <mask> if (alreadySwappedMaterials.indexOf(sourceMaterial) === -1) {...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/assetContainer.ts
if (alreadySwappedMaterials.indexOf(sourceMaterial) === -1) { let swap = sourceMaterial.clone(nameFunction ? nameFunction(sourceMaterial.name) : "Clone of " + sourceMaterial.name)!; alreadySwappedMaterials.push(sourceMaterial); ...
<mask> alreadySwappedMaterials.push(sourceMaterial); <mask> convertionMap[sourceMaterial.uniqueId] = swap.uniqueId; <mask> storeMap[swap.uniqueId] = swap; <mask> <mask> i...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/assetContainer.ts
if (sourceMaterial.getClassName() === "MultiMaterial") { const multi = sourceMaterial as MultiMaterial;
<mask> <mask> if (sourceMaterial.getClassName() === "MultiMaterial") { <mask> const multi = sourceMaterial as MultiMaterial; <mask> <mask> for (const material of multi.subMaterials) { <mask> ...
[ "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/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/assetContainer.ts
for (const material of multi.subMaterials) { if (!material) { continue;
<mask> convertionMap[material.uniqueId] = swap.uniqueId; <mask> storeMap[swap.uniqueId] = swap; <mask> } <mask> <mask> multi.subMaterials = multi....
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/assetContainer.ts
swap = material.clone(nameFunction ? nameFunction(material.name) : "Clone of " + material.name)!; alreadySwappedMaterials.push(material); conversionMap[material.uniqueId] = swap.uniqueId; ...
<mask> if (!material) { <mask> continue; <mask> } <mask> } <mask> <mask> multi.subMaterials = multi.subMaterials.map((m) => m && storeMap...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/assetContainer.ts
multi.subMaterials = multi.subMaterials.map((m) => m && storeMap[conversionMap[m.uniqueId]]); } } if (mesh.getClassName() !== "InstancedMesh") { mesh.material = storeMap[conversi...
<mask> multi.subMaterials = multi.subMaterials.map((m) => m && storeMap[convertionMap[m.uniqueId]]); <mask> } <mask> } <mask> <mask> if (mesh.getClassName() !== "InstancedMes...
[ "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/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/assetContainer.ts
} } }; this.meshes.forEach((o, idx) => { if (localOptions.predicate && !localOptions.predicate(o)) { return; } if (!o.parent) { const isInstance = o.getClassName() === "InstancedMesh"; ...
<mask> } <mask> } <mask> } <mask> } <mask> }); <mask> <mask> if (newOne) { <mask> result.rootNodes.push(newOne); <mask> } <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/assetContainer.ts
if (instancesExist && newOne.getClassName() !== "InstancedMesh") { instanceSourceMap[idx] = newOne; }
<mask> : o.instantiateHierarchy(null, localOptions, onNewCreated); <mask> <mask> if (newOne) { <mask> result.rootNodes.push(newOne); <mask> } <mask> } <mask> }); <mask> <mask> this.skeletons.forEach((s) => { ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/assetContainer.ts
const copy = storeMap[conversionMap[m.uniqueId]] as Mesh;
<mask> const clone = s.clone(nameFunction ? nameFunction(s.name) : "Clone of " + s.name); <mask> <mask> for (const m of this.meshes) { <mask> if (m.skeleton === s && !m.isAnInstance) { <mask> const copy = storeMap[convertionMap[m.uniqueId]] as Mesh; <ma...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/assetContainer.ts
bone._linkedTransformNode = storeMap[conversionMap[bone._linkedTransformNode.uniqueId]];
<mask> <mask> // Check if bones are mesh linked <mask> for (const bone of clone.bones) { <mask> if (bone._linkedTransformNode) { <mask> bone._linkedTransformNode = storeMap[convertionMap[bone._linkedTransformNode.uniqueId]...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/assetContainer.ts
const newTarget = storeMap[conversionMap[oldTarget.uniqueId]];
<mask> return; <mask> } <mask> <mask> const clone = o.clone(nameFunction ? nameFunction(o.name) : "Clone of " + o.name, (oldTarget) => { <mask> const newTarget = storeMap[convertionMap[oldTarget.uniqueId]]; <mask> <mask> return newTarget |...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/assetContainer.ts
BabylonJS adds special naming to targets that are children of nodes. This name attempts to remove that special naming to get the parent nodes name in case the target can't be found in the node tree
<mask> let node = null; <mask> <mask> const targetProperty = target.animations.length ? target.animations[0].targetProperty : ""; <mask> /* <mask> BabylonJS adds special naming to targets that are children of nodes. <mask> This...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/assetContainer.ts
Ex: Torso_primitive0 likely points to a Mesh primitive. We take away primitive0 and are left with "Torso" which is the name of the primitive's parent. */
<mask> BabylonJS adds special naming to targets that are children of nodes. <mask> This name attempts to remove that special naming to get the parent nodes name in case the target <mask> can't be found in the node tree <mask> <mask> Ex: Torso_primiti...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aa95401d93c459636d30a148c03b6d469d5a6ff9
packages/dev/core/src/assetContainer.ts
engine.setAlphaTesting(options ? options.alphaTest : this.needAlphaTesting());
<mask> <mask> var alphaTestState = engine.getAlphaTesting(); <mask> var clipPlaneState = scene.clipPlane; <mask> <mask> if (options.alphaTest) { <mask> engine.setAlphaTesting(options ? options.alphaTest : this.needAlphaTesting()); <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aab89a00e06b4e6031a3b9e8cf77ff02c99e16f6
src/Materials/babylon.material.ts
engine.setAlphaTesting(alphaTestState);
<mask> else { <mask> setTimeout(checkReady, 16); <mask> } <mask> <mask> if (options.alphaTest) { <mask> engine.setAlphaTesting(alphaTestState); <mask> } <mask> <mask> if (options.clipPlane)...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aab89a00e06b4e6031a3b9e8cf77ff02c99e16f6
src/Materials/babylon.material.ts
private _buildAllowed = true;
<mask> private _imageProcessingEnabled: boolean = true; <mask> private _defaultPipelineTextureType: number; <mask> private _bloomScale: number = 0.6; <mask> <mask> /** <mask> * Specifies the size of the bloom blur kernel, relative to the final output size <mask> */ <mask> ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aab89a00e06b4e6031a3b9e8cf77ff02c99e16f6
src/PostProcess/RenderPipeline/Pipelines/babylon.defaultRenderingPipeline.ts
/** * Force the compilation of the entire pipeline. */ public prepare(): void { let previousState = this._buildAllowed; this._buildAllowed = true; this._buildPipeline(); this._buildAllowed = previousState; }
<mask> this._buildPipeline(); <mask> } <mask> <mask> private _buildPipeline() { <mask> if (!this._buildAllowed) { <mask> return; <mask> } <mask> <mask> var engine = this._scene.getEngine(); </s> fixed alphatest detection for for...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aab89a00e06b4e6031a3b9e8cf77ff02c99e16f6
src/PostProcess/RenderPipeline/Pipelines/babylon.defaultRenderingPipeline.ts
if (!this._buildAllowed) { return; }
<mask> } <mask> <mask> private _buildPipeline() { <mask> var engine = this._scene.getEngine(); <mask> <mask> this._disposePostProcesses(); <mask> this._reset(); <mask> </s> fixed alphatest detection for force compilation Former-commit-id: 9772de6c8fc6a5f...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/aab89a00e06b4e6031a3b9e8cf77ff02c99e16f6
src/PostProcess/RenderPipeline/Pipelines/babylon.defaultRenderingPipeline.ts
// recreate bloom and dispose old as this setting is not dynamic var oldBloom = this.bloom; this.bloom = new BloomEffect(this._scene, this.bloomScale, this.bloomKernel, this._defaultPipelineTextureType); for (var i = 0; i < this._cameras.length; i++) { ...
<mask> this._bloomScale = value; <mask> <mask> this._buildPipeline(); <mask> } <mask> <mask> @serialize() <mask> public get bloomScale(): number { </s> handle bloom disposal/state Former-commit-id: 95449961f10b89901bfd3a90305d8dacc3b8c577 </s> remove ...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ab90cf1202446d3d2a1bc49166aa6e2f30e69d25
src/PostProcess/RenderPipeline/Pipelines/babylon.defaultRenderingPipeline.ts
this.bloom = new BloomEffect(this._scene, this.bloomScale, this.bloomKernel, this._defaultPipelineTextureType, true);
<mask> this._sharpenEffect = new PostProcessRenderEffect(engine, this.SharpenPostProcessId, () => { return this.sharpen; }, true); <mask> <mask> this.depthOfField = new DepthOfFieldEffect(this._scene, null, this._depthOfFieldBlurLevel, this._defaultPipelineTextureType, true); <mask> ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ab90cf1202446d3d2a1bc49166aa6e2f30e69d25
src/PostProcess/RenderPipeline/Pipelines/babylon.defaultRenderingPipeline.ts
if(!this.bloom._isReady()){ this.bloom._updateEffects(); }
<mask> this._setAutoClearAndTextureSharing(this.depthOfField._depthOfFieldMerge); <mask> } <mask> <mask> if (this.bloomEnabled) { <mask> this.bloom = new BloomEffect(this._scene, this.bloomScale, this.bloomKernel); <mask> this.addEffect(this...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ab90cf1202446d3d2a1bc49166aa6e2f30e69d25
src/PostProcess/RenderPipeline/Pipelines/babylon.defaultRenderingPipeline.ts
if(this.bloom){ this.bloom.disposeEffects(camera); }
<mask> <mask> if(this.depthOfField){ <mask> this.depthOfField.disposeEffects(camera); <mask> } <mask> <mask> if(this.chromaticAberration){ <mask> this.chromaticAberration.dispose(camera); <mask>...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ab90cf1202446d3d2a1bc49166aa6e2f30e69d25
src/PostProcess/RenderPipeline/Pipelines/babylon.defaultRenderingPipeline.ts
(<any>this.bloom) = null;
<mask> if(disposeNonRecreated){ <mask> (<any>this.sharpen) = null; <mask> (<any>this.depthOfField) = null; <mask> (<any>this.chromaticAberration) = null; <mask> } <mask> } <mask> </s> handle bloom disposal/state Former-commit-id...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ab90cf1202446d3d2a1bc49166aa6e2f30e69d25
src/PostProcess/RenderPipeline/Pipelines/babylon.defaultRenderingPipeline.ts
private blurX:BlurPostProcess; private blurY:BlurPostProcess;
<mask> export class BloomEffect extends PostProcessRenderEffect{ <mask> private _effects: Array<PostProcess> = []; <mask> public _merge:DepthOfFieldMergePostProcess; <mask> <mask> /** <mask> * Creates a new instance of @see BloomEffect </s> handle bloom disposal/state Form...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ab90cf1202446d3d2a1bc49166aa6e2f30e69d25
src/PostProcess/babylon.bloomEffect.ts
this.blurX = new BlurPostProcess("horizontal blur", new Vector2(1.0, 0), 10.0, bloomScale, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, pipelineTextureType, undefined, blockCompilation); this.blurX.alwaysForcePOT = true; this.blurX.onActivateObservable.add(() => {...
<mask> super(scene.getEngine(), "depth of field", ()=>{ <mask> return this._effects; <mask> }, true); <mask> <mask> var blurX = new BlurPostProcess("horizontal blur", new Vector2(1.0, 0), 10.0, bloomScale, null, Texture.BILINEAR_SAMPLINGMODE, scene.g...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ab90cf1202446d3d2a1bc49166aa6e2f30e69d25
src/PostProcess/babylon.bloomEffect.ts
this.blurY = new BlurPostProcess("vertical blur", new Vector2(0, 1.0), 10.0, bloomScale, null, Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, pipelineTextureType, undefined, blockCompilation); this.blurY.alwaysForcePOT = true; this.blurY.autoClear = false; th...
<mask> let dw = blurX.width / scene.getEngine().getRenderWidth(true); <mask> blurX.kernel = bloomKernel * dw; <mask> }); <mask> <mask> var blurY = new BlurPostProcess("vertical blur", new Vector2(0, 1.0), 10.0, bloomScale, null, Texture.BILINEAR_SAMPLINGMODE...
[ "keep", "keep", "keep", "keep", "replace", "replace", "replace", "replace", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ab90cf1202446d3d2a1bc49166aa6e2f30e69d25
src/PostProcess/babylon.bloomEffect.ts
this._merge = new DepthOfFieldMergePostProcess("depthOfFieldMerge", {originalFromInput: this.blurX, bloom: {blurred: this.blurY, weight: 0}}, 1, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, pipelineTextureType, blockCompilation);
<mask> let dh = blurY.height / scene.getEngine().getRenderHeight(true); <mask> blurY.kernel = bloomKernel * dh; <mask> }); <mask> <mask> this._merge = new DepthOfFieldMergePostProcess("depthOfFieldMerge", {originalFromInput: blurX, bloom: {blurre...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ab90cf1202446d3d2a1bc49166aa6e2f30e69d25
src/PostProcess/babylon.bloomEffect.ts
this._effects = [this.blurX, this.blurY, this._merge] } /** * Disposes each of the internal effects for a given camera. * @param camera The camera to dispose the effect on. */ public disposeEffects(camera:Camera){ this.blurX.dispose(cam...
<mask> <mask> this._merge = new DepthOfFieldMergePostProcess("depthOfFieldMerge", {originalFromInput: blurX, bloom: {blurred: blurY, weight: 0}}, 1, null, BABYLON.Texture.BILINEAR_SAMPLINGMODE, scene.getEngine(), false, pipelineTextureType, blockCompilation); <mask> this._merge.a...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ab90cf1202446d3d2a1bc49166aa6e2f30e69d25
src/PostProcess/babylon.bloomEffect.ts
this.blockCompilation = false;
<mask> } <mask> <mask> super.updateEffect(defines, null, null, { <mask> varyingCount: varyingCount, <mask> depCount: depCount <mask> }, onCompiled, onError); <mask> } <mask> </s> handle bloom disposal/state Former-commit-id: 95449961f10b89901bfd3a90305d8dacc3b8c577 </s> re...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ab90cf1202446d3d2a1bc49166aa6e2f30e69d25
src/PostProcess/babylon.blurPostProcess.ts
/** @hidden */ public _initialSize: number;
<mask> public _initialDirection: Nullable<Vector3>; <mask> <mask> /** <mask> * Creates a new instance Particle <mask> * @param particleSystem the particle system the particle belongs to <mask> */ </s> Added particle size gradients Former-commit-id: 6aced62d809b2935d7...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ac6a829821eee6b3b91bd22018c74aba9ef5d43a
src/Particles/babylon.particle.ts
/** @hidden */ class FactorGradient implements IValueGradient { public gradient: number; public factor: number; }
<mask> public color: Color4; <mask> } <mask> <mask> /** <mask> * This represents a particle system in Babylon. <mask> * Particles are often small sprites used to simulate hard-to-reproduce phenomena like fire, smoke, water, or abstract visual effects like magic glitter and faery dust. ...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ac6a829821eee6b3b91bd22018c74aba9ef5d43a
src/Particles/babylon.particleSystem.ts
private _sizeGradients: Nullable<Array<FactorGradient>> = null;
<mask> <mask> private _colorGradients: Nullable<Array<ColorGradient>> = null; <mask> <mask> /** <mask> * Random direction of each particle after it has been emitted, between direction1 and direction2 vectors. <mask> * This only works when particleEmitterTyps is a BoxParticleEmit...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ac6a829821eee6b3b91bd22018c74aba9ef5d43a
src/Particles/babylon.particleSystem.ts
let ratio = particle.age / particle.lifeTime;
<mask> index--; <mask> continue; <mask> } <mask> else { <mask> if (this._colorGradients && this._colorGradients.length > 0) { <mask> let ratio = particle.age / particle.lifeT...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ac6a829821eee6b3b91bd22018c74aba9ef5d43a
src/Particles/babylon.particleSystem.ts
// Color if (this._colorGradients && this._colorGradients.length > 0) { this._getCurrentGradient(ratio, this._colorGradients, (currentGradient, nextGradient, scale) => { Color4.LerpToRef((<ColorGradient>curren...
<mask> else { <mask> if (this._colorGradients && this._colorGradients.length > 0) { <mask> let ratio = particle.age / particle.lifeTime; <mask> <mask> for (var gradientIndex = 0; gradientIndex < this._colorGradient...
[ "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/ac6a829821eee6b3b91bd22018c74aba9ef5d43a
src/Particles/babylon.particleSystem.ts
// Gradient if (this._sizeGradients && this._sizeGradients.length > 0) { this._getCurrentGradient(ratio, this._sizeGradients, (currentGradient, nextGradient, scale) => { particle.size = particle._initialSize *...
<mask> <mask> this.gravity.scaleToRef(this._scaledUpdateSpeed, this._scaledGravity); <mask> particle.direction.addInPlace(this._scaledGravity); <mask> <mask> if (this._isAnimationSheetEnabled) { <mask> particle.u...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ac6a829821eee6b3b91bd22018c74aba9ef5d43a
src/Particles/babylon.particleSystem.ts
particle._initialSize = particle.size;
<mask> <mask> particle.size = Scalar.RandomRange(this.minSize, this.maxSize); <mask> particle.scale.copyFromFloats(Scalar.RandomRange(this.minScaleX, this.maxScaleX), Scalar.RandomRange(this.minScaleY, this.maxScaleY)); <mask> particle.angularSpeed = Scalar.RandomRan...
[ "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ac6a829821eee6b3b91bd22018c74aba9ef5d43a
src/Particles/babylon.particleSystem.ts
private _disposeList: (Texture | DynamicTexture)[];
<mask> /** The Container array for the frames that are generated */ <mask> public frames: TexturePackerFrame[]; <mask> <mask> /** The List of textures to purge from memory after compilation */ <mask> private _disposeList: Texture[]; <mask> <mask> /** The padding value from Math.ceil(frameSi...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ad4ee81f88ba430cd1410c8561e56e8bc91bd1d7
src/Materials/Textures/Packer/packer.ts
let t: (Texture | DynamicTexture) = (mat as any)[index];
<mask> //Check Status of all Textures on all meshes, till they are ready. <mask> if (this.options.map) { <mask> for (let j = 0; j < this.options.map.length; j++) { <mask> let index: string = this.options.map[j]; <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ad4ee81f88ba430cd1410c8561e56e8bc91bd1d7
src/Materials/Textures/Packer/packer.ts
let setTexture = (mat as any)[setName]; let img = new Image(); if(setTexture instanceof DynamicTexture){ img.src = setTexture.getContext().canvas.toDataURL("image/png"); ...
<mask> <mask> updateDt(); <mask> <mask> }else { <mask> let img = new Image(); <mask> img.src = (mat as any)[setName]!.url; <mask> img.onload = () => { <mask> tcx.fillStyle = 'rgba(0,0,0,0)';...
[ "keep", "keep", "keep", "keep", "replace", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/ad4ee81f88ba430cd1410c8561e56e8bc91bd1d7
src/Materials/Textures/Packer/packer.ts
@instanceData() get superSampleFactor(): number { return null; }
<mask> get color(): Color4 { <mask> return null; <mask> } <mask> } <mask> <mask> @className("Text2D") <mask> /** <mask> * Primitive that render text using a specific font </s> FontTexture & Canvas2D Adding the superSample setting to FontTexture to double the store...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/adde3b37f0c7a9ec79bd84e109e5d868fdd8d4f4
src/Canvas2d/babylon.text2d.ts
this._fontTexture = FontTexture.GetCachedFontTexture(this.owner.scene, this.fontName, this._fontSuperSample);
<mask> if (this._fontTexture) { <mask> return this._fontTexture; <mask> } <mask> <mask> this._fontTexture = FontTexture.GetCachedFontTexture(this.owner.scene, this.fontName); <mask> return this._fontTexture; <mask> } <mask> <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/adde3b37f0c7a9ec79bd84e109e5d868fdd8d4f4
src/Canvas2d/babylon.text2d.ts
FontTexture.ReleaseCachedFontTexture(this.owner.scene, this.fontName, this._fontSuperSample);
<mask> return false; <mask> } <mask> <mask> if (this._fontTexture) { <mask> FontTexture.ReleaseCachedFontTexture(this.owner.scene, this.fontName); <mask> this._fontTexture = null; <mask> } <mask> <mask> return tru...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/adde3b37f0c7a9ec79bd84e109e5d868fdd8d4f4
src/Canvas2d/babylon.text2d.ts
* - fontSuperSample: if true the text will be rendered with a superSampled font (the font is twice the given size). Use this settings if the text lies in world space or if it's scaled in.
<mask> * - rotation: the initial rotation (in radian) of the primitive. default is 0 <mask> * - scale: the initial scale of the primitive. default is 1 <mask> * - origin: define the normalized origin point location, default [0.5;0.5] <mask> * - fontName: the name/size/style o...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/adde3b37f0c7a9ec79bd84e109e5d868fdd8d4f4
src/Canvas2d/babylon.text2d.ts
fontSuperSample ?: boolean,
<mask> rotation ?: number, <mask> scale ?: number, <mask> origin ?: Vector2, <mask> fontName ?: string, <mask> defaultFontColor ?: Color4, <mask> size ?: Size, <mask> tabulationSiz...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/adde3b37f0c7a9ec79bd84e109e5d868fdd8d4f4
src/Canvas2d/babylon.text2d.ts
this.fontName = (settings.fontName==null) ? "12pt Arial" : settings.fontName; this._fontSuperSample = (settings.fontSuperSample!=null && settings.fontSuperSample);
<mask> } <mask> <mask> super(settings); <mask> <mask> this.fontName = (settings.fontName==null) ? "12pt Arial" : settings.fontName; <mask> this.defaultFontColor = (settings.defaultFontColor==null) ? new Color4(1,1,1,1) : settings.defaultFont...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/adde3b37f0c7a9ec79bd84e109e5d868fdd8d4f4
src/Canvas2d/babylon.text2d.ts
let superSampleFactor = texture.isSuperSampled ? 0.5 : 1;
<mask> if (part.id === Text2D.TEXT2D_MAINPARTID) { <mask> let d = <Text2DInstanceData>part; <mask> let texture = this.fontTexture; <mask> let ts = texture.getSize(); <mask> let offset = Vector2.Zero(); <mask> let lh = this...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/adde3b37f0c7a9ec79bd84e109e5d868fdd8d4f4
src/Canvas2d/babylon.text2d.ts
d.superSampleFactor = superSampleFactor;
<mask> d.sizeUV = suv; <mask> d.textureSize = new Vector2(ts.width, ts.height); <mask> d.color = this.defaultFontColor; <mask> <mask> ++d.curElement; <mask> } <mask> } <mask> return true; </...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/adde3b37f0c7a9ec79bd84e109e5d868fdd8d4f4
src/Canvas2d/babylon.text2d.ts
private _fontSuperSample: boolean;
<mask> private _charCount: number; <mask> private _fontName: string; <mask> private _defaultFontColor: Color4; <mask> private _text: string; <mask> private _textSize: Size; <mask> } </s> FontTexture & Canvas2D Adding the superSample setting to FontTexture to double th...
[ "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/adde3b37f0c7a9ec79bd84e109e5d868fdd8d4f4
src/Canvas2d/babylon.text2d.ts
private _lineHeightSuper: number;
<mask> export class FontTexture extends Texture { <mask> private _canvas: HTMLCanvasElement; <mask> private _context: CanvasRenderingContext2D; <mask> private _lineHeight: number; <mask> private _offset: number; <mask> private _currentFreePosition: Vector2; <mask> ...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/adde3b37f0c7a9ec79bd84e109e5d868fdd8d4f4
src/Materials/Textures/babylon.fontTexture.ts
private _spaceWidthSuper;
<mask> private _charInfos: ICharInfoMap = {}; <mask> private _curCharCount = 0; <mask> private _lastUpdateCharCount = -1; <mask> private _spaceWidth; <mask> private _usedCounter = 1; <mask> private _superSample: boolean; <mask> <mask> public get isSuperSa...
[ "keep", "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/adde3b37f0c7a9ec79bd84e109e5d868fdd8d4f4
src/Materials/Textures/babylon.fontTexture.ts
private _superSample: boolean; public get isSuperSampled(): boolean { return this._superSample; }
<mask> private _spaceWidth; <mask> private _spaceWidthSuper; <mask> private _usedCounter = 1; <mask> <mask> public get spaceWidth(): number { <mask> return this._spaceWidth; <mask> } </s> FontTexture & Canvas2D Adding the superSample setting to FontTexture t...
[ "keep", "keep", "add", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/adde3b37f0c7a9ec79bd84e109e5d868fdd8d4f4
src/Materials/Textures/babylon.fontTexture.ts
public static GetCachedFontTexture(scene: Scene, fontName: string, supersample: boolean = false) {
<mask> public get lineHeight(): number { <mask> return this._lineHeight; <mask> } <mask> <mask> public static GetCachedFontTexture(scene: Scene, fontName: string) { <mask> let s = <any>scene; <mask> if (!s.__fontTextureCache__) { <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/adde3b37f0c7a9ec79bd84e109e5d868fdd8d4f4
src/Materials/Textures/babylon.fontTexture.ts
let lfn = fontName.toLocaleLowerCase() + (supersample ? "_+SS" : "_-SS");
<mask> } <mask> <mask> let dic = <StringDictionary<FontTexture>>s.__fontTextureCache__; <mask> <mask> let lfn = fontName.toLocaleLowerCase(); <mask> let ft = dic.get(lfn); <mask> if (ft) { <mask> ++ft._usedCounter; <mask> ...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/adde3b37f0c7a9ec79bd84e109e5d868fdd8d4f4
src/Materials/Textures/babylon.fontTexture.ts
ft = new FontTexture(null, fontName, scene, supersample ? 100 : 200, Texture.BILINEAR_SAMPLINGMODE, supersample);
<mask> ++ft._usedCounter; <mask> return ft; <mask> } <mask> <mask> ft = new FontTexture(null, lfn, scene, 200, Texture.NEAREST_SAMPLINGMODE); <mask> dic.add(lfn, ft); <mask> <mask> return ft; <mask> } <mask> </s> FontT...
[ "keep", "keep", "keep", "keep", "replace", "keep", "keep", "keep", "keep", "keep" ]
https://github.com/BabylonJS/Babylon.js/commit/adde3b37f0c7a9ec79bd84e109e5d868fdd8d4f4
src/Materials/Textures/babylon.fontTexture.ts