__ __ π» π» β°
| |_| |--.----.-----.-----. π¦
π
| _| | _| -__| -__|
|____|__|__|__| |_____|_____| π» π²π³ __ π² π³ π¦
.-----.| |.-----.--------.-----.-----.| |_.-----.
| -__|| || -__| | -__| || _|__ --|
|_____||__||_____|__|__|__|_____|__|__||____|_____| π³π² π‘ π² π²π³ π π² π²π³ π³
WARNING: It is early days for this library, so please proceed with caution!
<three-mesh>
for THREE.Mesh
!)onclick
et al.)<!-- Load three-elements -->
<script type="module" src="https://jspm.dev/three-elements"></script>
<!-- Create a Three.js game with a default camera. -->
<three-game autorender>
<three-scene background-color="#444">
<!-- Lights on! -->
<three-ambient-light intensity="0.2"></three-ambient-light>
<three-directional-light intensity="0.8" position="10, 10, 50"></three-directional-light>
<!-- Spinning dodecahedron! -->
<three-mesh tick="object.rotation.z += dt">
<three-dodecahedron-buffer-geometry></three-dodecahedron-buffer-geometry>
<three-mesh-standard-material color="red"></three-mesh-standard-material>
</three-mesh>
</three-scene>
</three-game>
Please get in touch before submitting Pull Requests (ideally, before even implementing them.) At this stage in its development, three-elements still is heavily in flux. If there is something you would like to contribute, please open an issue and describe your suggestion.
If you want to do some hacking, just run yarn dev
, which will compile the package in watch mode and spawn a server on localhost:5000
that serves the contents of the examples/
directory.
THREE.*
classes 1:1 instead of building a library of custom components.