Create geometry and materials
Use a primitive such as BoxGeometry for a
quick start, or construct a Geometry from named
Attribute channels. Positions, normals, UVs,
colors, and optional indices are regular typed-array data; there is no GPU
buffer upload lifecycle.
const geometry = new EASEL.Geometry();geometry.setAttribute( "position", new EASEL.Attribute( [ -0.5, -0.5, 0, 0.5, -0.5, 0, 0, 0.5, 0, ], 3, ),);Choose a material based on the CPU shading path:
BasicMaterialuses a solid or textured color without lighting.LambertMaterialbakes diffuse lighting on the CPU.ToonMaterialuses stepped Gouraud shading and an optional gradient map.- Line, point, and sprite materials target their corresponding rasterizer primitives.
Material opacity is intentionally discrete. Transparent objects depend on sorted draw order, and changing depth writes can change how overlapping fragments appear.
Loading render…