BBMOD_IRenderable

interface

BBMOD_IRenderable()

Description

An interface describing renderable objects. Any struct or object that implements this interface can be rendered using a BBMOD_Renderer.

Example

A renderable object:

/// @desc Create event
render = function () {
    var _matrix = matrix_build_identity();
    _matrix[12] = x;
    _matrix[13] = y;
    _matrix[14] = z;
    matrix_set(matrix_world, _matrix);
    model.render();
    return self;
};

A renderable struct:

renderable = {
    position: new BBMOD_Vec3(),
    model: /* ... */,
    render: function () {
        var _matrix = matrix_build_identity();
        position.ToArray(_matrix, 12);
        matrix_set(matrix_world, _matrix);
        model.render();
        return self;
    },
};

See also

BBMOD_Renderer

Do you find this page helpful?

Copyright © 2022, BlueBurn. Built on May 16, 2022 using GMDoc.