Here we'll translate into practice all the high-level steps outlined in the introduction, using Cogs.js directly in a simple HTML page. This guide will assume you've read the introduction and know about the core concepts already.
See Hello World Angular for quick guide.
See Documentation startup page on how to compile examples from source code.
The examples cover basic things like adding entities and controlling the camera.
You can also learn how to create a mesh, set up materials and handle input. There are also sample code on how to use entities like billboards, axis cube, extrusion, ocean and the physics engine. You can also find code for composing entities and loading 3D models.
The demos and tests are have their own html pages so it should be easy to locate their source code in the internal browser developer tools.
Most examples are located in separate files in folder examples/js/Examples
, other examples are grouped in file: examples/js/ExampleRunner/ExampleRunner.js
.
To locate the source of an example, open examples/index.html
. Located the title of the example and search for the string in the entry: (entry: "basicStandardMaterialExample"
)