| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, downloadBlob, IObject3D, LoadingScreenPlugin, Rhino3dmLoadPlugin, ThreeViewer} from 'threepipe' | |||||
| import { | |||||
| _testFinish, | |||||
| _testStart, | |||||
| downloadBlob, | |||||
| IObject3D, | |||||
| LoadingScreenPlugin, | |||||
| Rhino3dmLoadPlugin, | |||||
| ThreeViewer, | |||||
| } from 'threepipe' | |||||
| const viewer = new ThreeViewer({ | const viewer = new ThreeViewer({ | ||||
| canvas: document.getElementById('mcanvas') as HTMLCanvasElement, | canvas: document.getElementById('mcanvas') as HTMLCanvasElement, | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| <!DOCTYPE html> | |||||
| <html lang="en"> | |||||
| <head> | |||||
| <meta charset="UTF-8"> | |||||
| <title>Advanced Ground Plugin</title> | |||||
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |||||
| <!-- Import maps polyfill --> | |||||
| <!-- Remove this when import maps will be widely supported --> | |||||
| <script async src="https://unpkg.com/es-module-shims@1.6.3/dist/es-module-shims.js"></script> | |||||
| <script type="importmap"> | |||||
| { | |||||
| "imports": { | |||||
| "@threepipe/webgi-plugins": "https://unpkg.com/@threepipe/webgi-plugins@0.5.0/dist/index.mjs", | |||||
| "threepipe": "./../../dist/index.mjs", | |||||
| "@threepipe/plugin-tweakpane": "./../../plugins/tweakpane/dist/index.mjs" | |||||
| } | |||||
| } | |||||
| </script> | |||||
| <style id="example-style"> | |||||
| html, body, #canvas-container, #mcanvas { | |||||
| width: 100%; | |||||
| height: 100%; | |||||
| margin: 0; | |||||
| overflow: hidden; | |||||
| } | |||||
| </style> | |||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | |||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | |||||
| </head> | |||||
| <body> | |||||
| <div id="canvas-container"> | |||||
| <canvas id="mcanvas"></canvas> | |||||
| </div> | |||||
| </body> |
| import { | |||||
| _testFinish, _testStart, | |||||
| GBufferPlugin, | |||||
| IObject3D, | |||||
| LoadingScreenPlugin, | |||||
| PCFSoftShadowMap, | |||||
| RenderTargetPreviewPlugin, | |||||
| SSAAPlugin, | |||||
| ThreeViewer, | |||||
| } from 'threepipe' | |||||
| import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | |||||
| // @ts-expect-error todo fix import | |||||
| import {AdvancedGroundPlugin, SSReflectionPlugin, TemporalAAPlugin} from '@threepipe/webgi-plugins' | |||||
| async function init() { | |||||
| const viewer = new ThreeViewer({ | |||||
| canvas: document.getElementById('mcanvas') as HTMLCanvasElement, | |||||
| msaa: true, | |||||
| rgbm: true, | |||||
| dropzone: { | |||||
| addOptions: { | |||||
| disposeSceneObjects: true, | |||||
| }, | |||||
| }, | |||||
| plugins: [LoadingScreenPlugin, GBufferPlugin, SSAAPlugin, TemporalAAPlugin], | |||||
| // rgbm: false, | |||||
| }) | |||||
| viewer.renderManager.stableNoise = true | |||||
| const ground = viewer.addPluginSync(AdvancedGroundPlugin) | |||||
| ground.planarReflections = true | |||||
| const ui = viewer.addPluginSync(new TweakpaneUiPlugin(true)) | |||||
| await viewer.setEnvironmentMap('https://threejs.org/examples/textures/equirectangular/venice_sunset_1k.hdr', { | |||||
| setBackground: false, | |||||
| }) | |||||
| await viewer.load<IObject3D>('https://threejs.org/examples/models/gltf/DamagedHelmet/glTF/DamagedHelmet.gltf', { | |||||
| autoCenter: true, | |||||
| autoScale: true, | |||||
| }) | |||||
| ui.setupPluginUi(AdvancedGroundPlugin) | |||||
| viewer.renderManager.renderer.shadowMap.type = PCFSoftShadowMap | |||||
| const rt = viewer.addPluginSync(RenderTargetPreviewPlugin) | |||||
| rt.addTarget(()=>ground.shadowBaker?.light.shadow.map, 'shadow', false, false, true, (s)=>s + ' = vec4(' + s + '.r/2.);') | |||||
| rt.addTarget(()=>ground.shadowBaker?.target, 'baked shadow', false, false, true) | |||||
| } | |||||
| _testStart() | |||||
| init().then(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import { | import { | ||||
| _testFinish, | |||||
| _testFinish, _testStart, | |||||
| AmbientLight2, | AmbientLight2, | ||||
| Box3B, | Box3B, | ||||
| IObject3D, | IObject3D, | ||||
| ui.appendChild(light.uiConfig, {expanded: true}) | ui.appendChild(light.uiConfig, {expanded: true}) | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, IObject3D, LoadingScreenPlugin, PickingPlugin, SSAAPlugin, ThreeViewer} from 'threepipe' | |||||
| import { | |||||
| _testFinish, | |||||
| _testStart, | |||||
| IObject3D, | |||||
| LoadingScreenPlugin, | |||||
| PickingPlugin, | |||||
| SSAAPlugin, | |||||
| ThreeViewer, | |||||
| } from 'threepipe' | |||||
| import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | ||||
| // @ts-expect-error todo fix | // @ts-expect-error todo fix | ||||
| import {AnisotropyPlugin, BloomPlugin, OutlinePlugin, SSContactShadowsPlugin, TemporalAAPlugin} from '@threepipe/webgi-plugins' | import {AnisotropyPlugin, BloomPlugin, OutlinePlugin, SSContactShadowsPlugin, TemporalAAPlugin} from '@threepipe/webgi-plugins' | ||||
| } | } | ||||
| _testStart() | |||||
| init().then(_testFinish) | init().then(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import { | import { | ||||
| _testFinish, | |||||
| _testFinish, _testStart, | |||||
| AssetExporterPlugin, | AssetExporterPlugin, | ||||
| IObject3D, | IObject3D, | ||||
| LoadingScreenPlugin, | LoadingScreenPlugin, | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import { | import { | ||||
| _testFinish, | |||||
| _testFinish, _testStart, | |||||
| AssetExporterPlugin, | AssetExporterPlugin, | ||||
| IObject3D, | IObject3D, | ||||
| LoadingScreenPlugin, | LoadingScreenPlugin, | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module"> | <script id="example-script" type="module"> | ||||
| import {_testFinish, LoadingScreenPlugin, ThreeViewer, Vector3} from 'threepipe' | |||||
| import {_testFinish, _testStart, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import {B3DMLoadPlugin} from '@threepipe/plugin-3d-tiles-renderer' | import {B3DMLoadPlugin} from '@threepipe/plugin-3d-tiles-renderer' | ||||
| const viewer = new ThreeViewer({canvas: document.getElementById('mcanvas')}) | const viewer = new ThreeViewer({canvas: document.getElementById('mcanvas')}) | ||||
| result2.setDirty() | result2.setDirty() | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) | ||||
| </script> | </script> | ||||
| </head> | </head> |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, DirectionalLight2, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import {_testFinish, _testStart, DirectionalLight2, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | ||||
| import {BasicSVGRendererPlugin} from '@threepipe/plugin-svg-renderer' | import {BasicSVGRendererPlugin} from '@threepipe/plugin-svg-renderer' | ||||
| ui.appendChild(l.uiConfig) | ui.appendChild(l.uiConfig) | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module"> | <script id="example-script" type="module"> | ||||
| import {_testFinish, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import {_testFinish, _testStart, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import {BlendLoadPlugin} from '@threepipe/plugin-blend-importer' | import {BlendLoadPlugin} from '@threepipe/plugin-blend-importer' | ||||
| const viewer = new ThreeViewer({canvas: document.getElementById('mcanvas')}) | const viewer = new ThreeViewer({canvas: document.getElementById('mcanvas')}) | ||||
| console.log(result) | console.log(result) | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) | ||||
| </script> | </script> | ||||
| </head> | </head> |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, IObject3D, LoadingScreenPlugin, PhysicalMaterial, SSAAPlugin, ThreeViewer} from 'threepipe' | |||||
| import { | |||||
| _testFinish, | |||||
| _testStart, | |||||
| IObject3D, | |||||
| LoadingScreenPlugin, | |||||
| PhysicalMaterial, | |||||
| SSAAPlugin, | |||||
| ThreeViewer, | |||||
| } from 'threepipe' | |||||
| import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | ||||
| // @ts-expect-error todo fix | // @ts-expect-error todo fix | ||||
| import {BloomPlugin, TemporalAAPlugin} from '@threepipe/webgi-plugins' | import {BloomPlugin, TemporalAAPlugin} from '@threepipe/webgi-plugins' | ||||
| } | } | ||||
| _testStart() | |||||
| init().then(_testFinish) | init().then(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, IObject3D, LoadingScreenPlugin, ThreeViewer, TonemapPlugin} from 'threepipe' | |||||
| import {_testFinish, _testStart, IObject3D, LoadingScreenPlugin, ThreeViewer, TonemapPlugin} from 'threepipe' | |||||
| import {BlueprintJsUiPlugin} from '@threepipe/plugin-blueprintjs' | import {BlueprintJsUiPlugin} from '@threepipe/plugin-blueprintjs' | ||||
| async function init() { | async function init() { | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, IObject3D, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import {_testFinish, _testStart, IObject3D, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | ||||
| async function init() { | async function init() { | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, IObject3D, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import {_testFinish, _testStart, IObject3D, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | ||||
| async function init() { | async function init() { | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import { | import { | ||||
| _testFinish, | |||||
| _testFinish, _testStart, | |||||
| CameraView, | CameraView, | ||||
| CameraViewPlugin, | CameraViewPlugin, | ||||
| EasingFunctions, | EasingFunctions, | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import { | import { | ||||
| _testFinish, | |||||
| _testFinish, _testStart, | |||||
| CanvasSnapshotPlugin, | CanvasSnapshotPlugin, | ||||
| isWebpExportSupported, | isWebpExportSupported, | ||||
| LoadingScreenPlugin, | LoadingScreenPlugin, | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, ChromaticAberrationPlugin, IObject3D, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import { | |||||
| _testFinish, | |||||
| _testStart, | |||||
| ChromaticAberrationPlugin, | |||||
| IObject3D, | |||||
| LoadingScreenPlugin, | |||||
| ThreeViewer, | |||||
| } from 'threepipe' | |||||
| import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | ||||
| async function init() { | async function init() { | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import { | import { | ||||
| _testFinish, | |||||
| _testFinish, _testStart, | |||||
| ClearcoatTintPlugin, | ClearcoatTintPlugin, | ||||
| IObject3D, | IObject3D, | ||||
| LoadingScreenPlugin, | LoadingScreenPlugin, | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module"> | <script id="example-script" type="module"> | ||||
| import {_testFinish, LoadingScreenPlugin, ThreeViewer, Vector3, Box3B} from 'threepipe' | |||||
| import {_testFinish, _testStart, LoadingScreenPlugin, ThreeViewer, Vector3, Box3B} from 'threepipe' | |||||
| import {CMPTLoadPlugin} from '@threepipe/plugin-3d-tiles-renderer' | import {CMPTLoadPlugin} from '@threepipe/plugin-3d-tiles-renderer' | ||||
| const viewer = new ThreeViewer({canvas: document.getElementById('mcanvas')}) | const viewer = new ThreeViewer({canvas: document.getElementById('mcanvas')}) | ||||
| console.log(new Box3B(result2).getCenter(new Vector3())) // todo why is this is NaN? | console.log(new Box3B(result2).getCenter(new Vector3())) // todo why is this is NaN? | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) | ||||
| </script> | </script> | ||||
| </head> | </head> |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, ContactShadowGroundPlugin, IObject3D, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import { | |||||
| _testFinish, | |||||
| _testStart, | |||||
| ContactShadowGroundPlugin, | |||||
| IObject3D, | |||||
| LoadingScreenPlugin, | |||||
| ThreeViewer, | |||||
| } from 'threepipe' | |||||
| import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | ||||
| async function init() { | async function init() { | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import { | import { | ||||
| _testFinish, | |||||
| _testFinish, _testStart, | |||||
| CustomBumpMapPlugin, | CustomBumpMapPlugin, | ||||
| ITexture, | ITexture, | ||||
| LoadingScreenPlugin, | LoadingScreenPlugin, | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import { | import { | ||||
| _testFinish, | |||||
| _testFinish, _testStart, | |||||
| DepthBufferPlugin, | DepthBufferPlugin, | ||||
| downloadBlob, | downloadBlob, | ||||
| HalfFloatType, | HalfFloatType, | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import { | import { | ||||
| _testFinish, | |||||
| _testFinish, _testStart, | |||||
| DepthBufferPlugin, | DepthBufferPlugin, | ||||
| downloadBlob, | downloadBlob, | ||||
| HalfFloatType, | HalfFloatType, | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import { | import { | ||||
| _testFinish, | |||||
| _testFinish, _testStart, | |||||
| IObject3D, | IObject3D, | ||||
| LoadingScreenPlugin, | LoadingScreenPlugin, | ||||
| PhysicalMaterial, | PhysicalMaterial, | ||||
| viewer.scene.mainCamera.setDirty() | viewer.scene.mainCamera.setDirty() | ||||
| } | } | ||||
| _testStart() | |||||
| init().then(_testFinish) | init().then(_testFinish) |
| backdrop-filter: blur(16px); | backdrop-filter: blur(16px); | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, DeviceOrientationControlsPlugin, IObject3D, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import { | |||||
| _testFinish, | |||||
| _testStart, | |||||
| DeviceOrientationControlsPlugin, | |||||
| IObject3D, | |||||
| LoadingScreenPlugin, | |||||
| ThreeViewer, | |||||
| } from 'threepipe' | |||||
| import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | ||||
| async function init() { | async function init() { | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import { | import { | ||||
| _testFinish, | |||||
| _testFinish, _testStart, | |||||
| Box3B, | Box3B, | ||||
| DirectionalLight2, | DirectionalLight2, | ||||
| IObject3D, | IObject3D, | ||||
| ui.appendChild(light.uiConfig, {expanded: true}) | ui.appendChild(light.uiConfig, {expanded: true}) | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module"> | <script id="example-script" type="module"> | ||||
| import {_testFinish, ThreeViewer} from 'threepipe' | |||||
| import {_testFinish, _testStart, ThreeViewer} from 'threepipe' | |||||
| const viewer = new ThreeViewer({canvas: document.getElementById('mcanvas')}) | const viewer = new ThreeViewer({canvas: document.getElementById('mcanvas')}) | ||||
| console.log(result) | console.log(result) | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) | ||||
| </script> | </script> | ||||
| </head> | </head> |
| pointer-events: none; | pointer-events: none; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import { | import { | ||||
| _testFinish, | |||||
| _testFinish, _testStart, | |||||
| DropzonePlugin, | DropzonePlugin, | ||||
| LoadingScreenPlugin, | LoadingScreenPlugin, | ||||
| PickingPlugin, | PickingPlugin, | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, EditorViewWidgetPlugin, IObject3D, LoadingScreenPlugin, ThreeViewer, timeout} from 'threepipe' | |||||
| import { | |||||
| _testFinish, | |||||
| _testStart, | |||||
| EditorViewWidgetPlugin, | |||||
| IObject3D, | |||||
| LoadingScreenPlugin, | |||||
| ThreeViewer, | |||||
| timeout, | |||||
| } from 'threepipe' | |||||
| import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | ||||
| async function init() { | async function init() { | ||||
| plugin.setOrientation('+z') | plugin.setOrientation('+z') | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| function run () { | |||||
| if (document.body.classList.contains('_testStarted')) return | |||||
| const div = document.createElement('div'); | |||||
| const colorScheme = window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'; | |||||
| Object.assign(div.style, { | |||||
| position: 'fixed', top: 0, left: 0, bottom: 0, right: 0, width: 'auto', height: 'max-content', | |||||
| display: 'flex', alignItems: 'center', justifyContent: 'center', flexDirection: 'column', | |||||
| background: 'transparent', pointerEvents: 'none', | |||||
| zIndex: '49', // loading screen is 50 | |||||
| transition: 'opacity 0.5s ease', | |||||
| color: colorScheme !== 'dark' ? '#eee' : '#222', | |||||
| fontSize: '1.25rem', | |||||
| margin: 'auto', | |||||
| }); | |||||
| div.innerHTML = '<div style="width:32px;height:32px;border:4px solid #ccc;border-top:4px solid #333;border-radius:50%;animation:spin 1s linear infinite;margin:auto"></div><div style="text-align:center;margin-top:8px;font-family:sans-serif">Loading...</div><style>@keyframes spin{100%{transform:rotate(360deg)}}</style>'; | |||||
| document.body.appendChild(div); | |||||
| let removed = false | |||||
| function remove () { | |||||
| if (removed) return | |||||
| removed = true | |||||
| div.style.opacity = '0'; | |||||
| setTimeout(() => div.remove(), 600); | |||||
| } | |||||
| window.addEventListener('threepipe-test-started', remove) | |||||
| setTimeout(remove, 8000); // remove after 5 seconds if not removed | |||||
| } | |||||
| run() |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module"> | <script id="example-script" type="module"> | ||||
| import {_testFinish, ThreeViewer} from 'threepipe' | |||||
| import {_testFinish, _testStart, ThreeViewer} from 'threepipe' | |||||
| const viewer = new ThreeViewer({canvas: document.getElementById('mcanvas')}) | const viewer = new ThreeViewer({canvas: document.getElementById('mcanvas')}) | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) | ||||
| </script> | </script> | ||||
| </head> | </head> |
| pointer-events: none; | pointer-events: none; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import { | import { | ||||
| _testFinish, | |||||
| _testFinish, _testStart, | |||||
| GLTFAnimationPlugin, | GLTFAnimationPlugin, | ||||
| HemisphereLight, | HemisphereLight, | ||||
| ImportAddOptions, | ImportAddOptions, | ||||
| viewer.scene.setBackgroundColor('#555555') | viewer.scene.setBackgroundColor('#555555') | ||||
| viewer.scene.addObject(new HemisphereLight(0xffffff, 0x444444, 2)) | viewer.scene.addObject(new HemisphereLight(0xffffff, 0x444444, 2)) | ||||
| await viewer.setEnvironmentMap('https://threejs.org/examples/textures/equirectangular/venice_sunset_1k.hdr') | |||||
| await viewer.setEnvironmentMap('https://cdn.jsdelivr.net/gh/repalash/three.js-modded@v0.157.1004/examples/textures/equirectangular/venice_sunset_1k.hdr') | |||||
| const urls = [ | const urls = [ | ||||
| 'https://threejs.org/examples/models/3ds/portalgun/portalgun.3ds', | |||||
| 'https://threejs.org/examples/models/3mf/cube_gears.3mf', | |||||
| 'https://threejs.org/examples/models/collada/elf/elf.dae', | |||||
| 'https://threejs.org/examples/models/amf/rook.amf', | |||||
| 'https://threejs.org/examples/models/gcode/benchy.gcode', | |||||
| 'https://threejs.org/examples/models/bvh/pirouette.bvh', | |||||
| 'https://threejs.org/examples/models/vox/monu10.vox', | |||||
| 'https://threejs.org/examples/models/mdd/cube.mdd', | |||||
| 'https://threejs.org/examples/models/pcd/binary/Zaghetto.pcd', | |||||
| 'https://threejs.org/examples/models/tilt/BRUSH_DOME.tilt', | |||||
| 'https://threejs.org/examples/models/ldraw/officialLibrary/models/car.ldr_Packed.mpd', | |||||
| 'https://threejs.org/examples/models/vtk/bunny.vtk', | |||||
| 'https://threejs.org/examples/models/vtk/cube_binary.vtp', | |||||
| 'https://threejs.org/examples/models/xyz/helix_201.xyz', | |||||
| 'https://threejs.org/examples/models/vrml/meshWithTexture.wrl', | |||||
| 'https://cdn.jsdelivr.net/gh/repalash/three.js-modded@v0.157.1004/examples/models/3ds/portalgun/portalgun.3ds', // todo - to load textures there should be a way to set basepath to portalgun/textures | |||||
| 'https://cdn.jsdelivr.net/gh/repalash/three.js-modded@v0.157.1004/examples/models/3mf/cube_gears.3mf', | |||||
| 'https://cdn.jsdelivr.net/gh/repalash/three.js-modded@v0.157.1004/examples/models/collada/elf/elf.dae', | |||||
| 'https://cdn.jsdelivr.net/gh/repalash/three.js-modded@v0.157.1004/examples/models/amf/rook.amf', | |||||
| 'https://cdn.jsdelivr.net/gh/repalash/three.js-modded@v0.157.1004/examples/models/gcode/benchy.gcode', | |||||
| 'https://cdn.jsdelivr.net/gh/repalash/three.js-modded@v0.157.1004/examples/models/bvh/pirouette.bvh', | |||||
| 'https://cdn.jsdelivr.net/gh/repalash/three.js-modded@v0.157.1004/examples/models/vox/monu10.vox', | |||||
| 'https://cdn.jsdelivr.net/gh/repalash/three.js-modded@v0.157.1004/examples/models/mdd/cube.mdd', | |||||
| 'https://cdn.jsdelivr.net/gh/repalash/three.js-modded@v0.157.1004/examples/models/pcd/binary/Zaghetto.pcd', | |||||
| 'https://cdn.jsdelivr.net/gh/repalash/three.js-modded@v0.157.1004/examples/models/tilt/BRUSH_DOME.tilt', | |||||
| 'https://cdn.jsdelivr.net/gh/repalash/three.js-modded@v0.157.1004/examples/models/ldraw/officialLibrary/models/car.ldr_Packed.mpd', | |||||
| 'https://cdn.jsdelivr.net/gh/repalash/three.js-modded@v0.157.1004/examples/models/vtk/bunny.vtk', | |||||
| 'https://cdn.jsdelivr.net/gh/repalash/three.js-modded@v0.157.1004/examples/models/vtk/cube_binary.vtp', | |||||
| 'https://cdn.jsdelivr.net/gh/repalash/three.js-modded@v0.157.1004/examples/models/xyz/helix_201.xyz', | |||||
| 'https://cdn.jsdelivr.net/gh/repalash/three.js-modded@v0.157.1004/examples/models/vrml/meshWithTexture.wrl', | |||||
| ] | ] | ||||
| const options: ImportAddOptions = { | const options: ImportAddOptions = { | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) | ||||
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import { | import { | ||||
| _testFinish, | |||||
| _testFinish, _testStart, | |||||
| Color, | Color, | ||||
| GLTFLoader2, | GLTFLoader2, | ||||
| IObject3D, | IObject3D, | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module"> | <script id="example-script" type="module"> | ||||
| import {_testFinish, HemisphereLight, ThreeViewer} from 'threepipe' | |||||
| import {_testFinish, _testStart, HemisphereLight, ThreeViewer} from 'threepipe' | |||||
| const viewer = new ThreeViewer({canvas: document.getElementById('mcanvas')}) | const viewer = new ThreeViewer({canvas: document.getElementById('mcanvas')}) | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) | ||||
| </script> | </script> | ||||
| </head> | </head> |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, FilmicGrainPlugin, IObject3D, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import {_testFinish, _testStart, FilmicGrainPlugin, IObject3D, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | ||||
| async function init() { | async function init() { | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import { | import { | ||||
| _testFinish, | |||||
| _testFinish, _testStart, | |||||
| FragmentClippingExtensionPlugin, | FragmentClippingExtensionPlugin, | ||||
| IObject3D, | IObject3D, | ||||
| LoadingScreenPlugin, | LoadingScreenPlugin, | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import { | import { | ||||
| _testFinish, | |||||
| _testFinish, _testStart, | |||||
| BoxGeometry, | BoxGeometry, | ||||
| FrameFadePlugin, | FrameFadePlugin, | ||||
| LoadingScreenPlugin, | LoadingScreenPlugin, | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, FullScreenPlugin, IObject3D, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import {_testFinish, _testStart, FullScreenPlugin, IObject3D, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import {createSimpleButtons} from '../examples-utils/simple-bottom-buttons.js' | import {createSimpleButtons} from '../examples-utils/simple-bottom-buttons.js' | ||||
| import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import { | import { | ||||
| _testFinish, | |||||
| _testFinish, _testStart, | |||||
| downloadBlob, | downloadBlob, | ||||
| FloatType, | FloatType, | ||||
| GBufferPlugin, | GBufferPlugin, | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import { | import { | ||||
| _testFinish, | |||||
| _testFinish, _testStart, | |||||
| CameraViewPlugin, | CameraViewPlugin, | ||||
| LoadingScreenPlugin, | LoadingScreenPlugin, | ||||
| Object3DGeneratorPlugin, | Object3DGeneratorPlugin, | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) | ||||
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, GeometryUVPreviewPlugin, IObject3D, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import {_testFinish, _testStart, GeometryUVPreviewPlugin, IObject3D, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| const viewer = new ThreeViewer({ | const viewer = new ThreeViewer({ | ||||
| canvas: document.getElementById('mcanvas') as HTMLCanvasElement, | canvas: document.getElementById('mcanvas') as HTMLCanvasElement, | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, AssetExporterPlugin, downloadBlob, IObject3D, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import { | |||||
| _testFinish, | |||||
| _testStart, | |||||
| AssetExporterPlugin, | |||||
| downloadBlob, | |||||
| IObject3D, | |||||
| LoadingScreenPlugin, | |||||
| ThreeViewer, | |||||
| } from 'threepipe' | |||||
| import {createSimpleButtons} from '../examples-utils/simple-bottom-buttons.js' | import {createSimpleButtons} from '../examples-utils/simple-bottom-buttons.js' | ||||
| import {GLTFDracoExportPlugin} from '@threepipe/plugin-gltf-transform' | import {GLTFDracoExportPlugin} from '@threepipe/plugin-gltf-transform' | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, downloadBlob, IMaterial, IObject3D, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import {_testFinish, _testStart, downloadBlob, IMaterial, IObject3D, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import {createSimpleButtons} from '../examples-utils/simple-bottom-buttons.js' | import {createSimpleButtons} from '../examples-utils/simple-bottom-buttons.js' | ||||
| const viewer = new ThreeViewer({canvas: document.getElementById('mcanvas') as HTMLCanvasElement, msaa: true}) | const viewer = new ThreeViewer({canvas: document.getElementById('mcanvas') as HTMLCanvasElement, msaa: true}) | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| font-weight: 600; | font-weight: 600; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, GLTFAnimationPlugin, ICamera, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import {_testFinish, _testStart, GLTFAnimationPlugin, ICamera, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| async function init() { | async function init() { | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, GLTFAnimationPlugin, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import {_testFinish, _testStart, GLTFAnimationPlugin, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| async function init() { | async function init() { | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, GLTFAnimationPlugin, ICamera, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import {_testFinish, _testStart, GLTFAnimationPlugin, ICamera, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| async function init() { | async function init() { | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import { | import { | ||||
| _testFinish, | |||||
| _testFinish, _testStart, | |||||
| GLTFKHRMaterialVariantsPlugin, | GLTFKHRMaterialVariantsPlugin, | ||||
| IObject3D, | IObject3D, | ||||
| LoadingScreenPlugin, | LoadingScreenPlugin, | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| import {_testFinish, _testStart, LoadingScreenPlugin, ThreeViewer} from 'threepipe' | |||||
| async function init() { | async function init() { | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import { | import { | ||||
| _testFinish, | |||||
| _testFinish, _testStart, | |||||
| BufferGeometry, | BufferGeometry, | ||||
| BufferGeometry2, | BufferGeometry2, | ||||
| Color, | Color, | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import { | import { | ||||
| _testFinish, | |||||
| _testFinish, _testStart, | |||||
| GLTFMeshOptDecodePlugin, | GLTFMeshOptDecodePlugin, | ||||
| IObject3D, | IObject3D, | ||||
| KTX2LoadPlugin, | KTX2LoadPlugin, | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, IObject3D, LoadingScreenPlugin, RenderTargetPreviewPlugin, ThreeViewer} from 'threepipe' | |||||
| import { | |||||
| _testFinish, | |||||
| _testStart, | |||||
| IObject3D, | |||||
| LoadingScreenPlugin, | |||||
| RenderTargetPreviewPlugin, | |||||
| ThreeViewer, | |||||
| } from 'threepipe' | |||||
| import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | ||||
| const viewer = new ThreeViewer({ | const viewer = new ThreeViewer({ | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, IObject3D, LoadingScreenPlugin, RenderTargetPreviewPlugin, ThreeViewer} from 'threepipe' | |||||
| import { | |||||
| _testFinish, | |||||
| _testStart, | |||||
| IObject3D, | |||||
| LoadingScreenPlugin, | |||||
| RenderTargetPreviewPlugin, | |||||
| ThreeViewer, | |||||
| } from 'threepipe' | |||||
| import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | ||||
| const viewer = new ThreeViewer({ | const viewer = new ThreeViewer({ | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |
| import {_testFinish, IObject3D, LoadingScreenPlugin, RenderTargetPreviewPlugin, ThreeViewer} from 'threepipe' | |||||
| import { | |||||
| _testFinish, | |||||
| _testStart, | |||||
| IObject3D, | |||||
| LoadingScreenPlugin, | |||||
| RenderTargetPreviewPlugin, | |||||
| ThreeViewer, | |||||
| } from 'threepipe' | |||||
| import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | import {TweakpaneUiPlugin} from '@threepipe/plugin-tweakpane' | ||||
| const viewer = new ThreeViewer({ | const viewer = new ThreeViewer({ | ||||
| } | } | ||||
| _testStart() | |||||
| init().finally(_testFinish) | init().finally(_testFinish) |
| overflow: hidden; | overflow: hidden; | ||||
| } | } | ||||
| </style> | </style> | ||||
| <script type="module" src="../examples-utils/global-loading.mjs"></script> | |||||
| <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | <script type="module" src="../examples-utils/simple-code-preview.mjs"></script> | ||||
| <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | <script id="example-script" type="module" src="./script.js" data-scripts="./script.ts;./script.js"></script> | ||||
| </head> | </head> |