| 1 |
/* |
| 2 |
* Copyright (C) 2019 The Android Open Source Project |
| 3 |
* |
| 4 |
* Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 |
* you may not use this file except in compliance with the License. |
| 6 |
* You may obtain a copy of the License at |
| 7 |
* |
| 8 |
* http://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
* |
| 10 |
* Unless required by applicable law or agreed to in writing, software |
| 11 |
* distributed under the License is distributed on an "AS IS" BASIS, |
| 12 |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 |
* See the License for the specific language governing permissions and |
| 14 |
* limitations under the License. |
| 15 |
*/ |
| 16 |
|
| 17 |
/* |
| 18 |
* This file declares TypeScript annotations for Filament, which is implemented with an external |
| 19 |
* WASM library. The annotations declared in this file must match the bindings that are defined |
| 20 |
* in jsbindings. Note that clients are not required to use glMatrix, but we provide annotations for |
| 21 |
* those that do. |
| 22 |
*/ |
| 23 |
|
| 24 |
import * as glm from "gl-matrix"; |
| 25 |
|
| 26 |
export as namespace Filament; |
| 27 |
|
| 28 |
export function getSupportedFormatSuffix(desired: string): void; |
| 29 |
export function init(assets: string[], onready?: (() => void) | null): void; |
| 30 |
export function fetch(assets: string[], onDone?: (() => void) | null, onFetched?: ((name: string) => void) | null): void; |
| 31 |
export function clearAssetCache(): void; |
| 32 |
|
| 33 |
export const assets: {[url: string]: Uint8Array}; |
| 34 |
|
| 35 |
/** |
| 36 |
* May be either a string exactly containing a URL loaded with Filament.init() or Filament.fetch(), |
| 37 |
* OR any TypedArray such as Uint8Array, Float32Array, etc., all of which match the ArrayBufferView |
| 38 |
* interface. |
| 39 |
*/ |
| 40 |
export type BufferReference = string | ArrayBufferView; |
| 41 |
|
| 42 |
export type float2 = glm.vec2|number[]; |
| 43 |
export type float3 = glm.vec3|number[]; |
| 44 |
export type float4 = glm.vec4|number[]; |
| 45 |
export type double2 = glm.vec2|number[]; |
| 46 |
export type double3 = glm.vec3|number[]; |
| 47 |
export type double4 = glm.vec4|number[]; |
| 48 |
export type mat3 = glm.mat3|number[]; |
| 49 |
export type mat4 = glm.mat4|number[]; |
| 50 |
export type quat = glm.quat|number[]; |
| 51 |
|
| 52 |
/** A C++ std::vector. */ |
| 53 |
export interface Vector<T> { |
| 54 |
size(): number; |
| 55 |
get(i: number): T; |
| 56 |
} |
| 57 |
|
| 58 |
export function vectorToArray<T>(vector: Vector<T>): T[]; |
| 59 |
|
| 60 |
export class SwapChain {} |
| 61 |
export class ColorGrading {} |
| 62 |
|
| 63 |
export interface Box { |
| 64 |
center: float3; |
| 65 |
halfExtent: float3; |
| 66 |
} |
| 67 |
|
| 68 |
export interface Aabb { |
| 69 |
min: float3; |
| 70 |
max: float3; |
| 71 |
} |
| 72 |
|
| 73 |
export interface Renderer$ClearOptions { |
| 74 |
clearColor?: float4; |
| 75 |
clear?: boolean; |
| 76 |
discard?: boolean; |
| 77 |
} |
| 78 |
|
| 79 |
export interface LightManager$ShadowOptions { |
| 80 |
mapSize?: number; |
| 81 |
shadowCascades?: number; |
| 82 |
constantBias?: number; |
| 83 |
normalBias?: number; |
| 84 |
shadowFar?: number; |
| 85 |
shadowNearHint?: number; |
| 86 |
shadowFarHint?: number; |
| 87 |
stable?: boolean; |
| 88 |
polygonOffsetConstant?: number; |
| 89 |
polygonOffsetSlope?: number; |
| 90 |
screenSpaceContactShadows?: boolean; |
| 91 |
stepCount?: number; |
| 92 |
maxShadowDistance?: number; |
| 93 |
} |
| 94 |
|
| 95 |
export interface View$AmbientOcclusionOptions { |
| 96 |
radius?: number; |
| 97 |
power?: number; |
| 98 |
bias?: number; |
| 99 |
resolution?: number; |
| 100 |
intensity?: number; |
| 101 |
quality?: View$QualityLevel; |
| 102 |
} |
| 103 |
|
| 104 |
export interface View$DepthOfFieldOptions { |
| 105 |
focusDistance?: number; |
| 106 |
cocScale?: number; |
| 107 |
maxApertureDiameter?: number; |
| 108 |
enabled?: boolean; |
| 109 |
filter?: View$DepthOfFieldOptions$Filter; |
| 110 |
} |
| 111 |
|
| 112 |
export interface View$BloomOptions { |
| 113 |
dirtStrength?: number; |
| 114 |
strength?: number; |
| 115 |
resolution?: number; |
| 116 |
anamorphism?: number; |
| 117 |
levels?: number; |
| 118 |
blendMode?: View$BloomOptions$BlendMode; |
| 119 |
threshold?: boolean; |
| 120 |
enabled?: boolean; |
| 121 |
highlight?: number; |
| 122 |
// TODO: add support for dirt texture in BloomOptions. |
| 123 |
} |
| 124 |
|
| 125 |
export interface View$FogOptions { |
| 126 |
distance?: number; |
| 127 |
maximumOpacity?: number; |
| 128 |
height?: number; |
| 129 |
heightFalloff?: number; |
| 130 |
color?: float3; |
| 131 |
density?: number; |
| 132 |
inScatteringStart?: number; |
| 133 |
inScatteringSize?: number; |
| 134 |
fogColorFromIbl?: boolean; |
| 135 |
enabled?: boolean; |
| 136 |
} |
| 137 |
|
| 138 |
export interface View$VignetteOptions { |
| 139 |
midPoint?: number; |
| 140 |
roundness?: number; |
| 141 |
feather?: number; |
| 142 |
color?: float3; |
| 143 |
enabled?: boolean; |
| 144 |
} |
| 145 |
|
| 146 |
export function fitIntoUnitCube(box: Aabb): mat4; |
| 147 |
export function multiplyMatrices(a: mat4, b: mat4): mat4; |
| 148 |
|
| 149 |
// Clients should use the [PixelBuffer/CompressedPixelBuffer] helper function to contruct PixelBufferDescriptor objects. |
| 150 |
export class driver$PixelBufferDescriptor { |
| 151 |
constructor(byteLength: number, format: PixelDataFormat, datatype: PixelDataType); |
| 152 |
constructor(byteLength: number, cdtype: CompressedPixelDataType, imageSize: number, compressed: boolean); |
| 153 |
getBytes(): ArrayBuffer; |
| 154 |
} |
| 155 |
|
| 156 |
// Clients should use createTextureFromKtx/ImageFile helper functions if low level control is not needed |
| 157 |
export class Texture$Builder { |
| 158 |
public width(width: number): Texture$Builder; |
| 159 |
public height(height: number): Texture$Builder; |
| 160 |
public depth(depth: number): Texture$Builder; |
| 161 |
public levels(levels: number): Texture$Builder; |
| 162 |
public sampler(sampler: Texture$Sampler): Texture$Builder; |
| 163 |
public format(format: Texture$InternalFormat): Texture$Builder; |
| 164 |
public usage(usage: number): Texture$Builder; |
| 165 |
public build(engine: Engine) : Texture; |
| 166 |
} |
| 167 |
|
| 168 |
export class Texture { |
| 169 |
public static Builder(): Texture$Builder; |
| 170 |
public setImage(engine: Engine, level: number, pbd: driver$PixelBufferDescriptor): void; |
| 171 |
public setImageCube(engine: Engine, level: number, pbd: driver$PixelBufferDescriptor) : void; |
| 172 |
public generateMipmaps(engine: Engine) : void; |
| 173 |
} |
| 174 |
|
| 175 |
// TODO: Remove the entity type and just use integers for parity with Filament's Java bindings. |
| 176 |
export class Entity { |
| 177 |
public getId(): number; |
| 178 |
public delete(): void; |
| 179 |
} |
| 180 |
|
| 181 |
export class Skybox { |
| 182 |
public setColor(color: float4): void; |
| 183 |
public getTexture(): Texture; |
| 184 |
} |
| 185 |
|
| 186 |
export class LightManager$Instance { |
| 187 |
public delete(): void; |
| 188 |
} |
| 189 |
|
| 190 |
export class RenderableManager$Instance { |
| 191 |
public delete(): void; |
| 192 |
} |
| 193 |
|
| 194 |
export class TransformManager$Instance { |
| 195 |
public delete(): void; |
| 196 |
} |
| 197 |
|
| 198 |
export class TextureSampler { |
| 199 |
constructor(minfilter: MinFilter, magfilter: MagFilter, wrapmode: WrapMode); |
| 200 |
public setAnisotropy(value: number): void; |
| 201 |
public setCompareMode(mode: CompareMode, func: CompareFunc): void; |
| 202 |
} |
| 203 |
|
| 204 |
export class MaterialInstance { |
| 205 |
public getName(): string; |
| 206 |
public setBoolParameter(name: string, value: boolean): void; |
| 207 |
public setFloatParameter(name: string, value: number): void; |
| 208 |
public setFloat2Parameter(name: string, value: float2): void; |
| 209 |
public setFloat3Parameter(name: string, value: float3): void; |
| 210 |
public setFloat4Parameter(name: string, value: float4): void; |
| 211 |
public setTextureParameter(name: string, value: Texture, sampler: TextureSampler): void; |
| 212 |
public setColor3Parameter(name: string, ctype: RgbType, value: float3): void; |
| 213 |
public setColor4Parameter(name: string, ctype: RgbaType, value: float4): void; |
| 214 |
public setPolygonOffset(scale: number, constant: number): void; |
| 215 |
public setMaskThreshold(threshold: number): void; |
| 216 |
public setDoubleSided(doubleSided: boolean): void; |
| 217 |
public setCullingMode(mode: CullingMode): void; |
| 218 |
public setColorWrite(enable: boolean): void; |
| 219 |
public setDepthWrite(enable: boolean): void; |
| 220 |
public setDepthCulling(enable: boolean): void; |
| 221 |
} |
| 222 |
|
| 223 |
export class EntityManager { |
| 224 |
public static get(): EntityManager; |
| 225 |
public create(): Entity; |
| 226 |
} |
| 227 |
|
| 228 |
export class VertexBuffer$Builder { |
| 229 |
public vertexCount(count: number): VertexBuffer$Builder; |
| 230 |
public bufferCount(count: number): VertexBuffer$Builder; |
| 231 |
public attribute(attrib: VertexAttribute, bufindex: number, atype: VertexBuffer$AttributeType, |
| 232 |
offset: number, stride: number): VertexBuffer$Builder; |
| 233 |
public enableBufferObjects(enabled: boolean): VertexBuffer$Builder; |
| 234 |
public normalized(attrib: VertexAttribute): VertexBuffer$Builder; |
| 235 |
public normalizedIf(attrib: VertexAttribute, normalized: boolean): VertexBuffer$Builder; |
| 236 |
public build(engine: Engine): VertexBuffer; |
| 237 |
} |
| 238 |
|
| 239 |
export class IndexBuffer$Builder { |
| 240 |
public indexCount(count: number): IndexBuffer$Builder; |
| 241 |
public bufferType(type: IndexBuffer$IndexType): IndexBuffer$Builder; |
| 242 |
public build(engine: Engine): IndexBuffer; |
| 243 |
} |
| 244 |
|
| 245 |
export class BufferObject$Builder { |
| 246 |
public size(byteCount: number): BufferObject$Builder; |
| 247 |
public bindingType(type: BufferObject$BindingType): BufferObject$Builder; |
| 248 |
public build(engine: Engine): BufferObject; |
| 249 |
} |
| 250 |
|
| 251 |
export class RenderableManager$Builder { |
| 252 |
public geometry(slot: number, ptype: RenderableManager$PrimitiveType, vb: VertexBuffer, |
| 253 |
ib: IndexBuffer): RenderableManager$Builder; |
| 254 |
public geometryOffset(slot: number, ptype: RenderableManager$PrimitiveType, vb: VertexBuffer, |
| 255 |
ib: IndexBuffer, offset: number, count: number): RenderableManager$Builder; |
| 256 |
public geometryMinMax(slot: number, ptype: RenderableManager$PrimitiveType, vb: VertexBuffer, |
| 257 |
ib: IndexBuffer, offset: number, minIndex: number, maxIndex: number, count: number): RenderableManager$Builder; |
| 258 |
public material(geo: number, minstance: MaterialInstance): RenderableManager$Builder; |
| 259 |
public boundingBox(box: Box): RenderableManager$Builder; |
| 260 |
public layerMask(select: number, values: number): RenderableManager$Builder; |
| 261 |
public priority(value: number): RenderableManager$Builder; |
| 262 |
public culling(enable: boolean): RenderableManager$Builder; |
| 263 |
public castShadows(enable: boolean): RenderableManager$Builder; |
| 264 |
public receiveShadows(enable: boolean): RenderableManager$Builder; |
| 265 |
public skinning(boneCount: number): RenderableManager$Builder; |
| 266 |
public skinningBones(transforms: RenderableManager$Bone[]): RenderableManager$Builder; |
| 267 |
public skinningMatrices(transforms: mat4[]): RenderableManager$Builder; |
| 268 |
public morphing(enable: boolean): RenderableManager$Builder; |
| 269 |
public blendOrder(index: number, order: number): RenderableManager$Builder; |
| 270 |
public build(engine: Engine, entity: Entity): void; |
| 271 |
} |
| 272 |
|
| 273 |
export class RenderTarget$Builder { |
| 274 |
public texture(attachment: RenderTarget$AttachmentPoint, texture: Texture): RenderTarget$Builder; |
| 275 |
public mipLevel(attachment: RenderTarget$AttachmentPoint, mipLevel: number): RenderTarget$Builder; |
| 276 |
public face(attachment: RenderTarget$AttachmentPoint, face: Texture$CubemapFace): RenderTarget$Builder; |
| 277 |
public layer(attachment: RenderTarget$AttachmentPoint, layer: number): RenderTarget$Builder; |
| 278 |
public build(engine: Engine): RenderTarget; |
| 279 |
} |
| 280 |
|
| 281 |
export class LightManager$Builder { |
| 282 |
public build(engine: Engine, entity: Entity): void; |
| 283 |
public castLight(enable: boolean): LightManager$Builder; |
| 284 |
public castShadows(enable: boolean): LightManager$Builder; |
| 285 |
public shadowOptions(options: LightManager$ShadowOptions): LightManager$Builder; |
| 286 |
public color(rgb: float3): LightManager$Builder; |
| 287 |
public direction(value: float3): LightManager$Builder; |
| 288 |
public intensity(value: number): LightManager$Builder; |
| 289 |
public falloff(value: number): LightManager$Builder; |
| 290 |
public position(value: float3): LightManager$Builder; |
| 291 |
public spotLightCone(inner: number, outer: number): LightManager$Builder; |
| 292 |
public sunAngularRadius(angularRadius: number): LightManager$Builder; |
| 293 |
public sunHaloFalloff(haloFalloff: number): LightManager$Builder; |
| 294 |
public sunHaloSize(haloSize: number): LightManager$Builder; |
| 295 |
} |
| 296 |
|
| 297 |
export class Skybox$Builder { |
| 298 |
public build(engine: Engine): Skybox; |
| 299 |
public color(rgba: float4): Skybox$Builder; |
| 300 |
public environment(envmap: Texture): Skybox$Builder; |
| 301 |
public showSun(show: boolean): Skybox$Builder; |
| 302 |
} |
| 303 |
|
| 304 |
export class LightManager { |
| 305 |
public hasComponent(entity: Entity): boolean; |
| 306 |
public getInstance(entity: Entity): LightManager$Instance; |
| 307 |
public static Builder(ltype: LightManager$Type): LightManager$Builder; |
| 308 |
public getType(instance: LightManager$Instance): LightManager$Type; |
| 309 |
public isDirectional(instance: LightManager$Instance): boolean; |
| 310 |
public isPointLight(instance: LightManager$Instance): boolean; |
| 311 |
public isSpotLight(instance: LightManager$Instance): boolean; |
| 312 |
public setPosition(instance: LightManager$Instance, value: float3): void; |
| 313 |
public getPosition(instance: LightManager$Instance): float3; |
| 314 |
public setDirection(instance: LightManager$Instance, value: float3): void; |
| 315 |
public getDirection(instance: LightManager$Instance): float3; |
| 316 |
public setColor(instance: LightManager$Instance, value: float3): void; |
| 317 |
public getColor(instance: LightManager$Instance): float3; |
| 318 |
public setIntensity(instance: LightManager$Instance, intensity: number): void; |
| 319 |
public setIntensityEnergy(instance: LightManager$Instance, watts: number, efficiency: number): void; |
| 320 |
public getIntensity(instance: LightManager$Instance): number; |
| 321 |
public setFalloff(instance: LightManager$Instance, radius: number): void; |
| 322 |
public getFalloff(instance: LightManager$Instance): number; |
| 323 |
public setShadowOptions(instance: LightManager$Instance, options: LightManager$ShadowOptions): void; |
| 324 |
public setSpotLightCone(instance: LightManager$Instance, inner: number, outer: number): void; |
| 325 |
public setSunAngularRadius(instance: LightManager$Instance, angularRadius: number): void; |
| 326 |
public getSunAngularRadius(instance: LightManager$Instance): number; |
| 327 |
public setSunHaloSize(instance: LightManager$Instance, haloSize: number): void; |
| 328 |
public getSunHaloSize(instance: LightManager$Instance): number; |
| 329 |
public setSunHaloFalloff(instance: LightManager$Instance, haloFalloff: number): void; |
| 330 |
public getSunHaloFalloff(instance: LightManager$Instance): number; |
| 331 |
public setShadowCaster(instance: LightManager$Instance, shadowCaster: boolean): number; |
| 332 |
public isShadowCaster(instance: LightManager$Instance): boolean; |
| 333 |
} |
| 334 |
|
| 335 |
export interface RenderableManager$Bone { |
| 336 |
unitQuaternion: quat; |
| 337 |
translation: float3; |
| 338 |
} |
| 339 |
|
| 340 |
export class RenderableManager { |
| 341 |
public hasComponent(entity: Entity): boolean; |
| 342 |
public getInstance(entity: Entity): RenderableManager$Instance; |
| 343 |
public static Builder(ngeos: number): RenderableManager$Builder; |
| 344 |
public destroy(entity: Entity): void; |
| 345 |
public setAxisAlignedBoundingBox(instance: RenderableManager$Instance, aabb: Box): void; |
| 346 |
public setLayerMask(instance: RenderableManager$Instance, select: number, values: number): void; |
| 347 |
public setPriority(instance: RenderableManager$Instance, priority: number): void; |
| 348 |
public setCastShadows(instance: RenderableManager$Instance, enable: boolean): void; |
| 349 |
public setReceiveShadows(inst: RenderableManager$Instance, enable: boolean): void; |
| 350 |
public isShadowCaster(instance: RenderableManager$Instance): boolean; |
| 351 |
public isShadowReceiver(instance: RenderableManager$Instance): boolean; |
| 352 |
public setBones(instance: RenderableManager$Instance, transforms: RenderableManager$Bone[], |
| 353 |
offset: number): void |
| 354 |
public setBonesFromMatrices(instance: RenderableManager$Instance, transforms: mat4[], |
| 355 |
offset: number): void |
| 356 |
public setMorphWeights(instance: RenderableManager$Instance, a: number, b: number, c: number, |
| 357 |
d: number): void; |
| 358 |
public getAxisAlignedBoundingBox(instance: RenderableManager$Instance): Box; |
| 359 |
public getPrimitiveCount(instance: RenderableManager$Instance): number; |
| 360 |
public setMaterialInstanceAt(instance: RenderableManager$Instance, |
| 361 |
primitiveIndex: number, materialInstance: MaterialInstance): void; |
| 362 |
public getMaterialInstanceAt(instance: RenderableManager$Instance, primitiveIndex: number): |
| 363 |
MaterialInstance; |
| 364 |
public setGeometryAt(instance: RenderableManager$Instance, primitiveIndex: number, |
| 365 |
type: RenderableManager$PrimitiveType, vertices: VertexBuffer, indices: IndexBuffer, |
| 366 |
offset: number, count: number): void; |
| 367 |
public setGeometryRangeAt(instance: RenderableManager$Instance, primitiveIndex: number, |
| 368 |
type: RenderableManager$PrimitiveType, offset: number, count: number): void; |
| 369 |
public setBlendOrderAt(instance: RenderableManager$Instance, primitiveIndex: number, |
| 370 |
order: number): void; |
| 371 |
public getEnabledAttributesAt(instance: RenderableManager$Instance, |
| 372 |
primitiveIndex: number): number; |
| 373 |
} |
| 374 |
|
| 375 |
export class VertexBuffer { |
| 376 |
public static Builder(): VertexBuffer$Builder; |
| 377 |
public setBufferAt(engine: Engine, bufindex: number, f32array: BufferReference, |
| 378 |
byteOffset?: number): void; |
| 379 |
public setBufferObjectAt(engine: Engine, bufindex: number, bo: BufferObject): void; |
| 380 |
} |
| 381 |
|
| 382 |
export class BufferObject { |
| 383 |
public static Builder(): BufferObject$Builder; |
| 384 |
public setBuffer(engine: Engine, data: BufferReference, byteOffset?: number): void; |
| 385 |
} |
| 386 |
|
| 387 |
export class IndexBuffer { |
| 388 |
public static Builder(): IndexBuffer$Builder; |
| 389 |
public setBuffer(engine: Engine, u16array: BufferReference, byteOffset?: number): void; |
| 390 |
} |
| 391 |
|
| 392 |
export class Renderer { |
| 393 |
public render(swapChain: SwapChain, view: View): void; |
| 394 |
public setClearOptions(options: Renderer$ClearOptions): void; |
| 395 |
public renderView(view: View): void; |
| 396 |
public beginFrame(swapChain: SwapChain): boolean; |
| 397 |
public endFrame(): void; |
| 398 |
} |
| 399 |
|
| 400 |
export class Material { |
| 401 |
public createInstance(): MaterialInstance; |
| 402 |
public createNamedInstance(name: string): MaterialInstance; |
| 403 |
public getDefaultInstance(): MaterialInstance; |
| 404 |
public getName(): string; |
| 405 |
} |
| 406 |
|
| 407 |
export class Frustum { |
| 408 |
constructor(pv: mat4); |
| 409 |
public setProjection(pv: mat4): void; |
| 410 |
public getNormalizedPlane(plane: Frustum$Plane): float4; |
| 411 |
public intersectsBox(box: Box): boolean; |
| 412 |
public intersectsSphere(sphere: float4): boolean; |
| 413 |
} |
| 414 |
|
| 415 |
export class Camera { |
| 416 |
public setProjection(proj: Camera$Projection, left: number, right: number, bottom: number, |
| 417 |
top: number, near: number, far: number): void; |
| 418 |
public setProjectionFov(fovInDegrees: number, aspect: number, |
| 419 |
near: number, far: number, fov: Camera$Fov): void; |
| 420 |
public setLensProjection(focalLength: number, aspect: number, near: number, far: number): void; |
| 421 |
public setCustomProjection(projection: mat4, near: number, far: number): void; |
| 422 |
public setScaling(scale: double2): void; |
| 423 |
public getProjectionMatrix(): mat4; |
| 424 |
public getCullingProjectionMatrix(): mat4; |
| 425 |
public getScaling(): double4; |
| 426 |
public getNear(): number; |
| 427 |
public getCullingFar(): number; |
| 428 |
public setModelMatrix(view: mat4): void; |
| 429 |
public lookAt(eye: float3, center: float3, up: float3): void; |
| 430 |
public getModelMatrix(): mat4; |
| 431 |
public getViewMatrix(): mat4; |
| 432 |
public getPosition(): float3; |
| 433 |
public getLeftVector(): float3; |
| 434 |
public getUpVector(): float3; |
| 435 |
public getForwardVector(): float3; |
| 436 |
public getFrustum(): Frustum; |
| 437 |
public setExposure(aperture: number, shutterSpeed: number, sensitivity: number): void; |
| 438 |
public setExposureDirect(exposure: number): void; |
| 439 |
public getAperture(): number; |
| 440 |
public getShutterSpeed(): number; |
| 441 |
public getSensitivity(): number; |
| 442 |
public getFocalLength(): number; |
| 443 |
public getFocusDistance(): number; |
| 444 |
public setFocusDistance(distance: number): void; |
| 445 |
public static inverseProjection(p: mat4): mat4; |
| 446 |
public static computeEffectiveFocalLength(focalLength: number, focusDistance: number) : number; |
| 447 |
public static computeEffectiveFov(fovInDegrees: number, focusDistance: number) : number; |
| 448 |
} |
| 449 |
|
| 450 |
export class ColorGrading$Builder { |
| 451 |
public quality(qualityLevel: ColorGrading$QualityLevel): ColorGrading$Builder; |
| 452 |
public toneMapping(toneMapping: ColorGrading$ToneMapping): ColorGrading$Builder; |
| 453 |
public whiteBalance(temperature: number, tint: number): ColorGrading$Builder; |
| 454 |
public channelMixer(outRed: float3, outGreen: float3, outBlue: float3): ColorGrading$Builder; |
| 455 |
public shadowsMidtonesHighlights(shadows: float4, midtones: float4, highlights: float4, |
| 456 |
ranges: float4): ColorGrading$Builder; |
| 457 |
public slopeOffsetPower(slope: float3, offset: float3, power: float3): ColorGrading$Builder; |
| 458 |
public contrast(contrast: number): ColorGrading$Builder; |
| 459 |
public vibrance(vibrance: number): ColorGrading$Builder; |
| 460 |
public saturation(saturation: number): ColorGrading$Builder; |
| 461 |
public curves(shadowGamma: float3, midPoint: float3, |
| 462 |
highlightScale: float3): ColorGrading$Builder; |
| 463 |
public build(engine: Engine): ColorGrading; |
| 464 |
} |
| 465 |
|
| 466 |
export class IndirectLight { |
| 467 |
public setIntensity(intensity: number): void; |
| 468 |
public getIntensity(): number; |
| 469 |
public setRotation(value: mat3): void; |
| 470 |
public getRotation(): mat3; |
| 471 |
public getReflectionsTexture(): Texture; |
| 472 |
public getIrradianceTexture(): Texture; |
| 473 |
public static getDirectionEstimate(f32array: any): float3; |
| 474 |
public static getColorEstimate(f32array: any, direction: float3): float4; |
| 475 |
shfloats: Array<number>; |
| 476 |
} |
| 477 |
|
| 478 |
export class IndirectLight$Builder { |
| 479 |
public reflections(cubemap: Texture): IndirectLight$Builder; |
| 480 |
public irradianceTex(cubemap: Texture): IndirectLight$Builder; |
| 481 |
public irradianceSh(nbands: number, f32array: any): IndirectLight$Builder; |
| 482 |
public intensity(value: number): IndirectLight$Builder; |
| 483 |
public rotation(value: mat3): IndirectLight$Builder; |
| 484 |
public build(engine: Engine): IndirectLight; |
| 485 |
} |
| 486 |
|
| 487 |
export class IcoSphere { |
| 488 |
constructor(nsubdivs: number); |
| 489 |
public subdivide(): void; |
| 490 |
vertices: Float32Array; |
| 491 |
tangents: Int16Array; |
| 492 |
triangles: Uint16Array; |
| 493 |
} |
| 494 |
|
| 495 |
export class Scene { |
| 496 |
public addEntity(entity: Entity): void; |
| 497 |
public addEntities(entities: Entity[]): void; |
| 498 |
public getLightCount(): number; |
| 499 |
public getRenderableCount(): number; |
| 500 |
public remove(entity: Entity): void; |
| 501 |
public removeEntities(entities: Entity[]): void; |
| 502 |
public setIndirectLight(ibl: IndirectLight|null): void; |
| 503 |
public setSkybox(sky: Skybox|null): void; |
| 504 |
} |
| 505 |
|
| 506 |
export class RenderTarget { |
| 507 |
public getMipLevel(): number; |
| 508 |
public getFace(): Texture$CubemapFace; |
| 509 |
public getLayer(): number; |
| 510 |
public static Builder() : RenderTarget$Builder; |
| 511 |
} |
| 512 |
|
| 513 |
export class View { |
| 514 |
public setCamera(camera: Camera): void; |
| 515 |
public setColorGrading(colorGrading: ColorGrading): void; |
| 516 |
public setScene(scene: Scene): void; |
| 517 |
public setViewport(viewport: float4): void; |
| 518 |
public setVisibleLayers(select: number, values: number): void; |
| 519 |
public setRenderTarget(renderTarget: RenderTarget): void; |
| 520 |
public setAmbientOcclusionOptions(options: View$AmbientOcclusionOptions): void; |
| 521 |
public setDepthOfFieldOptions(options: View$DepthOfFieldOptions): void; |
| 522 |
public setBloomOptions(options: View$BloomOptions): void; |
| 523 |
public setFogOptions(options: View$FogOptions): void; |
| 524 |
public setVignetteOptions(options: View$VignetteOptions): void; |
| 525 |
public setAmbientOcclusion(ambientOcclusion: View$AmbientOcclusion): void; |
| 526 |
public getAmbientOcclusion(): View$AmbientOcclusion; |
| 527 |
public setBlendMode(mode: View$BlendMode): void; |
| 528 |
public getBlendMode(): View$BlendMode; |
| 529 |
} |
| 530 |
|
| 531 |
export class TransformManager { |
| 532 |
public hasComponent(entity: Entity): boolean; |
| 533 |
public getInstance(entity: Entity): TransformManager$Instance; |
| 534 |
public create(entity: Entity): void; |
| 535 |
public destroy(entity: Entity): void; |
| 536 |
public setParent(instance: TransformManager$Instance, parent: TransformManager$Instance): void; |
| 537 |
public setTransform(instance: TransformManager$Instance, xform: mat4): void; |
| 538 |
public getTransform(instance: TransformManager$Instance): mat4; |
| 539 |
public getWorldTransform(instance: TransformManager$Instance): mat4; |
| 540 |
public openLocalTransformTransaction(): void; |
| 541 |
public commitLocalTransformTransaction(): void; |
| 542 |
} |
| 543 |
|
| 544 |
interface Filamesh { |
| 545 |
renderable: Entity; |
| 546 |
vertexBuffer: VertexBuffer; |
| 547 |
indexBuffer: IndexBuffer; |
| 548 |
} |
| 549 |
|
| 550 |
export class Engine { |
| 551 |
public static create(canvas: HTMLCanvasElement, contextOptions?: object): Engine; |
| 552 |
public execute(): void; |
| 553 |
public createCamera(entity: Entity): Camera; |
| 554 |
public createIblFromKtx(urlOrBuffer: BufferReference): IndirectLight; |
| 555 |
public createMaterial(urlOrBuffer: BufferReference): Material; |
| 556 |
public createRenderer(): Renderer; |
| 557 |
public createScene(): Scene; |
| 558 |
public createSkyFromKtx(urlOrBuffer: BufferReference): Skybox; |
| 559 |
public createSwapChain(): SwapChain; |
| 560 |
public createTextureFromJpeg(urlOrBuffer: BufferReference, options?: object): Texture; |
| 561 |
public createTextureFromPng(urlOrBuffer: BufferReference, options?: object): Texture; |
| 562 |
public createTextureFromKtx(urlOrBuffer: BufferReference, options?: object): Texture; |
| 563 |
public createView(): View; |
| 564 |
|
| 565 |
public createAssetLoader(): gltfio$AssetLoader; |
| 566 |
|
| 567 |
public destroySwapChain(swapChain: SwapChain): void; |
| 568 |
public destroyRenderer(renderer: Renderer): void; |
| 569 |
public destroyView(view: View): void; |
| 570 |
public destroyScene(scene: Scene): void; |
| 571 |
public destroyCameraComponent(camera: Entity): void; |
| 572 |
public destroyMaterial(material: Material): void; |
| 573 |
public destroyEntity(entity: Entity): void; |
| 574 |
public destroyIndexBuffer(indexBuffer: IndexBuffer): void; |
| 575 |
public destroyIndirectLight(indirectLight: IndirectLight): void; |
| 576 |
public destroyMaterialInstance(materialInstance: MaterialInstance): void; |
| 577 |
public destroyRenderTarget(renderTarget: RenderTarget): void; |
| 578 |
public destroySkybox(skybox: Skybox): void; |
| 579 |
public destroyTexture(texture: Texture): void; |
| 580 |
public destroyColorGrading(colorGrading: ColorGrading): void; |
| 581 |
|
| 582 |
public getCameraComponent(entity: Entity): Camera; |
| 583 |
public getLightManager(): LightManager; |
| 584 |
public destroyVertexBuffer(vertexBuffer: VertexBuffer): void; |
| 585 |
public getRenderableManager(): RenderableManager; |
| 586 |
public getSupportedFormatSuffix(suffix: string): void; |
| 587 |
public getTransformManager(): TransformManager; |
| 588 |
public init(assets: string[], onready: () => void): void; |
| 589 |
public loadFilamesh(urlOrBuffer: BufferReference, definstance: MaterialInstance, matinstances: object): Filamesh; |
| 590 |
} |
| 591 |
|
| 592 |
export class gltfio$AssetLoader { |
| 593 |
public createAssetFromJson(urlOrBuffer: BufferReference): gltfio$FilamentAsset; |
| 594 |
public createAssetFromBinary(urlOrBuffer: BufferReference): gltfio$FilamentAsset; |
| 595 |
public createInstancedAsset(urlOrBuffer: BufferReference, |
| 596 |
instances: (gltfio$FilamentInstance | null)[]): gltfio$FilamentAsset; |
| 597 |
public destroyAsset(asset: gltfio$FilamentAsset): void; |
| 598 |
public createInstance(asset: gltfio$FilamentAsset): (gltfio$FilamentInstance | null); |
| 599 |
public delete(): void; |
| 600 |
} |
| 601 |
|
| 602 |
export class gltfio$FilamentAsset { |
| 603 |
public loadResources(onDone: () => void|null, onFetched: (s: string) => void|null, |
| 604 |
basePath: string|null, asyncInterval: number|null, options?: object): void; |
| 605 |
public getEntities(): Entity[]; |
| 606 |
public getEntitiesByName(name: string): Entity[]; |
| 607 |
public getEntityByName(name: string): Entity; |
| 608 |
public getEntitiesByPrefix(name: string): Entity[]; |
| 609 |
public getLightEntities(): Entity[]; |
| 610 |
public getCameraEntities(): Entity[]; |
| 611 |
public getRoot(): Entity; |
| 612 |
public popRenderable(): Entity; |
| 613 |
public getMaterialInstances(): Vector<MaterialInstance>; |
| 614 |
public getResourceUris(): Vector<string>; |
| 615 |
public getBoundingBox(): Aabb; |
| 616 |
public getName(entity: Entity): string; |
| 617 |
public getAnimator(): gltfio$Animator; |
| 618 |
public getWireframe(): Entity; |
| 619 |
public getEngine(): Engine; |
| 620 |
public releaseSourceData(): void; |
| 621 |
} |
| 622 |
|
| 623 |
export class gltfio$FilamentInstance { |
| 624 |
public getEntities(): Vector<Entity>; |
| 625 |
public getRoot(): Entity; |
| 626 |
public getAnimator(): gltfio$Animator; |
| 627 |
} |
| 628 |
|
| 629 |
export class gltfio$Animator { |
| 630 |
public applyAnimation(index: number): void; |
| 631 |
public updateBoneMatrices(): void; |
| 632 |
public getAnimationCount(): number; |
| 633 |
public getAnimationDuration(index: number): number; |
| 634 |
public getAnimationName(index: number): string; |
| 635 |
} |
| 636 |
|
| 637 |
export class SurfaceOrientation$Builder { |
| 638 |
public constructor(); |
| 639 |
public vertexCount(count: number): SurfaceOrientation$Builder; |
| 640 |
public normals(vec3array: Float32Array, stride: number): SurfaceOrientation$Builder; |
| 641 |
public uvs(vec2array: Float32Array, stride: number): SurfaceOrientation$Builder; |
| 642 |
public positions(vec3array: Float32Array, stride: number): SurfaceOrientation$Builder; |
| 643 |
public triangleCount(count: number): SurfaceOrientation$Builder; |
| 644 |
public triangles16(indices: Uint16Array): SurfaceOrientation$Builder; |
| 645 |
public triangles32(indices: Uint32Array): SurfaceOrientation$Builder; |
| 646 |
public build(): SurfaceOrientation; |
| 647 |
} |
| 648 |
|
| 649 |
export class SurfaceOrientation { |
| 650 |
public getQuats(quatCount: number): Int16Array; |
| 651 |
public delete(): void; |
| 652 |
} |
| 653 |
|
| 654 |
export enum Frustum$Plane { |
| 655 |
LEFT, |
| 656 |
RIGHT, |
| 657 |
BOTTOM, |
| 658 |
TOP, |
| 659 |
FAR, |
| 660 |
NEAR, |
| 661 |
} |
| 662 |
|
| 663 |
export enum Camera$Fov { |
| 664 |
VERTICAL, |
| 665 |
HORIZONTAL, |
| 666 |
} |
| 667 |
|
| 668 |
export enum Camera$Projection { |
| 669 |
PERSPECTIVE, |
| 670 |
ORTHO, |
| 671 |
} |
| 672 |
|
| 673 |
export enum ColorGrading$QualityLevel { |
| 674 |
LOW, |
| 675 |
MEDIUM, |
| 676 |
HIGH, |
| 677 |
ULTRA, |
| 678 |
} |
| 679 |
|
| 680 |
export enum ColorGrading$ToneMapping { |
| 681 |
LINEAR, |
| 682 |
ACES_LEGACY, |
| 683 |
ACES, |
| 684 |
FILMIC, |
| 685 |
EVILS, |
| 686 |
REINHARD, |
| 687 |
DISPLAY_RANGE, |
| 688 |
} |
| 689 |
|
| 690 |
export enum CompressedPixelDataType { |
| 691 |
EAC_R11, |
| 692 |
EAC_R11_SIGNED, |
| 693 |
EAC_RG11, |
| 694 |
EAC_RG11_SIGNED, |
| 695 |
ETC2_RGB8, |
| 696 |
ETC2_SRGB8, |
| 697 |
ETC2_RGB8_A1, |
| 698 |
ETC2_SRGB8_A1, |
| 699 |
ETC2_EAC_RGBA8, |
| 700 |
ETC2_EAC_SRGBA8, |
| 701 |
DXT1_RGB, |
| 702 |
DXT1_RGBA, |
| 703 |
DXT3_RGBA, |
| 704 |
DXT5_RGBA, |
| 705 |
RGBA_ASTC_4x4, |
| 706 |
RGBA_ASTC_5x4, |
| 707 |
RGBA_ASTC_5x5, |
| 708 |
RGBA_ASTC_6x5, |
| 709 |
RGBA_ASTC_6x6, |
| 710 |
RGBA_ASTC_8x5, |
| 711 |
RGBA_ASTC_8x6, |
| 712 |
RGBA_ASTC_8x8, |
| 713 |
RGBA_ASTC_10x5, |
| 714 |
RGBA_ASTC_10x6, |
| 715 |
RGBA_ASTC_10x8, |
| 716 |
RGBA_ASTC_10x10, |
| 717 |
RGBA_ASTC_12x10, |
| 718 |
RGBA_ASTC_12x12, |
| 719 |
SRGB8_ALPHA8_ASTC_4x4, |
| 720 |
SRGB8_ALPHA8_ASTC_5x4, |
| 721 |
SRGB8_ALPHA8_ASTC_5x5, |
| 722 |
SRGB8_ALPHA8_ASTC_6x5, |
| 723 |
SRGB8_ALPHA8_ASTC_6x6, |
| 724 |
SRGB8_ALPHA8_ASTC_8x5, |
| 725 |
SRGB8_ALPHA8_ASTC_8x6, |
| 726 |
SRGB8_ALPHA8_ASTC_8x8, |
| 727 |
SRGB8_ALPHA8_ASTC_10x5, |
| 728 |
SRGB8_ALPHA8_ASTC_10x6, |
| 729 |
SRGB8_ALPHA8_ASTC_10x8, |
| 730 |
SRGB8_ALPHA8_ASTC_10x10, |
| 731 |
SRGB8_ALPHA8_ASTC_12x10, |
| 732 |
SRGB8_ALPHA8_ASTC_12x12, |
| 733 |
} |
| 734 |
|
| 735 |
export enum IndexBuffer$IndexType { |
| 736 |
USHORT, |
| 737 |
UINT, |
| 738 |
} |
| 739 |
|
| 740 |
export enum BufferObject$BindingType { |
| 741 |
VERTEX_BINDING, |
| 742 |
} |
| 743 |
|
| 744 |
export enum LightManager$Type { |
| 745 |
SUN, |
| 746 |
DIRECTIONAL, |
| 747 |
POINT, |
| 748 |
FOCUSED_SPOT, |
| 749 |
SPOT, |
| 750 |
} |
| 751 |
|
| 752 |
export enum MagFilter { |
| 753 |
NEAREST, |
| 754 |
LINEAR, |
| 755 |
} |
| 756 |
|
| 757 |
export enum MinFilter { |
| 758 |
NEAREST, |
| 759 |
LINEAR, |
| 760 |
NEAREST_MIPMAP_NEAREST, |
| 761 |
LINEAR_MIPMAP_NEAREST, |
| 762 |
NEAREST_MIPMAP_LINEAR, |
| 763 |
LINEAR_MIPMAP_LINEAR, |
| 764 |
} |
| 765 |
|
| 766 |
export enum CompareMode { |
| 767 |
NONE, |
| 768 |
COMPARE_TO_TEXTURE, |
| 769 |
} |
| 770 |
|
| 771 |
export enum CompareFunc { |
| 772 |
LESS_EQUAL, |
| 773 |
GREATER_EQUAL, |
| 774 |
LESS, |
| 775 |
GREATER, |
| 776 |
EQUAL, |
| 777 |
NOT_EQUAL, |
| 778 |
ALWAYS, |
| 779 |
NEVER, |
| 780 |
} |
| 781 |
|
| 782 |
export enum CullingMode { |
| 783 |
NONE, |
| 784 |
FRONT, |
| 785 |
BACK, |
| 786 |
FRONT_AND_BACK, |
| 787 |
} |
| 788 |
|
| 789 |
export enum PixelDataFormat { |
| 790 |
R, |
| 791 |
R_INTEGER, |
| 792 |
RG, |
| 793 |
RG_INTEGER, |
| 794 |
RGB, |
| 795 |
RGB_INTEGER, |
| 796 |
RGBA, |
| 797 |
RGBA_INTEGER, |
| 798 |
UNUSED, |
| 799 |
DEPTH_COMPONENT, |
| 800 |
DEPTH_STENCIL, |
| 801 |
ALPHA, |
| 802 |
} |
| 803 |
|
| 804 |
export enum PixelDataType { |
| 805 |
UBYTE, |
| 806 |
BYTE, |
| 807 |
USHORT, |
| 808 |
SHORT, |
| 809 |
UINT, |
| 810 |
INT, |
| 811 |
HALF, |
| 812 |
FLOAT, |
| 813 |
UINT_10F_11F_11F_REV, |
| 814 |
USHORT_565, |
| 815 |
} |
| 816 |
|
| 817 |
export enum RenderableManager$PrimitiveType { |
| 818 |
POINTS, |
| 819 |
LINES, |
| 820 |
TRIANGLES, |
| 821 |
NONE, |
| 822 |
} |
| 823 |
|
| 824 |
export enum RgbType { |
| 825 |
sRGB, |
| 826 |
LINEAR, |
| 827 |
} |
| 828 |
|
| 829 |
export enum RgbaType { |
| 830 |
sRGB, |
| 831 |
LINEAR, |
| 832 |
PREMULTIPLIED_sRGB, |
| 833 |
PREMULTIPLIED_LINEAR, |
| 834 |
} |
| 835 |
|
| 836 |
export enum Texture$InternalFormat { |
| 837 |
R8, |
| 838 |
R8_SNORM, |
| 839 |
R8UI, |
| 840 |
R8I, |
| 841 |
STENCIL8, |
| 842 |
R16F, |
| 843 |
R16UI, |
| 844 |
R16I, |
| 845 |
RG8, |
| 846 |
RG8_SNORM, |
| 847 |
RG8UI, |
| 848 |
RG8I, |
| 849 |
RGB565, |
| 850 |
RGB9_E5, |
| 851 |
RGB5_A1, |
| 852 |
RGBA4, |
| 853 |
DEPTH16, |
| 854 |
RGB8, |
| 855 |
SRGB8, |
| 856 |
RGB8_SNORM, |
| 857 |
RGB8UI, |
| 858 |
RGB8I, |
| 859 |
DEPTH24, |
| 860 |
R32F, |
| 861 |
R32UI, |
| 862 |
R32I, |
| 863 |
RG16F, |
| 864 |
RG16UI, |
| 865 |
RG16I, |
| 866 |
R11F_G11F_B10F, |
| 867 |
RGBA8, |
| 868 |
SRGB8_A8, |
| 869 |
RGBA8_SNORM, |
| 870 |
UNUSED, |
| 871 |
RGB10_A2, |
| 872 |
RGBA8UI, |
| 873 |
RGBA8I, |
| 874 |
DEPTH32F, |
| 875 |
DEPTH24_STENCIL8, |
| 876 |
DEPTH32F_STENCIL8, |
| 877 |
RGB16F, |
| 878 |
RGB16UI, |
| 879 |
RGB16I, |
| 880 |
RG32F, |
| 881 |
RG32UI, |
| 882 |
RG32I, |
| 883 |
RGBA16F, |
| 884 |
RGBA16UI, |
| 885 |
RGBA16I, |
| 886 |
RGB32F, |
| 887 |
RGB32UI, |
| 888 |
RGB32I, |
| 889 |
RGBA32F, |
| 890 |
RGBA32UI, |
| 891 |
RGBA32I, |
| 892 |
EAC_R11, |
| 893 |
EAC_R11_SIGNED, |
| 894 |
EAC_RG11, |
| 895 |
EAC_RG11_SIGNED, |
| 896 |
ETC2_RGB8, |
| 897 |
ETC2_SRGB8, |
| 898 |
ETC2_RGB8_A1, |
| 899 |
ETC2_SRGB8_A1, |
| 900 |
ETC2_EAC_RGBA8, |
| 901 |
ETC2_EAC_SRGBA8, |
| 902 |
DXT1_RGB, |
| 903 |
DXT1_RGBA, |
| 904 |
DXT3_RGBA, |
| 905 |
DXT5_RGBA, |
| 906 |
RGBA_ASTC_4x4, |
| 907 |
RGBA_ASTC_5x4, |
| 908 |
RGBA_ASTC_5x5, |
| 909 |
RGBA_ASTC_6x5, |
| 910 |
RGBA_ASTC_6x6, |
| 911 |
RGBA_ASTC_8x5, |
| 912 |
RGBA_ASTC_8x6, |
| 913 |
RGBA_ASTC_8x8, |
| 914 |
RGBA_ASTC_10x5, |
| 915 |
RGBA_ASTC_10x6, |
| 916 |
RGBA_ASTC_10x8, |
| 917 |
RGBA_ASTC_10x10, |
| 918 |
RGBA_ASTC_12x10, |
| 919 |
RGBA_ASTC_12x12, |
| 920 |
SRGB8_ALPHA8_ASTC_4x4, |
| 921 |
SRGB8_ALPHA8_ASTC_5x4, |
| 922 |
SRGB8_ALPHA8_ASTC_5x5, |
| 923 |
SRGB8_ALPHA8_ASTC_6x5, |
| 924 |
SRGB8_ALPHA8_ASTC_6x6, |
| 925 |
SRGB8_ALPHA8_ASTC_8x5, |
| 926 |
SRGB8_ALPHA8_ASTC_8x6, |
| 927 |
SRGB8_ALPHA8_ASTC_8x8, |
| 928 |
SRGB8_ALPHA8_ASTC_10x5, |
| 929 |
SRGB8_ALPHA8_ASTC_10x6, |
| 930 |
SRGB8_ALPHA8_ASTC_10x8, |
| 931 |
SRGB8_ALPHA8_ASTC_10x10, |
| 932 |
SRGB8_ALPHA8_ASTC_12x10, |
| 933 |
SRGB8_ALPHA8_ASTC_12x12, |
| 934 |
} |
| 935 |
|
| 936 |
export enum Texture$Sampler { |
| 937 |
SAMPLER_2D, |
| 938 |
SAMPLER_CUBEMAP, |
| 939 |
SAMPLER_EXTERNAL, |
| 940 |
} |
| 941 |
|
| 942 |
// This enum is a bit different the others because it can be used in a bitfield. |
| 943 |
// It is a "const enum" which means TypeScript will simply create a constant for each member. |
| 944 |
// It does not contain the $ delimiter to avoid interference with the embind class. |
| 945 |
export const enum TextureUsage { |
| 946 |
COLOR_ATTACHMENT = 1, |
| 947 |
DEPTH_ATTACHMENT = 2, |
| 948 |
STENCIL_ATTACHMENT = 4, |
| 949 |
UPLOADABLE = 8, |
| 950 |
SAMPLEABLE = 16, |
| 951 |
SUBPASS_INPUT = 32, |
| 952 |
DEFAULT = UPLOADABLE | SAMPLEABLE, |
| 953 |
} |
| 954 |
|
| 955 |
export enum Texture$CubemapFace { |
| 956 |
POSITIVE_X, |
| 957 |
NEGATIVE_X, |
| 958 |
POSITIVE_Y, |
| 959 |
NEGATIVE_Y, |
| 960 |
POSITIVE_Z, |
| 961 |
NEGATIVE_Z, |
| 962 |
} |
| 963 |
|
| 964 |
export enum RenderTarget$AttachmentPoint { |
| 965 |
COLOR, |
| 966 |
DEPTH, |
| 967 |
} |
| 968 |
|
| 969 |
export enum VertexAttribute { |
| 970 |
POSITION = 0, |
| 971 |
TANGENTS = 1, |
| 972 |
COLOR = 2, |
| 973 |
UV0 = 3, |
| 974 |
UV1 = 4, |
| 975 |
BONE_INDICES = 5, |
| 976 |
BONE_WEIGHTS = 6, |
| 977 |
UNUSED = 7, |
| 978 |
CUSTOM0 = 8, |
| 979 |
CUSTOM1 = 9, |
| 980 |
CUSTOM2 = 10, |
| 981 |
CUSTOM3 = 11, |
| 982 |
CUSTOM4 = 12, |
| 983 |
CUSTOM5 = 13, |
| 984 |
CUSTOM6 = 14, |
| 985 |
CUSTOM7 = 15, |
| 986 |
MORPH_POSITION_0 = CUSTOM0, |
| 987 |
MORPH_POSITION_1 = CUSTOM1, |
| 988 |
MORPH_POSITION_2 = CUSTOM2, |
| 989 |
MORPH_POSITION_3 = CUSTOM3, |
| 990 |
MORPH_TANGENTS_0 = CUSTOM4, |
| 991 |
MORPH_TANGENTS_1 = CUSTOM5, |
| 992 |
MORPH_TANGENTS_2 = CUSTOM6, |
| 993 |
MORPH_TANGENTS_3 = CUSTOM7, |
| 994 |
} |
| 995 |
|
| 996 |
export enum BufferObject$BindingType { |
| 997 |
VERTEX, |
| 998 |
} |
| 999 |
|
| 1000 |
export enum VertexBuffer$AttributeType { |
| 1001 |
BYTE, |
| 1002 |
BYTE2, |
| 1003 |
BYTE3, |
| 1004 |
BYTE4, |
| 1005 |
UBYTE, |
| 1006 |
UBYTE2, |
| 1007 |
UBYTE3, |
| 1008 |
UBYTE4, |
| 1009 |
SHORT, |
| 1010 |
SHORT2, |
| 1011 |
SHORT3, |
| 1012 |
SHORT4, |
| 1013 |
USHORT, |
| 1014 |
USHORT2, |
| 1015 |
USHORT3, |
| 1016 |
USHORT4, |
| 1017 |
INT, |
| 1018 |
UINT, |
| 1019 |
FLOAT, |
| 1020 |
FLOAT2, |
| 1021 |
FLOAT3, |
| 1022 |
FLOAT4, |
| 1023 |
HALF, |
| 1024 |
HALF2, |
| 1025 |
HALF3, |
| 1026 |
HALF4, |
| 1027 |
} |
| 1028 |
|
| 1029 |
export enum View$AntiAliasing { |
| 1030 |
NONE, |
| 1031 |
FXAA, |
| 1032 |
} |
| 1033 |
|
| 1034 |
export enum View$BlendMode { |
| 1035 |
OPAQUE, |
| 1036 |
TRANSLUCENT, |
| 1037 |
} |
| 1038 |
|
| 1039 |
export enum View$QualityLevel { |
| 1040 |
LOW, |
| 1041 |
MEDIUM, |
| 1042 |
HIGH, |
| 1043 |
ULTRA, |
| 1044 |
} |
| 1045 |
|
| 1046 |
export enum View$AmbientOcclusion { |
| 1047 |
NONE, |
| 1048 |
SSAO, |
| 1049 |
} |
| 1050 |
|
| 1051 |
export enum View$DepthOfFieldOptions$Filter { |
| 1052 |
NONE, |
| 1053 |
MEDIAN = 2, |
| 1054 |
} |
| 1055 |
|
| 1056 |
export enum View$BloomOptions$BlendMode { |
| 1057 |
ADD, |
| 1058 |
INTERPOLATE, |
| 1059 |
} |
| 1060 |
|
| 1061 |
export enum WrapMode { |
| 1062 |
CLAMP_TO_EDGE, |
| 1063 |
REPEAT, |
| 1064 |
MIRRORED_REPEAT, |
| 1065 |
} |
| 1066 |
|
| 1067 |
export function _malloc(size: number): number; |
| 1068 |
export function _free(size: number): void; |
| 1069 |
|
| 1070 |
interface HeapInterface { |
| 1071 |
set(buffer: any, pointer: number): any; |
| 1072 |
subarray(buffer: any, offset: number): any; |
| 1073 |
} |
| 1074 |
|
| 1075 |
export const HEAPU8 : HeapInterface; |