Every Akkad application requires both an and component.
Top level component in an Akkad application.
Props:
initState<object>
: The initial state of you applicationactions<Object>
: Object of methods that are internal actions
example:
<Akkad
initState={{count: 0}}
actions={{
increment: state => state().update("count", count => ++count)
}}
>
<MyScene />
</Akkad>
A component that houses the rest of your Akkad application components. You can have multiple <Scene />
components in a single <Akkad />
application.
Every Akkad scene requires at least one light source. See the Babylon lighting tutorial for more information.
A Directional light is defined by a direction. Light is from everywhere and focused towards a specific direction. By default the light is created at origin [0, 0, 0]
direction<[x, y, z]>
: Vector in which the light is focuseddiffuse<[r, g, b]>
: The color of the diffuse reflection of the lightspecular<[r, g, b]>
: The color of the specular reflection of the light
source<[x, y, z]>
: The direction to the "sky"diffuse<[r, g, b]>
: The color of the diffuse reflection of the lightspecular<[r, g, b]>
: The color of the specular reflection of the light
A Cone of light that starts from a position and emits towards a direction
position<[x, y, z]>
: Position of lightdirection<[x, y, z]>
: Direction light is pointedangle<Number>
: Size of the spotlight's conical beam (in radians)exponent<[x, y, z]>
: Defines the speed of the decay of the light with distancediffuse<[r, g, b]>
: The color of the diffuse reflection of the lightspecular<[r, g, b]>
: The color of the specular reflection of the light
diffuse<[r, g, b]>
: The color of the diffuse reflection of the lightspecular<[r, g, b]>
: The color of the specular reflection of the light
Every Akkad scene will require a camera See the Babylon Camera tutorial for more information.
target<[x, y, z]>
: Required, Target of cameraposition<[x, y, z]>
: Required, position of camera
target<[x, y, z]>
: Required, Target of camera
target<[x, y, z]>
: Required, Target of cameraposition<[x, y, z]>
: Required, position of camera
img<Url>
: Required, location of particle image.
size<Number>
height<Number>
: Height of boxwidth<Number>
: Width of boxdepth<Number>
sideOrientation<Number>
segments<Number>
diameter<Number>
diameterX<Number>
diameterY<Number>
diameterZ<Number>
arc<Number>
slice<Number>
sideOrientation<Number>
updatable<Boolean>
height<Number>
diameterTop<Number>
diameterBottom<Number>
tessellation<Number>
subdivisions<Any>
diameter<Number>
thickness<Number>
tessellation<Number>
updatable<Boolean>
sideOrientation<Number>
height<Number>
width<Number>
subdivisions<Any>
meshHeight<Number>
: Height of the ground meshmeshWidth<Number>
: Width of the ground meshheightMap<ImageURL>
: Url of height map imagesubdivisions<Number>
: Complexity of the height map mesh, higher gives better detailminHeight<Number>
: Lowest level of the height map meshmaxHeight<Number>
: Highest level of the height map mesh
points<Array>
: An array of vector (x, y, z) arrays
points<Array>
: An array of vector (x, y, z) arraysdashSize<Number>
: size of dash, relative to gapSizegapSize<Number>
: size of gaps between dashesdashNumber<Number>
: Number of gaps per line