Liking cljdoc? Tell your friends :D

mathbox.hooks

Collection of hooks used to configure the [[mathbox/MathBox]] component.

Collection of hooks used to configure the [[mathbox/MathBox]] component.
raw docstring

configureControlscljs

(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.
sourceraw docstring

configureEventscljs

(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`.
sourceraw docstring

configureRenderercljs

(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.
sourceraw docstring

hook-keyscljs

source

install-hookscljs

(install-hooks box config)
source

refHookcljs

(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!
sourceraw docstring

split-configcljs

(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]].
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close