|
@@ -1896,6 +1896,7 @@ declare module BABYLON {
|
|
public getTextureMatrix(): Matrix;
|
|
public getTextureMatrix(): Matrix;
|
|
public getReflectionTextureMatrix(): Matrix;
|
|
public getReflectionTextureMatrix(): Matrix;
|
|
public clone(): Texture;
|
|
public clone(): Texture;
|
|
|
|
+ static CreateFromBase64String(data: string, name: string, scene: Scene, noMipmap?: boolean, invertY?: boolean, samplingMode?: number, onLoad?: () => void, onError?: () => void): Texture;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
@@ -1908,6 +1909,20 @@ declare module BABYLON {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
|
|
+ class CustomProceduralTexture extends ProceduralTexture {
|
|
|
|
+ private _generateTime;
|
|
|
|
+ private _time;
|
|
|
|
+ private _shaderLoaded;
|
|
|
|
+ private _config;
|
|
|
|
+ private _texturePath;
|
|
|
|
+ constructor(name: string, texturePath: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
|
|
|
|
+ private loadJson(jsonUrl);
|
|
|
|
+ public render(useCameraPostProcess?: boolean): void;
|
|
|
|
+ public updateShaderUniforms(): void;
|
|
|
|
+ public generateTime : boolean;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+declare module BABYLON {
|
|
class ProceduralTexture extends Texture {
|
|
class ProceduralTexture extends Texture {
|
|
private _size;
|
|
private _size;
|
|
public _generateMipMaps: boolean;
|
|
public _generateMipMaps: boolean;
|
|
@@ -1934,6 +1949,7 @@ declare module BABYLON {
|
|
constructor(name: string, size: any, fragment: any, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
|
|
constructor(name: string, size: any, fragment: any, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
|
|
public isReady(): boolean;
|
|
public isReady(): boolean;
|
|
public resetRefreshCounter(): void;
|
|
public resetRefreshCounter(): void;
|
|
|
|
+ public setFragment(fragment: any): void;
|
|
public refreshRate : number;
|
|
public refreshRate : number;
|
|
public _shouldRender(): boolean;
|
|
public _shouldRender(): boolean;
|
|
public getRenderSize(): number;
|
|
public getRenderSize(): number;
|
|
@@ -1992,6 +2008,30 @@ declare module BABYLON {
|
|
class GrassProceduralTexture extends ProceduralTexture {
|
|
class GrassProceduralTexture extends ProceduralTexture {
|
|
constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
|
|
constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
|
|
}
|
|
}
|
|
|
|
+ class RockProceduralTexture extends ProceduralTexture {
|
|
|
|
+ constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
|
|
|
|
+ }
|
|
|
|
+ class RoadProceduralTexture extends ProceduralTexture {
|
|
|
|
+ constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
|
|
|
|
+ }
|
|
|
|
+ class BrickProceduralTexture extends ProceduralTexture {
|
|
|
|
+ private _numberOfBricksHeight;
|
|
|
|
+ private _numberOfBricksWidth;
|
|
|
|
+ constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
|
|
|
|
+ public updateShaderUniforms(): void;
|
|
|
|
+ public numberOfBricksHeight : number;
|
|
|
|
+ public cloudColor : number;
|
|
|
|
+ public numberOfBricksWidth : number;
|
|
|
|
+ }
|
|
|
|
+ class MarbleProceduralTexture extends ProceduralTexture {
|
|
|
|
+ private _numberOfBricksHeight;
|
|
|
|
+ private _numberOfBricksWidth;
|
|
|
|
+ constructor(name: string, size: number, scene: Scene, fallbackTexture?: Texture, generateMipMaps?: boolean);
|
|
|
|
+ public updateShaderUniforms(): void;
|
|
|
|
+ public numberOfBricksHeight : number;
|
|
|
|
+ public cloudColor : number;
|
|
|
|
+ public numberOfBricksWidth : number;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
declare module BABYLON {
|
|
declare module BABYLON {
|
|
class Color3 {
|
|
class Color3 {
|
|
@@ -2324,17 +2364,26 @@ declare module BABYLON {
|
|
class Ray {
|
|
class Ray {
|
|
public origin: Vector3;
|
|
public origin: Vector3;
|
|
public direction: Vector3;
|
|
public direction: Vector3;
|
|
|
|
+ public length: number;
|
|
private _edge1;
|
|
private _edge1;
|
|
private _edge2;
|
|
private _edge2;
|
|
private _pvec;
|
|
private _pvec;
|
|
private _tvec;
|
|
private _tvec;
|
|
private _qvec;
|
|
private _qvec;
|
|
- constructor(origin: Vector3, direction: Vector3);
|
|
|
|
|
|
+ constructor(origin: Vector3, direction: Vector3, length?: number);
|
|
public intersectsBoxMinMax(minimum: Vector3, maximum: Vector3): boolean;
|
|
public intersectsBoxMinMax(minimum: Vector3, maximum: Vector3): boolean;
|
|
public intersectsBox(box: BoundingBox): boolean;
|
|
public intersectsBox(box: BoundingBox): boolean;
|
|
public intersectsSphere(sphere: any): boolean;
|
|
public intersectsSphere(sphere: any): boolean;
|
|
public intersectsTriangle(vertex0: Vector3, vertex1: Vector3, vertex2: Vector3): IntersectionInfo;
|
|
public intersectsTriangle(vertex0: Vector3, vertex1: Vector3, vertex2: Vector3): IntersectionInfo;
|
|
static CreateNew(x: number, y: number, viewportWidth: number, viewportHeight: number, world: Matrix, view: Matrix, projection: Matrix): Ray;
|
|
static CreateNew(x: number, y: number, viewportWidth: number, viewportHeight: number, world: Matrix, view: Matrix, projection: Matrix): Ray;
|
|
|
|
+ /**
|
|
|
|
+ * Function will create a new transformed ray starting from origin and ending at the end point. Ray's length will be set, and ray will be
|
|
|
|
+ * transformed to the given world matrix.
|
|
|
|
+ * @param origin The origin point
|
|
|
|
+ * @param end The end point
|
|
|
|
+ * @param world a matrix to transform the ray to. Default is the identity matrix.
|
|
|
|
+ */
|
|
|
|
+ static CreateNewFromTo(origin: Vector3, end: Vector3, world?: Matrix): Ray;
|
|
static Transform(ray: Ray, matrix: Matrix): Ray;
|
|
static Transform(ray: Ray, matrix: Matrix): Ray;
|
|
}
|
|
}
|
|
enum Space {
|
|
enum Space {
|
|
@@ -2453,6 +2502,8 @@ declare module BABYLON {
|
|
public getPhysicsMass(): number;
|
|
public getPhysicsMass(): number;
|
|
public getPhysicsFriction(): number;
|
|
public getPhysicsFriction(): number;
|
|
public getPhysicsRestitution(): number;
|
|
public getPhysicsRestitution(): number;
|
|
|
|
+ public getPositionInCameraSpace(camera?: Camera): Vector3;
|
|
|
|
+ public getDistanceToCamera(camera?: Camera): Vector3;
|
|
public applyImpulse(force: Vector3, contactPoint: Vector3): void;
|
|
public applyImpulse(force: Vector3, contactPoint: Vector3): void;
|
|
public setPhysicsLinkWith(otherMesh: Mesh, pivot1: Vector3, pivot2: Vector3, options?: any): void;
|
|
public setPhysicsLinkWith(otherMesh: Mesh, pivot1: Vector3, pivot2: Vector3, options?: any): void;
|
|
public updatePhysicsBodyPosition(): void;
|
|
public updatePhysicsBodyPosition(): void;
|