- Changed how Threestrap imports ThreeJS. Previously, Threestrap (usually) imported from
three/src
. Now it consistently imports fromthree
. This change should generally not affect users unless they were usinginstanceof
checks. - Fixed tests for CI #28
- THREE.js is no longer included in the build output and must be included separately. #26
- Fixed stats plugin throwing an error on destroy() if mounted in a non-body element #25
- Camera: Lower near distance to 0.01 by default.
- Controls: Ship TrackballControls.
- Loop: Add
each
option for rendering at (integer) reduced frame rates.
- Time: Provide
warmup
option to wait N frames before starting clock (complements render warmup) - Time: Add
time
real time clock.
- Bootstrap: Can pass in CSS selector for { element: ... } option.
- Size: handle retina/high-DPI displays to match Three.js changes.
- New Extra/VR:
render
replacement for Oculus/Cardboard VR using thegetVRDevices
API andTHREE.VRRenderer
. Specify asrender:vr
or use theVR
alias, seeexamples/vr.html
. - New Extra/Fullscreen: Go fullscreen / VR with keypress or API.
- New Extra/UI: Minimal UI controls for fullscreen / VR.
- Extra/Controls: Pass VR state to controls.
- Extra/Cursor: Hide cursor in VR mode.
- Vendor/controls/VRControls: Apply VR state and fallback to DeviceOrientationControls / OrbitControls
- New Core/Warmup: Hide canvas for first few frames to avoid stuttering while JS/GL warms up.
- Core/Size: Rename capWidth/capHeight to maxRenderWidth/maxRenderHeight
- Core/Renderer: Only apply render width/height to canvas-based renderers
- Core/Renderer: Call setRenderSize on renderer if present (MultiRenderer)
- Core/Bind: Moved before renderer
- Core/Fallback: Simply fallback message into wrapper + message
- New Extra/Cursor: Set mouse cursor contextually. Can auto-hide cursor with time out.
- New Core/Fallback: Abort and display standard message when WebGL is unavailable.
- Initialize
three.Time.now
on install.
- Core: 'ready' event now always fires on hot install
- Core/Time: Frame count/time
frames
and variable speedclock
/step
. Usespeed
option to control. - Core/Fill: Configurable options for behavior, add
layout
option to position overlays like stats correctly. - Extra/Stats: Insert into containing DOM element.
- Make canvas display as block in 'fill'
- Shorthand syntax
foo:bar
for aliases in plugin list - Make api mechanism reusable as
THREE.Api
- Hot-swap plugins with
three.install/uninstall(name/plugins)
- this.api({...}, three) now auto-passes
three
as argument to API methods. - Move
bind
andrenderer
into their own plugins - Make bind mechanism reusable as
THREE.Binder
- Diff changes made with
$.api().set()
, provide.changes
as well as all passed.options
values - Ad-hoc aliases to override plug-ins on init
- Declarative event binding
- .on/.off/.trigger naming, with fallback for DOM/THREE objects
controls
plug-in / examples