Collection of hooks used to configure the [[mathbox/MathBox]] component.
Collection of hooks used to configure the [[mathbox/MathBox]] component.
(configureControls box {:keys [max-distance rotate-speed]})
Installs hooks with the following behavior:
Sets properties on whatever controls instance is registered. Here is OrbitControls, for example: https://threejs.org/docs/index.html#examples/en/controls/OrbitControls
NOTE that this should really support more properties! In the future we should set ANY property in the map.
Installs hooks with the following behavior: Sets properties on whatever controls instance is registered. Here is OrbitControls, for example: https://threejs.org/docs/index.html#examples/en/controls/OrbitControls NOTE that this should really support more properties! In the future we should set ANY property in the map.
(configureEvents box event-m)
Installs a hook with the following behavior:
On mount, if an event-m
of k => event handler is supplied, binds each event
to its handler using mathbox.three.on
as described in the Threestrap
docs.
On unmount, unbinds them via mathbox.three.off
.
Installs a hook with the following behavior: On mount, if an `event-m` of k => event handler is supplied, binds each event to its handler using `mathbox.three.on` as described in [the Threestrap docs](https://github.com/unconed/threestrap#events). On unmount, unbinds them via `mathbox.three.off`.
(configureRenderer box {color :background-color opacity :background-opacity})
Installs a hook that configures background color and opacity for the WebGLRenderer instance attached to the [[mathbox/MathBox]] component.
Installs a hook that configures background color and opacity for the [WebGLRenderer](https://threejs.org/docs/index.html#api/en/renderers/WebGLRenderer) instance attached to the [[mathbox/MathBox]] component.
(refHook box ref)
Hook used in place of the whole forwardRef
machinery. This seems equivalent
for the user, without the cost of converting to and from ClojureScript... let
me know if I'm wrong!
Hook used in place of the whole `forwardRef` machinery. This seems equivalent for the user, without the cost of converting to and from ClojureScript... let me know if I'm wrong!
(split-config m)
Returns a 2-vector of maps, the first with and the second without
the hook-keys
.
Returns a 2-vector of maps, the first with and the second without the [[hook-keys]].
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close