├── .github └── ISSUE_TEMPLATE.md ├── .gitignore ├── AUTHORS.md ├── CONTRIBUTING.md ├── GUIDELINES.md ├── Gruntfile.js ├── LICENSE.md ├── README.md ├── externs ├── forge │ ├── animation.ext.js │ ├── camera.ext.js │ ├── color.ext.js │ ├── core.ext.js │ ├── device.ext.js │ ├── display.ext.js │ ├── hotspot.ext.js │ ├── math.ext.js │ ├── plugin.ext.js │ ├── render.ext.js │ ├── story.ext.js │ ├── timeline.ext.js │ ├── tween.ext.js │ └── video.ext.js └── lib │ ├── dash.ext.js │ ├── hammer.ext.js │ ├── omnitone.ext.js │ ├── three.ext.js │ ├── w3c.gamepad-extension.ext.js │ └── w3c.vrdisplay.ext.js ├── lib ├── dash.js │ ├── LICENSE.md │ ├── dash.all.debug.js │ ├── dash.all.debug.js.map │ ├── dash.all.min.js │ └── dash.all.min.js.map ├── dat.gui │ ├── LICENSE.md │ ├── dat.gui.css │ ├── dat.gui.js │ ├── dat.gui.js.map │ └── dat.gui.min.js ├── hammer.js │ ├── LICENSE.md │ ├── hammer.js │ ├── hammer.min.js │ ├── hammer.min.js.map │ └── hammer.min.map ├── omnitone │ ├── LICENSE.md │ ├── omnitone.js │ └── omnitone.min.js └── three.js │ ├── LICENSE.md │ ├── postprocessing │ ├── AdaptiveToneMappingPass.js │ ├── BloomPass.js │ ├── BokehPass.js │ ├── ClearPass.js │ ├── CubeTexturePass.js │ ├── DotScreenPass.js │ ├── EffectComposer.js │ ├── FilmPass.js │ ├── GlitchPass.js │ ├── ManualMSAARenderPass.js │ ├── MaskPass.js │ ├── OutlinePass.js │ ├── RenderPass.js │ ├── SMAAPass.js │ ├── SSAARenderPass.js │ ├── SavePass.js │ ├── ShaderPass.js │ ├── TAARenderPass.js │ ├── TexturePass.js │ └── UnrealBloomPass.js │ ├── shaders │ ├── BasicShader.js │ ├── BleachBypassShader.js │ ├── BlendShader.js │ ├── BokehShader.js │ ├── BokehShader2.js │ ├── BrightnessContrastShader.js │ ├── ColorCorrectionShader.js │ ├── ColorifyShader.js │ ├── ConvolutionShader.js │ ├── CopyShader.js │ ├── DOFMipMapShader.js │ ├── DigitalGlitch.js │ ├── DotScreenShader.js │ ├── EdgeShader.js │ ├── EdgeShader2.js │ ├── FXAAShader.js │ ├── FilmShader.js │ ├── FocusShader.js │ ├── FresnelShader.js │ ├── GammaCorrectionShader.js │ ├── HorizontalBlurShader.js │ ├── HorizontalTiltShiftShader.js │ ├── HueSaturationShader.js │ ├── KaleidoShader.js │ ├── LuminosityHighPassShader.js │ ├── LuminosityShader.js │ ├── MirrorShader.js │ ├── NormalMapShader.js │ ├── OceanShaders.js │ ├── ParallaxShader.js │ ├── RGBShiftShader.js │ ├── SMAAShader.js │ ├── SSAOShader.js │ ├── SepiaShader.js │ ├── TechnicolorShader.js │ ├── ToneMapShader.js │ ├── TriangleBlurShader.js │ ├── UnpackDepthRGBAShader.js │ ├── VerticalBlurShader.js │ ├── VerticalTiltShiftShader.js │ └── VignetteShader.js │ ├── three.custom.min.js │ ├── three.r83.custom.js │ ├── three.r83.custom.min.js │ ├── three.r83.js │ ├── three.r83.min.js │ ├── three.r86.custom.js │ ├── three.r86.custom.min.js │ ├── three.r86.js │ └── three.r86.min.js ├── package.json ├── reference ├── action │ ├── action-method.json │ ├── action-property.json │ ├── action-target.json │ └── action.json ├── animation │ └── animation-track-easing.json ├── audio │ ├── audio-volume.json │ └── audio.json ├── camera │ ├── camera-gaze-ring.json │ ├── camera-gaze.json │ ├── camera-value.json │ └── camera.json ├── controller │ ├── controller-gamepad-axis-binding-event.json │ ├── controller-gamepad-axis-binding.json │ ├── controller-gamepad-binding.json │ ├── controller-gamepad-button-binding-events.json │ ├── controller-gamepad-button-binding.json │ ├── controller-gamepad.json │ ├── controller-instance.json │ ├── controller-keyboard-binding-events.json │ ├── controller-keyboard-binding.json │ ├── controller-keyboard.json │ ├── controller-options-orientation-invert.json │ ├── controller-options-orientation.json │ ├── controller-options-zoom.json │ ├── controller-pointer.json │ └── controllers.json ├── director │ ├── director-animation.json │ ├── director-track-keyframe-data.json │ ├── director-track-keyframe.json │ ├── director-track.json │ └── director.json ├── display │ ├── sprite-animation.json │ ├── sprite.json │ └── video.json ├── group │ └── group.json ├── history │ └── history.json ├── hotspot │ ├── hotspot-anim.json │ ├── hotspot-animation.json │ ├── hotspot-dom-offset.json │ ├── hotspot-dom.json │ ├── hotspot-events.json │ ├── hotspot-geometry-offset.json │ ├── hotspot-geometry.json │ ├── hotspot-material.json │ ├── hotspot-state.json │ ├── hotspot-states.json │ ├── hotspot-track-keyframe.json │ ├── hotspot-track.json │ ├── hotspot-transform-position.json │ ├── hotspot-transform-rotation.json │ ├── hotspot-transform-scale.json │ ├── hotspot-transform.json │ └── hotspot.json ├── i18n │ ├── i18n-locale-files.json │ ├── i18n-locale.json │ └── i18n.json ├── playlist │ ├── playlist-config.json │ ├── playlist-track.json │ └── playlist.json ├── plugin │ ├── plugin-configuration.json │ ├── plugin-engine.json │ ├── plugin-instance.json │ └── plugin.json ├── postprocessing │ ├── postprocessing-fx.json │ ├── postprocessing-set.json │ └── postprocessing.json ├── root.json ├── scene │ ├── scene-events.json │ ├── scene-media-events.json │ ├── scene-media-fov.json │ ├── scene-media-level.json │ ├── scene-media-options.json │ ├── scene-media-preview.json │ ├── scene-media-range.json │ ├── scene-media-source.json │ ├── scene-media.json │ ├── scene-thumbnail.json │ └── scene.json ├── sound │ ├── sound-options.json │ ├── sound-source.json │ ├── sound-volume.json │ └── sound.json ├── story │ ├── story-events.json │ └── story.json ├── view │ ├── view-options.json │ └── view.json └── viewer │ ├── viewer-webgl.json │ └── viewer.json ├── src ├── 3d │ ├── Object3D.js │ ├── ObjectRenderer.js │ ├── PickingDrawPass.js │ ├── PickingManager.js │ ├── Raycaster.js │ └── Tile.js ├── FORGE.js ├── actions │ ├── Action.js │ ├── ActionEventDispatcher.js │ └── ActionManager.js ├── audio │ ├── Playlist.js │ ├── PlaylistManager.js │ ├── PlaylistTrack.js │ ├── Sound.js │ ├── SoundManager.js │ └── SoundType.js ├── camera │ ├── Camera.js │ ├── CameraAnimation.js │ └── CameraGaze.js ├── controllers │ ├── ControllerBase.js │ ├── ControllerGamepad.js │ ├── ControllerGyroscope.js │ ├── ControllerKeyboard.js │ ├── ControllerManager.js │ ├── ControllerPointer.js │ └── ControllerType.js ├── core │ ├── BaseObject.js │ ├── Tags.js │ ├── Uid.js │ └── Viewer.js ├── director │ ├── Director.js │ └── DirectorTrack.js ├── display │ ├── DisplayList.js │ ├── DisplayObject.js │ ├── DisplayObjectContainer.js │ ├── components │ │ ├── Button.js │ │ ├── ButtonSkin.js │ │ ├── Canvas.js │ │ ├── Iframe.js │ │ └── TextField.js │ ├── image │ │ └── Image.js │ ├── sprite │ │ ├── Sprite.js │ │ ├── SpriteAnimation.js │ │ └── SpriteAnimationManager.js │ └── video │ │ ├── VideoBase.js │ │ ├── VideoDash.js │ │ ├── VideoFormat.js │ │ ├── VideoHTML5.js │ │ ├── VideoQuality.js │ │ ├── VideoQualityMode.js │ │ └── VideoTimeRanges.js ├── event │ ├── Event.js │ ├── EventDispatcher.js │ └── Listener.js ├── geom │ ├── Rectangle.js │ └── Size.js ├── hotspots │ ├── Hotspot3D.js │ ├── HotspotAnimation.js │ ├── HotspotAnimationTrack.js │ ├── HotspotDOM.js │ ├── HotspotGeometry.js │ ├── HotspotGeometryType.js │ ├── HotspotManager.js │ ├── HotspotMaterial.js │ ├── HotspotSound.js │ ├── HotspotStates.js │ ├── HotspotTransform.js │ ├── HotspotTransformValues.js │ └── HotspotType.js ├── i18n │ ├── Locale.js │ ├── LocaleManager.js │ └── LocaleString.js ├── input │ ├── Drag.js │ ├── Gamepad.js │ ├── GamepadsManager.js │ ├── Gyroscope.js │ ├── Keyboard.js │ ├── Pointer.js │ └── binding │ │ ├── AxisBinding.js │ │ ├── BaseBinding.js │ │ ├── ButtonBinding.js │ │ └── KeyBinding.js ├── loader │ ├── Cache.js │ ├── File.js │ └── Loader.js ├── math │ ├── Math.js │ └── Quaternion.js ├── media │ ├── Media.js │ ├── MediaFormat.js │ ├── MediaStore.js │ ├── MediaTexture.js │ └── MediaType.js ├── plugin │ ├── Plugin.js │ ├── PluginEngine.js │ ├── PluginManager.js │ └── PluginObjectFactory.js ├── render │ ├── RenderDisplay.js │ ├── RenderManager.js │ ├── RenderParams.js │ ├── RenderPipeline.js │ ├── RenderScene.js │ ├── background │ │ ├── BackgroundMeshRenderer.js │ │ ├── BackgroundPyramidRenderer.js │ │ ├── BackgroundRenderer.js │ │ ├── BackgroundShaderRenderer.js │ │ └── BackgroundType.js │ ├── postProcessing │ │ ├── AdditionPass.js │ │ ├── EffectComposer.js │ │ ├── EffectComposerType.js │ │ ├── PassPosition.js │ │ ├── PostProcessing.js │ │ ├── RenderPass.js │ │ ├── ShaderPass.js │ │ └── TexturePass.js │ ├── shader │ │ ├── ShaderChunk.js │ │ ├── ShaderChunk │ │ │ ├── common │ │ │ │ ├── coordinates.glsl │ │ │ │ ├── defines.glsl │ │ │ │ ├── helpers.glsl │ │ │ │ ├── texcoords.glsl │ │ │ │ ├── uniforms.glsl │ │ │ │ ├── vert_attributes.glsl │ │ │ │ └── vert_attributes_wireframe.glsl │ │ │ ├── screenToWorld │ │ │ │ ├── stw_frag_proj_flat.glsl │ │ │ │ ├── stw_frag_proj_gopro.glsl │ │ │ │ ├── stw_frag_proj_rectilinear.glsl │ │ │ │ └── stw_vert_proj.glsl │ │ │ └── worldToScreen │ │ │ │ ├── wts_frag.glsl │ │ │ │ ├── wts_frag_addition.glsl │ │ │ │ ├── wts_frag_color.glsl │ │ │ │ ├── wts_frag_wireframe.glsl │ │ │ │ ├── wts_vert_gopro.glsl │ │ │ │ ├── wts_vert_gopro_wireframe.glsl │ │ │ │ ├── wts_vert_rectilinear.glsl │ │ │ │ └── wts_vert_rectilinear_wireframe.glsl │ │ └── ShaderLib.js │ └── view │ │ ├── ViewBase.js │ │ ├── ViewFlat.js │ │ ├── ViewGoPro.js │ │ ├── ViewManager.js │ │ ├── ViewRectilinear.js │ │ └── ViewType.js ├── story │ ├── Group.js │ ├── Scene.js │ └── Story.js ├── system │ ├── Device.js │ ├── History.js │ ├── RequestAnimationFrame.js │ └── System.js ├── time │ ├── Clock.js │ ├── Timer.js │ └── TimerEvent.js ├── timeline │ ├── Animation.js │ ├── Keyframe.js │ ├── MetaAnimation.js │ ├── Timeline.js │ └── Track.js ├── tween │ ├── Easing.js │ ├── EasingType.js │ ├── Tween.js │ └── TweenManager.js └── utils │ ├── Collection.js │ ├── Color.js │ ├── ColorRGBA.js │ ├── Dom.js │ ├── Map.js │ ├── URL.js │ └── Utils.js ├── test ├── hotspots │ └── HotspotManager.spec.js ├── karma.conf.js ├── math │ └── Math.spec.js ├── system │ └── Device.spec.js ├── utils │ └── Utils.spec.js └── view │ ├── ViewGoPro.spec.js │ └── ViewRectilinear.spec.js └── tools ├── changelog ├── 0.2.0.md ├── 0.9.0.md ├── 0.9.1.md ├── 0.9.2.md ├── 0.9.3.md ├── 0.9.4.md ├── 0.9.5.md └── 0.9.6.md ├── electron ├── README.md ├── main.js └── package.json ├── gruntTasks ├── closureExport.js ├── duplicateForMinification.js ├── externsGeneration.js └── reference.js ├── jsdoc ├── jsdoc.conf.json └── template │ └── gopro │ ├── publish.js │ ├── static │ ├── fonts │ │ └── pfdintextpro │ │ │ ├── generator_config.txt │ │ │ ├── pfdintextpro-bold-demo.html │ │ │ ├── pfdintextpro-bold-webfont.eot │ │ │ ├── pfdintextpro-bold-webfont.svg │ │ │ ├── pfdintextpro-bold-webfont.ttf │ │ │ ├── pfdintextpro-bold-webfont.woff │ │ │ ├── pfdintextpro-bold-webfont.woff2 │ │ │ ├── pfdintextpro-boldital-demo.html │ │ │ ├── pfdintextpro-boldital-webfont.eot │ │ │ ├── pfdintextpro-boldital-webfont.svg │ │ │ ├── pfdintextpro-boldital-webfont.ttf │ │ │ ├── pfdintextpro-boldital-webfont.woff │ │ │ ├── pfdintextpro-boldital-webfont.woff2 │ │ │ ├── pfdintextpro-hairline-demo.html │ │ │ ├── pfdintextpro-hairline-webfont.eot │ │ │ ├── pfdintextpro-hairline-webfont.svg │ │ │ ├── pfdintextpro-hairline-webfont.ttf │ │ │ ├── pfdintextpro-hairline-webfont.woff │ │ │ ├── pfdintextpro-hairline-webfont.woff2 │ │ │ ├── pfdintextpro-italic-demo.html │ │ │ ├── pfdintextpro-italic-webfont.eot │ │ │ ├── pfdintextpro-italic-webfont.svg │ │ │ ├── pfdintextpro-italic-webfont.ttf │ │ │ ├── pfdintextpro-italic-webfont.woff │ │ │ ├── pfdintextpro-italic-webfont.woff2 │ │ │ ├── pfdintextpro-light-demo.html │ │ │ ├── pfdintextpro-light-webfont.eot │ │ │ ├── pfdintextpro-light-webfont.svg │ │ │ ├── pfdintextpro-light-webfont.ttf │ │ │ ├── pfdintextpro-light-webfont.woff │ │ │ ├── pfdintextpro-light-webfont.woff2 │ │ │ ├── pfdintextpro-lightitalic-demo.html │ │ │ ├── pfdintextpro-lightitalic-webfont.eot │ │ │ ├── pfdintextpro-lightitalic-webfont.svg │ │ │ ├── pfdintextpro-lightitalic-webfont.ttf │ │ │ ├── pfdintextpro-lightitalic-webfont.woff │ │ │ ├── pfdintextpro-lightitalic-webfont.woff2 │ │ │ ├── pfdintextpro-meditalic-demo.html │ │ │ ├── pfdintextpro-meditalic-webfont.eot │ │ │ ├── pfdintextpro-meditalic-webfont.svg │ │ │ ├── pfdintextpro-meditalic-webfont.ttf │ │ │ ├── pfdintextpro-meditalic-webfont.woff │ │ │ ├── pfdintextpro-meditalic-webfont.woff2 │ │ │ ├── pfdintextpro-medium-demo.html │ │ │ ├── pfdintextpro-medium-webfont.eot │ │ │ ├── pfdintextpro-medium-webfont.svg │ │ │ ├── pfdintextpro-medium-webfont.ttf │ │ │ ├── pfdintextpro-medium-webfont.woff │ │ │ ├── pfdintextpro-medium-webfont.woff2 │ │ │ ├── pfdintextpro-regular-demo.html │ │ │ ├── pfdintextpro-regular-webfont.eot │ │ │ ├── pfdintextpro-regular-webfont.svg │ │ │ ├── pfdintextpro-regular-webfont.ttf │ │ │ ├── pfdintextpro-regular-webfont.woff │ │ │ ├── pfdintextpro-regular-webfont.woff2 │ │ │ ├── pfdintextpro-thin-demo.html │ │ │ ├── pfdintextpro-thin-webfont.eot │ │ │ ├── pfdintextpro-thin-webfont.svg │ │ │ ├── pfdintextpro-thin-webfont.ttf │ │ │ ├── pfdintextpro-thin-webfont.woff │ │ │ ├── pfdintextpro-thin-webfont.woff2 │ │ │ ├── pfdintextpro-thinitalic-demo.html │ │ │ ├── pfdintextpro-thinitalic-webfont.eot │ │ │ ├── pfdintextpro-thinitalic-webfont.svg │ │ │ ├── pfdintextpro-thinitalic-webfont.ttf │ │ │ ├── pfdintextpro-thinitalic-webfont.woff │ │ │ ├── pfdintextpro-thinitalic-webfont.woff2 │ │ │ ├── pfdintextpro-xblack-demo.html │ │ │ ├── pfdintextpro-xblack-webfont.eot │ │ │ ├── pfdintextpro-xblack-webfont.svg │ │ │ ├── pfdintextpro-xblack-webfont.ttf │ │ │ ├── pfdintextpro-xblack-webfont.woff │ │ │ ├── pfdintextpro-xblack-webfont.woff2 │ │ │ ├── specimen_files │ │ │ ├── grid_12-825-55-15.css │ │ │ └── specimen_stylesheet.css │ │ │ └── stylesheet.css │ ├── images │ │ └── forge.png │ ├── scripts │ │ ├── jquery-2.1.4.min.js │ │ ├── linenumber.js │ │ ├── prettify │ │ │ ├── Apache-License-2.0.txt │ │ │ ├── lang-css.js │ │ │ └── prettify.js │ │ └── template-script.js │ └── styles │ │ ├── gopro.css │ │ ├── prettify-jsdoc.css │ │ └── prettify-tomorrow.css │ └── tmpl │ ├── augments.tmpl │ ├── container.tmpl │ ├── details.tmpl │ ├── example.tmpl │ ├── examples.tmpl │ ├── exceptions.tmpl │ ├── layout.tmpl │ ├── mainpage.tmpl │ ├── members.tmpl │ ├── method.tmpl │ ├── params.tmpl │ ├── properties.tmpl │ ├── quicknav.tmpl │ ├── returns.tmpl │ ├── source.tmpl │ ├── tutorial.tmpl │ └── type.tmpl └── reference ├── pages.json ├── static ├── forge-iframe.css ├── forge.css └── forge.png └── templates ├── base.handlebars ├── footer.handlebars ├── header.handlebars ├── object-definition.handlebars ├── object-footer.handlebars ├── object-header.handlebars └── sidebar.handlebars /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | #### Description of the problem 7 | 8 | 9 | 10 | 11 | ##### ForgeJS version 12 | 13 | 14 | 15 | 0.2.0, 0.3.0, devel... 16 | 17 | ##### Browser 18 | 19 | 20 | 21 | - [x] All of them 22 | - [ ] Chrome 23 | - [ ] Firefox 24 | - [ ] Internet Explorer 25 | 26 | ##### OS 27 | 28 | 29 | 30 | - [x] All of them 31 | - [ ] Windows 32 | - [ ] macOS 33 | - [ ] Linux 34 | - [ ] Android 35 | - [ ] iOS 36 | 37 | #### How to reproduce the problem 38 | 39 | 40 | 41 | 42 | - Step 1 43 | - Step 2 44 | - Step 3 45 | - Step 4 46 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | #Binary files extensions 2 | *.sh 3 | *.zip 4 | *.mp4 5 | *.webm 6 | *.xls 7 | 8 | #Node packages 9 | **/node_modules 10 | 11 | # Files that changes at build time, no need to commit them 12 | build/ 13 | 14 | #documentation 15 | doc/ 16 | 17 | # Others 18 | .DS_Store 19 | **/.DS_Store 20 | .dropbox 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | # ForgeJS Authors List 2 | 3 | ##### Please add entries to the bottom of the list in the following format 4 | * `@GitHub UserName (Required) - [Name and/or Organization](link)` 5 | 6 | # Authors 7 | * @rroux-gpsw - [GoPro, Inc.](https://forgejs.org) 8 | * @ygilquin-gpsw - [GoPro, Inc.](https://forgejs.org) 9 | * @bbaudel-gpsw - [GoPro, Inc.](https://forgejs.org) 10 | * @aberthet-gpsw - [GoPro, Inc.](https://forgejs.org) 11 | 12 | -------------------------------------------------------------------------------- /externs/forge/animation.ext.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @typedef {{method:string, args:(Arguments|Array)}} 3 | * @name AnimationConfiguration 4 | * @property {string} method - name of the method 5 | * @property {Array} args - an array containing the configuration of the animation 6 | */ 7 | var AnimationConfiguration; 8 | -------------------------------------------------------------------------------- /externs/forge/camera.ext.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @typedef {{min:number, max:number}} 3 | * @name CameraBoundaries 4 | * @property {number} max 5 | * @property {number} min 6 | */ 7 | var CameraBoundaries; 8 | 9 | /** 10 | * @typedef {{yaw:boolean, pitch:boolean, roll:boolean, fov:boolean}} 11 | * @name CameraBoundaries 12 | * @property {boolean} yaw 13 | * @property {boolean} pitch 14 | * @property {boolean} roll 15 | * @property {boolean} fov 16 | */ 17 | var CameraChangelog; 18 | -------------------------------------------------------------------------------- /externs/forge/color.ext.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @typedef {{r:(number|undefined), g:(number|undefined), b:(number|undefined), a:(number|undefined)}} 3 | * @name RGBColor 4 | * @property {number} r - red 5 | * @property {number} g - green 6 | * @property {number} b - blue 7 | * @property {number=} a - alpha 8 | */ 9 | var RGBaColor; 10 | 11 | /** 12 | * @typedef {{h:(number|undefined), s:(number|undefined), l:(number|undefined)}} 13 | * @name HSLColor 14 | * @property {number} h - hue 15 | * @property {number} s - saturation 16 | * @property {number} l - lightness 17 | */ 18 | var HSLColor; 19 | 20 | /** 21 | * @typedef {{h:(number|undefined), s:(number|undefined), v:(number|undefined)}} 22 | * @name HSVColor 23 | * @property {number} h - hue 24 | * @property {number} s - saturation 25 | * @property {number} v - value 26 | */ 27 | var HSVColor; 28 | 29 | /** 30 | * @typedef {{Y:(number|undefined), Cb:(number|undefined), Cr:(number|undefined)}} 31 | * @name YCbCrColor 32 | * @property {number} Y - red 33 | * @property {number} Cb - green 34 | * @property {number} Cr - blue 35 | */ 36 | var YCbCrColor; -------------------------------------------------------------------------------- /externs/forge/core.ext.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @typedef {{boot:function(), update:function(), beforeRender:function(), afterRender:function()}} 3 | * @name ViewerCallbacks 4 | * @property {function} boot 5 | * @property {function} update 6 | * @property {function} beforeRender 7 | * @property {function} afterRender 8 | */ 9 | var ViewerCallbacks; -------------------------------------------------------------------------------- /externs/forge/device.ext.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @typedef{{alpha:(number|undefined), beta:(number|undefined), gamma:(number|undefined)}} 3 | */ 4 | var DeviceOrientation; 5 | -------------------------------------------------------------------------------- /externs/forge/math.ext.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @typedef {{yaw:number, pitch:number, roll:number}} 3 | * @name TEuler 4 | * @property {number} yaw - yaw euler angle (y axis) [radians] 5 | * @property {number} pitch - pitch euler angle (x axis) [radians] 6 | * @property {number} roll - roll euler angle (z axis) [radians] 7 | */ 8 | var TEuler; 9 | 10 | /** 11 | * @typedef {{x:number, y:number, z:number}} 12 | */ 13 | var CartesianCoordinates; 14 | 15 | /** 16 | * @typedef {{radius:number, theta:number, phi:number}} 17 | */ 18 | var SphericalCoordinates; 19 | -------------------------------------------------------------------------------- /externs/forge/story.ext.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * @typedef {{sceneUid:(string|undefined), groupUid:(string|undefined)}} 4 | * @name StoryEvent 5 | * @property {string=} sceneUid 6 | * @property {string=} groupUid 7 | */ 8 | var StoryEvent; 9 | -------------------------------------------------------------------------------- /externs/forge/timeline.ext.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @typedef {{previous:number, next:number}} 3 | * @name TimelinePrevNextIndexes 4 | * @property {number} previous 5 | * @property {number} next 6 | */ 7 | var TimelinePrevNextIndexes; 8 | 9 | /** 10 | * @typedef {{previous:?$_Keyframe, next:?$_Keyframe}} 11 | * @name TimelinePrevNext 12 | * @property {?FORGE.Keyframe} previous 13 | * @property {?FORGE.Keyframe} next 14 | */ 15 | var TimelinePrevNext; 16 | 17 | /** 18 | * @typedef {{prop:(string|Array), smooth:boolean, additional:(Function|undefined), cancelRoll:(boolean|undefined)}} 19 | * @name AnimationInstruction 20 | * @property {string|Array} prop - The name or list of the prop to animate 21 | * @property {boolean} smooth - Is the animation smooth or linear ? 22 | */ 23 | var AnimationInstruction; 24 | -------------------------------------------------------------------------------- /externs/forge/tween.ext.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @typedef {{name:string, min:(string|number|null), max:(string|number|null), duration:number, easing:(function()|null), started:boolean, complete:boolean, startTime:(number|null)}} 3 | * @name TweenProperties 4 | * @property {string} name 5 | * @property {?(string|number)} min 6 | * @property {?(string|number)} max 7 | * @property {number} duration 8 | * @property {?function} easing 9 | * @property {boolean} started 10 | * @property {boolean} complete 11 | * @property {?number} startTime 12 | */ 13 | var TweenProperties; -------------------------------------------------------------------------------- /externs/forge/video.ext.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @typedef {{index:number, element:Object, buffer:Object, played:Object, requestCount:number, currentCount:number, abortCount:number, leaveCount:number, lastTimeStamp:number}} 3 | * @name VideoHTML5Object 4 | * @property {number} index 5 | * @property {Object} element 6 | * @property {Object} buffer 7 | * @property {Object} played 8 | * @property {number} requestCount 9 | * @property {number} currentCount 10 | * @property {number} abortCount 11 | * @property {number} leaveCount 12 | * @property {number} lastTimeStamp 13 | */ 14 | var VideoHTML5Object; 15 | 16 | 17 | /** 18 | * @typedef {{start:number,end:number}} 19 | * @name VideoTimeRangeObject 20 | * @property {number} start - The start of the time range 21 | * @property {number} end - The end of the time range 22 | */ 23 | var VideoTimeRangeObject; -------------------------------------------------------------------------------- /externs/lib/w3c.gamepad-extension.ext.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Externs file for the Gamepad API extension, as it is a working draft and not implemented in 3 | * the Closure Compiler. 4 | * https://w3c.github.io/gamepad/extensions.html 5 | */ 6 | 7 | /** 8 | * @constructor 9 | * @return {GamepadHapticActuator} 10 | */ 11 | var GamepadHapticActuator = function() {}; 12 | 13 | /** @type {string} */ 14 | GamepadHapticActuator.prototype.type; 15 | 16 | /** 17 | * @param {number} value 18 | * @param {number} duration 19 | * @return {Promise} 20 | */ 21 | GamepadHapticActuator.prototype.pulse = function(value, duration) {}; 22 | 23 | /** 24 | * @constructor 25 | * @return {GamepadPose} 26 | */ 27 | var GamepadPose = function() {}; 28 | 29 | /** @type {boolean} */ 30 | GamepadPose.prototype.hasOrientation; 31 | 32 | /** @type {boolean} */ 33 | GamepadPose.prototype.hasPosition; 34 | 35 | /** @type {?Float32Array} */ 36 | GamepadPose.prototype.position; 37 | 38 | /** @type {?Float32Array} */ 39 | GamepadPose.prototype.linearVelocity; 40 | 41 | /** @type {?Float32Array} */ 42 | GamepadPose.prototype.linearAcceleration; 43 | 44 | /** @type {?Float32Array} */ 45 | GamepadPose.prototype.orientation; 46 | 47 | /** @type {?Float32Array} */ 48 | GamepadPose.prototype.angularVelocity; 49 | 50 | /** @type {?Float32Array} */ 51 | GamepadPose.prototype.angularAcceleration; 52 | 53 | //// Partial interface 54 | 55 | /** @type {string} */ 56 | Gamepad.prototype.hand; 57 | 58 | /** @type {GamepadHapticActuator} */ 59 | Gamepad.prototype.hapticActuators; 60 | 61 | /** @type {?GamepadPose} */ 62 | Gamepad.prototype.pose; 63 | -------------------------------------------------------------------------------- /lib/dash.js/LICENSE.md: -------------------------------------------------------------------------------- 1 | # dash.js BSD License Agreement 2 | 3 | The copyright in this software is being made available under the BSD License, included below. This software may be subject to other third party and contributor rights, including patent rights, and no such rights are granted under this license. 4 | 5 | **Copyright (c) 2015, Dash Industry Forum. 6 | **All rights reserved.** 7 | 8 | * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 9 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 11 | * Neither the name of the Dash Industry Forum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 12 | 13 | **THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.** -------------------------------------------------------------------------------- /lib/hammer.js/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (C) 2011-2014 by Jorik Tangelder (Eight Media) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /lib/three.js/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright © 2010-2017 three.js authors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /lib/three.js/postprocessing/ClearPass.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author mrdoob / http://mrdoob.com/ 3 | */ 4 | 5 | THREE.ClearPass = function ( clearColor, clearAlpha ) { 6 | 7 | THREE.Pass.call( this ); 8 | 9 | this.needsSwap = false; 10 | 11 | this.clearColor = ( clearColor !== undefined ) ? clearColor : 0x000000; 12 | this.clearAlpha = ( clearAlpha !== undefined ) ? clearAlpha : 0; 13 | 14 | }; 15 | 16 | THREE.ClearPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), { 17 | 18 | constructor: THREE.ClearPass, 19 | 20 | render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) { 21 | 22 | var oldClearColor, oldClearAlpha; 23 | 24 | if ( this.clearColor ) { 25 | 26 | oldClearColor = renderer.getClearColor().getHex(); 27 | oldClearAlpha = renderer.getClearAlpha(); 28 | 29 | renderer.setClearColor( this.clearColor, this.clearAlpha ); 30 | 31 | } 32 | 33 | renderer.setRenderTarget( this.renderToScreen ? null : readBuffer ); 34 | renderer.clear(); 35 | 36 | if ( this.clearColor ) { 37 | 38 | renderer.setClearColor( oldClearColor, oldClearAlpha ); 39 | 40 | } 41 | 42 | } 43 | 44 | } ); 45 | -------------------------------------------------------------------------------- /lib/three.js/postprocessing/CubeTexturePass.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author bhouston / http://clara.io/ 3 | */ 4 | 5 | THREE.CubeTexturePass = function ( camera, envMap, opacity ) { 6 | 7 | THREE.Pass.call( this ); 8 | 9 | this.camera = camera; 10 | 11 | this.needsSwap = false; 12 | 13 | this.cubeShader = THREE.ShaderLib[ 'cube' ]; 14 | this.cubeMesh = new THREE.Mesh( 15 | new THREE.BoxBufferGeometry( 10, 10, 10 ), 16 | new THREE.ShaderMaterial( { 17 | uniforms: this.cubeShader.uniforms, 18 | vertexShader: this.cubeShader.vertexShader, 19 | fragmentShader: this.cubeShader.fragmentShader, 20 | depthTest: false, 21 | depthWrite: false, 22 | side: THREE.BackSide 23 | } ) 24 | ); 25 | 26 | this.envMap = envMap; 27 | this.opacity = ( opacity !== undefined ) ? opacity : 1.0; 28 | 29 | this.cubeScene = new THREE.Scene(); 30 | this.cubeCamera = new THREE.PerspectiveCamera(); 31 | this.cubeScene.add( this.cubeMesh ); 32 | 33 | }; 34 | 35 | THREE.CubeTexturePass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), { 36 | 37 | constructor: THREE.CubeTexturePass, 38 | 39 | render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) { 40 | 41 | var oldAutoClear = renderer.autoClear; 42 | renderer.autoClear = false; 43 | 44 | this.cubeCamera.projectionMatrix.copy( this.camera.projectionMatrix ); 45 | this.cubeCamera.quaternion.setFromRotationMatrix( this.camera.matrixWorld ); 46 | 47 | this.cubeMesh.material.uniforms[ "tCube" ].value = this.envMap; 48 | this.cubeMesh.material.uniforms[ "opacity" ].value = this.opacity; 49 | this.cubeMesh.material.transparent = ( this.opacity < 1.0 ); 50 | 51 | renderer.render( this.cubeScene, this.cubeCamera, this.renderToScreen ? null : readBuffer, this.clear ); 52 | 53 | renderer.autoClear = oldAutoClear; 54 | 55 | } 56 | 57 | } ); 58 | -------------------------------------------------------------------------------- /lib/three.js/postprocessing/DotScreenPass.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | */ 4 | 5 | THREE.DotScreenPass = function ( center, angle, scale ) { 6 | 7 | THREE.Pass.call( this ); 8 | 9 | if ( THREE.DotScreenShader === undefined ) 10 | console.error( "THREE.DotScreenPass relies on THREE.DotScreenShader" ); 11 | 12 | var shader = THREE.DotScreenShader; 13 | 14 | this.uniforms = THREE.UniformsUtils.clone( shader.uniforms ); 15 | 16 | if ( center !== undefined ) this.uniforms[ "center" ].value.copy( center ); 17 | if ( angle !== undefined ) this.uniforms[ "angle" ].value = angle; 18 | if ( scale !== undefined ) this.uniforms[ "scale" ].value = scale; 19 | 20 | this.material = new THREE.ShaderMaterial( { 21 | 22 | uniforms: this.uniforms, 23 | vertexShader: shader.vertexShader, 24 | fragmentShader: shader.fragmentShader 25 | 26 | } ); 27 | 28 | this.camera = new THREE.OrthographicCamera( - 1, 1, 1, - 1, 0, 1 ); 29 | this.scene = new THREE.Scene(); 30 | 31 | this.quad = new THREE.Mesh( new THREE.PlaneBufferGeometry( 2, 2 ), null ); 32 | this.scene.add( this.quad ); 33 | 34 | }; 35 | 36 | THREE.DotScreenPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), { 37 | 38 | constructor: THREE.DotScreenPass, 39 | 40 | render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) { 41 | 42 | this.uniforms[ "tDiffuse" ].value = readBuffer.texture; 43 | this.uniforms[ "tSize" ].value.set( readBuffer.width, readBuffer.height ); 44 | 45 | this.quad.material = this.material; 46 | 47 | if ( this.renderToScreen ) { 48 | 49 | renderer.render( this.scene, this.camera ); 50 | 51 | } else { 52 | 53 | renderer.render( this.scene, this.camera, writeBuffer, this.clear ); 54 | 55 | } 56 | 57 | } 58 | 59 | } ); 60 | -------------------------------------------------------------------------------- /lib/three.js/postprocessing/FilmPass.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | */ 4 | 5 | THREE.FilmPass = function ( noiseIntensity, scanlinesIntensity, scanlinesCount, grayscale ) { 6 | 7 | THREE.Pass.call( this ); 8 | 9 | if ( THREE.FilmShader === undefined ) 10 | console.error( "THREE.FilmPass relies on THREE.FilmShader" ); 11 | 12 | var shader = THREE.FilmShader; 13 | 14 | this.uniforms = THREE.UniformsUtils.clone( shader.uniforms ); 15 | 16 | this.material = new THREE.ShaderMaterial( { 17 | 18 | uniforms: this.uniforms, 19 | vertexShader: shader.vertexShader, 20 | fragmentShader: shader.fragmentShader 21 | 22 | } ); 23 | 24 | if ( grayscale !== undefined ) this.uniforms.grayscale.value = grayscale; 25 | if ( noiseIntensity !== undefined ) this.uniforms.nIntensity.value = noiseIntensity; 26 | if ( scanlinesIntensity !== undefined ) this.uniforms.sIntensity.value = scanlinesIntensity; 27 | if ( scanlinesCount !== undefined ) this.uniforms.sCount.value = scanlinesCount; 28 | 29 | this.camera = new THREE.OrthographicCamera( - 1, 1, 1, - 1, 0, 1 ); 30 | this.scene = new THREE.Scene(); 31 | 32 | this.quad = new THREE.Mesh( new THREE.PlaneBufferGeometry( 2, 2 ), null ); 33 | this.scene.add( this.quad ); 34 | 35 | }; 36 | 37 | THREE.FilmPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), { 38 | 39 | constructor: THREE.FilmPass, 40 | 41 | render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) { 42 | 43 | this.uniforms[ "tDiffuse" ].value = readBuffer.texture; 44 | this.uniforms[ "time" ].value += delta; 45 | 46 | this.quad.material = this.material; 47 | 48 | if ( this.renderToScreen ) { 49 | 50 | renderer.render( this.scene, this.camera ); 51 | 52 | } else { 53 | 54 | renderer.render( this.scene, this.camera, writeBuffer, this.clear ); 55 | 56 | } 57 | 58 | } 59 | 60 | } ); 61 | -------------------------------------------------------------------------------- /lib/three.js/postprocessing/RenderPass.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | */ 4 | 5 | THREE.RenderPass = function ( scene, camera, overrideMaterial, clearColor, clearAlpha ) { 6 | 7 | THREE.Pass.call( this ); 8 | 9 | this.scene = scene; 10 | this.camera = camera; 11 | 12 | this.overrideMaterial = overrideMaterial; 13 | 14 | this.clearColor = clearColor; 15 | this.clearAlpha = ( clearAlpha !== undefined ) ? clearAlpha : 0; 16 | 17 | this.clear = true; 18 | this.clearDepth = false; 19 | this.needsSwap = false; 20 | 21 | }; 22 | 23 | THREE.RenderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), { 24 | 25 | constructor: THREE.RenderPass, 26 | 27 | render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) { 28 | 29 | var oldAutoClear = renderer.autoClear; 30 | renderer.autoClear = false; 31 | 32 | this.scene.overrideMaterial = this.overrideMaterial; 33 | 34 | var oldClearColor, oldClearAlpha; 35 | 36 | if ( this.clearColor ) { 37 | 38 | oldClearColor = renderer.getClearColor().getHex(); 39 | oldClearAlpha = renderer.getClearAlpha(); 40 | 41 | renderer.setClearColor( this.clearColor, this.clearAlpha ); 42 | 43 | } 44 | 45 | if ( this.clearDepth ) { 46 | 47 | renderer.clearDepth(); 48 | 49 | } 50 | 51 | renderer.render( this.scene, this.camera, this.renderToScreen ? null : readBuffer, this.clear ); 52 | 53 | if ( this.clearColor ) { 54 | 55 | renderer.setClearColor( oldClearColor, oldClearAlpha ); 56 | 57 | } 58 | 59 | this.scene.overrideMaterial = null; 60 | renderer.autoClear = oldAutoClear; 61 | } 62 | 63 | } ); 64 | -------------------------------------------------------------------------------- /lib/three.js/postprocessing/SavePass.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | */ 4 | 5 | THREE.SavePass = function ( renderTarget ) { 6 | 7 | THREE.Pass.call( this ); 8 | 9 | if ( THREE.CopyShader === undefined ) 10 | console.error( "THREE.SavePass relies on THREE.CopyShader" ); 11 | 12 | var shader = THREE.CopyShader; 13 | 14 | this.textureID = "tDiffuse"; 15 | 16 | this.uniforms = THREE.UniformsUtils.clone( shader.uniforms ); 17 | 18 | this.material = new THREE.ShaderMaterial( { 19 | 20 | uniforms: this.uniforms, 21 | vertexShader: shader.vertexShader, 22 | fragmentShader: shader.fragmentShader 23 | 24 | } ); 25 | 26 | this.renderTarget = renderTarget; 27 | 28 | if ( this.renderTarget === undefined ) { 29 | 30 | this.renderTargetParameters = { minFilter: THREE.LinearFilter, magFilter: THREE.LinearFilter, format: THREE.RGBFormat, stencilBuffer: false }; 31 | this.renderTarget = new THREE.WebGLRenderTarget( window.innerWidth, window.innerHeight, this.renderTargetParameters ); 32 | 33 | } 34 | 35 | this.needsSwap = false; 36 | 37 | this.camera = new THREE.OrthographicCamera( - 1, 1, 1, - 1, 0, 1 ); 38 | this.scene = new THREE.Scene(); 39 | 40 | this.quad = new THREE.Mesh( new THREE.PlaneBufferGeometry( 2, 2 ), null ); 41 | this.scene.add( this.quad ); 42 | 43 | }; 44 | 45 | THREE.SavePass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), { 46 | 47 | constructor: THREE.SavePass, 48 | 49 | render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) { 50 | 51 | if ( this.uniforms[ this.textureID ] ) { 52 | 53 | this.uniforms[ this.textureID ].value = readBuffer.texture; 54 | 55 | } 56 | 57 | this.quad.material = this.material; 58 | 59 | renderer.render( this.scene, this.camera, this.renderTarget, this.clear ); 60 | 61 | } 62 | 63 | } ); 64 | -------------------------------------------------------------------------------- /lib/three.js/postprocessing/ShaderPass.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | */ 4 | 5 | THREE.ShaderPass = function ( shader, textureID ) { 6 | 7 | THREE.Pass.call( this ); 8 | 9 | this.textureID = ( textureID !== undefined ) ? textureID : "tDiffuse"; 10 | 11 | if ( shader instanceof THREE.ShaderMaterial ) { 12 | 13 | this.uniforms = shader.uniforms; 14 | 15 | this.material = shader; 16 | 17 | } else if ( shader ) { 18 | 19 | this.uniforms = THREE.UniformsUtils.clone( shader.uniforms ); 20 | 21 | this.material = new THREE.ShaderMaterial( { 22 | 23 | defines: shader.defines || {}, 24 | uniforms: this.uniforms, 25 | vertexShader: shader.vertexShader, 26 | fragmentShader: shader.fragmentShader 27 | 28 | } ); 29 | 30 | } 31 | 32 | this.camera = new THREE.OrthographicCamera( - 1, 1, 1, - 1, 0, 1 ); 33 | this.scene = new THREE.Scene(); 34 | 35 | this.quad = new THREE.Mesh( new THREE.PlaneBufferGeometry( 2, 2 ), null ); 36 | this.scene.add( this.quad ); 37 | 38 | }; 39 | 40 | THREE.ShaderPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), { 41 | 42 | constructor: THREE.ShaderPass, 43 | 44 | render: function( renderer, writeBuffer, readBuffer, delta, maskActive ) { 45 | 46 | if ( this.uniforms[ this.textureID ] ) { 47 | 48 | this.uniforms[ this.textureID ].value = readBuffer.texture; 49 | 50 | } 51 | 52 | this.quad.material = this.material; 53 | 54 | if ( this.renderToScreen ) { 55 | 56 | renderer.render( this.scene, this.camera ); 57 | 58 | } else { 59 | 60 | renderer.render( this.scene, this.camera, writeBuffer, this.clear ); 61 | 62 | } 63 | 64 | } 65 | 66 | } ); 67 | -------------------------------------------------------------------------------- /lib/three.js/postprocessing/TexturePass.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | */ 4 | 5 | THREE.TexturePass = function ( map, opacity ) { 6 | 7 | THREE.Pass.call( this ); 8 | 9 | if ( THREE.CopyShader === undefined ) 10 | console.error( "THREE.TexturePass relies on THREE.CopyShader" ); 11 | 12 | var shader = THREE.CopyShader; 13 | 14 | this.map = map; 15 | this.opacity = ( opacity !== undefined ) ? opacity : 1.0; 16 | 17 | this.uniforms = THREE.UniformsUtils.clone( shader.uniforms ); 18 | 19 | this.material = new THREE.ShaderMaterial( { 20 | 21 | uniforms: this.uniforms, 22 | vertexShader: shader.vertexShader, 23 | fragmentShader: shader.fragmentShader, 24 | depthTest: false, 25 | depthWrite: false 26 | 27 | } ); 28 | 29 | this.needsSwap = false; 30 | 31 | this.camera = new THREE.OrthographicCamera( - 1, 1, 1, - 1, 0, 1 ); 32 | this.scene = new THREE.Scene(); 33 | 34 | this.quad = new THREE.Mesh( new THREE.PlaneBufferGeometry( 2, 2 ), null ); 35 | this.scene.add( this.quad ); 36 | 37 | }; 38 | 39 | THREE.TexturePass.prototype = Object.assign( Object.create( THREE.Pass.prototype ), { 40 | 41 | constructor: THREE.TexturePass, 42 | 43 | render: function ( renderer, writeBuffer, readBuffer, delta, maskActive ) { 44 | 45 | var oldAutoClear = renderer.autoClear; 46 | renderer.autoClear = false; 47 | 48 | this.quad.material = this.material; 49 | 50 | this.uniforms[ "opacity" ].value = this.opacity; 51 | this.uniforms[ "tDiffuse" ].value = this.map; 52 | this.material.transparent = ( this.opacity < 1.0 ); 53 | 54 | renderer.render( this.scene, this.camera, this.renderToScreen ? null : readBuffer, this.clear ); 55 | 56 | renderer.autoClear = oldAutoClear; 57 | } 58 | 59 | } ); 60 | -------------------------------------------------------------------------------- /lib/three.js/shaders/BasicShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author mrdoob / http://www.mrdoob.com 3 | * 4 | * Simple test shader 5 | */ 6 | 7 | THREE.BasicShader = { 8 | 9 | uniforms: {}, 10 | 11 | vertexShader: [ 12 | 13 | "void main() {", 14 | 15 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 16 | 17 | "}" 18 | 19 | ].join( "\n" ), 20 | 21 | fragmentShader: [ 22 | 23 | "void main() {", 24 | 25 | "gl_FragColor = vec4( 1.0, 0.0, 0.0, 0.5 );", 26 | 27 | "}" 28 | 29 | ].join( "\n" ) 30 | 31 | }; 32 | -------------------------------------------------------------------------------- /lib/three.js/shaders/BleachBypassShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | * 4 | * Bleach bypass shader [http://en.wikipedia.org/wiki/Bleach_bypass] 5 | * - based on Nvidia example 6 | * http://developer.download.nvidia.com/shaderlibrary/webpages/shader_library.html#post_bleach_bypass 7 | */ 8 | 9 | THREE.BleachBypassShader = { 10 | 11 | uniforms: { 12 | 13 | "tDiffuse": { value: null }, 14 | "opacity": { value: 1.0 } 15 | 16 | }, 17 | 18 | vertexShader: [ 19 | 20 | "varying vec2 vUv;", 21 | 22 | "void main() {", 23 | 24 | "vUv = uv;", 25 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 26 | 27 | "}" 28 | 29 | ].join( "\n" ), 30 | 31 | fragmentShader: [ 32 | 33 | "uniform float opacity;", 34 | 35 | "uniform sampler2D tDiffuse;", 36 | 37 | "varying vec2 vUv;", 38 | 39 | "void main() {", 40 | 41 | "vec4 base = texture2D( tDiffuse, vUv );", 42 | 43 | "vec3 lumCoeff = vec3( 0.25, 0.65, 0.1 );", 44 | "float lum = dot( lumCoeff, base.rgb );", 45 | "vec3 blend = vec3( lum );", 46 | 47 | "float L = min( 1.0, max( 0.0, 10.0 * ( lum - 0.45 ) ) );", 48 | 49 | "vec3 result1 = 2.0 * base.rgb * blend;", 50 | "vec3 result2 = 1.0 - 2.0 * ( 1.0 - blend ) * ( 1.0 - base.rgb );", 51 | 52 | "vec3 newColor = mix( result1, result2, L );", 53 | 54 | "float A2 = opacity * base.a;", 55 | "vec3 mixRGB = A2 * newColor.rgb;", 56 | "mixRGB += ( ( 1.0 - A2 ) * base.rgb );", 57 | 58 | "gl_FragColor = vec4( mixRGB, base.a );", 59 | 60 | "}" 61 | 62 | ].join( "\n" ) 63 | 64 | }; 65 | -------------------------------------------------------------------------------- /lib/three.js/shaders/BlendShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | * 4 | * Blend two textures 5 | */ 6 | 7 | THREE.BlendShader = { 8 | 9 | uniforms: { 10 | 11 | "tDiffuse1": { value: null }, 12 | "tDiffuse2": { value: null }, 13 | "mixRatio": { value: 0.5 }, 14 | "opacity": { value: 1.0 } 15 | 16 | }, 17 | 18 | vertexShader: [ 19 | 20 | "varying vec2 vUv;", 21 | 22 | "void main() {", 23 | 24 | "vUv = uv;", 25 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 26 | 27 | "}" 28 | 29 | ].join( "\n" ), 30 | 31 | fragmentShader: [ 32 | 33 | "uniform float opacity;", 34 | "uniform float mixRatio;", 35 | 36 | "uniform sampler2D tDiffuse1;", 37 | "uniform sampler2D tDiffuse2;", 38 | 39 | "varying vec2 vUv;", 40 | 41 | "void main() {", 42 | 43 | "vec4 texel1 = texture2D( tDiffuse1, vUv );", 44 | "vec4 texel2 = texture2D( tDiffuse2, vUv );", 45 | "gl_FragColor = opacity * mix( texel1, texel2, mixRatio );", 46 | 47 | "}" 48 | 49 | ].join( "\n" ) 50 | 51 | }; 52 | -------------------------------------------------------------------------------- /lib/three.js/shaders/BrightnessContrastShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author tapio / http://tapio.github.com/ 3 | * 4 | * Brightness and contrast adjustment 5 | * https://github.com/evanw/glfx.js 6 | * brightness: -1 to 1 (-1 is solid black, 0 is no change, and 1 is solid white) 7 | * contrast: -1 to 1 (-1 is solid gray, 0 is no change, and 1 is maximum contrast) 8 | */ 9 | 10 | THREE.BrightnessContrastShader = { 11 | 12 | uniforms: { 13 | 14 | "tDiffuse": { value: null }, 15 | "brightness": { value: 0 }, 16 | "contrast": { value: 0 } 17 | 18 | }, 19 | 20 | vertexShader: [ 21 | 22 | "varying vec2 vUv;", 23 | 24 | "void main() {", 25 | 26 | "vUv = uv;", 27 | 28 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 29 | 30 | "}" 31 | 32 | ].join( "\n" ), 33 | 34 | fragmentShader: [ 35 | 36 | "uniform sampler2D tDiffuse;", 37 | "uniform float brightness;", 38 | "uniform float contrast;", 39 | 40 | "varying vec2 vUv;", 41 | 42 | "void main() {", 43 | 44 | "gl_FragColor = texture2D( tDiffuse, vUv );", 45 | 46 | "gl_FragColor.rgb += brightness;", 47 | 48 | "if (contrast > 0.0) {", 49 | "gl_FragColor.rgb = (gl_FragColor.rgb - 0.5) / (1.0 - contrast) + 0.5;", 50 | "} else {", 51 | "gl_FragColor.rgb = (gl_FragColor.rgb - 0.5) * (1.0 + contrast) + 0.5;", 52 | "}", 53 | 54 | "}" 55 | 56 | ].join( "\n" ) 57 | 58 | }; 59 | -------------------------------------------------------------------------------- /lib/three.js/shaders/ColorCorrectionShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | * 4 | * Color correction 5 | */ 6 | 7 | THREE.ColorCorrectionShader = { 8 | 9 | uniforms: { 10 | 11 | "tDiffuse": { value: null }, 12 | "powRGB": { value: new THREE.Vector3( 2, 2, 2 ) }, 13 | "mulRGB": { value: new THREE.Vector3( 1, 1, 1 ) }, 14 | "addRGB": { value: new THREE.Vector3( 0, 0, 0 ) } 15 | 16 | }, 17 | 18 | vertexShader: [ 19 | 20 | "varying vec2 vUv;", 21 | 22 | "void main() {", 23 | 24 | "vUv = uv;", 25 | 26 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 27 | 28 | "}" 29 | 30 | ].join( "\n" ), 31 | 32 | fragmentShader: [ 33 | 34 | "uniform sampler2D tDiffuse;", 35 | "uniform vec3 powRGB;", 36 | "uniform vec3 mulRGB;", 37 | "uniform vec3 addRGB;", 38 | 39 | "varying vec2 vUv;", 40 | 41 | "void main() {", 42 | 43 | "gl_FragColor = texture2D( tDiffuse, vUv );", 44 | "gl_FragColor.rgb = mulRGB * pow( ( gl_FragColor.rgb + addRGB ), powRGB );", 45 | 46 | "}" 47 | 48 | ].join( "\n" ) 49 | 50 | }; 51 | -------------------------------------------------------------------------------- /lib/three.js/shaders/ColorifyShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | * 4 | * Colorify shader 5 | */ 6 | 7 | THREE.ColorifyShader = { 8 | 9 | uniforms: { 10 | 11 | "tDiffuse": { value: null }, 12 | "color": { value: new THREE.Color( 0xffffff ) } 13 | 14 | }, 15 | 16 | vertexShader: [ 17 | 18 | "varying vec2 vUv;", 19 | 20 | "void main() {", 21 | 22 | "vUv = uv;", 23 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 24 | 25 | "}" 26 | 27 | ].join( "\n" ), 28 | 29 | fragmentShader: [ 30 | 31 | "uniform vec3 color;", 32 | "uniform sampler2D tDiffuse;", 33 | 34 | "varying vec2 vUv;", 35 | 36 | "void main() {", 37 | 38 | "vec4 texel = texture2D( tDiffuse, vUv );", 39 | 40 | "vec3 luma = vec3( 0.299, 0.587, 0.114 );", 41 | "float v = dot( texel.xyz, luma );", 42 | 43 | "gl_FragColor = vec4( v * color, texel.w );", 44 | 45 | "}" 46 | 47 | ].join( "\n" ) 48 | 49 | }; 50 | -------------------------------------------------------------------------------- /lib/three.js/shaders/CopyShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | * 4 | * Full-screen textured quad shader 5 | */ 6 | 7 | THREE.CopyShader = { 8 | 9 | uniforms: { 10 | 11 | "tDiffuse": { value: null }, 12 | "opacity": { value: 1.0 } 13 | 14 | }, 15 | 16 | vertexShader: [ 17 | 18 | "varying vec2 vUv;", 19 | 20 | "void main() {", 21 | 22 | "vUv = uv;", 23 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 24 | 25 | "}" 26 | 27 | ].join( "\n" ), 28 | 29 | fragmentShader: [ 30 | 31 | "uniform float opacity;", 32 | 33 | "uniform sampler2D tDiffuse;", 34 | 35 | "varying vec2 vUv;", 36 | 37 | "void main() {", 38 | 39 | "vec4 texel = texture2D( tDiffuse, vUv );", 40 | "gl_FragColor = opacity * texel;", 41 | 42 | "}" 43 | 44 | ].join( "\n" ) 45 | 46 | }; 47 | -------------------------------------------------------------------------------- /lib/three.js/shaders/DOFMipMapShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | * 4 | * Depth-of-field shader using mipmaps 5 | * - from Matt Handley @applmak 6 | * - requires power-of-2 sized render target with enabled mipmaps 7 | */ 8 | 9 | THREE.DOFMipMapShader = { 10 | 11 | uniforms: { 12 | 13 | "tColor": { value: null }, 14 | "tDepth": { value: null }, 15 | "focus": { value: 1.0 }, 16 | "maxblur": { value: 1.0 } 17 | 18 | }, 19 | 20 | vertexShader: [ 21 | 22 | "varying vec2 vUv;", 23 | 24 | "void main() {", 25 | 26 | "vUv = uv;", 27 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 28 | 29 | "}" 30 | 31 | ].join( "\n" ), 32 | 33 | fragmentShader: [ 34 | 35 | "uniform float focus;", 36 | "uniform float maxblur;", 37 | 38 | "uniform sampler2D tColor;", 39 | "uniform sampler2D tDepth;", 40 | 41 | "varying vec2 vUv;", 42 | 43 | "void main() {", 44 | 45 | "vec4 depth = texture2D( tDepth, vUv );", 46 | 47 | "float factor = depth.x - focus;", 48 | 49 | "vec4 col = texture2D( tColor, vUv, 2.0 * maxblur * abs( focus - depth.x ) );", 50 | 51 | "gl_FragColor = col;", 52 | "gl_FragColor.a = 1.0;", 53 | 54 | "}" 55 | 56 | ].join( "\n" ) 57 | 58 | }; 59 | -------------------------------------------------------------------------------- /lib/three.js/shaders/DotScreenShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | * 4 | * Dot screen shader 5 | * based on glfx.js sepia shader 6 | * https://github.com/evanw/glfx.js 7 | */ 8 | 9 | THREE.DotScreenShader = { 10 | 11 | uniforms: { 12 | 13 | "tDiffuse": { value: null }, 14 | "tSize": { value: new THREE.Vector2( 256, 256 ) }, 15 | "center": { value: new THREE.Vector2( 0.5, 0.5 ) }, 16 | "angle": { value: 1.57 }, 17 | "scale": { value: 1.0 } 18 | 19 | }, 20 | 21 | vertexShader: [ 22 | 23 | "varying vec2 vUv;", 24 | 25 | "void main() {", 26 | 27 | "vUv = uv;", 28 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 29 | 30 | "}" 31 | 32 | ].join( "\n" ), 33 | 34 | fragmentShader: [ 35 | 36 | "uniform vec2 center;", 37 | "uniform float angle;", 38 | "uniform float scale;", 39 | "uniform vec2 tSize;", 40 | 41 | "uniform sampler2D tDiffuse;", 42 | 43 | "varying vec2 vUv;", 44 | 45 | "float pattern() {", 46 | 47 | "float s = sin( angle ), c = cos( angle );", 48 | 49 | "vec2 tex = vUv * tSize - center;", 50 | "vec2 point = vec2( c * tex.x - s * tex.y, s * tex.x + c * tex.y ) * scale;", 51 | 52 | "return ( sin( point.x ) * sin( point.y ) ) * 4.0;", 53 | 54 | "}", 55 | 56 | "void main() {", 57 | 58 | "vec4 color = texture2D( tDiffuse, vUv );", 59 | 60 | "float average = ( color.r + color.g + color.b ) / 3.0;", 61 | 62 | "gl_FragColor = vec4( vec3( average * 10.0 - 5.0 + pattern() ), color.a );", 63 | 64 | "}" 65 | 66 | ].join( "\n" ) 67 | 68 | }; 69 | -------------------------------------------------------------------------------- /lib/three.js/shaders/GammaCorrectionShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author WestLangley / http://github.com/WestLangley 3 | * 4 | * Gamma Correction Shader 5 | * http://en.wikipedia.org/wiki/gamma_correction 6 | */ 7 | 8 | THREE.GammaCorrectionShader = { 9 | 10 | uniforms: { 11 | 12 | "tDiffuse": { value: null } 13 | 14 | }, 15 | 16 | vertexShader: [ 17 | 18 | "varying vec2 vUv;", 19 | 20 | "void main() {", 21 | 22 | "vUv = uv;", 23 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 24 | 25 | "}" 26 | 27 | ].join( "\n" ), 28 | 29 | fragmentShader: [ 30 | 31 | "uniform sampler2D tDiffuse;", 32 | 33 | "varying vec2 vUv;", 34 | 35 | "void main() {", 36 | 37 | "vec4 tex = texture2D( tDiffuse, vec2( vUv.x, vUv.y ) );", 38 | 39 | "gl_FragColor = LinearToGamma( tex, float( GAMMA_FACTOR ) );", 40 | 41 | "}" 42 | 43 | ].join( "\n" ) 44 | 45 | }; 46 | -------------------------------------------------------------------------------- /lib/three.js/shaders/HueSaturationShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author tapio / http://tapio.github.com/ 3 | * 4 | * Hue and saturation adjustment 5 | * https://github.com/evanw/glfx.js 6 | * hue: -1 to 1 (-1 is 180 degrees in the negative direction, 0 is no change, etc. 7 | * saturation: -1 to 1 (-1 is solid gray, 0 is no change, and 1 is maximum contrast) 8 | */ 9 | 10 | THREE.HueSaturationShader = { 11 | 12 | uniforms: { 13 | 14 | "tDiffuse": { value: null }, 15 | "hue": { value: 0 }, 16 | "saturation": { value: 0 } 17 | 18 | }, 19 | 20 | vertexShader: [ 21 | 22 | "varying vec2 vUv;", 23 | 24 | "void main() {", 25 | 26 | "vUv = uv;", 27 | 28 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 29 | 30 | "}" 31 | 32 | ].join( "\n" ), 33 | 34 | fragmentShader: [ 35 | 36 | "uniform sampler2D tDiffuse;", 37 | "uniform float hue;", 38 | "uniform float saturation;", 39 | 40 | "varying vec2 vUv;", 41 | 42 | "void main() {", 43 | 44 | "gl_FragColor = texture2D( tDiffuse, vUv );", 45 | 46 | // hue 47 | "float angle = hue * 3.14159265;", 48 | "float s = sin(angle), c = cos(angle);", 49 | "vec3 weights = (vec3(2.0 * c, -sqrt(3.0) * s - c, sqrt(3.0) * s - c) + 1.0) / 3.0;", 50 | "float len = length(gl_FragColor.rgb);", 51 | "gl_FragColor.rgb = vec3(", 52 | "dot(gl_FragColor.rgb, weights.xyz),", 53 | "dot(gl_FragColor.rgb, weights.zxy),", 54 | "dot(gl_FragColor.rgb, weights.yzx)", 55 | ");", 56 | 57 | // saturation 58 | "float average = (gl_FragColor.r + gl_FragColor.g + gl_FragColor.b) / 3.0;", 59 | "if (saturation > 0.0) {", 60 | "gl_FragColor.rgb += (average - gl_FragColor.rgb) * (1.0 - 1.0 / (1.001 - saturation));", 61 | "} else {", 62 | "gl_FragColor.rgb += (average - gl_FragColor.rgb) * (-saturation);", 63 | "}", 64 | 65 | "}" 66 | 67 | ].join( "\n" ) 68 | 69 | }; 70 | -------------------------------------------------------------------------------- /lib/three.js/shaders/KaleidoShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author felixturner / http://airtight.cc/ 3 | * 4 | * Kaleidoscope Shader 5 | * Radial reflection around center point 6 | * Ported from: http://pixelshaders.com/editor/ 7 | * by Toby Schachman / http://tobyschachman.com/ 8 | * 9 | * sides: number of reflections 10 | * angle: initial angle in radians 11 | */ 12 | 13 | THREE.KaleidoShader = { 14 | 15 | uniforms: { 16 | 17 | "tDiffuse": { value: null }, 18 | "sides": { value: 6.0 }, 19 | "angle": { value: 0.0 } 20 | 21 | }, 22 | 23 | vertexShader: [ 24 | 25 | "varying vec2 vUv;", 26 | 27 | "void main() {", 28 | 29 | "vUv = uv;", 30 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 31 | 32 | "}" 33 | 34 | ].join( "\n" ), 35 | 36 | fragmentShader: [ 37 | 38 | "uniform sampler2D tDiffuse;", 39 | "uniform float sides;", 40 | "uniform float angle;", 41 | 42 | "varying vec2 vUv;", 43 | 44 | "void main() {", 45 | 46 | "vec2 p = vUv - 0.5;", 47 | "float r = length(p);", 48 | "float a = atan(p.y, p.x) + angle;", 49 | "float tau = 2. * 3.1416 ;", 50 | "a = mod(a, tau/sides);", 51 | "a = abs(a - tau/sides/2.) ;", 52 | "p = r * vec2(cos(a), sin(a));", 53 | "vec4 color = texture2D(tDiffuse, p + 0.5);", 54 | "gl_FragColor = color;", 55 | 56 | "}" 57 | 58 | ].join( "\n" ) 59 | 60 | }; 61 | -------------------------------------------------------------------------------- /lib/three.js/shaders/LuminosityHighPassShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author bhouston / http://clara.io/ 3 | * 4 | * Luminosity 5 | * http://en.wikipedia.org/wiki/Luminosity 6 | */ 7 | 8 | THREE.LuminosityHighPassShader = { 9 | 10 | shaderID: "luminosityHighPass", 11 | 12 | uniforms: { 13 | 14 | "tDiffuse": { type: "t", value: null }, 15 | "luminosityThreshold": { type: "f", value: 1.0 }, 16 | "smoothWidth": { type: "f", value: 1.0 }, 17 | "defaultColor": { type: "c", value: new THREE.Color( 0x000000 ) }, 18 | "defaultOpacity": { type: "f", value: 0.0 } 19 | 20 | }, 21 | 22 | vertexShader: [ 23 | 24 | "varying vec2 vUv;", 25 | 26 | "void main() {", 27 | 28 | "vUv = uv;", 29 | 30 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 31 | 32 | "}" 33 | 34 | ].join("\n"), 35 | 36 | fragmentShader: [ 37 | 38 | "uniform sampler2D tDiffuse;", 39 | "uniform vec3 defaultColor;", 40 | "uniform float defaultOpacity;", 41 | "uniform float luminosityThreshold;", 42 | "uniform float smoothWidth;", 43 | 44 | "varying vec2 vUv;", 45 | 46 | "void main() {", 47 | 48 | "vec4 texel = texture2D( tDiffuse, vUv );", 49 | 50 | "vec3 luma = vec3( 0.299, 0.587, 0.114 );", 51 | 52 | "float v = dot( texel.xyz, luma );", 53 | 54 | "vec4 outputColor = vec4( defaultColor.rgb, defaultOpacity );", 55 | 56 | "float alpha = smoothstep( luminosityThreshold, luminosityThreshold + smoothWidth, v );", 57 | 58 | "gl_FragColor = mix( outputColor, texel, alpha );", 59 | 60 | "}" 61 | 62 | ].join("\n") 63 | 64 | }; 65 | -------------------------------------------------------------------------------- /lib/three.js/shaders/LuminosityShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | * 4 | * Luminosity 5 | * http://en.wikipedia.org/wiki/Luminosity 6 | */ 7 | 8 | THREE.LuminosityShader = { 9 | 10 | uniforms: { 11 | 12 | "tDiffuse": { value: null } 13 | 14 | }, 15 | 16 | vertexShader: [ 17 | 18 | "varying vec2 vUv;", 19 | 20 | "void main() {", 21 | 22 | "vUv = uv;", 23 | 24 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 25 | 26 | "}" 27 | 28 | ].join( "\n" ), 29 | 30 | fragmentShader: [ 31 | 32 | "uniform sampler2D tDiffuse;", 33 | 34 | "varying vec2 vUv;", 35 | 36 | "void main() {", 37 | 38 | "vec4 texel = texture2D( tDiffuse, vUv );", 39 | 40 | "vec3 luma = vec3( 0.299, 0.587, 0.114 );", 41 | 42 | "float v = dot( texel.xyz, luma );", 43 | 44 | "gl_FragColor = vec4( v, v, v, texel.w );", 45 | 46 | "}" 47 | 48 | ].join( "\n" ) 49 | 50 | }; 51 | -------------------------------------------------------------------------------- /lib/three.js/shaders/MirrorShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author felixturner / http://airtight.cc/ 3 | * 4 | * Mirror Shader 5 | * Copies half the input to the other half 6 | * 7 | * side: side of input to mirror (0 = left, 1 = right, 2 = top, 3 = bottom) 8 | */ 9 | 10 | THREE.MirrorShader = { 11 | 12 | uniforms: { 13 | 14 | "tDiffuse": { value: null }, 15 | "side": { value: 1 } 16 | 17 | }, 18 | 19 | vertexShader: [ 20 | 21 | "varying vec2 vUv;", 22 | 23 | "void main() {", 24 | 25 | "vUv = uv;", 26 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 27 | 28 | "}" 29 | 30 | ].join( "\n" ), 31 | 32 | fragmentShader: [ 33 | 34 | "uniform sampler2D tDiffuse;", 35 | "uniform int side;", 36 | 37 | "varying vec2 vUv;", 38 | 39 | "void main() {", 40 | 41 | "vec2 p = vUv;", 42 | "if (side == 0){", 43 | "if (p.x > 0.5) p.x = 1.0 - p.x;", 44 | "}else if (side == 1){", 45 | "if (p.x < 0.5) p.x = 1.0 - p.x;", 46 | "}else if (side == 2){", 47 | "if (p.y < 0.5) p.y = 1.0 - p.y;", 48 | "}else if (side == 3){", 49 | "if (p.y > 0.5) p.y = 1.0 - p.y;", 50 | "} ", 51 | "vec4 color = texture2D(tDiffuse, p);", 52 | "gl_FragColor = color;", 53 | 54 | "}" 55 | 56 | ].join( "\n" ) 57 | 58 | }; 59 | -------------------------------------------------------------------------------- /lib/three.js/shaders/NormalMapShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | * 4 | * Normal map shader 5 | * - compute normals from heightmap 6 | */ 7 | 8 | THREE.NormalMapShader = { 9 | 10 | uniforms: { 11 | 12 | "heightMap": { value: null }, 13 | "resolution": { value: new THREE.Vector2( 512, 512 ) }, 14 | "scale": { value: new THREE.Vector2( 1, 1 ) }, 15 | "height": { value: 0.05 } 16 | 17 | }, 18 | 19 | vertexShader: [ 20 | 21 | "varying vec2 vUv;", 22 | 23 | "void main() {", 24 | 25 | "vUv = uv;", 26 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 27 | 28 | "}" 29 | 30 | ].join( "\n" ), 31 | 32 | fragmentShader: [ 33 | 34 | "uniform float height;", 35 | "uniform vec2 resolution;", 36 | "uniform sampler2D heightMap;", 37 | 38 | "varying vec2 vUv;", 39 | 40 | "void main() {", 41 | 42 | "float val = texture2D( heightMap, vUv ).x;", 43 | 44 | "float valU = texture2D( heightMap, vUv + vec2( 1.0 / resolution.x, 0.0 ) ).x;", 45 | "float valV = texture2D( heightMap, vUv + vec2( 0.0, 1.0 / resolution.y ) ).x;", 46 | 47 | "gl_FragColor = vec4( ( 0.5 * normalize( vec3( val - valU, val - valV, height ) ) + 0.5 ), 1.0 );", 48 | 49 | "}" 50 | 51 | ].join( "\n" ) 52 | 53 | }; 54 | -------------------------------------------------------------------------------- /lib/three.js/shaders/RGBShiftShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author felixturner / http://airtight.cc/ 3 | * 4 | * RGB Shift Shader 5 | * Shifts red and blue channels from center in opposite directions 6 | * Ported from http://kriss.cx/tom/2009/05/rgb-shift/ 7 | * by Tom Butterworth / http://kriss.cx/tom/ 8 | * 9 | * amount: shift distance (1 is width of input) 10 | * angle: shift angle in radians 11 | */ 12 | 13 | THREE.RGBShiftShader = { 14 | 15 | uniforms: { 16 | 17 | "tDiffuse": { value: null }, 18 | "amount": { value: 0.005 }, 19 | "angle": { value: 0.0 } 20 | 21 | }, 22 | 23 | vertexShader: [ 24 | 25 | "varying vec2 vUv;", 26 | 27 | "void main() {", 28 | 29 | "vUv = uv;", 30 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 31 | 32 | "}" 33 | 34 | ].join( "\n" ), 35 | 36 | fragmentShader: [ 37 | 38 | "uniform sampler2D tDiffuse;", 39 | "uniform float amount;", 40 | "uniform float angle;", 41 | 42 | "varying vec2 vUv;", 43 | 44 | "void main() {", 45 | 46 | "vec2 offset = amount * vec2( cos(angle), sin(angle));", 47 | "vec4 cr = texture2D(tDiffuse, vUv + offset);", 48 | "vec4 cga = texture2D(tDiffuse, vUv);", 49 | "vec4 cb = texture2D(tDiffuse, vUv - offset);", 50 | "gl_FragColor = vec4(cr.r, cga.g, cb.b, cga.a);", 51 | 52 | "}" 53 | 54 | ].join( "\n" ) 55 | 56 | }; 57 | -------------------------------------------------------------------------------- /lib/three.js/shaders/SepiaShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | * 4 | * Sepia tone shader 5 | * based on glfx.js sepia shader 6 | * https://github.com/evanw/glfx.js 7 | */ 8 | 9 | THREE.SepiaShader = { 10 | 11 | uniforms: { 12 | 13 | "tDiffuse": { value: null }, 14 | "amount": { value: 1.0 } 15 | 16 | }, 17 | 18 | vertexShader: [ 19 | 20 | "varying vec2 vUv;", 21 | 22 | "void main() {", 23 | 24 | "vUv = uv;", 25 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 26 | 27 | "}" 28 | 29 | ].join( "\n" ), 30 | 31 | fragmentShader: [ 32 | 33 | "uniform float amount;", 34 | 35 | "uniform sampler2D tDiffuse;", 36 | 37 | "varying vec2 vUv;", 38 | 39 | "void main() {", 40 | 41 | "vec4 color = texture2D( tDiffuse, vUv );", 42 | "vec3 c = color.rgb;", 43 | 44 | "color.r = dot( c, vec3( 1.0 - 0.607 * amount, 0.769 * amount, 0.189 * amount ) );", 45 | "color.g = dot( c, vec3( 0.349 * amount, 1.0 - 0.314 * amount, 0.168 * amount ) );", 46 | "color.b = dot( c, vec3( 0.272 * amount, 0.534 * amount, 1.0 - 0.869 * amount ) );", 47 | 48 | "gl_FragColor = vec4( min( vec3( 1.0 ), color.rgb ), color.a );", 49 | 50 | "}" 51 | 52 | ].join( "\n" ) 53 | 54 | }; 55 | -------------------------------------------------------------------------------- /lib/three.js/shaders/TechnicolorShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author flimshaw / http://charliehoey.com 3 | * 4 | * Technicolor Shader 5 | * Simulates the look of the two-strip technicolor process popular in early 20th century films. 6 | * More historical info here: http://www.widescreenmuseum.com/oldcolor/technicolor1.htm 7 | * Demo here: http://charliehoey.com/technicolor_shader/shader_test.html 8 | */ 9 | 10 | THREE.TechnicolorShader = { 11 | 12 | uniforms: { 13 | 14 | "tDiffuse": { value: null } 15 | 16 | }, 17 | 18 | vertexShader: [ 19 | 20 | "varying vec2 vUv;", 21 | 22 | "void main() {", 23 | 24 | "vUv = uv;", 25 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 26 | 27 | "}" 28 | 29 | ].join( "\n" ), 30 | 31 | fragmentShader: [ 32 | 33 | "uniform sampler2D tDiffuse;", 34 | "varying vec2 vUv;", 35 | 36 | "void main() {", 37 | 38 | "vec4 tex = texture2D( tDiffuse, vec2( vUv.x, vUv.y ) );", 39 | "vec4 newTex = vec4(tex.r, (tex.g + tex.b) * .5, (tex.g + tex.b) * .5, 1.0);", 40 | 41 | "gl_FragColor = newTex;", 42 | 43 | "}" 44 | 45 | ].join( "\n" ) 46 | 47 | }; 48 | -------------------------------------------------------------------------------- /lib/three.js/shaders/TriangleBlurShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author zz85 / http://www.lab4games.net/zz85/blog 3 | * 4 | * Triangle blur shader 5 | * based on glfx.js triangle blur shader 6 | * https://github.com/evanw/glfx.js 7 | * 8 | * A basic blur filter, which convolves the image with a 9 | * pyramid filter. The pyramid filter is separable and is applied as two 10 | * perpendicular triangle filters. 11 | */ 12 | 13 | THREE.TriangleBlurShader = { 14 | 15 | uniforms : { 16 | 17 | "texture": { value: null }, 18 | "delta": { value: new THREE.Vector2( 1, 1 ) } 19 | 20 | }, 21 | 22 | vertexShader: [ 23 | 24 | "varying vec2 vUv;", 25 | 26 | "void main() {", 27 | 28 | "vUv = uv;", 29 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 30 | 31 | "}" 32 | 33 | ].join( "\n" ), 34 | 35 | fragmentShader: [ 36 | 37 | "#include ", 38 | 39 | "#define ITERATIONS 10.0", 40 | 41 | "uniform sampler2D texture;", 42 | "uniform vec2 delta;", 43 | 44 | "varying vec2 vUv;", 45 | 46 | "void main() {", 47 | 48 | "vec4 color = vec4( 0.0 );", 49 | 50 | "float total = 0.0;", 51 | 52 | // randomize the lookup values to hide the fixed number of samples 53 | 54 | "float offset = rand( vUv );", 55 | 56 | "for ( float t = -ITERATIONS; t <= ITERATIONS; t ++ ) {", 57 | 58 | "float percent = ( t + offset - 0.5 ) / ITERATIONS;", 59 | "float weight = 1.0 - abs( percent );", 60 | 61 | "color += texture2D( texture, vUv + delta * percent ) * weight;", 62 | "total += weight;", 63 | 64 | "}", 65 | 66 | "gl_FragColor = color / total;", 67 | 68 | "}" 69 | 70 | ].join( "\n" ) 71 | 72 | }; 73 | -------------------------------------------------------------------------------- /lib/three.js/shaders/UnpackDepthRGBAShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | * 4 | * Unpack RGBA depth shader 5 | * - show RGBA encoded depth as monochrome color 6 | */ 7 | 8 | THREE.UnpackDepthRGBAShader = { 9 | 10 | uniforms: { 11 | 12 | "tDiffuse": { value: null }, 13 | "opacity": { value: 1.0 } 14 | 15 | }, 16 | 17 | vertexShader: [ 18 | 19 | "varying vec2 vUv;", 20 | 21 | "void main() {", 22 | 23 | "vUv = uv;", 24 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 25 | 26 | "}" 27 | 28 | ].join( "\n" ), 29 | 30 | fragmentShader: [ 31 | 32 | "uniform float opacity;", 33 | 34 | "uniform sampler2D tDiffuse;", 35 | 36 | "varying vec2 vUv;", 37 | 38 | "#include ", 39 | 40 | "void main() {", 41 | 42 | "float depth = 1.0 - unpackRGBAToDepth( texture2D( tDiffuse, vUv ) );", 43 | "gl_FragColor = opacity * vec4( vec3( depth ), 1.0 );", 44 | 45 | "}" 46 | 47 | ].join( "\n" ) 48 | 49 | }; 50 | -------------------------------------------------------------------------------- /lib/three.js/shaders/VignetteShader.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @author alteredq / http://alteredqualia.com/ 3 | * 4 | * Vignette shader 5 | * based on PaintEffect postprocess from ro.me 6 | * http://code.google.com/p/3-dreams-of-black/source/browse/deploy/js/effects/PaintEffect.js 7 | */ 8 | 9 | THREE.VignetteShader = { 10 | 11 | uniforms: { 12 | 13 | "tDiffuse": { value: null }, 14 | "offset": { value: 1.0 }, 15 | "darkness": { value: 1.0 } 16 | 17 | }, 18 | 19 | vertexShader: [ 20 | 21 | "varying vec2 vUv;", 22 | 23 | "void main() {", 24 | 25 | "vUv = uv;", 26 | "gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );", 27 | 28 | "}" 29 | 30 | ].join( "\n" ), 31 | 32 | fragmentShader: [ 33 | 34 | "uniform float offset;", 35 | "uniform float darkness;", 36 | 37 | "uniform sampler2D tDiffuse;", 38 | 39 | "varying vec2 vUv;", 40 | 41 | "void main() {", 42 | 43 | // Eskil's vignette 44 | 45 | "vec4 texel = texture2D( tDiffuse, vUv );", 46 | "vec2 uv = ( vUv - vec2( 0.5 ) ) * vec2( offset );", 47 | "gl_FragColor = vec4( mix( texel.rgb, vec3( 1.0 - darkness ), dot( uv, uv ) ), texel.a );", 48 | 49 | /* 50 | // alternative version from glfx.js 51 | // this one makes more "dusty" look (as opposed to "burned") 52 | 53 | "vec4 color = texture2D( tDiffuse, vUv );", 54 | "float dist = distance( vUv, vec2( 0.5 ) );", 55 | "color.rgb *= smoothstep( 0.8, offset * 0.799, dist *( darkness + offset ) );", 56 | "gl_FragColor = color;", 57 | */ 58 | 59 | "}" 60 | 61 | ].join( "\n" ) 62 | 63 | }; 64 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "forgejs", 3 | "version": "0.9.6", 4 | "description": "ForgeJS JavaScript library", 5 | "author": "GoPro, Inc.", 6 | "license": "Apache-2.0", 7 | "repository": { 8 | "type": "git", 9 | "url": "https://github.com/gopro/forgejs.git" 10 | }, 11 | "devDependencies": { 12 | "google-closure-compiler": "^20170124.0.0", 13 | "grunt": "~0.4.5", 14 | "grunt-clear": "~0.2.1", 15 | "grunt-closure-tools": "~0.9.9", 16 | "grunt-contrib-clean": "~0.7.0", 17 | "grunt-contrib-concat": "~0.5.1", 18 | "grunt-contrib-copy": "^0.8.0", 19 | "grunt-contrib-jshint": "~0.11.3", 20 | "grunt-contrib-watch": "~0.6.1", 21 | "grunt-gitinfo": "~0.1.7", 22 | "grunt-jscs": "~2.3.0", 23 | "grunt-jsdoc": "~2.1.0", 24 | "grunt-karma": "~2.0.0", 25 | "grunt-text-replace": "~0.4.0", 26 | "jasmine-core": "^2.6.4", 27 | "jasmine-jquery": "^2.1.1", 28 | "jshint-stylish": "^2.1.0", 29 | "json-schema-docs-generator": "^2.1.2", 30 | "karma": "^1.6.0", 31 | "karma-chrome-launcher": "^2.0.0", 32 | "karma-jasmine": "^1.1.0", 33 | "karma-jasmine-jquery": "^0.1.1" 34 | }, 35 | "dependencies": { 36 | "cpr": "^1.1.2", 37 | "jsonfile": "^2.3.1", 38 | "path": "^0.12.7", 39 | "read": "^1.0.7" 40 | }, 41 | "keywords": [ 42 | "forge", 43 | "forgejs", 44 | "webvr", 45 | "vr", 46 | "gopro", 47 | "kolor" 48 | ] 49 | } 50 | -------------------------------------------------------------------------------- /reference/action/action-method.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "action-method", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ActionMethodConfig", 5 | "description": "An instance of an action method.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "name": { 10 | "type": "string", 11 | "title": "Name", 12 | "description": "The name of the method.", 13 | "example": "lookAt" 14 | }, 15 | 16 | "args": { 17 | "type": "array", 18 | "title": "Arguments", 19 | "description": "The arguments array you want to pass to this method.", 20 | "items": {}, 21 | "example": [0, 2, 0, 90, 500] 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /reference/action/action-property.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "action-property", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ActionPropertyConfig", 5 | "description": "An instance of an action property.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "name": { 10 | "type": "string", 11 | "title": "Name", 12 | "description": "The name of the property.", 13 | "example": "fov" 14 | }, 15 | 16 | "value": { 17 | "title": "Value", 18 | "description": "The value you want to set to this property, can be of any valid JSON type.", 19 | "example": 10 20 | }, 21 | 22 | "operation": { 23 | "type": "string", 24 | "title": "Operation", 25 | "description": "The kind of operation you want to apply to this property. Can be one of the following:
  • set - set the current value to the passed value
  • add - add the passed value to the current value
  • substract - substract the passed value to the current value
  • multiply - multiply the current value by the passed value
  • divide - divide the current value by the passed value
  • toggle - toggle the current value to false if it was true, or the other way around (only work if the property is of boolean type)
