Matrix Engine Api Documentation - v1.9.0
    Preparing search index...

    Class MatrixEngineWGPU

    Main engine root class.

    Nikola Lukic 2025

    zlatnaspirala

    Index

    Constructors

    Properties

    _destroyQueue: Set<any>
    _rafId: any
    activateEditor: () => void
    adapter: any
    audioManager: AudioAssetManager = ...
    bloomBindGroup: any
    bloomOutputTex: any
    bloomPass:
        | BloomPass
        | {
            enabled: boolean;
            setBlurRadius: (v: any) => void;
            setIntensity: (v: any) => void;
            setKnee: (v: any) => void;
            setThreshold: (v: any) => void;
        }
    cameras: { arcball: ArcballCamera; RPG: RPGCamera; WASD: WASDCamera }
    canvas: any
    context: any
    createMe: any
    depthTextureViewTrail: any
    destroyByPrefix: (prefix: any) => void
    destroyBySufix: (sufix: any) => void
    device: any
    editor: Editor
    entityArgPass: {
        depthLoadOp: string;
        depthStoreOp: string;
        loadOp: string;
        storeOp: string;
    } = ...
    entityHolder: any[] = []
    flushDestroyQueue: () => void
    globalAmbient: Vec3
    inputHandler: () => {
        analog: { touching: boolean; x: number; y: number; zoom: number };
        digital: {
            backward: boolean;
            down: boolean;
            forward: boolean;
            left: boolean;
            right: boolean;
            up: boolean;
        };
    }
    label: MultiLang
    lastTime: number = 0
    lightContainer: any[] = []
    logLoopError: boolean
    mainCameraParams: { responseCoef: any; type: any }
    mainDepthTexture: any
    mainDepthView: any
    mainRenderBundle: any[] = []
    mainRenderPassDesc: {
        colorAttachments: {
            clearValue: number[];
            loadOp: string;
            storeOp: string;
            view: any;
        }[];
        depthStencilAttachment: {
            depthClearValue: number;
            depthLoadOp: string;
            depthStoreOp: string;
            view: any;
        };
        label: string;
    }
    matrixAmmo: MatrixAmmo
    matrixSounds: MatrixSounds = ...
    MAX_SPOTLIGHTS: number
    noBloomBindGroup: any
    options: any
    physicsBodiesGenerator: any
    physicsBodiesGeneratorDeepPyramid: any
    physicsBodiesGeneratorPyramid: any
    physicsBodiesGeneratorTower: any
    physicsBodiesGeneratorWall: any
    presentPipeline: any
    presentSampler: any
    reference: {
        addRaycastsListener: (canvasId?: string, eventName?: string) => void;
        BVHPlayer: typeof BVHPlayer;
        BVHPlayerInstances: typeof BVHPlayerInstances;
        downloadMeshes: (
            nameAndURLs: any,
            completionCallback: Function,
            inputArg: any,
        ) => void;
        graphAdapter: (compilerResult: any, nodes: any) => string;
        MEMeshObj: typeof default;
        MEMeshObjInstances: typeof default;
    } = ...

    Type Declaration

    • addRaycastsListener: (canvasId?: string, eventName?: string) => void
    • BVHPlayer: typeof BVHPlayer
    • BVHPlayerInstances: typeof BVHPlayerInstances
    • downloadMeshes: (nameAndURLs: any, completionCallback: Function, inputArg: any) => void

      Takes in an object of mesh_name, '/url/to/OBJ/file' pairs and a callback function. Each OBJ file will be ajaxed in and automatically converted to an OBJ.Mesh. When all files have successfully downloaded the callback function provided will be called and passed in an object containing the newly created meshes.

      Note: In order to use this function as a way to download meshes, a webserver of some sort must be used.

    • graphAdapter: (compilerResult: any, nodes: any) => string
    • MEMeshObj: typeof default
    • MEMeshObjInstances: typeof default
    sceneTexture: any
    sceneTextureView: any
    shadersPack: {}
    SHADOW_RES: number
    shadowArrayView: any
    shadowTextureArray: any
    shadowVideoTexture: any
    shadowVideoView: any
    spotlightUniformBuffer: any
    textureCache: TextureCache

    Methods

    • Parameters

      • o: any
      • BVHANIM: any
      • glbFile: any
      • clearColor: any = ...

      Returns void

    • Parameters

      • o: any
      • BVHANIM: any
      • glbFile: any
      • clearColor: any = ...

      Returns void

    • Parameters

      • o: any
      • clearColor: any = ...

      Returns void

    • Parameters

      • p: any

      Returns any

    • Parameters

      • name: any

      Returns any

    • Parameters

      • name: any

      Returns any

    • Parameters

      • delta: any

      Returns void

    • Parameters

      • __namedParameters: { callback: any; canvas: any }

      Returns Promise<void>

    • Parameters

      • name: any

      Returns boolean

    • Parameters

      • callback: any

      Returns Promise<void>