Liking cljdoc? Tell your friends :D

threeagent.assets


audio-howler-loadercljs

Loader for audio. Assets will be loaded as Howler.js Howl instances

Loader for audio. Assets will be loaded as Howler.js `Howl` instances
sourceraw docstring

data-loadercljs

Loader for data files (JSON, EDN). Parses content as Clojure data structures.

Options: :keywordize-keys - Convert string keys to keywords (default: true)

Loader for data files (JSON, EDN). Parses content as Clojure data structures.

Options:
  :keywordize-keys - Convert string keys to keywords (default: true)
sourceraw docstring

font-troika-loadercljs

Loader for three-troika-text fonts. Should be used to pre-load font files

Loader for `three-troika-text` fonts. Should be used to pre-load font files
sourceraw docstring

load!cljs

(load! asset-database asset-tree)

Loads the assets defined in the asset-tree into the asset-database atom.

Returns a Promise:

  • on success: all assets have been loaded into the asset-database
  • on failure: one or more assets have failed to load. See the console for error messages
Loads the assets defined in the `asset-tree` into the `asset-database` atom.

Returns a Promise:
 * on success: all assets have been loaded into the `asset-database`
 * on failure: one or more assets have failed to load. See the console for error messages
sourceraw docstring

load-zip!cljs

(load-zip! asset-database zip-url asset-tree)
(load-zip! asset-database zip-url asset-tree {:keys [base-path]})

Loads assets from a zip file into the asset-database atom.

The zip file is downloaded, extracted to memory, and assets are loaded from the extracted files using ObjectURLs.

Options: :base-path - Path prefix inside the zip to strip. Use this if the zip has a root folder (e.g. if zip contains assets/models/foo.glb and your tree references models/foo.glb, set base-path to "assets")

Returns a Promise:

  • on success: all assets have been loaded into the asset-database
  • on failure: one or more assets have failed to load. See the console for error messages

Example: (load-zip! db "./assets.zip" [["models" {:loader model-loader} ["alien.glb" :model/alien {}]] ["textures" {:loader texture-loader} ["tile.png" :texture/tile {}]]])

Loads assets from a zip file into the `asset-database` atom.

The zip file is downloaded, extracted to memory, and assets are loaded
from the extracted files using ObjectURLs.

Options:
  :base-path - Path prefix inside the zip to strip. Use this if the zip
               has a root folder (e.g. if zip contains assets/models/foo.glb
               and your tree references models/foo.glb, set base-path to "assets")

Returns a Promise:
 * on success: all assets have been loaded into the `asset-database`
 * on failure: one or more assets have failed to load. See the console for error messages

Example:
  (load-zip! db "./assets.zip"
    [["models" {:loader model-loader}
      ["alien.glb" :model/alien {}]]
     ["textures" {:loader texture-loader}
      ["tile.png" :texture/tile {}]]])
sourceraw docstring

model-loadercljs

Loader for 3D models. Currently supports GLTF, GLB and FBX files.

Loader for 3D models. Currently supports GLTF, GLB and FBX files.
sourceraw docstring

refcljs

source

texture-loadercljs

Loader for 2D textures.

Loader for 2D textures.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close