driver-webgl
WebGL driver for Rax.
Components and APIs are based on three.js
design and implementation. Use markup language and declarative writing to simplify development.
Install
s
$ npm install --save driver-webgl
Usage
import createElement Component render from 'rax';import WebGLDriver from 'driver-webgl'; { ; thisstate = cubeRotation: 0 0 0 ; thiswidth = windowinnerWidth; thisheight = windowinnerHeight; thiscameraPosition = 0 0 5; } { this; } { return <scene = = = > <perspective = = = = = /> <mesh = > <box = = = /> <mesh = /> </mesh> </scene> ; } ;
Built-in Tags
Scenes
- scene
Cameras
- perspective-camera
Controls
- orbit-controls
- trackball-controls
Core
- geometry
- buffer-geometry
- object-3d
- raycaster
Geometries
- box-geometry
- cylinder-geometry
- sphere-geometry
Lights
- ambient-light
- directional-light
Materials
- line-basic-material
- line-dashed-material
- mesh-basic-material
- mesh-lambert-material
- mesh-phong-material
- points-material
Objects
- line
- mesh
- points