a_json_model: a_json_model

Description Usage Arguments Details Value

View source: R/json_model.R

Description

This function returns an entity that will render a 3D model expressed in threejs JSON format. See the format specification here: https://github.com/mrdoob/three.js/wiki/JSON-Model-format-3. The mandatory 'src' argument should be an object returned by 'a_asset()'.

Usage

1
2
3
4
5
6
7
a_json_model(
  src,
  .version_num = "4.1.2",
  mesh_smooth = FALSE,
  .js_sources = list(),
  ...
)

Arguments

src

an a_asset describing a JSON file.

.version_num

A-Frame extras version number.

mesh_smooth

if true, compute normals in browser to give the model a smoothed appearance.

.js_sources

defaults to version 4.1.2 of the JSON model loader, supply another version using a list here. e.g. 'js_sources' = list("https://cdn.rawgit.com/donmccurdy/aframe-extras/<path_to_js_file>")

...

other components to be added to the JSON model. Passed to a_entity.

Details

The entity imports the an extenal js source for loading JSON models written by Don McCurdy.

Value

An entity object describing a JSON model.


MilesMcBain/r2vr documentation built on March 29, 2021, 12:03 p.m.