Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@babylonjs/serializers

Package Overview
Dependencies
Maintainers
1
Versions
553
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babylonjs/serializers - npm Package Compare versions

Comparing version 4.1.0-alpha.1 to 4.1.0-alpha.2

5

glTF/2.0/Extensions/KHR_texture_transform.d.ts
import { ImageMimeType } from "babylonjs-gltf2interface";
import { Nullable } from "@babylonjs/core/types";
import { Vector2 } from "@babylonjs/core/Maths/math";
import { BaseTexture } from "@babylonjs/core/Materials/Textures/baseTexture";
import { Texture } from "@babylonjs/core/Materials/Textures/texture";
import { Scene } from "@babylonjs/core/scene";
import { IGLTFExporterExtensionV2 } from "../glTFExporterExtension";

@@ -33,3 +30,3 @@ import { _Exporter } from "../glTFExporter";

*/
textureTransformTextureAsync(babylonTexture: Texture, offset: Vector2, rotation: number, scale: Vector2, scene: Scene): Promise<BaseTexture>;
private _textureTransformTextureAsync;
}

@@ -1,2 +0,1 @@

import { Vector2 } from "@babylonjs/core/Maths/math";
import { Tools } from "@babylonjs/core/Misc/tools";

@@ -26,2 +25,8 @@ import { ProceduralTexture } from "@babylonjs/core/Materials/Textures/Procedurals/proceduralTexture";

return new Promise(function (resolve, reject) {
var scene = babylonTexture.getScene();
if (!scene) {
reject(context + ": \"scene\" is not defined for Babylon texture " + babylonTexture.name + "!");
return;
}
// TODO: this doesn't take into account rotation center values
var texture_transform_extension = {};

@@ -39,15 +44,5 @@ if (babylonTexture.uOffset !== 0 || babylonTexture.vOffset !== 0) {

resolve(babylonTexture);
return;
}
var scale = texture_transform_extension.scale ? new Vector2(texture_transform_extension.scale[0], texture_transform_extension.scale[1]) : Vector2.One();
var rotation = texture_transform_extension.rotation != null ? texture_transform_extension.rotation : 0;
var offset = texture_transform_extension.offset ? new Vector2(texture_transform_extension.offset[0], texture_transform_extension.offset[1]) : Vector2.Zero();
var scene = babylonTexture.getScene();
if (!scene) {
reject(context + ": \"scene\" is not defined for Babylon texture " + babylonTexture.name + "!");
}
else {
_this.textureTransformTextureAsync(babylonTexture, offset, rotation, scale, scene).then(function (texture) {
resolve(texture);
});
}
return _this._textureTransformTextureAsync(babylonTexture, scene);
});

@@ -63,4 +58,4 @@ };

*/
KHR_texture_transform.prototype.textureTransformTextureAsync = function (babylonTexture, offset, rotation, scale, scene) {
return new Promise(function (resolve, reject) {
KHR_texture_transform.prototype._textureTransformTextureAsync = function (babylonTexture, scene) {
return new Promise(function (resolve) {
var proceduralTexture = new ProceduralTexture("" + babylonTexture.name, babylonTexture.getSize(), "textureTransform", scene);

@@ -67,0 +62,0 @@ if (!proceduralTexture) {

6

package.json

@@ -7,3 +7,3 @@ {

"description": "The Babylon.js serializers library is an extension you can use to serialize Babylon scenes.",
"version": "4.1.0-alpha.1",
"version": "4.1.0-alpha.2",
"repository": {

@@ -96,4 +96,4 @@ "type": "git",

"dependencies": {
"@babylonjs/core": "4.1.0-alpha.1",
"babylonjs-gltf2interface": "4.1.0-alpha.1",
"@babylonjs/core": "4.1.0-alpha.2",
"babylonjs-gltf2interface": "4.1.0-alpha.2",
"tslib": "^1.9.3"

@@ -100,0 +100,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc