270 Degrees Viewer Changelog
2.4.4
Improvements
ME.addModel() supports a rotation parameter to place newly added models on load
Upgrade of internal renderer
Move non Scene objects to separate group
Bugfixes
High zoomRange values no longer affect camera position/target values.
ME.reset() correctly restores lighting settings.
2.4.3
Bugfixes
ME.getImage() internal renderer correctly clamps to 2048x2048 to prevent buffer overflow on Windows Edge.
Restored scale parameter in ME.getImage().
2.4.2
New features
ME.setObjectPosition() and ME.getObjectPosition() to set and get object positions
ME.setObjectRotation() and ME.getObjectRotation() to set and get object rotations
Improvements
ME.addModel() supports position to place newly added models on load
Bugfixes
Model names and animation names are sanitized (spaces, commas and periods become underscores) for safer dot notation and API access
2.4.1
New features
mobileFriendlyScroll option to prevent scroll hijacking on touch devices.
Improvements
Added autoplayAnimation, loopAnimation, reverseAnimation, visible parameters to ME.addModel()
2.4.0
New features
ME.addModel() to add an extra model to your scene.
ME.removeModel() to remove a model from the scene.
ME.getModels(), ME.getModel() and ME.getModelNames() to report loaded models.
ME.calibrateCamera() to calibrate the camera on either the entire scene or a specific object.
ME.setShadowSpace() and ME.getShadowSpace() to control shadow spacing.
Improvements
KTX2 PMREM support for faster lighting rendering.
Updated shadowplane size for better performance.
ME.getCameraTarget() now returns rounded numbers.
Reworked logic for lightingRotation.
Moved ME.showObject() and ME.hideObject() from Customiser plugin to main viewer.
2.3.3
Improvements
antialias option is added to turn on/off antialias
2.3.2
Bugfixes
Background options no longer overwrite shadow plane.
2.3.1
Bugfixes
Correctly resize Annotation renderer.
2.3.0
New features
ME.setZoomSpeed(), ME.getZoomSpeed() and options.zoomSpeed to control zoom sensitivity.
ME.getAnimationFrame and ME.setAnimationFrame to allow scrubbing through animations.
Improvements
set Renderer alpha to true for better performance.
add getters and setters for opacity, rotationSpeed and autoRotateSpeed.
better API authentication.
Bugfixes
intensity is now environmentIntensity in ME.setLighting for constistency with respective getter and setter.
Calling ME.setLighting no longer overwrites previous lighting settings.
ME.reset() correctly resets cameraPosition to options.cameraPosition.
2.2.1
Bugfixes
Correctly resize after ME.getImage() and correctly set ratio for ME.getImage().
2.2.0
New features:
ME.getCameraTarget(), ME.setCameraTarget() and options.cameraTarget to control the camera's orbit point.
ME.setZoomRange(), ME.getZoomRange() and options.zoomRange to control minimum and maximum zoom distances.
ME.getTrueColors() and ME.setTrueColors() to control color grading.
Improvements
ME.getObjects() and ME.getObject() accept scoped naming via dotnotation.
Bugfixes
Correctly call resetPan() within reset().
Correctly keep camera position after resetPan().
2.1.0
New features:
ME.setVerticalPan(Boolean), ME.getVerticalPan() and options.verticalPan to control panning direction.
neutral-2 lighting option for softer, more ecom friendly lighting.
trueColors option to keep hue shift to a minimal by upping the lighting contrast. Default is false.
Improvements
Support for Environment Intensity support, which controls the influence of the loaded HDRI:
ME.setLighting({intensity: Float})
ME.setEnvironmentIntensity
ME.getEnvironmentIntensity
options.environmentIntensity
ME.resizeViewer now accepts width/height parameters to manually set the size of the viewer.
Smart resizeViewer to only rerender if the container size has actually changed.
ME.enablePan() defaults to XZ panning. Pass true as the second parameter to allow XY panning.
Bugfixes
Correctly render shadow after ME.stopAnimation() was called
Maintenance
Update to core THREE renderer
Improved rendering of transmission materials
Updated UHDR loader
2.0.1
Bugfixes
Show Random Colored Cube on model 404
2.0.0
New features
ME.setBackground(), options.background supports images and gradients.
lazyload option for better performance.
ME.getSettings('api|init|state') get all settings of the Viewer, either from api, from initialisation or current state.
Improvements
Implicitly invoke .create on DOMContentLoaded
Maintenance
Upgrade to core THREE renderer
Improved internal state management
1.12.2
Bugfixes
autoplayAnimation set to true correctly starts animations
1.12.1
Bugfixes
Correctly start animation after being paused with multiple animations
1.12.0
New features
ME.getGroups() report all loaded asset groups name and containing objects.
ME.getGroupNames() report the names of all loaded asset groups.
ME.getGroup(name) report a specific group and containing objects from the loaded asset by name.
ME.getAnimations() reports all available animations and their state.
ME.getAnimationNames() reports the names of all available animations.
ME.getAnimation(name) report passed animation state.
Improvements
ME.startAnimation() support multiple animations, and reverse playback.
animation related options for ME.create():
autoplayAnimation, loopAnimation, reverseAnimation.
Bugfixes
customLightingData supports extraLights object across the board
1.11.0
New features
ME.setShadow() recreate the shadow on demand and returns a promise. This is automatically called upon loading the asset. Options can be passed to manually configure the shadow:
opacity: the opacity of the shadow for a translucent effect - Float
darkness: the strength of the darkest point of the shadow - Float
blur: the amount of blurring of the shadow. - Float
visible: wether or not to show the shadow. Similar to ME.enableShadow(true) - Boolean
spaced: adds space between the model and shadow for a floaing effect. Similar to ME.enableShadow(true,true) - Boolean
ME.setShadowBlur() shorthand to change the shadow blur.
ME.setShadowOpacity() shorthand to change the shadow opacity.
ME.setShadowDarkness() shorthand to change the shadow darkness.
ME.getShadow() returns the current shadow settings as an object.
ME.getShadowBlur() returns the current shadow blur.
ME.getShadowOpacity() returns the current shadow opacity.
ME.getShadowDarkness() returns the current shadow darkness.
shadow related options for ME.create():
shadowOpacity, shadowDarkness, shadowBlur.
1.10.2
Bugfixes
ME.reset() correctly resets horizontalRotation.
ME.getLighting correctly returns current type instead of always custom.
1.10.1
Bugfixes
initial cameraPosition no longer clashes with some presets.
1.10.0
New features
Custom lighting support. Pass a lighting Object via customLightingData (options) or setLighting({customLightingData: {...} }) to create bespoke lightings.
Improvements
MeshRefractionMaterial support, for better refraction rendering.
HDRJPG support. The Viewer will automatically use HDRJPG for lighting when available
1.9.2
Improvements
ME.getImage() scale option changed from Boolean to contain or cover, similar to their CSS counterparts.
1.9.1
Maintenance
update to core THREE renderer
API connection maintenance
1.9.0
New features
ME.reset(bool) reset all settings back to the initially loaded state. Pass true to reset to the API directed settings, and false to reset to the .create directed settings.
Variants support. Variants allow multiple material configurations to be preloaded in an asset. New methods are:
ME.getVariants() returns all available variants in the asset, if any.
ME.getVariant() returns the currect active variant.
ME.setVariant({variant: str, render: bool}) activates the passed variant and optionally renders a new frame
Improvements
Prevent multiple create on same DOMElement.
ME.setCameraPosition keyword support: top, bottom, left, right, front, back.
Bugfixes
Increased minDistance to prevent near clipping in edge cases.
1.8.4
Bugfixes
disableDamping() now works correctly with factor
1.8.3
Maintenance
Minor API connection improvements
1.8.2
Bugfixes
Correctly apply Object visibility on Asset load
1.8.1
Bugfixes
Custom loader icon sizes correctly on Safari
Shadow render correctly according to index
1.8.0
New features
onLoadFailure callback. Fires on no model specified and failed to load model (403, 404, 500, etc).
onCreate callback. Fires on initialisation of the Viewer, but before the model is loaded.
TSDViewer.destroy(el) removes the viewer and all related methods and listeners
New lighting methods:
ME.setLightingType() shorthand to change HDRI.
ME.setLightingExposure() shorthand to change exposure value
ME.setSunIntensity() shorthand to change SunLight intensity value
ME.setLightingRotation() shorthand to change HDRI rotation
ME.getLighting() returns current lighting settings as an object
ME.getLightingType() returns hdri type
ME.getAmbientIntensity() returns current AmbientLight intensity value
ME.getLightingExposure() returns current exposure value
ME.getSunIntensity() returns current SunLight intensity value
ME.getLightingRotation() returns current hdri rotation angle
New lighting options:
sunIntensity: intensity of sun light - Float
lightingExposure: HDRI exposure value. Ignored in traditional - Float
lightingRotation: HDRI rotation in degrees. Ignored in traditional - Float
Improvements
Reworked ME.setLighting to accept a settings object:
type: type of HDRI to load. Choices are unchanged - string
ambientIntensity: override intensity of ambient light - Float
sunIntensity: override intensity of sun light - Float
exposure: HDRI exposure value. Ignored in traditional - Float
rotation: HDRI rotation in degrees. Ignored in traditional - Float
Add ME.viewerCreated read-only Bool when .create was called.
Add ME.assetLoaded read-only Bool when the asset was loaded or errored
material.userData support. Used internally for more flexible material rendering.
ME.setLighting() returns a promise
Bugfixes
Passing ME.getImage() with a size now returns image in correct ratio
1.7.1
Improvements
Add TSD object to object3d's userData for better customiser support
1.7.0
New features
Plugin support for Customiser and future plugins. Pass via plugins options.
ME.enablePan(bool) to enable/disable camera panning after load.
ME.resetPan() reset the camera origin point to the center of the loaded asset.
disable... variant of enable... functions: ME.disableShadow(), ME.disableZoom(), ME.disableControls(), ME.disableAutoRotate(), ME.disableRotate(), ME.disablePan(), ME.disableDamping().
Improvements
Save previous passed setting of enable... and disable... functions more consistently.
Clamp dampingFactor between 0.001 and 1 to avoid erratic camera behavior.
Update THREE to 155 for better PhysicalMaterial rendering.
1.6.0
New features
Animation support. Start, stop and pause animations baked in the asset.
ME.startAnimation(bool), starts the animation with optional loop Boolean
ME.stopAnimation(), stops the animation and resets to the first frame
ME.pauseAnimation(), pauses the animation on the current frame. Resume by calling ME.startAnimation()
Customise loader via options:
loaderLogo: The loaderscreen image uri - string
loaderByline: Text shown under the loader progress bar. - string
loaderColor: Max two css colors for the loader progress bar color gradient. Passing just one color results in solid color - Commaseparated string of hexidecimal colors
loader: Pass false to disable the loader altogether - Boolean
Explicitly set Viewer width and height via options:
width: width of the Viewer - css value
height: height of the Viewer - css value
ME.setAmbientIntensity(float). Set the ambientIntensity of the lighting separate from ME.setLighting().
ME.setAutoRotateSpeed(float). Set the autorotate speed separate from ME.enableAutoRotate().
ME.setOpacity(float). Set the Viewer background opacity separate from ME.setBackground().
ME.getObjects(). Report all loaded asset objects name and texturesize.
ME.getObjectNames(). Report the names of all loaded asset objects.
ME.getObject(name). Report a specific object from the loaded asset by name.
Improvements
ME.setLighting() loads lighting setups more effectively.
Bugfix
Passing free as either parameter to ME.setHorizontalRotation and ME.setVerticalRotation now correctly removes limits
1.5.1
Bugfix
ME.enableShadow() did not update properly.
ME.enableZoom() had no effect.
1.5.0
New features:
Feature: getImage({opts}). Returns a snapshot of the viewer with passed options. See getImage()
Feature: Added debug mode to show Framecounter. Enable by passing debug: true in TSDViewer.create()
Improvements
Improvement internal : moved ME.scene scope to ME._scene.
Improvement: change setCameraPosition to accept relative zoom level
IMPORTANT: setCameraPosition requires an object now to allow for single param changes. See setCameraPosition()
Improvement: Updated THREE to r153. This has an immediate effect on colormanagement.
IMPORTANT: Colorspace defaults to SRGB now, which means any occurences of color.convertSRGBToLinear() in your app should be removed to prevent incorrect use of color.
1.4.1
Bugfix
ME.requestRender() errorred in ME.setLighting()
1.4.0
New features
Shadow visibility toggle: enableShadow(enable:bool, shadowspace: bool). See enableShadow()
Note: this changed focalPoint to _AABB.focalPoint. _internal
Set user rotation speed: setRotationSpeed(int). Changes rotation speed of orbitcontrols to value. See setRotationSpeed()
Adjust ambient lighting intensity. See setLighting() and ambientIntensity
Toggle autoRotate: enableAutoRotate(enable:bool, speed: float). See enableAutoRotate()
Bugfix
autoRotate correctly starts renderloop
1.3.3
Improvements
Fallback to Traditional lighting when HDRI fails to load.
Bugfix
Lighting loads correctly when multiple instances of the same type were loaded.
1.3.2
Bugfix
forceLoad flag now correctly forces load when set via Options.
Loader css resets to default styling before showing to allow for re-inits of Viewer.
1.3.1
Bugix
Auto API connection now also works with bundlers.
1.3.0
New features
WebP support check: get the WebP compressed version of the asset if it's available and the device supports it.
Exposed key functions and values for external manipulation of the 3d scene:
values: controls,scene, _focalPoint
functions: enableControls(bool), enableDamping(bool), enableRotate(bool), enableZoom(bool), getCameraPosition(), getHorizontalRotation(), getVerticalRotation(), requestRender(), resizeViewer(), setBackground(str), setCameraPosition(radius, phi, theta), setHorizontalRotation(min,max), setLighting(string), setVerticalRotation(min,max)
new option to pass in settings: onLoadComplete: callback function
Added window.TSDENV flag to force API connection to passed environment. Options are dev, staging, live.
Improvements
Automatically connect to API environment from where the viewer.js was served. See New Features how to override.
Bugfix
Correctly sanitise options object.
1.2.0
New features
Smart loading; the viewer does not load if it is not visible to the end user (via visibility hidden, display none or height/width of 0). This behaviour can be turned off by passing forceLoad: true or data-force-load="true" as an option. See forceLoad .
Added requestRender() method to force a frame render. See requestRender() .
Added resizeViewer() method to force recalculation of the Viewer's dimensions. See resizeViewer() .
Added cameraZoomLevel option, which sets the initial relative zoom distance based on asset size. See cameraZoomLevel .
Improvements
Updated to three build 146
Bugfix
Fixed unknown lighting typed throwing invalid shadow error
1.1.5
Improvements
Changed initial zoom level
1.1.4
New features
More lighting options available: city, courtyard, forest, interior, night, studio, sunrise, sunset
1.1.3
Improvements
Set Vertical Rotation defaults to 45,135.
Set default Lighting type to neutral.
1.1.2
Bugfix
Loader Icon cut off on smaller screens
1.1.1
Improvements
Version number is printed in console onload
Use of relative API endpoint by setting window.TSDINTERNALAPI = true. This is used for the Asset Browser only.
1.1.0
New features
💬 Ask AI