API Docs for:
Show:

LS.SpatialContainer Class

This class allows to store data spatially so it can be retrieved by proximity or by camera frustum view. It can store objects associated with a bounding box. It is used by the renderer to store all the RenderInstances, Lights and Colliders IT IS A WORK IN PROGRESS SO FOR NOW IT DO NOT STORES THE INFO SPATIALLY, IT JUST EXPOSES AN INTERFACE

Item Index

Methods

getCurveValueAt

(
  • values
  • minx
  • maxx
  • defaulty
  • x
)
Number

Samples a curve and returns the resulting value

Parameters:

  • values Array
  • minx Number

    min x value

  • maxx Number

    max x value

  • defaulty Number

    default y value

  • x Number

    the position in the curve to sample

Returns:

Number:

resampleCurve

(
  • values
  • minx
  • maxx
  • defaulty
  • numsamples
)
Array

Resamples a full curve in values (useful to upload to GPU array)

Parameters:

  • values Array
  • minx Number

    min x value

  • maxx Number

    max x value

  • defaulty Number

    default y value

  • numsamples Number

Returns:

Array: