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 |
|---|---|---|---|---|
import "Shaders/color.fragment";
import "Shaders/color.vertex";
| <mask> import { ShaderMaterial } from "Materials/shaderMaterial";
<mask>
<mask> declare module "scene" {
<mask> export interface Scene {
<mask> /** @hidden (Backing field) */
<mask> _boundingBoxRenderer: BoundingBoxRenderer;
<mask>
<mask> /** @hidden (Backing field) */
</s> Import All Shaders
Former-commit-id: b5be47996ba547546e48fd9fc629545908a2a3d4 </s> remove import { Constants } from "Engines/constants";
</s> add | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d6ab799bfe1a86c4e40a7236a4155b43049b6de1 | src/Rendering/boundingBoxRenderer.ts |
import "./depth.fragment";
import "./depth.vertex";
| <mask> import { Constants } from "Engines/constants";
<mask> import { SceneComponentConstants } from "sceneComponent";
<mask> import { DepthRendererSceneComponent } from "./depthRendererSceneComponent";
<mask>
<mask> /**
<mask> * This represents a depth renderer in Babylon.
<mask> * A depth renderer will render to it's depth map every frame which can be displayed or used in post processing
<mask> */
</s> Import All Shaders
Former-commit-id: b5be47996ba547546e48fd9fc629545908a2a3d4 | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d6ab799bfe1a86c4e40a7236a4155b43049b6de1 | src/Rendering/depthRenderer.ts |
import "Shaders/line.fragment";
import "Shaders/line.vertex";
| <mask> import { Camera } from "Cameras/camera";
<mask> import { Constants } from "Engines/constants";
<mask> import { Node } from "node";
<mask>
<mask> declare module "Meshes/AbstractMesh" {
<mask> export interface AbstractMesh {
<mask> /**
<mask> * Disables the mesh edge rendering mode
</s> Import All Shaders
Former-commit-id: b5be47996ba547546e48fd9fc629545908a2a3d4 | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d6ab799bfe1a86c4e40a7236a4155b43049b6de1 | src/Rendering/edgesRenderer.ts |
import "./geometry.fragment";
import "./geometry.vertex";
| <mask> import { SceneComponentConstants } from "sceneComponent";
<mask>
<mask> /**
<mask> * This renderer is helpfull to fill one of the render target with a geometry buffer.
<mask> */
<mask> export class GeometryBufferRenderer {
<mask> /**
<mask> * Constant used to retrieve the position texture index in the G-Buffer textures array
</s> Import All Shaders
Former-commit-id: b5be47996ba547546e48fd9fc629545908a2a3d4 | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d6ab799bfe1a86c4e40a7236a4155b43049b6de1 | src/Rendering/geometryBufferRenderer.ts |
import "./outline.fragment";
import "./outline.vertex";
| <mask> import { ISceneComponent, SceneComponentConstants } from "sceneComponent";
<mask> import { Effect } from "Materials/effect";
<mask> import { Material } from "Materials/material";
<mask>
<mask> declare module "scene" {
<mask> export interface Scene {
<mask> /** @hidden */
<mask> _outlineRenderer: OutlineRenderer;
</s> Import All Shaders
Former-commit-id: b5be47996ba547546e48fd9fc629545908a2a3d4 | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d6ab799bfe1a86c4e40a7236a4155b43049b6de1 | src/Rendering/outlineRenderer.ts |
import "./sprites.fragment";
import "./sprites.vertex";
| <mask> import { Constants } from "Engines/constants";
<mask>
<mask> /**
<mask> * Defines the minimum interface to fullfil in order to be a sprite manager.
<mask> */
<mask> export interface ISpriteManager extends IDisposable {
<mask> /**
</s> Import All Shaders
Former-commit-id: b5be47996ba547546e48fd9fc629545908a2a3d4 | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d6ab799bfe1a86c4e40a7236a4155b43049b6de1 | src/Sprites/spriteManager.ts |
junitReporter: {
outputDir: '.temp/testResults', // results will be saved as $outputDir/$browserName.xml
outputFile: test.reportName + '.xml', // if included, results will be saved as $outputDir/$browserName/$outputFile
suite: test.displayName, // suite will become the package name attribute in xml testsuite element
useBrowserName: false, // add browser name to report and classes names
nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
properties: {} // key value pair of properties to add to the <properties> section of the report
},
| <mask> var kamaServerOptions = {
<mask> configFile: rootDir + "tests/modules/karma.conf.js",
<mask> };
<mask>
<mask> var server = new karmaServer(kamaServerOptions, (err) => {
<mask> if (err) {
</s> Split modules tests report
Former-commit-id: 2953cfc5072969a03c864f19ee2c3996ad0d2737 </s> remove testResultsFiles: '.temp/testResults/ModuleTests.xml'
</s> add testResultsFiles: '.temp/testResults/ModuleTestsVanilla.xml'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testRunner: JUnit
testResultsFiles: '.temp/testResults/ModuleTestsWebpack.xml' | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d6fa76f63ce1b2a4ccde4a097b3a17ab5e6a97e8 | Tools/Gulp/tasks/gulpTasks-tests.js |
testResultsFiles: '.temp/testResults/ModuleTestsVanilla.xml'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testRunner: JUnit
testResultsFiles: '.temp/testResults/ModuleTestsWebpack.xml' | <mask> - task: PublishTestResults@2
<mask> condition: succeededOrFailed()
<mask> inputs:
<mask> testRunner: JUnit
<mask> testResultsFiles: '.temp/testResults/ModuleTests.xml'
<mask>
<mask> - job: ViewerTests
<mask> displayName: '7. Viewer Tests'
<mask> pool:
<mask> vmImage: 'Ubuntu-16.04'
</s> Split modules tests report
Former-commit-id: 2953cfc5072969a03c864f19ee2c3996ad0d2737 | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d6fa76f63ce1b2a4ccde4a097b3a17ab5e6a97e8 | azure-pipelines.yml |
"reportName": "ModuleTestsWebpack",
"displayName": "Webpack Module Tests",
| <mask> {
<mask> "name": "typescript-webpack",
<mask> "typescript": true,
<mask> "bundler": "webpack"
<mask> },
<mask> {
<mask> "name": "typescript-vanilla",
</s> Split modules tests report
Former-commit-id: 2953cfc5072969a03c864f19ee2c3996ad0d2737 </s> remove testResultsFiles: '.temp/testResults/ModuleTests.xml'
</s> add testResultsFiles: '.temp/testResults/ModuleTestsVanilla.xml'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testRunner: JUnit
testResultsFiles: '.temp/testResults/ModuleTestsWebpack.xml' | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d6fa76f63ce1b2a4ccde4a097b3a17ab5e6a97e8 | tests/modules/tests.json |
"reportName": "ModuleTestsVanilla",
"displayName": "Vanilla Module Tests",
| <mask> },
<mask> {
<mask> "name": "typescript-vanilla",
<mask> "typescript": true,
<mask> "tsconfig": "tsconfig.json",
<mask> "dependencies": [
<mask> "babylon.max.js",
<mask> "gui/babylon.gui.js",
<mask> "loaders/babylonjs.loaders.js"
</s> Split modules tests report
Former-commit-id: 2953cfc5072969a03c864f19ee2c3996ad0d2737 </s> remove testResultsFiles: '.temp/testResults/ModuleTests.xml'
</s> add testResultsFiles: '.temp/testResults/ModuleTestsVanilla.xml'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testRunner: JUnit
testResultsFiles: '.temp/testResults/ModuleTestsWebpack.xml' | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d6fa76f63ce1b2a4ccde4a097b3a17ab5e6a97e8 | tests/modules/tests.json |
lockLastFrameValue: boolean = false;
lockLastFrameFrame: boolean = false;
// value frame inTangent outTangent
onActiveKeyDataChanged = new Observable<number>();
| <mask> onInterpolationModeSet = new Observable<{ keyId: number; value: AnimationKeyInterpolation }>();
<mask>
<mask> onSelectToActivated = new Observable<{ from: number; to: number }>();
<mask>
<mask> public prepare() {
<mask> this.isPlaying = false;
<mask> if (!this.animations || !this.animations.length) {
<mask> return;
<mask> }
<mask>
</s> add ACR Contex lock last Frame/Value properity and keyDataChanged Event
Former-commit-id: d78114a96ab79c9f68e3db0ef8bd51cf499d4d3b </s> remove
</s> add if (this.props.context.lockLastFrameValue && this.props.keyId === this.props.curve.keys.length - 1) {
newY = this.state.y;
}
</s> remove if (this.props.keyId !== 0) {
</s> add if (this.props.keyId !== 0 && !(this.props.context.lockLastFrameFrame && this.props.keyId === this.props.curve.keys.length - 1)) {
</s> remove
</s> add this.props.context.onActiveKeyDataChanged.notifyObservers(this.props.keyId);
| [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d7745c7321eb75b3cef4de0a67bd200826166d91 | inspector/src/components/actionTabs/tabs/propertyGrids/animations/curveEditor/context.ts |
if (this.props.keyId !== 0 && !(this.props.context.lockLastFrameFrame && this.props.keyId === this.props.curve.keys.length - 1)) {
| <mask>
<mask> if (nextX !== null) {
<mask> newX = Math.min(nextX - epsilon, newX);
<mask> }
<mask> if (this.props.keyId !== 0) {
<mask> let frame = this.props.invertX(newX);
<mask> this.props.onFrameValueChanged(frame);
<mask> this.props.context.onFrameSet.notifyObservers(frame);
<mask>
<mask> if (newX !== this.state.x) {
</s> add ACR Contex lock last Frame/Value properity and keyDataChanged Event
Former-commit-id: d78114a96ab79c9f68e3db0ef8bd51cf499d4d3b </s> remove
</s> add if (this.props.context.lockLastFrameValue && this.props.keyId === this.props.curve.keys.length - 1) {
newY = this.state.y;
}
</s> remove
</s> add this.props.context.onActiveKeyDataChanged.notifyObservers(this.props.keyId);
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d7745c7321eb75b3cef4de0a67bd200826166d91 | inspector/src/components/actionTabs/tabs/propertyGrids/animations/curveEditor/graph/keyPoint.tsx |
if (this.props.context.lockLastFrameValue && this.props.keyId === this.props.curve.keys.length - 1) {
newY = this.state.y;
}
| <mask> }
<mask> } else {
<mask> newX = this.state.x;
<mask> }
<mask>
<mask> let value = this.props.invertY(newY);
<mask> this.props.onKeyValueChanged(value);
<mask> this.props.context.onValueSet.notifyObservers(value);
<mask>
<mask> this.setState({ x: newX, y: newY });
</s> add ACR Contex lock last Frame/Value properity and keyDataChanged Event
Former-commit-id: d78114a96ab79c9f68e3db0ef8bd51cf499d4d3b </s> remove
</s> add this.props.context.onActiveKeyDataChanged.notifyObservers(this.props.keyId);
</s> remove if (this.props.keyId !== 0) {
</s> add if (this.props.keyId !== 0 && !(this.props.context.lockLastFrameFrame && this.props.keyId === this.props.curve.keys.length - 1)) {
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d7745c7321eb75b3cef4de0a67bd200826166d91 | inspector/src/components/actionTabs/tabs/propertyGrids/animations/curveEditor/graph/keyPoint.tsx |
this.props.context.onActiveKeyDataChanged.notifyObservers(this.props.keyId);
| <mask>
<mask> this.props.context.refreshTarget();
<mask> this.forceUpdate();
<mask> }
<mask>
<mask> this._sourcePointerX = evt.nativeEvent.offsetX;
<mask> this._sourcePointerY = evt.nativeEvent.offsetY;
<mask> evt.stopPropagation();
<mask> }
<mask>
</s> add ACR Contex lock last Frame/Value properity and keyDataChanged Event
Former-commit-id: d78114a96ab79c9f68e3db0ef8bd51cf499d4d3b </s> remove
</s> add if (this.props.context.lockLastFrameValue && this.props.keyId === this.props.curve.keys.length - 1) {
newY = this.state.y;
}
</s> remove if (this.props.keyId !== 0) {
</s> add if (this.props.keyId !== 0 && !(this.props.context.lockLastFrameFrame && this.props.keyId === this.props.curve.keys.length - 1)) {
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d7745c7321eb75b3cef4de0a67bd200826166d91 | inspector/src/components/actionTabs/tabs/propertyGrids/animations/curveEditor/graph/keyPoint.tsx |
{
"name": "Launch playground (Edge)",
"type": "edge",
"version": "dev",
"request": "launch",
"url": "http://localhost:1338/Playground/index-local.html",
"webRoot": "${workspaceRoot}/",
"sourceMaps": true,
"preLaunchTask": "run",
"userDataDir": "${workspaceRoot}/.tempChromeProfileForDebug",
"runtimeArgs": [
"--enable-unsafe-es3-apis"
]
},
| <mask> "runtimeArgs": [
<mask> "--enable-unsafe-es3-apis"
<mask> ]
<mask> },
<mask> {
<mask> "name": "Launch playground (Chrome+WebGL 1.0 forced)",
<mask> "type": "chrome",
<mask> "request": "launch",
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove let newSystem = ParticleSystem.Parse(jsonObject, scene, "");
</s> add let newSystem = isGpu ? GPUParticleSystem.Parse(jsonObject, scene, "") : ParticleSystem.Parse(jsonObject, scene, "");
</s> remove if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
</s> add return this;
}
private _refreshColorGradient() {
if (this._colorGradients) {
this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
}
| [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | .vscode/launch.json |
.link-button {
| <mask> text-decoration: underline;
<mask> cursor: pointer;
<mask> }
<mask>
<mask> .button {
<mask> grid-column: 2;
<mask>
<mask> button {
<mask> background: #222222;
<mask> border: 1px solid rgb(51, 122, 183);
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
</s> add return this;
}
private _refreshColorGradient() {
if (this._colorGradients) {
this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/actionTabs.scss |
<div className="link-button">
| <mask> <div className={"linkButtonLine"}>
<mask> <div className="link" title={this.props.label} onClick={() => this.onLink()}>
<mask> {this.props.label}
<mask> </div>
<mask> <div className="button">
<mask> <button onClick={() => this.props.onClick()}>{this.props.buttonLabel}</button>
<mask> </div>
<mask> </div>
<mask> );
<mask> }
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove gradient instanceof ColorGradient &&
<div className="color1">
</s> add this.props.host instanceof ParticleSystem && gradient instanceof ColorGradient &&
<div className="color2">
</s> remove <div className="factor2">
<input type="number" step={"0.01"} className={"numeric-input" + ((gradient.factor1 === gradient.factor2 || gradient.factor2 === undefined) ? " grayed" : "")} value={gradient.factor2} onBlur={() => this.unlock()} onFocus={() => this.lock()}
onChange={evt => this.updateFactor2(parseFloat(evt.target.value))} />
</div>
</s> add {
this.props.host instanceof ParticleSystem &&
<div className="factor2">
<input type="number" step={"0.01"} className={"numeric-input" + ((gradient.factor1 === gradient.factor2 || gradient.factor2 === undefined) ? " grayed" : "")} value={gradient.factor2} onBlur={() => this.unlock()} onFocus={() => this.lock()}
onChange={evt => this.updateFactor2(parseFloat(evt.target.value))} />
</div>
}
</s> remove <ButtonLineComponent label={isStarted ? "Pause" : "Start"} onClick={() => {
</s> add <ButtonLineComponent label={isStarted ? "Stop" : "Start"} onClick={() => {
</s> remove onUpdateGradient={() => this.forceUpdate()}
</s> add onUpdateGradient={() => this.updateAndSync()}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/lines/linkButtonComponent.tsx |
import { ParticleSystem } from 'babylonjs/Particles/particleSystem';
| <mask> import { ColorGradient, Color3Gradient } from 'babylonjs/Misc/gradients';
<mask> import { LockObject } from '../lockObject';
<mask> import { Color3, Color4 } from 'babylonjs/Maths/math.color';
<mask> import { IParticleSystem } from 'babylonjs/Particles/IParticleSystem';
<mask>
<mask> interface IColorGradientStepGridComponent {
<mask> globalState: GlobalState;
<mask> gradient: ColorGradient | Color3Gradient;
<mask> lockObject: LockObject;
<mask> lineIndex: number;
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove factorGradients.push(valueGradient);
factorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
</s> add factorGradients.push(valueGradient);
</s> remove if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
</s> add return this;
}
private _refreshColorGradient() {
if (this._colorGradients) {
this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
}
| [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/colorGradientStepGridComponent.tsx |
this.props.host instanceof ParticleSystem && gradient instanceof ColorGradient &&
<div className="color2">
| <mask> <input type="color" value={gradient.color.toHexString()} onChange={(evt) => this.updateColor1(evt.target.value)} />
<mask> </div>
<mask> }
<mask> {
<mask> gradient instanceof ColorGradient &&
<mask> <div className="color1">
<mask> <input type="color" value={gradient.color2 ? gradient.color2.toHexString(true) : "#000000"} onChange={(evt) => this.updateColor2(evt.target.value)} />
<mask> </div>
<mask> }
<mask> <div className="step-value">
<mask> {gradient.gradient.toFixed(2)}
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove <div className="factor2">
<input type="number" step={"0.01"} className={"numeric-input" + ((gradient.factor1 === gradient.factor2 || gradient.factor2 === undefined) ? " grayed" : "")} value={gradient.factor2} onBlur={() => this.unlock()} onFocus={() => this.lock()}
onChange={evt => this.updateFactor2(parseFloat(evt.target.value))} />
</div>
</s> add {
this.props.host instanceof ParticleSystem &&
<div className="factor2">
<input type="number" step={"0.01"} className={"numeric-input" + ((gradient.factor1 === gradient.factor2 || gradient.factor2 === undefined) ? " grayed" : "")} value={gradient.factor2} onBlur={() => this.unlock()} onFocus={() => this.lock()}
onChange={evt => this.updateFactor2(parseFloat(evt.target.value))} />
</div>
}
</s> remove <div className="button">
</s> add <div className="link-button">
</s> remove <ButtonLineComponent label={isStarted ? "Pause" : "Start"} onClick={() => {
</s> add <ButtonLineComponent label={isStarted ? "Stop" : "Start"} onClick={() => {
</s> remove <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getEmitRateGradients()!}
label="Velocity gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#emit-rate-over-time"
onCreateRequired={() => {
system.addEmitRateGradient(0, 50, 50);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addEmitRateGradient(0, 50, 50);`
});
}}
mode={GradientGridMode.Factor}
host={system}
codeRecorderPropertyName="getEmitRateGradients()"
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getEmitRateGradients()!}
label="Velocity gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#emit-rate-over-time"
onCreateRequired={() => {
system.addEmitRateGradient(0, 50, 50);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addEmitRateGradient(0, 50, 50);`
});
}}
mode={GradientGridMode.Factor}
host={system}
codeRecorderPropertyName="getEmitRateGradients()"
lockObject={this.props.lockObject}/>
}
</s> remove return this;
</s> add this._releaseBuffers();
this.reset();
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/colorGradientStepGridComponent.tsx |
import { ParticleSystem } from 'babylonjs/Particles/particleSystem';
| <mask> import { LockObject } from '../lockObject';
<mask> import { IParticleSystem } from 'babylonjs/Particles/IParticleSystem';
<mask>
<mask> interface IFactorGradientStepGridComponent {
<mask> globalState: GlobalState;
<mask> gradient: FactorGradient;
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove factorGradients.push(valueGradient);
factorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
</s> add factorGradients.push(valueGradient);
</s> remove if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
</s> add return this;
}
private _refreshColorGradient() {
if (this._colorGradients) {
this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
}
| [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/factorGradientStepGridComponent.tsx |
{
this.props.host instanceof ParticleSystem &&
<div className="factor2">
<input type="number" step={"0.01"} className={"numeric-input" + ((gradient.factor1 === gradient.factor2 || gradient.factor2 === undefined) ? " grayed" : "")} value={gradient.factor2} onBlur={() => this.unlock()} onFocus={() => this.lock()}
onChange={evt => this.updateFactor2(parseFloat(evt.target.value))} />
</div>
}
| <mask> <div className="factor1">
<mask> <input type="number" step={"0.01"} className="numeric-input" value={gradient.factor1} onBlur={() => this.unlock()} onFocus={() => this.lock()}
<mask> onChange={evt => this.updateFactor1(parseFloat(evt.target.value))} />
<mask> </div>
<mask> <div className="factor2">
<mask> <input type="number" step={"0.01"} className={"numeric-input" + ((gradient.factor1 === gradient.factor2 || gradient.factor2 === undefined) ? " grayed" : "")} value={gradient.factor2} onBlur={() => this.unlock()} onFocus={() => this.lock()}
<mask> onChange={evt => this.updateFactor2(parseFloat(evt.target.value))} />
<mask> </div>
<mask> <div className="step-value">
<mask> {gradient.gradient.toFixed(2)}
<mask> </div>
<mask> <div className="step-slider">
<mask> <input className="range" type="range" step={0.01} min={0} max={1.0} value={gradient.gradient}
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove gradient instanceof ColorGradient &&
<div className="color1">
</s> add this.props.host instanceof ParticleSystem && gradient instanceof ColorGradient &&
<div className="color2">
</s> remove <div className="button">
</s> add <div className="link-button">
</s> remove <ButtonLineComponent label={isStarted ? "Pause" : "Start"} onClick={() => {
</s> add <ButtonLineComponent label={isStarted ? "Stop" : "Start"} onClick={() => {
</s> remove onUpdateGradient={() => this.forceUpdate()}
</s> add onUpdateGradient={() => this.updateAndSync()}
</s> remove onUpdateGradient={() => this.forceUpdate()}
</s> add onUpdateGradient={() => this.updateAndSync()}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/factorGradientStepGridComponent.tsx |
<ButtonLineComponent label={isStarted ? "Stop" : "Start"} onClick={() => {
| <mask>
<mask> if (system instanceof GPUParticleSystem) {
<mask> let isStarted = system.isStarted() && !system.isStopped();
<mask> return (
<mask> <ButtonLineComponent label={isStarted ? "Pause" : "Start"} onClick={() => {
<mask> if (isStarted) {
<mask> system.stop();
<mask> } else {
<mask> system.start();
<mask> }
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove gradient instanceof ColorGradient &&
<div className="color1">
</s> add this.props.host instanceof ParticleSystem && gradient instanceof ColorGradient &&
<div className="color2">
</s> remove this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
</s> add this._refreshColorGradient();
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/particleSystemPropertyGridComponent.tsx |
system.reset();
| <mask> if (isStarted) {
<mask> system.stop();
<mask> } else {
<mask> system.start();
<mask> }
<mask> this.forceUpdate();
<mask> }} />
<mask> );
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove <ButtonLineComponent label={isStarted ? "Pause" : "Start"} onClick={() => {
</s> add <ButtonLineComponent label={isStarted ? "Stop" : "Start"} onClick={() => {
</s> remove return 0;
});
</s> add this._releaseBuffers();
| [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/particleSystemPropertyGridComponent.tsx |
let isGpu = system instanceof GPUParticleSystem
| <mask> Tools.ReadFile(file, (data) => {
<mask> let decoder = new TextDecoder("utf-8");
<mask> let jsonObject = JSON.parse(decoder.decode(data));
<mask>
<mask> system.dispose();
<mask> this.props.globalState.onSelectionChangedObservable.notifyObservers(null);
<mask>
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove let newSystem = ParticleSystem.Parse(jsonObject, scene, "");
</s> add let newSystem = isGpu ? GPUParticleSystem.Parse(jsonObject, scene, "") : ParticleSystem.Parse(jsonObject, scene, "");
</s> remove this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
</s> add this._refreshColorGradient();
</s> remove factorGradients.push(valueGradient);
factorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
</s> add factorGradients.push(valueGradient);
| [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/particleSystemPropertyGridComponent.tsx |
let newSystem = isGpu ? GPUParticleSystem.Parse(jsonObject, scene, "") : ParticleSystem.Parse(jsonObject, scene, "");
| <mask>
<mask> system.dispose();
<mask> this.props.globalState.onSelectionChangedObservable.notifyObservers(null);
<mask>
<mask> let newSystem = ParticleSystem.Parse(jsonObject, scene, "");
<mask> this.props.globalState.onSelectionChangedObservable.notifyObservers(newSystem);
<mask> }, undefined, true);
<mask> }
<mask>
<mask> render() {
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove particleSystem.textureMask = Color4.FromArray(parsedParticleSystem.textureMask);
</s> add if (parsedParticleSystem.textureMask) {
particleSystem.textureMask = Color4.FromArray(parsedParticleSystem.textureMask);
} | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/particleSystemPropertyGridComponent.tsx |
<TextLineComponent label="Active count" value={system.getActiveCount().toString()} />
| <mask> <TextLineComponent label="ID" value={system.id} />
<mask> <TextInputLineComponent lockObject={this.props.lockObject} label="Name" target={system} propertyName="name" onPropertyChangedObservable={this.props.onPropertyChangedObservable}/>
<mask> <TextLineComponent label="Class" value={system.getClassName()} />
<mask> <TextLineComponent label="Capacity" value={system.getCapacity().toString()} />
<mask> <TextLineComponent label="Capacity" value={system.getActiveCount().toString()} />
<mask> <TextureLinkLineComponent label="Texture" texture={system.particleTexture} onSelectionChangedObservable={this.props.onSelectionChangedObservable}/>
<mask> <OptionsLineComponent label="Blend mode" options={blendModeOptions} target={system} propertyName="blendMode" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
<mask> <Vector3LineComponent label="Gravity" target={system} propertyName="gravity"
<mask> onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
<mask> <CheckBoxLineComponent label="Is billboard" target={system} propertyName="isBillboardBased" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getLifeTimeGradients()!}
label="Lifetime gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#lifetime"
onCreateRequired={() => {
system.addLifeTimeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addLifeTimeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getLifeTimeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getLifeTimeGradients()!}
label="Lifetime gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#lifetime"
onCreateRequired={() => {
system.addLifeTimeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addLifeTimeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getLifeTimeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
}
</s> remove <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getStartSizeGradients()!}
label="Start size gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#start-size-over-time"
onCreateRequired={() => {
system.addStartSizeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addStartSizeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getStartSizeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getStartSizeGradients()!}
label="Start size gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#start-size-over-time"
onCreateRequired={() => {
system.addStartSizeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addStartSizeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getStartSizeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
}
</s> remove <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getEmitRateGradients()!}
label="Velocity gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#emit-rate-over-time"
onCreateRequired={() => {
system.addEmitRateGradient(0, 50, 50);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addEmitRateGradient(0, 50, 50);`
});
}}
mode={GradientGridMode.Factor}
host={system}
codeRecorderPropertyName="getEmitRateGradients()"
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getEmitRateGradients()!}
label="Velocity gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#emit-rate-over-time"
onCreateRequired={() => {
system.addEmitRateGradient(0, 50, 50);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addEmitRateGradient(0, 50, 50);`
});
}}
mode={GradientGridMode.Factor}
host={system}
codeRecorderPropertyName="getEmitRateGradients()"
lockObject={this.props.lockObject}/>
}
</s> remove
<CheckBoxLineComponent label="Use ramp grandients" target={system} propertyName="useRampGradients"/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getRampGradients()!}
label="Ramp gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addRampGradient(0, Color3.White());
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addRampGradient(0, BABYLON.Color3.White());`
});
}}
mode={GradientGridMode.Color3}
host={system}
codeRecorderPropertyName="getRampGradients()"
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getColorRemapGradients()!}
label="Color remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addColorRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addColorRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getColorRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getAlphaRemapGradients()!}
label="Alpha remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addAlphaRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addAlphaRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getAlphaRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<>
<CheckBoxLineComponent label="Use ramp grandients" target={system} propertyName="useRampGradients"/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getRampGradients()!}
label="Ramp gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addRampGradient(0, Color3.White());
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addRampGradient(0, BABYLON.Color3.White());`
});
}}
mode={GradientGridMode.Color3}
host={system}
codeRecorderPropertyName="getRampGradients()"
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getColorRemapGradients()!}
label="Color remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addColorRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addColorRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getColorRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getAlphaRemapGradients()!}
label="Alpha remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addAlphaRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addAlphaRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getAlphaRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</>
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/particleSystemPropertyGridComponent.tsx |
{
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getEmitRateGradients()!}
label="Velocity gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#emit-rate-over-time"
onCreateRequired={() => {
system.addEmitRateGradient(0, 50, 50);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addEmitRateGradient(0, 50, 50);`
});
}}
mode={GradientGridMode.Factor}
host={system}
codeRecorderPropertyName="getEmitRateGradients()"
lockObject={this.props.lockObject}/>
}
| <mask> }
<mask> </LineContainerComponent>
<mask> <LineContainerComponent globalState={this.props.globalState} title="EMISSION">
<mask> <FloatLineComponent lockObject={this.props.lockObject} label="Rate" target={system} propertyName="emitRate" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
<mask> <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getEmitRateGradients()!}
<mask> label="Velocity gradients"
<mask> docLink="https://doc.babylonjs.com/babylon101/particles#emit-rate-over-time"
<mask> onCreateRequired={() => {
<mask> system.addEmitRateGradient(0, 50, 50);
<mask> this.props.globalState.onCodeChangedObservable.notifyObservers({
<mask> object: system,
<mask> code: `TARGET.addEmitRateGradient(0, 50, 50);`
<mask> });
<mask> }}
<mask> mode={GradientGridMode.Factor}
<mask> host={system}
<mask> codeRecorderPropertyName="getEmitRateGradients()"
<mask> lockObject={this.props.lockObject}/>
<mask> <FloatLineComponent lockObject={this.props.lockObject} label="Min emit power" target={system} propertyName="minEmitPower" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
<mask> <FloatLineComponent lockObject={this.props.lockObject} label="Max emit power" target={system} propertyName="maxEmitPower" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
<mask> <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getVelocityGradients()!}
<mask> label="Velocity gradients"
<mask> docLink="https://doc.babylonjs.com/babylon101/particles#velocity-over-time"
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getLifeTimeGradients()!}
label="Lifetime gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#lifetime"
onCreateRequired={() => {
system.addLifeTimeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addLifeTimeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getLifeTimeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getLifeTimeGradients()!}
label="Lifetime gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#lifetime"
onCreateRequired={() => {
system.addLifeTimeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addLifeTimeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getLifeTimeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
}
</s> remove <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getStartSizeGradients()!}
label="Start size gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#start-size-over-time"
onCreateRequired={() => {
system.addStartSizeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addStartSizeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getStartSizeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getStartSizeGradients()!}
label="Start size gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#start-size-over-time"
onCreateRequired={() => {
system.addStartSizeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addStartSizeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getStartSizeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
}
</s> remove
<CheckBoxLineComponent label="Use ramp grandients" target={system} propertyName="useRampGradients"/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getRampGradients()!}
label="Ramp gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addRampGradient(0, Color3.White());
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addRampGradient(0, BABYLON.Color3.White());`
});
}}
mode={GradientGridMode.Color3}
host={system}
codeRecorderPropertyName="getRampGradients()"
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getColorRemapGradients()!}
label="Color remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addColorRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addColorRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getColorRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getAlphaRemapGradients()!}
label="Alpha remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addAlphaRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addAlphaRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getAlphaRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<>
<CheckBoxLineComponent label="Use ramp grandients" target={system} propertyName="useRampGradients"/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getRampGradients()!}
label="Ramp gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addRampGradient(0, Color3.White());
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addRampGradient(0, BABYLON.Color3.White());`
});
}}
mode={GradientGridMode.Color3}
host={system}
codeRecorderPropertyName="getRampGradients()"
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getColorRemapGradients()!}
label="Color remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addColorRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addColorRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getColorRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getAlphaRemapGradients()!}
label="Alpha remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addAlphaRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addAlphaRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getAlphaRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</>
}
</s> remove <TextLineComponent label="Capacity" value={system.getActiveCount().toString()} />
</s> add <TextLineComponent label="Active count" value={system.getActiveCount().toString()} />
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"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/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/particleSystemPropertyGridComponent.tsx |
{
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getStartSizeGradients()!}
label="Start size gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#start-size-over-time"
onCreateRequired={() => {
system.addStartSizeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addStartSizeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getStartSizeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
}
| <mask> <FloatLineComponent lockObject={this.props.lockObject} label="Min scale X" target={system} propertyName="minScaleX" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
<mask> <FloatLineComponent lockObject={this.props.lockObject} label="Max scale X" target={system} propertyName="maxScaleX" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
<mask> <FloatLineComponent lockObject={this.props.lockObject} label="Min scale Y" target={system} propertyName="minScaleY" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
<mask> <FloatLineComponent lockObject={this.props.lockObject} label="Max scale Y" target={system} propertyName="maxScaleY" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
<mask> <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getStartSizeGradients()!}
<mask> label="Start size gradients"
<mask> docLink="https://doc.babylonjs.com/babylon101/particles#start-size-over-time"
<mask> onCreateRequired={() => {
<mask> system.addStartSizeGradient(0, 1, 1);
<mask> this.props.globalState.onCodeChangedObservable.notifyObservers({
<mask> object: system,
<mask> code: `TARGET.addStartSizeGradient(0, 1, 1);`
<mask> });
<mask> }}
<mask> host={system}
<mask> codeRecorderPropertyName="getStartSizeGradients()"
<mask> mode={GradientGridMode.Factor}
<mask> lockObject={this.props.lockObject}/>
<mask>
<mask> <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getSizeGradients()!}
<mask> label="Size gradients"
<mask> docLink="https://doc.babylonjs.com/babylon101/particles#size"
<mask> onCreateRequired={() => {
<mask> system.addSizeGradient(0, 1, 1);
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getLifeTimeGradients()!}
label="Lifetime gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#lifetime"
onCreateRequired={() => {
system.addLifeTimeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addLifeTimeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getLifeTimeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getLifeTimeGradients()!}
label="Lifetime gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#lifetime"
onCreateRequired={() => {
system.addLifeTimeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addLifeTimeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getLifeTimeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
}
</s> remove
<CheckBoxLineComponent label="Use ramp grandients" target={system} propertyName="useRampGradients"/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getRampGradients()!}
label="Ramp gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addRampGradient(0, Color3.White());
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addRampGradient(0, BABYLON.Color3.White());`
});
}}
mode={GradientGridMode.Color3}
host={system}
codeRecorderPropertyName="getRampGradients()"
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getColorRemapGradients()!}
label="Color remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addColorRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addColorRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getColorRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getAlphaRemapGradients()!}
label="Alpha remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addAlphaRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addAlphaRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getAlphaRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<>
<CheckBoxLineComponent label="Use ramp grandients" target={system} propertyName="useRampGradients"/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getRampGradients()!}
label="Ramp gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addRampGradient(0, Color3.White());
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addRampGradient(0, BABYLON.Color3.White());`
});
}}
mode={GradientGridMode.Color3}
host={system}
codeRecorderPropertyName="getRampGradients()"
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getColorRemapGradients()!}
label="Color remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addColorRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addColorRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getColorRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getAlphaRemapGradients()!}
label="Alpha remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addAlphaRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addAlphaRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getAlphaRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</>
}
</s> remove <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getEmitRateGradients()!}
label="Velocity gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#emit-rate-over-time"
onCreateRequired={() => {
system.addEmitRateGradient(0, 50, 50);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addEmitRateGradient(0, 50, 50);`
});
}}
mode={GradientGridMode.Factor}
host={system}
codeRecorderPropertyName="getEmitRateGradients()"
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getEmitRateGradients()!}
label="Velocity gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#emit-rate-over-time"
onCreateRequired={() => {
system.addEmitRateGradient(0, 50, 50);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addEmitRateGradient(0, 50, 50);`
});
}}
mode={GradientGridMode.Factor}
host={system}
codeRecorderPropertyName="getEmitRateGradients()"
lockObject={this.props.lockObject}/>
}
</s> remove <TextLineComponent label="Capacity" value={system.getActiveCount().toString()} />
</s> add <TextLineComponent label="Active count" value={system.getActiveCount().toString()} />
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"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/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/particleSystemPropertyGridComponent.tsx |
{
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getLifeTimeGradients()!}
label="Lifetime gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#lifetime"
onCreateRequired={() => {
system.addLifeTimeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addLifeTimeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getLifeTimeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
}
| <mask> <LineContainerComponent globalState={this.props.globalState} title="LIFETIME">
<mask> <FloatLineComponent lockObject={this.props.lockObject} label="Min lifetime" target={system} propertyName="minLifeTime" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
<mask> <FloatLineComponent lockObject={this.props.lockObject} label="Max lifetime" target={system} propertyName="maxLifeTime" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
<mask> <FloatLineComponent lockObject={this.props.lockObject} label="Target stop duration" target={system} propertyName="targetStopDuration" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
<mask> <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getLifeTimeGradients()!}
<mask> label="Lifetime gradients"
<mask> docLink="https://doc.babylonjs.com/babylon101/particles#lifetime"
<mask> onCreateRequired={() => {
<mask> system.addLifeTimeGradient(0, 1, 1);
<mask> this.props.globalState.onCodeChangedObservable.notifyObservers({
<mask> object: system,
<mask> code: `TARGET.addLifeTimeGradient(0, 1, 1);`
<mask> });
<mask> }}
<mask> host={system}
<mask> codeRecorderPropertyName="getLifeTimeGradients()"
<mask> mode={GradientGridMode.Factor}
<mask> lockObject={this.props.lockObject}/>
<mask> </LineContainerComponent>
<mask> <LineContainerComponent globalState={this.props.globalState} title="COLORS">
<mask> <Color4LineComponent label="Color 1" target={system} propertyName="color1"
<mask> onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
<mask> <Color4LineComponent label="Color 2" target={system} propertyName="color2"
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getStartSizeGradients()!}
label="Start size gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#start-size-over-time"
onCreateRequired={() => {
system.addStartSizeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addStartSizeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getStartSizeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getStartSizeGradients()!}
label="Start size gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#start-size-over-time"
onCreateRequired={() => {
system.addStartSizeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addStartSizeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getStartSizeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
}
</s> remove
<CheckBoxLineComponent label="Use ramp grandients" target={system} propertyName="useRampGradients"/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getRampGradients()!}
label="Ramp gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addRampGradient(0, Color3.White());
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addRampGradient(0, BABYLON.Color3.White());`
});
}}
mode={GradientGridMode.Color3}
host={system}
codeRecorderPropertyName="getRampGradients()"
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getColorRemapGradients()!}
label="Color remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addColorRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addColorRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getColorRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getAlphaRemapGradients()!}
label="Alpha remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addAlphaRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addAlphaRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getAlphaRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<>
<CheckBoxLineComponent label="Use ramp grandients" target={system} propertyName="useRampGradients"/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getRampGradients()!}
label="Ramp gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addRampGradient(0, Color3.White());
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addRampGradient(0, BABYLON.Color3.White());`
});
}}
mode={GradientGridMode.Color3}
host={system}
codeRecorderPropertyName="getRampGradients()"
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getColorRemapGradients()!}
label="Color remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addColorRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addColorRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getColorRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getAlphaRemapGradients()!}
label="Alpha remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addAlphaRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addAlphaRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getAlphaRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</>
}
</s> remove <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getEmitRateGradients()!}
label="Velocity gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#emit-rate-over-time"
onCreateRequired={() => {
system.addEmitRateGradient(0, 50, 50);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addEmitRateGradient(0, 50, 50);`
});
}}
mode={GradientGridMode.Factor}
host={system}
codeRecorderPropertyName="getEmitRateGradients()"
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getEmitRateGradients()!}
label="Velocity gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#emit-rate-over-time"
onCreateRequired={() => {
system.addEmitRateGradient(0, 50, 50);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addEmitRateGradient(0, 50, 50);`
});
}}
mode={GradientGridMode.Factor}
host={system}
codeRecorderPropertyName="getEmitRateGradients()"
lockObject={this.props.lockObject}/>
}
</s> remove <TextLineComponent label="Capacity" value={system.getActiveCount().toString()} />
</s> add <TextLineComponent label="Active count" value={system.getActiveCount().toString()} />
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"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/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/particleSystemPropertyGridComponent.tsx |
{
system instanceof ParticleSystem &&
<>
<CheckBoxLineComponent label="Use ramp grandients" target={system} propertyName="useRampGradients"/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getRampGradients()!}
label="Ramp gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addRampGradient(0, Color3.White());
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addRampGradient(0, BABYLON.Color3.White());`
});
}}
mode={GradientGridMode.Color3}
host={system}
codeRecorderPropertyName="getRampGradients()"
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getColorRemapGradients()!}
label="Color remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addColorRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addColorRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getColorRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getAlphaRemapGradients()!}
label="Alpha remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addAlphaRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addAlphaRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getAlphaRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</>
}
| <mask> host={system}
<mask> codeRecorderPropertyName="getColorGradients()"
<mask> mode={GradientGridMode.Color4}
<mask> lockObject={this.props.lockObject}/>
<mask>
<mask> <CheckBoxLineComponent label="Use ramp grandients" target={system} propertyName="useRampGradients"/>
<mask> <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getRampGradients()!}
<mask> label="Ramp gradients"
<mask> docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
<mask> onCreateRequired={() => {
<mask> system.addRampGradient(0, Color3.White());
<mask> this.props.globalState.onCodeChangedObservable.notifyObservers({
<mask> object: system,
<mask> code: `TARGET.addRampGradient(0, BABYLON.Color3.White());`
<mask> });
<mask> }}
<mask> mode={GradientGridMode.Color3}
<mask> host={system}
<mask> codeRecorderPropertyName="getRampGradients()"
<mask> lockObject={this.props.lockObject}/>
<mask>
<mask> <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getColorRemapGradients()!}
<mask> label="Color remap gradients"
<mask> docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
<mask> onCreateRequired={() => {
<mask> system.addColorRemapGradient(0, 1, 1);
<mask> this.props.globalState.onCodeChangedObservable.notifyObservers({
<mask> object: system,
<mask> code: `TARGET.addColorRemapGradient(0, 1, 1);`
<mask> });
<mask> }}
<mask> host={system}
<mask> codeRecorderPropertyName="getColorRemapGradients()"
<mask> mode={GradientGridMode.Factor}
<mask> lockObject={this.props.lockObject}/>
<mask> <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getAlphaRemapGradients()!}
<mask> label="Alpha remap gradients"
<mask> docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
<mask> onCreateRequired={() => {
<mask> system.addAlphaRemapGradient(0, 1, 1);
<mask> this.props.globalState.onCodeChangedObservable.notifyObservers({
<mask> object: system,
<mask> code: `TARGET.addAlphaRemapGradient(0, 1, 1);`
<mask> });
<mask> }}
<mask> host={system}
<mask> codeRecorderPropertyName="getAlphaRemapGradients()"
<mask> mode={GradientGridMode.Factor}
<mask> lockObject={this.props.lockObject}/>
<mask> </LineContainerComponent>
<mask> <LineContainerComponent globalState={this.props.globalState} title="ROTATION">
<mask> <FloatLineComponent lockObject={this.props.lockObject} label="Min angular speed" target={system} propertyName="minAngularSpeed" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
<mask> <FloatLineComponent lockObject={this.props.lockObject} label="Max angular speed" target={system} propertyName="maxAngularSpeed" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
<mask> <FloatLineComponent lockObject={this.props.lockObject} label="Min initial rotation" target={system} propertyName="minInitialRotation" onPropertyChangedObservable={this.props.onPropertyChangedObservable} />
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getLifeTimeGradients()!}
label="Lifetime gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#lifetime"
onCreateRequired={() => {
system.addLifeTimeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addLifeTimeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getLifeTimeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getLifeTimeGradients()!}
label="Lifetime gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#lifetime"
onCreateRequired={() => {
system.addLifeTimeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addLifeTimeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getLifeTimeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
}
</s> remove <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getStartSizeGradients()!}
label="Start size gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#start-size-over-time"
onCreateRequired={() => {
system.addStartSizeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addStartSizeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getStartSizeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getStartSizeGradients()!}
label="Start size gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#start-size-over-time"
onCreateRequired={() => {
system.addStartSizeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addStartSizeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getStartSizeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
}
</s> remove <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getEmitRateGradients()!}
label="Velocity gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#emit-rate-over-time"
onCreateRequired={() => {
system.addEmitRateGradient(0, 50, 50);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addEmitRateGradient(0, 50, 50);`
});
}}
mode={GradientGridMode.Factor}
host={system}
codeRecorderPropertyName="getEmitRateGradients()"
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getEmitRateGradients()!}
label="Velocity gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#emit-rate-over-time"
onCreateRequired={() => {
system.addEmitRateGradient(0, 50, 50);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addEmitRateGradient(0, 50, 50);`
});
}}
mode={GradientGridMode.Factor}
host={system}
codeRecorderPropertyName="getEmitRateGradients()"
lockObject={this.props.lockObject}/>
}
</s> remove <TextLineComponent label="Capacity" value={system.getActiveCount().toString()} />
</s> add <TextLineComponent label="Active count" value={system.getActiveCount().toString()} />
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"re... | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/particleSystemPropertyGridComponent.tsx |
import { GPUParticleSystem } from 'babylonjs';
| <mask> import { ColorGradientStepGridComponent } from './colorGradientStepGridComponent';
<mask> import { Color4, Color3 } from 'babylonjs/Maths/math.color';
<mask> import { LinkButtonComponent } from '../../../lines/linkButtonComponent';
<mask> import { IParticleSystem } from 'babylonjs/Particles/IParticleSystem';
<mask>
<mask> export enum GradientGridMode {
<mask> Factor,
<mask> Color3,
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
</s> add return this;
}
private _refreshColorGradient() {
if (this._colorGradients) {
this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
}
| [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/valueGradientGridComponent.tsx |
if (this.props.host instanceof GPUParticleSystem) {
this.props.host.forceRefreshGradients();
}
| <mask> this.forceUpdate();
<mask>
<mask> this.props.globalState.onCodeChangedObservable.notifyObservers({
<mask> object: this.props.host,
<mask> code: `TARGET.${this.props.codeRecorderPropertyName}.splice(${index}, 1);`
<mask> });
<mask> }
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove
<CheckBoxLineComponent label="Use ramp grandients" target={system} propertyName="useRampGradients"/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getRampGradients()!}
label="Ramp gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addRampGradient(0, Color3.White());
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addRampGradient(0, BABYLON.Color3.White());`
});
}}
mode={GradientGridMode.Color3}
host={system}
codeRecorderPropertyName="getRampGradients()"
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getColorRemapGradients()!}
label="Color remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addColorRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addColorRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getColorRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getAlphaRemapGradients()!}
label="Alpha remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addAlphaRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addAlphaRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getAlphaRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<>
<CheckBoxLineComponent label="Use ramp grandients" target={system} propertyName="useRampGradients"/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getRampGradients()!}
label="Ramp gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addRampGradient(0, Color3.White());
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addRampGradient(0, BABYLON.Color3.White());`
});
}}
mode={GradientGridMode.Color3}
host={system}
codeRecorderPropertyName="getRampGradients()"
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getColorRemapGradients()!}
label="Color remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addColorRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addColorRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getColorRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getAlphaRemapGradients()!}
label="Alpha remap gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#ramp-gradients"
onCreateRequired={() => {
system.addAlphaRemapGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addAlphaRemapGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getAlphaRemapGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</>
}
</s> remove <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getLifeTimeGradients()!}
label="Lifetime gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#lifetime"
onCreateRequired={() => {
system.addLifeTimeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addLifeTimeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getLifeTimeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getLifeTimeGradients()!}
label="Lifetime gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#lifetime"
onCreateRequired={() => {
system.addLifeTimeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addLifeTimeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getLifeTimeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
}
</s> remove <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getStartSizeGradients()!}
label="Start size gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#start-size-over-time"
onCreateRequired={() => {
system.addStartSizeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addStartSizeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getStartSizeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getStartSizeGradients()!}
label="Start size gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#start-size-over-time"
onCreateRequired={() => {
system.addStartSizeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addStartSizeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getStartSizeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
}
</s> remove <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getEmitRateGradients()!}
label="Velocity gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#emit-rate-over-time"
onCreateRequired={() => {
system.addEmitRateGradient(0, 50, 50);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addEmitRateGradient(0, 50, 50);`
});
}}
mode={GradientGridMode.Factor}
host={system}
codeRecorderPropertyName="getEmitRateGradients()"
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getEmitRateGradients()!}
label="Velocity gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#emit-rate-over-time"
onCreateRequired={() => {
system.addEmitRateGradient(0, 50, 50);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addEmitRateGradient(0, 50, 50);`
});
}}
mode={GradientGridMode.Factor}
host={system}
codeRecorderPropertyName="getEmitRateGradients()"
lockObject={this.props.lockObject}/>
}
| [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/valueGradientGridComponent.tsx |
if (this.props.host instanceof GPUParticleSystem) {
this.props.host.forceRefreshGradients();
}
| <mask> break;
<mask> }
<mask>
<mask> this.forceUpdate();
<mask> }
<mask>
<mask> checkForReOrder() {
<mask> let gradients = this.props.gradients as Array<IValueGradient>;
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove this._releaseBuffers();
</s> add /** Force the system to rebuild all gradients */
public forceRefreshGradients() {
this._refreshColorGradient();
this._refreshFactorGradient(this._sizeGradients, "_sizeGradientsTexture");
this._refreshFactorGradient(this._angularSpeedGradients, "_angularSpeedGradientsTexture");
this._refreshFactorGradient(this._velocityGradients, "_velocityGradientsTexture");
this._refreshFactorGradient(this._limitVelocityGradients, "_limitVelocityGradientsTexture");
this._refreshFactorGradient(this._dragGradients, "_dragGradientsTexture");
| [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/valueGradientGridComponent.tsx |
updateAndSync() {
if (this.props.host instanceof GPUParticleSystem) {
this.props.host.forceRefreshGradients();
}
this.forceUpdate();
}
| <mask>
<mask> this.forceUpdate();
<mask> }
<mask>
<mask> render() {
<mask> let gradients = this.props.gradients as Nullable<Array<IValueGradient>>;
<mask>
<mask> return (
<mask> <div>
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove let newSystem = ParticleSystem.Parse(jsonObject, scene, "");
</s> add let newSystem = isGpu ? GPUParticleSystem.Parse(jsonObject, scene, "") : ParticleSystem.Parse(jsonObject, scene, "");
</s> remove <ButtonLineComponent label={isStarted ? "Pause" : "Start"} onClick={() => {
</s> add <ButtonLineComponent label={isStarted ? "Stop" : "Start"} onClick={() => {
| [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/valueGradientGridComponent.tsx |
onUpdateGradient={() => this.updateAndSync()}
| <mask> return (
<mask> <FactorGradientStepGridComponent globalState={this.props.globalState}
<mask> lockObject={this.props.lockObject}
<mask> onCheckForReOrder={() => this.checkForReOrder()}
<mask> onUpdateGradient={() => this.forceUpdate()}
<mask> host={this.props.host}
<mask> codeRecorderPropertyName={codeRecorderPropertyName}
<mask> key={"step-" + i} lineIndex={i} gradient={g as FactorGradient} onDelete={() => this.deleteStep(g)}/>
<mask> );
<mask> case GradientGridMode.Color4:
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove onUpdateGradient={() => this.forceUpdate()}
</s> add onUpdateGradient={() => this.updateAndSync()}
</s> remove onUpdateGradient={() => this.forceUpdate()}
</s> add onUpdateGradient={() => this.updateAndSync()}
</s> remove <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getEmitRateGradients()!}
label="Velocity gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#emit-rate-over-time"
onCreateRequired={() => {
system.addEmitRateGradient(0, 50, 50);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addEmitRateGradient(0, 50, 50);`
});
}}
mode={GradientGridMode.Factor}
host={system}
codeRecorderPropertyName="getEmitRateGradients()"
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getEmitRateGradients()!}
label="Velocity gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#emit-rate-over-time"
onCreateRequired={() => {
system.addEmitRateGradient(0, 50, 50);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addEmitRateGradient(0, 50, 50);`
});
}}
mode={GradientGridMode.Factor}
host={system}
codeRecorderPropertyName="getEmitRateGradients()"
lockObject={this.props.lockObject}/>
}
</s> remove <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getStartSizeGradients()!}
label="Start size gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#start-size-over-time"
onCreateRequired={() => {
system.addStartSizeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addStartSizeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getStartSizeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getStartSizeGradients()!}
label="Start size gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#start-size-over-time"
onCreateRequired={() => {
system.addStartSizeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addStartSizeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getStartSizeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/valueGradientGridComponent.tsx |
onUpdateGradient={() => this.updateAndSync()}
| <mask> codeRecorderPropertyName={codeRecorderPropertyName}
<mask> lockObject={this.props.lockObject}
<mask> isColor3={false}
<mask> onCheckForReOrder={() => this.checkForReOrder()}
<mask> onUpdateGradient={() => this.forceUpdate()}
<mask> key={"step-" + i} lineIndex={i} gradient={g as ColorGradient} onDelete={() => this.deleteStep(g)}/>
<mask> );
<mask> case GradientGridMode.Color3:
<mask> return (
<mask> <ColorGradientStepGridComponent globalState={this.props.globalState}
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove onUpdateGradient={() => this.forceUpdate()}
</s> add onUpdateGradient={() => this.updateAndSync()}
</s> remove onUpdateGradient={() => this.forceUpdate()}
</s> add onUpdateGradient={() => this.updateAndSync()}
</s> remove <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getEmitRateGradients()!}
label="Velocity gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#emit-rate-over-time"
onCreateRequired={() => {
system.addEmitRateGradient(0, 50, 50);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addEmitRateGradient(0, 50, 50);`
});
}}
mode={GradientGridMode.Factor}
host={system}
codeRecorderPropertyName="getEmitRateGradients()"
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getEmitRateGradients()!}
label="Velocity gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#emit-rate-over-time"
onCreateRequired={() => {
system.addEmitRateGradient(0, 50, 50);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addEmitRateGradient(0, 50, 50);`
});
}}
mode={GradientGridMode.Factor}
host={system}
codeRecorderPropertyName="getEmitRateGradients()"
lockObject={this.props.lockObject}/>
}
</s> remove <ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getStartSizeGradients()!}
label="Start size gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#start-size-over-time"
onCreateRequired={() => {
system.addStartSizeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addStartSizeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getStartSizeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
</s> add {
system instanceof ParticleSystem &&
<ValueGradientGridComponent globalState={this.props.globalState} gradients={system.getStartSizeGradients()!}
label="Start size gradients"
docLink="https://doc.babylonjs.com/babylon101/particles#start-size-over-time"
onCreateRequired={() => {
system.addStartSizeGradient(0, 1, 1);
this.props.globalState.onCodeChangedObservable.notifyObservers({
object: system,
code: `TARGET.addStartSizeGradient(0, 1, 1);`
});
}}
host={system}
codeRecorderPropertyName="getStartSizeGradients()"
mode={GradientGridMode.Factor}
lockObject={this.props.lockObject}/>
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/valueGradientGridComponent.tsx |
onUpdateGradient={() => this.updateAndSync()}
| <mask> codeRecorderPropertyName={codeRecorderPropertyName}
<mask> lockObject={this.props.lockObject}
<mask> isColor3={true}
<mask> onCheckForReOrder={() => this.checkForReOrder()}
<mask> onUpdateGradient={() => this.forceUpdate()}
<mask> key={"step-" + i} lineIndex={i} gradient={g as Color3Gradient} onDelete={() => this.deleteStep(g)}/>
<mask> );
<mask> }
<mask> })
<mask> }
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove onUpdateGradient={() => this.forceUpdate()}
</s> add onUpdateGradient={() => this.updateAndSync()}
</s> remove onUpdateGradient={() => this.forceUpdate()}
</s> add onUpdateGradient={() => this.updateAndSync()}
</s> remove <div className="button">
</s> add <div className="link-button">
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | inspector/src/components/actionTabs/tabs/propertyGrids/particleSystems/valueGradientGridComponent.tsx |
this._refreshColorGradient();
| <mask>
<mask> let colorGradient = new ColorGradient(gradient, color1);
<mask> this._colorGradients.push(colorGradient);
<mask>
<mask> this._colorGradients.sort((a, b) => {
<mask> if (a.gradient < b.gradient) {
<mask> return -1;
<mask> } else if (a.gradient > b.gradient) {
<mask> return 1;
<mask> }
<mask>
<mask> return 0;
<mask> });
<mask>
<mask> if (this._colorGradientsTexture) {
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
</s> add return this;
}
private _refreshColorGradient() {
if (this._colorGradients) {
this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
}
</s> remove factorGradients.push(valueGradient);
factorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
</s> add factorGradients.push(valueGradient);
</s> remove return 0;
});
</s> add this._releaseBuffers();
</s> remove <ButtonLineComponent label={isStarted ? "Pause" : "Start"} onClick={() => {
</s> add <ButtonLineComponent label={isStarted ? "Stop" : "Start"} onClick={() => {
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | src/Particles/gpuParticleSystem.ts |
this._releaseBuffers();
| <mask> } else if (a.gradient > b.gradient) {
<mask> return 1;
<mask> }
<mask>
<mask> return 0;
<mask> });
<mask>
<mask> if (this._colorGradientsTexture) {
<mask> this._colorGradientsTexture.dispose();
<mask> (<any>this._colorGradientsTexture) = null;
<mask> }
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
</s> add return this;
}
private _refreshColorGradient() {
if (this._colorGradients) {
this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
}
</s> remove this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
</s> add this._refreshColorGradient();
</s> remove factorGradients.push(valueGradient);
factorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
</s> add factorGradients.push(valueGradient);
</s> remove this._releaseBuffers();
</s> add /** Force the system to rebuild all gradients */
public forceRefreshGradients() {
this._refreshColorGradient();
this._refreshFactorGradient(this._sizeGradients, "_sizeGradientsTexture");
this._refreshFactorGradient(this._angularSpeedGradients, "_angularSpeedGradientsTexture");
this._refreshFactorGradient(this._velocityGradients, "_velocityGradientsTexture");
this._refreshFactorGradient(this._limitVelocityGradients, "_limitVelocityGradientsTexture");
this._refreshFactorGradient(this._dragGradients, "_dragGradientsTexture");
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | src/Particles/gpuParticleSystem.ts |
return this;
}
private _refreshColorGradient() {
if (this._colorGradients) {
this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
}
| <mask>
<mask> return 0;
<mask> });
<mask>
<mask> if (this._colorGradientsTexture) {
<mask> this._colorGradientsTexture.dispose();
<mask> (<any>this._colorGradientsTexture) = null;
<mask> }
<mask>
<mask> this._releaseBuffers();
<mask>
<mask> return this;
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove return 0;
});
</s> add this._releaseBuffers();
</s> remove this._releaseBuffers();
</s> add /** Force the system to rebuild all gradients */
public forceRefreshGradients() {
this._refreshColorGradient();
this._refreshFactorGradient(this._sizeGradients, "_sizeGradientsTexture");
this._refreshFactorGradient(this._angularSpeedGradients, "_angularSpeedGradientsTexture");
this._refreshFactorGradient(this._velocityGradients, "_velocityGradientsTexture");
this._refreshFactorGradient(this._limitVelocityGradients, "_limitVelocityGradientsTexture");
this._refreshFactorGradient(this._dragGradients, "_dragGradientsTexture");
</s> remove this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
</s> add this._refreshColorGradient();
</s> remove if (this._sizeGradientsTexture) {
this._sizeGradientsTexture.dispose();
(<any>this._sizeGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._sizeGradients, "_sizeGradientsTexture");
</s> remove
if (this._limitVelocityGradientsTexture) {
this._limitVelocityGradientsTexture.dispose();
(<any>this._limitVelocityGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._limitVelocityGradients, "_limitVelocityGradientsTexture");
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | src/Particles/gpuParticleSystem.ts |
}
| <mask> (<any>this._colorGradientsTexture) = null;
<mask> }
<mask> }
<mask>
<mask> /** Force the system to rebuild all gradients */
<mask> public forceRefreshGradients() {
<mask> this._refreshColorGradient();
<mask> this._refreshFactorGradient(this._sizeGradients, "_sizeGradientsTexture");
<mask> this._refreshFactorGradient(this._angularSpeedGradients, "_angularSpeedGradientsTexture");
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove this._releaseBuffers();
</s> add /** Force the system to rebuild all gradients */
public forceRefreshGradients() {
this._refreshColorGradient();
this._refreshFactorGradient(this._sizeGradients, "_sizeGradientsTexture");
this._refreshFactorGradient(this._angularSpeedGradients, "_angularSpeedGradientsTexture");
this._refreshFactorGradient(this._velocityGradients, "_velocityGradientsTexture");
this._refreshFactorGradient(this._limitVelocityGradients, "_limitVelocityGradientsTexture");
this._refreshFactorGradient(this._dragGradients, "_dragGradientsTexture");
</s> remove if (this._sizeGradientsTexture) {
this._sizeGradientsTexture.dispose();
(<any>this._sizeGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._sizeGradients, "_sizeGradientsTexture");
</s> remove
if (this._angularSpeedGradientsTexture) {
this._angularSpeedGradientsTexture.dispose();
(<any>this._angularSpeedGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._angularSpeedGradients, "_angularSpeedGradientsTexture");
</s> remove return this;
</s> add this._releaseBuffers();
this.reset();
</s> remove if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
</s> add return this;
}
private _refreshColorGradient() {
if (this._colorGradients) {
this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
}
| [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | src/Particles/gpuParticleSystem.ts |
/** Force the system to rebuild all gradients */
public forceRefreshGradients() {
this._refreshColorGradient();
this._refreshFactorGradient(this._sizeGradients, "_sizeGradientsTexture");
this._refreshFactorGradient(this._angularSpeedGradients, "_angularSpeedGradientsTexture");
this._refreshFactorGradient(this._velocityGradients, "_velocityGradientsTexture");
this._refreshFactorGradient(this._limitVelocityGradients, "_limitVelocityGradientsTexture");
this._refreshFactorGradient(this._dragGradients, "_dragGradientsTexture");
| <mask> this._colorGradientsTexture.dispose();
<mask> (<any>this._colorGradientsTexture) = null;
<mask> }
<mask>
<mask> this._releaseBuffers();
<mask>
<mask> return this;
<mask> }
<mask>
<mask> /**
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
</s> add return this;
}
private _refreshColorGradient() {
if (this._colorGradients) {
this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
}
</s> remove return 0;
});
</s> add this._releaseBuffers();
</s> remove return this;
</s> add this._releaseBuffers();
this.reset();
</s> remove if (this._sizeGradientsTexture) {
this._sizeGradientsTexture.dispose();
(<any>this._sizeGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._sizeGradients, "_sizeGradientsTexture");
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | src/Particles/gpuParticleSystem.ts |
this._releaseBuffers();
this.reset();
| <mask> }
<mask>
<mask> this._releaseBuffers();
<mask>
<mask> return this;
<mask> }
<mask>
<mask> /**
<mask> * Remove a specific color gradient
<mask> * @param gradient defines the gradient to remove
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove gradient instanceof ColorGradient &&
<div className="color1">
</s> add this.props.host instanceof ParticleSystem && gradient instanceof ColorGradient &&
<div className="color2">
</s> remove this._releaseBuffers();
</s> add /** Force the system to rebuild all gradients */
public forceRefreshGradients() {
this._refreshColorGradient();
this._refreshFactorGradient(this._sizeGradients, "_sizeGradientsTexture");
this._refreshFactorGradient(this._angularSpeedGradients, "_angularSpeedGradientsTexture");
this._refreshFactorGradient(this._velocityGradients, "_velocityGradientsTexture");
this._refreshFactorGradient(this._limitVelocityGradients, "_limitVelocityGradientsTexture");
this._refreshFactorGradient(this._dragGradients, "_dragGradientsTexture");
</s> remove if (this._sizeGradientsTexture) {
this._sizeGradientsTexture.dispose();
(<any>this._sizeGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._sizeGradients, "_sizeGradientsTexture");
</s> remove
if (this._limitVelocityGradientsTexture) {
this._limitVelocityGradientsTexture.dispose();
(<any>this._limitVelocityGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._limitVelocityGradients, "_limitVelocityGradientsTexture");
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | src/Particles/gpuParticleSystem.ts |
factorGradients.push(valueGradient);
| <mask> private _dragGradientsTexture: RawTexture;
<mask>
<mask> private _addFactorGradient(factorGradients: FactorGradient[], gradient: number, factor: number) {
<mask> let valueGradient = new FactorGradient(gradient, factor);
<mask> factorGradients.push(valueGradient);
<mask>
<mask> factorGradients.sort((a, b) => {
<mask> if (a.gradient < b.gradient) {
<mask> return -1;
<mask> } else if (a.gradient > b.gradient) {
<mask> return 1;
<mask> }
<mask>
<mask> return 0;
<mask> });
<mask>
<mask> this._releaseBuffers();
<mask> }
<mask>
<mask> /**
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
</s> add this._refreshColorGradient();
</s> remove if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
</s> add return this;
}
private _refreshColorGradient() {
if (this._colorGradients) {
this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
}
</s> remove return 0;
});
</s> add this._releaseBuffers();
</s> remove <ButtonLineComponent label={isStarted ? "Pause" : "Start"} onClick={() => {
</s> add <ButtonLineComponent label={isStarted ? "Stop" : "Start"} onClick={() => {
</s> remove if (this._sizeGradientsTexture) {
this._sizeGradientsTexture.dispose();
(<any>this._sizeGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._sizeGradients, "_sizeGradientsTexture");
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | src/Particles/gpuParticleSystem.ts |
this._refreshFactorGradient(this._sizeGradients, "_sizeGradientsTexture");
| <mask> }
<mask>
<mask> this._addFactorGradient(this._sizeGradients, gradient, factor);
<mask>
<mask> if (this._sizeGradientsTexture) {
<mask> this._sizeGradientsTexture.dispose();
<mask> (<any>this._sizeGradientsTexture) = null;
<mask> }
<mask>
<mask> this._releaseBuffers();
<mask>
<mask> return this;
<mask> }
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove
if (this._limitVelocityGradientsTexture) {
this._limitVelocityGradientsTexture.dispose();
(<any>this._limitVelocityGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._limitVelocityGradients, "_limitVelocityGradientsTexture");
</s> remove
if (this._velocityGradientsTexture) {
this._velocityGradientsTexture.dispose();
(<any>this._velocityGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._velocityGradients, "_velocityGradientsTexture");
</s> remove
if (this._angularSpeedGradientsTexture) {
this._angularSpeedGradientsTexture.dispose();
(<any>this._angularSpeedGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._angularSpeedGradients, "_angularSpeedGradientsTexture");
</s> remove
if (this._dragGradientsTexture) {
this._dragGradientsTexture.dispose();
(<any>this._dragGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._dragGradients, "_dragGradientsTexture");
</s> remove if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
</s> add return this;
}
private _refreshColorGradient() {
if (this._colorGradients) {
this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | src/Particles/gpuParticleSystem.ts |
this._refreshFactorGradient(this._angularSpeedGradients, "_angularSpeedGradientsTexture");
| <mask> this._angularSpeedGradients = [];
<mask> }
<mask>
<mask> this._addFactorGradient(this._angularSpeedGradients, gradient, factor);
<mask>
<mask> if (this._angularSpeedGradientsTexture) {
<mask> this._angularSpeedGradientsTexture.dispose();
<mask> (<any>this._angularSpeedGradientsTexture) = null;
<mask> }
<mask>
<mask> this._releaseBuffers();
<mask>
<mask> return this;
<mask> }
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove
if (this._limitVelocityGradientsTexture) {
this._limitVelocityGradientsTexture.dispose();
(<any>this._limitVelocityGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._limitVelocityGradients, "_limitVelocityGradientsTexture");
</s> remove
if (this._velocityGradientsTexture) {
this._velocityGradientsTexture.dispose();
(<any>this._velocityGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._velocityGradients, "_velocityGradientsTexture");
</s> remove
if (this._dragGradientsTexture) {
this._dragGradientsTexture.dispose();
(<any>this._dragGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._dragGradients, "_dragGradientsTexture");
</s> remove if (this._sizeGradientsTexture) {
this._sizeGradientsTexture.dispose();
(<any>this._sizeGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._sizeGradients, "_sizeGradientsTexture");
</s> remove if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
</s> add return this;
}
private _refreshColorGradient() {
if (this._colorGradients) {
this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | src/Particles/gpuParticleSystem.ts |
this._refreshFactorGradient(this._velocityGradients, "_velocityGradientsTexture");
| <mask> this._velocityGradients = [];
<mask> }
<mask>
<mask> this._addFactorGradient(this._velocityGradients, gradient, factor);
<mask>
<mask> if (this._velocityGradientsTexture) {
<mask> this._velocityGradientsTexture.dispose();
<mask> (<any>this._velocityGradientsTexture) = null;
<mask> }
<mask>
<mask> this._releaseBuffers();
<mask>
<mask> return this;
<mask> }
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove
if (this._limitVelocityGradientsTexture) {
this._limitVelocityGradientsTexture.dispose();
(<any>this._limitVelocityGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._limitVelocityGradients, "_limitVelocityGradientsTexture");
</s> remove
if (this._angularSpeedGradientsTexture) {
this._angularSpeedGradientsTexture.dispose();
(<any>this._angularSpeedGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._angularSpeedGradients, "_angularSpeedGradientsTexture");
</s> remove
if (this._dragGradientsTexture) {
this._dragGradientsTexture.dispose();
(<any>this._dragGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._dragGradients, "_dragGradientsTexture");
</s> remove if (this._sizeGradientsTexture) {
this._sizeGradientsTexture.dispose();
(<any>this._sizeGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._sizeGradients, "_sizeGradientsTexture");
</s> remove if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
</s> add return this;
}
private _refreshColorGradient() {
if (this._colorGradients) {
this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | src/Particles/gpuParticleSystem.ts |
this._refreshFactorGradient(this._limitVelocityGradients, "_limitVelocityGradientsTexture");
| <mask> this._limitVelocityGradients = [];
<mask> }
<mask>
<mask> this._addFactorGradient(this._limitVelocityGradients, gradient, factor);
<mask>
<mask> if (this._limitVelocityGradientsTexture) {
<mask> this._limitVelocityGradientsTexture.dispose();
<mask> (<any>this._limitVelocityGradientsTexture) = null;
<mask> }
<mask>
<mask> this._releaseBuffers();
<mask>
<mask> return this;
<mask> }
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove
if (this._velocityGradientsTexture) {
this._velocityGradientsTexture.dispose();
(<any>this._velocityGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._velocityGradients, "_velocityGradientsTexture");
</s> remove
if (this._angularSpeedGradientsTexture) {
this._angularSpeedGradientsTexture.dispose();
(<any>this._angularSpeedGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._angularSpeedGradients, "_angularSpeedGradientsTexture");
</s> remove
if (this._dragGradientsTexture) {
this._dragGradientsTexture.dispose();
(<any>this._dragGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._dragGradients, "_dragGradientsTexture");
</s> remove if (this._sizeGradientsTexture) {
this._sizeGradientsTexture.dispose();
(<any>this._sizeGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._sizeGradients, "_sizeGradientsTexture");
</s> remove if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
</s> add return this;
}
private _refreshColorGradient() {
if (this._colorGradients) {
this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | src/Particles/gpuParticleSystem.ts |
this._refreshFactorGradient(this._dragGradients, "_dragGradientsTexture");
| <mask> this._dragGradients = [];
<mask> }
<mask>
<mask> this._addFactorGradient(this._dragGradients, gradient, factor);
<mask>
<mask> if (this._dragGradientsTexture) {
<mask> this._dragGradientsTexture.dispose();
<mask> (<any>this._dragGradientsTexture) = null;
<mask> }
<mask>
<mask> this._releaseBuffers();
<mask>
<mask> return this;
<mask> }
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove
if (this._limitVelocityGradientsTexture) {
this._limitVelocityGradientsTexture.dispose();
(<any>this._limitVelocityGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._limitVelocityGradients, "_limitVelocityGradientsTexture");
</s> remove
if (this._velocityGradientsTexture) {
this._velocityGradientsTexture.dispose();
(<any>this._velocityGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._velocityGradients, "_velocityGradientsTexture");
</s> remove
if (this._angularSpeedGradientsTexture) {
this._angularSpeedGradientsTexture.dispose();
(<any>this._angularSpeedGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._angularSpeedGradients, "_angularSpeedGradientsTexture");
</s> remove if (this._sizeGradientsTexture) {
this._sizeGradientsTexture.dispose();
(<any>this._sizeGradientsTexture) = null;
}
</s> add this._refreshFactorGradient(this._sizeGradients, "_sizeGradientsTexture");
</s> remove if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
</s> add return this;
}
private _refreshColorGradient() {
if (this._colorGradients) {
this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
}
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | src/Particles/gpuParticleSystem.ts |
if (parsedParticleSystem.textureMask) {
particleSystem.textureMask = Color4.FromArray(parsedParticleSystem.textureMask);
} | <mask> }
<mask>
<mask> ParticleSystem._Parse(parsedParticleSystem, particleSystem, scene, rootUrl);
<mask>
<mask> particleSystem.textureMask = Color4.FromArray(parsedParticleSystem.textureMask);
<mask>
<mask> // Auto start
<mask> if (parsedParticleSystem.preventAutoStart) {
<mask> particleSystem.preventAutoStart = parsedParticleSystem.preventAutoStart;
<mask> }
</s> Fix gpu part with particle editor
Former-commit-id: 9ea3f5247654d57bb6df66ec812397acc1fb49c9 </s> remove let newSystem = ParticleSystem.Parse(jsonObject, scene, "");
</s> add let newSystem = isGpu ? GPUParticleSystem.Parse(jsonObject, scene, "") : ParticleSystem.Parse(jsonObject, scene, "");
</s> remove if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
</s> add return this;
}
private _refreshColorGradient() {
if (this._colorGradients) {
this._colorGradients.sort((a, b) => {
if (a.gradient < b.gradient) {
return -1;
} else if (a.gradient > b.gradient) {
return 1;
}
return 0;
});
if (this._colorGradientsTexture) {
this._colorGradientsTexture.dispose();
(<any>this._colorGradientsTexture) = null;
}
</s> remove return 0;
});
</s> add this._releaseBuffers();
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d80662f4d37c2db678aa92d210913c8bdea11195 | src/Particles/particleSystem.ts |
var rootImage = result.fileInfo.images[0].levels[0];
callback(rootImage.width, rootImage.height, false, true, () => {
| <mask> etc2: caps.etc2 ? true : false
<mask> }
<mask> };
<mask> BasisTools.TranscodeAsync(data, transcodeConfig).then((result)=>{
<mask> callback(result.fileInfo.width, result.fileInfo.height, false, true, () => {
<mask> texture._invertVScale = true;
<mask> if(result.format === -1){
<mask> // No compatable compressed format found, fallback to RGB
<mask> texture.type = Engine.TEXTURETYPE_UNSIGNED_SHORT_5_6_5;
<mask> texture.format = Engine.TEXTUREFORMAT_RGB;
</s> mip map support
Former-commit-id: 5bf8fe98961f583c5e679f141556d475f553c63b </s> remove source.width = result.fileInfo.alignedWidth;
source.height = result.fileInfo.alignedHeight;
</s> add // Fallback requires aligned width/height
source.width = (rootImage.width + 3) & ~3;;
source.height =(rootImage.height + 3) & ~3;
</s> remove var transcodeResult = TranscodeFile(format, fileInfo, loadedFile);
if(transcodeResult.fallbackToRgb565){
</s> add
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
// Begin transcode
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var buffers:Array<any> = [];
fileInfo.images.forEach((image, imageIndex)=>{
if(config.loadSingleImage === undefined || config.loadSingleImage === imageIndex){
if(config.loadMipmapLevels === false){
var levelInfo = image.levels[0];
levelInfo.transcodedPixels = TranscodeLevel(loadedFile, imageIndex, 0, format!, needsConversion);
buffers.push(levelInfo.transcodedPixels.buffer)
}else{
image.levels.forEach((levelInfo, levelIndex)=>{
levelInfo.transcodedPixels = TranscodeLevel(loadedFile, imageIndex, levelIndex, format!, needsConversion);
buffers.push(levelInfo.transcodedPixels.buffer)
})
}
}
})
// Close file
loadedFile.close();
loadedFile.delete();
if(needsConversion){
</s> remove texture.getEngine()._uploadDataToTextureDirectly(source, result.pixels, 0, 0, Engine.TEXTUREFORMAT_RGB, true);
</s> add texture.getEngine()._uploadDataToTextureDirectly(source, rootImage.transcodedPixels, 0, 0, Engine.TEXTUREFORMAT_RGB, true);
</s> remove /**
* Transcodes the basis file to the requested format to be transferred to the gpu
* @param format fromat to be transferred to
* @param fileInfo information about the loaded file
* @param loadedFile the loaded basis file
* @returns the resulting pixels and if the transcode fell back to using Rgb565
*/
function TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any) {
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var dstSize = loadedFile.getImageTranscodedSizeInBytes(0, 0, format);
</s> add function TranscodeLevel(loadedFile:any, imageIndex:number, levelIndex:number, format: number, convertToRgb565: boolean){
var dstSize = loadedFile.getImageTranscodedSizeInBytes(imageIndex, levelIndex, format);
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d878e6374ef7e1cf8dca7d9006099fd492040e82 | src/Materials/Textures/Loaders/basisTextureLoader.ts |
// Fallback requires aligned width/height
source.width = (rootImage.width + 3) & ~3;;
source.height =(rootImage.height + 3) & ~3;
| <mask> let source = new InternalTexture(texture.getEngine(), InternalTexture.DATASOURCE_TEMP);
<mask>
<mask> source.type = Engine.TEXTURETYPE_UNSIGNED_SHORT_5_6_5;
<mask> source.format = Engine.TEXTUREFORMAT_RGB;
<mask> source.width = result.fileInfo.alignedWidth;
<mask> source.height = result.fileInfo.alignedHeight;
<mask> texture.getEngine()._bindTextureDirectly(source.getEngine()._gl.TEXTURE_2D, source, true);
<mask> texture.getEngine()._uploadDataToTextureDirectly(source, result.pixels, 0, 0, Engine.TEXTUREFORMAT_RGB, true);
<mask>
<mask> // Resize to power of two
<mask> source.getEngine()._rescaleTexture(source, texture, texture.getEngine().scenes[0], source.getEngine()._getInternalFormat(Engine.TEXTUREFORMAT_RGB), () => {
</s> mip map support
Former-commit-id: 5bf8fe98961f583c5e679f141556d475f553c63b </s> remove texture.getEngine()._uploadDataToTextureDirectly(source, result.pixels, 0, 0, Engine.TEXTUREFORMAT_RGB, true);
</s> add texture.getEngine()._uploadDataToTextureDirectly(source, rootImage.transcodedPixels, 0, 0, Engine.TEXTUREFORMAT_RGB, true);
</s> remove callback(result.fileInfo.width, result.fileInfo.height, false, true, () => {
</s> add var rootImage = result.fileInfo.images[0].levels[0];
callback(rootImage.width, rootImage.height, false, true, () => {
</s> remove texture.width = result.fileInfo.width;
texture.height = result.fileInfo.height;
texture.getEngine()._uploadCompressedDataToTextureDirectly(texture, BasisTools.GetInternalFormatFromBasisFormat(result.format!), result.fileInfo.width, result.fileInfo.height, result.pixels, 0, 0);
</s> add texture.width = rootImage.width;
texture.height = rootImage.height;
// Upload all mip levels in the file
result.fileInfo.images[0].levels.forEach((level, index)=>{
texture.getEngine()._uploadCompressedDataToTextureDirectly(texture, BasisTools.GetInternalFormatFromBasisFormat(result.format!), level.width, level.height, level.transcodedPixels, 0, index);
})
</s> remove if (needsConversion) {
dst = ConvertDxtToRgb565(dst, 0, fileInfo.alignedWidth, fileInfo.alignedHeight);
</s> add if (convertToRgb565) {
var alignedWidth = (loadedFile.getImageWidth(imageIndex, levelIndex) + 3) & ~3;
var alignedHeight = (loadedFile.getImageHeight(imageIndex, levelIndex) + 3) & ~3;
dst = ConvertDxtToRgb565(dst, 0, alignedWidth, alignedHeight);
</s> remove /**
* Transcodes the basis file to the requested format to be transferred to the gpu
* @param format fromat to be transferred to
* @param fileInfo information about the loaded file
* @param loadedFile the loaded basis file
* @returns the resulting pixels and if the transcode fell back to using Rgb565
*/
function TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any) {
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var dstSize = loadedFile.getImageTranscodedSizeInBytes(0, 0, format);
</s> add function TranscodeLevel(loadedFile:any, imageIndex:number, levelIndex:number, format: number, convertToRgb565: boolean){
var dstSize = loadedFile.getImageTranscodedSizeInBytes(imageIndex, levelIndex, format);
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d878e6374ef7e1cf8dca7d9006099fd492040e82 | src/Materials/Textures/Loaders/basisTextureLoader.ts |
texture.getEngine()._uploadDataToTextureDirectly(source, rootImage.transcodedPixels, 0, 0, Engine.TEXTUREFORMAT_RGB, true);
| <mask> source.format = Engine.TEXTUREFORMAT_RGB;
<mask> source.width = result.fileInfo.alignedWidth;
<mask> source.height = result.fileInfo.alignedHeight;
<mask> texture.getEngine()._bindTextureDirectly(source.getEngine()._gl.TEXTURE_2D, source, true);
<mask> texture.getEngine()._uploadDataToTextureDirectly(source, result.pixels, 0, 0, Engine.TEXTUREFORMAT_RGB, true);
<mask>
<mask> // Resize to power of two
<mask> source.getEngine()._rescaleTexture(source, texture, texture.getEngine().scenes[0], source.getEngine()._getInternalFormat(Engine.TEXTUREFORMAT_RGB), () => {
<mask> source.getEngine()._releaseTexture(source);
<mask> source.getEngine()._bindTextureDirectly(source.getEngine()._gl.TEXTURE_2D, texture, true);
</s> mip map support
Former-commit-id: 5bf8fe98961f583c5e679f141556d475f553c63b </s> remove source.width = result.fileInfo.alignedWidth;
source.height = result.fileInfo.alignedHeight;
</s> add // Fallback requires aligned width/height
source.width = (rootImage.width + 3) & ~3;;
source.height =(rootImage.height + 3) & ~3;
</s> remove texture.width = result.fileInfo.width;
texture.height = result.fileInfo.height;
texture.getEngine()._uploadCompressedDataToTextureDirectly(texture, BasisTools.GetInternalFormatFromBasisFormat(result.format!), result.fileInfo.width, result.fileInfo.height, result.pixels, 0, 0);
</s> add texture.width = rootImage.width;
texture.height = rootImage.height;
// Upload all mip levels in the file
result.fileInfo.images[0].levels.forEach((level, index)=>{
texture.getEngine()._uploadCompressedDataToTextureDirectly(texture, BasisTools.GetInternalFormatFromBasisFormat(result.format!), level.width, level.height, level.transcodedPixels, 0, index);
})
</s> remove callback(result.fileInfo.width, result.fileInfo.height, false, true, () => {
</s> add var rootImage = result.fileInfo.images[0].levels[0];
callback(rootImage.width, rootImage.height, false, true, () => {
</s> remove if (needsConversion) {
dst = ConvertDxtToRgb565(dst, 0, fileInfo.alignedWidth, fileInfo.alignedHeight);
</s> add if (convertToRgb565) {
var alignedWidth = (loadedFile.getImageWidth(imageIndex, levelIndex) + 3) & ~3;
var alignedHeight = (loadedFile.getImageHeight(imageIndex, levelIndex) + 3) & ~3;
dst = ConvertDxtToRgb565(dst, 0, alignedWidth, alignedHeight);
</s> remove /**
* Transcodes the basis file to the requested format to be transferred to the gpu
* @param format fromat to be transferred to
* @param fileInfo information about the loaded file
* @param loadedFile the loaded basis file
* @returns the resulting pixels and if the transcode fell back to using Rgb565
*/
function TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any) {
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var dstSize = loadedFile.getImageTranscodedSizeInBytes(0, 0, format);
</s> add function TranscodeLevel(loadedFile:any, imageIndex:number, levelIndex:number, format: number, convertToRgb565: boolean){
var dstSize = loadedFile.getImageTranscodedSizeInBytes(imageIndex, levelIndex, format);
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d878e6374ef7e1cf8dca7d9006099fd492040e82 | src/Materials/Textures/Loaders/basisTextureLoader.ts |
texture.width = rootImage.width;
texture.height = rootImage.height;
// Upload all mip levels in the file
result.fileInfo.images[0].levels.forEach((level, index)=>{
texture.getEngine()._uploadCompressedDataToTextureDirectly(texture, BasisTools.GetInternalFormatFromBasisFormat(result.format!), level.width, level.height, level.transcodedPixels, 0, index);
})
| <mask> source.getEngine()._releaseTexture(source);
<mask> source.getEngine()._bindTextureDirectly(source.getEngine()._gl.TEXTURE_2D, texture, true);
<mask> });
<mask> }else{
<mask> texture.width = result.fileInfo.width;
<mask> texture.height = result.fileInfo.height;
<mask> texture.getEngine()._uploadCompressedDataToTextureDirectly(texture, BasisTools.GetInternalFormatFromBasisFormat(result.format!), result.fileInfo.width, result.fileInfo.height, result.pixels, 0, 0);
<mask> if(texture.getEngine().webGLVersion < 2 && (Scalar.Log2(texture.width) % 1 !== 0 || Scalar.Log2(texture.height) % 1 !== 0)){
<mask> Tools.Warn("Loaded .basis texture width and height are not a power of two. Texture wrapping will be set to Texture.CLAMP_ADDRESSMODE as other modes are not supported with non power of two dimensions in webGL 1.");
<mask> texture._cachedWrapU = Texture.CLAMP_ADDRESSMODE;
<mask> }
<mask> }
</s> mip map support
Former-commit-id: 5bf8fe98961f583c5e679f141556d475f553c63b </s> remove texture.getEngine()._uploadDataToTextureDirectly(source, result.pixels, 0, 0, Engine.TEXTUREFORMAT_RGB, true);
</s> add texture.getEngine()._uploadDataToTextureDirectly(source, rootImage.transcodedPixels, 0, 0, Engine.TEXTUREFORMAT_RGB, true);
</s> remove source.width = result.fileInfo.alignedWidth;
source.height = result.fileInfo.alignedHeight;
</s> add // Fallback requires aligned width/height
source.width = (rootImage.width + 3) & ~3;;
source.height =(rootImage.height + 3) & ~3;
</s> remove var width = basisFile.getImageWidth(0, 0);
var height = basisFile.getImageHeight(0, 0);
var alignedWidth = (width + 3) & ~3;
var alignedHeight = (height + 3) & ~3;
var info = { hasAlpha, width, height, alignedWidth, alignedHeight };
</s> add var imageCount = basisFile.getNumImages();
var images = []
for(var i = 0;i<imageCount;i++){
var imageInfo = {
levels: ([] as Array<any>)
}
var levelCount = basisFile.getNumLevels(i);
for(var level = 0;level < levelCount;level++){
var levelInfo = {
width: basisFile.getImageWidth(i, level),
height: basisFile.getImageHeight(i, level)
}
imageInfo.levels.push(levelInfo);
}
images.push(imageInfo)
}
var info = { hasAlpha, images };
</s> remove loadedFile.close();
loadedFile.delete();
</s> add </s> remove
return {
fallbackToRgb565: needsConversion, pixels: dst
};
</s> add return dst;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d878e6374ef7e1cf8dca7d9006099fd492040e82 | src/Materials/Textures/Loaders/basisTextureLoader.ts |
* Info about each image of the basis file
| <mask> * If the file has alpha
<mask> */
<mask> public hasAlpha: boolean;
<mask> /**
<mask> * Width of the image
<mask> */
<mask> public width: number;
<mask> /**
<mask> * Height of the image
<mask> */
</s> mip map support
Former-commit-id: 5bf8fe98961f583c5e679f141556d475f553c63b </s> remove public width: number;
/**
* Height of the image
*/
public height: number;
/**
* Aligned width used when falling back to Rgb565 ((width + 3) & ~3)
*/
public alignedWidth: number;
/**
* Aligned height used when falling back to Rgb565 ((height + 3) & ~3)
*/
public alignedHeight: number;
</s> add public images: Array<{levels: Array<{width: number, height: number, transcodedPixels: ArrayBufferView}>}>
</s> remove public static TranscodeAsync(imageData: ArrayBuffer, config:BasisTranscodeConfiguration):Promise<{fileInfo:any, pixels: any, format:number}>{
</s> add public static TranscodeAsync(imageData: ArrayBuffer, config:BasisTranscodeConfiguration):Promise<{fileInfo:BasisFileInfo, format:number}>{
</s> remove var width = basisFile.getImageWidth(0, 0);
var height = basisFile.getImageHeight(0, 0);
var alignedWidth = (width + 3) & ~3;
var alignedHeight = (height + 3) & ~3;
var info = { hasAlpha, width, height, alignedWidth, alignedHeight };
</s> add var imageCount = basisFile.getNumImages();
var images = []
for(var i = 0;i<imageCount;i++){
var imageInfo = {
levels: ([] as Array<any>)
}
var levelCount = basisFile.getNumLevels(i);
for(var level = 0;level < levelCount;level++){
var levelInfo = {
width: basisFile.getImageWidth(i, level),
height: basisFile.getImageHeight(i, level)
}
imageInfo.levels.push(levelInfo);
}
images.push(imageInfo)
}
var info = { hasAlpha, images };
</s> remove /**
* Transcodes the basis file to the requested format to be transferred to the gpu
* @param format fromat to be transferred to
* @param fileInfo information about the loaded file
* @param loadedFile the loaded basis file
* @returns the resulting pixels and if the transcode fell back to using Rgb565
*/
function TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any) {
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var dstSize = loadedFile.getImageTranscodedSizeInBytes(0, 0, format);
</s> add function TranscodeLevel(loadedFile:any, imageIndex:number, levelIndex:number, format: number, convertToRgb565: boolean){
var dstSize = loadedFile.getImageTranscodedSizeInBytes(imageIndex, levelIndex, format);
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d878e6374ef7e1cf8dca7d9006099fd492040e82 | src/Misc/basis.ts |
public images: Array<{levels: Array<{width: number, height: number, transcodedPixels: ArrayBufferView}>}>
| <mask> public hasAlpha: boolean;
<mask> /**
<mask> * Width of the image
<mask> */
<mask> public width: number;
<mask> /**
<mask> * Height of the image
<mask> */
<mask> public height: number;
<mask> /**
<mask> * Aligned width used when falling back to Rgb565 ((width + 3) & ~3)
<mask> */
<mask> public alignedWidth: number;
<mask> /**
<mask> * Aligned height used when falling back to Rgb565 ((height + 3) & ~3)
<mask> */
<mask> public alignedHeight: number;
<mask> }
<mask>
<mask> /**
<mask> * Configuration options for the Basis transcoder
<mask> */
</s> mip map support
Former-commit-id: 5bf8fe98961f583c5e679f141556d475f553c63b </s> remove * Width of the image
</s> add * Info about each image of the basis file
</s> remove public static TranscodeAsync(imageData: ArrayBuffer, config:BasisTranscodeConfiguration):Promise<{fileInfo:any, pixels: any, format:number}>{
</s> add public static TranscodeAsync(imageData: ArrayBuffer, config:BasisTranscodeConfiguration):Promise<{fileInfo:BasisFileInfo, format:number}>{
</s> remove var width = basisFile.getImageWidth(0, 0);
var height = basisFile.getImageHeight(0, 0);
var alignedWidth = (width + 3) & ~3;
var alignedHeight = (height + 3) & ~3;
var info = { hasAlpha, width, height, alignedWidth, alignedHeight };
</s> add var imageCount = basisFile.getNumImages();
var images = []
for(var i = 0;i<imageCount;i++){
var imageInfo = {
levels: ([] as Array<any>)
}
var levelCount = basisFile.getNumLevels(i);
for(var level = 0;level < levelCount;level++){
var levelInfo = {
width: basisFile.getImageWidth(i, level),
height: basisFile.getImageHeight(i, level)
}
imageInfo.levels.push(levelInfo);
}
images.push(imageInfo)
}
var info = { hasAlpha, images };
</s> remove /**
* Transcodes the basis file to the requested format to be transferred to the gpu
* @param format fromat to be transferred to
* @param fileInfo information about the loaded file
* @param loadedFile the loaded basis file
* @returns the resulting pixels and if the transcode fell back to using Rgb565
*/
function TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any) {
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var dstSize = loadedFile.getImageTranscodedSizeInBytes(0, 0, format);
</s> add function TranscodeLevel(loadedFile:any, imageIndex:number, levelIndex:number, format: number, convertToRgb565: boolean){
var dstSize = loadedFile.getImageTranscodedSizeInBytes(imageIndex, levelIndex, format);
| [
"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/d878e6374ef7e1cf8dca7d9006099fd492040e82 | src/Misc/basis.ts |
/**
* If mipmap levels should be loaded for transcoded images (Default: true)
*/
loadMipmapLevels?:boolean
/**
* Index of a single image to load (Default: all images)
*/
loadSingleImage?:number
| <mask> */
<mask> etc2?:boolean;
<mask> };
<mask> }
<mask>
<mask> /**
<mask> * @hidden
<mask> * Enum of basis transcoder formats
<mask> */
</s> mip map support
Former-commit-id: 5bf8fe98961f583c5e679f141556d475f553c63b </s> remove public width: number;
/**
* Height of the image
*/
public height: number;
/**
* Aligned width used when falling back to Rgb565 ((width + 3) & ~3)
*/
public alignedWidth: number;
/**
* Aligned height used when falling back to Rgb565 ((height + 3) & ~3)
*/
public alignedHeight: number;
</s> add public images: Array<{levels: Array<{width: number, height: number, transcodedPixels: ArrayBufferView}>}>
</s> remove * Width of the image
</s> add * Info about each image of the basis file
</s> remove var width = basisFile.getImageWidth(0, 0);
var height = basisFile.getImageHeight(0, 0);
var alignedWidth = (width + 3) & ~3;
var alignedHeight = (height + 3) & ~3;
var info = { hasAlpha, width, height, alignedWidth, alignedHeight };
</s> add var imageCount = basisFile.getNumImages();
var images = []
for(var i = 0;i<imageCount;i++){
var imageInfo = {
levels: ([] as Array<any>)
}
var levelCount = basisFile.getNumLevels(i);
for(var level = 0;level < levelCount;level++){
var levelInfo = {
width: basisFile.getImageWidth(i, level),
height: basisFile.getImageHeight(i, level)
}
imageInfo.levels.push(levelInfo);
}
images.push(imageInfo)
}
var info = { hasAlpha, images };
</s> remove /**
* Transcodes the basis file to the requested format to be transferred to the gpu
* @param format fromat to be transferred to
* @param fileInfo information about the loaded file
* @param loadedFile the loaded basis file
* @returns the resulting pixels and if the transcode fell back to using Rgb565
*/
function TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any) {
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var dstSize = loadedFile.getImageTranscodedSizeInBytes(0, 0, format);
</s> add function TranscodeLevel(loadedFile:any, imageIndex:number, levelIndex:number, format: number, convertToRgb565: boolean){
var dstSize = loadedFile.getImageTranscodedSizeInBytes(imageIndex, levelIndex, format);
</s> remove
return {
fallbackToRgb565: needsConversion, pixels: dst
};
</s> add return dst;
| [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d878e6374ef7e1cf8dca7d9006099fd492040e82 | src/Misc/basis.ts |
public static TranscodeAsync(imageData: ArrayBuffer, config:BasisTranscodeConfiguration):Promise<{fileInfo:BasisFileInfo, format:number}>{
| <mask> * @param imageData image data to transcode
<mask> * @param config configuration options for the transcoding
<mask> * @returns a promise resulting in the transcoded image
<mask> */
<mask> public static TranscodeAsync(imageData: ArrayBuffer, config:BasisTranscodeConfiguration):Promise<{fileInfo:any, pixels: any, format:number}>{
<mask> return new Promise((res)=>{
<mask> this._CreateWorkerAsync().then(()=>{
<mask> var messageHandler = (msg:any)=>{
<mask> if(msg.data.action === "transcode"){
<mask> this._Worker!.removeEventListener("message", messageHandler);
</s> mip map support
Former-commit-id: 5bf8fe98961f583c5e679f141556d475f553c63b </s> remove /**
* Transcodes the basis file to the requested format to be transferred to the gpu
* @param format fromat to be transferred to
* @param fileInfo information about the loaded file
* @param loadedFile the loaded basis file
* @returns the resulting pixels and if the transcode fell back to using Rgb565
*/
function TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any) {
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var dstSize = loadedFile.getImageTranscodedSizeInBytes(0, 0, format);
</s> add function TranscodeLevel(loadedFile:any, imageIndex:number, levelIndex:number, format: number, convertToRgb565: boolean){
var dstSize = loadedFile.getImageTranscodedSizeInBytes(imageIndex, levelIndex, format);
</s> remove public width: number;
/**
* Height of the image
*/
public height: number;
/**
* Aligned width used when falling back to Rgb565 ((width + 3) & ~3)
*/
public alignedWidth: number;
/**
* Aligned height used when falling back to Rgb565 ((height + 3) & ~3)
*/
public alignedHeight: number;
</s> add public images: Array<{levels: Array<{width: number, height: number, transcodedPixels: ArrayBufferView}>}>
</s> remove * Width of the image
</s> add * Info about each image of the basis file
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d878e6374ef7e1cf8dca7d9006099fd492040e82 | src/Misc/basis.ts |
var config:BasisTranscodeConfiguration = event.data.config;
| <mask> }else if(event.data.action === "transcode"){
<mask> // Transcode the basis image and return the resulting pixels
<mask> var imgData = event.data.imageData;
<mask> var loadedFile = new Module.BasisFile(new Uint8Array(imgData));
<mask> var fileInfo = GetFileInfo(loadedFile);
<mask> var format = event.data.ignoreSupportedFormats ? null : GetSupportedTranscodeFormat(event.data.config, fileInfo);
<mask>
<mask> var needsConversion = false;
</s> mip map support
Former-commit-id: 5bf8fe98961f583c5e679f141556d475f553c63b </s> remove var transcodeResult = TranscodeFile(format, fileInfo, loadedFile);
if(transcodeResult.fallbackToRgb565){
</s> add
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
// Begin transcode
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var buffers:Array<any> = [];
fileInfo.images.forEach((image, imageIndex)=>{
if(config.loadSingleImage === undefined || config.loadSingleImage === imageIndex){
if(config.loadMipmapLevels === false){
var levelInfo = image.levels[0];
levelInfo.transcodedPixels = TranscodeLevel(loadedFile, imageIndex, 0, format!, needsConversion);
buffers.push(levelInfo.transcodedPixels.buffer)
}else{
image.levels.forEach((levelInfo, levelIndex)=>{
levelInfo.transcodedPixels = TranscodeLevel(loadedFile, imageIndex, levelIndex, format!, needsConversion);
buffers.push(levelInfo.transcodedPixels.buffer)
})
}
}
})
// Close file
loadedFile.close();
loadedFile.delete();
if(needsConversion){
</s> remove /**
* Transcodes the basis file to the requested format to be transferred to the gpu
* @param format fromat to be transferred to
* @param fileInfo information about the loaded file
* @param loadedFile the loaded basis file
* @returns the resulting pixels and if the transcode fell back to using Rgb565
*/
function TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any) {
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var dstSize = loadedFile.getImageTranscodedSizeInBytes(0, 0, format);
</s> add function TranscodeLevel(loadedFile:any, imageIndex:number, levelIndex:number, format: number, convertToRgb565: boolean){
var dstSize = loadedFile.getImageTranscodedSizeInBytes(imageIndex, levelIndex, format);
</s> remove public static TranscodeAsync(imageData: ArrayBuffer, config:BasisTranscodeConfiguration):Promise<{fileInfo:any, pixels: any, format:number}>{
</s> add public static TranscodeAsync(imageData: ArrayBuffer, config:BasisTranscodeConfiguration):Promise<{fileInfo:BasisFileInfo, format:number}>{
</s> remove var width = basisFile.getImageWidth(0, 0);
var height = basisFile.getImageHeight(0, 0);
var alignedWidth = (width + 3) & ~3;
var alignedHeight = (height + 3) & ~3;
var info = { hasAlpha, width, height, alignedWidth, alignedHeight };
</s> add var imageCount = basisFile.getNumImages();
var images = []
for(var i = 0;i<imageCount;i++){
var imageInfo = {
levels: ([] as Array<any>)
}
var levelCount = basisFile.getNumLevels(i);
for(var level = 0;level < levelCount;level++){
var levelInfo = {
width: basisFile.getImageWidth(i, level),
height: basisFile.getImageHeight(i, level)
}
imageInfo.levels.push(levelInfo);
}
images.push(imageInfo)
}
var info = { hasAlpha, images };
</s> remove callback(result.fileInfo.width, result.fileInfo.height, false, true, () => {
</s> add var rootImage = result.fileInfo.images[0].levels[0];
callback(rootImage.width, rootImage.height, false, true, () => {
| [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d878e6374ef7e1cf8dca7d9006099fd492040e82 | src/Misc/basis.ts |
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
// Begin transcode
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var buffers:Array<any> = [];
fileInfo.images.forEach((image, imageIndex)=>{
if(config.loadSingleImage === undefined || config.loadSingleImage === imageIndex){
if(config.loadMipmapLevels === false){
var levelInfo = image.levels[0];
levelInfo.transcodedPixels = TranscodeLevel(loadedFile, imageIndex, 0, format!, needsConversion);
buffers.push(levelInfo.transcodedPixels.buffer)
}else{
image.levels.forEach((levelInfo, levelIndex)=>{
levelInfo.transcodedPixels = TranscodeLevel(loadedFile, imageIndex, levelIndex, format!, needsConversion);
buffers.push(levelInfo.transcodedPixels.buffer)
})
}
}
})
// Close file
loadedFile.close();
loadedFile.delete();
if(needsConversion){
| <mask> var imgData = event.data.imageData;
<mask> var loadedFile = new Module.BasisFile(new Uint8Array(imgData));
<mask> var fileInfo = GetFileInfo(loadedFile);
<mask> var format = event.data.ignoreSupportedFormats ? null : GetSupportedTranscodeFormat(event.data.config, fileInfo);
<mask> var transcodeResult = TranscodeFile(format, fileInfo, loadedFile);
<mask> if(transcodeResult.fallbackToRgb565){
<mask> format = -1;
<mask> }
<mask> postMessage({action: "transcode", pixels:transcodeResult.pixels, fileInfo: fileInfo, format: format}, [transcodeResult.pixels.buffer]);
<mask> }
<mask>
</s> mip map support
Former-commit-id: 5bf8fe98961f583c5e679f141556d475f553c63b </s> remove postMessage({action: "transcode", pixels:transcodeResult.pixels, fileInfo: fileInfo, format: format}, [transcodeResult.pixels.buffer]);
</s> add postMessage({action: "transcode", fileInfo: fileInfo, format: format}, buffers);
</s> remove /**
* Transcodes the basis file to the requested format to be transferred to the gpu
* @param format fromat to be transferred to
* @param fileInfo information about the loaded file
* @param loadedFile the loaded basis file
* @returns the resulting pixels and if the transcode fell back to using Rgb565
*/
function TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any) {
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var dstSize = loadedFile.getImageTranscodedSizeInBytes(0, 0, format);
</s> add function TranscodeLevel(loadedFile:any, imageIndex:number, levelIndex:number, format: number, convertToRgb565: boolean){
var dstSize = loadedFile.getImageTranscodedSizeInBytes(imageIndex, levelIndex, format);
</s> remove var width = basisFile.getImageWidth(0, 0);
var height = basisFile.getImageHeight(0, 0);
var alignedWidth = (width + 3) & ~3;
var alignedHeight = (height + 3) & ~3;
var info = { hasAlpha, width, height, alignedWidth, alignedHeight };
</s> add var imageCount = basisFile.getNumImages();
var images = []
for(var i = 0;i<imageCount;i++){
var imageInfo = {
levels: ([] as Array<any>)
}
var levelCount = basisFile.getNumLevels(i);
for(var level = 0;level < levelCount;level++){
var levelInfo = {
width: basisFile.getImageWidth(i, level),
height: basisFile.getImageHeight(i, level)
}
imageInfo.levels.push(levelInfo);
}
images.push(imageInfo)
}
var info = { hasAlpha, images };
</s> remove callback(result.fileInfo.width, result.fileInfo.height, false, true, () => {
</s> add var rootImage = result.fileInfo.images[0].levels[0];
callback(rootImage.width, rootImage.height, false, true, () => {
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d878e6374ef7e1cf8dca7d9006099fd492040e82 | src/Misc/basis.ts |
postMessage({action: "transcode", fileInfo: fileInfo, format: format}, buffers);
| <mask> var transcodeResult = TranscodeFile(format, fileInfo, loadedFile);
<mask> if(transcodeResult.fallbackToRgb565){
<mask> format = -1;
<mask> }
<mask> postMessage({action: "transcode", pixels:transcodeResult.pixels, fileInfo: fileInfo, format: format}, [transcodeResult.pixels.buffer]);
<mask> }
<mask>
<mask> };
<mask>
<mask> /**
</s> mip map support
Former-commit-id: 5bf8fe98961f583c5e679f141556d475f553c63b </s> remove var transcodeResult = TranscodeFile(format, fileInfo, loadedFile);
if(transcodeResult.fallbackToRgb565){
</s> add
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
// Begin transcode
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var buffers:Array<any> = [];
fileInfo.images.forEach((image, imageIndex)=>{
if(config.loadSingleImage === undefined || config.loadSingleImage === imageIndex){
if(config.loadMipmapLevels === false){
var levelInfo = image.levels[0];
levelInfo.transcodedPixels = TranscodeLevel(loadedFile, imageIndex, 0, format!, needsConversion);
buffers.push(levelInfo.transcodedPixels.buffer)
}else{
image.levels.forEach((levelInfo, levelIndex)=>{
levelInfo.transcodedPixels = TranscodeLevel(loadedFile, imageIndex, levelIndex, format!, needsConversion);
buffers.push(levelInfo.transcodedPixels.buffer)
})
}
}
})
// Close file
loadedFile.close();
loadedFile.delete();
if(needsConversion){
</s> remove /**
* Transcodes the basis file to the requested format to be transferred to the gpu
* @param format fromat to be transferred to
* @param fileInfo information about the loaded file
* @param loadedFile the loaded basis file
* @returns the resulting pixels and if the transcode fell back to using Rgb565
*/
function TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any) {
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var dstSize = loadedFile.getImageTranscodedSizeInBytes(0, 0, format);
</s> add function TranscodeLevel(loadedFile:any, imageIndex:number, levelIndex:number, format: number, convertToRgb565: boolean){
var dstSize = loadedFile.getImageTranscodedSizeInBytes(imageIndex, levelIndex, format);
</s> remove var width = basisFile.getImageWidth(0, 0);
var height = basisFile.getImageHeight(0, 0);
var alignedWidth = (width + 3) & ~3;
var alignedHeight = (height + 3) & ~3;
var info = { hasAlpha, width, height, alignedWidth, alignedHeight };
</s> add var imageCount = basisFile.getNumImages();
var images = []
for(var i = 0;i<imageCount;i++){
var imageInfo = {
levels: ([] as Array<any>)
}
var levelCount = basisFile.getNumLevels(i);
for(var level = 0;level < levelCount;level++){
var levelInfo = {
width: basisFile.getImageWidth(i, level),
height: basisFile.getImageHeight(i, level)
}
imageInfo.levels.push(levelInfo);
}
images.push(imageInfo)
}
var info = { hasAlpha, images };
</s> remove callback(result.fileInfo.width, result.fileInfo.height, false, true, () => {
</s> add var rootImage = result.fileInfo.images[0].levels[0];
callback(rootImage.width, rootImage.height, false, true, () => {
</s> remove if (needsConversion) {
dst = ConvertDxtToRgb565(dst, 0, fileInfo.alignedWidth, fileInfo.alignedHeight);
</s> add if (convertToRgb565) {
var alignedWidth = (loadedFile.getImageWidth(imageIndex, levelIndex) + 3) & ~3;
var alignedHeight = (loadedFile.getImageHeight(imageIndex, levelIndex) + 3) & ~3;
dst = ConvertDxtToRgb565(dst, 0, alignedWidth, alignedHeight);
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d878e6374ef7e1cf8dca7d9006099fd492040e82 | src/Misc/basis.ts |
var imageCount = basisFile.getNumImages();
var images = []
for(var i = 0;i<imageCount;i++){
var imageInfo = {
levels: ([] as Array<any>)
}
var levelCount = basisFile.getNumLevels(i);
for(var level = 0;level < levelCount;level++){
var levelInfo = {
width: basisFile.getImageWidth(i, level),
height: basisFile.getImageHeight(i, level)
}
imageInfo.levels.push(levelInfo);
}
images.push(imageInfo)
}
var info = { hasAlpha, images };
| <mask> * @returns information about the basis file
<mask> */
<mask> function GetFileInfo(basisFile: any): BasisFileInfo {
<mask> var hasAlpha = basisFile.getHasAlpha();
<mask> var width = basisFile.getImageWidth(0, 0);
<mask> var height = basisFile.getImageHeight(0, 0);
<mask> var alignedWidth = (width + 3) & ~3;
<mask> var alignedHeight = (height + 3) & ~3;
<mask> var info = { hasAlpha, width, height, alignedWidth, alignedHeight };
<mask> return info;
<mask> }
<mask>
<mask> /**
<mask> * Transcodes the basis file to the requested format to be transferred to the gpu
</s> mip map support
Former-commit-id: 5bf8fe98961f583c5e679f141556d475f553c63b </s> remove /**
* Transcodes the basis file to the requested format to be transferred to the gpu
* @param format fromat to be transferred to
* @param fileInfo information about the loaded file
* @param loadedFile the loaded basis file
* @returns the resulting pixels and if the transcode fell back to using Rgb565
*/
function TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any) {
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var dstSize = loadedFile.getImageTranscodedSizeInBytes(0, 0, format);
</s> add function TranscodeLevel(loadedFile:any, imageIndex:number, levelIndex:number, format: number, convertToRgb565: boolean){
var dstSize = loadedFile.getImageTranscodedSizeInBytes(imageIndex, levelIndex, format);
</s> remove if (needsConversion) {
dst = ConvertDxtToRgb565(dst, 0, fileInfo.alignedWidth, fileInfo.alignedHeight);
</s> add if (convertToRgb565) {
var alignedWidth = (loadedFile.getImageWidth(imageIndex, levelIndex) + 3) & ~3;
var alignedHeight = (loadedFile.getImageHeight(imageIndex, levelIndex) + 3) & ~3;
dst = ConvertDxtToRgb565(dst, 0, alignedWidth, alignedHeight);
</s> remove source.width = result.fileInfo.alignedWidth;
source.height = result.fileInfo.alignedHeight;
</s> add // Fallback requires aligned width/height
source.width = (rootImage.width + 3) & ~3;;
source.height =(rootImage.height + 3) & ~3;
</s> remove public width: number;
/**
* Height of the image
*/
public height: number;
/**
* Aligned width used when falling back to Rgb565 ((width + 3) & ~3)
*/
public alignedWidth: number;
/**
* Aligned height used when falling back to Rgb565 ((height + 3) & ~3)
*/
public alignedHeight: number;
</s> add public images: Array<{levels: Array<{width: number, height: number, transcodedPixels: ArrayBufferView}>}>
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d878e6374ef7e1cf8dca7d9006099fd492040e82 | src/Misc/basis.ts |
function TranscodeLevel(loadedFile:any, imageIndex:number, levelIndex:number, format: number, convertToRgb565: boolean){
var dstSize = loadedFile.getImageTranscodedSizeInBytes(imageIndex, levelIndex, format);
| <mask> var info = { hasAlpha, width, height, alignedWidth, alignedHeight };
<mask> return info;
<mask> }
<mask>
<mask> /**
<mask> * Transcodes the basis file to the requested format to be transferred to the gpu
<mask> * @param format fromat to be transferred to
<mask> * @param fileInfo information about the loaded file
<mask> * @param loadedFile the loaded basis file
<mask> * @returns the resulting pixels and if the transcode fell back to using Rgb565
<mask> */
<mask> function TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any) {
<mask> var needsConversion = false;
<mask> if (format === null) {
<mask> needsConversion = true;
<mask> format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
<mask> }
<mask>
<mask> if (!loadedFile.startTranscoding()) {
<mask> loadedFile.close();
<mask> loadedFile.delete();
<mask> throw "transcode failed";
<mask> }
<mask> var dstSize = loadedFile.getImageTranscodedSizeInBytes(0, 0, format);
<mask> var dst = new Uint8Array(dstSize);
<mask> if (!loadedFile.transcodeImage(dst, 0, 0, format, 1, 0)) {
<mask> loadedFile.close();
<mask> loadedFile.delete();
<mask> throw "transcode failed";
</s> mip map support
Former-commit-id: 5bf8fe98961f583c5e679f141556d475f553c63b </s> remove if (!loadedFile.transcodeImage(dst, 0, 0, format, 1, 0)) {
</s> add if (!loadedFile.transcodeImage(dst, imageIndex, levelIndex, format, 1, 0)) {
</s> remove var width = basisFile.getImageWidth(0, 0);
var height = basisFile.getImageHeight(0, 0);
var alignedWidth = (width + 3) & ~3;
var alignedHeight = (height + 3) & ~3;
var info = { hasAlpha, width, height, alignedWidth, alignedHeight };
</s> add var imageCount = basisFile.getNumImages();
var images = []
for(var i = 0;i<imageCount;i++){
var imageInfo = {
levels: ([] as Array<any>)
}
var levelCount = basisFile.getNumLevels(i);
for(var level = 0;level < levelCount;level++){
var levelInfo = {
width: basisFile.getImageWidth(i, level),
height: basisFile.getImageHeight(i, level)
}
imageInfo.levels.push(levelInfo);
}
images.push(imageInfo)
}
var info = { hasAlpha, images };
</s> remove var transcodeResult = TranscodeFile(format, fileInfo, loadedFile);
if(transcodeResult.fallbackToRgb565){
</s> add
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
// Begin transcode
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var buffers:Array<any> = [];
fileInfo.images.forEach((image, imageIndex)=>{
if(config.loadSingleImage === undefined || config.loadSingleImage === imageIndex){
if(config.loadMipmapLevels === false){
var levelInfo = image.levels[0];
levelInfo.transcodedPixels = TranscodeLevel(loadedFile, imageIndex, 0, format!, needsConversion);
buffers.push(levelInfo.transcodedPixels.buffer)
}else{
image.levels.forEach((levelInfo, levelIndex)=>{
levelInfo.transcodedPixels = TranscodeLevel(loadedFile, imageIndex, levelIndex, format!, needsConversion);
buffers.push(levelInfo.transcodedPixels.buffer)
})
}
}
})
// Close file
loadedFile.close();
loadedFile.delete();
if(needsConversion){
</s> remove loadedFile.close();
loadedFile.delete();
</s> add </s> remove if (needsConversion) {
dst = ConvertDxtToRgb565(dst, 0, fileInfo.alignedWidth, fileInfo.alignedHeight);
</s> add if (convertToRgb565) {
var alignedWidth = (loadedFile.getImageWidth(imageIndex, levelIndex) + 3) & ~3;
var alignedHeight = (loadedFile.getImageHeight(imageIndex, levelIndex) + 3) & ~3;
dst = ConvertDxtToRgb565(dst, 0, alignedWidth, alignedHeight);
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep"... | https://github.com/BabylonJS/Babylon.js/commit/d878e6374ef7e1cf8dca7d9006099fd492040e82 | src/Misc/basis.ts |
if (!loadedFile.transcodeImage(dst, imageIndex, levelIndex, format, 1, 0)) {
| <mask> throw "transcode failed";
<mask> }
<mask> var dstSize = loadedFile.getImageTranscodedSizeInBytes(0, 0, format);
<mask> var dst = new Uint8Array(dstSize);
<mask> if (!loadedFile.transcodeImage(dst, 0, 0, format, 1, 0)) {
<mask> loadedFile.close();
<mask> loadedFile.delete();
<mask> throw "transcode failed";
<mask> }
<mask> loadedFile.close();
</s> mip map support
Former-commit-id: 5bf8fe98961f583c5e679f141556d475f553c63b </s> remove /**
* Transcodes the basis file to the requested format to be transferred to the gpu
* @param format fromat to be transferred to
* @param fileInfo information about the loaded file
* @param loadedFile the loaded basis file
* @returns the resulting pixels and if the transcode fell back to using Rgb565
*/
function TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any) {
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var dstSize = loadedFile.getImageTranscodedSizeInBytes(0, 0, format);
</s> add function TranscodeLevel(loadedFile:any, imageIndex:number, levelIndex:number, format: number, convertToRgb565: boolean){
var dstSize = loadedFile.getImageTranscodedSizeInBytes(imageIndex, levelIndex, format);
</s> remove loadedFile.close();
loadedFile.delete();
</s> add </s> remove var transcodeResult = TranscodeFile(format, fileInfo, loadedFile);
if(transcodeResult.fallbackToRgb565){
</s> add
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
// Begin transcode
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var buffers:Array<any> = [];
fileInfo.images.forEach((image, imageIndex)=>{
if(config.loadSingleImage === undefined || config.loadSingleImage === imageIndex){
if(config.loadMipmapLevels === false){
var levelInfo = image.levels[0];
levelInfo.transcodedPixels = TranscodeLevel(loadedFile, imageIndex, 0, format!, needsConversion);
buffers.push(levelInfo.transcodedPixels.buffer)
}else{
image.levels.forEach((levelInfo, levelIndex)=>{
levelInfo.transcodedPixels = TranscodeLevel(loadedFile, imageIndex, levelIndex, format!, needsConversion);
buffers.push(levelInfo.transcodedPixels.buffer)
})
}
}
})
// Close file
loadedFile.close();
loadedFile.delete();
if(needsConversion){
</s> remove if (needsConversion) {
dst = ConvertDxtToRgb565(dst, 0, fileInfo.alignedWidth, fileInfo.alignedHeight);
</s> add if (convertToRgb565) {
var alignedWidth = (loadedFile.getImageWidth(imageIndex, levelIndex) + 3) & ~3;
var alignedHeight = (loadedFile.getImageHeight(imageIndex, levelIndex) + 3) & ~3;
dst = ConvertDxtToRgb565(dst, 0, alignedWidth, alignedHeight);
</s> remove
return {
fallbackToRgb565: needsConversion, pixels: dst
};
</s> add return dst;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d878e6374ef7e1cf8dca7d9006099fd492040e82 | src/Misc/basis.ts |
<mask> loadedFile.close();
<mask> loadedFile.delete();
<mask> throw "transcode failed";
<mask> }
<mask> loadedFile.close();
<mask> loadedFile.delete();
<mask>
<mask> // If no supported format is found, load as dxt and convert to rgb565
<mask> if (needsConversion) {
<mask> dst = ConvertDxtToRgb565(dst, 0, fileInfo.alignedWidth, fileInfo.alignedHeight);
<mask> }
<mask>
</s> mip map support
Former-commit-id: 5bf8fe98961f583c5e679f141556d475f553c63b </s> remove if (needsConversion) {
dst = ConvertDxtToRgb565(dst, 0, fileInfo.alignedWidth, fileInfo.alignedHeight);
</s> add if (convertToRgb565) {
var alignedWidth = (loadedFile.getImageWidth(imageIndex, levelIndex) + 3) & ~3;
var alignedHeight = (loadedFile.getImageHeight(imageIndex, levelIndex) + 3) & ~3;
dst = ConvertDxtToRgb565(dst, 0, alignedWidth, alignedHeight);
</s> remove
return {
fallbackToRgb565: needsConversion, pixels: dst
};
</s> add return dst;
</s> remove if (!loadedFile.transcodeImage(dst, 0, 0, format, 1, 0)) {
</s> add if (!loadedFile.transcodeImage(dst, imageIndex, levelIndex, format, 1, 0)) {
</s> remove /**
* Transcodes the basis file to the requested format to be transferred to the gpu
* @param format fromat to be transferred to
* @param fileInfo information about the loaded file
* @param loadedFile the loaded basis file
* @returns the resulting pixels and if the transcode fell back to using Rgb565
*/
function TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any) {
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var dstSize = loadedFile.getImageTranscodedSizeInBytes(0, 0, format);
</s> add function TranscodeLevel(loadedFile:any, imageIndex:number, levelIndex:number, format: number, convertToRgb565: boolean){
var dstSize = loadedFile.getImageTranscodedSizeInBytes(imageIndex, levelIndex, format);
</s> remove var transcodeResult = TranscodeFile(format, fileInfo, loadedFile);
if(transcodeResult.fallbackToRgb565){
</s> add
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
// Begin transcode
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var buffers:Array<any> = [];
fileInfo.images.forEach((image, imageIndex)=>{
if(config.loadSingleImage === undefined || config.loadSingleImage === imageIndex){
if(config.loadMipmapLevels === false){
var levelInfo = image.levels[0];
levelInfo.transcodedPixels = TranscodeLevel(loadedFile, imageIndex, 0, format!, needsConversion);
buffers.push(levelInfo.transcodedPixels.buffer)
}else{
image.levels.forEach((levelInfo, levelIndex)=>{
levelInfo.transcodedPixels = TranscodeLevel(loadedFile, imageIndex, levelIndex, format!, needsConversion);
buffers.push(levelInfo.transcodedPixels.buffer)
})
}
}
})
// Close file
loadedFile.close();
loadedFile.delete();
if(needsConversion){
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d878e6374ef7e1cf8dca7d9006099fd492040e82 | src/Misc/basis.ts | |
if (convertToRgb565) {
var alignedWidth = (loadedFile.getImageWidth(imageIndex, levelIndex) + 3) & ~3;
var alignedHeight = (loadedFile.getImageHeight(imageIndex, levelIndex) + 3) & ~3;
dst = ConvertDxtToRgb565(dst, 0, alignedWidth, alignedHeight);
| <mask> loadedFile.close();
<mask> loadedFile.delete();
<mask>
<mask> // If no supported format is found, load as dxt and convert to rgb565
<mask> if (needsConversion) {
<mask> dst = ConvertDxtToRgb565(dst, 0, fileInfo.alignedWidth, fileInfo.alignedHeight);
<mask> }
<mask>
<mask> return {
<mask> fallbackToRgb565: needsConversion, pixels: dst
<mask> };
</s> mip map support
Former-commit-id: 5bf8fe98961f583c5e679f141556d475f553c63b </s> remove
return {
fallbackToRgb565: needsConversion, pixels: dst
};
</s> add return dst;
</s> remove loadedFile.close();
loadedFile.delete();
</s> add </s> remove /**
* Transcodes the basis file to the requested format to be transferred to the gpu
* @param format fromat to be transferred to
* @param fileInfo information about the loaded file
* @param loadedFile the loaded basis file
* @returns the resulting pixels and if the transcode fell back to using Rgb565
*/
function TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any) {
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var dstSize = loadedFile.getImageTranscodedSizeInBytes(0, 0, format);
</s> add function TranscodeLevel(loadedFile:any, imageIndex:number, levelIndex:number, format: number, convertToRgb565: boolean){
var dstSize = loadedFile.getImageTranscodedSizeInBytes(imageIndex, levelIndex, format);
</s> remove if (!loadedFile.transcodeImage(dst, 0, 0, format, 1, 0)) {
</s> add if (!loadedFile.transcodeImage(dst, imageIndex, levelIndex, format, 1, 0)) {
</s> remove var transcodeResult = TranscodeFile(format, fileInfo, loadedFile);
if(transcodeResult.fallbackToRgb565){
</s> add
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
// Begin transcode
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var buffers:Array<any> = [];
fileInfo.images.forEach((image, imageIndex)=>{
if(config.loadSingleImage === undefined || config.loadSingleImage === imageIndex){
if(config.loadMipmapLevels === false){
var levelInfo = image.levels[0];
levelInfo.transcodedPixels = TranscodeLevel(loadedFile, imageIndex, 0, format!, needsConversion);
buffers.push(levelInfo.transcodedPixels.buffer)
}else{
image.levels.forEach((levelInfo, levelIndex)=>{
levelInfo.transcodedPixels = TranscodeLevel(loadedFile, imageIndex, levelIndex, format!, needsConversion);
buffers.push(levelInfo.transcodedPixels.buffer)
})
}
}
})
// Close file
loadedFile.close();
loadedFile.delete();
if(needsConversion){
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d878e6374ef7e1cf8dca7d9006099fd492040e82 | src/Misc/basis.ts |
return dst;
| <mask> // If no supported format is found, load as dxt and convert to rgb565
<mask> if (needsConversion) {
<mask> dst = ConvertDxtToRgb565(dst, 0, fileInfo.alignedWidth, fileInfo.alignedHeight);
<mask> }
<mask>
<mask> return {
<mask> fallbackToRgb565: needsConversion, pixels: dst
<mask> };
<mask> }
<mask>
<mask> /**
<mask> * From https://github.com/BinomialLLC/basis_universal/blob/master/webgl/texture/dxt-to-rgb565.js
<mask> * An unoptimized version of dxtToRgb565. Also, the floating
</s> mip map support
Former-commit-id: 5bf8fe98961f583c5e679f141556d475f553c63b </s> remove if (needsConversion) {
dst = ConvertDxtToRgb565(dst, 0, fileInfo.alignedWidth, fileInfo.alignedHeight);
</s> add if (convertToRgb565) {
var alignedWidth = (loadedFile.getImageWidth(imageIndex, levelIndex) + 3) & ~3;
var alignedHeight = (loadedFile.getImageHeight(imageIndex, levelIndex) + 3) & ~3;
dst = ConvertDxtToRgb565(dst, 0, alignedWidth, alignedHeight);
</s> remove loadedFile.close();
loadedFile.delete();
</s> add </s> remove /**
* Transcodes the basis file to the requested format to be transferred to the gpu
* @param format fromat to be transferred to
* @param fileInfo information about the loaded file
* @param loadedFile the loaded basis file
* @returns the resulting pixels and if the transcode fell back to using Rgb565
*/
function TranscodeFile(format: Nullable<number>, fileInfo: BasisFileInfo, loadedFile: any) {
var needsConversion = false;
if (format === null) {
needsConversion = true;
format = fileInfo.hasAlpha ? _BASIS_FORMAT.cTFBC3 : _BASIS_FORMAT.cTFBC1;
}
if (!loadedFile.startTranscoding()) {
loadedFile.close();
loadedFile.delete();
throw "transcode failed";
}
var dstSize = loadedFile.getImageTranscodedSizeInBytes(0, 0, format);
</s> add function TranscodeLevel(loadedFile:any, imageIndex:number, levelIndex:number, format: number, convertToRgb565: boolean){
var dstSize = loadedFile.getImageTranscodedSizeInBytes(imageIndex, levelIndex, format);
</s> remove if (!loadedFile.transcodeImage(dst, 0, 0, format, 1, 0)) {
</s> add if (!loadedFile.transcodeImage(dst, imageIndex, levelIndex, format, 1, 0)) {
</s> remove var width = basisFile.getImageWidth(0, 0);
var height = basisFile.getImageHeight(0, 0);
var alignedWidth = (width + 3) & ~3;
var alignedHeight = (height + 3) & ~3;
var info = { hasAlpha, width, height, alignedWidth, alignedHeight };
</s> add var imageCount = basisFile.getNumImages();
var images = []
for(var i = 0;i<imageCount;i++){
var imageInfo = {
levels: ([] as Array<any>)
}
var levelCount = basisFile.getNumLevels(i);
for(var level = 0;level < levelCount;level++){
var levelInfo = {
width: basisFile.getImageWidth(i, level),
height: basisFile.getImageHeight(i, level)
}
imageInfo.levels.push(levelInfo);
}
images.push(imageInfo)
}
var info = { hasAlpha, images };
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d878e6374ef7e1cf8dca7d9006099fd492040e82 | src/Misc/basis.ts |
private _isNotBuilt: boolean = true;
| <mask> private _particlesIntersect: boolean = false;
<mask> private _needs32Bits: boolean = false;
<mask>
<mask> /**
<mask> * Creates a SPS (Solid Particle System) object.
<mask> * @param name (String) is the SPS name, this will be the underlying mesh name.
</s> fix sps.digest() for removable particles
Former-commit-id: aabd18502dbaf59b46fec65cf4dd01db3543dcac </s> remove if (!this._updatable) {
</s> add if (!this._updatable || this._isNotBuilt) {
</s> remove var modelShape = new ModelShape(this._shapeCounter, shape, indices, normals, shapeUV, colors, null, null);
</s> add var modelShape = new ModelShape(this._shapeCounter, shape, shapeInd, shapeNor, shapeUV, shapeCol, null, null);
| [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d9586466ef0de20d2a94d9033221e0c7a8ba0467 | src/Particles/solidParticleSystem.ts |
if (!this._isNotBuilt && this.mesh) {
return this.mesh;
}
| <mask> * @returns the created mesh
<mask> */
<mask> public buildMesh(): Mesh {
<mask> if (this.nbParticles === 0 && !this.mesh) {
<mask> var triangle = DiscBuilder.CreateDisc("", { radius: 1, tessellation: 3 }, this._scene);
<mask> this.addShape(triangle, 1);
<mask> triangle.dispose();
<mask> }
<mask> this._indices32 = (this._needs32Bits) ? new Uint32Array(this._indices) : new Uint16Array(this._indices);
</s> fix sps.digest() for removable particles
Former-commit-id: aabd18502dbaf59b46fec65cf4dd01db3543dcac </s> remove if (!this._updatable) {
</s> add if (!this._updatable || this._isNotBuilt) {
</s> remove var modelShape = new ModelShape(this._shapeCounter, shape, indices, normals, shapeUV, colors, null, null);
</s> add var modelShape = new ModelShape(this._shapeCounter, shape, shapeInd, shapeNor, shapeUV, shapeCol, null, null);
</s> remove var indices = Array.from(meshInd);
var normals = Array.from(meshNor);
var colors = (meshCol) ? Array.from(meshCol) : [];
</s> add </s> remove facetUV.push(meshUV[i * 2], meshUV[i * 2 + 1]);
</s> add var i2: number = i * 2;
facetUV.push(meshUV[i2], meshUV[i2 + 1]);
</s> remove facetPos.push(meshPos[i * 3], meshPos[i * 3 + 1], meshPos[i * 3 + 2]);
</s> add var i3: number = i * 3;
facetPos.push(meshPos[i3], meshPos[i3 + 1], meshPos[i3 + 2]);
facetNor.push(meshNor[i3], meshNor[i3 + 1], meshNor[i3 + 2]);
| [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d9586466ef0de20d2a94d9033221e0c7a8ba0467 | src/Particles/solidParticleSystem.ts |
this._isNotBuilt = false;
| <mask> if (!this._updatable) {
<mask> this.particles.length = 0;
<mask> }
<mask> }
<mask> return this.mesh;
<mask> }
<mask>
<mask> /**
</s> fix sps.digest() for removable particles
Former-commit-id: aabd18502dbaf59b46fec65cf4dd01db3543dcac </s> remove if (!this._updatable) {
</s> add if (!this._updatable || this._isNotBuilt) {
| [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d9586466ef0de20d2a94d9033221e0c7a8ba0467 | src/Particles/solidParticleSystem.ts |
<mask> var meshInd = <IndicesArray>mesh.getIndices();
<mask> var meshUV = <FloatArray>mesh.getVerticesData(VertexBuffer.UVKind);
<mask> var meshCol = <FloatArray>mesh.getVerticesData(VertexBuffer.ColorKind);
<mask> var meshNor = <FloatArray>mesh.getVerticesData(VertexBuffer.NormalKind);
<mask> var indices = Array.from(meshInd);
<mask> var normals = Array.from(meshNor);
<mask> var colors = (meshCol) ? Array.from(meshCol) : [];
<mask>
<mask> var f: number = 0; // facet counter
<mask> var totalFacets: number = meshInd.length / 3; // a facet is a triangle, so 3 indices
<mask> // compute size from number
<mask> if (number) {
</s> fix sps.digest() for removable particles
Former-commit-id: aabd18502dbaf59b46fec65cf4dd01db3543dcac </s> remove facetPos.push(meshPos[i * 3], meshPos[i * 3 + 1], meshPos[i * 3 + 2]);
</s> add var i3: number = i * 3;
facetPos.push(meshPos[i3], meshPos[i3 + 1], meshPos[i3 + 2]);
facetNor.push(meshNor[i3], meshNor[i3 + 1], meshNor[i3 + 2]);
</s> remove var modelShape = new ModelShape(this._shapeCounter, shape, indices, normals, shapeUV, colors, null, null);
</s> add var modelShape = new ModelShape(this._shapeCounter, shape, shapeInd, shapeNor, shapeUV, shapeCol, null, null);
</s> remove facetUV.push(meshUV[i * 2], meshUV[i * 2 + 1]);
</s> add var i2: number = i * 2;
facetUV.push(meshUV[i2], meshUV[i2 + 1]);
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d9586466ef0de20d2a94d9033221e0c7a8ba0467 | src/Particles/solidParticleSystem.ts | |
var facetNor: number[] = [];
| <mask> size = (size > totalFacets) ? totalFacets : size;
<mask> }
<mask>
<mask> var facetPos: number[] = []; // submesh positions
<mask> var facetInd: number[] = []; // submesh indices
<mask> var facetUV: number[] = []; // submesh UV
<mask> var facetCol: number[] = []; // submesh colors
<mask> var barycenter: Vector3 = Vector3.Zero();
</s> fix sps.digest() for removable particles
Former-commit-id: aabd18502dbaf59b46fec65cf4dd01db3543dcac </s> remove var indices = Array.from(meshInd);
var normals = Array.from(meshNor);
var colors = (meshCol) ? Array.from(meshCol) : [];
</s> add </s> remove var modelShape = new ModelShape(this._shapeCounter, shape, indices, normals, shapeUV, colors, null, null);
</s> add var modelShape = new ModelShape(this._shapeCounter, shape, shapeInd, shapeNor, shapeUV, shapeCol, null, null);
</s> remove this._meshBuilder(this._index, shape, this._positions, facetInd, this._indices, facetUV, this._uvs, facetCol, this._colors, meshNor, this._normals, idx, 0, null);
</s> add this._meshBuilder(this._index, shape, this._positions, shapeInd, this._indices, facetUV, this._uvs, shapeCol, this._colors, shapeNor, this._normals, idx, 0, null);
| [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d9586466ef0de20d2a94d9033221e0c7a8ba0467 | src/Particles/solidParticleSystem.ts |
facetNor.length = 0;
| <mask> size = totalFacets - f;
<mask> }
<mask> // reset temp arrays
<mask> facetPos.length = 0;
<mask> facetInd.length = 0;
<mask> facetUV.length = 0;
<mask> facetCol.length = 0;
<mask>
<mask> // iterate over "size" facets
</s> fix sps.digest() for removable particles
Former-commit-id: aabd18502dbaf59b46fec65cf4dd01db3543dcac </s> remove var indices = Array.from(meshInd);
var normals = Array.from(meshNor);
var colors = (meshCol) ? Array.from(meshCol) : [];
</s> add | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d9586466ef0de20d2a94d9033221e0c7a8ba0467 | src/Particles/solidParticleSystem.ts |
var i3: number = i * 3;
facetPos.push(meshPos[i3], meshPos[i3 + 1], meshPos[i3 + 2]);
facetNor.push(meshNor[i3], meshNor[i3 + 1], meshNor[i3 + 2]);
| <mask> var fi: number = 0;
<mask> for (var j = f * 3; j < (f + size) * 3; j++) {
<mask> facetInd.push(fi);
<mask> var i: number = meshInd[j];
<mask> facetPos.push(meshPos[i * 3], meshPos[i * 3 + 1], meshPos[i * 3 + 2]);
<mask> if (meshUV) {
<mask> facetUV.push(meshUV[i * 2], meshUV[i * 2 + 1]);
<mask> }
<mask> if (meshCol) {
<mask> facetCol.push(meshCol[i * 4], meshCol[i * 4 + 1], meshCol[i * 4 + 2], meshCol[i * 4 + 3]);
</s> fix sps.digest() for removable particles
Former-commit-id: aabd18502dbaf59b46fec65cf4dd01db3543dcac </s> remove facetUV.push(meshUV[i * 2], meshUV[i * 2 + 1]);
</s> add var i2: number = i * 2;
facetUV.push(meshUV[i2], meshUV[i2 + 1]);
</s> remove facetCol.push(meshCol[i * 4], meshCol[i * 4 + 1], meshCol[i * 4 + 2], meshCol[i * 4 + 3]);
</s> add var i4: number = i * 4;
facetCol.push(meshCol[i4], meshCol[i4 + 1], meshCol[i4 + 2], meshCol[i4 + 3]);
</s> remove var indices = Array.from(meshInd);
var normals = Array.from(meshNor);
var colors = (meshCol) ? Array.from(meshCol) : [];
</s> add </s> remove if (!this._updatable) {
</s> add if (!this._updatable || this._isNotBuilt) {
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d9586466ef0de20d2a94d9033221e0c7a8ba0467 | src/Particles/solidParticleSystem.ts |
var i2: number = i * 2;
facetUV.push(meshUV[i2], meshUV[i2 + 1]);
| <mask> facetInd.push(fi);
<mask> var i: number = meshInd[j];
<mask> facetPos.push(meshPos[i * 3], meshPos[i * 3 + 1], meshPos[i * 3 + 2]);
<mask> if (meshUV) {
<mask> facetUV.push(meshUV[i * 2], meshUV[i * 2 + 1]);
<mask> }
<mask> if (meshCol) {
<mask> facetCol.push(meshCol[i * 4], meshCol[i * 4 + 1], meshCol[i * 4 + 2], meshCol[i * 4 + 3]);
<mask> }
<mask> fi++;
</s> fix sps.digest() for removable particles
Former-commit-id: aabd18502dbaf59b46fec65cf4dd01db3543dcac </s> remove facetPos.push(meshPos[i * 3], meshPos[i * 3 + 1], meshPos[i * 3 + 2]);
</s> add var i3: number = i * 3;
facetPos.push(meshPos[i3], meshPos[i3 + 1], meshPos[i3 + 2]);
facetNor.push(meshNor[i3], meshNor[i3 + 1], meshNor[i3 + 2]);
</s> remove facetCol.push(meshCol[i * 4], meshCol[i * 4 + 1], meshCol[i * 4 + 2], meshCol[i * 4 + 3]);
</s> add var i4: number = i * 4;
facetCol.push(meshCol[i4], meshCol[i4 + 1], meshCol[i4 + 2], meshCol[i4 + 3]);
</s> remove if (!this._updatable) {
</s> add if (!this._updatable || this._isNotBuilt) {
</s> remove var indices = Array.from(meshInd);
var normals = Array.from(meshNor);
var colors = (meshCol) ? Array.from(meshCol) : [];
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d9586466ef0de20d2a94d9033221e0c7a8ba0467 | src/Particles/solidParticleSystem.ts |
var i4: number = i * 4;
facetCol.push(meshCol[i4], meshCol[i4 + 1], meshCol[i4 + 2], meshCol[i4 + 3]);
| <mask> if (meshUV) {
<mask> facetUV.push(meshUV[i * 2], meshUV[i * 2 + 1]);
<mask> }
<mask> if (meshCol) {
<mask> facetCol.push(meshCol[i * 4], meshCol[i * 4 + 1], meshCol[i * 4 + 2], meshCol[i * 4 + 3]);
<mask> }
<mask> fi++;
<mask> }
<mask>
<mask> // create a model shape for each single particle
</s> fix sps.digest() for removable particles
Former-commit-id: aabd18502dbaf59b46fec65cf4dd01db3543dcac </s> remove facetUV.push(meshUV[i * 2], meshUV[i * 2 + 1]);
</s> add var i2: number = i * 2;
facetUV.push(meshUV[i2], meshUV[i2 + 1]);
</s> remove facetPos.push(meshPos[i * 3], meshPos[i * 3 + 1], meshPos[i * 3 + 2]);
</s> add var i3: number = i * 3;
facetPos.push(meshPos[i3], meshPos[i3 + 1], meshPos[i3 + 2]);
facetNor.push(meshNor[i3], meshNor[i3 + 1], meshNor[i3 + 2]);
</s> remove if (!this._updatable) {
</s> add if (!this._updatable || this._isNotBuilt) {
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d9586466ef0de20d2a94d9033221e0c7a8ba0467 | src/Particles/solidParticleSystem.ts |
var shapeInd = Array.from(facetInd);
var shapeCol = Array.from(facetCol);
var shapeNor = Array.from(facetNor);
| <mask> // create a model shape for each single particle
<mask> var idx: number = this.nbParticles;
<mask> var shape: Vector3[] = this._posToShape(facetPos);
<mask> var shapeUV: number[] = this._uvsToShapeUV(facetUV);
<mask>
<mask> // compute the barycenter of the shape
<mask> barycenter.copyFromFloats(0, 0, 0);
<mask> var v: number;
<mask> for (v = 0; v < shape.length; v++) {
<mask> barycenter.addInPlace(shape[v]);
</s> fix sps.digest() for removable particles
Former-commit-id: aabd18502dbaf59b46fec65cf4dd01db3543dcac </s> remove facetCol.push(meshCol[i * 4], meshCol[i * 4 + 1], meshCol[i * 4 + 2], meshCol[i * 4 + 3]);
</s> add var i4: number = i * 4;
facetCol.push(meshCol[i4], meshCol[i4 + 1], meshCol[i4 + 2], meshCol[i4 + 3]);
</s> remove var indices = Array.from(meshInd);
var normals = Array.from(meshNor);
var colors = (meshCol) ? Array.from(meshCol) : [];
</s> add </s> remove this._meshBuilder(this._index, shape, this._positions, facetInd, this._indices, facetUV, this._uvs, facetCol, this._colors, meshNor, this._normals, idx, 0, null);
</s> add this._meshBuilder(this._index, shape, this._positions, shapeInd, this._indices, facetUV, this._uvs, shapeCol, this._colors, shapeNor, this._normals, idx, 0, null);
</s> remove var modelShape = new ModelShape(this._shapeCounter, shape, indices, normals, shapeUV, colors, null, null);
</s> add var modelShape = new ModelShape(this._shapeCounter, shape, shapeInd, shapeNor, shapeUV, shapeCol, null, null);
| [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d9586466ef0de20d2a94d9033221e0c7a8ba0467 | src/Particles/solidParticleSystem.ts |
var modelShape = new ModelShape(this._shapeCounter, shape, shapeInd, shapeNor, shapeUV, shapeCol, null, null);
| <mask> var bInfo;
<mask> if (this._particlesIntersect) {
<mask> bInfo = new BoundingInfo(minimum, maximum);
<mask> }
<mask> var modelShape = new ModelShape(this._shapeCounter, shape, indices, normals, shapeUV, colors, null, null);
<mask>
<mask> // add the particle in the SPS
<mask> var currentPos = this._positions.length;
<mask> var currentInd = this._indices.length;
<mask> this._meshBuilder(this._index, shape, this._positions, facetInd, this._indices, facetUV, this._uvs, facetCol, this._colors, meshNor, this._normals, idx, 0, null);
</s> fix sps.digest() for removable particles
Former-commit-id: aabd18502dbaf59b46fec65cf4dd01db3543dcac </s> remove this._meshBuilder(this._index, shape, this._positions, facetInd, this._indices, facetUV, this._uvs, facetCol, this._colors, meshNor, this._normals, idx, 0, null);
</s> add this._meshBuilder(this._index, shape, this._positions, shapeInd, this._indices, facetUV, this._uvs, shapeCol, this._colors, shapeNor, this._normals, idx, 0, null);
</s> remove var indices = Array.from(meshInd);
var normals = Array.from(meshNor);
var colors = (meshCol) ? Array.from(meshCol) : [];
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d9586466ef0de20d2a94d9033221e0c7a8ba0467 | src/Particles/solidParticleSystem.ts |
this._meshBuilder(this._index, shape, this._positions, shapeInd, this._indices, facetUV, this._uvs, shapeCol, this._colors, shapeNor, this._normals, idx, 0, null);
| <mask>
<mask> // add the particle in the SPS
<mask> var currentPos = this._positions.length;
<mask> var currentInd = this._indices.length;
<mask> this._meshBuilder(this._index, shape, this._positions, facetInd, this._indices, facetUV, this._uvs, facetCol, this._colors, meshNor, this._normals, idx, 0, null);
<mask> this._addParticle(idx, currentPos, currentInd, modelShape, this._shapeCounter, 0, bInfo);
<mask> // initialize the particle position
<mask> this.particles[this.nbParticles].position.addInPlace(barycenter);
<mask>
<mask> this._index += shape.length;
</s> fix sps.digest() for removable particles
Former-commit-id: aabd18502dbaf59b46fec65cf4dd01db3543dcac </s> remove var modelShape = new ModelShape(this._shapeCounter, shape, indices, normals, shapeUV, colors, null, null);
</s> add var modelShape = new ModelShape(this._shapeCounter, shape, shapeInd, shapeNor, shapeUV, shapeCol, null, null);
</s> remove if (!this._updatable) {
</s> add if (!this._updatable || this._isNotBuilt) {
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d9586466ef0de20d2a94d9033221e0c7a8ba0467 | src/Particles/solidParticleSystem.ts |
this._isNotBuilt = true; // buildMesh() is now expected for setParticles() to work
| <mask> this.nbParticles++;
<mask> this._shapeCounter++;
<mask> f += size;
<mask> }
<mask> return this;
<mask> }
<mask>
<mask> // unrotate the fixed normals in case the mesh was built with pre-rotated particles, ex : use of positionFunction in addShape()
</s> fix sps.digest() for removable particles
Former-commit-id: aabd18502dbaf59b46fec65cf4dd01db3543dcac </s> remove if (!this._updatable) {
</s> add if (!this._updatable || this._isNotBuilt) {
</s> remove this._meshBuilder(this._index, shape, this._positions, facetInd, this._indices, facetUV, this._uvs, facetCol, this._colors, meshNor, this._normals, idx, 0, null);
</s> add this._meshBuilder(this._index, shape, this._positions, shapeInd, this._indices, facetUV, this._uvs, shapeCol, this._colors, shapeNor, this._normals, idx, 0, null);
</s> remove var modelShape = new ModelShape(this._shapeCounter, shape, indices, normals, shapeUV, colors, null, null);
</s> add var modelShape = new ModelShape(this._shapeCounter, shape, shapeInd, shapeNor, shapeUV, shapeCol, null, null);
| [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d9586466ef0de20d2a94d9033221e0c7a8ba0467 | src/Particles/solidParticleSystem.ts |
this._isNotBuilt = true; // buildMesh() is now expected for setParticles() to work
| <mask> idx++;
<mask> }
<mask> this.nbParticles += nb;
<mask> this._shapeCounter++;
<mask> return this._shapeCounter - 1;
<mask> }
<mask>
<mask> // rebuilds a particle back to its just built status : if needed, recomputes the custom positions and vertices
<mask> private _rebuildParticle(particle: SolidParticle, reset: boolean = false): void {
</s> fix sps.digest() for removable particles
Former-commit-id: aabd18502dbaf59b46fec65cf4dd01db3543dcac </s> remove if (!this._updatable) {
</s> add if (!this._updatable || this._isNotBuilt) {
| [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d9586466ef0de20d2a94d9033221e0c7a8ba0467 | src/Particles/solidParticleSystem.ts |
this._isNotBuilt = true; // buildMesh() is now expected for setParticles() to work
| <mask>
<mask> this.nbParticles -= nb;
<mask> return removed;
<mask> }
<mask>
<mask> /**
</s> fix sps.digest() for removable particles
Former-commit-id: aabd18502dbaf59b46fec65cf4dd01db3543dcac </s> remove if (!this._updatable) {
</s> add if (!this._updatable || this._isNotBuilt) {
| [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d9586466ef0de20d2a94d9033221e0c7a8ba0467 | src/Particles/solidParticleSystem.ts |
* This methods does nothing if called on a non updatable or not yet built SPS. Example : buildMesh() not called after having added or removed particles from an expandable SPS.
| <mask> * Sets all the particles : this method actually really updates the mesh according to the particle positions, rotations, colors, textures, etc.
<mask> * This method calls `updateParticle()` for each particle of the SPS.
<mask> * For an animated SPS, it is usually called within the render loop.
<mask> * @param start The particle index in the particle array where to start to compute the particle property values _(default 0)_
<mask> * @param end The particle index in the particle array where to stop to compute the particle property values _(default nbParticle - 1)_
<mask> * @param update If the mesh must be finally updated on this call after all the particle computations _(default true)_
<mask> * @returns the SPS.
</s> fix sps.digest() for removable particles
Former-commit-id: aabd18502dbaf59b46fec65cf4dd01db3543dcac </s> remove if (!this._updatable) {
</s> add if (!this._updatable || this._isNotBuilt) {
| [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d9586466ef0de20d2a94d9033221e0c7a8ba0467 | src/Particles/solidParticleSystem.ts |
if (!this._updatable || this._isNotBuilt) {
| <mask> * @param update If the mesh must be finally updated on this call after all the particle computations _(default true)_
<mask> * @returns the SPS.
<mask> */
<mask> public setParticles(start: number = 0, end: number = this.nbParticles - 1, update: boolean = true): SolidParticleSystem {
<mask> if (!this._updatable) {
<mask> return this;
<mask> }
<mask>
<mask> // custom beforeUpdate
<mask> this.beforeUpdateParticles(start, end, update);
</s> fix sps.digest() for removable particles
Former-commit-id: aabd18502dbaf59b46fec65cf4dd01db3543dcac | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/d9586466ef0de20d2a94d9033221e0c7a8ba0467 | src/Particles/solidParticleSystem.ts |
import { MultiMaterial } from "../Materials/multiMaterial";
| <mask> import { BoundingSphere } from "../Culling/boundingSphere";
<mask> import { Effect } from "../Materials/effect";
<mask> import { Material } from "../Materials/material";
<mask> import { SceneLoaderFlags } from "../Loading/sceneLoaderFlags";
<mask> import { Skeleton } from "../Bones/skeleton";
<mask> import { MorphTargetManager } from "../Morph/morphTargetManager";
<mask> import { Constants } from "../Engines/constants";
<mask> import { SerializationHelper } from "../Misc/decorators";
<mask> import { Logger } from "../Misc/logger";
</s> Added multiMultiMaterials option to MergeMeshes
Former-commit-id: 4ca2a926b24383e3dd14b1a6f03bfba4eb8a84ff </s> remove if (subdivideWithSubMeshes) {
</s> add if (subdivideWithSubMeshes || multiMultiMaterials) {
</s> remove
</s> add if (multiMultiMaterials) {
var newMultiMaterial: Nullable<MultiMaterial> = null;
var subIndex: number;
var matIndex: number;
subdivideWithSubMeshes = false;
}
var maxValue = 0;
var materialArray: Array<Material> = new Array<Material>();
var materialIndexArray: Array<number> = new Array<number>();
</s> remove meshSubclass.material = source.material;
</s> add | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/da572fe493fa1fb15e5fb046f11390ef1323ac3f | src/Meshes/mesh.ts |
* @param multiMultiMaterials when true (false default), subdivide mesh and accept multiple multi materials, ignores subdivideWithSubMeshes.
| <mask> * @param disposeSource when true (default), dispose of the vertices from the source meshes
<mask> * @param allow32BitsIndices when the sum of the vertices > 64k, this must be set to true
<mask> * @param meshSubclass when set, vertices inserted into this Mesh. Meshes can then be merged into a Mesh sub-class.
<mask> * @param subdivideWithSubMeshes when true (false default), subdivide mesh to his subMesh array with meshes source.
<mask> * @returns a new mesh
<mask> */
<mask> public static MergeMeshes(meshes: Array<Mesh>, disposeSource = true, allow32BitsIndices?: boolean, meshSubclass?: Mesh, subdivideWithSubMeshes?: boolean, multiMultiMaterials?: boolean): Nullable<Mesh> {
<mask> var index: number;
</s> Added multiMultiMaterials option to MergeMeshes
Former-commit-id: 4ca2a926b24383e3dd14b1a6f03bfba4eb8a84ff </s> remove public static MergeMeshes(meshes: Array<Mesh>, disposeSource = true, allow32BitsIndices?: boolean, meshSubclass?: Mesh, subdivideWithSubMeshes?: boolean): Nullable<Mesh> {
</s> add public static MergeMeshes(meshes: Array<Mesh>, disposeSource = true, allow32BitsIndices?: boolean, meshSubclass?: Mesh, subdivideWithSubMeshes?: boolean, multiMultiMaterials?: boolean): Nullable<Mesh> {
</s> remove if (subdivideWithSubMeshes) {
</s> add if (subdivideWithSubMeshes || multiMultiMaterials) {
</s> remove
</s> add if (multiMultiMaterials) {
var newMultiMaterial: Nullable<MultiMaterial> = null;
var subIndex: number;
var matIndex: number;
subdivideWithSubMeshes = false;
}
var maxValue = 0;
var materialArray: Array<Material> = new Array<Material>();
var materialIndexArray: Array<number> = new Array<number>();
| [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/da572fe493fa1fb15e5fb046f11390ef1323ac3f | src/Meshes/mesh.ts |
public static MergeMeshes(meshes: Array<Mesh>, disposeSource = true, allow32BitsIndices?: boolean, meshSubclass?: Mesh, subdivideWithSubMeshes?: boolean, multiMultiMaterials?: boolean): Nullable<Mesh> {
| <mask> * @param meshSubclass when set, vertices inserted into this Mesh. Meshes can then be merged into a Mesh sub-class.
<mask> * @param subdivideWithSubMeshes when true (false default), subdivide mesh to his subMesh array with meshes source.
<mask> * @returns a new mesh
<mask> */
<mask> public static MergeMeshes(meshes: Array<Mesh>, disposeSource = true, allow32BitsIndices?: boolean, meshSubclass?: Mesh, subdivideWithSubMeshes?: boolean): Nullable<Mesh> {
<mask> var index: number;
<mask> if (!allow32BitsIndices) {
<mask> var totalVertices = 0;
<mask>
<mask> // Counting vertices
</s> Added multiMultiMaterials option to MergeMeshes
Former-commit-id: 4ca2a926b24383e3dd14b1a6f03bfba4eb8a84ff </s> remove
</s> add if (multiMultiMaterials) {
var newMultiMaterial: Nullable<MultiMaterial> = null;
var subIndex: number;
var matIndex: number;
subdivideWithSubMeshes = false;
}
var maxValue = 0;
var materialArray: Array<Material> = new Array<Material>();
var materialIndexArray: Array<number> = new Array<number>();
</s> remove if (subdivideWithSubMeshes) {
</s> add if (subdivideWithSubMeshes || multiMultiMaterials) {
</s> remove meshSubclass.material = source.material;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/da572fe493fa1fb15e5fb046f11390ef1323ac3f | src/Meshes/mesh.ts |
if (multiMultiMaterials) {
var newMultiMaterial: Nullable<MultiMaterial> = null;
var subIndex: number;
var matIndex: number;
subdivideWithSubMeshes = false;
}
var maxValue = 0;
var materialArray: Array<Material> = new Array<Material>();
var materialIndexArray: Array<number> = new Array<number>();
| <mask> }
<mask> }
<mask> }
<mask> }
<mask>
<mask> // Merge
<mask> var vertexData: Nullable<VertexData> = null;
<mask> var otherVertexData: VertexData;
<mask> var indiceArray: Array<number> = new Array<number>();
<mask> var source: Nullable<Mesh> = null;
</s> Added multiMultiMaterials option to MergeMeshes
Former-commit-id: 4ca2a926b24383e3dd14b1a6f03bfba4eb8a84ff </s> remove if (subdivideWithSubMeshes) {
</s> add if (subdivideWithSubMeshes || multiMultiMaterials) {
</s> remove public static MergeMeshes(meshes: Array<Mesh>, disposeSource = true, allow32BitsIndices?: boolean, meshSubclass?: Mesh, subdivideWithSubMeshes?: boolean): Nullable<Mesh> {
</s> add public static MergeMeshes(meshes: Array<Mesh>, disposeSource = true, allow32BitsIndices?: boolean, meshSubclass?: Mesh, subdivideWithSubMeshes?: boolean, multiMultiMaterials?: boolean): Nullable<Mesh> {
</s> remove meshSubclass.material = source.material;
</s> add | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/da572fe493fa1fb15e5fb046f11390ef1323ac3f | src/Meshes/mesh.ts |
<mask>
<mask> (<VertexData>vertexData).applyToMesh(meshSubclass);
<mask>
<mask> // Setting properties
<mask> meshSubclass.material = source.material;
<mask> meshSubclass.checkCollisions = source.checkCollisions;
<mask>
<mask> // Cleaning
<mask> if (disposeSource) {
<mask> for (index = 0; index < meshes.length; index++) {
</s> Added multiMultiMaterials option to MergeMeshes
Former-commit-id: 4ca2a926b24383e3dd14b1a6f03bfba4eb8a84ff </s> remove if (subdivideWithSubMeshes) {
</s> add if (subdivideWithSubMeshes || multiMultiMaterials) {
</s> remove
</s> add if (multiMultiMaterials) {
var newMultiMaterial: Nullable<MultiMaterial> = null;
var subIndex: number;
var matIndex: number;
subdivideWithSubMeshes = false;
}
var maxValue = 0;
var materialArray: Array<Material> = new Array<Material>();
var materialIndexArray: Array<number> = new Array<number>();
</s> remove public static MergeMeshes(meshes: Array<Mesh>, disposeSource = true, allow32BitsIndices?: boolean, meshSubclass?: Mesh, subdivideWithSubMeshes?: boolean): Nullable<Mesh> {
</s> add public static MergeMeshes(meshes: Array<Mesh>, disposeSource = true, allow32BitsIndices?: boolean, meshSubclass?: Mesh, subdivideWithSubMeshes?: boolean, multiMultiMaterials?: boolean): Nullable<Mesh> {
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/da572fe493fa1fb15e5fb046f11390ef1323ac3f | src/Meshes/mesh.ts | |
if (subdivideWithSubMeshes || multiMultiMaterials) {
| <mask> }
<mask> }
<mask>
<mask> // Subdivide
<mask> if (subdivideWithSubMeshes) {
<mask>
<mask> //-- removal of global submesh
<mask> meshSubclass.releaseSubMeshes();
<mask> index = 0;
<mask> var offset = 0;
</s> Added multiMultiMaterials option to MergeMeshes
Former-commit-id: 4ca2a926b24383e3dd14b1a6f03bfba4eb8a84ff </s> remove meshSubclass.material = source.material;
</s> add </s> remove
</s> add if (multiMultiMaterials) {
var newMultiMaterial: Nullable<MultiMaterial> = null;
var subIndex: number;
var matIndex: number;
subdivideWithSubMeshes = false;
}
var maxValue = 0;
var materialArray: Array<Material> = new Array<Material>();
var materialIndexArray: Array<number> = new Array<number>();
</s> remove public static MergeMeshes(meshes: Array<Mesh>, disposeSource = true, allow32BitsIndices?: boolean, meshSubclass?: Mesh, subdivideWithSubMeshes?: boolean): Nullable<Mesh> {
</s> add public static MergeMeshes(meshes: Array<Mesh>, disposeSource = true, allow32BitsIndices?: boolean, meshSubclass?: Mesh, subdivideWithSubMeshes?: boolean, multiMultiMaterials?: boolean): Nullable<Mesh> {
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/da572fe493fa1fb15e5fb046f11390ef1323ac3f | src/Meshes/mesh.ts |
if (multiMultiMaterials) {
newMultiMaterial = new MultiMaterial(source.name + "_merged", source.getScene());
newMultiMaterial.subMaterials = materialArray;
for (subIndex = 0; subIndex < meshSubclass.subMeshes.length; subIndex++) {
meshSubclass.subMeshes[subIndex].materialIndex = materialIndexArray[subIndex];
}
meshSubclass.material = newMultiMaterial;
} else {
meshSubclass.material = source.material;
}
| <mask> }
<mask> }
<mask>
<mask> return meshSubclass;
<mask> }
<mask>
<mask> /** @hidden */
<mask> public addInstance(instance: InstancedMesh) {
</s> Added multiMultiMaterials option to MergeMeshes
Former-commit-id: 4ca2a926b24383e3dd14b1a6f03bfba4eb8a84ff </s> remove if (subdivideWithSubMeshes) {
</s> add if (subdivideWithSubMeshes || multiMultiMaterials) {
</s> remove
</s> add if (multiMultiMaterials) {
var newMultiMaterial: Nullable<MultiMaterial> = null;
var subIndex: number;
var matIndex: number;
subdivideWithSubMeshes = false;
}
var maxValue = 0;
var materialArray: Array<Material> = new Array<Material>();
var materialIndexArray: Array<number> = new Array<number>();
</s> remove public static MergeMeshes(meshes: Array<Mesh>, disposeSource = true, allow32BitsIndices?: boolean, meshSubclass?: Mesh, subdivideWithSubMeshes?: boolean): Nullable<Mesh> {
</s> add public static MergeMeshes(meshes: Array<Mesh>, disposeSource = true, allow32BitsIndices?: boolean, meshSubclass?: Mesh, subdivideWithSubMeshes?: boolean, multiMultiMaterials?: boolean): Nullable<Mesh> {
| [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/da572fe493fa1fb15e5fb046f11390ef1323ac3f | src/Meshes/mesh.ts |
position: relative;
| <mask>
<mask> .header-container {
<mask> grid-row: 1;
<mask> grid-column: 1;
<mask> display: grid;
<mask> grid-template-columns: 1fr auto;
<mask> grid-template-rows: 100%;
<mask> border: 4px solid black;
<mask> border-top-right-radius: 7px;
<mask> border-top-left-radius: 7px;
<mask> background: black;
<mask> color: white;
</s> Adjust node title and icon positioning
Former-commit-id: 6e6331e26c4fbe2877500bf89b7d9248560276d0 </s> remove grid-row: 1;
grid-column: 1;
</s> add </s> remove grid-row: 1;
grid-column: 2;
</s> add position: absolute;
right: 0px;
top: 2px;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/da987480a30e34e796342eecfea5ef31f77caa91 | packages/dev/sharedUiComponents/src/nodeGraphSystem/graphNode.modules.scss |
position: absolute;
right: 0px;
top: 2px;
| <mask> transform-origin: center;
<mask> }
<mask>
<mask> .headerIcon {
<mask> grid-row: 1;
<mask> grid-column: 2;
<mask> z-index: 10;
<mask> justify-self: end;
<mask> align-self: center;
<mask> margin-right: 5px;
<mask> user-select: none;
</s> Adjust node title and icon positioning
Former-commit-id: 6e6331e26c4fbe2877500bf89b7d9248560276d0 </s> remove grid-row: 1;
grid-column: 1;
</s> add </s> remove display: grid;
grid-template-columns: 1fr auto;
grid-template-rows: 100%;
</s> add position: relative;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/da987480a30e34e796342eecfea5ef31f77caa91 | packages/dev/sharedUiComponents/src/nodeGraphSystem/graphNode.modules.scss |
<mask> margin-left: 5px;
<mask> }
<mask>
<mask> .header {
<mask> grid-row: 1;
<mask> grid-column: 1;
<mask> font-size: 16px;
<mask> text-align: center;
<mask> white-space: nowrap;
<mask> text-overflow: ellipsis;
<mask> overflow: hidden;
</s> Adjust node title and icon positioning
Former-commit-id: 6e6331e26c4fbe2877500bf89b7d9248560276d0 </s> remove grid-row: 1;
grid-column: 2;
</s> add position: absolute;
right: 0px;
top: 2px;
</s> remove display: grid;
grid-template-columns: 1fr auto;
grid-template-rows: 100%;
</s> add position: relative;
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/da987480a30e34e796342eecfea5ef31f77caa91 | packages/dev/sharedUiComponents/src/nodeGraphSystem/graphNode.modules.scss | |
font-family: 'acumin-pro-condensed';
| <mask> width: 100%;
<mask> grid-template-columns: 25% 75%;
<mask> .performancePlayheadButton {
<mask> grid-area: liveButton;
<mask> height: $buttonHeight;
<mask> width: 100px;
<mask> justify-self: right;
<mask> background-color: #dcdfe1;
</s> More styling for the perf profiler.
Former-commit-id: 80e706cf3ab12fcd3f33b1e76af9f51433da84be </s> remove background-color: lightgrey;
</s> add background-color: rgb(235, 237, 238);
</s> remove background-color: darkslategray;
</s> add background-color: rgb(46, 63, 71);
</s> remove background-color: royalblue;
</s> add background-color: rgb(74, 89, 96);
text-transform: uppercase;
font-size: smaller;
</s> remove background-color: lightsteelblue;
</s> add background-color: rgb(220, 223, 225);
| [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/db751a2970970f344caac6e892145eebcc28abea | inspector/src/components/actionTabs/tabs/performanceViewer/scss/performanceViewer.scss |
background-color: rgb(46, 63, 71);
| <mask> }
<mask> }
<mask>
<mask> .version-header {
<mask> background-color: darkslategray;
<mask> color: white;
<mask> grid-template-columns: 10px 1fr 1fr 10px;
<mask>
<mask> .category {
<mask> grid-column: 2;
</s> More styling for the perf profiler.
Former-commit-id: 80e706cf3ab12fcd3f33b1e76af9f51433da84be </s> remove background-color: royalblue;
</s> add background-color: rgb(74, 89, 96);
text-transform: uppercase;
font-size: smaller;
</s> remove background-color: lightgrey;
</s> add background-color: rgb(235, 237, 238);
</s> remove background-color: lightsteelblue;
</s> add background-color: rgb(220, 223, 225);
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/db751a2970970f344caac6e892145eebcc28abea | inspector/src/components/actionTabs/tabs/performanceViewer/scss/performanceViewer.scss |
font-size: smaller;
| <mask> .version-header {
<mask> background-color: rgb(46, 63, 71);
<mask> color: white;
<mask> grid-template-columns: 10px 1fr 1fr 10px;
<mask>
<mask> .category {
<mask> grid-column: 2;
<mask> }
<mask>
<mask> .value {
</s> More styling for the perf profiler.
Former-commit-id: 80e706cf3ab12fcd3f33b1e76af9f51433da84be </s> remove background-color: darkslategray;
</s> add background-color: rgb(46, 63, 71);
</s> remove background-color: royalblue;
</s> add background-color: rgb(74, 89, 96);
text-transform: uppercase;
font-size: smaller;
</s> remove background-color: lightgrey;
</s> add background-color: rgb(235, 237, 238);
</s> remove background-color: lightsteelblue;
</s> add background-color: rgb(220, 223, 225);
| [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/db751a2970970f344caac6e892145eebcc28abea | inspector/src/components/actionTabs/tabs/performanceViewer/scss/performanceViewer.scss |
background-color: rgb(74, 89, 96);
text-transform: uppercase;
font-size: smaller;
| <mask> }
<mask>
<mask> // mid-dark color
<mask> .category-header {
<mask> background-color: royalblue;
<mask> }
<mask>
<mask> .measure {
<mask> color: black;
<mask> grid-template-columns: 10px 6fr 1fr;
</s> More styling for the perf profiler.
Former-commit-id: 80e706cf3ab12fcd3f33b1e76af9f51433da84be </s> remove background-color: lightgrey;
</s> add background-color: rgb(235, 237, 238);
</s> remove background-color: darkslategray;
</s> add background-color: rgb(46, 63, 71);
</s> remove background-color: lightsteelblue;
</s> add background-color: rgb(220, 223, 225);
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/db751a2970970f344caac6e892145eebcc28abea | inspector/src/components/actionTabs/tabs/performanceViewer/scss/performanceViewer.scss |
background-color: rgb(220, 223, 225);
| <mask> }
<mask>
<mask> //darker color
<mask> .measure:nth-child(odd) {
<mask> background-color: lightsteelblue;
<mask> }
<mask>
<mask> // lighter color
<mask> .measure:nth-child(even) {
<mask> background-color: lightgrey;
</s> More styling for the perf profiler.
Former-commit-id: 80e706cf3ab12fcd3f33b1e76af9f51433da84be </s> remove background-color: lightgrey;
</s> add background-color: rgb(235, 237, 238);
</s> remove background-color: royalblue;
</s> add background-color: rgb(74, 89, 96);
text-transform: uppercase;
font-size: smaller;
</s> remove background-color: darkslategray;
</s> add background-color: rgb(46, 63, 71);
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/db751a2970970f344caac6e892145eebcc28abea | inspector/src/components/actionTabs/tabs/performanceViewer/scss/performanceViewer.scss |
background-color: rgb(235, 237, 238);
| <mask> }
<mask>
<mask> // lighter color
<mask> .measure:nth-child(even) {
<mask> background-color: lightgrey;
<mask> }
<mask>
<mask> .checkBoxLine {
<mask> color: white;
<mask> width: 100%;
</s> More styling for the perf profiler.
Former-commit-id: 80e706cf3ab12fcd3f33b1e76af9f51433da84be </s> remove background-color: lightsteelblue;
</s> add background-color: rgb(220, 223, 225);
</s> remove background-color: royalblue;
</s> add background-color: rgb(74, 89, 96);
text-transform: uppercase;
font-size: smaller;
</s> remove background-color: darkslategray;
</s> add background-color: rgb(46, 63, 71);
| [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/db751a2970970f344caac6e892145eebcc28abea | inspector/src/components/actionTabs/tabs/performanceViewer/scss/performanceViewer.scss |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.