|
@@ -10712,8 +10712,8 @@ declare module "babylonjs/Engines/Extensions/engine.rawTexture" {
|
|
|
import { Nullable } from "babylonjs/types";
|
|
|
import { InternalTexture } from "babylonjs/Materials/Textures/internalTexture";
|
|
|
import { Scene } from "babylonjs/scene";
|
|
|
- module "babylonjs/Engines/engine" {
|
|
|
- interface Engine {
|
|
|
+ module "babylonjs/Engines/thinEngine" {
|
|
|
+ interface ThinEngine {
|
|
|
/**
|
|
|
* Creates a raw texture
|
|
|
* @param data defines the data to store in the texture
|
|
@@ -33274,63 +33274,6 @@ declare module "babylonjs/Engines/thinEngine" {
|
|
|
* @hidden
|
|
|
*/
|
|
|
_rescaleTexture(source: InternalTexture, destination: InternalTexture, scene: Nullable<any>, internalFormat: number, onComplete: () => void): void;
|
|
|
- /**
|
|
|
- * Creates a raw texture
|
|
|
- * @param data defines the data to store in the texture
|
|
|
- * @param width defines the width of the texture
|
|
|
- * @param height defines the height of the texture
|
|
|
- * @param format defines the format of the data
|
|
|
- * @param generateMipMaps defines if the engine should generate the mip levels
|
|
|
- * @param invertY defines if data must be stored with Y axis inverted
|
|
|
- * @param samplingMode defines the required sampling mode (Texture.NEAREST_SAMPLINGMODE by default)
|
|
|
- * @param compression defines the compression used (null by default)
|
|
|
- * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)
|
|
|
- * @returns the raw texture inside an InternalTexture
|
|
|
- */
|
|
|
- createRawTexture(data: Nullable<ArrayBufferView>, width: number, height: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>, type?: number): InternalTexture;
|
|
|
- /**
|
|
|
- * Creates a new raw cube texture
|
|
|
- * @param data defines the array of data to use to create each face
|
|
|
- * @param size defines the size of the textures
|
|
|
- * @param format defines the format of the data
|
|
|
- * @param type defines the type of the data (like Engine.TEXTURETYPE_UNSIGNED_INT)
|
|
|
- * @param generateMipMaps defines if the engine should generate the mip levels
|
|
|
- * @param invertY defines if data must be stored with Y axis inverted
|
|
|
- * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)
|
|
|
- * @param compression defines the compression used (null by default)
|
|
|
- * @returns the cube texture as an InternalTexture
|
|
|
- */
|
|
|
- createRawCubeTexture(data: Nullable<ArrayBufferView[]>, size: number, format: number, type: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>): InternalTexture;
|
|
|
- /**
|
|
|
- * Creates a new raw 3D texture
|
|
|
- * @param data defines the data used to create the texture
|
|
|
- * @param width defines the width of the texture
|
|
|
- * @param height defines the height of the texture
|
|
|
- * @param depth defines the depth of the texture
|
|
|
- * @param format defines the format of the texture
|
|
|
- * @param generateMipMaps defines if the engine must generate mip levels
|
|
|
- * @param invertY defines if data must be stored with Y axis inverted
|
|
|
- * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)
|
|
|
- * @param compression defines the compressed used (can be null)
|
|
|
- * @param textureType defines the compressed used (can be null)
|
|
|
- * @returns a new raw 3D texture (stored in an InternalTexture)
|
|
|
- */
|
|
|
- createRawTexture3D(data: Nullable<ArrayBufferView>, width: number, height: number, depth: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>, textureType?: number): InternalTexture;
|
|
|
- /**
|
|
|
- * Creates a new raw 2D array texture
|
|
|
- * @param data defines the data used to create the texture
|
|
|
- * @param width defines the width of the texture
|
|
|
- * @param height defines the height of the texture
|
|
|
- * @param depth defines the number of layers of the texture
|
|
|
- * @param format defines the format of the texture
|
|
|
- * @param generateMipMaps defines if the engine must generate mip levels
|
|
|
- * @param invertY defines if data must be stored with Y axis inverted
|
|
|
- * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)
|
|
|
- * @param compression defines the compressed used (can be null)
|
|
|
- * @param textureType defines the compressed used (can be null)
|
|
|
- * @returns a new raw 2D array texture (stored in an InternalTexture)
|
|
|
- */
|
|
|
- createRawTexture2DArray(data: Nullable<ArrayBufferView>, width: number, height: number, depth: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>, textureType?: number): InternalTexture;
|
|
|
private _unpackFlipYCached;
|
|
|
/**
|
|
|
* In case you are sharing the context with other applications, it might
|
|
@@ -35262,8 +35205,6 @@ declare module "babylonjs/Engines/engine" {
|
|
|
* @param postProcess The post process which's output should be bound
|
|
|
*/
|
|
|
setTextureFromPostProcessOutput(channel: number, postProcess: Nullable<PostProcess>): void;
|
|
|
- /** @hidden */
|
|
|
- _convertRGBtoRGBATextureData(rgbData: any, width: number, height: number, textureType: number): ArrayBufferView;
|
|
|
protected _rebuildBuffers(): void;
|
|
|
/** @hidden */
|
|
|
_renderFrame(): void;
|
|
@@ -59086,6 +59027,8 @@ declare module "babylonjs/Materials/Textures/colorGradingTexture" {
|
|
|
import { Scene } from "babylonjs/scene";
|
|
|
import { Matrix } from "babylonjs/Maths/math.vector";
|
|
|
import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
|
|
|
+ import { ThinEngine } from "babylonjs/Engines/thinEngine";
|
|
|
+ import "babylonjs/Engines/Extensions/engine.rawTexture";
|
|
|
/**
|
|
|
* This represents a color grading texture. This acts as a lookup table LUT, useful during post process
|
|
|
* It can help converting any input color in a desired output one. This can then be used to create effects
|
|
@@ -59096,10 +59039,6 @@ declare module "babylonjs/Materials/Textures/colorGradingTexture" {
|
|
|
*/
|
|
|
export class ColorGradingTexture extends BaseTexture {
|
|
|
/**
|
|
|
- * The current texture matrix. (will always be identity in color grading texture)
|
|
|
- */
|
|
|
- private _textureMatrix;
|
|
|
- /**
|
|
|
* The texture URL.
|
|
|
*/
|
|
|
url: string;
|
|
@@ -59107,14 +59046,21 @@ declare module "babylonjs/Materials/Textures/colorGradingTexture" {
|
|
|
* Empty line regex stored for GC.
|
|
|
*/
|
|
|
private static _noneEmptyLineRegex;
|
|
|
+ private _textureMatrix;
|
|
|
private _engine;
|
|
|
+ private _onLoad;
|
|
|
/**
|
|
|
* Instantiates a ColorGradingTexture from the following parameters.
|
|
|
*
|
|
|
* @param url The location of the color gradind data (currently only supporting 3dl)
|
|
|
- * @param scene The scene the texture will be used in
|
|
|
+ * @param sceneOrEngine The scene or engine the texture will be used in
|
|
|
+ * @param onLoad defines a callback triggered when the texture has been loaded
|
|
|
+ */
|
|
|
+ constructor(url: string, sceneOrEngine: Scene | ThinEngine, onLoad?: Nullable<() => void>);
|
|
|
+ /**
|
|
|
+ * Fires the onload event from the constructor if requested.
|
|
|
*/
|
|
|
- constructor(url: string, scene: Scene);
|
|
|
+ private _triggerOnLoad;
|
|
|
/**
|
|
|
* Returns the texture matrix used in most of the material.
|
|
|
* This is not used in color grading but keep for troubleshooting purpose (easily swap diffuse by colorgrading to look in).
|
|
@@ -59148,6 +59094,11 @@ declare module "babylonjs/Materials/Textures/colorGradingTexture" {
|
|
|
* Serializes the LUT texture to json format.
|
|
|
*/
|
|
|
serialize(): any;
|
|
|
+ /**
|
|
|
+ * Returns true if the passed parameter is a scene object (can be use for typings)
|
|
|
+ * @param sceneOrEngine The object to test.
|
|
|
+ */
|
|
|
+ private static _isScene;
|
|
|
}
|
|
|
}
|
|
|
declare module "babylonjs/Materials/Textures/equiRectangularCubeTexture" {
|
|
@@ -84975,7 +84926,7 @@ declare module BABYLON {
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|
|
|
- interface Engine {
|
|
|
+ interface ThinEngine {
|
|
|
/**
|
|
|
* Creates a raw texture
|
|
|
* @param data defines the data to store in the texture
|
|
@@ -106749,63 +106700,6 @@ declare module BABYLON {
|
|
|
* @hidden
|
|
|
*/
|
|
|
_rescaleTexture(source: InternalTexture, destination: InternalTexture, scene: Nullable<any>, internalFormat: number, onComplete: () => void): void;
|
|
|
- /**
|
|
|
- * Creates a raw texture
|
|
|
- * @param data defines the data to store in the texture
|
|
|
- * @param width defines the width of the texture
|
|
|
- * @param height defines the height of the texture
|
|
|
- * @param format defines the format of the data
|
|
|
- * @param generateMipMaps defines if the engine should generate the mip levels
|
|
|
- * @param invertY defines if data must be stored with Y axis inverted
|
|
|
- * @param samplingMode defines the required sampling mode (Texture.NEAREST_SAMPLINGMODE by default)
|
|
|
- * @param compression defines the compression used (null by default)
|
|
|
- * @param type defines the type fo the data (Engine.TEXTURETYPE_UNSIGNED_INT by default)
|
|
|
- * @returns the raw texture inside an InternalTexture
|
|
|
- */
|
|
|
- createRawTexture(data: Nullable<ArrayBufferView>, width: number, height: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>, type?: number): InternalTexture;
|
|
|
- /**
|
|
|
- * Creates a new raw cube texture
|
|
|
- * @param data defines the array of data to use to create each face
|
|
|
- * @param size defines the size of the textures
|
|
|
- * @param format defines the format of the data
|
|
|
- * @param type defines the type of the data (like Engine.TEXTURETYPE_UNSIGNED_INT)
|
|
|
- * @param generateMipMaps defines if the engine should generate the mip levels
|
|
|
- * @param invertY defines if data must be stored with Y axis inverted
|
|
|
- * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)
|
|
|
- * @param compression defines the compression used (null by default)
|
|
|
- * @returns the cube texture as an InternalTexture
|
|
|
- */
|
|
|
- createRawCubeTexture(data: Nullable<ArrayBufferView[]>, size: number, format: number, type: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>): InternalTexture;
|
|
|
- /**
|
|
|
- * Creates a new raw 3D texture
|
|
|
- * @param data defines the data used to create the texture
|
|
|
- * @param width defines the width of the texture
|
|
|
- * @param height defines the height of the texture
|
|
|
- * @param depth defines the depth of the texture
|
|
|
- * @param format defines the format of the texture
|
|
|
- * @param generateMipMaps defines if the engine must generate mip levels
|
|
|
- * @param invertY defines if data must be stored with Y axis inverted
|
|
|
- * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)
|
|
|
- * @param compression defines the compressed used (can be null)
|
|
|
- * @param textureType defines the compressed used (can be null)
|
|
|
- * @returns a new raw 3D texture (stored in an InternalTexture)
|
|
|
- */
|
|
|
- createRawTexture3D(data: Nullable<ArrayBufferView>, width: number, height: number, depth: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>, textureType?: number): InternalTexture;
|
|
|
- /**
|
|
|
- * Creates a new raw 2D array texture
|
|
|
- * @param data defines the data used to create the texture
|
|
|
- * @param width defines the width of the texture
|
|
|
- * @param height defines the height of the texture
|
|
|
- * @param depth defines the number of layers of the texture
|
|
|
- * @param format defines the format of the texture
|
|
|
- * @param generateMipMaps defines if the engine must generate mip levels
|
|
|
- * @param invertY defines if data must be stored with Y axis inverted
|
|
|
- * @param samplingMode defines the required sampling mode (like Texture.NEAREST_SAMPLINGMODE)
|
|
|
- * @param compression defines the compressed used (can be null)
|
|
|
- * @param textureType defines the compressed used (can be null)
|
|
|
- * @returns a new raw 2D array texture (stored in an InternalTexture)
|
|
|
- */
|
|
|
- createRawTexture2DArray(data: Nullable<ArrayBufferView>, width: number, height: number, depth: number, format: number, generateMipMaps: boolean, invertY: boolean, samplingMode: number, compression?: Nullable<string>, textureType?: number): InternalTexture;
|
|
|
private _unpackFlipYCached;
|
|
|
/**
|
|
|
* In case you are sharing the context with other applications, it might
|
|
@@ -108704,8 +108598,6 @@ declare module BABYLON {
|
|
|
* @param postProcess The post process which's output should be bound
|
|
|
*/
|
|
|
setTextureFromPostProcessOutput(channel: number, postProcess: Nullable<PostProcess>): void;
|
|
|
- /** @hidden */
|
|
|
- _convertRGBtoRGBATextureData(rgbData: any, width: number, height: number, textureType: number): ArrayBufferView;
|
|
|
protected _rebuildBuffers(): void;
|
|
|
/** @hidden */
|
|
|
_renderFrame(): void;
|
|
@@ -131002,10 +130894,6 @@ declare module BABYLON {
|
|
|
*/
|
|
|
export class ColorGradingTexture extends BaseTexture {
|
|
|
/**
|
|
|
- * The current texture matrix. (will always be identity in color grading texture)
|
|
|
- */
|
|
|
- private _textureMatrix;
|
|
|
- /**
|
|
|
* The texture URL.
|
|
|
*/
|
|
|
url: string;
|
|
@@ -131013,14 +130901,21 @@ declare module BABYLON {
|
|
|
* Empty line regex stored for GC.
|
|
|
*/
|
|
|
private static _noneEmptyLineRegex;
|
|
|
+ private _textureMatrix;
|
|
|
private _engine;
|
|
|
+ private _onLoad;
|
|
|
/**
|
|
|
* Instantiates a ColorGradingTexture from the following parameters.
|
|
|
*
|
|
|
* @param url The location of the color gradind data (currently only supporting 3dl)
|
|
|
- * @param scene The scene the texture will be used in
|
|
|
+ * @param sceneOrEngine The scene or engine the texture will be used in
|
|
|
+ * @param onLoad defines a callback triggered when the texture has been loaded
|
|
|
+ */
|
|
|
+ constructor(url: string, sceneOrEngine: Scene | ThinEngine, onLoad?: Nullable<() => void>);
|
|
|
+ /**
|
|
|
+ * Fires the onload event from the constructor if requested.
|
|
|
*/
|
|
|
- constructor(url: string, scene: Scene);
|
|
|
+ private _triggerOnLoad;
|
|
|
/**
|
|
|
* Returns the texture matrix used in most of the material.
|
|
|
* This is not used in color grading but keep for troubleshooting purpose (easily swap diffuse by colorgrading to look in).
|
|
@@ -131054,6 +130949,11 @@ declare module BABYLON {
|
|
|
* Serializes the LUT texture to json format.
|
|
|
*/
|
|
|
serialize(): any;
|
|
|
+ /**
|
|
|
+ * Returns true if the passed parameter is a scene object (can be use for typings)
|
|
|
+ * @param sceneOrEngine The object to test.
|
|
|
+ */
|
|
|
+ private static _isScene;
|
|
|
}
|
|
|
}
|
|
|
declare module BABYLON {
|