", 26 | "example": "add" 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /reference/action/action-target.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "action-target", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ActionTargetConfig", 5 | "description": "An instance of an action target.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "identifier": { 10 | "type": "string", 11 | "title": "Identifier", 12 | "description": "The UID of the target.", 13 | "example": "hotspot-3d" 14 | }, 15 | 16 | "accessor": { 17 | "type": "string", 18 | "title": "Accessor", 19 | "description": "The list of accessor (chained with a dot) to get the target from the UID object.", 20 | "example": "animation" 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /reference/action/action.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "action", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ActionConfig", 5 | "description": "An instance of an action.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "uid": { 10 | "type": "string", 11 | "title": "UID", 12 | "description": "The UID of the action.", 13 | "example": "action-more-awesome" 14 | }, 15 | 16 | "target": { 17 | "anyOf": [ 18 | { "type": "string" }, 19 | { "$ref": "action-target" } 20 | ], 21 | "title": "Target", 22 | "description": "The UID of the target of the action, the list of accessor to get the target from the Viewer object, or a combination of both.", 23 | "example": "viewer.renderer.camera" 24 | }, 25 | 26 | "method": { 27 | "$ref": "action-method" 28 | }, 29 | 30 | "property": { 31 | "$ref": "action-property" 32 | } 33 | }, 34 | 35 | "required": [ "uid", "target" ] 36 | } -------------------------------------------------------------------------------- /reference/animation/animation-track-easing.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "animation-track-easing", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "AnimationTrackEasingConfig", 5 | "description": "An instance of an animation track.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "default": { 10 | "type": "string", 11 | "title": "Default", 12 | "description": "The default easing to apply; available values are :
  • linear
  • easeInSine
  • easeInOutSine
  • easeOutSine
  • easeInQuad
  • easeInOutQuad
  • easeOutQuad
  • easeInCubic
  • easeInOutCubic
  • easeOutCubic
  • easeOutBounce
  • easeInBounce
Default is linear.", 13 | "example": "easeInQuad" 14 | }, 15 | 16 | "start": { 17 | "type": "number", 18 | "title": "Start", 19 | "description": "The time (in ms) to reach the first position of the track from the current position of the camera.", 20 | "default": 0, 21 | "example": 5000 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /reference/audio/audio-volume.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "audio-volume", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "AudioVolumeConfig", 5 | "description": "The configuration of the volume of the audio.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "default": { 10 | "type": "number", 11 | "title": "Default", 12 | "description": "The default value of the volume.", 13 | "default": 1, 14 | "minimum": 0, 15 | "maximum": 1 16 | }, 17 | 18 | "max": { 19 | "type": "number", 20 | "title": "Maximum", 21 | "description": "The maximum value of the volume.", 22 | "default": 1, 23 | "minimum": 0, 24 | "maximum": 1 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /reference/audio/audio.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "audio", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "AudioConfig", 5 | "description": "An instance of the audio configuration.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "enabled": { 10 | "type": "boolean", 11 | "title": "Enabled", 12 | "description": "Is the audio interface enabled ?", 13 | "default": true 14 | }, 15 | 16 | "volume": { 17 | "$ref": "audio-volume" 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /reference/camera/camera-gaze-ring.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "camera-gaze-ring", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "CameraGazeRingConfig", 5 | "description": "An instance of a camera gaze ring geometry and material configuration.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "innerRadius": { 10 | "type": "number", 11 | "title": "Inner radius", 12 | "description": "The inner radius of the ring.", 13 | "minimum": 0, 14 | "default": 0.02 15 | }, 16 | 17 | "outerRadius": { 18 | "type": "number", 19 | "title": "Outer radius", 20 | "description": "The outer radius of the ring.", 21 | "minimum": 0, 22 | "default": 0.04 23 | }, 24 | 25 | "color": { 26 | "anyOf": [ 27 | { "type": "string" }, 28 | { "type": "number" } 29 | ], 30 | "title": "Color", 31 | "description": "The hexadecimal color code of the ring.", 32 | "example": "#ffffff" 33 | }, 34 | 35 | "opacity": { 36 | "type": "number", 37 | "title": "Opacity", 38 | "description": "The opacity of the ring.", 39 | "minimum": 0, 40 | "maximum": 1, 41 | "example": 0.5 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /reference/camera/camera-gaze.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "camera-gaze", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "CameraGazeConfig", 5 | "description": "Camera gaze cursor configuration", 6 | "type": "object", 7 | 8 | "properties": { 9 | "delay": { 10 | "type": "number", 11 | "title": "Delay", 12 | "description": "The time needed to validate a gaze interaction.", 13 | "minimum": 0, 14 | "example": 2000 15 | }, 16 | 17 | "cursor": { 18 | "$ref": "camera-gaze-ring" 19 | }, 20 | 21 | "progress": { 22 | "$ref": "camera-gaze-ring" 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /reference/camera/camera-value.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "camera-value", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "CameraValueConfig", 5 | "description": "An instance of a camera value.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "default": { 10 | "type": "number", 11 | "title": "Default", 12 | "description": "The default value.", 13 | "example": 45 14 | }, 15 | 16 | "min": { 17 | "type": "number", 18 | "title": "Minimum", 19 | "description": "The minimum value.", 20 | "example": 0 21 | }, 22 | 23 | "max": { 24 | "type": "number", 25 | "title": "Maximum", 26 | "description": "The maximum value", 27 | "example": 90 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /reference/camera/camera.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "camera", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "CameraConfig", 5 | "description": "An instance of the camera object.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "parallax": { 10 | "type": "number", 11 | "title": "Parallax", 12 | "description": "Parallax factor.", 13 | "minimum": 0, 14 | "maximum": 1, 15 | "example": 0.2 16 | }, 17 | 18 | "keep": { 19 | "type": "boolean", 20 | "title": "Keep", 21 | "description": "Does the camera have to keep its previous configuration on scene load?", 22 | "example": "true", 23 | "default": false 24 | }, 25 | 26 | "yaw": { 27 | "$ref": "camera-value" 28 | }, 29 | 30 | "pitch": { 31 | "$ref": "camera-value" 32 | }, 33 | 34 | "roll": { 35 | "$ref": "camera-value" 36 | }, 37 | 38 | "fov": { 39 | "$ref": "camera-value" 40 | }, 41 | 42 | "gaze": { 43 | "$ref": "camera-gaze" 44 | } 45 | } 46 | } -------------------------------------------------------------------------------- /reference/controller/controller-gamepad-axis-binding-event.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "controller-gamepad-axis-binding-events", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ControllerGamepadAxisBindingEventsConfig", 5 | "description": "Available events to bind actions to an axis for the controller gamepad.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "onChange":{ 10 | "anyOf":[ 11 | {"type": "string"}, 12 | {"type": "array", "items": "string"} 13 | ], 14 | "title": "onChange", 15 | "description": "The action or array of actions uid to trigger on axis down event" 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /reference/controller/controller-gamepad-axis-binding.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "controller-gamepad-axis-binding", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ControllerGamepadAxisBindingConfig", 5 | "description": "A custom controller gamepad axis binding.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "name":{ 10 | "type": "string", 11 | "title": "Name", 12 | "description": "The name of this axis binding" 13 | }, 14 | 15 | "axis":{ 16 | "type": "number", 17 | "title": "axis", 18 | "description": "The axis code that is associated to this axis binding." 19 | }, 20 | 21 | "events":{ 22 | "$ref": "controller-gamepad-axis-binding-events" 23 | } 24 | }, 25 | 26 | "required": ["axis", "events"] 27 | } 28 | -------------------------------------------------------------------------------- /reference/controller/controller-gamepad-binding.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "controller-gamepad-binding", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ControllerGamepadBindingConfig", 5 | "description": "An instance of a controller gamepad binding config.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "buttons": { 10 | "type": "array", 11 | "title": "Buttons", 12 | "description": "Array of custom gamepad button binding..", 13 | "items": { 14 | "$ref": "controller-gamepad-button-binding" 15 | } 16 | }, 17 | 18 | "axes": { 19 | "type": "array", 20 | "title": "Axes", 21 | "description": "Array of custom gamepad axis binding..", 22 | "items": { 23 | "$ref": "controller-gamepad-axis-binding" 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /reference/controller/controller-gamepad-button-binding-events.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "controller-gamepad-button-binding-events", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ControllerGamepadButtonBindingEventsConfig", 5 | "description": "Available events to bind actions to for the controller gamepad.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "onDown":{ 10 | "anyOf":[ 11 | {"type": "string"}, 12 | {"type": "array", "items": "string"} 13 | ], 14 | "title": "onDown", 15 | "description": "The action or array of actions uid to trigger on button down event" 16 | }, 17 | 18 | "onHold":{ 19 | "anyOf":[ 20 | {"type": "string"}, 21 | {"type": "array", "items": "string"} 22 | ], 23 | "title": "onHold", 24 | "description": "The action or array of actions uid to trigger on button hold event" 25 | }, 26 | 27 | "onUp":{ 28 | "anyOf":[ 29 | {"type": "string"}, 30 | {"type": "array", "items": "string"} 31 | ], 32 | "title": "onUp", 33 | "description": "The action or array of actions uid to trigger on button up event" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /reference/controller/controller-gamepad-button-binding.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "controller-gamepad-button-binding", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ControllerGamepadButtonBindingConfig", 5 | "description": "A custom controller gamepad button binding.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "name":{ 10 | "type": "string", 11 | "title": "Name", 12 | "description": "The name of this button binding" 13 | }, 14 | 15 | "in":{ 16 | "anyOf":[ 17 | {"type": "number"}, 18 | {"type": "array", "items": "number"} 19 | ], 20 | "title": "In", 21 | "description": "The button code or array of button codes that are associated to this button binding." 22 | }, 23 | 24 | "out":{ 25 | "anyOf":[ 26 | {"type": "number"}, 27 | {"type": "array", "items": "number"} 28 | ], 29 | "title": "Out", 30 | "description": "The button code or array of button codes that are associated to this button binding." 31 | }, 32 | 33 | "events":{ 34 | "$ref": "controller-gamepad-button-binding-events" 35 | } 36 | }, 37 | 38 | "required": ["in", "events"] 39 | } 40 | -------------------------------------------------------------------------------- /reference/controller/controller-gamepad.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "controller-gamepad", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ControllerGamepadConfig", 5 | "description": "An instance of a controller gamepad.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "orientation": { 10 | "$ref": "controller-options-orientation" 11 | }, 12 | 13 | "zoom": { 14 | "$ref": "controller-options-zoom" 15 | }, 16 | 17 | "default": { 18 | "type": "boolean", 19 | "title": "Default", 20 | "description": "Loads the default controller bindings if not set to false.", 21 | "default": true 22 | }, 23 | 24 | "bindings": { 25 | "$ref": "controller-gamepad-binding" 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /reference/controller/controller-instance.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "controller-instance", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ControllerInstanceConfig", 5 | "description": "An instance of a controller.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "uid": { 10 | "type": "string", 11 | "title": "UID", 12 | "description": "UID of the controller instance.", 13 | "example": "controller-0" 14 | }, 15 | 16 | "type": { 17 | "type": "string", 18 | "enum": ["pointer"], 19 | "title": "Type", 20 | "description": "Type of the controller to instanciate. Can either be :
  • pointer
  • keyboard
  • gyroscope
  • gamepad
", 21 | "example": "pointer" 22 | }, 23 | 24 | "enabled": { 25 | "type": "boolean", 26 | "title": "Enabled", 27 | "description": "Is this controller enabled at its creation ?", 28 | "example": true 29 | }, 30 | 31 | "options":{ 32 | "anyOf": [ 33 | { "$ref": "controller-pointer" }, 34 | { "$ref": "controller-keyboard" }, 35 | { "$ref": "controller-gamepad" } 36 | ] 37 | } 38 | }, 39 | 40 | "required": [ "uid", "type", "enabled" ] 41 | } 42 | -------------------------------------------------------------------------------- /reference/controller/controller-keyboard-binding-events.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "controller-keyboard-binding-events", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ControllerKeyboardBindingEventsConfig", 5 | "description": "Available events to bind actions to for the controller keyboard.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "onDown":{ 10 | "anyOf":[ 11 | {"type": "string"}, 12 | {"type": "array", "items": "string"} 13 | ], 14 | "title": "onDown", 15 | "description": "The action or array of actions uid to trigger on key down event" 16 | }, 17 | 18 | "onHold":{ 19 | "anyOf":[ 20 | {"type": "string"}, 21 | {"type": "array", "items": "string"} 22 | ], 23 | "title": "onHold", 24 | "description": "The action or array of actions uid to trigger on key hold event" 25 | }, 26 | 27 | "onUp":{ 28 | "anyOf":[ 29 | {"type": "string"}, 30 | {"type": "array", "items": "string"} 31 | ], 32 | "title": "onUp", 33 | "description": "The action or array of actions uid to trigger on key up event" 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /reference/controller/controller-keyboard-binding.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "controller-keyboard-binding", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ControllerKeyboardBindingConfig", 5 | "description": "A custom controller keyboard key binding.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "name":{ 10 | "type": "string", 11 | "title": "Name", 12 | "description": "The name of this key binding" 13 | }, 14 | 15 | "in":{ 16 | "anyOf":[ 17 | {"type": "number"}, 18 | {"type": "array", "items": "number"} 19 | ], 20 | "title": "In", 21 | "description": "The key code or array of keycodes that are associated to this key binding. Corresponds to a KeyboardEvent.keyCode" 22 | }, 23 | 24 | "out":{ 25 | "anyOf":[ 26 | {"type": "number"}, 27 | {"type": "array", "items": "number"} 28 | ], 29 | "title": "Out", 30 | "description": "The key code or array of keycodes that are associated to this key binding. Corresponds to a KeyboardEvent.keyCode" 31 | }, 32 | 33 | "events":{ 34 | "$ref": "controller-keyboard-binding-events" 35 | } 36 | }, 37 | 38 | "required": ["in", "events"] 39 | } 40 | -------------------------------------------------------------------------------- /reference/controller/controller-keyboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "controller-keyboard", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ControllerKeyboardConfig", 5 | "description": "An instance of a controller gamepad.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "orientation": { 10 | "$ref": "controller-options-orientation" 11 | }, 12 | 13 | "zoom":{ 14 | "$ref": "controller-options-zoom" 15 | }, 16 | 17 | "default": { 18 | "type": "boolean", 19 | "title": "Default", 20 | "description": "Loads the default controller bindings if not set to false.", 21 | "default": true 22 | }, 23 | 24 | "bindings": { 25 | "type": "array", 26 | "title": "Bindings", 27 | "description": "Array of custom keyboard key bindings.", 28 | "items": { 29 | "$ref": "controller-keyboard-binding" 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /reference/controller/controller-options-orientation-invert.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "controller-options-orientation-invert", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ControllerOrientationInvertConfig", 5 | "description": "An instance of a controller orientation invert configuration.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "x": { 10 | "type": "boolean", 11 | "title": "X", 12 | "description": "Is the X axis inverted ?", 13 | "default": false 14 | }, 15 | 16 | "y": { 17 | "type": "boolean", 18 | "title": "Y", 19 | "description": "Is the Y axis inverted ?", 20 | "default": false 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /reference/controller/controller-options-orientation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "controller-options-orientation", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ControllerOrientationConfig", 5 | "description": "An instance of a controller orientation configuration.", 6 | "type": "object", 7 | 8 | "properties": { 9 | 10 | "drag": { 11 | "type": "boolean", 12 | "title": "Drag", 13 | "description": "Set this to true if you want to use the drag mode control. Do not use with anything else than a rectilinear view", 14 | "default": false 15 | }, 16 | 17 | "hardness": { 18 | "type": "number", 19 | "title": "Hardness", 20 | "description": "Hardness (instant contribution).", 21 | "example": 0.6 22 | }, 23 | 24 | "damping": { 25 | "type": "number", 26 | "title": "Damping", 27 | "description": "Damping (inertia).", 28 | "example": 0.15 29 | }, 30 | 31 | "velocityMax": { 32 | "type": "number", 33 | "title": "Velocity Max", 34 | "description": "Maximum velocity .", 35 | "example": 300 36 | }, 37 | 38 | "invert": { 39 | "anyOf": [ 40 | { "type": "boolean" }, 41 | { "$ref": "controller-options-orientation-invert" } 42 | ], 43 | "title": "Invert", 44 | "description": "Inversion of axis.", 45 | "example": false 46 | } 47 | }, 48 | 49 | "required": [ "hardness", "damping", "velocityMax", "invert" ] 50 | } 51 | -------------------------------------------------------------------------------- /reference/controller/controller-options-zoom.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "controller-options-zoom", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ControllerZoomConfig", 5 | "description": "An instance of a controller zoom configuration.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "hardness": { 10 | "type": "number", 11 | "title": "Hardness", 12 | "description": "Hardness (instant contribution).", 13 | "example": 5 14 | 15 | }, 16 | 17 | "invert": { 18 | "type": "boolean", 19 | "title": "Invert", 20 | "description": "Inversion of axis.", 21 | "example": false 22 | }, 23 | 24 | "toPointer": { 25 | "type": "boolean", 26 | "title": "toPointer", 27 | "description": "Zoom action also rotate the camera to keep the same area under your pointer during the zoom", 28 | "example": false 29 | } 30 | }, 31 | 32 | "required": [ "hardness", "invert" ] 33 | } -------------------------------------------------------------------------------- /reference/controller/controller-pointer.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "controller-pointer", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ControllerPointerConfig", 5 | "description": "An instance of a controller pointer.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "fullscreen":{ 10 | "type": "boolean", 11 | "title": "Fullscreen", 12 | "description": "Does a double click/tap/touch toggle the fullscreen mode ?", 13 | "default": true 14 | }, 15 | 16 | "orientation":{ 17 | "$ref": "controller-options-orientation" 18 | }, 19 | 20 | "zoom":{ 21 | "$ref": "controller-options-zoom" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /reference/controller/controllers.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "controller", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ControllersConfig", 5 | "description": "An instance of the controllers configuration.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "enabled": { 10 | "type": "boolean", 11 | "title": "Enabled", 12 | "description": "Enables or not all the controllers.", 13 | "default": true 14 | }, 15 | 16 | "instances": { 17 | "type": "array", 18 | "title": "Instances", 19 | "description": "The list of each controller. Each member is an instance of a controller.", 20 | "items": { 21 | "$ref": "controller-instance" 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /reference/director/director-track-keyframe-data.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "director-track-keyframe-data", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "DirectorKeyframeConfigData", 5 | "description": "An instance of a director track keyframe data.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "yaw": { 10 | "type": "number", 11 | "title": "Yaw", 12 | "description": "The yaw of the camera.", 13 | "example": 10 14 | }, 15 | 16 | "pitch": { 17 | "type": "number", 18 | "title": "Pitch", 19 | "description": "The pitch of the camera.", 20 | "example": 20 21 | }, 22 | 23 | "roll": { 24 | "type": "number", 25 | "title": "Roll", 26 | "description": "The roll of the camera.", 27 | "example": -50 28 | }, 29 | 30 | "fov": { 31 | "type": "number", 32 | "title": "FOV", 33 | "description": "The field of view of the camera.", 34 | "example": 270 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /reference/director/director-track-keyframe.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "director-track-keyframe", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "DirectorKeyframeConfig", 5 | "description": "An instance of a director track keyframe.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "time": { 10 | "type": "number", 11 | "title": "Time", 12 | "description": "The time to trigger the action.", 13 | "example": 20 14 | }, 15 | 16 | "data": { 17 | "$ref": "director-track-keyframe-data" 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /reference/director/director.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "director", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "DirectorConfig", 5 | "description": "An instance of a director configuration.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "animation": { 10 | "$ref": "director-animation" 11 | }, 12 | 13 | "tracks": { 14 | "type": "array", 15 | "title": "Tracks", 16 | "description": "A list of the tracks composing the director's cut. Each member is an instance of a director track.", 17 | "items": { 18 | "$ref": "director-track" 19 | } 20 | } 21 | } 22 | } -------------------------------------------------------------------------------- /reference/display/sprite-animation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "sprite-animation", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "SpriteAnimationConfig", 5 | "description": "A configuration of the sprite animation.", 6 | "type": "object", 7 | 8 | "properties": { 9 | 10 | "name": { 11 | "type": "string", 12 | "title": "Name", 13 | "description": "The name of the animation.", 14 | "example": "animation-0" 15 | }, 16 | 17 | "start": { 18 | "type": "number", 19 | "title": "Start", 20 | "description": "The index of the starting frame.", 21 | "example": 0 22 | }, 23 | 24 | "end": { 25 | "type": "number", 26 | "title": "End", 27 | "description": "The index of the ending frame.", 28 | "example": 24 29 | }, 30 | 31 | "loop": { 32 | "type": "boolean", 33 | "title": "Loop", 34 | "description": "If loop is set to true, the sprite animation will loop", 35 | "example": false, 36 | "default": true 37 | }, 38 | 39 | "frameRate": { 40 | "type": "number", 41 | "title": "Frame rate", 42 | "description": "The number of frame per second to use for this animation. That modifies the speed of the animation.", 43 | "example": 24, 44 | "default": 30 45 | } 46 | }, 47 | 48 | "required": [ "name" ] 49 | } -------------------------------------------------------------------------------- /reference/display/video.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "video", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "VideoConfig", 5 | "description": "A configuration of the video display object.", 6 | "type": "object", 7 | 8 | "properties": { 9 | 10 | "url": { 11 | "type": "string", 12 | "title": "URL", 13 | "description": "The url of the video file.", 14 | "example": "./videos/video.mp4" 15 | } 16 | }, 17 | 18 | "required": [ "url" ] 19 | } -------------------------------------------------------------------------------- /reference/group/group.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "group", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "GroupConfig", 5 | "description": "An instance of a group.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "uid": { 10 | "type": "string", 11 | "title": "UID", 12 | "description": "The UID of the group.", 13 | "example": "group-0" 14 | }, 15 | 16 | "children": { 17 | "type": "array", 18 | "title": "Children", 19 | "description": "The UID of scenes included in this group.", 20 | "items": { 21 | "type": "string" 22 | }, 23 | "example": [ "scene-0", "scene-1" ] 24 | }, 25 | 26 | "default": { 27 | "type": "string", 28 | "title": "Default", 29 | "description": "The default child of the group.", 30 | "example": 1 31 | }, 32 | 33 | "name": { 34 | "type": "string", 35 | "title": "Name", 36 | "description": "The name of the group or its i18n key.", 37 | "example": "My Group" 38 | }, 39 | 40 | "slug": { 41 | "type": "string", 42 | "title": "Slug", 43 | "description": "The slug name of the group or its i18n key.", 44 | "example": "my-group" 45 | }, 46 | 47 | "description": { 48 | "type": "string", 49 | "title": "Description", 50 | "description": "The description of the group or its i18n key.", 51 | "example": "This a group with two awesome scenes" 52 | } 53 | }, 54 | 55 | "required": [ "uid" ] 56 | } -------------------------------------------------------------------------------- /reference/history/history.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "history", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "HistoryConfig", 5 | "description": "An instance of the history global configuration.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "enabled": { 10 | "type": "boolean", 11 | "title": "Enabled", 12 | "description": "Is the history enabled ?", 13 | "default": true, 14 | "example": true 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /reference/hotspot/hotspot-anim.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "hotspot-anim", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "HotspotsConfig", 5 | "description": "An instance of the hotspot animation configuration.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "tracks": { 10 | "type": "array", 11 | "title": "Tracks", 12 | "description": "A list of the tracks that can be used for animating hotspot-anim. Each member is an instance of a hotspot track.", 13 | "items": { 14 | "$ref": "hotspot-track" 15 | } 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /reference/hotspot/hotspot-animation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "hotspot-animation", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "HotspotAnimationConfig", 5 | "description": "An instance of a hotspot animation.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "enabled": { 10 | "type": "boolean", 11 | "title": "Enabled", 12 | "description": "Is the animation enabled ?", 13 | "example": true 14 | }, 15 | 16 | "random": { 17 | "type": "boolean", 18 | "title": "Randomly", 19 | "description": "Are the tracks played randomly ?", 20 | "example": false 21 | }, 22 | 23 | "loop": { 24 | "type": "boolean", 25 | "title": "Looping", 26 | "description": "Does the animation loop ?", 27 | "example": false 28 | }, 29 | 30 | "autostart": { 31 | "type": "boolean", 32 | "title": "Autostart", 33 | "description": "Does the animation autostart ?", 34 | "example": false 35 | }, 36 | 37 | "order": { 38 | "type": "array", 39 | "title": "Order", 40 | "description": "The list of tracks UID ot execute. The tracks are executed in the order they are written in this array.", 41 | "items": { 42 | "type": "string" 43 | }, 44 | "example": [ "track-0", "track-2" ] 45 | } 46 | } 47 | } -------------------------------------------------------------------------------- /reference/hotspot/hotspot-dom-offset.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "hotspot-dom-offset", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "HotspotDomOffsetConfig", 5 | "description": "An instance of a hotspot DOM offset.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "x": { 10 | "type": "number", 11 | "title": "X", 12 | "description": "Offset on x in pixels.", 13 | "default": 0, 14 | "example": 10 15 | }, 16 | 17 | "y": { 18 | "type": "number", 19 | "title": "Y", 20 | "description": "Offset on y in pixels.", 21 | "default": 0, 22 | "example": -5 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /reference/hotspot/hotspot-events.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "hotspot-events", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "HotspotEventConfig", 5 | "description": "An instance of the hotspot events object.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "onClick": { 10 | "anyOf": [ 11 | { "type": "string" }, 12 | { "type": "array", "items": { "type": "string" } } 13 | ], 14 | "title": "On Click", 15 | "description": "The action uids to trigger on click." 16 | }, 17 | 18 | "onOver": { 19 | "anyOf": [ 20 | { "type": "string" }, 21 | { "type": "array", "items": { "type": "string" } } 22 | ], 23 | "title": "On Over", 24 | "description": "The action uids to trigger on over." 25 | }, 26 | 27 | "onOut": { 28 | "anyOf": [ 29 | { "type": "string" }, 30 | { "type": "array", "items": { "type": "string" } } 31 | ], 32 | "title": "On Out", 33 | "description": "The action uids to trigger on out." 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /reference/hotspot/hotspot-geometry-offset.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "hotspot-geometry-offset", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "HotspotGeometryOffsetConfig", 5 | "description": "An instance of a hotspot geometry offset.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "x": { 10 | "type": "number", 11 | "title": "X", 12 | "description": "Offset on x in word units.", 13 | "default": 0, 14 | "example": 20 15 | }, 16 | 17 | "y": { 18 | "type": "number", 19 | "title": "Y", 20 | "description": "Offset on y in word units.", 21 | "default": 0, 22 | "example": -50 23 | }, 24 | 25 | "z": { 26 | "type": "number", 27 | "title": "Y", 28 | "description": "Offset on z in word units.", 29 | "default": 0, 30 | "example": 5 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /reference/hotspot/hotspot-state.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "hotspot-state", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "HotspotStateConfig", 5 | "description": "A hotspot state configuration", 6 | "type": "object", 7 | 8 | "properties": { 9 | 10 | "material": { 11 | "$ref": "hotspot-material" 12 | } 13 | }, 14 | 15 | "required": [] 16 | } -------------------------------------------------------------------------------- /reference/hotspot/hotspot-states.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "hotspot-states", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "HotspotStatesConfig", 5 | "description": "An instance of the hotspot states object.", 6 | "type": "object", 7 | 8 | "properties": { 9 | 10 | "default": { 11 | "type": "string", 12 | "title": "Default", 13 | "description": "The default state name to load", 14 | "default": "default" 15 | }, 16 | 17 | "auto": { 18 | "type": "boolean", 19 | "title": "Auto", 20 | "description": "Does the hotspot auto switch to the appropriate state?", 21 | "default": true 22 | }, 23 | 24 | "over": { 25 | "$ref": "hotspot-state" 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /reference/hotspot/hotspot-track-keyframe.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "hotspot-track-keyframe", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "HotspotTrackKeyframeConfig", 5 | "description": "An instance of a hotspot track.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "time": { 10 | "type": "number", 11 | "title": "Time", 12 | "description": "The time to trigger the action.", 13 | "example": 20 14 | }, 15 | 16 | "position": { 17 | "$ref": "hotspot-transform-position" 18 | }, 19 | 20 | "rotation": { 21 | "$ref": "hotspot-transform-rotation" 22 | }, 23 | 24 | "scale": { 25 | "$ref": "hotspot-transform-scale" 26 | } 27 | }, 28 | 29 | "required": [ "position", "rotation", "scale" ] 30 | } -------------------------------------------------------------------------------- /reference/hotspot/hotspot-transform-rotation.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "hotspot-transform-rotation", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "HotspotTransformRotationConfig", 5 | "description": "An instance of a hotspot transform rotation.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "x": { 10 | "type": "number", 11 | "title": "X", 12 | "description": "Rotation on x in the local hotspot system", 13 | "example": 8 14 | }, 15 | 16 | "y": { 17 | "type": "number", 18 | "title": "Y", 19 | "description": "Rotation on y in the local hotspot system", 20 | "example": 3 21 | }, 22 | 23 | "z": { 24 | "type": "number", 25 | "title": "Z", 26 | "description": "Rotation on z in the local hotspot system", 27 | "example": 5 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /reference/hotspot/hotspot-transform-scale.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "hotspot-transform-scale", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "HotspotTransformScaleConfig", 5 | "description": "An instance of a hotspot transform scale.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "x": { 10 | "type": "number", 11 | "title": "X", 12 | "description": "Scale on x.", 13 | "default": 1, 14 | "example": 8 15 | }, 16 | 17 | "y": { 18 | "type": "number", 19 | "title": "Y", 20 | "description": "Scale on y.", 21 | "default": 1, 22 | "example": 3 23 | }, 24 | 25 | "z": { 26 | "type": "number", 27 | "title": "Z", 28 | "description": "Scale on z.", 29 | "default": 1, 30 | "example": 5 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /reference/hotspot/hotspot-transform.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "hotspot-transform", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "HotspotTransformConfig", 5 | "description": "An instance of a hotspot transform.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "position": { 10 | "$ref": "hotspot-transform-position" 11 | }, 12 | 13 | "rotation": { 14 | "$ref": "hotspot-transform-rotation" 15 | }, 16 | 17 | "scale": { 18 | "$ref": "hotspot-transform-scale" 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /reference/i18n/i18n-locale-files.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "i18n-locale-files", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "I18nLocaleFileConfig", 5 | "description": "an instance of a i18n locale file.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "key": { 10 | "type": "string", 11 | "title": "Key", 12 | "description": "It is the unique identifier for this file.", 13 | "example": "project.en-US" 14 | }, 15 | 16 | "url": { 17 | "type": "string", 18 | "title": "URL", 19 | "description": "The file can be local or on a distant server, but must be a valid JSON one.", 20 | "example": "./i18n/en-US/locale.json" 21 | } 22 | }, 23 | 24 | "required": [ "key", "url" ] 25 | } -------------------------------------------------------------------------------- /reference/i18n/i18n-locale.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "i18n-locale", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "I18nLocaleConfig", 5 | "description": "An instance of an i18n locale.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "uid": { 10 | "type": "string", 11 | "title": "UID", 12 | "description": "The UID of the locale, we recommend a code respecting the RFC 5646 for better identification.", 13 | "example": "en-US" 14 | }, 15 | 16 | "name": { 17 | "type": "string", 18 | "title": "Name", 19 | "description": "The name of the locale.", 20 | "example": "English" 21 | }, 22 | 23 | "files": { 24 | "type": "array", 25 | "title": "Files", 26 | "description": "The list of files containing the locale. Each member is an instance of a i18n locale file.", 27 | "items": { 28 | "$ref": "i18n-locale-files" 29 | } 30 | } 31 | }, 32 | 33 | "required": [ "uid", "name", "files" ] 34 | } -------------------------------------------------------------------------------- /reference/i18n/i18n.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "i18n", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "I18nConfig", 5 | "description": "An instance of the i18n configuration.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "enabled": { 10 | "type": "boolean", 11 | "title": "Enabled", 12 | "description": "Is the i18n support enabled for this project ?", 13 | "default": true, 14 | "example": false 15 | }, 16 | 17 | "default": { 18 | "type": "string", 19 | "title": "Default", 20 | "description": "The default locale UID to use.", 21 | "example": "en-US" 22 | }, 23 | 24 | "auto": { 25 | "type": "boolean", 26 | "title": "Auto", 27 | "description": "Is the device default browser locale used if available ?", 28 | "default": false, 29 | "example": false 30 | }, 31 | 32 | "locales": { 33 | "type": "array", 34 | "title": "Locales", 35 | "description": "The list of each locale configuration. Each member is an instance of an i18n locale.", 36 | "items": { 37 | "$ref": "i18n-locale" 38 | } 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /reference/playlist/playlist-track.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "playlist-track", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "AudioTrackConfig", 5 | "description": "An instance of a track.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "uid": { 10 | "type": "string", 11 | "title": "UID", 12 | "description": "The UID of the track.", 13 | "example": "track-0" 14 | }, 15 | 16 | "name": { 17 | "type": "string", 18 | "title": "Name", 19 | "description": "The name of the track.", 20 | "example": "My awesome song" 21 | }, 22 | 23 | "author": { 24 | "type": "string", 25 | "title": "Author", 26 | "description": "The author of the track.", 27 | "example": "John Doo" 28 | }, 29 | 30 | "url": { 31 | "type": "string", 32 | "title": "URL", 33 | "description": "The file URL of the track.", 34 | "example": "audio/track-0.mp3" 35 | }, 36 | 37 | "loop": { 38 | "type": "boolean", 39 | "title": "Loop", 40 | "description": "This sets whether or not the track repeats after a script tells it to play.", 41 | "default": false 42 | } 43 | }, 44 | 45 | "required": [ "uid", "url" ] 46 | } -------------------------------------------------------------------------------- /reference/playlist/playlist.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "playlist", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "AudioPlaylistsConfig", 5 | "description": "An instance of the global playlist configuration.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "enabled": { 10 | "type": "boolean", 11 | "title": "Enabled", 12 | "description": "Is it enabled ?", 13 | "default": true 14 | }, 15 | 16 | "volume": { 17 | "$ref": "audio-volume" 18 | }, 19 | 20 | "default": { 21 | "anyOf": [ 22 | { "type": "string" }, 23 | { "type": "number" } 24 | ], 25 | "title": "Default List", 26 | "description": "The default playlist UID", 27 | "example": "playlist-0" 28 | }, 29 | 30 | "lists": { 31 | "type": "array", 32 | "title": "Lists", 33 | "description": "The list of playlists. Each member is an instance of a playlist.", 34 | "items": { 35 | "$ref": "playlist-config" 36 | } 37 | }, 38 | 39 | "tracks": { 40 | "type": "array", 41 | "title": "Tracks", 42 | "description": "The list of tracks. Each member is an instance of a track.", 43 | "items": { 44 | "$ref": "playlist-track" 45 | } 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /reference/plugin/plugin-configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "plugin-configuration", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "PluginConfigurationConfig", 5 | "description": "An instance of a plugin configuration.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "data": { 10 | "type": "object", 11 | "title": "Data", 12 | "description": "The eventual data associated to the plugin, specific to each plugin.", 13 | "example": {} 14 | }, 15 | 16 | "options": { 17 | "type": "object", 18 | "title": "Options", 19 | "description": "The options of this instance, specific and different for each plugin.", 20 | "example": { 21 | "key": "overwritting-previous-key", 22 | "missing-options": 42 23 | } 24 | }, 25 | 26 | "actions": { 27 | "type": "array", 28 | "title": "Actions", 29 | "description": "A list of actions associated to this plugin.", 30 | "items": { 31 | "type": "string" 32 | }, 33 | "example": [ "action-awesome-thing", "action-more-awesome" ] 34 | }, 35 | 36 | "events": { 37 | "type": "object", 38 | "title": "Events", 39 | "description": "Events to react to, specific to each plugin.", 40 | "example": { 41 | "onDrag": [ "action-more-awesome" ] 42 | } 43 | } 44 | } 45 | } -------------------------------------------------------------------------------- /reference/plugin/plugin-engine.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "plugin-engine", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "PluginEngineConfig", 5 | "description": "An instance of a plugin engine.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "uid": { 10 | "type": "string", 11 | "title": "UID", 12 | "description": "The UID of the engine.", 13 | "example": "com.awesome.plugin" 14 | }, 15 | 16 | "prefix": { 17 | "type": "string", 18 | "title": "Prefix", 19 | "description": "The prefix of the url.", 20 | "example": "./other-plugin-folder/" 21 | }, 22 | 23 | "url": { 24 | "type": "string", 25 | "title": "URL", 26 | "description": "The url/root of the Plugin relative to the prefix.", 27 | "example": "AwesomePlugin" 28 | }, 29 | 30 | "manifest": { 31 | "type": "string", 32 | "title": "Manifest", 33 | "description": "The manifest to read to know the configuration of the plugin.", 34 | "example": "manifest.json" 35 | } 36 | }, 37 | 38 | "required": [ "uid" ] 39 | } -------------------------------------------------------------------------------- /reference/plugin/plugin.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "plugin", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "PluginsConfig", 5 | "description": "An instance of the plugin object.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "prefix": { 10 | "type": "string", 11 | "title": "Prefix", 12 | "description": "The prefix to put before the path of each plugin. Can be override by the prefix properties in the plugin engine declaration.", 13 | "example": "./plugins" 14 | }, 15 | 16 | "engines": { 17 | "type": "array", 18 | "title": "Engines", 19 | "description": "List of plugin engines. Each member is an instance of a plugin engine.", 20 | "items": { 21 | "$ref": "plugin-engine" 22 | } 23 | }, 24 | 25 | "instances": { 26 | "type": "array", 27 | "title": "Instances", 28 | "description": "List of plugin instances. Each member is an instance of a plugin instance.", 29 | "items": { 30 | "$ref": "plugin-instance" 31 | } 32 | }, 33 | 34 | "configurations": { 35 | "type": "array", 36 | "title": "Configurations", 37 | "description": "List of plugin configurations. Each member is an instance of a plugin configuration.", 38 | "items": { 39 | "$ref": "plugin-configuration" 40 | } 41 | } 42 | }, 43 | 44 | "required": [ "engines", "instances", "configurations" ] 45 | } -------------------------------------------------------------------------------- /reference/postprocessing/postprocessing-fx.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "postprocessing-fx", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "FX", 5 | "description": "An instance of the special effect.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "uid": { 10 | "type": "string", 11 | "title": "UID", 12 | "description": "The UID of the special effect.", 13 | "example": "fx-0" 14 | }, 15 | 16 | "type": { 17 | "type": "string", 18 | "title": "Type", 19 | "description": "The type of the special effet.", 20 | "example": "HorizontalBlurShader" 21 | }, 22 | 23 | "params": { 24 | "type": "object", 25 | "title": "FX", 26 | "description": "The list of parameters to pass to the shader doing the special effect." 27 | } 28 | }, 29 | 30 | "required": [ "uid", "type" ] 31 | } -------------------------------------------------------------------------------- /reference/postprocessing/postprocessing-set.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "postprocessing-set", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "FXSet", 5 | "description": "An instance of the special effect set.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "uid": { 10 | "type": "string", 11 | "title": "UID", 12 | "description": "The UID of the set.", 13 | "example": "fx-set-0" 14 | }, 15 | 16 | "set": { 17 | "type": "array", 18 | "title": "FX", 19 | "description": "The list of special effect composing the set. Each member is an instance of a special effect.", 20 | "items": { 21 | "$ref": "postprocessing-fx" 22 | }, 23 | "example": [ 24 | { 25 | "type": "HorizontalBlurShader", 26 | "uid": "fx-horizontalblur-0", 27 | "params": 28 | { 29 | "h": 0.0001 30 | } 31 | }, 32 | 33 | { 34 | "type": "VerticalBlurShader", 35 | "uid": "fx-verticalblur-0", 36 | "params": 37 | { 38 | "v": 0.001 39 | } 40 | } 41 | ] 42 | } 43 | }, 44 | 45 | "required": [ "uid", "set" ] 46 | } -------------------------------------------------------------------------------- /reference/postprocessing/postprocessing.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "postprocessing", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "FXConfig", 5 | "description": "An instance of the post processing object.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "fxSets": { 10 | "type": "array", 11 | "title": "FX Sets", 12 | "description": "The list of special effect sets. Each member is an instance of a special effect set.", 13 | "items": { 14 | "$ref": "postprocessing-set" 15 | } 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /reference/root.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "root", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "MainConfig", 5 | "description": "The root of the project json configuration", 6 | "type": "object", 7 | 8 | "properties": { 9 | "viewer": { 10 | "$ref": "viewer" 11 | }, 12 | 13 | "history": { 14 | "$ref": "history" 15 | }, 16 | 17 | "i18n": { 18 | "$ref": "i18n" 19 | }, 20 | 21 | "view": { 22 | "$ref": "view" 23 | }, 24 | 25 | "camera": { 26 | "$ref": "camera" 27 | }, 28 | 29 | "controllers": { 30 | "$ref": "controller" 31 | }, 32 | 33 | "audio": { 34 | "$ref": "audio" 35 | }, 36 | 37 | "playlists": { 38 | "$ref": "playlist" 39 | }, 40 | 41 | "postProcessing": { 42 | "$ref": "postprocessing" 43 | }, 44 | 45 | "story": { 46 | "$ref": "story" 47 | }, 48 | 49 | "director": { 50 | "$ref": "director" 51 | }, 52 | 53 | "hotspots": { 54 | "$ref": "hotspot-anim" 55 | }, 56 | 57 | "actions": { 58 | "type": "array", 59 | "title": "Actions", 60 | "description": "The list of available actions in the project. Each member is an instance of an action.", 61 | "items": { 62 | "$ref": "action" 63 | } 64 | }, 65 | 66 | "plugins": { 67 | "$ref": "plugin" 68 | } 69 | } 70 | } -------------------------------------------------------------------------------- /reference/scene/scene-media-fov.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "scene-media-fov", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "SceneMediaFovConfig", 5 | "description": "The field of view of a media object. An instance of a scene media fov object.", 6 | "type": "object", 7 | 8 | "properties": { 9 | 10 | "vertical": { 11 | "type": "number", 12 | "title": "Vertical field of view", 13 | "description": "The vertical field of view of the media.", 14 | "minimum": 0, 15 | "maximum": 180, 16 | "default": 90 17 | }, 18 | 19 | "horizontal": { 20 | "type": "number", 21 | "title": "Horizontal field of view", 22 | "description": "The horizontal field of view of the media.", 23 | "minimum": 0, 24 | "maximum": 180, 25 | "default": 90 26 | }, 27 | 28 | "diagonal": { 29 | "type": "number", 30 | "title": "Diagonal field of view", 31 | "description": "The diagonal field of view of the media.", 32 | "minimum": 0, 33 | "maximum": 180, 34 | "default": 90 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /reference/scene/scene-media-preview.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "scene-media-preview", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "SceneMediaPreviewConfig", 5 | "description": "The preview object associated to the media. An instance of a scene media preview.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "url": { 10 | "type": "string", 11 | "title": "URL", 12 | "description": "The URL for the preview of the media, with a {face} parameter to specify the face when parsing. Only one image per face is authorized, so no other parameter can be specified.", 13 | "example": "multi/preview/{face}.jpg" 14 | }, 15 | 16 | "tile": { 17 | "type": "number", 18 | "title": "Tile", 19 | "description": "The size of a tile, which corresponds to the width and the height of a tile. It will be used with the width and height to compute the value of the {x} and {y} patterns.", 20 | "example": 512 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /reference/scene/scene-media-range.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "scene-media-range", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "SceneMediaRangeConfig", 5 | "description": "A range value. An instance of a scene media range object.", 6 | "type": "object", 7 | 8 | "properties": { 9 | 10 | "min": { 11 | "type": "number", 12 | "title": "Minimum value", 13 | "description": "Minimum value of the range." 14 | }, 15 | 16 | "max": { 17 | "type": "number", 18 | "title": "Maximum value", 19 | "description": "Maximum value of the range." 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /reference/scene/scene-media.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "scene-media", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "SceneMediaConfig", 5 | "description": "The media object associated to the scene. An instance of a scene media.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "uid": { 10 | "type": "string", 11 | "title": "UID", 12 | "description": "The UID of the media.", 13 | "example": "media-0" 14 | }, 15 | 16 | "type": { 17 | "type": "string", 18 | "enum": [ "image", "video", "grid" ], 19 | "title": "Type", 20 | "description": "The type of the media. Can be :
  • image
  • video
  • grid
", 21 | "example": "image" 22 | }, 23 | 24 | "preview": { 25 | "anyOf": [ 26 | { "$ref": "scene-media-preview" }, 27 | { 28 | "type": "string", 29 | "title": "Preview", 30 | "description": "The URL for the preview of the media (only works for images, simple and multi-resolution, not video)", 31 | "example": "./images/preview/scene-0-preview.jpg" 32 | } 33 | ] 34 | }, 35 | 36 | "source": { 37 | "$ref": "scene-media-source" 38 | }, 39 | 40 | "options": { 41 | "$ref": "scene-media-options" 42 | }, 43 | 44 | "events": { 45 | "$ref": "scene-media-events" 46 | }, 47 | 48 | "fx": { 49 | "type": "string", 50 | "title": "FX", 51 | "description": "The FX associated to the media.", 52 | "example": "fx-0" 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /reference/scene/scene-thumbnail.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "scene-thumbnail", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "SceneThumbConfig", 5 | "description": "The configuration of a thumbnail associated to a scene. An instance of a scene thumbnail.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "uid": { 10 | "type": "string", 11 | "title": "UID", 12 | "description": "The UID of the thumbnail.", 13 | "example": "thumb-0" 14 | }, 15 | 16 | "width": { 17 | "type": "number", 18 | "title": "Width", 19 | "description": "Width of the thumbnail.", 20 | "example": 100 21 | }, 22 | 23 | "height": { 24 | "type": "number", 25 | "title": "Height", 26 | "description": "Height of the thumbnail.", 27 | "example": 50 28 | }, 29 | 30 | "url": { 31 | "type": "string", 32 | "title": "URL", 33 | "description": "URL of the thumbnail: the file can be local or on a distant server, but must be a valid image format.", 34 | "example": "./images/scene-0-thumbnail.jpg" 35 | } 36 | } 37 | } -------------------------------------------------------------------------------- /reference/sound/sound-options.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "sound-options", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "SoundOptionsConfig", 5 | "description": "An instance of sound options.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "volume": { 10 | "anyOf": [ 11 | { "type": "number" }, 12 | { "$ref": "sound-volume" } 13 | ], 14 | "title": "Volume", 15 | "description": "The volume of the sound." 16 | }, 17 | 18 | "loop": { 19 | "type": "boolean", 20 | "title": "Loop", 21 | "description": "Does the sound need to be looped automatically at the end of playing ?", 22 | "default": false, 23 | "example": true 24 | }, 25 | 26 | "autoPlay": { 27 | "type": "boolean", 28 | "title": "Autoplay", 29 | "description": "Does the sound need to be played automatically at start ?", 30 | "default": false, 31 | "example": true 32 | }, 33 | 34 | "startTime": { 35 | "type": "number", 36 | "title": "Start Time", 37 | "description": "The starting time of the sound in milliseconds, if it needs to start after a certain time", 38 | "default": 0, 39 | "example": 0 40 | }, 41 | 42 | "range": { 43 | "type": "number", 44 | "title": "Range of the sound (only available with 3d sound)", 45 | "description": "The range of the sound in degrees, where sound can be played from it's position before it can't be heared anymore. From 1 to 360.", 46 | "minimum": 1, 47 | "maximum": 360, 48 | "default": 360, 49 | "example": 180 50 | } 51 | } 52 | } -------------------------------------------------------------------------------- /reference/sound/sound-source.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "sound-source", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "SoundSourceConfig", 5 | "description": "An instance of sound source.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "url": { 10 | "type": "string", 11 | "title": "URL", 12 | "description": "URL of the sound: can be either a local sound or one on a distant server, as long as it is a valid sound file.", 13 | "example": "audio/scene-0-hotspot.mp3" 14 | }, 15 | 16 | "target": { 17 | "type": "string", 18 | "title": "Target", 19 | "description": "The UID of the sound source target: can be either a video or an audio media.", 20 | "example": "video-0" 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /reference/sound/sound-volume.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "sound-volume", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "SoundVolumeConfig", 5 | "description": "An instance of sound volume.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "min": { 10 | "type": "number", 11 | "title": "Min", 12 | "description": "The minimum volume of the sound.", 13 | "example": 0.2, 14 | "default": 0, 15 | "minimum": 0, 16 | "maximum": 1 17 | }, 18 | 19 | "max": { 20 | "type": "number", 21 | "title": "Max", 22 | "description": "The maximum volume of the sound.", 23 | "example": 0.8, 24 | "default": 1, 25 | "minimum": 0, 26 | "maximum": 1 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /reference/sound/sound.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "sound", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "SoundConfig", 5 | "description": "An instance of a sound.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "uid": { 10 | "type": "string", 11 | "title": "UID", 12 | "description": "The UID of the sound.", 13 | "example": "sound-0" 14 | }, 15 | 16 | "type": { 17 | "type": "string", 18 | "enum": [ "stereo", "ambisonic" ], 19 | "title": "Type", 20 | "description": "What is the type of the sound :
  • stereo
  • 3d
  • ambisonic
", 21 | "default": "stereo", 22 | "example": "stereo" 23 | }, 24 | 25 | "source": { 26 | "$ref": "sound-source" 27 | }, 28 | 29 | "options": { 30 | "$ref": "sound-options" 31 | } 32 | }, 33 | 34 | "required": [ "uid" ] 35 | } -------------------------------------------------------------------------------- /reference/view/view-options.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "view-options", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ViewOptionsConfig", 5 | "description": "An instance of the view options configuration.", 6 | "type": "object", 7 | 8 | "properties": { 9 | 10 | "repeatX": { 11 | "type": "boolean", 12 | "title": "Repeat X", 13 | "description": "Does the view repeat the media on the X axis (ViewFlat only)", 14 | "default": "false" 15 | }, 16 | 17 | "repeatY": { 18 | "type": "boolean", 19 | "title": "Repeat Y", 20 | "description": "Does the view repeat the media on the Y axis (ViewFlat only)", 21 | "default": "false" 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /reference/view/view.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "view", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ViewConfig", 5 | "description": "An instance of the view configuration.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "type": { 10 | "type": "string", 11 | "enum": [ "Rectilinear", "GoPro", "Flat" ], 12 | "title": "The type of view", 13 | "description": "Two views are available:
  • Rectilinear
  • GoPro
  • Flat
", 14 | "default": "Rectilinear" 15 | }, 16 | 17 | "options": { 18 | "$ref": "view-options" 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /reference/viewer/viewer.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "viewer", 3 | "$schema": "http://json-schema.org/draft-04/schema#", 4 | "title": "ViewerConfig", 5 | "description": "An instance of the viewer global configuration.", 6 | "type": "object", 7 | 8 | "properties": { 9 | "background": { 10 | "type": "string", 11 | "title": "Background", 12 | "description": "The color of the background for the viewer, shown when there is no media displayed.", 13 | "default": "#000000", 14 | "example": "#ff645d" 15 | }, 16 | 17 | "autoPause": { 18 | "type": "boolean", 19 | "title": "Autopause", 20 | "description": "Does any sound and videoneed to be paused automatically when the page loses focus ?", 21 | "default": false 22 | }, 23 | 24 | "autoResume": { 25 | "type": "boolean", 26 | "title": "Autoresume", 27 | "description": "Does any sound need to be resumed automatically when the page gains focus ?", 28 | "default": false 29 | }, 30 | 31 | "update": { 32 | "type": "string", 33 | "title": "Update", 34 | "description": "The method used to call the update method", 35 | "example": "timeout" 36 | }, 37 | 38 | "webgl": { 39 | "$ref": "viewer-webgl" 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/FORGE.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Namespace for ForgeJS 4 | * @namespace FORGE 5 | * @type {Object} 6 | */ 7 | var FORGE = FORGE || {}; 8 | 9 | /** 10 | * Version number of ForgeJS. 11 | * @name FORGE.VERSION 12 | * @type {string} 13 | * @const 14 | */ 15 | FORGE.VERSION = '{{pkg.version}}'; 16 | 17 | /** 18 | * Array of {@link FORGE.Viewer} uids. 19 | * @name FORGE.VIEWERS 20 | * @type {Array} 21 | */ 22 | FORGE.VIEWERS = []; 23 | 24 | /** 25 | * Global debug switch. 26 | * @name FORGE.DEBUG 27 | * @type {boolean} 28 | * @const 29 | */ 30 | FORGE.DEBUG = false; 31 | 32 | /** 33 | * Global warning switch. 34 | * @name FORGE.WARNING 35 | * @type {boolean} 36 | * @const 37 | */ 38 | FORGE.WARNING = true; 39 | -------------------------------------------------------------------------------- /src/audio/SoundType.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * @namespace {Object} FORGE.SoundType 4 | */ 5 | FORGE.SoundType = {}; 6 | 7 | /** 8 | * @name FORGE.SoundType.STEREO 9 | * @type {string} 10 | * @const 11 | */ 12 | FORGE.SoundType.STEREO = "stereo"; 13 | 14 | /** 15 | * @name FORGE.SoundType.SPATIAL 16 | * @type {string} 17 | * @const 18 | */ 19 | FORGE.SoundType.SPATIAL = "3d"; 20 | 21 | /** 22 | * @name FORGE.SoundType.AMBISONIC 23 | * @type {string} 24 | * @const 25 | */ 26 | FORGE.SoundType.AMBISONIC = "ambisonic"; -------------------------------------------------------------------------------- /src/controllers/ControllerType.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * @namespace {Object} FORGE.ControllerType 4 | */ 5 | FORGE.ControllerType = {}; 6 | 7 | /** 8 | * @name FORGE.ControllerType.BASE 9 | * @type {string} 10 | * @const 11 | */ 12 | FORGE.ControllerType.BASE = "base"; 13 | 14 | /** 15 | * @name FORGE.ControllerType.POINTER 16 | * @type {string} 17 | * @const 18 | */ 19 | FORGE.ControllerType.POINTER = "pointer"; 20 | 21 | /** 22 | * @name FORGE.ControllerType.KEYBOARD 23 | * @type {string} 24 | * @const 25 | */ 26 | FORGE.ControllerType.KEYBOARD = "keyboard"; 27 | 28 | /** 29 | * @name FORGE.ControllerType.GYROSCOPE 30 | * @type {string} 31 | * @const 32 | */ 33 | FORGE.ControllerType.GYROSCOPE = "gyroscope"; 34 | 35 | /** 36 | * @name FORGE.ControllerType.GAMEPAD 37 | * @type {string} 38 | * @const 39 | */ 40 | FORGE.ControllerType.GAMEPAD = "gamepad"; 41 | -------------------------------------------------------------------------------- /src/display/video/VideoFormat.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Namespace for video format const. 4 | * @namespace {Object} FORGE.VideoFormat 5 | */ 6 | FORGE.VideoFormat = {}; 7 | 8 | /** 9 | * @name FORGE.VideoFormat.DASH 10 | * @type {string} 11 | * @const 12 | */ 13 | FORGE.VideoFormat.DASH = "dash"; 14 | 15 | /** 16 | * @name FORGE.VideoFormat.HTML5 17 | * @type {string} 18 | * @const 19 | */ 20 | FORGE.VideoFormat.HTML5 = "html5"; 21 | 22 | /** 23 | * @name FORGE.VideoFormat.UNKNOWN 24 | * @type {string} 25 | * @const 26 | */ 27 | FORGE.VideoFormat.UNKNOWN = "unknown"; -------------------------------------------------------------------------------- /src/display/video/VideoQualityMode.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Namespace for video quality mode const 4 | * @namespace {Object} FORGE.VideoQualityMode 5 | */ 6 | FORGE.VideoQualityMode = {}; 7 | 8 | /** 9 | * @name FORGE.VideoQualityMode.AUTO 10 | * @type {string} 11 | * @const 12 | */ 13 | FORGE.VideoQualityMode.AUTO = "auto"; 14 | 15 | /** 16 | * @name FORGE.VideoQualityMode.MANUAL 17 | * @type {string} 18 | * @const 19 | */ 20 | FORGE.VideoQualityMode.MANUAL = "manual"; -------------------------------------------------------------------------------- /src/event/Event.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * FORGE.Event reference an emitter and eventually some data. 4 | * 5 | * @constructor FORGE.Event 6 | * @param {Object} emitter - The object that will be considered as the emitter of the event. 7 | * @param {Object} data - Any data associated to this event. 8 | */ 9 | FORGE.Event = function(emitter, data) 10 | { 11 | /** 12 | * The object that will be considered as the emitter of the event. 13 | * @name FORGE.Event#_emitter 14 | * @type {Object} 15 | * @private 16 | */ 17 | this._emitter = emitter; 18 | 19 | /** 20 | * Any data associated to this event. 21 | * @name FORGE.Event#_data 22 | * @type {?Object} 23 | * @private 24 | */ 25 | this._data = data || null; 26 | }; 27 | 28 | 29 | FORGE.Event.prototype.constructor = FORGE.Event; 30 | 31 | /** 32 | * Get the event emitter. 33 | * @name FORGE.Event#emitter 34 | * @readonly 35 | * @type {Object} 36 | */ 37 | Object.defineProperty(FORGE.Event.prototype, "emitter", 38 | { 39 | /** @this {FORGE.Event} */ 40 | get: function () 41 | { 42 | return this._emitter; 43 | } 44 | }); 45 | 46 | /** 47 | * Get the data associated to the event. 48 | * @name FORGE.Event#data 49 | * @readonly 50 | * @type {?Object} 51 | */ 52 | Object.defineProperty(FORGE.Event.prototype, "data", 53 | { 54 | /** @this {FORGE.Event} */ 55 | get: function () 56 | { 57 | return this._data; 58 | } 59 | }); 60 | -------------------------------------------------------------------------------- /src/geom/Size.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Size object. 3 | * 4 | * @constructor FORGE.Size 5 | * @param {number} width width property 6 | * @param {number} height height property 7 | */ 8 | FORGE.Size = function(width, height) 9 | { 10 | /** 11 | * Width. 12 | * @name FORGE.Size#_width 13 | * @type {number} 14 | * @private 15 | */ 16 | this._width = width || 0; 17 | 18 | /** 19 | * Height. 20 | * @name FORGE.Size#_height 21 | * @type {number} 22 | * @private 23 | */ 24 | this._height = height || 0; 25 | }; 26 | 27 | FORGE.Size.prototype.constructor = FORGE.Size; 28 | 29 | 30 | /** 31 | * Get width. 32 | * @name FORGE.Size#width 33 | * @type {number} 34 | */ 35 | Object.defineProperty(FORGE.Size.prototype, "width", 36 | { 37 | /** @this {FORGE.Size} */ 38 | get: function() 39 | { 40 | return this._width; 41 | } 42 | }); 43 | 44 | /** 45 | * Get height. 46 | * @name FORGE.Size#height 47 | * @type {number} 48 | */ 49 | Object.defineProperty(FORGE.Size.prototype, "height", 50 | { 51 | /** @this {FORGE.Size} */ 52 | get: function() 53 | { 54 | return this._height; 55 | } 56 | }); 57 | 58 | /** 59 | * Get ratio. 60 | * @name FORGE.Size#ratio 61 | * @type {number} 62 | */ 63 | Object.defineProperty(FORGE.Size.prototype, "ratio", 64 | { 65 | /** @this {FORGE.Size} */ 66 | get: function() 67 | { 68 | return this._width / this._height; 69 | } 70 | }); 71 | -------------------------------------------------------------------------------- /src/hotspots/HotspotAnimationTrack.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A director track, that defines a camera animation. 3 | * 4 | * @constructor FORGE.HotspotAnimationTrack 5 | * @param {HotspotTrackConfig} config - Configuration of the track from the JSON file. 6 | * @extends {FORGE.Track} 7 | */ 8 | FORGE.HotspotAnimationTrack = function(config) 9 | { 10 | /** 11 | * Does the track has a smooth interpolation between keyframes ? 12 | * @name FORGE.HotspotAnimationTrack#_smooth 13 | * @type {boolean} 14 | * @private 15 | */ 16 | this._smooth = false; 17 | 18 | FORGE.Track.call(this, "HotspotAnimationTrack"); 19 | 20 | this._boot(config); 21 | }; 22 | 23 | FORGE.HotspotAnimationTrack.prototype = Object.create(FORGE.Track.prototype); 24 | FORGE.HotspotAnimationTrack.prototype.constructor = FORGE.HotspotAnimationTrack; 25 | 26 | /** 27 | * Boot sequence 28 | * 29 | * @method FORGE.HotspotAnimationTrack#_boot 30 | * @param {Object} config - The information on the track 31 | * @private 32 | */ 33 | FORGE.HotspotAnimationTrack.prototype._boot = function(config) 34 | { 35 | this._smooth = config.smooth; 36 | 37 | FORGE.Track.prototype._boot.call(this, config); 38 | }; -------------------------------------------------------------------------------- /src/hotspots/HotspotGeometryType.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @namespace {Object} FORGE.HotspotGeometryType 3 | */ 4 | FORGE.HotspotGeometryType = {}; 5 | 6 | /** 7 | * @name FORGE.HotspotGeometryType.PLANE 8 | * @type {string} 9 | * @const 10 | */ 11 | FORGE.HotspotGeometryType.PLANE = "plane"; 12 | 13 | /** 14 | * @name FORGE.HotspotGeometryType.BOX 15 | * @type {string} 16 | * @const 17 | */ 18 | FORGE.HotspotGeometryType.BOX = "box"; 19 | 20 | /** 21 | * @name FORGE.HotspotGeometryType.SPHERE 22 | * @type {string} 23 | * @const 24 | */ 25 | FORGE.HotspotGeometryType.SPHERE = "sphere"; 26 | 27 | /** 28 | * @name FORGE.HotspotGeometryType.CYLINDER 29 | * @type {string} 30 | * @const 31 | */ 32 | FORGE.HotspotGeometryType.CYLINDER = "cylinder"; 33 | 34 | /** 35 | * @name FORGE.HotspotGeometryType.SHAPE 36 | * @type {string} 37 | * @const 38 | */ 39 | FORGE.HotspotGeometryType.SHAPE = "shape"; 40 | 41 | -------------------------------------------------------------------------------- /src/hotspots/HotspotType.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * @namespace {Object} FORGE.HotspotType 4 | */ 5 | FORGE.HotspotType = {}; 6 | 7 | /** 8 | * @name FORGE.HotspotType.THREE_DIMENSIONAL 9 | * @type {string} 10 | * @const 11 | */ 12 | FORGE.HotspotType.THREE_DIMENSIONAL = "3d"; 13 | 14 | /** 15 | * @name FORGE.HotspotType.DOM 16 | * @type {string} 17 | * @const 18 | */ 19 | FORGE.HotspotType.DOM = "dom"; 20 | -------------------------------------------------------------------------------- /src/loader/File.js: -------------------------------------------------------------------------------- 1 | /** 2 | * File object description.
3 | * Used in {@link FORGE.Loader} 4 | * 5 | * @constructor FORGE.File 6 | */ 7 | FORGE.File = function() 8 | { 9 | 10 | }; 11 | 12 | /** 13 | * The key of the file. 14 | * @name FORGE.File#key 15 | * @type {string} 16 | */ 17 | FORGE.File.prototype.key = ""; 18 | 19 | /** 20 | * The url of the file. 21 | * @name FORGE.File#url 22 | * @type {string} 23 | */ 24 | FORGE.File.prototype.url = ""; 25 | 26 | /** 27 | * The type of the file. 28 | * @name FORGE.File#type 29 | * @type {string} 30 | */ 31 | FORGE.File.prototype.type = ""; 32 | 33 | /** 34 | * The file data. 35 | * @name FORGE.File#data 36 | * @type {Object|string} 37 | */ 38 | FORGE.File.prototype.data = null; 39 | 40 | /** 41 | * The XMLHttpRequest response. 42 | * @name FORGE.File#xhr 43 | * @type {Object} 44 | */ 45 | FORGE.File.prototype.xhr = null; 46 | 47 | /** 48 | * The loading satatus of the file. 49 | * @name FORGE.File#loading 50 | * @type {boolean} 51 | */ 52 | FORGE.File.prototype.loading = false; 53 | 54 | /** 55 | * File is loaded? 56 | * @name FORGE.File#loaded 57 | * @type {boolean} 58 | */ 59 | FORGE.File.prototype.loaded = false; 60 | 61 | /** 62 | * The error text of the file. 63 | * @name FORGE.File#error 64 | * @type {string} 65 | */ 66 | FORGE.File.prototype.error = ""; 67 | 68 | FORGE.File.prototype.constructor = FORGE.File; -------------------------------------------------------------------------------- /src/media/MediaFormat.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * @namespace {Object} FORGE.MediaFormat 4 | */ 5 | FORGE.MediaFormat = {}; 6 | 7 | /** 8 | * @name FORGE.MediaFormat.EQUIRECTANGULAR 9 | * @type {string} 10 | * @const 11 | */ 12 | FORGE.MediaFormat.EQUIRECTANGULAR = "equi"; 13 | 14 | /** 15 | * @name FORGE.MediaFormat.CUBE 16 | * @type {string} 17 | * @const 18 | */ 19 | FORGE.MediaFormat.CUBE = "cube"; 20 | 21 | /** 22 | * @name FORGE.MediaFormat.FLAT 23 | * @type {string} 24 | * @const 25 | */ 26 | FORGE.MediaFormat.FLAT = "flat"; 27 | 28 | /** 29 | * @name FORGE.MediaFormat.HOTSPOT 30 | * @type {string} 31 | * @const 32 | */ 33 | FORGE.MediaFormat.HOTSPOT = "hotspot"; 34 | -------------------------------------------------------------------------------- /src/media/MediaType.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * @namespace {Object} FORGE.MediaType 4 | */ 5 | FORGE.MediaType = {}; 6 | 7 | /** 8 | * @name FORGE.MediaType.UNDEFINED 9 | * @type {string} 10 | * @const 11 | */ 12 | FORGE.MediaType.UNDEFINED = "undefined"; 13 | 14 | /** 15 | * @name FORGE.MediaType.IMAGE 16 | * @type {string} 17 | * @const 18 | */ 19 | FORGE.MediaType.IMAGE = "image"; 20 | 21 | /** 22 | * @name FORGE.MediaType.VIDEO 23 | * @type {string} 24 | * @const 25 | */ 26 | FORGE.MediaType.VIDEO = "video"; 27 | 28 | /** 29 | * @name FORGE.MediaType.GRID 30 | * @type {string} 31 | * @const 32 | */ 33 | FORGE.MediaType.GRID = "grid"; 34 | -------------------------------------------------------------------------------- /src/render/RenderParams.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Render parameters 3 | * 4 | * @constructor FORGE.RenderParams 5 | * @param {FORGE.Rectangle} rectangle render rectangle 6 | * @param {THREE.PerspectiveCamera} camera render camera 7 | */ 8 | FORGE.RenderParams = function(rectangle, camera) 9 | { 10 | /** 11 | * Render rectangle. 12 | * @name FORGE.RenderParams#_rectangle 13 | * @type {FORGE.Rectangle} 14 | * @private 15 | */ 16 | this._rectangle = rectangle || null; 17 | 18 | /** 19 | * Render camera. 20 | * @name FORGE.RenderParams#_camera 21 | * @type {THREE.PerspectiveCamera} 22 | * @private 23 | */ 24 | this._camera = camera || null; 25 | }; 26 | 27 | FORGE.RenderParams.prototype.constructor = FORGE.RenderParams; 28 | 29 | /** 30 | * Get rectangle. 31 | * @name FORGE.RenderParams#rectangle 32 | * @type {FORGE.Rectangle} 33 | */ 34 | Object.defineProperty(FORGE.RenderParams.prototype, "rectangle", 35 | { 36 | /** @this {FORGE.RenderParams} */ 37 | get: function() 38 | { 39 | return this._rectangle; 40 | } 41 | }); 42 | 43 | /** 44 | * Get camera. 45 | * @name FORGE.RenderParams#camera 46 | * @type {THREE.PerspectiveCamera} 47 | */ 48 | Object.defineProperty(FORGE.RenderParams.prototype, "camera", 49 | { 50 | /** @this {FORGE.RenderParams} */ 51 | get: function() 52 | { 53 | return this._camera; 54 | } 55 | }); 56 | -------------------------------------------------------------------------------- /src/render/background/BackgroundType.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @namespace {Object} FORGE.BackgroundType 3 | */ 4 | FORGE.BackgroundType = {}; 5 | 6 | /** 7 | * @name FORGE.BackgroundType.UNDEFINED 8 | * @type {string} 9 | * @const 10 | */ 11 | FORGE.BackgroundType.UNDEFINED = "undefined"; 12 | 13 | /** 14 | * @name FORGE.BackgroundType.SHADER 15 | * @type {string} 16 | * @const 17 | */ 18 | FORGE.BackgroundType.SHADER = "shader"; 19 | 20 | /** 21 | * @name FORGE.BackgroundType.MESH 22 | * @type {string} 23 | * @const 24 | */ 25 | FORGE.BackgroundType.MESH = "mesh"; 26 | 27 | /** 28 | * @name FORGE.BackgroundType.PYRAMID 29 | * @type {string} 30 | * @const 31 | */ 32 | FORGE.BackgroundType.PYRAMID = "pyramid"; 33 | -------------------------------------------------------------------------------- /src/render/postProcessing/EffectComposerType.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @namespace {Object} FORGE.EffectComposerType 3 | */ 4 | FORGE.EffectComposerType = {}; 5 | 6 | /** 7 | * Main effect composer 8 | * @name FORGE.EffectComposerType.MAIN 9 | * @type {string} 10 | * @const 11 | */ 12 | FORGE.EffectComposerType.MAIN = "main"; 13 | 14 | /** 15 | * Render effect composer 16 | * @name FORGE.EffectComposerType.RENDER 17 | * @type {string} 18 | * @const 19 | */ 20 | FORGE.EffectComposerType.RENDER = "render"; 21 | 22 | /** 23 | * Picking effect composer 24 | * @name FORGE.EffectComposerType.PICKING 25 | * @type {string} 26 | * @const 27 | */ 28 | FORGE.EffectComposerType.PICKING = "picking"; 29 | -------------------------------------------------------------------------------- /src/render/postProcessing/PassPosition.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @namespace {Object} FORGE.PassPosition 3 | */ 4 | FORGE.PassPosition = {}; 5 | 6 | /** 7 | * @name FORGE.PassPosition.UNKNOWN 8 | * @type {string} 9 | * @const 10 | */ 11 | FORGE.PassPosition.UNKNOWN = ""; 12 | 13 | /** 14 | * @name FORGE.PassPosition.BACKGROUND 15 | * @type {string} 16 | * @const 17 | */ 18 | FORGE.PassPosition.BACKGROUND = "background"; 19 | 20 | /** 21 | * @name FORGE.PassPosition.RENDER 22 | * @type {string} 23 | * @const 24 | */ 25 | FORGE.PassPosition.RENDER = "render"; 26 | 27 | /** 28 | * @name FORGE.PassPosition.GLOBAL 29 | * @type {string} 30 | * @const 31 | */ 32 | FORGE.PassPosition.GLOBAL = "global"; 33 | -------------------------------------------------------------------------------- /src/render/postProcessing/RenderPass.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @constructor FORGE.RenderPass 3 | * @param {THREE.Scene} scene - scene to be rendered 4 | * @param {THREE.Camera} camera - rendering camera 5 | * @param {THREE.Material=} overrideMaterial - optional override material 6 | * @param {THREE.Color=} clearColor - optional clear color 7 | * @param {boolean=} clearAlpha - optional clear alpha 8 | * @extends {THREE.RenderPass} 9 | */ 10 | FORGE.RenderPass = function( scene, camera, overrideMaterial, clearColor, clearAlpha ) 11 | { 12 | /** 13 | * Rendering position. 14 | * @name FORGE.RenderPass#_position 15 | * @type {string} 16 | * @private 17 | */ 18 | this._position = ""; 19 | 20 | THREE.RenderPass.call(this, scene, camera, overrideMaterial, clearColor, clearAlpha); 21 | }; 22 | 23 | FORGE.RenderPass.prototype = Object.create(THREE.RenderPass.prototype); 24 | FORGE.RenderPass.prototype.constructor = FORGE.RenderPass; 25 | 26 | /** 27 | * Get RenderPass position 28 | * @name FORGE.RenderPass#position 29 | * @type {string} 30 | */ 31 | Object.defineProperty(FORGE.RenderPass.prototype, "position", 32 | { 33 | /** @this {FORGE.RenderPass} */ 34 | get: function() 35 | { 36 | return this._position; 37 | }, 38 | 39 | /** @this {FORGE.RenderPass} */ 40 | set: function(position) 41 | { 42 | this._position = position; 43 | } 44 | }); 45 | -------------------------------------------------------------------------------- /src/render/postProcessing/TexturePass.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @constructor FORGE.TexturePass 3 | * @param {THREE.Texture} map - map texture 4 | * @param {number=} opacity - opacity 5 | * @extends {THREE.TexturePass} 6 | */ 7 | FORGE.TexturePass = function( map, opacity ) 8 | { 9 | /** 10 | * Rendering position. 11 | * @name FORGE.TexturePass#_position 12 | * @type {string} 13 | * @private 14 | */ 15 | this._position = ""; 16 | 17 | THREE.TexturePass.call(this, map, opacity); 18 | }; 19 | 20 | FORGE.TexturePass.prototype = Object.create(THREE.TexturePass.prototype); 21 | FORGE.TexturePass.prototype.constructor = FORGE.TexturePass; 22 | 23 | /** 24 | * Get TexturePass position 25 | * @name FORGE.TexturePass#position 26 | * @type {string} 27 | */ 28 | Object.defineProperty(FORGE.TexturePass.prototype, "position", 29 | { 30 | /** @this {FORGE.TexturePass} */ 31 | get: function() 32 | { 33 | return this._position; 34 | }, 35 | 36 | /** @this {FORGE.TexturePass} */ 37 | set: function(position) 38 | { 39 | this._position = position; 40 | } 41 | }); 42 | -------------------------------------------------------------------------------- /src/render/shader/ShaderChunk.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @namespace {Object} FORGE.ShaderChunk 3 | */ 4 | 5 | FORGE.ShaderChunk = {}; -------------------------------------------------------------------------------- /src/render/shader/ShaderChunk/common/coordinates.glsl: -------------------------------------------------------------------------------- 1 | /** 2 | * Converts 3D point from spherical into cartersian coordinates 3 | * @param {vec3} rtp - spherical coordinates (.x = radius, .y = azimuth, .z = elevation) 4 | * @return {vec3} cartesian coordinates xyz 5 | */ 6 | vec3 toCartesian(in vec3 rtp) { 7 | float r = rtp.x; 8 | float theta = rtp.y; 9 | float phi = rtp.z; 10 | float x = r * cos(phi) * sin(theta); 11 | float y = r * sin(phi); 12 | float z = r * cos(phi) * cos(theta); 13 | return vec3(x,y,z); 14 | } 15 | 16 | /** 17 | * Converts 3D point from cartersian into spherical coordinates 18 | * @param {vec3} pt - cartesian coordinates xyz 19 | * @return {object} rtp spherical coordinates (.x = radius, .y = azimuth, .z = elevation) 20 | */ 21 | vec3 toSpherical(in vec3 pt) { 22 | float r = length(pt); 23 | float theta = -atan(pt.x, pt.z); 24 | float phi = asin(pt.y / r); 25 | return vec3(r,theta,phi); 26 | } 27 | -------------------------------------------------------------------------------- /src/render/shader/ShaderChunk/common/defines.glsl: -------------------------------------------------------------------------------- 1 | precision highp float; 2 | precision highp int; 3 | 4 | #define PI_2 1.5707963268 5 | #define PI 3.141592653589793 6 | #define PI2 6.28318530717959 7 | #define RECIPROCAL_PI2 0.1591549430919 8 | 9 | // Macro boolean check on integer variable 10 | #define isTrue(a) ((a) != 0) 11 | -------------------------------------------------------------------------------- /src/render/shader/ShaderChunk/common/helpers.glsl: -------------------------------------------------------------------------------- 1 | /** 2 | * wrap a value between 2 edges 3 | * @param {float} x - value 4 | * @param {float} min - low edge 5 | * @param {float} max - high edge 6 | * @return {float} wrapped value 7 | */ 8 | float wrap(in float x, in float min, in float max) { 9 | return x - ((max - min) * (1.0 - step(x, min) - step(x, max))); 10 | } 11 | 12 | /** 13 | * get current fragment in clip space 14 | * @return {vec2} fragment 15 | */ 16 | vec2 getFragment() { 17 | return (2.0 * gl_FragCoord.xy / tViewportResolution - 1.0) * vec2(tViewportResolutionRatio, 1.0); 18 | } 19 | 20 | /** 21 | * Get smooth UV coordinates to remove some aliasing artefacts 22 | * @param {vec2} vec2 uv - texture coordinates 23 | * @param {vec2} vec2 texSize - texture size 24 | * @return {vec2} smooth coordinates 25 | */ 26 | vec2 smoothTexUV(vec2 uv, vec2 texSize) { 27 | uv = uv * texSize + 0.5; 28 | vec2 iuv = floor(uv); 29 | vec2 fuv = uv - iuv; 30 | uv = iuv + fuv * fuv * fuv * (fuv * (fuv * 6.0 - 15.0) + 10.0); 31 | return (uv - 0.5) / texSize; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /src/render/shader/ShaderChunk/common/texcoords.glsl: -------------------------------------------------------------------------------- 1 | /** 2 | * Get equirectangular texture coordinates UV from projected point 3 | * Theta equals 0 at center of the equirectangular texture, -pi at left and +pi at right 4 | * @param {vec2} thetaphi - spherical angular coordinates 5 | * @return {vec2} equirectangular coordinates 6 | */ 7 | vec2 toEquirectangularTexCoords(in vec2 thetaphi) { 8 | thetaphi.x = wrap(thetaphi.x + PI, -PI, PI); 9 | vec2 coords = 0.5 + thetaphi / vec2(PI2, PI); 10 | return coords; 11 | } 12 | -------------------------------------------------------------------------------- /src/render/shader/ShaderChunk/common/uniforms.glsl: -------------------------------------------------------------------------------- 1 | uniform mat4 modelMatrix; 2 | uniform mat4 modelViewMatrix; 3 | uniform mat4 projectionMatrix; 4 | uniform mat4 viewMatrix; 5 | uniform mat3 normalMatrix; 6 | uniform vec3 cameraPosition; 7 | -------------------------------------------------------------------------------- /src/render/shader/ShaderChunk/common/vert_attributes.glsl: -------------------------------------------------------------------------------- 1 | attribute vec3 position; 2 | attribute vec3 normal; 3 | attribute vec2 uv; 4 | -------------------------------------------------------------------------------- /src/render/shader/ShaderChunk/common/vert_attributes_wireframe.glsl: -------------------------------------------------------------------------------- 1 | attribute vec3 position; 2 | attribute vec3 normal; 3 | attribute vec2 uv; 4 | attribute vec2 quadrilateralCoords; 5 | -------------------------------------------------------------------------------- /src/render/shader/ShaderChunk/screenToWorld/stw_frag_proj_flat.glsl: -------------------------------------------------------------------------------- 1 | /** 2 | * Fragment shader reverse projection - screen to world 3 | * Flat view projection 4 | */ 5 | 6 | #include 7 | 8 | uniform sampler2D tTexture; 9 | uniform vec2 tViewportResolution; 10 | uniform float tViewportResolutionRatio; 11 | uniform float tTextureRatio; 12 | uniform float tFov; 13 | uniform float tYaw; 14 | uniform float tPitch; 15 | 16 | uniform int tRepeatX; 17 | uniform int tRepeatY; 18 | 19 | #include 20 | #include 21 | #include 22 | 23 | void main() { 24 | // Texture resolution in spherical coordinates 25 | vec2 sTexResolution = PI * vec2(tTextureRatio, 1.0); 26 | 27 | // Frame reference in spherical coordinates 28 | vec2 sReference = vec2(tYaw, tPitch) + sTexResolution / 2.0; 29 | 30 | // Get texel in spherical coordinates 31 | vec2 sTexel = sReference + (tFov * 0.5) * getFragment(); 32 | 33 | // Get texture coordinates 34 | vec2 uv = sTexel / sTexResolution; 35 | 36 | if (isTrue(tRepeatX)) { 37 | uv.x = mod(uv.x, 1.0); 38 | } 39 | else if (uv.x > 1.0 || uv.x < 0.0) { 40 | discard; 41 | } 42 | 43 | if (isTrue(tRepeatY)) { 44 | uv.y = mod(uv.y, 1.0); 45 | } 46 | else if (uv.y > 1.0 || uv.y < 0.0) { 47 | discard; 48 | } 49 | 50 | gl_FragColor = vec4(texture2D(tTexture, uv).rgb, 1.0); 51 | } 52 | -------------------------------------------------------------------------------- /src/render/shader/ShaderChunk/screenToWorld/stw_frag_proj_gopro.glsl: -------------------------------------------------------------------------------- 1 | /** 2 | * Fragment shader reverse projection - screen to world 3 | * GoPro view projection 4 | */ 5 | 6 | #include 7 | 8 | uniform sampler2D tTexture; 9 | uniform vec2 tViewportResolution; 10 | uniform float tViewportResolutionRatio; 11 | uniform mat4 tModelViewMatrixInverse; 12 | uniform float tProjectionDistance; 13 | uniform float tProjectionScale; 14 | 15 | #include 16 | #include 17 | #include 18 | 19 | vec2 projection() { 20 | 21 | vec2 frag = getFragment(); 22 | vec2 c = tProjectionScale * frag; 23 | float zs = tProjectionDistance; 24 | float xy2 = dot(c,c); 25 | float zs12 = (zs + 1.0) * (zs + 1.0); 26 | float delta = 4.0 * (zs * zs * xy2 * xy2 - (xy2 + zs12) * (xy2 * zs * zs - zs12)); 27 | if (delta < 0.0) { return vec2(-1.); } 28 | float z = (2.0 * zs * xy2 - sqrt(delta)) / (2.0 * (zs12 + xy2)); 29 | float x = c.x * ((zs - z) / (zs + 1.0)); 30 | float y = c.y * ((zs - z) / (zs + 1.0)); 31 | vec3 vx = vec3(tModelViewMatrixInverse * vec4(x, y, z, 1.0)); 32 | return toSpherical(vx).yz; 33 | } 34 | 35 | void main() { 36 | vec2 texCoords = toEquirectangularTexCoords(projection()); 37 | gl_FragColor = vec4(texture2D(tTexture, texCoords).rgb, 1.0); 38 | } 39 | -------------------------------------------------------------------------------- /src/render/shader/ShaderChunk/screenToWorld/stw_frag_proj_rectilinear.glsl: -------------------------------------------------------------------------------- 1 | /** 2 | * Fragment shader reverse projection - screen to world 3 | * Rectilinear view projection 4 | */ 5 | 6 | #include 7 | 8 | uniform sampler2D tTexture; 9 | uniform vec2 tViewportResolution; 10 | uniform float tViewportResolutionRatio; 11 | uniform mat4 tModelViewMatrixInverse; 12 | uniform float tProjectionScale; 13 | 14 | #include 15 | #include 16 | #include 17 | 18 | vec2 projection() { 19 | // [-1 .. 1 , -1 .. 1] 20 | vec2 frag = tProjectionScale * getFragment(); 21 | 22 | // Screen point is on the zn plane, expressed it in clip space 23 | vec4 screenPT = vec4(frag, -1.0, 1.0); 24 | 25 | // World space point 26 | vec4 worldPT = tModelViewMatrixInverse * screenPT; 27 | 28 | // Spherical point for texture lookup 29 | return toSpherical(worldPT.xyz).yz; 30 | } 31 | 32 | void main() { 33 | vec2 texCoords = toEquirectangularTexCoords(projection()); 34 | gl_FragColor = vec4(texture2D(tTexture, texCoords).rgb, 1.0); 35 | } 36 | -------------------------------------------------------------------------------- /src/render/shader/ShaderChunk/screenToWorld/stw_vert_proj.glsl: -------------------------------------------------------------------------------- 1 | /** 2 | * Vertex shader - screen to world 3 | */ 4 | 5 | #include 6 | 7 | void main() { 8 | gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); 9 | } 10 | 11 | -------------------------------------------------------------------------------- /src/render/shader/ShaderChunk/worldToScreen/wts_frag.glsl: -------------------------------------------------------------------------------- 1 | /** 2 | * Fragment shader 3 | */ 4 | 5 | #include 6 | 7 | uniform sampler2D tTexture; 8 | uniform float tOpacity; 9 | 10 | varying vec2 vUv; 11 | 12 | void main() { 13 | vec4 texel = texture2D( tTexture, vUv ); 14 | gl_FragColor = vec4(texel.rgb, texel.a * tOpacity); 15 | } 16 | -------------------------------------------------------------------------------- /src/render/shader/ShaderChunk/worldToScreen/wts_frag_addition.glsl: -------------------------------------------------------------------------------- 1 | /** 2 | * Addition pass shader 3 | */ 4 | 5 | #include 6 | 7 | uniform sampler2D tTexture; 8 | uniform sampler2D tAdd; 9 | 10 | varying vec2 vUv; 11 | 12 | void main() { 13 | vec4 texel = texture2D( tTexture, vUv ); 14 | vec4 texelAdd = texture2D( tAdd, vUv ); 15 | float alpha = max(texel.a, texelAdd.a); 16 | gl_FragColor = vec4(vec3(texelAdd.a * texelAdd.rgb + (1.0 - texelAdd.a) * texel.rgb), alpha); 17 | } 18 | -------------------------------------------------------------------------------- /src/render/shader/ShaderChunk/worldToScreen/wts_frag_color.glsl: -------------------------------------------------------------------------------- 1 | /** 2 | * Fragment shader - single color drawing 3 | */ 4 | 5 | #include 6 | 7 | uniform vec3 tColor; 8 | uniform float tOpacity; 9 | 10 | varying vec2 vUv; 11 | 12 | void main() { 13 | vec2 texCoords = vUv; 14 | gl_FragColor = vec4(tColor, tOpacity); 15 | } 16 | -------------------------------------------------------------------------------- /src/render/shader/ShaderChunk/worldToScreen/wts_frag_wireframe.glsl: -------------------------------------------------------------------------------- 1 | /** 2 | * Fragment shader drawing wireframe 3 | * Wireframe is computed using barycentric coordinates 4 | * Compute distance to the edge to find what should be displayed 5 | */ 6 | 7 | #extension GL_OES_standard_derivatives : enable 8 | 9 | #include 10 | 11 | // Set thickness to 1.5. Seems like 1.0 adds aliasing to the grid. 12 | #define WIRE_THICKNESS 1.50 13 | 14 | uniform vec3 tColor; 15 | 16 | varying vec2 vQuadrilateralCoords; 17 | 18 | void main() { 19 | // Wireframe should be drawn when barycentric coords of 20 | // opposite corner is near zero. 21 | // Compute quadratic sum of partial derivatives to get a fixed 22 | // width and a threshold giving a smooth profile. 23 | vec2 dfdx = dFdx(vQuadrilateralCoords); 24 | vec2 dfdy = dFdy(vQuadrilateralCoords); 25 | vec2 threshold = vec2(WIRE_THICKNESS * sqrt(dfdx * dfdx + dfdy * dfdy)); 26 | 27 | // Compute amount at local point depending on threshold 28 | // and apply smoothstep for antialiasing 29 | vec2 amount = smoothstep(vec2(0.0), WIRE_THICKNESS * threshold, vec2(1.0) - abs(vQuadrilateralCoords)); 30 | 31 | // Use amount to compute color and alpha and draw the texel 32 | float alpha = 1.0 - amount.x * amount.y; 33 | 34 | gl_FragColor = vec4(tColor.rgb, alpha); 35 | } 36 | -------------------------------------------------------------------------------- /src/render/shader/ShaderChunk/worldToScreen/wts_vert_gopro.glsl: -------------------------------------------------------------------------------- 1 | /** 2 | * Vertex shader 3 | * GoPro view projection 4 | * 5 | * To fit with screen to world projection, world points are first projected on a unit sphere (normalized) 6 | * Then sphere points are scaled and shifted by a negative offset on z-axis to simulate projection from 7 | * a point at a distance from sphere center. 8 | * Finally, projectionMatrix is applied to project from origin that is no more the origin of the sphere. 9 | * Note: FOV used to update projection matrix should be computed to take scale and offset into account. 10 | */ 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | uniform float tProjectionDistance; 17 | 18 | varying vec2 vUv; 19 | 20 | void main() { 21 | vec4 spherePt = normalize(modelViewMatrix * vec4( position, 1.0 )); 22 | float radius = 1.0 - 0.5 * tProjectionDistance; 23 | float offset = radius - 1.0; 24 | spherePt.xyz *= radius; 25 | spherePt.z += offset; 26 | 27 | gl_Position = projectionMatrix * spherePt; 28 | vUv = uv; 29 | } 30 | -------------------------------------------------------------------------------- /src/render/shader/ShaderChunk/worldToScreen/wts_vert_gopro_wireframe.glsl: -------------------------------------------------------------------------------- 1 | /** 2 | * Vertex shader 3 | * GoPro view projection 4 | * 5 | * To fit with screen to world projection, world points are first projected on a unit sphere (normalized) 6 | * Then sphere points are scaled and shifted by a negative offset on z-axis to simulate projection from 7 | * a point at a distance from sphere center. 8 | * Finally, projectionMatrix is applied to project from origin that is no more the origin of the sphere. 9 | * Note: FOV used to update projection matrix should be computed to take scale and offset into account. 10 | */ 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | uniform float tProjectionDistance; 17 | 18 | varying vec2 vQuadrilateralCoords; 19 | 20 | void main() { 21 | vec4 spherePt = normalize(modelViewMatrix * vec4( position, 1.0 )); 22 | float radius = 1.0 - 0.5 * tProjectionDistance; 23 | float offset = radius - 1.0; 24 | spherePt.xyz *= radius; 25 | spherePt.z += offset; 26 | 27 | gl_Position = projectionMatrix * spherePt; 28 | 29 | vQuadrilateralCoords = quadrilateralCoords; 30 | } 31 | -------------------------------------------------------------------------------- /src/render/shader/ShaderChunk/worldToScreen/wts_vert_rectilinear.glsl: -------------------------------------------------------------------------------- 1 | /** 2 | * Vertex shader 3 | * Rectilinear view projection 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | varying vec2 vUv; 11 | 12 | void main() { 13 | vec4 camPt = modelViewMatrix * vec4( position, 1.0 ); 14 | gl_Position = projectionMatrix * camPt; 15 | vUv = uv; 16 | } 17 | -------------------------------------------------------------------------------- /src/render/shader/ShaderChunk/worldToScreen/wts_vert_rectilinear_wireframe.glsl: -------------------------------------------------------------------------------- 1 | /** 2 | * Vertex shader 3 | * Rectilinear view projection 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | varying vec2 vQuadrilateralCoords; 11 | 12 | void main() { 13 | vec4 camPt = modelViewMatrix * vec4( position, 1.0 ); 14 | 15 | gl_Position = projectionMatrix * camPt; 16 | 17 | vQuadrilateralCoords = quadrilateralCoords; 18 | } 19 | -------------------------------------------------------------------------------- /src/render/view/ViewType.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @namespace {Object} FORGE.ViewType 3 | */ 4 | FORGE.ViewType = {}; 5 | 6 | /** 7 | * @name FORGE.ViewType.UNDEFINED 8 | * @type {string} 9 | * @const 10 | */ 11 | FORGE.ViewType.UNDEFINED = "undefined"; 12 | 13 | /** 14 | * @name FORGE.ViewType.FLAT 15 | * @type {string} 16 | * @const 17 | */ 18 | FORGE.ViewType.FLAT = "flat"; 19 | 20 | /** 21 | * @name FORGE.ViewType.RECTILINEAR 22 | * @type {string} 23 | * @const 24 | */ 25 | FORGE.ViewType.RECTILINEAR = "rectilinear"; 26 | 27 | /** 28 | * @name FORGE.ViewType.GOPRO 29 | * @type {string} 30 | * @const 31 | */ 32 | FORGE.ViewType.GOPRO = "gopro"; 33 | -------------------------------------------------------------------------------- /src/timeline/Keyframe.js: -------------------------------------------------------------------------------- 1 | /** 2 | * A keyframe is a data associated to a time. 3 | * @constructor FORGE.Keyframe 4 | * @param {number} time - Time of the keyframe. 5 | * @param {Object} data - Data bound to the keyframe. 6 | * @extends {FORGE.BaseObject} 7 | */ 8 | FORGE.Keyframe = function(time, data) 9 | { 10 | FORGE.BaseObject.call(this, "Keyframe"); 11 | 12 | /** 13 | * The time associated to this keyframe. 14 | * @name FORGE.Keyframe#_time 15 | * @type {number} 16 | * @private 17 | */ 18 | this._time = time; 19 | 20 | /** 21 | * The data associated to this keyframe. 22 | * @name FORGE.Keyframe#_data 23 | * @type {Object} 24 | * @private 25 | */ 26 | this._data = data; 27 | }; 28 | 29 | FORGE.Keyframe.prototype = Object.create(FORGE.BaseObject.prototype); 30 | FORGE.Keyframe.prototype.constructor = FORGE.Keyframe; 31 | 32 | /** 33 | * Get and set the time of keyframe. 34 | * @name FORGE.Keyframe#time 35 | * @type {number} 36 | */ 37 | Object.defineProperty(FORGE.Keyframe.prototype, "time", 38 | { 39 | /** @this {FORGE.Keyframe} */ 40 | get: function() 41 | { 42 | return this._time; 43 | }, 44 | 45 | /** @this {FORGE.Keyframe} */ 46 | set: function(value) 47 | { 48 | if (typeof value === "number") 49 | { 50 | this._time = value; 51 | } 52 | } 53 | }); 54 | 55 | /** 56 | * Get and set the data of keyframe. 57 | * @name FORGE.Keyframe#data 58 | * @type {Object} 59 | */ 60 | Object.defineProperty(FORGE.Keyframe.prototype, "data", 61 | { 62 | /** @this {FORGE.Keyframe} */ 63 | get: function() 64 | { 65 | return this._data; 66 | }, 67 | 68 | /** @this {FORGE.Keyframe} */ 69 | set: function(value) 70 | { 71 | this._data = value; 72 | } 73 | }); -------------------------------------------------------------------------------- /src/tween/EasingType.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @namespace {Object} FORGE.EasingType 3 | */ 4 | FORGE.EasingType = {}; 5 | 6 | /** 7 | * @name FORGE.EasingType.LINEAR 8 | * @type {string} 9 | * @const 10 | */ 11 | FORGE.EasingType.LINEAR = "linear"; 12 | 13 | /** 14 | * @name FORGE.EasingType.SINE_IN 15 | * @type {string} 16 | * @const 17 | */ 18 | FORGE.EasingType.SINE_IN = "easeInSine"; 19 | 20 | /** 21 | * @name FORGE.EasingType.SINE_IN_OUT 22 | * @type {string} 23 | * @const 24 | */ 25 | FORGE.EasingType.SINE_IN_OUT = "easeInOutSine"; 26 | 27 | /** 28 | * @name FORGE.EasingType.SINE_OUT 29 | * @type {string} 30 | * @const 31 | */ 32 | FORGE.EasingType.SINE_OUT = "easeOutSine"; 33 | 34 | /** 35 | * @name FORGE.EasingType.QUAD_IN 36 | * @type {string} 37 | * @const 38 | */ 39 | FORGE.EasingType.QUAD_IN = "easeInQuad"; 40 | 41 | /** 42 | * @name FORGE.EasingType.QUAD_IN_OUT 43 | * @type {string} 44 | * @const 45 | */ 46 | FORGE.EasingType.QUAD_IN_OUT = "easeInOutQuad"; 47 | 48 | /** 49 | * @name FORGE.EasingType.QUAD_OUT 50 | * @type {string} 51 | * @const 52 | */ 53 | FORGE.EasingType.QUAD_OUT = "easeOutQuad"; 54 | 55 | /** 56 | * @name FORGE.EasingType.CUBIC_IN 57 | * @type {string} 58 | * @const 59 | */ 60 | FORGE.EasingType.CUBIC_IN = "easeInCubic"; 61 | 62 | /** 63 | * @name FORGE.EasingType.CUBIC_IN_OUT 64 | * @type {string} 65 | * @const 66 | */ 67 | FORGE.EasingType.CUBIC_IN_OUT = "easeInOutCubic"; 68 | 69 | /** 70 | * @name FORGE.EasingType.CUBIC_OUT 71 | * @type {string} 72 | * @const 73 | */ 74 | FORGE.EasingType.CUBIC_OUT = "easeOutCubic"; 75 | 76 | /** 77 | * @name FORGE.EasingType.BOUNCE_OUT 78 | * @type {string} 79 | * @const 80 | */ 81 | FORGE.EasingType.BOUNCE_OUT = "easeOutBounce"; 82 | 83 | /** 84 | * @name FORGE.EasingType.BOUNCE_IN 85 | * @type {string} 86 | * @const 87 | */ 88 | FORGE.EasingType.BOUNCE_IN = "easeInBounce"; -------------------------------------------------------------------------------- /src/utils/ColorRGBA.js: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * ColorRGBA Object 4 | * @constructor FORGE.ColorRGBA 5 | * @param {number} r - Red channel 6 | * @param {number} g - Green channel 7 | * @param {number} b - Blue channel 8 | * @param {number} a - Alpha channel 9 | */ 10 | FORGE.ColorRGBA = function(r, g, b, a) 11 | { 12 | /** 13 | * Red channel 14 | * @name FORGE.ColorRGBA#red 15 | * @type {number} 16 | */ 17 | this.red = r; 18 | 19 | /** 20 | * Green channel 21 | * @name FORGE.ColorRGBA#green 22 | * @type {number} 23 | */ 24 | this.green = g; 25 | 26 | /** 27 | * Blue channel 28 | * @name FORGE.ColorRGBA#blue 29 | * @type {number} 30 | */ 31 | this.blue = b; 32 | 33 | /** 34 | * Alpha channel 35 | * @name FORGE.ColorRGBA#alpha 36 | * @type {number} 37 | */ 38 | this.alpha = a; 39 | }; -------------------------------------------------------------------------------- /test/utils/Utils.spec.js: -------------------------------------------------------------------------------- 1 | describe("Utils", function() { 2 | describe("#arrayUnique()", function() { 3 | var tests = [ 4 | { value: [1, 2, 3, 4, 5, 6, 5, 4, 3, 1, 2], expected: [1, 2, 3, 4, 5, 6] }, 5 | { value: ["one", "two", "one", "three", "four", "one"], expected: ["one", "two", "three", "four"] }, 6 | { value: [1, "two", 3, "four", "four", 6], expected: [1, "two", 3, "four", 6] }, 7 | { value: [[], {}, {}, []], expected: [[], {}, {}, []] } 8 | ]; 9 | 10 | tests.forEach(function(test) { 11 | it("should return " + test.expected, function() { 12 | expect(FORGE.Utils.arrayUnique(test.value)).toEqual(test.expected); 13 | }); 14 | }); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /tools/changelog/0.2.0.md: -------------------------------------------------------------------------------- 1 | # FORGE.js changelog 0.2.0 2 | 3 | ### Samples 4 | 5 | - New sample for ambisonics sound. 6 | - New sample for animated hotspots. 7 | - New sample for actions on hotspots. 8 | - New sample for video controls. 9 | - New plugins for video controls. 10 | 11 | ### Documentation 12 | 13 | - New API documentation and JSON reference for 0.2.0. 14 | - New JSON reference template, easier to navigate. 15 | 16 | ### Action 17 | 18 | Actions can target any object and it's property. 19 | 20 | ```js 21 | "actions": 22 | [ 23 | { 24 | "uid": "action-hotspot", 25 | "target": { "uid": "hotspot-uid", "properties": "animation" }, 26 | "method": { "name": "play", "args": [ "hotspot-track-uid" ] } 27 | } 28 | ] 29 | ``` 30 | 31 | ### Renderer 32 | 33 | - Background render is now available for any projection in mesh (world to screen) and fragment shader (screen to world) modes. 34 | - New shader library with glsl files. 35 | - New media specifications for json reference. 36 | 37 | ### VR 38 | 39 | - WebVR support for WebVR compatible browsers and HMDs Oculus, HTC Vive and Samsung Gear VR. 40 | - Interactions with hotspots with gaze. In VR mode a default gaze cursor will appear. (WIP) 41 | 42 | ### Audio 43 | 44 | - Ambisonics sound support added. 45 | 46 | ### Director 47 | 48 | - Enhanced Director's cut management. (playlist of director tracks, loop and random features added) 49 | 50 | ### Controllers 51 | 52 | - Add keyboard controller enabled by default. 53 | 54 | ### Known issues 55 | 56 | - Little planet FOV is limited to 160 due to our work in progress on view refactor. 57 | -------------------------------------------------------------------------------- /tools/changelog/0.9.3.md: -------------------------------------------------------------------------------- 1 | # FORGE.js changelog 0.9.3 2 | 3 | ### Viewer 4 | 5 | - New: Add the onConfigLoadComplete event to the FORGE.Viewer. 6 | 7 | - Fix: Multiple viewers on the same page is now possible as long as the history feature is disabled. 8 | - Fix: Viewer.destroy crash has been fixed. 9 | - Fix: beforeRender and afterRender callbacks are now functional on minified build. 10 | 11 | ### Camera 12 | 13 | - Fix: Camera limits are now properly assigned on scene change. 14 | 15 | ### Controllers 16 | 17 | - New: Gamepad controllers support has been added. 18 | 19 | ### Audio 20 | 21 | - Fix: Omitone ambisonic library has been updated. 22 | - Fix: Ambisonic resume/restart has been fixed. 23 | 24 | ### Display 25 | 26 | - Fix: Canvas is now properly resized when browser is in WebVR emulation mode. 27 | 28 | ### Hotspots 29 | 30 | - New: Hotspot states are now handling the transform component. 31 | - New: Hotspot states are now handling the sound component. 32 | - New: Hotspot states are now handling the animation component. 33 | 34 | - Fix: Animated hotspots are now properly destroyed. 35 | - Fix: Hotspots don't need to be clicked twice on mobile. 36 | - Fix: HotspotGeometry.SHAPE crash when there are less than three points. Add a default behavior. 37 | 38 | ### Director's cut 39 | 40 | - Fix: Director's cut bad synchronisation has been fixed. 41 | 42 | ### Post processing 43 | 44 | - New: Add Shader pass support in json configuration for post processing. 45 | 46 | ### Plugins 47 | 48 | - New: Gamepad monitor plugin to help the Gamepad debug. 49 | 50 | ### Website 51 | 52 | - New: hotspots-states-sound sample to demonstrate the sound state change. 53 | - New: hotspots-states-animation sample to demonstrate the animation state change. 54 | - New: multiple-viewers sample to demonstrate the multiple viewers in the same page. 55 | - New: gamepad-controls sample to test the GamepadController. -------------------------------------------------------------------------------- /tools/changelog/0.9.6.md: -------------------------------------------------------------------------------- 1 | # FORGE.js changelog 0.9.6 2 | 3 | ### Viewer 4 | 5 | ### Media 6 | 7 | ### Renderer 8 | 9 | ### Display 10 | 11 | ### Camera 12 | 13 | ### Views 14 | 15 | ### Video 16 | 17 | ### Hotspots 18 | 19 | ### Plugins 20 | 21 | ### Samples 22 | 23 | ### Misc 24 | 25 | ### Diff since 0.9.4 26 | 27 | -------------------------------------------------------------------------------- /tools/electron/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "forgejs-electron", 3 | "version": "1.0.0", 4 | "description": "An Electron demo for a project using the ForgeJS player", 5 | "main": "main.js", 6 | "scripts": {}, 7 | "keywords": [ 8 | "Electron", 9 | "ForgeJS", 10 | "FORGE", 11 | "demo" 12 | ], 13 | "author": "GoPro, Inc. | Kolor SAS", 14 | "license": "Apache 2.0", 15 | "devDependencies": { 16 | "electron-prebuilt": "^1.2.0" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /tools/gruntTasks/duplicateForMinification.js: -------------------------------------------------------------------------------- 1 | /** 2 | * grunt-closure-export 3 | * 4 | * Copyright (c) 2016-2017 GoPro, Inc. 5 | */ 6 | 7 | 'use strict'; 8 | 9 | module.exports = function(grunt) 10 | { 11 | var path = require('path'); 12 | var fs = require('fs'); 13 | 14 | grunt.registerMultiTask('duplicateForMinification', 'Duplicate files and add min extension.', function() { 15 | 16 | var options = this.options({ 17 | 18 | }); 19 | 20 | var count = 0; 21 | 22 | this.files.forEach(function(filePair) 23 | { 24 | 25 | filePair.src.forEach(function(src) 26 | { 27 | src = unixifyPath(src); 28 | var extension = src.substring(src.lastIndexOf(".")+1, src.length); 29 | var dest = unixifyPath(src.replace(extension, "min."+extension)); 30 | 31 | if (grunt.file.isFile(src)) 32 | { 33 | grunt.verbose.writeln('Copying ' + src + ' -> ' + dest); 34 | grunt.file.copy(src, dest); 35 | count++; 36 | } 37 | }); 38 | }); 39 | 40 | if (count > 0) 41 | { 42 | grunt.log.write((count ? 'Complete: copied ' : 'Copied ') + count.toString() + (count === 1 ? ' file' : ' files')); 43 | } 44 | 45 | grunt.log.writeln(); 46 | }); 47 | 48 | 49 | var unixifyPath = function(filepath) 50 | { 51 | if (process.platform === 'win32') 52 | { 53 | return filepath.replace(/\\/g, '/'); 54 | } 55 | else 56 | { 57 | return filepath; 58 | } 59 | }; 60 | 61 | }; -------------------------------------------------------------------------------- /tools/jsdoc/jsdoc.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | "templates": 4 | { 5 | "title": "ForgeJS Documentation" 6 | } 7 | 8 | } -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/generator_config.txt: -------------------------------------------------------------------------------- 1 | # Font Squirrel Font-face Generator Configuration File 2 | # Upload this file to the generator to recreate the settings 3 | # you used to create these fonts. 4 | 5 | {"mode":"optimal","formats":["ttf","woff","woff2","eotz"],"tt_instructor":"default","fix_vertical_metrics":"Y","fix_gasp":"xy","add_spaces":"Y","add_hyphens":"Y","fallback":"none","fallback_custom":"100","options_subset":"basic","subset_custom":"","subset_custom_range":"","subset_ot_features_list":"","css_stylesheet":"stylesheet.css","filename_suffix":"-webfont","emsquare":"2048","spacing_adjustment":"0"} -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-bold-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-bold-webfont.eot -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-bold-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-bold-webfont.ttf -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-bold-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-bold-webfont.woff -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-bold-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-bold-webfont.woff2 -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-boldital-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-boldital-webfont.eot -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-boldital-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-boldital-webfont.ttf -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-boldital-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-boldital-webfont.woff -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-boldital-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-boldital-webfont.woff2 -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-hairline-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-hairline-webfont.eot -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-hairline-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-hairline-webfont.ttf -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-hairline-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-hairline-webfont.woff -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-hairline-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-hairline-webfont.woff2 -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-italic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-italic-webfont.eot -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-italic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-italic-webfont.ttf -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-italic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-italic-webfont.woff -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-italic-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-italic-webfont.woff2 -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-light-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-light-webfont.eot -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-light-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-light-webfont.ttf -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-light-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-light-webfont.woff -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-light-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-light-webfont.woff2 -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-lightitalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-lightitalic-webfont.eot -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-lightitalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-lightitalic-webfont.ttf -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-lightitalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-lightitalic-webfont.woff -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-lightitalic-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-lightitalic-webfont.woff2 -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-meditalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-meditalic-webfont.eot -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-meditalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-meditalic-webfont.ttf -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-meditalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-meditalic-webfont.woff -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-meditalic-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-meditalic-webfont.woff2 -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-medium-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-medium-webfont.eot -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-medium-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-medium-webfont.ttf -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-medium-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-medium-webfont.woff -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-medium-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-medium-webfont.woff2 -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-regular-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-regular-webfont.eot -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-regular-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-regular-webfont.ttf -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-regular-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-regular-webfont.woff -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-regular-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-regular-webfont.woff2 -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-thin-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-thin-webfont.eot -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-thin-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-thin-webfont.ttf -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-thin-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-thin-webfont.woff -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-thin-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-thin-webfont.woff2 -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-thinitalic-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-thinitalic-webfont.eot -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-thinitalic-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-thinitalic-webfont.ttf -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-thinitalic-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-thinitalic-webfont.woff -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-thinitalic-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-thinitalic-webfont.woff2 -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-xblack-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-xblack-webfont.eot -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-xblack-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-xblack-webfont.ttf -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-xblack-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-xblack-webfont.woff -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-xblack-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/fonts/pfdintextpro/pfdintextpro-xblack-webfont.woff2 -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/images/forge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/jsdoc/template/gopro/static/images/forge.png -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/scripts/linenumber.js: -------------------------------------------------------------------------------- 1 | /*global document */ 2 | (function() { 3 | var source = document.getElementsByClassName('prettyprint source linenums'); 4 | var i = 0; 5 | var lineNumber = 0; 6 | var lineId; 7 | var lines; 8 | var totalLines; 9 | var anchorHash; 10 | 11 | if (source && source[0]) { 12 | anchorHash = document.location.hash.substring(1); 13 | lines = source[0].getElementsByTagName('li'); 14 | totalLines = lines.length; 15 | 16 | for (; i < totalLines; i++) { 17 | lineNumber++; 18 | lineId = 'line' + lineNumber; 19 | lines[i].id = lineId; 20 | if (lineId === anchorHash) { 21 | lines[i].className += ' selected'; 22 | } 23 | } 24 | } 25 | })(); 26 | -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/scripts/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com", 2 | /^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]); 3 | -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/static/scripts/template-script.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | function onPrivateSwitchChange() 4 | { 5 | if(jQuery('#showPrivate>input').is(':checked')) 6 | jQuery(".private").show(); 7 | else 8 | jQuery(".private").hide(); 9 | } 10 | 11 | jQuery('#showPrivate>input').change(onPrivateSwitchChange); 12 | jQuery(document).ready(onPrivateSwitchChange); -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/tmpl/augments.tmpl: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 |
    8 |
  • 9 |
10 | 11 | -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/tmpl/example.tmpl: -------------------------------------------------------------------------------- 1 | 2 |
3 | -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/tmpl/examples.tmpl: -------------------------------------------------------------------------------- 1 | 8 |

9 | 10 |
11 | -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/tmpl/exceptions.tmpl: -------------------------------------------------------------------------------- 1 | 4 | 5 |
6 |
7 |
8 | 9 |
10 |
11 |
12 |
13 |
14 |
15 | Type 16 |
17 |
18 | 19 |
20 |
21 |
22 |
23 |
24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
32 | 33 | -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/tmpl/mainpage.tmpl: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |
14 | 15 | -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/tmpl/members.tmpl: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 |
"> 9 | 10 |

11 | 12 | 13 |

14 | 15 | 16 | 17 |
18 | 19 |
20 | 21 | 22 | 23 |
Type:
24 |
    25 |
  • 26 | 27 |
  • 28 |
29 | 30 | 31 | 32 | 33 | 34 |
Fires:
35 |
    36 |
  • 37 |
38 | 39 | 40 | 41 |
Example 1? 's':'' ?>
42 | 43 | 44 | 45 |
-------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/tmpl/quicknav.tmpl: -------------------------------------------------------------------------------- 1 | 5 | 6 | 10 | 11 |
12 | 13 |

14 | 15 | 16 | 17 | 18 | 19 |

20 | 21 | 22 | 23 |
Members
24 | 25 |
    26 | 27 |
  • "> 28 | 29 |
  • 30 | 31 |
32 | 33 | 34 | 35 | 36 | 37 | 38 |
Methods
39 | 40 |
    41 | 42 |
  • "> 43 | 44 |
  • 45 | 46 |
47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 |
-------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/tmpl/returns.tmpl: -------------------------------------------------------------------------------- 1 | 5 |
6 | 7 |
8 | 9 | 10 | 11 |
12 |
13 | Type 14 |
15 |
16 | 17 |
18 |
19 | -------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/tmpl/source.tmpl: -------------------------------------------------------------------------------- 1 | 4 |
5 |
6 |
7 |
8 |
-------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/tmpl/tutorial.tmpl: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 |
6 | 7 |
8 | 9 |
10 | 11 |
12 | 13 |
14 | 0) { ?> 15 |
    18 |
  • 19 |
20 | 21 | 22 |

23 |
-------------------------------------------------------------------------------- /tools/jsdoc/template/gopro/tmpl/type.tmpl: -------------------------------------------------------------------------------- 1 | 5 | 6 | | 7 | -------------------------------------------------------------------------------- /tools/reference/static/forge-iframe.css: -------------------------------------------------------------------------------- 1 | h1, h2, h3, h4, h5 { 2 | font-family: 'pf_dintext_promedium', sans-serif; 3 | color: #4D4E53; 4 | } 5 | 6 | p, td { 7 | font-family: 'pf_dintext_proregular', sans-serif; 8 | color: #4D4E53; 9 | font-size: 14px; 10 | } 11 | 12 | pre { 13 | background: #f1f1f1; 14 | padding: 10px; 15 | border-left: #373a3c 5px solid; 16 | } 17 | 18 | ul { 19 | margin-bottom: 0; 20 | } 21 | 22 | .param-anyof { 23 | list-style: none; 24 | } -------------------------------------------------------------------------------- /tools/reference/static/forge.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: 'pf_dintext_promedium', sans-serif; 3 | color: #4D4E53; 4 | font-size: 14px; 5 | } 6 | 7 | header { 8 | background: black; 9 | } 10 | 11 | .scroll-section { 12 | position: absolute; 13 | height: calc(100% - 68px); 14 | overflow: auto; 15 | } 16 | 17 | #object-nav { 18 | left: 0px; 19 | width: 250px; 20 | padding-left: 20px; 21 | background-color: #dddddd; 22 | } 23 | 24 | #object-definition { 25 | right: 0px; 26 | width: calc(100% - 250px); 27 | } 28 | 29 | #json-title { 30 | display:inline; 31 | vertical-align: middle; 32 | float: right; 33 | font-family: 'pf_dintext_probold', sans-serif; 34 | margin: 0; 35 | padding: 10px; 36 | font-size: 30px; 37 | color: #d8d8d8; 38 | } 39 | 40 | .text-muted, a, a:hover { 41 | font-family: 'pf_dintext_promedium', sans-serif; 42 | color: #4D4E53; 43 | } -------------------------------------------------------------------------------- /tools/reference/static/forge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gopro/forgejs/b3b33cd71beaba5db57370a8b5ebb87e2d69bb6d/tools/reference/static/forge.png -------------------------------------------------------------------------------- /tools/reference/templates/footer.handlebars: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tools/reference/templates/object-footer.handlebars: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /tools/reference/templates/object-header.handlebars: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {{page.title}} 6 | 7 | 8 | 9 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /tools/reference/templates/sidebar.handlebars: -------------------------------------------------------------------------------- 1 | 17 | --------------------------------------------------------------------------------