<script src="Bronze.min.js"></script>
// Creating instance of engine
var engine = new Bronze.Engine(canvas)
// Creating camera for engine
var camera = new Bronze.Camera(engine)
// You can also define controls object for control camera or objects.
var controls = new Bronze.Controls(engine)
// Create all texture files
var texture = new Bronze.Texture(engine)
texture.setColor(159, 136, 105, 255) // If engine draws before all resources loaded color will be shown
texture.loadFrom("path/to/texture.png")
// Creating instance of some object
var object = new Bronze.Object(Engine)
object.loadFromObj("path/to/object.obj")
object.setTexture(texture)
// We can transform him
object.setPosition(0, 200, 500)
object.setRotation(0, 90, 45)
object.scale(2, 3, 2)
// Also we can set animation function
object.animate(60, (obj) => {
obj.rotate(+1, 0, 0)
if (!(obj.position.y == 100)) {
obj.move(0, -10, 0)
}
})
`
consoleyarn dev
yarn run build
yarn run build:docs
`
Generated using TypeDoc