docstring_tokens stringlengths 0 76.5k | code_tokens stringlengths 75 1.81M | label_window listlengths 4 2.12k | html_url stringlengths 74 116 | file_name stringlengths 3 311 |
|---|---|---|---|---|
<mask> "dtsBundle": {
<mask> "name": "babylonjs-viewer",
<mask> "main": "../../Viewer/dist/build/src/index.d.ts",
<mask> "out": "../../../../dist/preview release/viewer/babylon.viewer.module.d.ts",
<mask> "legacyDeclaration": true,
<mask>... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | Tools/Gulp/config.json | |
"processDeclaration": {
"packageName": "babylonjs-viewer",
"moduleName": "BabylonViewer",
"importsToRemove": [
"pep",
"babylonjs-loaders"
],
"classMap": {
"babylonjs": ... | <mask> "prependText": "/// <reference path=\"./babylon.d.ts\"/>\n/// <reference path=\"./babylon.glTF2Interface.d.ts\"/>\n/// <reference path=\"./babylonjs.loaders.d.ts\"/>\ndeclare module \"babylonjs-loaders\"{ export=BABYLON;}\n"
<mask> },
<mask> "outputs": [
<mask> ... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | Tools/Gulp/config.json |
var processDeclaration = require('./processViewerDeclaration'); | <mask> const through = require('through2');
<mask> var karmaServer = require('karma').Server;
<mask>
<mask> //viewer declaration
<mask> var processViewerDeclaration = require('./processViewerDeclaration');
<mask>
<mask> var config = require("./config.json");
<mask>
<mask> var del = require("del");
<mask>
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | Tools/Gulp/gulpfile.js |
if (settings.build.processDeclaration) {
var newData = processDeclaration(data, settings.build.processDeclaration); | <mask> fs.readFile(fileLocation, function (err, data) {
<mask> if (err) throw err;
<mask> data = (settings.build.dtsBundle.prependText || "") + '\n' + data.toString();
<mask> fs.writeFile(fileLocation, data);... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | Tools/Gulp/gulpfile.js |
//build = build
//.pipe(uglify())
//.pipe(optimisejs()) | <mask> processDestination(dest);
<mask> });
<mask>
<mask> if (minifiedOutputs.length) {
<mask> build = build
<mask> .pipe(uglify())
<mask> .pipe(optimisejs())
<mask> }
<mask>... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | Tools/Gulp/gulpfile.js |
let buildEvent = wpBuild
.pipe(gulp.dest(outputDirectory))
//back-compat
.pipe(through.obj(function (file, enc, cb) {
// only js files
const isjs = /\.js$/.test(file.path);
... | <mask>
<mask> } else {
<mask> sequence.push(
<mask> buildEvent
<mask> );
<mask> if (settings.build.processDeclaration) {
</s> legacy declaration setup
Former-commit-id: c5b57e29b914cfaccb0296abcc195537d1f51a3a </s> remove ... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | Tools/Gulp/gulpfile.js |
buildEvent
);
if (settings.build.processDeclaration) {
buildEvent.on("end", function () {
let fileLocation = path.join(outputDirectory, settings.build.processDeclaration.filename);
fs.readFile(fileLoc... | <mask> sequence.push(build);
<mask>
<mask> } else {
<mask> sequence.push(
<mask> wpBuild
<mask> //.pipe(rename(library.output.replace(".js", library.noBundleInName ? '.js' : ".bundle.js")))
<mask> //.... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | Tools/Gulp/gulpfile.js |
let wpBuild = webpackStream(require('../../Viewer/webpack.gulp.config.js')); | <mask> * Transpiles viewer typescript unit tests.
<mask> */
<mask> gulp.task("tests-viewer-validation-transpile", function (done) {
<mask>
<mask> let wpBuild = webpackStream(require('../../Viewer//webpack.gulp.config.js'));
<mask>
<mask> // clean the built directory
<mask> rmDir("../../Viewer/t... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | Tools/Gulp/gulpfile.js |
module.exports = function (data, options) {
/*
{
packageName: string,
moduleName: string,
importsToRemove: Array<string>,
classMap
}
*/
| <mask> module.exports = function (data) {
<mask>
<mask> var str = "" + data;
<mask>
<mask> // this regex is not working on node 6 for some reason:
<mask> // str = str.replace(/declare module 'babylonjs-viewer\/' {((?!(declare))(.|\n))*\n}/g, '');
</s> legacy declaration setup
Former-commit-id: c5... | [
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | Tools/Gulp/processViewerDeclaration.js |
var firstIndex = lines.findIndex((line => { return line.indexOf(`'${options.packageName}/'`) !== -1 }));
| <mask> // this regex is not working on node 6 for some reason:
<mask> // str = str.replace(/declare module 'babylonjs-viewer\/' {((?!(declare))(.|\n))*\n}/g, '');
<mask>
<mask> let lines = str.split('\n');
<mask> var firstIndex = lines.findIndex((line => { return line.indexOf("'babylonjs-viewer/'"... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | Tools/Gulp/processViewerDeclaration.js |
str = str.replace(/declare module (.*) {/g, `declare module ${options.moduleName} {`);
str = str.replace("import * as BABYLON from 'babylonjs';", "");
let regexp = new RegExp(`import {(.*)} from ['"]${options.packageName}(.*)['"];`, 'g');
str = str.replace(regexp, '');
if (options.importsToR... | <mask> var lastIndex = lines.findIndex(((line, idx) => { return line.trim() === '}' && idx > firstIndex }));
<mask> lines.splice(firstIndex, lastIndex - firstIndex + 1);
<mask> str = lines.join('\n');
<mask>
<mask> str = str.replace(/declare module (.*) {/g, 'declare module BabylonViewer {').repla... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | Tools/Gulp/processViewerDeclaration.js |
if ((options.classMap)) {
Object.keys(options.classMap).forEach(package => {
var babylonRegex = new RegExp(`import {(.*)} from ['"](${package})['"];`, "g");
| <mask> str = str.replace(/import {(.*)} from ['"]babylonjs-viewer(.*)['"];/g, '').replace(/import 'babylonjs-loaders';/, '').replace(/import 'pep';/, '');
<mask>
<mask> //find all used BABYLON and BABYLON-Loaders classes:
<mask>
<mask> var babylonRegex = /import {(.*)} from ['"](babylonjs|babylonjs-l... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | Tools/Gulp/processViewerDeclaration.js |
var match = babylonRegex.exec(str);
let classes = new Set();
while (match != null) {
if (match[1]) {
match[1].split(",").forEach(element => {
classes.add(element.trim());
});
}
... | <mask> //find all used BABYLON and BABYLON-Loaders classes:
<mask>
<mask> var babylonRegex = /import {(.*)} from ['"](babylonjs|babylonjs-loaders)['"];/g
<mask>
<mask> var match = babylonRegex.exec(str);
<mask> let classes = new Set();
<mask> while (match != null) {
<mask> if (matc... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | Tools/Gulp/processViewerDeclaration.js |
})
| <mask> if (match[1]) {
<mask> match[1].split(",").forEach(element => {
<mask> classes.add(element.trim());
<mask> });
<mask> }
<mask> match = babylonRegex.exec(str);
<mask> }
<mask> str = str.replace(babylonRegex, '');
<mask> classes.f... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | Tools/Gulp/processViewerDeclaration.js |
<mask> });
<mask> }
<mask> match = babylonRegex.exec(str);
<mask> }
<mask> str = str.replace(babylonRegex, '');
<mask> classes.forEach(cls => {
<mask> let rg = new RegExp(`([ <])(${cls})([^\\w])`, "g")
<mask> str = str.replace(rg, "$1BABYLON.$2$3");
<mask... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | Tools/Gulp/processViewerDeclaration.js | |
str = str.replace(/export {(.*)};/g, '');
str = str.split("\n").filter(line => line.trim()).join("\n");
| <mask> let rg = new RegExp(`([ <])(${cls})([^\\w])`, "g")
<mask> str = str.replace(rg, "$1BABYLON.$2$3");
<mask> });
<mask>
<mask> str = str.replace(/export {(.*)};/g, '')
<mask>
<mask> return str;
<mask> } </s> legacy declaration setup
Former-commit-id: c5b57e29b914cfaccb0296abc... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | Tools/Gulp/processViewerDeclaration.js |
import { InputText } from "./inputText";
| <mask> /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
<mask>
<mask> module BABYLON.GUI {
<mask> /**
<mask> * Class used to create a password control
<mask> */
</s> legacy declaration setup
Former-commit-id: c5b57e29b914cfaccb0296abcc195537d1f51a3a </s> remove module BABYLO... | [
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | gui/src/2D/controls/inputPassword.ts |
/**
* Class used to create a password control
*/
export class InputPassword extends InputText {
protected _beforeRenderText(text: string): string {
let txt = "";
for (let i = 0; i < text.length; i++) {
txt += "\u2022";
| <mask> /// <reference path="../../../../dist/preview release/babylon.d.ts"/>
<mask>
<mask> module BABYLON.GUI {
<mask> /**
<mask> * Class used to create a password control
<mask> */
<mask> export class InputPassword extends InputText {
<mask> protected _beforeRenderText(text: string):... | [
"keep",
"keep",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | gui/src/2D/controls/inputPassword.ts |
return txt;
| <mask> txt += "\u2022";
<mask> }
<mask> }
<mask> }
</s> legacy declaration setup
Former-commit-id: c5b57e29b914cfaccb0296abcc195537d1f51a3a </s> remove module BABYLON.GUI {
/**
* Class used to create a password control
*/
export class InputPassword extends InputText {
... | [
"keep",
"add",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | gui/src/2D/controls/inputPassword.ts |
<mask> import * as GUI from "babylonjs-gui";
<mask> import { PropertyLine } from "../details/PropertyLine";
<mask> import { Helpers } from "../helpers/Helpers";
<mask> import { AbstractTreeTool } from "../treetools/AbstractTreeTool";
<mask> import { Checkbox, IToolVisible } from "../treetools/Checkbox";
<mask> im... | [
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | inspector/src/adapters/GUIAdapter.ts | |
import { Control } from "babylonjs-gui";
| <mask> import { AbstractTreeTool } from "../treetools/AbstractTreeTool";
<mask> import { Checkbox, IToolVisible } from "../treetools/Checkbox";
<mask> import { Adapter } from "./Adapter";
<mask>
<mask>
<mask> export class GUIAdapter
<mask> extends Adapter
<mask> implements IToolVisible {
</s> legacy ... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | inspector/src/adapters/GUIAdapter.ts |
constructor(obj: Control) {
| <mask> export class GUIAdapter
<mask> extends Adapter
<mask> implements IToolVisible {
<mask>
<mask> constructor(obj: GUI.Control) {
<mask> super(obj);
<mask> }
<mask>
<mask> /** Returns the name displayed in the tree */
<mask> public id(): string {
</s> legacy declaration s... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | inspector/src/adapters/GUIAdapter.ts |
(this._obj as Control).isVisible = b;
| <mask> return tools;
<mask> }
<mask>
<mask> public setVisible(b: boolean) {
<mask> (this._obj as GUI.Control).isVisible = b;
<mask> }
<mask>
<mask> public isVisible(): boolean {
<mask> return (this._obj as GUI.Control).isVisible;
<mask> }
</s> legacy declaration ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | inspector/src/adapters/GUIAdapter.ts |
return (this._obj as Control).isVisible;
| <mask> (this._obj as GUI.Control).isVisible = b;
<mask> }
<mask>
<mask> public isVisible(): boolean {
<mask> return (this._obj as GUI.Control).isVisible;
<mask> }
<mask> }
</s> legacy declaration setup
Former-commit-id: c5b57e29b914cfaccb0296abcc195537d1f51a3a </s> remove ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | inspector/src/adapters/GUIAdapter.ts |
mode: "production",
| <mask> "sass-loader"
<mask> ]
<mask> }]
<mask> },
<mask> mode: "development",
<mask> devServer: {
<mask> contentBase: path.join(__dirname, "dist"),
<mask> compress: false,
<mask> //open: true,
<mask> port: 9000
</s> legacy declar... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90d2ae0e79698eb1e34909a0bc37c0ed08098da7 | inspector/webpack.config.js |
else if (deviceType === DeviceType.Touch) {
this.onDeviceConnected(deviceType, deviceSlot);
}
| <mask>
<mask> if (!this._inputs[deviceType][deviceSlot]) {
<mask> this._addPointerDevice(deviceType, deviceSlot, evt.clientX, evt.clientY);
<mask> }
<mask>
<mask> const pointer = this._inputs[deviceType][deviceSlot];
<mask> if (pointer) {
<mask> ... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90fa10012ecbf819a03ccf0090b53e099a46553c | src/DeviceInput/InputDevices/webDeviceInputSystem.ts |
if (deviceType === DeviceType.Touch) {
this.onDeviceDisconnected(deviceType, deviceSlot);
}
| <mask>
<mask> this.onInputChanged(deviceEvent);
<mask> }
<mask> });
<mask>
<mask> // Set Wheel Event Name, code originally from scene.inputManager
<mask> this._wheelEventName = "onwheel" in document.createElement("div") ? "wheel" : // Modern browsers su... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90fa10012ecbf819a03ccf0090b53e099a46553c | src/DeviceInput/InputDevices/webDeviceInputSystem.ts |
this.onDeviceDisconnected(DeviceType.Touch, deviceSlot);
| <mask> deviceEvent.previousState = 1;
<mask> this.onInputChanged(deviceEvent);
<mask>
<mask> this._activeTouchIds[deviceSlot] = -1;
<mask> }
<mask> }
<mask> }
<mask> });
<mask>
<ma... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/90fa10012ecbf819a03ccf0090b53e099a46553c | src/DeviceInput/InputDevices/webDeviceInputSystem.ts |
camera: FreeCamera;
| <mask> module BABYLON {
<mask> export class FreeCameraGamepadInput implements ICameraInput<FreeCamera> {
<mask> camera : FreeCamera;
<mask>
<mask> public gamepad: Gamepad;
<mask> private _gamepads: Gamepads;
<mask>
<mask> @serialize()
<mask> public g... | [
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/91d1b19030365aea0b9cc2923a329f8d02cea659 | src/Cameras/Inputs/babylon.freecamera.input.gamepad.ts |
// private members
private _cameraTransform: Matrix = Matrix.Identity();
private _deltaTransform: Vector3 = Vector3.Zero();
private _vector3: Vector3 = Vector3.Zero();
private _vector2: Vector2 = Vector2.Zero();
attachControl(element: HTMLElement, noPreventDefaul... | <mask> public gamepadAngularSensibility = 200;
<mask>
<mask> @serialize()
<mask> public gamepadMoveSensibility = 40;
<mask>
<mask> attachControl(element : HTMLElement, noPreventDefault?: boolean){
<mask> this._gamepads = new Gamepads((gamepad: Gamepad) => { t... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/91d1b19030365aea0b9cc2923a329f8d02cea659 | src/Cameras/Inputs/babylon.freecamera.input.gamepad.ts |
checkInputs() {
| <mask> this._gamepads.dispose();
<mask> }
<mask> this.gamepad = null;
<mask> }
<mask>
<mask> checkInputs(){
<mask> if (this.gamepad) {
<mask> var camera = this.camera;
<mask> var LSValues = this.gamepad... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/91d1b19030365aea0b9cc2923a329f8d02cea659 | src/Cameras/Inputs/babylon.freecamera.input.gamepad.ts |
if (!camera.rotationQuaternion) {
Matrix.RotationYawPitchRollToRef(camera.rotation.y, camera.rotation.x, 0, this._cameraTransform);
} else {
camera.rotationQuaternion.toRotationMatrix(this._cameraTransform);
}
| <mask> var normalizedRY = RSValues.y / this.gamepadAngularSensibility;
<mask> RSValues.x = Math.abs(normalizedRX) > 0.001 ? 0 + normalizedRX : 0;
<mask> RSValues.y = Math.abs(normalizedRY) > 0.001 ? 0 + normalizedRY : 0;
<mask>
<mask> var cameraTrans... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/91d1b19030365aea0b9cc2923a329f8d02cea659 | src/Cameras/Inputs/babylon.freecamera.input.gamepad.ts |
this._vector3.copyFromFloats(LSValues.x * speed, 0, -LSValues.y * speed);
Vector3.TransformCoordinatesToRef(this._vector3, this._cameraTransform, this._deltaTransform);
camera.cameraDirection.addInPlace(this._deltaTransform);
this._vector2.copyFromFlo... | <mask>
<mask> var cameraTransform = Matrix.RotationYawPitchRoll(camera.rotation.y, camera.rotation.x, 0);
<mask>
<mask> var speed = camera._computeLocalCameraSpeed() * 50.0;
<mask> var deltaTransform = Vector3.TransformCoordinates(new Vector3(LSValues.x * speed, 0,... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/91d1b19030365aea0b9cc2923a329f8d02cea659 | src/Cameras/Inputs/babylon.freecamera.input.gamepad.ts |
getTypeName(): string {
| <mask> if (gamepad.index === 0) {
<mask> this.gamepad = gamepad;
<mask> }
<mask> }
<mask>
<mask> getTypeName(): string{
<mask> return "FreeCameraGamepadInput";
<mask> }
<mask>
<mask> getSimpleName(){
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/91d1b19030365aea0b9cc2923a329f8d02cea659 | src/Cameras/Inputs/babylon.freecamera.input.gamepad.ts |
getSimpleName() {
| <mask>
<mask> getTypeName(): string{
<mask> return "FreeCameraGamepadInput";
<mask> }
<mask>
<mask> getSimpleName(){
<mask> return "gamepad";
<mask> }
<mask> }
<mask>
<mask> CameraInputTypes["FreeCameraGamepadInput"] = Fre... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/91d1b19030365aea0b9cc2923a329f8d02cea659 | src/Cameras/Inputs/babylon.freecamera.input.gamepad.ts |
var target = _this._getTargetPosition(); | <mask> var sinb = Math.sin(_this.beta);
<mask> if (sinb === 0) {
<mask> sinb = 0.0001;
<mask> }
<mask> var target = _this.target;
<mask> target.addToRef(new BABYLON.Vector3(_this.radius * cosa * sinb, _this.radius ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Cameras/babylon.arcRotateCamera.js |
this._cache.target.copyFrom(this._getTargetPosition()); | <mask> ArcRotateCamera.prototype._updateCache = function (ignoreParentClass) {
<mask> if (!ignoreParentClass) {
<mask> _super.prototype._updateCache.call(this);
<mask> }
<mask> this._cache.target.copyFrom(this.target);
<mask> this._cache.alph... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Cameras/babylon.arcRotateCamera.js |
ArcRotateCamera.prototype._getTargetPosition = function () {
if (this.target.getAbsolutePosition) {
return this.target.getAbsolutePosition();
}
return this.target;
}; | <mask> this._cache.radius = this.radius;
<mask> this._cache.targetScreenOffset.copyFrom(this.targetScreenOffset);
<mask> };
<mask> // Synchronized
<mask> ArcRotateCamera.prototype._isSynchronizedViewMatrix = function () {
<mask> if (!_super.prototype._is... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Cameras/babylon.arcRotateCamera.js |
var radiusv3 = this.position.subtract(this._getTargetPosition()); | <mask> this.radius = this.upperRadiusLimit;
<mask> }
<mask> };
<mask> ArcRotateCamera.prototype.rebuildAnglesAndRadius = function () {
<mask> var radiusv3 = this.position.subtract(this.target);
<mask> this.radius = radiusv3.length();
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Cameras/babylon.arcRotateCamera.js |
if (this._getTargetPosition().equals(target)) { | <mask> this.position = position;
<mask> this.rebuildAnglesAndRadius();
<mask> };
<mask> ArcRotateCamera.prototype.setTarget = function (target) {
<mask> if (this.target.equals(target)) {
<mask> return;
<mask> }
<mask> th... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Cameras/babylon.arcRotateCamera.js |
var target = this._getTargetPosition(); | <mask> var sinb = Math.sin(this.beta);
<mask> if (sinb === 0) {
<mask> sinb = 0.0001;
<mask> }
<mask> var target = this.target;
<mask> target.addToRef(new BABYLON.Vector3(this.radius * cosa * sinb, this.radius * cosb, this.radius * sina *... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Cameras/babylon.arcRotateCamera.js |
this._cache.target.copyFrom(this._getTargetPosition());
| <mask> if (!ignoreParentClass) {
<mask> super._updateCache();
<mask> }
<mask>
<mask> this._cache.target.copyFrom(this.target);
<mask> this._cache.alpha = this.alpha;
<mask> this._cache.beta = this.beta;
<mask> this._cache.r... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Cameras/babylon.arcRotateCamera.ts |
private _getTargetPosition(): Vector3 {
if ((<any>this.target).getAbsolutePosition) {
return (<any>this.target).getAbsolutePosition();
}
return this.target;
}
| <mask> this._cache.targetScreenOffset.copyFrom(this.targetScreenOffset);
<mask> }
<mask>
<mask> // Synchronized
<mask> public _isSynchronizedViewMatrix(): boolean {
<mask> if (!super._isSynchronizedViewMatrix())
<mask> return false;
</s> Building ... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Cameras/babylon.arcRotateCamera.ts |
var radiusv3 = this.position.subtract(this._getTargetPosition());
| <mask> }
<mask> }
<mask>
<mask> public rebuildAnglesAndRadius() {
<mask> var radiusv3 = this.position.subtract(this.target);
<mask> this.radius = radiusv3.length();
<mask>
<mask> // Alpha
<mask> this.alpha = Math.acos(radiusv3.x / Ma... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Cameras/babylon.arcRotateCamera.ts |
if (this._getTargetPosition().equals(target)) {
| <mask> this.rebuildAnglesAndRadius();
<mask> }
<mask>
<mask> public setTarget(target: Vector3): void {
<mask> if (this.target.equals(target)) {
<mask> return;
<mask> }
<mask> this.target = target;
<mask> this.rebuildAn... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Cameras/babylon.arcRotateCamera.ts |
var target = this._getTargetPosition();
| <mask> if (sinb === 0) {
<mask> sinb = 0.0001;
<mask> }
<mask>
<mask> var target = this.target;
<mask> target.addToRef(new Vector3(this.radius * cosa * sinb, this.radius * cosb, this.radius * sina * sinb), this._newPosition);
<mask> if ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Cameras/babylon.arcRotateCamera.ts |
var target = this._getTargetPosition();
| <mask> if (sinb === 0) {
<mask> sinb = 0.0001;
<mask> }
<mask>
<mask> var target = this.target;
<mask> target.addToRef(new Vector3(this.radius * cosa * sinb, this.radius * cosb, this.radius * sina * sinb), this._newPosition);
<mask> thi... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Cameras/babylon.arcRotateCamera.ts |
})(); | <mask> Color3.Magenta = function () { return new Color3(1, 0, 1); };
<mask> Color3.Yellow = function () { return new Color3(1, 1, 0); };
<mask> Color3.Gray = function () { return new Color3(0.5, 0.5, 0.5); };
<mask> return Color3;
<mask> }());
<mask> BABYLON.Color3 = Color3... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> }
<mask> return colors;
<mask> };
<mask> return Color4;
<mask> }());
<mask> BABYLON.Color4 = Color4;
<mask> var Vector2 = (function () {
<mask> function Vector2(x, y) {
<mask> this.x = x;
<mask> this.y = y;
</s> Buildi... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> var y = value1.y - value2.y;
<mask> return (x * x) + (y * y);
<mask> };
<mask> return Vector2;
<mask> }());
<mask> BABYLON.Vector2 = Vector2;
<mask> var Vector3 = (function () {
<mask> function Vector3(x, y, z) {
<mask> this.x = x;
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> ref.y = yaw;
<mask> ref.z = roll;
<mask> };
<mask> return Vector3;
<mask> }());
<mask> BABYLON.Vector3 = Vector3;
<mask> //Vector4 class created for EulerAngle class conversion to Quaternion
<mask> var Vector4 = (function () {
<mask> functi... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> center.scaleInPlace(0.5);
<mask> return center;
<mask> };
<mask> return Vector4;
<mask> }());
<mask> BABYLON.Vector4 = Vector4;
<mask> var Quaternion = (function () {
<mask> function Quaternion(x, y, z, w) {
<mask> if (x === void 0)... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> }
<mask> return new Quaternion((num3 * left.x) + (num2 * right.x), (num3 * left.y) + (num2 * right.y), (num3 * left.z) + (num2 * right.z), (num3 * left.w) + (num2 * right.w));
<mask> };
<mask> return Quaternion;
<mask> }());
<mask> BABYLON.Quaternion = Quater... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> Matrix._xAxis = Vector3.Zero();
<mask> Matrix._yAxis = Vector3.Zero();
<mask> Matrix._zAxis = Vector3.Zero();
<mask> return Matrix;
<mask> }());
<mask> BABYLON.Matrix = Matrix;
<mask> var Plane = (function () {
<mask> function Plane(a, b, c, d) {
<mask... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> var d = -(normal.x * origin.x + normal.y * origin.y + normal.z * origin.z);
<mask> return Vector3.Dot(point, normal) + d;
<mask> };
<mask> return Plane;
<mask> }());
<mask> BABYLON.Plane = Plane;
<mask> var Viewport = (function () {
<mask> funct... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> var height = engine.getRenderHeight(true);
<mask> return new Viewport(this.x * width, this.y * height, this.width * width, this.height * height);
<mask> };
<mask> return Viewport;
<mask> }());
<mask> BABYLON.Viewport = Viewport;
<mask> var Frustum = (fun... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> frustumPlanes[5].d = transform.m[15] + transform.m[13];
<mask> frustumPlanes[5].normalize();
<mask> };
<mask> return Frustum;
<mask> }());
<mask> BABYLON.Frustum = Frustum;
<mask> var Ray = (function () {
<mask> function Ray(origin, direction, l... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> var newDirection = Vector3.TransformNormal(ray.direction, matrix);
<mask> return new Ray(newOrigin, newDirection, ray.length);
<mask> };
<mask> return Ray;
<mask> }());
<mask> BABYLON.Ray = Ray;
<mask> (function (Space) {
<mask> Space[Space["LOC... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> Axis.X = new Vector3(1, 0, 0);
<mask> Axis.Y = new Vector3(0, 1, 0);
<mask> Axis.Z = new Vector3(0, 0, 1);
<mask> return Axis;
<mask> }());
<mask> BABYLON.Axis = Axis;
<mask> ;
<mask> var BezierCurve = (function () {
<mask> function BezierCurve() {... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> 3 * (1 - refinedT) * Math.pow(refinedT, 2) * y2 +
<mask> Math.pow(refinedT, 3);
<mask> };
<mask> return BezierCurve;
<mask> }());
<mask> BABYLON.BezierCurve = BezierCurve;
<mask> (function (Orientation) {
<mask> Orientation[Orientation["... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> Angle.FromDegrees = function (degrees) {
<mask> return new Angle(degrees * Math.PI / 180);
<mask> };
<mask> return Angle;
<mask> }());
<mask> BABYLON.Angle = Angle;
<mask> var Arc2 = (function () {
<mask> function Arc2(startPoint, midPoint, endPoint... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> this.orientation = (a2 - a1) < 0 ? Orientation.CW : Orientation.CCW;
<mask> this.angle = Angle.FromDegrees(this.orientation === Orientation.CW ? a1 - a3 : a3 - a1);
<mask> }
<mask> return Arc2;
<mask> }());
<mask> BABYLON.Arc2 = Arc2;
<mask> var PathCurs... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> this._onchange.push(f);
<mask> return this;
<mask> };
<mask> return PathCursor;
<mask> }());
<mask> BABYLON.PathCursor = PathCursor;
<mask> var Path2 = (function () {
<mask> function Path2(x, y) {
<mask> this._points = new Array();
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> Path2.StartingAt = function (x, y) {
<mask> return new Path2(x, y);
<mask> };
<mask> return Path2;
<mask> }());
<mask> BABYLON.Path2 = Path2;
<mask> var Path3D = (function () {
<mask> /**
<mask> * new Path3D(path, normal, raw)
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> normal0.normalize();
<mask> return normal0;
<mask> };
<mask> return Path3D;
<mask> }());
<mask> BABYLON.Path3D = Path3D;
<mask> var Curve3 = (function () {
<mask> function Curve3(points) {
<mask> this._length = 0;
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> }
<mask> return l;
<mask> };
<mask> return Curve3;
<mask> }());
<mask> BABYLON.Curve3 = Curve3;
<mask> // SphericalHarmonics
<mask> var SphericalHarmonics = (function () {
<mask> function SphericalHarmonics() {
<mask> this.L00 ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> this.L21 = this.L21.scale(scale);
<mask> this.L22 = this.L22.scale(scale);
<mask> };
<mask> return SphericalHarmonics;
<mask> }());
<mask> BABYLON.SphericalHarmonics = SphericalHarmonics;
<mask> // SphericalPolynomial
<mask> var SphericalPolynomial ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> result.xy = harmonics.L2_2.scale(0.858086);
<mask> return result;
<mask> };
<mask> return SphericalPolynomial;
<mask> }());
<mask> BABYLON.SphericalPolynomial = SphericalPolynomial;
<mask> // Vertex formats
<mask> var PositionNormalVertex = (functio... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> PositionNormalVertex.prototype.clone = function () {
<mask> return new PositionNormalVertex(this.position.clone(), this.normal.clone());
<mask> };
<mask> return PositionNormalVertex;
<mask> }());
<mask> BABYLON.PositionNormalVertex = PositionNormalVertex;
<mask>... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> PositionNormalTextureVertex.prototype.clone = function () {
<mask> return new PositionNormalTextureVertex(this.position.clone(), this.normal.clone(), this.uv.clone());
<mask> };
<mask> return PositionNormalTextureVertex;
<mask> }());
<mask> BABYLON.PositionNormal... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(); | <mask> Matrix.Zero(), Matrix.Zero(),
<mask> Matrix.Zero(), Matrix.Zero(),
<mask> Matrix.Zero(), Matrix.Zero()]; // 6 temp Matrices at once should be enough
<mask> return Tmp;
<mask> }());
<mask> BABYLON.Tmp = Tmp;
<mask> })(BABYLON || (BABYLON = {}));
</s> Bui... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Math/babylon.math.js |
})(BABYLON.Node); | <mask> AbstractMesh._BILLBOARDMODE_Y = 2;
<mask> AbstractMesh._BILLBOARDMODE_Z = 4;
<mask> AbstractMesh._BILLBOARDMODE_ALL = 7;
<mask> return AbstractMesh;
<mask> }(BABYLON.Node));
<mask> BABYLON.AbstractMesh = AbstractMesh;
<mask> })(BABYLON || (BABYLON = {}));
</s> Buil... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Mesh/babylon.abstractMesh.js |
})(); | <mask> this.visibleInstances = new Array();
<mask> this.renderSelf = new Array();
<mask> }
<mask> return _InstancesBatch;
<mask> }());
<mask> BABYLON._InstancesBatch = _InstancesBatch;
<mask> var Mesh = (function (_super) {
<mask> __extends(Mesh, _supe... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Mesh/babylon.mesh.js |
})(BABYLON.AbstractMesh); | <mask> Mesh._CAP_START = 1;
<mask> Mesh._CAP_END = 2;
<mask> Mesh._CAP_ALL = 3;
<mask> return Mesh;
<mask> }(BABYLON.AbstractMesh));
<mask> BABYLON.Mesh = Mesh;
<mask> })(BABYLON || (BABYLON = {}));
</s> Building with latest physics engine
Fixing issue with ArcRotateCamer... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Mesh/babylon.mesh.js |
var material = this._addMaterial(impostor.getParam("friction"), impostor.getParam("restitution")); | <mask> if (oldBody) {
<mask> this.removePhysicsBody(impostor);
<mask> }
<mask> //create the body and material
<mask> var material = this._addMaterial(impostor.getOptions().friction, impostor.getOptions().restitution);
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/Plugins/babylon.cannonJSPlugin.js |
mass: impostor.getParam("mass"), | <mask> }
<mask> //create the body and material
<mask> var material = this._addMaterial(impostor.getOptions().friction, impostor.getOptions().restitution);
<mask> var bodyCreationObject = {
<mask> mass: impostor.getOptions().mass,
... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/Plugins/babylon.cannonJSPlugin.js |
var nativeOptions = impostor.getParam("nativeOptions"); | <mask> mass: impostor.getOptions().mass,
<mask> material: material
<mask> };
<mask> // A simple extend, in case native options were used.
<mask> var nativeOptions = impostor.getOptions().nativeOptions;
<mask> f... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/Plugins/babylon.cannonJSPlugin.js |
})(); | <mask> CannonJSPlugin.prototype.dispose = function () {
<mask> //nothing to do, actually.
<mask> };
<mask> return CannonJSPlugin;
<mask> }());
<mask> BABYLON.CannonJSPlugin = CannonJSPlugin;
<mask> })(BABYLON || (BABYLON = {}));
</s> Building with latest physics engin... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/Plugins/babylon.cannonJSPlugin.js |
var material = this._addMaterial(impostor.getParam("friction"), impostor.getParam("restitution"));
| <mask> this.removePhysicsBody(impostor);
<mask> }
<mask>
<mask> //create the body and material
<mask> var material = this._addMaterial(impostor.getOptions().friction, impostor.getOptions().restitution);
<mask>
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/Plugins/babylon.cannonJSPlugin.ts |
mass: impostor.getParam("mass"),
| <mask> //create the body and material
<mask> var material = this._addMaterial(impostor.getOptions().friction, impostor.getOptions().restitution);
<mask>
<mask> var bodyCreationObject = {
<mask> mass: impostor.getOptions().mass,
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/Plugins/babylon.cannonJSPlugin.ts |
var nativeOptions = impostor.getParam("nativeOptions");
| <mask> mass: impostor.getOptions().mass,
<mask> material: material
<mask> };
<mask> // A simple extend, in case native options were used.
<mask> var nativeOptions = impostor.getOptions().nativeOptions;
<mask> f... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/Plugins/babylon.cannonJSPlugin.ts |
['force', 'torque', 'velocity', 'angularVelocity'].forEach(function (param) {
| <mask>
<mask> //try to keep the body moving in the right direction by taking old properties.
<mask> //Should be tested!
<mask> if (oldBody) {
<mask> ['force', 'torque', 'velocity', 'angularVelocity'].forEach(function(param) {
<ma... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/Plugins/babylon.cannonJSPlugin.ts |
if (!jointData.collision) {
| <mask> axisA: jointData.mainAxis ? new CANNON.Vec3().copy(jointData.mainAxis) : null,
<mask> axisB: jointData.connectedAxis ? new CANNON.Vec3().copy(jointData.connectedAxis) : null,
<mask> maxForce: jointData.nativeParams.maxForce
<mask> };
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/Plugins/babylon.cannonJSPlugin.ts |
if (mainBody.collisionFilterGroup === 1) {
| <mask> maxForce: jointData.nativeParams.maxForce
<mask> };
<mask> if(!jointData.collision) {
<mask> //add 1st body to a collision group of its own, if it is not in 1
<mask> if(mainBody.collisionFilterGroup === 1) {
<mask> ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/Plugins/babylon.cannonJSPlugin.ts |
if (connectedBody.collisionFilterGroup === 1) {
| <mask> if(mainBody.collisionFilterGroup === 1) {
<mask> mainBody.collisionFilterGroup = this._currentCollisionGroup;
<mask> this._currentCollisionGroup <<= 1;
<mask> }
<mask> if(connectedBody.collisionFilterGroup === 1) {
<mas... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/Plugins/babylon.cannonJSPlugin.ts |
})(); | <mask> OimoJSPlugin.prototype.dispose = function () {
<mask> this.world.clear();
<mask> };
<mask> return OimoJSPlugin;
<mask> }());
<mask> BABYLON.OimoJSPlugin = OimoJSPlugin;
<mask> })(BABYLON || (BABYLON = {}));
</s> Building with latest physics engine
Fixing issue ... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/Plugins/babylon.oimoJSPlugin.js |
})(); | <mask> PhysicsEngine.ConvexHullImpostor = BABYLON.PhysicsImpostor.ConvexHullImpostor;
<mask> PhysicsEngine.HeightmapImpostor = BABYLON.PhysicsImpostor.HeightmapImpostor;
<mask> PhysicsEngine.Epsilon = 0.001;
<mask> return PhysicsEngine;
<mask> }());
<mask> BABYLON.PhysicsEn... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/babylon.physicsEngine.js |
/**
* this function is executed by the physics engine.
*/ | <mask> this._deltaPosition = BABYLON.Vector3.Zero();
<mask> this._deltaRotation = new BABYLON.Quaternion();
<mask> this._tmpPositionWithDelta = BABYLON.Vector3.Zero();
<mask> this._tmpRotationWithDelta = new BABYLON.Quaternion();
<mask> this.beforeStep = ... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/babylon.physicsImpostor.js |
/**
* this function is executed by the physics engine.
*/ | <mask> func(_this);
<mask> });
<mask> };
<mask> this.afterStep = function () {
<mask> _this._onAfterPhysicsStepCallbacks.forEach(function (func) {
<mask> func(_this);
<mask> });
</s> Building with lat... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/babylon.physicsImpostor.js |
/**
* This function will completly initialize this impostor.
* It will create a new body - but only if this mesh has no parent.
* If it has, this impostor will not be used other than to define the impostor
* of the child mesh.
*/ | <mask> if (!this._mesh.parent) {
<mask> this._init();
<mask> }
<mask> }
<mask> PhysicsImpostor.prototype._init = function () {
<mask> this._physicsEngine.removeImpostor(this);
<mask> this.physicsBody = null;
<mask> this.... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/babylon.physicsImpostor.js |
/**
* Should a new body be generated.
*/ | <mask> return;
<mask> };
<mask> PhysicsImpostor.prototype.isBodyInitRequired = function () {
<mask> return this._bodyUpdateRequired || (!this._physicsBody && !this._parent);
<mask> };
<mask> PhysicsImpostor.prototype.setScalingUpdated = function (updated) {
... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/babylon.physicsImpostor.js |
/**
* Force a regeneration of this or the parent's impostor's body.
* Use under cautious - This will remove all joints already implemented.
*/ | <mask> };
<mask> PhysicsImpostor.prototype.setScalingUpdated = function (updated) {
<mask> this.forceUpdate();
<mask> };
<mask> PhysicsImpostor.prototype.forceUpdate = function () {
<mask> this._init();
<mask> if (this.parent) {
<mask> ... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/babylon.physicsImpostor.js |
/**
* Gets the body that holds this impostor. Either its own, or its parent.
*/ | <mask> configurable: true
<mask> });
<mask> Object.defineProperty(PhysicsImpostor.prototype, "physicsBody", {
<mask> get: function () {
<mask> return this._parent ? this._parent.physicsBody : this._physicsBody;
<mask> },
<mask> /**
... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/babylon.physicsImpostor.js |
return this._parent ? this._parent.physicsBody : this._physicsBody; | <mask> configurable: true
<mask> });
<mask> Object.defineProperty(PhysicsImpostor.prototype, "physicsBody", {
<mask> get: function () {
<mask> return this.parent ? this.parent.physicsBody : this._physicsBody;
<mask> },
<mask> set: fu... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/babylon.physicsImpostor.js |
/**
* Set the physics body. Used mainly by the physics engine/plugin
*/ | <mask> return this._parent ? this._parent.physicsBody : this._physicsBody;
<mask> },
<mask> set: function (physicsBody) {
<mask> if (this._physicsBody) {
<mask> this._physicsEngine.getPhysicsPlugin().removePhysicsBody(this);
<mask> ... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/babylon.physicsImpostor.js |
/**
* Get a specific parametes from the options parameter.
*/ | <mask> });
<mask> PhysicsImpostor.prototype.resetUpdateFlags = function () {
<mask> this._bodyUpdateRequired = false;
<mask> };
<mask> PhysicsImpostor.prototype.getOptions = function () {
<mask> return this._options;
<mask> };
<mask> Physic... | [
"keep",
"keep",
"keep",
"keep",
"replace",
"replace",
"replace",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/babylon.physicsImpostor.js |
/**
* Sets a specific parameter in the options given to the physics plugin
*/ | <mask> PhysicsImpostor.prototype.getParam = function (paramName) {
<mask> return this._options[paramName];
<mask> };
<mask> PhysicsImpostor.prototype.setParam = function (paramName, value) {
<mask> this._options[paramName] = value;
<mask> this._bodyUpdat... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/babylon.physicsImpostor.js |
PhysicsImpostor.prototype.getOptions = function () {
};
/**
* Set the body's velocity.
*/ | <mask> this._bodyUpdateRequired = true;
<mask> };
<mask> PhysicsImpostor.prototype.setVelocity = function (velocity) {
<mask> this._physicsEngine.getPhysicsPlugin().setVelocity(this, velocity);
<mask> };
<mask> /**
<mask> * Execute a function with ... | [
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/babylon.physicsImpostor.js |
/**
* Execute a function with the physics plugin native code.
* Provide a function the will have two variables - the world object and the physics body object.
*/ | <mask> */
<mask> PhysicsImpostor.prototype.setVelocity = function (velocity) {
<mask> this._physicsEngine.getPhysicsPlugin().setVelocity(this, velocity);
<mask> };
<mask> PhysicsImpostor.prototype.executeNativeFunction = function (func) {
<mask> func(this._... | [
"keep",
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/babylon.physicsImpostor.js |
/**
* Register a function that will be executed before the physics world is stepping forward.
*/ | <mask> PhysicsImpostor.prototype.executeNativeFunction = function (func) {
<mask> func(this._physicsEngine.getPhysicsPlugin().world, this.physicsBody);
<mask> };
<mask> PhysicsImpostor.prototype.registerBeforePhysicsStep = function (func) {
<mask> this._onBeforePhysi... | [
"keep",
"keep",
"add",
"keep",
"keep",
"keep",
"keep",
"keep",
"keep"
] | https://github.com/BabylonJS/Babylon.js/commit/920d57f40706bcc2a1d7bf661e4d5262aa2e7804 | src/Physics/babylon.physicsImpostor.js |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.