From 59c30ad9552e17ec71478a8dce80672585056af1 Mon Sep 17 00:00:00 2001 From: Kevin Levron Date: Wed, 16 Sep 2020 23:54:14 +0200 Subject: [PATCH] 0.0.6 --- build/trois.module.js | 944 ++++++++++++++++++++++++++++++++++ build/trois.module.js.map | 1 + build/trois.module.min.js | 2 + build/trois.module.min.js.map | 1 + package.json | 2 +- rollup.config.js | 10 +- src/effects/BokehPass.js | 8 +- 7 files changed, 965 insertions(+), 3 deletions(-) create mode 100644 build/trois.module.js create mode 100644 build/trois.module.js.map create mode 100644 build/trois.module.min.js create mode 100644 build/trois.module.min.js.map diff --git a/build/trois.module.js b/build/trois.module.js new file mode 100644 index 0000000..64bad59 --- /dev/null +++ b/build/trois.module.js @@ -0,0 +1,944 @@ +import { h } from 'vue'; +import { Vector2, Vector3, Plane as Plane$1, Raycaster, WebGLRenderer, PerspectiveCamera as PerspectiveCamera$1, Scene as Scene$1, Color, BoxBufferGeometry, SphereBufferGeometry, AmbientLight as AmbientLight$1, PointLight as PointLight$1, SpotLight as SpotLight$1, FrontSide, MeshBasicMaterial, MeshLambertMaterial, MeshPhongMaterial, MeshPhysicalMaterial, MeshStandardMaterial, Mesh as Mesh$1, PlaneBufferGeometry, InstancedMesh as InstancedMesh$1 } from 'three'; +import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js'; +import { EffectComposer as EffectComposer$1 } from 'three/examples/jsm/postprocessing/EffectComposer.js'; +import { RenderPass as RenderPass$1 } from 'three/examples/jsm/postprocessing/RenderPass.js'; +import { BokehPass as BokehPass$1 } from 'three/examples/jsm/postprocessing/BokehPass.js'; +import { UnrealBloomPass as UnrealBloomPass$1 } from 'three/examples/jsm/postprocessing/UnrealBloomPass.js'; + +/** + * Three.js helper + */ +function useThree() { + // default conf + var conf = { + canvas: null, + antialias: true, + alpha: false, + orbit_ctrl: false, + mouse_move: false, + mouse_raycast: false, + resize: 'window', + width: 0, + height: 0, + }; + + // size + var size = { + width: 0, height: 0, + wWidth: 0, wHeight: 0, + ratio: 0, + }; + + // handlers + var afterInitHandlers = []; + var afterResizeHandlers = []; + var beforeRenderHandlers = []; + + // mouse tracking + var mouse = new Vector2(); + var mouseV3 = new Vector3(); + var mousePlane = new Plane$1(new Vector3(0, 0, 1), 0); + var raycaster = new Raycaster(); + + // returned object + var obj = { + conf: conf, + renderer: null, + camera: null, + cameraCtrl: null, + materials: {}, + scene: null, + size: size, + mouse: mouse, mouseV3: mouseV3, + init: init, + dispose: dispose, + render: render, + renderC: renderC, + setSize: setSize, + onAfterInit: onAfterInit, + onAfterResize: onAfterResize, + onBeforeRender: onBeforeRender, + }; + + /** + * init three + */ + function init(params) { + if (params) { + for (var [key, value] of Object.entries(params)) { + conf[key] = value; + } + } + + if (!obj.scene) { + console.error('Missing Scene'); + return; + } + + if (!obj.camera) { + console.error('Missing Camera'); + return; + } + + obj.renderer = new WebGLRenderer({ canvas: conf.canvas, antialias: conf.antialias, alpha: conf.alpha }); + + if (conf.orbit_ctrl) { + obj.orbitCtrl = new OrbitControls(obj.camera, obj.renderer.domElement); + if (conf.orbit_ctrl instanceof Object) { + for (var [key$1, value$1] of Object.entries(conf.orbit_ctrl)) { + obj.orbitCtrl[key$1] = value$1; + } + } + } + + if (conf.width && conf.height) { + setSize(conf.width, conf.height); + } else if (conf.resize) { + onResize(); + window.addEventListener('resize', onResize); + } + + if (conf.mouse_move) { + if (conf.mouse_move === 'body') { + obj.mouse_move_element = document.body; + } else { + obj.mouse_move_element = obj.renderer.domElement; + } + obj.mouse_move_element.addEventListener('mousemove', onMousemove); + obj.mouse_move_element.addEventListener('mouseleave', onMouseleave); + } + + afterInitHandlers.forEach(function (c) { return c(); }); + + return true; + } + /** + * add after init handler + */ + function onAfterInit(callback) { + afterInitHandlers.push(callback); + } + + /** + * add after resize handler + */ + function onAfterResize(callback) { + afterResizeHandlers.push(callback); + } + + /** + * add before render handler + */ + function onBeforeRender(callback) { + beforeRenderHandlers.push(callback); + } + + /** + * default render + */ + function render() { + if (obj.orbitCtrl) { obj.orbitCtrl.update(); } + beforeRenderHandlers.forEach(function (c) { return c(); }); + obj.renderer.render(obj.scene, obj.camera); + } + + /** + * composer render + */ + function renderC() { + if (obj.orbitCtrl) { obj.orbitCtrl.update(); } + beforeRenderHandlers.forEach(function (c) { return c(); }); + obj.composer.render(); + } + + /** + * remove listeners + */ + function dispose() { + window.removeEventListener('resize', onResize); + if (obj.mouse_move_element) { + obj.mouse_move_element.removeEventListener('mousemove', onMousemove); + obj.mouse_move_element.removeEventListener('mouseleave', onMouseleave); + } + } + + /** + * mousemove listener + */ + function onMousemove(e) { + mouse.x = (e.clientX / size.width) * 2 - 1; + mouse.y = -(e.clientY / size.height) * 2 + 1; + updateMouseV3(); + } + + /** + * mouseleave listener + */ + function onMouseleave(e) { + mouse.x = 0; + mouse.y = 0; + updateMouseV3(); + } + + /** + * get 3d mouse position + */ + function updateMouseV3() { + if (conf.mouse_raycast) { + obj.camera.getWorldDirection(mousePlane.normal); + mousePlane.normal.normalize(); + raycaster.setFromCamera(mouse, obj.camera); + raycaster.ray.intersectPlane(mousePlane, mouseV3); + } + } + + /** + * resize listener + */ + function onResize() { + if (conf.resize === 'window') { + setSize(window.innerWidth, window.innerHeight); + } else { + setSize(conf.resize.clientWidth, conf.resize.clientHeight); + } + afterResizeHandlers.forEach(function (c) { return c(); }); + } + + /** + * update renderer size and camera + */ + function setSize(width, height) { + size.width = width; + size.height = height; + size.ratio = width / height; + + obj.renderer.setSize(width, height, false); + obj.camera.aspect = size.ratio; + obj.camera.updateProjectionMatrix(); + + if (obj.composer) { + obj.composer.setSize(width, height); + } + + var wsize = getCameraSize(); + size.wWidth = wsize[0]; size.wHeight = wsize[1]; + } + + /** + * calculate camera visible area size + */ + function getCameraSize() { + var vFOV = (obj.camera.fov * Math.PI) / 180; + var h = 2 * Math.tan(vFOV / 2) * Math.abs(obj.camera.position.z); + var w = h * obj.camera.aspect; + return [w, h]; + } + + return obj; +} + +var Renderer = { + props: { + antialias: { + type: Boolean, + default: true, + }, + alpha: { + type: Boolean, + default: false, + }, + shadow: { + type: Boolean, + default: false, + }, + orbitCtrl: { + type: [Boolean, Object], + default: false, + }, + mouseMove: { + type: [Boolean, String], + default: false, + }, + mouseRaycast: { + type: Boolean, + default: false, + }, + resize: { + type: [Boolean, String, Element], + default: 'window', + }, + width: String, + height: String, + }, + setup: function setup(props) { + return { + three: useThree(), + raf: true, + }; + }, + provide: function provide() { + return { + three: this.three, + }; + }, + mounted: function mounted() { + var params = { + canvas: this.$refs.canvas, + antialias: this.antialias, + alpha: this.alpha, + orbit_ctrl: this.orbitCtrl, + mouse_move: this.mouseMove, + mouse_raycast: this.mouseRaycast, + resize: this.resize, + width: this.width, + height: this.height, + }; + + if (this.three.init(params)) { + this.three.renderer.shadowMap.enabled = this.shadow; + if (this.three.composer) { this.animateC(); } + else { this.animate(); } + } }, + beforeUnmount: function beforeUnmount() { + this.raf = false; + this.three.dispose(); + }, + methods: { + onBeforeRender: function onBeforeRender(callback) { + this.three.onBeforeRender(callback); + }, + onAfterResize: function onAfterResize(callback) { + this.three.onAfterResize(callback); + }, + animate: function animate() { + if (this.raf) { requestAnimationFrame(this.animate); } + this.three.render(); + }, + animateC: function animateC() { + if (this.raf) { requestAnimationFrame(this.animateC); } + this.three.renderC(); + }, + }, + render: function render() { + return h( + 'canvas', + { ref: 'canvas' }, + this.$slots.default() + ); + }, +}; + +function setFromProp(o, prop) { + if (prop instanceof Object) { + for (var [key, value] of Object.entries(prop)) { + o[key] = value; + } + } +} +function lerp(value1, value2, amount) { + amount = amount < 0 ? 0 : amount; + amount = amount > 1 ? 1 : amount; + return value1 + (value2 - value1) * amount; +} +function lerpv3(v1, v2, amount) { + v1.x = lerp(v1.x, v2.x, amount); + v1.y = lerp(v1.y, v2.y, amount); + v1.z = lerp(v1.z, v2.z, amount); +} + +var PerspectiveCamera = { + inject: ['three'], + props: { + fov: { + type: Number, + default: 50, + }, + position: Object, + }, + created: function created() { + var camera = new PerspectiveCamera$1(this.fov); + setFromProp(camera.position, this.position); + this.three.camera = camera; + }, + render: function render() { + return []; + }, +}; + +var Scene = { + inject: ['three'], + props: { + id: String, + background: [String, Number], + }, + setup: function setup (props) { + var scene = new Scene$1(); + if (props.background) { scene.background = new Color(props.background); } + return { scene: scene }; + }, + provide: function provide() { + return { + scene: this.scene, + }; + }, + mounted: function mounted() { + if (!this.three.scene) { + this.three.scene = this.scene; + } + }, + render: function render() { + if (this.$slots.default) { + return this.$slots.default(); + } + return []; + }, +}; + +var Geometry = { + inject: ['parent'], + beforeMount: function beforeMount() { + if (!this.parent) { + console.error('Missing parent Mesh'); + } + }, + unmounted: function unmounted() { + this.parent.geometry.dispose(); + }, + render: function render() { + return []; + }, +}; + +var BoxGeometry = { + extends: Geometry, + props: { + size: { + type: Number, + }, + width: { + type: Number, + default: 1, + }, + height: { + type: Number, + default: 1, + }, + depth: { + type: Number, + default: 1, + }, + }, + mounted: function mounted() { + if (this.size) { + this.parent.geometry = new BoxBufferGeometry(this.size, this.size, this.size); + } else { + this.parent.geometry = new BoxBufferGeometry(this.width, this.height, this.depth); + } + }, +}; + +var SphereGeometry = { + extends: Geometry, + props: { + radius: Number, + widthSegments: { + type: Number, + default: 12, + }, + heightSegments: { + type: Number, + default: 12, + }, + }, + mounted: function mounted() { + this.parent.geometry = new SphereBufferGeometry(this.radius, this.widthSegments, this.heightSegments); + }, +}; + +var Light = { + inject: ['scene'], + props: { + color: { + type: String, + default: '#ffffff', + }, + intensity: { + type: Number, + default: 1, + }, + castShadow: { + type: Boolean, + default: false, + }, + shadowMapSize: Object, + position: Object, + }, + mounted: function mounted() { + setFromProp(this.light.position, this.position); + + if (this.light.shadow) { + this.light.castShadow = this.castShadow; + setFromProp(this.light.shadow.mapSize, this.shadowMapSize); + } + + this.scene.add(this.light); + if (this.light.target) { this.scene.add(this.light.target); } + }, + render: function render() { + return []; + }, +}; + +var AmbientLight = { + extends: Light, + created: function created() { + this.light = new AmbientLight$1(this.color, this.intensity); + }, +}; + +var PointLight = { + extends: Light, + props: { + distance: { + type: Number, + default: 0, + }, + decay: { + type: Number, + default: 1, + }, + }, + created: function created() { + this.light = new PointLight$1(this.color, this.intensity, this.distance, this.decay); + }, +}; + +var SpotLight = { + extends: Light, + props: { + distance: { + type: Number, + default: 0, + }, + angle: { + type: Number, + default: Math.PI / 3, + }, + penumbra: { + type: Number, + default: 0, + }, + decay: { + type: Number, + default: 1, + }, + }, + created: function created() { + this.light = new SpotLight$1(this.color, this.intensity, this.distance, this.angle, this.penumbra, this.decay); + }, +}; + +var Material = { + inject: ['three'], + props: { + id: String, + color: { + type: [String, Number], + default: '#ffffff', + }, + depthTest: { + type: Boolean, + default: true, + }, + depthWrite: { + type: Boolean, + default: true, + }, + fog: { + type: Boolean, + default: false, + }, + opacity: { + type: Number, + default: 1, + }, + side: { + type: Number, + default: FrontSide, + }, + transparent: { + type: Boolean, + default: false, + }, + vertexColors: { + type: Boolean, + default: false, + }, + }, + mounted: function mounted() { + this.three.materials[this.id] = this.material; + }, + unmounted: function unmounted() { + this.material.dispose(); + }, + methods: { + propsValues: function propsValues() { + var props = {}; + for (var [key, value] of Object.entries(this.$props)) { + if (key !== 'id') { props[key] = value; } + } + return props; + }, + }, + render: function render() { + return []; + }, +}; + +var BasicMaterial = { + extends: Material, + created: function created() { + this.material = new MeshBasicMaterial({ + color: this.color, + }); + }, +}; + +var LambertMaterial = { + extends: Material, + created: function created() { + this.material = new MeshLambertMaterial({ + color: this.color, + }); + }, +}; + +var PhongMaterial = { + extends: Material, + created: function created() { + this.material = new MeshPhongMaterial({ + color: this.color, + }); + }, +}; + +var PhysicalMaterial = { + extends: Material, + created: function created() { + this.material = new MeshPhysicalMaterial({ + color: this.color, + }); + }, +}; + +var StandardMaterial = { + extends: Material, + props: { + emissive: { + type: [Number, String], + default: 0, + }, + emissiveIntensity: { + type: Number, + default: 1, + }, + metalness: { + type: Number, + default: 0, + }, + roughness: { + type: Number, + default: 1, + }, + }, + created: function created() { + this.material = new MeshStandardMaterial(this.propsValues()); + }, +}; + +var Mesh = { + inject: ['three', 'scene'], + props: { + material: String, + position: Object, + rotation: Object, + scale: Object, + castShadow: { + type: Boolean, + default: false, + }, + receiveShadow: { + type: Boolean, + default: false, + }, + }, + mounted: function mounted() { + this.mesh = new Mesh$1(this.geometry, this.three.materials[this.material]); + setFromProp(this.mesh.position, this.position); + setFromProp(this.mesh.rotation, this.rotation); + setFromProp(this.mesh.scale, this.scale); + this.mesh.castShadow = this.castShadow; + this.mesh.receiveShadow = this.receiveShadow; + this.scene.add(this.mesh); + }, + unmounted: function unmounted() { + this.geometry.dispose(); + }, + render: function render() { + return []; + }, +}; + +var Box = { + extends: Mesh, + props: { + size: { + type: Number, + }, + width: { + type: Number, + default: 1, + }, + height: { + type: Number, + default: 1, + }, + depth: { + type: Number, + default: 1, + }, + }, + created: function created() { + if (this.size) { + this.geometry = new BoxBufferGeometry(this.size, this.size, this.size); + } else { + this.geometry = new BoxBufferGeometry(this.width, this.height, this.depth); + } + }, +}; + +var Plane = { + extends: Mesh, + props: { + width: { + type: Number, + default: 1, + }, + height: { + type: Number, + default: 1, + }, + widthSegments: { + type: Number, + default: 1, + }, + heightSegments: { + type: Number, + default: 1, + }, + }, + created: function created() { + this.geometry = new PlaneBufferGeometry(this.width, this.height, this.widthSegments, this.heightSegments); + }, +}; + +var Sphere = { + extends: Mesh, + props: { + radius: Number, + widthSegments: { + type: Number, + default: 12, + }, + heightSegments: { + type: Number, + default: 12, + }, + }, + created: function created() { + this.geometry = new SphereBufferGeometry(this.radius, this.widthSegments, this.heightSegments); + }, +}; + +var InstancedMesh = { + inject: ['three', 'scene'], + props: { + material: String, + count: Number, + position: Object, + castShadow: { + type: Boolean, + default: false, + }, + receiveShadow: { + type: Boolean, + default: false, + }, + }, + setup: function setup() { + return { + conf: {}, + }; + }, + provide: function provide() { + return { + parent: this.conf, + }; + }, + beforeMount: function beforeMount() { + if (!this.$slots.default) { + console.error('Missing Geometry'); + } + }, + mounted: function mounted() { + this.mesh = new InstancedMesh$1(this.conf.geometry, this.three.materials[this.material], this.count); + setFromProp(this.mesh.position, this.position); + this.mesh.castShadow = this.castShadow; + this.mesh.receiveShadow = this.receiveShadow; + this.scene.add(this.mesh); + }, + render: function render() { + return this.$slots.default(); + }, +}; + +var EffectComposer = { + setup: function setup() { + return { + passes: [], + }; + }, + inject: ['three'], + provide: function provide() { + return { + passes: this.passes, + }; + }, + mounted: function mounted() { + var this$1 = this; + + this.three.onAfterInit(function () { + this$1.composer = new EffectComposer$1(this$1.three.renderer); + this$1.passes.forEach(function (pass) { + this$1.composer.addPass(pass); + }); + this$1.three.composer = this$1.composer; + }); + }, + render: function render() { + return this.$slots.default(); + }, +}; + +var EffectPass = { + inject: ['three', 'passes'], + beforeMount: function beforeMount() { + if (!this.passes) { + console.error('Missing parent EffectComposer'); + } + }, + render: function render() { + return []; + }, +}; + +var RenderPass = { + extends: EffectPass, + mounted: function mounted() { + if (!this.three.scene) { + console.error('Missing Scene'); + } + if (!this.three.camera) { + console.error('Missing Camera'); + } + var pass = new RenderPass$1(this.three.scene, this.three.camera); + this.passes.push(pass); + this.pass = pass; + }, +}; + +var BokehPass = { + extends: EffectPass, + props: { + focus: { + type: Number, + default: 1, + }, + aperture: { + type: Number, + default: 0.025, + }, + maxblur: { + type: Number, + default: 0.01, + }, + }, + // watch: { + // focus() { + // this.pass.focus = this.focus; + // }, + // aperture() { + // this.pass.aperture = this.aperture; + // }, + // maxblur() { + // this.pass.maxblur = this.maxblur; + // }, + // }, + mounted: function mounted() { + if (!this.three.scene) { + console.error('Missing Scene'); + } + if (!this.three.camera) { + console.error('Missing Camera'); + } + var params = { + focus: this.focus, + aperture: this.aperture, + maxblur: this.maxblur, + width: this.three.size.width, + height: this.three.size.height, + }; + var pass = new BokehPass$1(this.three.scene, this.three.camera, params); + this.passes.push(pass); + this.pass = pass; + }, +}; + +var UnrealBloomPass = { + extends: EffectPass, + props: { + strength: { + type: Number, + default: 1.5, + }, + radius: { + type: Number, + default: 0, + }, + threshold: { + type: Number, + default: 0, + }, + }, + // watch: { + // strength() { + // this.pass.strength = this.strength; + // }, + // radius() { + // this.pass.strength = this.radius; + // }, + // threshold() { + // this.pass.strength = this.threshold; + // }, + // }, + mounted: function mounted() { + var size = new Vector2(this.three.size.width, this.three.size.height); + var pass = new UnrealBloomPass$1(size, this.strength, this.radius, this.threshold); + this.passes.push(pass); + this.pass = pass; + }, +}; + +export { AmbientLight, BasicMaterial, BokehPass, Box, BoxGeometry, PerspectiveCamera as Camera, EffectComposer, InstancedMesh, LambertMaterial, PerspectiveCamera, PhongMaterial, PhysicalMaterial, Plane, PointLight, RenderPass, Renderer, Scene, Sphere, SphereGeometry, SpotLight, StandardMaterial, UnrealBloomPass, lerp, lerpv3, setFromProp }; +//# sourceMappingURL=trois.module.js.map diff --git a/build/trois.module.js.map b/build/trois.module.js.map new file mode 100644 index 0000000..8dba39b --- /dev/null +++ b/build/trois.module.js.map @@ -0,0 +1 @@ +{"version":3,"file":"trois.module.js","sources":["../src/core/useThree.js","../src/core/Renderer.js","../src/tools.js","../src/core/PerspectiveCamera.js","../src/core/Scene.js","../src/geometries/Geometry.js","../src/geometries/BoxGeometry.js","../src/geometries/SphereGeometry.js","../src/lights/Light.js","../src/lights/AmbientLight.js","../src/lights/PointLight.js","../src/lights/SpotLight.js","../src/materials/Material.js","../src/materials/BasicMaterial.js","../src/materials/LambertMaterial.js","../src/materials/PhongMaterial.js","../src/materials/PhysicalMaterial.js","../src/materials/StandardMaterial.js","../src/meshes/Mesh.js","../src/meshes/Box.js","../src/meshes/Plane.js","../src/meshes/Sphere.js","../src/meshes/InstancedMesh.js","../src/effects/EffectComposer.js","../src/effects/EffectPass.js","../src/effects/RenderPass.js","../src/effects/BokehPass.js","../src/effects/UnrealBloomPass.js"],"sourcesContent":["import {\r\n Plane,\r\n Raycaster,\r\n Vector2,\r\n Vector3,\r\n WebGLRenderer,\r\n} from 'three';\r\n\r\nimport { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';\r\n\r\n/**\r\n * Three.js helper\r\n */\r\nexport default function useThree() {\r\n // default conf\r\n const conf = {\r\n canvas: null,\r\n antialias: true,\r\n alpha: false,\r\n orbit_ctrl: false,\r\n mouse_move: false,\r\n mouse_raycast: false,\r\n resize: 'window',\r\n width: 0,\r\n height: 0,\r\n };\r\n\r\n // size\r\n const size = {\r\n width: 0, height: 0,\r\n wWidth: 0, wHeight: 0,\r\n ratio: 0,\r\n };\r\n\r\n // handlers\r\n const afterInitHandlers = [];\r\n const afterResizeHandlers = [];\r\n const beforeRenderHandlers = [];\r\n\r\n // mouse tracking\r\n const mouse = new Vector2();\r\n const mouseV3 = new Vector3();\r\n const mousePlane = new Plane(new Vector3(0, 0, 1), 0);\r\n const raycaster = new Raycaster();\r\n\r\n // returned object\r\n const obj = {\r\n conf,\r\n renderer: null,\r\n camera: null,\r\n cameraCtrl: null,\r\n materials: {},\r\n scene: null,\r\n size,\r\n mouse, mouseV3,\r\n init,\r\n dispose,\r\n render,\r\n renderC,\r\n setSize,\r\n onAfterInit,\r\n onAfterResize,\r\n onBeforeRender,\r\n };\r\n\r\n /**\r\n * init three\r\n */\r\n function init(params) {\r\n if (params) {\r\n for (const [key, value] of Object.entries(params)) {\r\n conf[key] = value;\r\n }\r\n }\r\n\r\n if (!obj.scene) {\r\n console.error('Missing Scene');\r\n return;\r\n }\r\n\r\n if (!obj.camera) {\r\n console.error('Missing Camera');\r\n return;\r\n }\r\n\r\n obj.renderer = new WebGLRenderer({ canvas: conf.canvas, antialias: conf.antialias, alpha: conf.alpha });\r\n\r\n if (conf.orbit_ctrl) {\r\n obj.orbitCtrl = new OrbitControls(obj.camera, obj.renderer.domElement);\r\n if (conf.orbit_ctrl instanceof Object) {\r\n for (const [key, value] of Object.entries(conf.orbit_ctrl)) {\r\n obj.orbitCtrl[key] = value;\r\n }\r\n }\r\n }\r\n\r\n if (conf.width && conf.height) {\r\n setSize(conf.width, conf.height);\r\n } else if (conf.resize) {\r\n onResize();\r\n window.addEventListener('resize', onResize);\r\n }\r\n\r\n if (conf.mouse_move) {\r\n if (conf.mouse_move === 'body') {\r\n obj.mouse_move_element = document.body;\r\n } else {\r\n obj.mouse_move_element = obj.renderer.domElement;\r\n }\r\n obj.mouse_move_element.addEventListener('mousemove', onMousemove);\r\n obj.mouse_move_element.addEventListener('mouseleave', onMouseleave);\r\n }\r\n\r\n afterInitHandlers.forEach(c => c());\r\n\r\n return true;\r\n };\r\n\r\n /**\r\n * add after init handler\r\n */\r\n function onAfterInit(callback) {\r\n afterInitHandlers.push(callback);\r\n }\r\n\r\n /**\r\n * add after resize handler\r\n */\r\n function onAfterResize(callback) {\r\n afterResizeHandlers.push(callback);\r\n }\r\n\r\n /**\r\n * add before render handler\r\n */\r\n function onBeforeRender(callback) {\r\n beforeRenderHandlers.push(callback);\r\n }\r\n\r\n /**\r\n * default render\r\n */\r\n function render() {\r\n if (obj.orbitCtrl) obj.orbitCtrl.update();\r\n beforeRenderHandlers.forEach(c => c());\r\n obj.renderer.render(obj.scene, obj.camera);\r\n }\r\n\r\n /**\r\n * composer render\r\n */\r\n function renderC() {\r\n if (obj.orbitCtrl) obj.orbitCtrl.update();\r\n beforeRenderHandlers.forEach(c => c());\r\n obj.composer.render();\r\n }\r\n\r\n /**\r\n * remove listeners\r\n */\r\n function dispose() {\r\n window.removeEventListener('resize', onResize);\r\n if (obj.mouse_move_element) {\r\n obj.mouse_move_element.removeEventListener('mousemove', onMousemove);\r\n obj.mouse_move_element.removeEventListener('mouseleave', onMouseleave); \r\n }\r\n }\r\n\r\n /**\r\n * mousemove listener\r\n */\r\n function onMousemove(e) {\r\n mouse.x = (e.clientX / size.width) * 2 - 1;\r\n mouse.y = -(e.clientY / size.height) * 2 + 1;\r\n updateMouseV3();\r\n }\r\n\r\n /**\r\n * mouseleave listener\r\n */\r\n function onMouseleave(e) {\r\n mouse.x = 0;\r\n mouse.y = 0;\r\n updateMouseV3();\r\n }\r\n\r\n /**\r\n * get 3d mouse position\r\n */\r\n function updateMouseV3() {\r\n if (conf.mouse_raycast) {\r\n obj.camera.getWorldDirection(mousePlane.normal);\r\n mousePlane.normal.normalize();\r\n raycaster.setFromCamera(mouse, obj.camera);\r\n raycaster.ray.intersectPlane(mousePlane, mouseV3);\r\n }\r\n }\r\n\r\n /**\r\n * resize listener\r\n */\r\n function onResize() {\r\n if (conf.resize === 'window') {\r\n setSize(window.innerWidth, window.innerHeight);\r\n } else {\r\n setSize(conf.resize.clientWidth, conf.resize.clientHeight);\r\n }\r\n afterResizeHandlers.forEach(c => c());\r\n }\r\n\r\n /**\r\n * update renderer size and camera\r\n */\r\n function setSize(width, height) {\r\n size.width = width;\r\n size.height = height;\r\n size.ratio = width / height;\r\n\r\n obj.renderer.setSize(width, height, false);\r\n obj.camera.aspect = size.ratio;\r\n obj.camera.updateProjectionMatrix();\r\n\r\n if (obj.composer) {\r\n obj.composer.setSize(width, height);\r\n }\r\n\r\n const wsize = getCameraSize();\r\n size.wWidth = wsize[0]; size.wHeight = wsize[1];\r\n }\r\n\r\n /**\r\n * calculate camera visible area size\r\n */\r\n function getCameraSize() {\r\n const vFOV = (obj.camera.fov * Math.PI) / 180;\r\n const h = 2 * Math.tan(vFOV / 2) * Math.abs(obj.camera.position.z);\r\n const w = h * obj.camera.aspect;\r\n return [w, h];\r\n }\r\n\r\n return obj;\r\n}\r\n","import { h } from 'vue';\r\nimport useThree from './useThree';\r\n\r\nexport default {\r\n props: {\r\n antialias: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n alpha: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n shadow: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n orbitCtrl: {\r\n type: [Boolean, Object],\r\n default: false,\r\n },\r\n mouseMove: {\r\n type: [Boolean, String],\r\n default: false,\r\n },\r\n mouseRaycast: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n resize: {\r\n type: [Boolean, String, Element],\r\n default: 'window',\r\n },\r\n width: String,\r\n height: String,\r\n },\r\n setup(props) {\r\n return {\r\n three: useThree(),\r\n raf: true,\r\n };\r\n },\r\n provide() {\r\n return {\r\n three: this.three,\r\n };\r\n },\r\n mounted() {\r\n const params = {\r\n canvas: this.$refs.canvas,\r\n antialias: this.antialias,\r\n alpha: this.alpha,\r\n orbit_ctrl: this.orbitCtrl,\r\n mouse_move: this.mouseMove,\r\n mouse_raycast: this.mouseRaycast,\r\n resize: this.resize,\r\n width: this.width,\r\n height: this.height,\r\n };\r\n\r\n if (this.three.init(params)) {\r\n this.three.renderer.shadowMap.enabled = this.shadow;\r\n if (this.three.composer) this.animateC();\r\n else this.animate();\r\n };\r\n },\r\n beforeUnmount() {\r\n this.raf = false;\r\n this.three.dispose();\r\n },\r\n methods: {\r\n onBeforeRender(callback) {\r\n this.three.onBeforeRender(callback);\r\n },\r\n onAfterResize(callback) {\r\n this.three.onAfterResize(callback);\r\n },\r\n animate() {\r\n if (this.raf) requestAnimationFrame(this.animate);\r\n this.three.render();\r\n },\r\n animateC() {\r\n if (this.raf) requestAnimationFrame(this.animateC);\r\n this.three.renderC();\r\n },\r\n },\r\n render() {\r\n return h(\r\n 'canvas',\r\n { ref: 'canvas' },\r\n this.$slots.default()\r\n );\r\n },\r\n};\r\n","export function setFromProp(o, prop) {\r\n if (prop instanceof Object) {\r\n for (const [key, value] of Object.entries(prop)) {\r\n o[key] = value;\r\n }\r\n }\r\n};\r\n\r\nexport function lerp(value1, value2, amount) {\r\n amount = amount < 0 ? 0 : amount;\r\n amount = amount > 1 ? 1 : amount;\r\n return value1 + (value2 - value1) * amount;\r\n};\r\n\r\nexport function lerpv3(v1, v2, amount) {\r\n v1.x = lerp(v1.x, v2.x, amount);\r\n v1.y = lerp(v1.y, v2.y, amount);\r\n v1.z = lerp(v1.z, v2.z, amount);\r\n};\r\n","import { PerspectiveCamera } from 'three';\r\nimport { setFromProp } from '../tools.js';\r\n\r\nexport default {\r\n inject: ['three'],\r\n props: {\r\n fov: {\r\n type: Number,\r\n default: 50,\r\n },\r\n position: Object,\r\n },\r\n created() {\r\n const camera = new PerspectiveCamera(this.fov);\r\n setFromProp(camera.position, this.position);\r\n this.three.camera = camera;\r\n },\r\n render() {\r\n return [];\r\n },\r\n};\r\n","import { Scene, Color } from 'three';\r\n\r\nexport default {\r\n inject: ['three'],\r\n props: {\r\n id: String,\r\n background: [String, Number],\r\n },\r\n setup (props) {\r\n const scene = new Scene();\r\n if (props.background) scene.background = new Color(props.background);\r\n return { scene };\r\n },\r\n provide() {\r\n return {\r\n scene: this.scene,\r\n };\r\n },\r\n mounted() {\r\n if (!this.three.scene) {\r\n this.three.scene = this.scene;\r\n }\r\n },\r\n render() {\r\n if (this.$slots.default) {\r\n return this.$slots.default();\r\n }\r\n return [];\r\n },\r\n};\r\n","export default {\r\n inject: ['parent'],\r\n beforeMount() {\r\n if (!this.parent) {\r\n console.error('Missing parent Mesh');\r\n }\r\n },\r\n unmounted() {\r\n this.parent.geometry.dispose();\r\n },\r\n render() {\r\n return [];\r\n },\r\n};\r\n","import { BoxBufferGeometry } from 'three';\r\nimport Geometry from './Geometry.js';\r\n\r\nexport default {\r\n extends: Geometry,\r\n props: {\r\n size: {\r\n type: Number,\r\n },\r\n width: {\r\n type: Number,\r\n default: 1,\r\n },\r\n height: {\r\n type: Number,\r\n default: 1,\r\n },\r\n depth: {\r\n type: Number,\r\n default: 1,\r\n },\r\n },\r\n mounted() {\r\n if (this.size) {\r\n this.parent.geometry = new BoxBufferGeometry(this.size, this.size, this.size);\r\n } else {\r\n this.parent.geometry = new BoxBufferGeometry(this.width, this.height, this.depth);\r\n }\r\n },\r\n};\r\n","import { SphereBufferGeometry } from 'three';\r\nimport Geometry from './Geometry.js';\r\n\r\nexport default {\r\n extends: Geometry,\r\n props: {\r\n radius: Number,\r\n widthSegments: {\r\n type: Number,\r\n default: 12,\r\n },\r\n heightSegments: {\r\n type: Number,\r\n default: 12,\r\n },\r\n },\r\n mounted() {\r\n this.parent.geometry = new SphereBufferGeometry(this.radius, this.widthSegments, this.heightSegments);\r\n },\r\n};\r\n","import { setFromProp } from '../tools.js';\r\n\r\nexport default {\r\n inject: ['scene'],\r\n props: {\r\n color: {\r\n type: String,\r\n default: '#ffffff',\r\n },\r\n intensity: {\r\n type: Number,\r\n default: 1,\r\n },\r\n castShadow: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n shadowMapSize: Object,\r\n position: Object,\r\n },\r\n mounted() {\r\n setFromProp(this.light.position, this.position);\r\n\r\n if (this.light.shadow) {\r\n this.light.castShadow = this.castShadow;\r\n setFromProp(this.light.shadow.mapSize, this.shadowMapSize);\r\n }\r\n\r\n this.scene.add(this.light);\r\n if (this.light.target) this.scene.add(this.light.target);\r\n },\r\n render() {\r\n return [];\r\n },\r\n};\r\n","import { AmbientLight } from 'three';\r\nimport Light from './Light.js';\r\n\r\nexport default {\r\n extends: Light,\r\n created() {\r\n this.light = new AmbientLight(this.color, this.intensity);\r\n },\r\n};\r\n","import { PointLight } from 'three';\r\nimport Light from './Light.js';\r\n\r\nexport default {\r\n extends: Light,\r\n props: {\r\n distance: {\r\n type: Number,\r\n default: 0,\r\n },\r\n decay: {\r\n type: Number,\r\n default: 1,\r\n },\r\n },\r\n created() {\r\n this.light = new PointLight(this.color, this.intensity, this.distance, this.decay);\r\n },\r\n};\r\n","import { SpotLight } from 'three';\r\nimport Light from './Light.js';\r\n\r\nexport default {\r\n extends: Light,\r\n props: {\r\n distance: {\r\n type: Number,\r\n default: 0,\r\n },\r\n angle: {\r\n type: Number,\r\n default: Math.PI / 3,\r\n },\r\n penumbra: {\r\n type: Number,\r\n default: 0,\r\n },\r\n decay: {\r\n type: Number,\r\n default: 1,\r\n },\r\n },\r\n created() {\r\n this.light = new SpotLight(this.color, this.intensity, this.distance, this.angle, this.penumbra, this.decay);\r\n },\r\n};\r\n","import { FrontSide } from 'three';\r\n\r\nexport default {\r\n inject: ['three'],\r\n props: {\r\n id: String,\r\n color: {\r\n type: [String, Number],\r\n default: '#ffffff',\r\n },\r\n depthTest: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n depthWrite: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n fog: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n opacity: {\r\n type: Number,\r\n default: 1,\r\n },\r\n side: {\r\n type: Number,\r\n default: FrontSide,\r\n },\r\n transparent: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n vertexColors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n mounted() {\r\n this.three.materials[this.id] = this.material;\r\n },\r\n unmounted() {\r\n this.material.dispose();\r\n },\r\n methods: {\r\n propsValues() {\r\n const props = {};\r\n for (const [key, value] of Object.entries(this.$props)) {\r\n if (key !== 'id') props[key] = value;\r\n }\r\n return props;\r\n },\r\n },\r\n render() {\r\n return [];\r\n },\r\n};\r\n","import { MeshBasicMaterial } from 'three';\r\nimport Material from './Material';\r\n\r\nexport default {\r\n extends: Material,\r\n created() {\r\n this.material = new MeshBasicMaterial({\r\n color: this.color,\r\n });\r\n },\r\n};\r\n","import { MeshLambertMaterial } from 'three';\r\nimport Material from './Material';\r\n\r\nexport default {\r\n extends: Material,\r\n created() {\r\n this.material = new MeshLambertMaterial({\r\n color: this.color,\r\n });\r\n },\r\n};\r\n","import { MeshPhongMaterial } from 'three';\r\nimport Material from './Material';\r\n\r\nexport default {\r\n extends: Material,\r\n created() {\r\n this.material = new MeshPhongMaterial({\r\n color: this.color,\r\n });\r\n },\r\n};\r\n","import { MeshPhysicalMaterial } from 'three';\r\nimport Material from './Material';\r\n\r\nexport default {\r\n extends: Material,\r\n created() {\r\n this.material = new MeshPhysicalMaterial({\r\n color: this.color,\r\n });\r\n },\r\n};\r\n","import { MeshStandardMaterial } from 'three';\r\nimport Material from './Material';\r\n\r\nexport default {\r\n extends: Material,\r\n props: {\r\n emissive: {\r\n type: [Number, String],\r\n default: 0,\r\n },\r\n emissiveIntensity: {\r\n type: Number,\r\n default: 1,\r\n },\r\n metalness: {\r\n type: Number,\r\n default: 0,\r\n },\r\n roughness: {\r\n type: Number,\r\n default: 1,\r\n },\r\n },\r\n created() {\r\n this.material = new MeshStandardMaterial(this.propsValues());\r\n },\r\n};\r\n","import { Mesh } from 'three';\r\nimport { setFromProp } from '../tools.js';\r\n\r\nexport default {\r\n inject: ['three', 'scene'],\r\n props: {\r\n material: String,\r\n position: Object,\r\n rotation: Object,\r\n scale: Object,\r\n castShadow: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n receiveShadow: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n mounted() {\r\n this.mesh = new Mesh(this.geometry, this.three.materials[this.material]);\r\n setFromProp(this.mesh.position, this.position);\r\n setFromProp(this.mesh.rotation, this.rotation);\r\n setFromProp(this.mesh.scale, this.scale);\r\n this.mesh.castShadow = this.castShadow;\r\n this.mesh.receiveShadow = this.receiveShadow;\r\n this.scene.add(this.mesh);\r\n },\r\n unmounted() {\r\n this.geometry.dispose();\r\n },\r\n render() {\r\n return [];\r\n },\r\n};\r\n","import { BoxBufferGeometry } from 'three';\r\nimport Mesh from './Mesh.js';\r\n\r\nexport default {\r\n extends: Mesh,\r\n props: {\r\n size: {\r\n type: Number,\r\n },\r\n width: {\r\n type: Number,\r\n default: 1,\r\n },\r\n height: {\r\n type: Number,\r\n default: 1,\r\n },\r\n depth: {\r\n type: Number,\r\n default: 1,\r\n },\r\n },\r\n created() {\r\n if (this.size) {\r\n this.geometry = new BoxBufferGeometry(this.size, this.size, this.size);\r\n } else {\r\n this.geometry = new BoxBufferGeometry(this.width, this.height, this.depth);\r\n }\r\n },\r\n};\r\n","import { PlaneBufferGeometry } from 'three';\r\nimport Mesh from './Mesh.js';\r\n\r\nexport default {\r\n extends: Mesh,\r\n props: {\r\n width: {\r\n type: Number,\r\n default: 1,\r\n },\r\n height: {\r\n type: Number,\r\n default: 1,\r\n },\r\n widthSegments: {\r\n type: Number,\r\n default: 1,\r\n },\r\n heightSegments: {\r\n type: Number,\r\n default: 1,\r\n },\r\n },\r\n created() {\r\n this.geometry = new PlaneBufferGeometry(this.width, this.height, this.widthSegments, this.heightSegments);\r\n },\r\n};\r\n","import { SphereBufferGeometry } from 'three';\r\nimport Mesh from './Mesh.js';\r\n\r\nexport default {\r\n extends: Mesh,\r\n props: {\r\n radius: Number,\r\n widthSegments: {\r\n type: Number,\r\n default: 12,\r\n },\r\n heightSegments: {\r\n type: Number,\r\n default: 12,\r\n },\r\n },\r\n created() {\r\n this.geometry = new SphereBufferGeometry(this.radius, this.widthSegments, this.heightSegments);\r\n },\r\n};\r\n","import { InstancedMesh } from 'three';\r\nimport { setFromProp } from '../tools.js';\r\n\r\nexport default {\r\n inject: ['three', 'scene'],\r\n props: {\r\n material: String,\r\n count: Number,\r\n position: Object,\r\n castShadow: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n receiveShadow: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n setup() {\r\n return {\r\n conf: {},\r\n };\r\n },\r\n provide() {\r\n return {\r\n parent: this.conf,\r\n };\r\n },\r\n beforeMount() {\r\n if (!this.$slots.default) {\r\n console.error('Missing Geometry');\r\n }\r\n },\r\n mounted() {\r\n this.mesh = new InstancedMesh(this.conf.geometry, this.three.materials[this.material], this.count);\r\n setFromProp(this.mesh.position, this.position);\r\n this.mesh.castShadow = this.castShadow;\r\n this.mesh.receiveShadow = this.receiveShadow;\r\n this.scene.add(this.mesh);\r\n },\r\n render() {\r\n return this.$slots.default();\r\n },\r\n};\r\n","import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';\r\n\r\nexport default {\r\n setup() {\r\n return {\r\n passes: [],\r\n };\r\n },\r\n inject: ['three'],\r\n provide() {\r\n return {\r\n passes: this.passes,\r\n };\r\n },\r\n mounted() {\r\n this.three.onAfterInit(() => {\r\n this.composer = new EffectComposer(this.three.renderer);\r\n this.passes.forEach(pass => {\r\n this.composer.addPass(pass);\r\n });\r\n this.three.composer = this.composer;\r\n });\r\n },\r\n render() {\r\n return this.$slots.default();\r\n },\r\n};\r\n","export default {\r\n inject: ['three', 'passes'],\r\n beforeMount() {\r\n if (!this.passes) {\r\n console.error('Missing parent EffectComposer');\r\n }\r\n },\r\n render() {\r\n return [];\r\n },\r\n};\r\n","import { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js';\r\nimport EffectPass from './EffectPass.js';\r\n\r\nexport default {\r\n extends: EffectPass,\r\n mounted() {\r\n if (!this.three.scene) {\r\n console.error('Missing Scene');\r\n }\r\n if (!this.three.camera) {\r\n console.error('Missing Camera');\r\n }\r\n const pass = new RenderPass(this.three.scene, this.three.camera);\r\n this.passes.push(pass);\r\n this.pass = pass;\r\n },\r\n};\r\n","import { BokehPass } from 'three/examples/jsm/postprocessing/BokehPass.js';\r\nimport EffectPass from './EffectPass.js';\r\n\r\nexport default {\r\n extends: EffectPass,\r\n props: {\r\n focus: {\r\n type: Number,\r\n default: 1,\r\n },\r\n aperture: {\r\n type: Number,\r\n default: 0.025,\r\n },\r\n maxblur: {\r\n type: Number,\r\n default: 0.01,\r\n },\r\n },\r\n // watch: {\r\n // focus() {\r\n // this.pass.focus = this.focus;\r\n // },\r\n // aperture() {\r\n // this.pass.aperture = this.aperture;\r\n // },\r\n // maxblur() {\r\n // this.pass.maxblur = this.maxblur;\r\n // },\r\n // },\r\n mounted() {\r\n if (!this.three.scene) {\r\n console.error('Missing Scene');\r\n }\r\n if (!this.three.camera) {\r\n console.error('Missing Camera');\r\n }\r\n const params = {\r\n focus: this.focus,\r\n aperture: this.aperture,\r\n maxblur: this.maxblur,\r\n width: this.three.size.width,\r\n height: this.three.size.height,\r\n };\r\n const pass = new BokehPass(this.three.scene, this.three.camera, params);\r\n this.passes.push(pass);\r\n this.pass = pass;\r\n },\r\n};\r\n","import { Vector2 } from 'three';\r\nimport { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPass.js';\r\nimport EffectPass from './EffectPass.js';\r\n\r\nexport default {\r\n extends: EffectPass,\r\n props: {\r\n strength: {\r\n type: Number,\r\n default: 1.5,\r\n },\r\n radius: {\r\n type: Number,\r\n default: 0,\r\n },\r\n threshold: {\r\n type: Number,\r\n default: 0,\r\n },\r\n },\r\n // watch: {\r\n // strength() {\r\n // this.pass.strength = this.strength;\r\n // },\r\n // radius() {\r\n // this.pass.strength = this.radius;\r\n // },\r\n // threshold() {\r\n // this.pass.strength = this.threshold;\r\n // },\r\n // },\r\n mounted() {\r\n const size = new Vector2(this.three.size.width, this.three.size.height);\r\n const pass = new UnrealBloomPass(size, this.strength, this.radius, this.threshold);\r\n this.passes.push(pass);\r\n this.pass = pass;\r\n },\r\n};\r\n"],"names":["const","Plane","key","value","PerspectiveCamera","Scene","AmbientLight","PointLight","SpotLight","Mesh","InstancedMesh","this","EffectComposer","RenderPass","BokehPass","UnrealBloomPass"],"mappings":";;;;;;;;AAUA;AACA;AACA;AACe,SAAS,QAAQ,GAAG;AACnC;AACA,EAAEA,IAAM,IAAI,GAAG;AACf,IAAI,MAAM,EAAE,IAAI;AAChB,IAAI,SAAS,EAAE,IAAI;AACnB,IAAI,KAAK,EAAE,KAAK;AAChB,IAAI,UAAU,EAAE,KAAK;AACrB,IAAI,UAAU,EAAE,KAAK;AACrB,IAAI,aAAa,EAAE,KAAK;AACxB,IAAI,MAAM,EAAE,QAAQ;AACpB,IAAI,KAAK,EAAE,CAAC;AACZ,IAAI,MAAM,EAAE,CAAC;AACb,GAAG,CAAC;AACJ;AACA;AACA,EAAEA,IAAM,IAAI,GAAG;AACf,IAAI,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;AACvB,IAAI,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC;AACzB,IAAI,KAAK,EAAE,CAAC;AACZ,GAAG,CAAC;AACJ;AACA;AACA,EAAEA,IAAM,iBAAiB,GAAG,EAAE,CAAC;AAC/B,EAAEA,IAAM,mBAAmB,GAAG,EAAE,CAAC;AACjC,EAAEA,IAAM,oBAAoB,GAAG,EAAE,CAAC;AAClC;AACA;AACA,EAAEA,IAAM,KAAK,GAAG,IAAI,OAAO,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AG;AAClB,KAAK;AACL,IAAI,MAAM,EAAE;AACZ,MAAM,IAAI,EAAE,MAAM;AAClB,MAAM,OAAO,EAAE,CAAC;AAChB,KAAK;AACL,IAAI,SAAS,EAAE;AACf,MAAM,IAAI,EAAE,MAAM;AAClB,MAAM,OAAO,EAAE,CAAC;AAChB,KAAK;AACL,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE,yBAAO,GAAG;AACZ,IAAId,IAAM,IAAI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC5E,IAAIA,IAAM,IAAI,GAAG,IAAIe,iBAAe,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;AACvF,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3B,IAAI,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;AACrB,GAAG;AACH,CAAC;;;;"} \ No newline at end of file diff --git a/build/trois.module.min.js b/build/trois.module.min.js new file mode 100644 index 0000000..d60073f --- /dev/null +++ b/build/trois.module.min.js @@ -0,0 +1,2 @@ +import{h as e}from"vue";import{Vector2 as t,Vector3 as s,Plane as i,Raycaster as r,WebGLRenderer as n,PerspectiveCamera as o,Scene as a,Color as h,BoxBufferGeometry as u,SphereBufferGeometry as c,AmbientLight as d,PointLight as m,SpotLight as l,FrontSide as f,MeshBasicMaterial as p,MeshLambertMaterial as g,MeshPhongMaterial as w,MeshPhysicalMaterial as y,MeshStandardMaterial as b,Mesh as v,PlaneBufferGeometry as S,InstancedMesh as N}from"three";import{OrbitControls as z}from"three/examples/jsm/controls/OrbitControls.js";import{EffectComposer as j}from"three/examples/jsm/postprocessing/EffectComposer.js";import{RenderPass as x}from"three/examples/jsm/postprocessing/RenderPass.js";import{BokehPass as _}from"three/examples/jsm/postprocessing/BokehPass.js";import{UnrealBloomPass as C}from"three/examples/jsm/postprocessing/UnrealBloomPass.js";function M(){var e={canvas:null,antialias:!0,alpha:!1,orbit_ctrl:!1,mouse_move:!1,mouse_raycast:!1,resize:"window",width:0,height:0},o={width:0,height:0,wWidth:0,wHeight:0,ratio:0},a=[],h=[],u=[],c=new t,d=new s,m=new i(new s(0,0,1),0),l=new r,f={conf:e,renderer:null,camera:null,cameraCtrl:null,materials:{},scene:null,size:o,mouse:c,mouseV3:d,init:function(t){if(t)for(var[s,i]of Object.entries(t))e[s]=i;if(!f.scene)return void console.error("Missing Scene");if(!f.camera)return void console.error("Missing Camera");if(f.renderer=new n({canvas:e.canvas,antialias:e.antialias,alpha:e.alpha}),e.orbit_ctrl&&(f.orbitCtrl=new z(f.camera,f.renderer.domElement),e.orbit_ctrl instanceof Object))for(var[r,o]of Object.entries(e.orbit_ctrl))f.orbitCtrl[r]=o;e.width&&e.height?b(e.width,e.height):e.resize&&(y(),window.addEventListener("resize",y));e.mouse_move&&("body"===e.mouse_move?f.mouse_move_element=document.body:f.mouse_move_element=f.renderer.domElement,f.mouse_move_element.addEventListener("mousemove",p),f.mouse_move_element.addEventListener("mouseleave",g));return a.forEach((function(e){return e()})),!0},dispose:function(){window.removeEventListener("resize",y),f.mouse_move_element&&(f.mouse_move_element.removeEventListener("mousemove",p),f.mouse_move_element.removeEventListener("mouseleave",g))},render:function(){f.orbitCtrl&&f.orbitCtrl.update();u.forEach((function(e){return e()})),f.renderer.render(f.scene,f.camera)},renderC:function(){f.orbitCtrl&&f.orbitCtrl.update();u.forEach((function(e){return e()})),f.composer.render()},setSize:b,onAfterInit:function(e){a.push(e)},onAfterResize:function(e){h.push(e)},onBeforeRender:function(e){u.push(e)}};function p(e){c.x=e.clientX/o.width*2-1,c.y=-e.clientY/o.height*2+1,w()}function g(e){c.x=0,c.y=0,w()}function w(){e.mouse_raycast&&(f.camera.getWorldDirection(m.normal),m.normal.normalize(),l.setFromCamera(c,f.camera),l.ray.intersectPlane(m,d))}function y(){"window"===e.resize?b(window.innerWidth,window.innerHeight):b(e.resize.clientWidth,e.resize.clientHeight),h.forEach((function(e){return e()}))}function b(e,t){o.width=e,o.height=t,o.ratio=e/t,f.renderer.setSize(e,t,!1),f.camera.aspect=o.ratio,f.camera.updateProjectionMatrix(),f.composer&&f.composer.setSize(e,t);var s=function(){var e=f.camera.fov*Math.PI/180,t=2*Math.tan(e/2)*Math.abs(f.camera.position.z);return[t*f.camera.aspect,t]}();o.wWidth=s[0],o.wHeight=s[1]}return f}var B={props:{antialias:{type:Boolean,default:!0},alpha:{type:Boolean,default:!1},shadow:{type:Boolean,default:!1},orbitCtrl:{type:[Boolean,Object],default:!1},mouseMove:{type:[Boolean,String],default:!1},mouseRaycast:{type:Boolean,default:!1},resize:{type:[Boolean,String,Element],default:"window"},width:String,height:String},setup:function(e){return{three:M(),raf:!0}},provide:function(){return{three:this.three}},mounted:function(){var e={canvas:this.$refs.canvas,antialias:this.antialias,alpha:this.alpha,orbit_ctrl:this.orbitCtrl,mouse_move:this.mouseMove,mouse_raycast:this.mouseRaycast,resize:this.resize,width:this.width,height:this.height};this.three.init(e)&&(this.three.renderer.shadowMap.enabled=this.shadow,this.three.composer?this.animateC():this.animate())},beforeUnmount:function(){this.raf=!1,this.three.dispose()},methods:{onBeforeRender:function(e){this.three.onBeforeRender(e)},onAfterResize:function(e){this.three.onAfterResize(e)},animate:function(){this.raf&&requestAnimationFrame(this.animate),this.three.render()},animateC:function(){this.raf&&requestAnimationFrame(this.animateC),this.three.renderC()}},render:function(){return e("canvas",{ref:"canvas"},this.$slots.default())}};function E(e,t){if(t instanceof Object)for(var[s,i]of Object.entries(t))e[s]=i}function O(e,t,s){return e+(t-e)*(s=(s=s<0?0:s)>1?1:s)}function P(e,t,s){e.x=O(e.x,t.x,s),e.y=O(e.y,t.y,s),e.z=O(e.z,t.z,s)}var R={inject:["three"],props:{fov:{type:Number,default:50},position:Object},created:function(){var e=new o(this.fov);E(e.position,this.position),this.three.camera=e},render:function(){return[]}},L={inject:["three"],props:{id:String,background:[String,Number]},setup:function(e){var t=new a;return e.background&&(t.background=new h(e.background)),{scene:t}},provide:function(){return{scene:this.scene}},mounted:function(){this.three.scene||(this.three.scene=this.scene)},render:function(){return this.$slots.default?this.$slots.default():[]}},A={inject:["parent"],beforeMount:function(){this.parent||console.error("Missing parent Mesh")},unmounted:function(){this.parent.geometry.dispose()},render:function(){return[]}},$={extends:A,props:{size:{type:Number},width:{type:Number,default:1},height:{type:Number,default:1},depth:{type:Number,default:1}},mounted:function(){this.size?this.parent.geometry=new u(this.size,this.size,this.size):this.parent.geometry=new u(this.width,this.height,this.depth)}},k={extends:A,props:{radius:Number,widthSegments:{type:Number,default:12},heightSegments:{type:Number,default:12}},mounted:function(){this.parent.geometry=new c(this.radius,this.widthSegments,this.heightSegments)}},I={inject:["scene"],props:{color:{type:String,default:"#ffffff"},intensity:{type:Number,default:1},castShadow:{type:Boolean,default:!1},shadowMapSize:Object,position:Object},mounted:function(){E(this.light.position,this.position),this.light.shadow&&(this.light.castShadow=this.castShadow,E(this.light.shadow.mapSize,this.shadowMapSize)),this.scene.add(this.light),this.light.target&&this.scene.add(this.light.target)},render:function(){return[]}},W={extends:I,created:function(){this.light=new d(this.color,this.intensity)}},H={extends:I,props:{distance:{type:Number,default:0},decay:{type:Number,default:1}},created:function(){this.light=new m(this.color,this.intensity,this.distance,this.decay)}},F={extends:I,props:{distance:{type:Number,default:0},angle:{type:Number,default:Math.PI/3},penumbra:{type:Number,default:0},decay:{type:Number,default:1}},created:function(){this.light=new l(this.color,this.intensity,this.distance,this.angle,this.penumbra,this.decay)}},U={inject:["three"],props:{id:String,color:{type:[String,Number],default:"#ffffff"},depthTest:{type:Boolean,default:!0},depthWrite:{type:Boolean,default:!0},fog:{type:Boolean,default:!1},opacity:{type:Number,default:1},side:{type:Number,default:f},transparent:{type:Boolean,default:!1},vertexColors:{type:Boolean,default:!1}},mounted:function(){this.three.materials[this.id]=this.material},unmounted:function(){this.material.dispose()},methods:{propsValues:function(){var e={};for(var[t,s]of Object.entries(this.$props))"id"!==t&&(e[t]=s);return e}},render:function(){return[]}},V={extends:U,created:function(){this.material=new p({color:this.color})}},q={extends:U,created:function(){this.material=new g({color:this.color})}},D={extends:U,created:function(){this.material=new w({color:this.color})}},G={extends:U,created:function(){this.material=new y({color:this.color})}},T={extends:U,props:{emissive:{type:[Number,String],default:0},emissiveIntensity:{type:Number,default:1},metalness:{type:Number,default:0},roughness:{type:Number,default:1}},created:function(){this.material=new b(this.propsValues())}},X={inject:["three","scene"],props:{material:String,position:Object,rotation:Object,scale:Object,castShadow:{type:Boolean,default:!1},receiveShadow:{type:Boolean,default:!1}},mounted:function(){this.mesh=new v(this.geometry,this.three.materials[this.material]),E(this.mesh.position,this.position),E(this.mesh.rotation,this.rotation),E(this.mesh.scale,this.scale),this.mesh.castShadow=this.castShadow,this.mesh.receiveShadow=this.receiveShadow,this.scene.add(this.mesh)},unmounted:function(){this.geometry.dispose()},render:function(){return[]}},Y={extends:X,props:{size:{type:Number},width:{type:Number,default:1},height:{type:Number,default:1},depth:{type:Number,default:1}},created:function(){this.size?this.geometry=new u(this.size,this.size,this.size):this.geometry=new u(this.width,this.height,this.depth)}},J={extends:X,props:{width:{type:Number,default:1},height:{type:Number,default:1},widthSegments:{type:Number,default:1},heightSegments:{type:Number,default:1}},created:function(){this.geometry=new S(this.width,this.height,this.widthSegments,this.heightSegments)}},K={extends:X,props:{radius:Number,widthSegments:{type:Number,default:12},heightSegments:{type:Number,default:12}},created:function(){this.geometry=new c(this.radius,this.widthSegments,this.heightSegments)}},Q={inject:["three","scene"],props:{material:String,count:Number,position:Object,castShadow:{type:Boolean,default:!1},receiveShadow:{type:Boolean,default:!1}},setup:function(){return{conf:{}}},provide:function(){return{parent:this.conf}},beforeMount:function(){this.$slots.default||console.error("Missing Geometry")},mounted:function(){this.mesh=new N(this.conf.geometry,this.three.materials[this.material],this.count),E(this.mesh.position,this.position),this.mesh.castShadow=this.castShadow,this.mesh.receiveShadow=this.receiveShadow,this.scene.add(this.mesh)},render:function(){return this.$slots.default()}},Z={setup:function(){return{passes:[]}},inject:["three"],provide:function(){return{passes:this.passes}},mounted:function(){var e=this;this.three.onAfterInit((function(){e.composer=new j(e.three.renderer),e.passes.forEach((function(t){e.composer.addPass(t)})),e.three.composer=e.composer}))},render:function(){return this.$slots.default()}},ee={inject:["three","passes"],beforeMount:function(){this.passes||console.error("Missing parent EffectComposer")},render:function(){return[]}},te={extends:ee,mounted:function(){this.three.scene||console.error("Missing Scene"),this.three.camera||console.error("Missing Camera");var e=new x(this.three.scene,this.three.camera);this.passes.push(e),this.pass=e}},se={extends:ee,props:{focus:{type:Number,default:1},aperture:{type:Number,default:.025},maxblur:{type:Number,default:.01}},mounted:function(){this.three.scene||console.error("Missing Scene"),this.three.camera||console.error("Missing Camera");var e={focus:this.focus,aperture:this.aperture,maxblur:this.maxblur,width:this.three.size.width,height:this.three.size.height},t=new _(this.three.scene,this.three.camera,e);this.passes.push(t),this.pass=t}},ie={extends:ee,props:{strength:{type:Number,default:1.5},radius:{type:Number,default:0},threshold:{type:Number,default:0}},mounted:function(){var e=new t(this.three.size.width,this.three.size.height),s=new C(e,this.strength,this.radius,this.threshold);this.passes.push(s),this.pass=s}};export{W as AmbientLight,V as BasicMaterial,se as BokehPass,Y as Box,$ as BoxGeometry,R as Camera,Z as EffectComposer,Q as InstancedMesh,q as LambertMaterial,R as PerspectiveCamera,D as PhongMaterial,G as PhysicalMaterial,J as Plane,H as PointLight,te as RenderPass,B as Renderer,L as Scene,K as Sphere,k as SphereGeometry,F as SpotLight,T as StandardMaterial,ie as UnrealBloomPass,O as lerp,P as lerpv3,E as setFromProp}; +//# sourceMappingURL=trois.module.min.js.map diff --git a/build/trois.module.min.js.map b/build/trois.module.min.js.map new file mode 100644 index 0000000..642a895 --- /dev/null +++ b/build/trois.module.min.js.map @@ -0,0 +1 @@ +{"version":3,"file":"trois.module.min.js","sources":["../src/core/useThree.js","../src/core/Renderer.js","../src/tools.js","../src/core/PerspectiveCamera.js","../src/core/Scene.js","../src/geometries/Geometry.js","../src/geometries/BoxGeometry.js","../src/geometries/SphereGeometry.js","../src/lights/Light.js","../src/lights/AmbientLight.js","../src/lights/PointLight.js","../src/lights/SpotLight.js","../src/materials/Material.js","../src/materials/BasicMaterial.js","../src/materials/LambertMaterial.js","../src/materials/PhongMaterial.js","../src/materials/PhysicalMaterial.js","../src/materials/StandardMaterial.js","../src/meshes/Mesh.js","../src/meshes/Box.js","../src/meshes/Plane.js","../src/meshes/Sphere.js","../src/meshes/InstancedMesh.js","../src/effects/EffectComposer.js","../src/effects/EffectPass.js","../src/effects/RenderPass.js","../src/effects/BokehPass.js","../src/effects/UnrealBloomPass.js"],"sourcesContent":["import {\r\n Plane,\r\n Raycaster,\r\n Vector2,\r\n Vector3,\r\n WebGLRenderer,\r\n} from 'three';\r\n\r\nimport { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';\r\n\r\n/**\r\n * Three.js helper\r\n */\r\nexport default function useThree() {\r\n // default conf\r\n const conf = {\r\n canvas: null,\r\n antialias: true,\r\n alpha: false,\r\n orbit_ctrl: false,\r\n mouse_move: false,\r\n mouse_raycast: false,\r\n resize: 'window',\r\n width: 0,\r\n height: 0,\r\n };\r\n\r\n // size\r\n const size = {\r\n width: 0, height: 0,\r\n wWidth: 0, wHeight: 0,\r\n ratio: 0,\r\n };\r\n\r\n // handlers\r\n const afterInitHandlers = [];\r\n const afterResizeHandlers = [];\r\n const beforeRenderHandlers = [];\r\n\r\n // mouse tracking\r\n const mouse = new Vector2();\r\n const mouseV3 = new Vector3();\r\n const mousePlane = new Plane(new Vector3(0, 0, 1), 0);\r\n const raycaster = new Raycaster();\r\n\r\n // returned object\r\n const obj = {\r\n conf,\r\n renderer: null,\r\n camera: null,\r\n cameraCtrl: null,\r\n materials: {},\r\n scene: null,\r\n size,\r\n mouse, mouseV3,\r\n init,\r\n dispose,\r\n render,\r\n renderC,\r\n setSize,\r\n onAfterInit,\r\n onAfterResize,\r\n onBeforeRender,\r\n };\r\n\r\n /**\r\n * init three\r\n */\r\n function init(params) {\r\n if (params) {\r\n for (const [key, value] of Object.entries(params)) {\r\n conf[key] = value;\r\n }\r\n }\r\n\r\n if (!obj.scene) {\r\n console.error('Missing Scene');\r\n return;\r\n }\r\n\r\n if (!obj.camera) {\r\n console.error('Missing Camera');\r\n return;\r\n }\r\n\r\n obj.renderer = new WebGLRenderer({ canvas: conf.canvas, antialias: conf.antialias, alpha: conf.alpha });\r\n\r\n if (conf.orbit_ctrl) {\r\n obj.orbitCtrl = new OrbitControls(obj.camera, obj.renderer.domElement);\r\n if (conf.orbit_ctrl instanceof Object) {\r\n for (const [key, value] of Object.entries(conf.orbit_ctrl)) {\r\n obj.orbitCtrl[key] = value;\r\n }\r\n }\r\n }\r\n\r\n if (conf.width && conf.height) {\r\n setSize(conf.width, conf.height);\r\n } else if (conf.resize) {\r\n onResize();\r\n window.addEventListener('resize', onResize);\r\n }\r\n\r\n if (conf.mouse_move) {\r\n if (conf.mouse_move === 'body') {\r\n obj.mouse_move_element = document.body;\r\n } else {\r\n obj.mouse_move_element = obj.renderer.domElement;\r\n }\r\n obj.mouse_move_element.addEventListener('mousemove', onMousemove);\r\n obj.mouse_move_element.addEventListener('mouseleave', onMouseleave);\r\n }\r\n\r\n afterInitHandlers.forEach(c => c());\r\n\r\n return true;\r\n };\r\n\r\n /**\r\n * add after init handler\r\n */\r\n function onAfterInit(callback) {\r\n afterInitHandlers.push(callback);\r\n }\r\n\r\n /**\r\n * add after resize handler\r\n */\r\n function onAfterResize(callback) {\r\n afterResizeHandlers.push(callback);\r\n }\r\n\r\n /**\r\n * add before render handler\r\n */\r\n function onBeforeRender(callback) {\r\n beforeRenderHandlers.push(callback);\r\n }\r\n\r\n /**\r\n * default render\r\n */\r\n function render() {\r\n if (obj.orbitCtrl) obj.orbitCtrl.update();\r\n beforeRenderHandlers.forEach(c => c());\r\n obj.renderer.render(obj.scene, obj.camera);\r\n }\r\n\r\n /**\r\n * composer render\r\n */\r\n function renderC() {\r\n if (obj.orbitCtrl) obj.orbitCtrl.update();\r\n beforeRenderHandlers.forEach(c => c());\r\n obj.composer.render();\r\n }\r\n\r\n /**\r\n * remove listeners\r\n */\r\n function dispose() {\r\n window.removeEventListener('resize', onResize);\r\n if (obj.mouse_move_element) {\r\n obj.mouse_move_element.removeEventListener('mousemove', onMousemove);\r\n obj.mouse_move_element.removeEventListener('mouseleave', onMouseleave); \r\n }\r\n }\r\n\r\n /**\r\n * mousemove listener\r\n */\r\n function onMousemove(e) {\r\n mouse.x = (e.clientX / size.width) * 2 - 1;\r\n mouse.y = -(e.clientY / size.height) * 2 + 1;\r\n updateMouseV3();\r\n }\r\n\r\n /**\r\n * mouseleave listener\r\n */\r\n function onMouseleave(e) {\r\n mouse.x = 0;\r\n mouse.y = 0;\r\n updateMouseV3();\r\n }\r\n\r\n /**\r\n * get 3d mouse position\r\n */\r\n function updateMouseV3() {\r\n if (conf.mouse_raycast) {\r\n obj.camera.getWorldDirection(mousePlane.normal);\r\n mousePlane.normal.normalize();\r\n raycaster.setFromCamera(mouse, obj.camera);\r\n raycaster.ray.intersectPlane(mousePlane, mouseV3);\r\n }\r\n }\r\n\r\n /**\r\n * resize listener\r\n */\r\n function onResize() {\r\n if (conf.resize === 'window') {\r\n setSize(window.innerWidth, window.innerHeight);\r\n } else {\r\n setSize(conf.resize.clientWidth, conf.resize.clientHeight);\r\n }\r\n afterResizeHandlers.forEach(c => c());\r\n }\r\n\r\n /**\r\n * update renderer size and camera\r\n */\r\n function setSize(width, height) {\r\n size.width = width;\r\n size.height = height;\r\n size.ratio = width / height;\r\n\r\n obj.renderer.setSize(width, height, false);\r\n obj.camera.aspect = size.ratio;\r\n obj.camera.updateProjectionMatrix();\r\n\r\n if (obj.composer) {\r\n obj.composer.setSize(width, height);\r\n }\r\n\r\n const wsize = getCameraSize();\r\n size.wWidth = wsize[0]; size.wHeight = wsize[1];\r\n }\r\n\r\n /**\r\n * calculate camera visible area size\r\n */\r\n function getCameraSize() {\r\n const vFOV = (obj.camera.fov * Math.PI) / 180;\r\n const h = 2 * Math.tan(vFOV / 2) * Math.abs(obj.camera.position.z);\r\n const w = h * obj.camera.aspect;\r\n return [w, h];\r\n }\r\n\r\n return obj;\r\n}\r\n","import { h } from 'vue';\r\nimport useThree from './useThree';\r\n\r\nexport default {\r\n props: {\r\n antialias: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n alpha: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n shadow: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n orbitCtrl: {\r\n type: [Boolean, Object],\r\n default: false,\r\n },\r\n mouseMove: {\r\n type: [Boolean, String],\r\n default: false,\r\n },\r\n mouseRaycast: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n resize: {\r\n type: [Boolean, String, Element],\r\n default: 'window',\r\n },\r\n width: String,\r\n height: String,\r\n },\r\n setup(props) {\r\n return {\r\n three: useThree(),\r\n raf: true,\r\n };\r\n },\r\n provide() {\r\n return {\r\n three: this.three,\r\n };\r\n },\r\n mounted() {\r\n const params = {\r\n canvas: this.$refs.canvas,\r\n antialias: this.antialias,\r\n alpha: this.alpha,\r\n orbit_ctrl: this.orbitCtrl,\r\n mouse_move: this.mouseMove,\r\n mouse_raycast: this.mouseRaycast,\r\n resize: this.resize,\r\n width: this.width,\r\n height: this.height,\r\n };\r\n\r\n if (this.three.init(params)) {\r\n this.three.renderer.shadowMap.enabled = this.shadow;\r\n if (this.three.composer) this.animateC();\r\n else this.animate();\r\n };\r\n },\r\n beforeUnmount() {\r\n this.raf = false;\r\n this.three.dispose();\r\n },\r\n methods: {\r\n onBeforeRender(callback) {\r\n this.three.onBeforeRender(callback);\r\n },\r\n onAfterResize(callback) {\r\n this.three.onAfterResize(callback);\r\n },\r\n animate() {\r\n if (this.raf) requestAnimationFrame(this.animate);\r\n this.three.render();\r\n },\r\n animateC() {\r\n if (this.raf) requestAnimationFrame(this.animateC);\r\n this.three.renderC();\r\n },\r\n },\r\n render() {\r\n return h(\r\n 'canvas',\r\n { ref: 'canvas' },\r\n this.$slots.default()\r\n );\r\n },\r\n};\r\n","export function setFromProp(o, prop) {\r\n if (prop instanceof Object) {\r\n for (const [key, value] of Object.entries(prop)) {\r\n o[key] = value;\r\n }\r\n }\r\n};\r\n\r\nexport function lerp(value1, value2, amount) {\r\n amount = amount < 0 ? 0 : amount;\r\n amount = amount > 1 ? 1 : amount;\r\n return value1 + (value2 - value1) * amount;\r\n};\r\n\r\nexport function lerpv3(v1, v2, amount) {\r\n v1.x = lerp(v1.x, v2.x, amount);\r\n v1.y = lerp(v1.y, v2.y, amount);\r\n v1.z = lerp(v1.z, v2.z, amount);\r\n};\r\n","import { PerspectiveCamera } from 'three';\r\nimport { setFromProp } from '../tools.js';\r\n\r\nexport default {\r\n inject: ['three'],\r\n props: {\r\n fov: {\r\n type: Number,\r\n default: 50,\r\n },\r\n position: Object,\r\n },\r\n created() {\r\n const camera = new PerspectiveCamera(this.fov);\r\n setFromProp(camera.position, this.position);\r\n this.three.camera = camera;\r\n },\r\n render() {\r\n return [];\r\n },\r\n};\r\n","import { Scene, Color } from 'three';\r\n\r\nexport default {\r\n inject: ['three'],\r\n props: {\r\n id: String,\r\n background: [String, Number],\r\n },\r\n setup (props) {\r\n const scene = new Scene();\r\n if (props.background) scene.background = new Color(props.background);\r\n return { scene };\r\n },\r\n provide() {\r\n return {\r\n scene: this.scene,\r\n };\r\n },\r\n mounted() {\r\n if (!this.three.scene) {\r\n this.three.scene = this.scene;\r\n }\r\n },\r\n render() {\r\n if (this.$slots.default) {\r\n return this.$slots.default();\r\n }\r\n return [];\r\n },\r\n};\r\n","export default {\r\n inject: ['parent'],\r\n beforeMount() {\r\n if (!this.parent) {\r\n console.error('Missing parent Mesh');\r\n }\r\n },\r\n unmounted() {\r\n this.parent.geometry.dispose();\r\n },\r\n render() {\r\n return [];\r\n },\r\n};\r\n","import { BoxBufferGeometry } from 'three';\r\nimport Geometry from './Geometry.js';\r\n\r\nexport default {\r\n extends: Geometry,\r\n props: {\r\n size: {\r\n type: Number,\r\n },\r\n width: {\r\n type: Number,\r\n default: 1,\r\n },\r\n height: {\r\n type: Number,\r\n default: 1,\r\n },\r\n depth: {\r\n type: Number,\r\n default: 1,\r\n },\r\n },\r\n mounted() {\r\n if (this.size) {\r\n this.parent.geometry = new BoxBufferGeometry(this.size, this.size, this.size);\r\n } else {\r\n this.parent.geometry = new BoxBufferGeometry(this.width, this.height, this.depth);\r\n }\r\n },\r\n};\r\n","import { SphereBufferGeometry } from 'three';\r\nimport Geometry from './Geometry.js';\r\n\r\nexport default {\r\n extends: Geometry,\r\n props: {\r\n radius: Number,\r\n widthSegments: {\r\n type: Number,\r\n default: 12,\r\n },\r\n heightSegments: {\r\n type: Number,\r\n default: 12,\r\n },\r\n },\r\n mounted() {\r\n this.parent.geometry = new SphereBufferGeometry(this.radius, this.widthSegments, this.heightSegments);\r\n },\r\n};\r\n","import { setFromProp } from '../tools.js';\r\n\r\nexport default {\r\n inject: ['scene'],\r\n props: {\r\n color: {\r\n type: String,\r\n default: '#ffffff',\r\n },\r\n intensity: {\r\n type: Number,\r\n default: 1,\r\n },\r\n castShadow: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n shadowMapSize: Object,\r\n position: Object,\r\n },\r\n mounted() {\r\n setFromProp(this.light.position, this.position);\r\n\r\n if (this.light.shadow) {\r\n this.light.castShadow = this.castShadow;\r\n setFromProp(this.light.shadow.mapSize, this.shadowMapSize);\r\n }\r\n\r\n this.scene.add(this.light);\r\n if (this.light.target) this.scene.add(this.light.target);\r\n },\r\n render() {\r\n return [];\r\n },\r\n};\r\n","import { AmbientLight } from 'three';\r\nimport Light from './Light.js';\r\n\r\nexport default {\r\n extends: Light,\r\n created() {\r\n this.light = new AmbientLight(this.color, this.intensity);\r\n },\r\n};\r\n","import { PointLight } from 'three';\r\nimport Light from './Light.js';\r\n\r\nexport default {\r\n extends: Light,\r\n props: {\r\n distance: {\r\n type: Number,\r\n default: 0,\r\n },\r\n decay: {\r\n type: Number,\r\n default: 1,\r\n },\r\n },\r\n created() {\r\n this.light = new PointLight(this.color, this.intensity, this.distance, this.decay);\r\n },\r\n};\r\n","import { SpotLight } from 'three';\r\nimport Light from './Light.js';\r\n\r\nexport default {\r\n extends: Light,\r\n props: {\r\n distance: {\r\n type: Number,\r\n default: 0,\r\n },\r\n angle: {\r\n type: Number,\r\n default: Math.PI / 3,\r\n },\r\n penumbra: {\r\n type: Number,\r\n default: 0,\r\n },\r\n decay: {\r\n type: Number,\r\n default: 1,\r\n },\r\n },\r\n created() {\r\n this.light = new SpotLight(this.color, this.intensity, this.distance, this.angle, this.penumbra, this.decay);\r\n },\r\n};\r\n","import { FrontSide } from 'three';\r\n\r\nexport default {\r\n inject: ['three'],\r\n props: {\r\n id: String,\r\n color: {\r\n type: [String, Number],\r\n default: '#ffffff',\r\n },\r\n depthTest: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n depthWrite: {\r\n type: Boolean,\r\n default: true,\r\n },\r\n fog: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n opacity: {\r\n type: Number,\r\n default: 1,\r\n },\r\n side: {\r\n type: Number,\r\n default: FrontSide,\r\n },\r\n transparent: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n vertexColors: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n mounted() {\r\n this.three.materials[this.id] = this.material;\r\n },\r\n unmounted() {\r\n this.material.dispose();\r\n },\r\n methods: {\r\n propsValues() {\r\n const props = {};\r\n for (const [key, value] of Object.entries(this.$props)) {\r\n if (key !== 'id') props[key] = value;\r\n }\r\n return props;\r\n },\r\n },\r\n render() {\r\n return [];\r\n },\r\n};\r\n","import { MeshBasicMaterial } from 'three';\r\nimport Material from './Material';\r\n\r\nexport default {\r\n extends: Material,\r\n created() {\r\n this.material = new MeshBasicMaterial({\r\n color: this.color,\r\n });\r\n },\r\n};\r\n","import { MeshLambertMaterial } from 'three';\r\nimport Material from './Material';\r\n\r\nexport default {\r\n extends: Material,\r\n created() {\r\n this.material = new MeshLambertMaterial({\r\n color: this.color,\r\n });\r\n },\r\n};\r\n","import { MeshPhongMaterial } from 'three';\r\nimport Material from './Material';\r\n\r\nexport default {\r\n extends: Material,\r\n created() {\r\n this.material = new MeshPhongMaterial({\r\n color: this.color,\r\n });\r\n },\r\n};\r\n","import { MeshPhysicalMaterial } from 'three';\r\nimport Material from './Material';\r\n\r\nexport default {\r\n extends: Material,\r\n created() {\r\n this.material = new MeshPhysicalMaterial({\r\n color: this.color,\r\n });\r\n },\r\n};\r\n","import { MeshStandardMaterial } from 'three';\r\nimport Material from './Material';\r\n\r\nexport default {\r\n extends: Material,\r\n props: {\r\n emissive: {\r\n type: [Number, String],\r\n default: 0,\r\n },\r\n emissiveIntensity: {\r\n type: Number,\r\n default: 1,\r\n },\r\n metalness: {\r\n type: Number,\r\n default: 0,\r\n },\r\n roughness: {\r\n type: Number,\r\n default: 1,\r\n },\r\n },\r\n created() {\r\n this.material = new MeshStandardMaterial(this.propsValues());\r\n },\r\n};\r\n","import { Mesh } from 'three';\r\nimport { setFromProp } from '../tools.js';\r\n\r\nexport default {\r\n inject: ['three', 'scene'],\r\n props: {\r\n material: String,\r\n position: Object,\r\n rotation: Object,\r\n scale: Object,\r\n castShadow: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n receiveShadow: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n mounted() {\r\n this.mesh = new Mesh(this.geometry, this.three.materials[this.material]);\r\n setFromProp(this.mesh.position, this.position);\r\n setFromProp(this.mesh.rotation, this.rotation);\r\n setFromProp(this.mesh.scale, this.scale);\r\n this.mesh.castShadow = this.castShadow;\r\n this.mesh.receiveShadow = this.receiveShadow;\r\n this.scene.add(this.mesh);\r\n },\r\n unmounted() {\r\n this.geometry.dispose();\r\n },\r\n render() {\r\n return [];\r\n },\r\n};\r\n","import { BoxBufferGeometry } from 'three';\r\nimport Mesh from './Mesh.js';\r\n\r\nexport default {\r\n extends: Mesh,\r\n props: {\r\n size: {\r\n type: Number,\r\n },\r\n width: {\r\n type: Number,\r\n default: 1,\r\n },\r\n height: {\r\n type: Number,\r\n default: 1,\r\n },\r\n depth: {\r\n type: Number,\r\n default: 1,\r\n },\r\n },\r\n created() {\r\n if (this.size) {\r\n this.geometry = new BoxBufferGeometry(this.size, this.size, this.size);\r\n } else {\r\n this.geometry = new BoxBufferGeometry(this.width, this.height, this.depth);\r\n }\r\n },\r\n};\r\n","import { PlaneBufferGeometry } from 'three';\r\nimport Mesh from './Mesh.js';\r\n\r\nexport default {\r\n extends: Mesh,\r\n props: {\r\n width: {\r\n type: Number,\r\n default: 1,\r\n },\r\n height: {\r\n type: Number,\r\n default: 1,\r\n },\r\n widthSegments: {\r\n type: Number,\r\n default: 1,\r\n },\r\n heightSegments: {\r\n type: Number,\r\n default: 1,\r\n },\r\n },\r\n created() {\r\n this.geometry = new PlaneBufferGeometry(this.width, this.height, this.widthSegments, this.heightSegments);\r\n },\r\n};\r\n","import { SphereBufferGeometry } from 'three';\r\nimport Mesh from './Mesh.js';\r\n\r\nexport default {\r\n extends: Mesh,\r\n props: {\r\n radius: Number,\r\n widthSegments: {\r\n type: Number,\r\n default: 12,\r\n },\r\n heightSegments: {\r\n type: Number,\r\n default: 12,\r\n },\r\n },\r\n created() {\r\n this.geometry = new SphereBufferGeometry(this.radius, this.widthSegments, this.heightSegments);\r\n },\r\n};\r\n","import { InstancedMesh } from 'three';\r\nimport { setFromProp } from '../tools.js';\r\n\r\nexport default {\r\n inject: ['three', 'scene'],\r\n props: {\r\n material: String,\r\n count: Number,\r\n position: Object,\r\n castShadow: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n receiveShadow: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n },\r\n setup() {\r\n return {\r\n conf: {},\r\n };\r\n },\r\n provide() {\r\n return {\r\n parent: this.conf,\r\n };\r\n },\r\n beforeMount() {\r\n if (!this.$slots.default) {\r\n console.error('Missing Geometry');\r\n }\r\n },\r\n mounted() {\r\n this.mesh = new InstancedMesh(this.conf.geometry, this.three.materials[this.material], this.count);\r\n setFromProp(this.mesh.position, this.position);\r\n this.mesh.castShadow = this.castShadow;\r\n this.mesh.receiveShadow = this.receiveShadow;\r\n this.scene.add(this.mesh);\r\n },\r\n render() {\r\n return this.$slots.default();\r\n },\r\n};\r\n","import { EffectComposer } from 'three/examples/jsm/postprocessing/EffectComposer.js';\r\n\r\nexport default {\r\n setup() {\r\n return {\r\n passes: [],\r\n };\r\n },\r\n inject: ['three'],\r\n provide() {\r\n return {\r\n passes: this.passes,\r\n };\r\n },\r\n mounted() {\r\n this.three.onAfterInit(() => {\r\n this.composer = new EffectComposer(this.three.renderer);\r\n this.passes.forEach(pass => {\r\n this.composer.addPass(pass);\r\n });\r\n this.three.composer = this.composer;\r\n });\r\n },\r\n render() {\r\n return this.$slots.default();\r\n },\r\n};\r\n","export default {\r\n inject: ['three', 'passes'],\r\n beforeMount() {\r\n if (!this.passes) {\r\n console.error('Missing parent EffectComposer');\r\n }\r\n },\r\n render() {\r\n return [];\r\n },\r\n};\r\n","import { RenderPass } from 'three/examples/jsm/postprocessing/RenderPass.js';\r\nimport EffectPass from './EffectPass.js';\r\n\r\nexport default {\r\n extends: EffectPass,\r\n mounted() {\r\n if (!this.three.scene) {\r\n console.error('Missing Scene');\r\n }\r\n if (!this.three.camera) {\r\n console.error('Missing Camera');\r\n }\r\n const pass = new RenderPass(this.three.scene, this.three.camera);\r\n this.passes.push(pass);\r\n this.pass = pass;\r\n },\r\n};\r\n","import { BokehPass } from 'three/examples/jsm/postprocessing/BokehPass.js';\r\nimport EffectPass from './EffectPass.js';\r\n\r\nexport default {\r\n extends: EffectPass,\r\n props: {\r\n focus: {\r\n type: Number,\r\n default: 1,\r\n },\r\n aperture: {\r\n type: Number,\r\n default: 0.025,\r\n },\r\n maxblur: {\r\n type: Number,\r\n default: 0.01,\r\n },\r\n },\r\n // watch: {\r\n // focus() {\r\n // this.pass.focus = this.focus;\r\n // },\r\n // aperture() {\r\n // this.pass.aperture = this.aperture;\r\n // },\r\n // maxblur() {\r\n // this.pass.maxblur = this.maxblur;\r\n // },\r\n // },\r\n mounted() {\r\n if (!this.three.scene) {\r\n console.error('Missing Scene');\r\n }\r\n if (!this.three.camera) {\r\n console.error('Missing Camera');\r\n }\r\n const params = {\r\n focus: this.focus,\r\n aperture: this.aperture,\r\n maxblur: this.maxblur,\r\n width: this.three.size.width,\r\n height: this.three.size.height,\r\n };\r\n const pass = new BokehPass(this.three.scene, this.three.camera, params);\r\n this.passes.push(pass);\r\n this.pass = pass;\r\n },\r\n};\r\n","import { Vector2 } from 'three';\r\nimport { UnrealBloomPass } from 'three/examples/jsm/postprocessing/UnrealBloomPass.js';\r\nimport EffectPass from './EffectPass.js';\r\n\r\nexport default {\r\n extends: EffectPass,\r\n props: {\r\n strength: {\r\n type: Number,\r\n default: 1.5,\r\n },\r\n radius: {\r\n type: Number,\r\n default: 0,\r\n },\r\n threshold: {\r\n type: Number,\r\n default: 0,\r\n },\r\n },\r\n // watch: {\r\n // strength() {\r\n // this.pass.strength = this.strength;\r\n // },\r\n // radius() {\r\n // this.pass.strength = this.radius;\r\n // },\r\n // threshold() {\r\n // this.pass.strength = this.threshold;\r\n // },\r\n // },\r\n mounted() {\r\n const size = new Vector2(this.three.size.width, this.three.size.height);\r\n const pass = new UnrealBloomPass(size, this.strength, this.radius, this.threshold);\r\n this.passes.push(pass);\r\n this.pass = pass;\r\n },\r\n};\r\n"],"names":["useThree","const","conf","canvas","antialias","alpha","orbit_ctrl","mouse_move","mouse_raycast","resize","width","height","size","wWidth","wHeight","ratio","afterInitHandlers","afterResizeHandlers","beforeRenderHandlers","mouse","Vector2","mouseV3","Vector3","mousePlane","Plane","raycaster","Raycaster","obj","renderer","camera","cameraCtrl","materials","scene","params","key","value","Object","entries","console","error","WebGLRenderer","orbitCtrl","OrbitControls","domElement","setSize","onResize","window","addEventListener","mouse_move_element","document","body","onMousemove","onMouseleave","forEach","c","removeEventListener","update","render","composer","callback","push","e","x","clientX","y","clientY","updateMouseV3","getWorldDirection","normal","normalize","setFromCamera","ray","intersectPlane","innerWidth","innerHeight","clientWidth","clientHeight","aspect","updateProjectionMatrix","wsize","vFOV","fov","Math","PI","h","tan","abs","position","z","getCameraSize","props","type","Boolean","default","shadow","mouseMove","String","mouseRaycast","Element","setup","three","raf","provide","this","mounted","$refs","init","shadowMap","enabled","animateC","animate","beforeUnmount","dispose","methods","onBeforeRender","onAfterResize","requestAnimationFrame","renderC","ref","$slots","setFromProp","o","prop","lerp","value1","value2","amount","lerpv3","v1","v2","inject","Number","created","PerspectiveCamera","id","background","Scene","Color","beforeMount","parent","unmounted","geometry","extends","Geometry","depth","BoxBufferGeometry","radius","widthSegments","heightSegments","SphereBufferGeometry","color","intensity","castShadow","shadowMapSize","light","mapSize","add","target","Light","AmbientLight","distance","decay","PointLight","angle","penumbra","SpotLight","depthTest","depthWrite","fog","opacity","side","FrontSide","transparent","vertexColors","material","propsValues","$props","Material","MeshBasicMaterial","MeshLambertMaterial","MeshPhongMaterial","MeshPhysicalMaterial","emissive","emissiveIntensity","metalness","roughness","MeshStandardMaterial","rotation","scale","receiveShadow","mesh","Mesh","PlaneBufferGeometry","count","InstancedMesh","passes","onAfterInit","EffectComposer","pass","addPass","EffectPass","RenderPass","focus","aperture","maxblur","BokehPass","strength","threshold","UnrealBloomPass"],"mappings":"k1BAae,SAASA,IAEtBC,IAAMC,EAAO,CACXC,OAAQ,KACRC,WAAW,EACXC,OAAO,EACPC,YAAY,EACZC,YAAY,EACZC,eAAe,EACfC,OAAQ,SACRC,MAAO,EACPC,OAAQ,GAIJC,EAAO,CACXF,MAAO,EAAGC,OAAQ,EAClBE,OAAQ,EAAGC,QAAS,EACpBC,MAAO,GAIHC,EAAoB,GACpBC,EAAsB,GACtBC,EAAuB,GAGvBC,E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QC,MAAM,kBAEhBtC,IAAMqM,EAAO,IAAIG,EAAWlG,KAAKH,MAAMpE,MAAOuE,KAAKH,MAAMvE,QACzD0E,KAAK4F,OAAOvI,KAAK0I,GACjB/F,KAAK+F,KAAOA,OCXD,CACbxD,QAAS0D,GACT9G,MAAO,CACLgH,MAAO,CACL/G,KAAMwC,OACNtC,QAAS,GAEX8G,SAAU,CACRhH,KAAMwC,OACNtC,QAAS,MAEX+G,QAAS,CACPjH,KAAMwC,OACNtC,QAAS,MAcbW,mBACOD,KAAKH,MAAMpE,OACdM,QAAQC,MAAM,iBAEXgE,KAAKH,MAAMvE,QACdS,QAAQC,MAAM,kBAEhBtC,IAAMgC,EAAS,CACbyK,MAAOnG,KAAKmG,MACZC,SAAUpG,KAAKoG,SACfC,QAASrG,KAAKqG,QACdlM,MAAO6F,KAAKH,MAAMxF,KAAKF,MACvBC,OAAQ4F,KAAKH,MAAMxF,KAAKD,QAEpB2L,EAAO,IAAIO,EAAUtG,KAAKH,MAAMpE,MAAOuE,KAAKH,MAAMvE,OAAQI,GAChEsE,KAAK4F,OAAOvI,KAAK0I,GACjB/F,KAAK+F,KAAOA,OC1CD,CACbxD,QAAS0D,GACT9G,MAAO,CACLoH,SAAU,CACRnH,KAAMwC,OACNtC,QAAS,KAEXqD,OAAQ,CACNvD,KAAMwC,OACNtC,QAAS,GAEXkH,UAAW,CACTpH,KAAMwC,OACNtC,QAAS,IAcbW,mBACEvG,IAAMW,EAAO,IAAIQ,EAAQmF,KAAKH,MAAMxF,KAAKF,MAAO6F,KAAKH,MAAMxF,KAAKD,QAC1D2L,EAAO,IAAIU,EAAgBpM,EAAM2F,KAAKuG,SAAUvG,KAAK2C,OAAQ3C,KAAKwG,WACxExG,KAAK4F,OAAOvI,KAAK0I,GACjB/F,KAAK+F,KAAOA"} \ No newline at end of file diff --git a/package.json b/package.json index e0584a3..74a6950 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "troisjs", - "version": "0.0.5", + "version": "0.0.6", "scripts": { "dev": "vite", "build": "vite build", diff --git a/rollup.config.js b/rollup.config.js index e6edb5a..4de726a 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -4,7 +4,15 @@ import buble from '@rollup/plugin-buble'; import { terser } from "rollup-plugin-terser"; const input = 'src/index.js'; -const external = ['three', 'three/examples/jsm/controls/OrbitControls.js', 'vue']; +const external = [ + 'three', + 'three/examples/jsm/controls/OrbitControls.js', + 'three/examples/jsm/postprocessing/EffectComposer.js', + 'three/examples/jsm/postprocessing/BokehPass.js', + 'three/examples/jsm/postprocessing/RenderPass.js', + 'three/examples/jsm/postprocessing/UnrealBloomPass.js', + 'vue', +]; const plugins = [ commonjs(), vue(), diff --git a/src/effects/BokehPass.js b/src/effects/BokehPass.js index 1b086a3..2b6abd4 100644 --- a/src/effects/BokehPass.js +++ b/src/effects/BokehPass.js @@ -35,7 +35,13 @@ export default { if (!this.three.camera) { console.error('Missing Camera'); } - const params = { ...this.$props, width: this.three.size.width, height: this.three.size.height }; + const params = { + focus: this.focus, + aperture: this.aperture, + maxblur: this.maxblur, + width: this.three.size.width, + height: this.three.size.height, + }; const pass = new BokehPass(this.three.scene, this.three.camera, params); this.passes.push(pass); this.pass = pass;