renderable, vertexBuffer, and indexBuffer. These are of type Entity, VertexBuffer, and IndexBuffer.Represents the six planes of a truncated viewing pyramid
+Utility class for constructing spheres (requires glMatrix).
The constructor takes an integer subdivision level, with 0 being an icosahedron. @@ -897,6 +919,17 @@ This defines the following functions:
const mat = engine.createMaterial('triangle.filamat');
const matinst = mat.getDefaultInstance();
Filament.RenderableManager.Builder(1)
- .boundingBox([[ -1, -1, -1 ], [ 1, 1, 1 ]])
+ .boundingBox({ center: [-1, -1, -1], halfExtent: [1, 1, 1] })
.material(0, matinst)
.geometry(0, Filament.RenderableManager$PrimitiveType.TRIANGLES, this.vb, this.ib)
.build(engine, this.triangle);
diff --git a/docs/webgl/tutorial_triangle.js b/docs/webgl/tutorial_triangle.js
index 2a52a9b9d9..584dc94b4a 100644
--- a/docs/webgl/tutorial_triangle.js
+++ b/docs/webgl/tutorial_triangle.js
@@ -31,10 +31,10 @@ class App {
const mat = engine.createMaterial('triangle.filamat');
const matinst = mat.getDefaultInstance();
Filament.RenderableManager.Builder(1)
- .boundingBox([
- [-1, -1, -1],
- [1, 1, 1]
- ])
+ .boundingBox({
+ center: [-1, -1, -1],
+ halfExtent: [1, 1, 1]
+ })
.material(0, matinst)
.geometry(0, Filament.RenderableManager$PrimitiveType.TRIANGLES, this.vb, this.ib)
.build(engine, this.triangle);