From cb25dca34c42cac5afbdada60be6f046d33d978f Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sun, 14 Aug 2022 22:03:46 +0300 Subject: [PATCH] Refactor three package. Add MeshLine --- CHANGELOG.md | 9 +++- .../visionforge/solid/demo/VariableBox.kt | 6 +-- .../visionforge/react/valueChooser.kt | 2 +- .../kscience/visionforge/solid/PolyLine.kt | 6 ++- visionforge-threejs/build.gradle.kts | 1 + .../info/laht/threekt/extras/core/Shape.kt | 8 ---- .../laht/threekt/extras/core/ShapePath.kt | 6 --- .../laht/threekt/geometries/EdgesGeometry.kt | 8 ---- .../main/kotlin/info/laht/threekt/ktutils.kt | 9 ---- .../solid/three/ThreeAmbientLightFactory.kt | 4 +- .../solid/three/ThreeBoxFactory.kt | 2 +- .../visionforge/solid/three/ThreeCanvas.kt | 47 ++++++++++++------- .../solid/three/ThreeCanvasLabelFactory.kt | 12 ++--- .../solid/three/ThreeCompositeFactory.kt | 2 +- .../solid/three/ThreeConeFactory.kt | 4 +- .../solid/three/ThreeConvexFactory.kt | 2 +- .../visionforge/solid/three/ThreeFactory.kt | 6 +-- .../solid/three/ThreeGeometryBuilder.kt | 6 +-- .../visionforge/solid/three/ThreeJsVision.kt | 2 +- .../solid/three/ThreeLabelFactory.kt | 6 +-- .../solid/three/ThreeLineFactory.kt | 8 ++-- .../visionforge/solid/three/ThreeMaterials.kt | 26 +++------- .../solid/three/ThreeMeshFactory.kt | 8 ++-- .../solid/three/ThreeMeshLineFactory.kt | 41 ++++++++++++++++ .../visionforge/solid/three/ThreePlugin.kt | 8 ++-- .../solid/three/ThreePointLightFactory.kt | 4 +- .../solid/three/ThreeReferenceFactory.kt | 4 +- .../solid/three/ThreeSmartLineFactory.kt | 17 +++++++ .../solid/three/ThreeSphereFactory.kt | 4 +- .../kscience/visionforge/solid/three/csg.kt | 8 ++-- .../kscience/visionforge/solid/three/three.kt | 16 +++---- .../{info/laht/threekt => three}/THREE.kt | 2 +- .../animation/AnimationAction.kt | 4 +- .../animation/AnimationClip.kt | 2 +- .../animation/AnimationMixer.kt | 4 +- .../animation/AnimationUtils.kt | 2 +- .../animation/KeyFrameTrack.kt | 2 +- .../laht/threekt => three}/audio/Audio.kt | 2 +- .../threekt => three}/audio/AudioContext.kt | 2 +- .../threekt => three}/audio/AudioListener.kt | 4 +- .../audio/PositionalAudio.kt | 2 +- .../laht/threekt => three}/cameras/Camera.kt | 8 ++-- .../cameras/OrthographicCamera.kt | 2 +- .../cameras/PerspectiveCamera.kt | 2 +- .../threekt => three}/core/BufferAttribute.kt | 10 ++-- .../threekt => three}/core/BufferGeometry.kt | 10 ++-- .../laht/threekt => three}/core/Clock.kt | 2 +- .../threekt => three}/core/EventDispatcher.kt | 2 +- .../laht/threekt => three}/core/Face3.kt | 6 +-- .../core/InstancedBufferGeometry.kt | 2 +- .../laht/threekt => three}/core/Layers.kt | 2 +- .../laht/threekt => three}/core/Object3D.kt | 4 +- .../laht/threekt => three}/core/Raycaster.kt | 10 ++-- .../laht/threekt => three}/core/Uniform.kt | 2 +- .../threekt => three}/external/Detector.kt | 2 +- .../external/ImprovedNoise.kt | 2 +- .../external/SimplexNoise.kt | 2 +- .../external/controls/FlyControls.kt | 4 +- .../external/controls/OrbitControls.kt | 6 +-- .../external/controls/TrackballControls.kt | 8 ++-- .../external/controls/TransformControls.kt | 4 +- .../external/exporters/OBJExporter.kt | 4 +- .../external/exporters/STLExporter.kt | 4 +- .../external/geometries/ConvexGeometry.kt | 6 +-- .../external/libs/GUIParams.kt | 2 +- .../threekt => three}/external/libs/Stats.kt | 2 +- .../threekt => three}/external/libs/datgui.kt | 2 +- .../external/loaders/BabylonLoader.kt | 6 +-- .../external/loaders/GLTFLoader.kt | 10 ++-- .../external/loaders/LoaderSupport.kt | 2 +- .../external/loaders/MTLLoader.kt | 6 +-- .../external/loaders/OBJLoader.kt | 8 ++-- .../external/loaders/OBJLoader2.kt | 6 +-- .../external/loaders/STLLoader.kt | 6 +-- .../threekt => three}/external/objects/Sky.kt | 4 +- .../external/objects/Water.kt | 4 +- .../external/objects/WaterOptions.kt | 6 +-- .../threekt => three}/extras/SceneUtils.kt | 12 ++--- .../threekt => three}/extras/core/Curve.kt | 2 +- .../extras/core/CurvePath.kt | 2 +- .../threekt => three}/extras/core/Path.kt | 4 +- .../main/kotlin/three/extras/core/Shape.kt | 8 ++++ .../kotlin/three/extras/core/ShapePath.kt | 6 +++ .../extras/curves/ArcCurve.kt | 2 +- .../extras/curves/CatmullRomCurve3.kt | 6 +-- .../extras/curves/EllipseCurve.kt | 6 +-- .../extras/curves/LineCurve.kt | 6 +-- .../extras/curves/LineCurve3.kt | 6 +-- .../extras/curves/QuadricBezierCurve.kt | 6 +-- .../extras/curves/QuadricBezierCurve3.kt | 6 +-- .../extras/curves/SplineCurve.kt | 6 +-- .../geometries/BoxGeometry.kt | 4 +- .../geometries/ConeGeometry.kt | 4 +- .../geometries/CylinderGeometry.kt | 4 +- .../kotlin/three/geometries/EdgesGeometry.kt | 8 ++++ .../geometries/ExtrudeGeometry.kt | 8 ++-- .../geometries/PlaneGeometry.kt | 4 +- .../geometries/SphereGeometry.kt | 4 +- .../geometries/TextGeometry.kt | 2 +- .../geometries/TorusGeometry.kt | 4 +- .../geometries/TubeGeometry.kt | 8 ++-- .../geometries/WireframeGeometry.kt | 4 +- .../threekt => three}/helpers/ArrowHelper.kt | 12 ++--- .../threekt => three}/helpers/AxesHelper.kt | 4 +- .../threekt => three}/helpers/Box3Helper.kt | 6 +-- .../threekt => three}/helpers/CameraHelper.kt | 6 +-- .../threekt => three}/helpers/GridHelper.kt | 4 +- .../helpers/HemisphereLightHelper.kt | 8 ++-- .../threekt => three}/helpers/PlaneHelper.kt | 8 ++-- .../src/main/kotlin/three/ktutils.kt | 9 ++++ .../threekt => three}/lights/AmbientLight.kt | 2 +- .../lights/DirectionalLight.kt | 4 +- .../lights/DirectionalLightShadow.kt | 2 +- .../lights/HemisphereLight.kt | 4 +- .../laht/threekt => three}/lights/Light.kt | 6 +-- .../threekt => three}/lights/LightShadow.kt | 8 ++-- .../threekt => three}/lights/PointLight.kt | 2 +- .../threekt => three}/lights/SpotLight.kt | 4 +- .../lights/SpotLightShadow.kt | 2 +- .../laht/threekt => three}/loaders/Cache.kt | 2 +- .../loaders/CompressedTextureLoader.kt | 4 +- .../threekt => three}/loaders/ImageLoader.kt | 2 +- .../threekt => three}/loaders/JSONLoader.kt | 8 ++-- .../laht/threekt => three}/loaders/Loader.kt | 2 +- .../loaders/LoadingManager.kt | 2 +- .../loaders/MaterialLoader.kt | 6 +-- .../loaders/TextureLoader.kt | 4 +- .../materials/LineBasicMaterial.kt | 4 +- .../materials/LineDashedMaterial.kt | 2 +- .../threekt => three}/materials/Material.kt | 2 +- .../materials/MeshBasicMaterial.kt | 6 +-- .../materials/MeshDepthMaterial.kt | 4 +- .../materials/MeshLambertMaterial.kt | 6 +-- .../materials/MeshNormalMaterial.kt | 6 +-- .../materials/MeshPhongMaterial.kt | 8 ++-- .../materials/MeshPhysicalMaterial.kt | 2 +- .../materials/MeshStandardMaterial.kt | 8 ++-- .../materials/PointsMaterial.kt | 6 +-- .../materials/RawShaderMaterial.kt | 2 +- .../materials/ShaderMaterial.kt | 2 +- .../materials/SpriteMaterial.kt | 6 +-- .../{info/laht/threekt => three}/math/Box2.kt | 2 +- .../{info/laht/threekt => three}/math/Box3.kt | 4 +- .../laht/threekt => three}/math/Color.kt | 2 +- .../threekt => three}/math/ColorConstants.kt | 2 +- .../threekt => three}/math/Cylindrical.kt | 2 +- .../laht/threekt => three}/math/Euler.kt | 2 +- .../laht/threekt => three}/math/Frustrum.kt | 2 +- .../laht/threekt => three}/math/Line3.kt | 2 +- .../{info/laht/threekt => three}/math/Math.kt | 2 +- .../laht/threekt => three}/math/Matrix3.kt | 4 +- .../laht/threekt => three}/math/Matrix4.kt | 4 +- .../laht/threekt => three}/math/Plane.kt | 2 +- .../laht/threekt => three}/math/Quaternion.kt | 2 +- .../{info/laht/threekt => three}/math/Ray.kt | 2 +- .../laht/threekt => three}/math/Sphere.kt | 2 +- .../laht/threekt => three}/math/Spherical.kt | 2 +- .../laht/threekt => three}/math/Triangle.kt | 2 +- .../laht/threekt => three}/math/Vector2.kt | 2 +- .../laht/threekt => three}/math/Vector3.kt | 4 +- .../laht/threekt => three}/math/Vector4.kt | 2 +- .../laht/threekt => three}/math/operators.kt | 2 +- .../main/kotlin/three/meshline/MeshLine.kt | 37 +++++++++++++++ .../main/kotlin/three/meshline/meshLineExt.kt | 8 ++++ .../laht/threekt => three}/objects/Group.kt | 4 +- .../laht/threekt => three}/objects/LOD.kt | 10 ++-- .../laht/threekt => three}/objects/Line.kt | 12 ++--- .../threekt => three}/objects/LineLoop.kt | 6 +-- .../threekt => three}/objects/LineSegments.kt | 8 ++-- .../laht/threekt => three}/objects/Mesh.kt | 12 ++--- .../laht/threekt => three}/objects/Points.kt | 10 ++-- .../laht/threekt => three}/objects/Sprite.kt | 10 ++-- .../renderers/WebGL2Renderer.kt | 6 +-- .../renderers/WebGL2RendererParams.kt | 2 +- .../renderers/WebGLRenderTarget.kt | 6 +-- .../renderers/WebGLRenderTargetOptions.kt | 2 +- .../renderers/WebGLRenderer.kt | 8 ++-- .../renderers/WebGLRendererParams.kt | 2 +- .../renderers/shaders/ShaderChunk.kt | 2 +- .../renderers/shaders/ShaderLib.kt | 2 +- .../renderers/shaders/UniformsUtil.kt | 4 +- .../laht/threekt => three}/scenes/Fog.kt | 4 +- .../laht/threekt => three}/scenes/FogExp2.kt | 4 +- .../laht/threekt => three}/scenes/Scene.kt | 6 +-- .../textures/CompressedTexture.kt | 2 +- .../threekt => three}/textures/CubeTexture.kt | 2 +- .../textures/DepthTexture.kt | 2 +- .../threekt => three}/textures/Texture.kt | 6 +-- .../utils/BufferGeometryUtils.kt | 4 +- 189 files changed, 573 insertions(+), 461 deletions(-) delete mode 100644 visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/core/Shape.kt delete mode 100644 visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/core/ShapePath.kt delete mode 100644 visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/EdgesGeometry.kt delete mode 100644 visionforge-threejs/src/main/kotlin/info/laht/threekt/ktutils.kt create mode 100644 visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeMeshLineFactory.kt create mode 100644 visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeSmartLineFactory.kt rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/THREE.kt (99%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/animation/AnimationAction.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/animation/AnimationClip.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/animation/AnimationMixer.kt (92%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/animation/AnimationUtils.kt (70%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/animation/KeyFrameTrack.kt (95%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/audio/Audio.kt (99%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/audio/AudioContext.kt (94%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/audio/AudioListener.kt (89%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/audio/PositionalAudio.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/cameras/Camera.kt (94%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/cameras/OrthographicCamera.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/cameras/PerspectiveCamera.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/core/BufferAttribute.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/core/BufferGeometry.kt (95%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/core/Clock.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/core/EventDispatcher.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/core/Face3.kt (94%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/core/InstancedBufferGeometry.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/core/Layers.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/core/Object3D.kt (99%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/core/Raycaster.kt (91%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/core/Uniform.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/Detector.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/ImprovedNoise.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/SimplexNoise.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/controls/FlyControls.kt (94%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/controls/OrbitControls.kt (95%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/controls/TrackballControls.kt (90%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/controls/TransformControls.kt (95%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/exporters/OBJExporter.kt (93%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/exporters/STLExporter.kt (94%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/geometries/ConvexGeometry.kt (61%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/libs/GUIParams.kt (93%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/libs/Stats.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/libs/datgui.kt (99%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/loaders/BabylonLoader.kt (93%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/loaders/GLTFLoader.kt (89%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/loaders/LoaderSupport.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/loaders/MTLLoader.kt (92%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/loaders/OBJLoader.kt (91%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/loaders/OBJLoader2.kt (94%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/loaders/STLLoader.kt (92%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/objects/Sky.kt (91%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/objects/Water.kt (91%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/external/objects/WaterOptions.kt (93%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/extras/SceneUtils.kt (87%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/extras/core/Curve.kt (94%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/extras/core/CurvePath.kt (89%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/extras/core/Path.kt (61%) create mode 100644 visionforge-threejs/src/main/kotlin/three/extras/core/Shape.kt create mode 100644 visionforge-threejs/src/main/kotlin/three/extras/core/ShapePath.kt rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/extras/curves/ArcCurve.kt (91%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/extras/curves/CatmullRomCurve3.kt (79%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/extras/curves/EllipseCurve.kt (85%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/extras/curves/LineCurve.kt (66%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/extras/curves/LineCurve3.kt (67%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/extras/curves/QuadricBezierCurve.kt (74%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/extras/curves/QuadricBezierCurve3.kt (74%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/extras/curves/SplineCurve.kt (67%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/geometries/BoxGeometry.kt (77%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/geometries/ConeGeometry.kt (79%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/geometries/CylinderGeometry.kt (78%) create mode 100644 visionforge-threejs/src/main/kotlin/three/geometries/EdgesGeometry.kt rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/geometries/ExtrudeGeometry.kt (92%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/geometries/PlaneGeometry.kt (67%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/geometries/SphereGeometry.kt (78%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/geometries/TextGeometry.kt (96%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/geometries/TorusGeometry.kt (73%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/geometries/TubeGeometry.kt (72%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/geometries/WireframeGeometry.kt (68%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/helpers/ArrowHelper.kt (87%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/helpers/AxesHelper.kt (92%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/helpers/Box3Helper.kt (92%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/helpers/CameraHelper.kt (91%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/helpers/GridHelper.kt (94%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/helpers/HemisphereLightHelper.kt (91%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/helpers/PlaneHelper.kt (58%) create mode 100644 visionforge-threejs/src/main/kotlin/three/ktutils.kt rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/lights/AmbientLight.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/lights/DirectionalLight.kt (94%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/lights/DirectionalLightShadow.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/lights/HemisphereLight.kt (95%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/lights/Light.kt (94%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/lights/LightShadow.kt (90%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/lights/PointLight.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/lights/SpotLight.kt (95%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/lights/SpotLightShadow.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/loaders/Cache.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/loaders/CompressedTextureLoader.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/loaders/ImageLoader.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/loaders/JSONLoader.kt (94%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/loaders/Loader.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/loaders/LoadingManager.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/loaders/MaterialLoader.kt (92%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/loaders/TextureLoader.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/materials/LineBasicMaterial.kt (95%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/materials/LineDashedMaterial.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/materials/Material.kt (99%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/materials/MeshBasicMaterial.kt (94%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/materials/MeshDepthMaterial.kt (95%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/materials/MeshLambertMaterial.kt (94%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/materials/MeshNormalMaterial.kt (93%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/materials/MeshPhongMaterial.kt (93%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/materials/MeshPhysicalMaterial.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/materials/MeshStandardMaterial.kt (93%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/materials/PointsMaterial.kt (92%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/materials/RawShaderMaterial.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/materials/ShaderMaterial.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/materials/SpriteMaterial.kt (92%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/math/Box2.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/math/Box3.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/math/Color.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/math/ColorConstants.kt (99%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/math/Cylindrical.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/math/Euler.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/math/Frustrum.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/math/Line3.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/math/Math.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/math/Matrix3.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/math/Matrix4.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/math/Plane.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/math/Quaternion.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/math/Ray.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/math/Sphere.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/math/Spherical.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/math/Triangle.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/math/Vector2.kt (99%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/math/Vector3.kt (99%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/math/Vector4.kt (99%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/math/operators.kt (98%) create mode 100644 visionforge-threejs/src/main/kotlin/three/meshline/MeshLine.kt create mode 100644 visionforge-threejs/src/main/kotlin/three/meshline/meshLineExt.kt rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/objects/Group.kt (94%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/objects/LOD.kt (88%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/objects/Line.kt (85%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/objects/LineLoop.kt (90%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/objects/LineSegments.kt (89%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/objects/Mesh.kt (86%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/objects/Points.kt (87%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/objects/Sprite.kt (87%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/renderers/WebGL2Renderer.kt (93%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/renderers/WebGL2RendererParams.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/renderers/WebGLRenderTarget.kt (93%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/renderers/WebGLRenderTargetOptions.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/renderers/WebGLRenderer.kt (96%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/renderers/WebGLRendererParams.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/renderers/shaders/ShaderChunk.kt (99%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/renderers/shaders/ShaderLib.kt (96%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/renderers/shaders/UniformsUtil.kt (94%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/scenes/Fog.kt (95%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/scenes/FogExp2.kt (95%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/scenes/Scene.kt (95%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/textures/CompressedTexture.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/textures/CubeTexture.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/textures/DepthTexture.kt (97%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/textures/Texture.kt (98%) rename visionforge-threejs/src/main/kotlin/{info/laht/threekt => three}/utils/BufferGeometryUtils.kt (87%) diff --git a/CHANGELOG.md b/CHANGELOG.md index a59c31d9..f60db403 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,10 +3,15 @@ ## [Unreleased] ### Added - Context receivers flag +- MeshLine for thick lines ### Changed -- Naming of Canvas3D options -- Lights are added to the scene instead of 3D options +- Visions **must** be rooted in order to subscribe to updates. +- Visions use flows instead of direct subscriptions. +- Radical change of inner workings of vision children and properties. +- Three package changed to `three`. +- Naming of Canvas3D options. +- Lights are added to the scene instead of 3D options. ### Deprecated diff --git a/demo/solid-showcase/src/jsMain/kotlin/space/kscience/visionforge/solid/demo/VariableBox.kt b/demo/solid-showcase/src/jsMain/kotlin/space/kscience/visionforge/solid/demo/VariableBox.kt index 28b0c968..1e626155 100644 --- a/demo/solid-showcase/src/jsMain/kotlin/space/kscience/visionforge/solid/demo/VariableBox.kt +++ b/demo/solid-showcase/src/jsMain/kotlin/space/kscience/visionforge/solid/demo/VariableBox.kt @@ -1,8 +1,5 @@ package space.kscience.visionforge.solid.demo -import info.laht.threekt.core.Object3D -import info.laht.threekt.geometries.BoxGeometry -import info.laht.threekt.objects.Mesh import space.kscience.dataforge.meta.asValue import space.kscience.dataforge.meta.int import space.kscience.dataforge.meta.number @@ -13,6 +10,9 @@ import space.kscience.visionforge.setChild import space.kscience.visionforge.solid.SolidGroup import space.kscience.visionforge.solid.layer import space.kscience.visionforge.solid.three.* +import three.core.Object3D +import three.geometries.BoxGeometry +import three.objects.Mesh import kotlin.math.max internal fun SolidGroup.varBox( diff --git a/ui/react/src/main/kotlin/space/kscience/visionforge/react/valueChooser.kt b/ui/react/src/main/kotlin/space/kscience/visionforge/react/valueChooser.kt index 04c7d946..96c1e6fe 100644 --- a/ui/react/src/main/kotlin/space/kscience/visionforge/react/valueChooser.kt +++ b/ui/react/src/main/kotlin/space/kscience/visionforge/react/valueChooser.kt @@ -1,6 +1,5 @@ package space.kscience.visionforge.react -import info.laht.threekt.math.Color import kotlinx.css.margin import kotlinx.css.pct import kotlinx.css.px @@ -25,6 +24,7 @@ import space.kscience.visionforge.widgetType import styled.css import styled.styledInput import styled.styledSelect +import three.math.Color public external interface ValueChooserProps : Props { public var descriptor: MetaDescriptor? diff --git a/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/PolyLine.kt b/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/PolyLine.kt index 4d5373b8..0f366dbe 100644 --- a/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/PolyLine.kt +++ b/visionforge-solid/src/commonMain/kotlin/space/kscience/visionforge/solid/PolyLine.kt @@ -10,7 +10,11 @@ import space.kscience.visionforge.* public class PolyLine(public val points: List) : SolidBase() { //var lineType by string() - public var thickness: Number by properties.getProperty(SolidMaterial.MATERIAL_KEY).number { 1.0 } + public var thickness: Number by properties.root(inherit = false, includeStyles = true).number { DEFAULT_THICKNESS } + + public companion object { + public const val DEFAULT_THICKNESS: Double = 1.0 + } } @VisionBuilder diff --git a/visionforge-threejs/build.gradle.kts b/visionforge-threejs/build.gradle.kts index 8be1b7a1..7ba2c555 100644 --- a/visionforge-threejs/build.gradle.kts +++ b/visionforge-threejs/build.gradle.kts @@ -12,4 +12,5 @@ dependencies { api(project(":visionforge-solid")) implementation(npm("three", "0.143.0")) implementation(npm("three-csg-ts", "3.1.10")) + implementation(npm("three.meshline","1.4.0")) } diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/core/Shape.kt b/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/core/Shape.kt deleted file mode 100644 index 0b584f1f..00000000 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/core/Shape.kt +++ /dev/null @@ -1,8 +0,0 @@ -@file:JsModule("three") -@file:JsNonModule - -package info.laht.threekt.extras.core - -import info.laht.threekt.math.Vector2 - -external class Shape(points: Array) : Path \ No newline at end of file diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/core/ShapePath.kt b/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/core/ShapePath.kt deleted file mode 100644 index bd6e69b9..00000000 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/core/ShapePath.kt +++ /dev/null @@ -1,6 +0,0 @@ -@file:JsModule("three") -@file:JsNonModule - -package info.laht.threekt.extras.core - -external class ShapePath \ No newline at end of file diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/EdgesGeometry.kt b/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/EdgesGeometry.kt deleted file mode 100644 index b0a5c91b..00000000 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/EdgesGeometry.kt +++ /dev/null @@ -1,8 +0,0 @@ -@file:JsModule("three") -@file:JsNonModule - -package info.laht.threekt.geometries - -import info.laht.threekt.core.BufferGeometry - -public external class EdgesGeometry(geometry: BufferGeometry, thresholdAngle: Int = definedExternally) : BufferGeometry \ No newline at end of file diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/ktutils.kt b/visionforge-threejs/src/main/kotlin/info/laht/threekt/ktutils.kt deleted file mode 100644 index a0ef343e..00000000 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/ktutils.kt +++ /dev/null @@ -1,9 +0,0 @@ -@file:Suppress("FunctionName") - -package info.laht.threekt - -import info.laht.threekt.renderers.WebGLRenderer -import info.laht.threekt.renderers.WebGLRendererParams - -fun WebGLRenderer(builder: WebGLRendererParams.() -> Unit): WebGLRenderer = - WebGLRenderer(WebGLRendererParams().apply(builder)) \ No newline at end of file diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeAmbientLightFactory.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeAmbientLightFactory.kt index 5df6cc7a..3d420570 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeAmbientLightFactory.kt +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeAmbientLightFactory.kt @@ -1,8 +1,8 @@ package space.kscience.visionforge.solid.three -import info.laht.threekt.lights.AmbientLight -import info.laht.threekt.math.Color import space.kscience.visionforge.solid.AmbientLightSource +import three.lights.AmbientLight +import three.math.Color import kotlin.reflect.KClass public object ThreeAmbientLightFactory : ThreeFactory { diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeBoxFactory.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeBoxFactory.kt index f66492ed..21c52198 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeBoxFactory.kt +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeBoxFactory.kt @@ -1,8 +1,8 @@ package space.kscience.visionforge.solid.three -import info.laht.threekt.geometries.BoxGeometry import space.kscience.visionforge.solid.Box import space.kscience.visionforge.solid.detail +import three.geometries.BoxGeometry public object ThreeBoxFactory : ThreeMeshFactory(Box::class) { override fun buildGeometry(obj: Box): BoxGeometry = diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeCanvas.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeCanvas.kt index 747b722a..04b04699 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeCanvas.kt +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeCanvas.kt @@ -1,18 +1,5 @@ package space.kscience.visionforge.solid.three -import info.laht.threekt.WebGLRenderer -import info.laht.threekt.cameras.PerspectiveCamera -import info.laht.threekt.core.Object3D -import info.laht.threekt.core.Raycaster -import info.laht.threekt.external.controls.OrbitControls -import info.laht.threekt.external.controls.TrackballControls -import info.laht.threekt.geometries.EdgesGeometry -import info.laht.threekt.helpers.AxesHelper -import info.laht.threekt.materials.LineBasicMaterial -import info.laht.threekt.math.* -import info.laht.threekt.objects.LineSegments -import info.laht.threekt.objects.Mesh -import info.laht.threekt.scenes.Scene import kotlinx.browser.window import org.w3c.dom.Element import org.w3c.dom.HTMLCanvasElement @@ -25,8 +12,19 @@ import space.kscience.dataforge.names.* import space.kscience.visionforge.Colors import space.kscience.visionforge.solid.Solid import space.kscience.visionforge.solid.specifications.* -import space.kscience.visionforge.solid.three.ThreeMaterials.HIGHLIGHT_MATERIAL -import space.kscience.visionforge.solid.three.ThreeMaterials.SELECTED_MATERIAL +import three.WebGLRenderer +import three.cameras.PerspectiveCamera +import three.core.Object3D +import three.core.Raycaster +import three.external.controls.OrbitControls +import three.external.controls.TrackballControls +import three.geometries.EdgesGeometry +import three.helpers.AxesHelper +import three.math.* +import three.meshline.MeshLine +import three.meshline.MeshLineMaterial +import three.objects.Mesh +import three.scenes.Scene import kotlin.math.cos import kotlin.math.sin @@ -278,7 +276,7 @@ public class ThreeCanvas( private fun Object3D.toggleHighlight( highlight: Boolean, edgesName: String, - material: LineBasicMaterial = SELECTED_MATERIAL, + material: MeshLineMaterial, ) { if (userData[DO_NOT_HIGHLIGHT_TAG] == true) { @@ -286,8 +284,8 @@ public class ThreeCanvas( } if (isMesh(this)) { - val highlightMesh = getObjectByName(edgesName) ?: LineSegments( - EdgesGeometry(geometry), + val highlightMesh = getObjectByName(edgesName) ?: Mesh( + MeshLine(EdgesGeometry(geometry)), material ).also { it.name = edgesName @@ -319,6 +317,19 @@ public class ThreeCanvas( } public companion object { + public val SELECTED_MATERIAL: MeshLineMaterial = MeshLineMaterial().apply { + color.set(Colors.ivory) + linewidth = 2.0 + cached = true + } + + public val HIGHLIGHT_MATERIAL: MeshLineMaterial = MeshLineMaterial().apply { + color.set(Colors.blue) + linewidth = 2.0 + cached = true + } + + public const val DO_NOT_HIGHLIGHT_TAG: String = "doNotHighlight" private const val HIGHLIGHT_NAME = "@highlight" private const val SELECT_NAME = "@select" diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeCanvasLabelFactory.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeCanvasLabelFactory.kt index cc798297..0b0019df 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeCanvasLabelFactory.kt +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeCanvasLabelFactory.kt @@ -1,11 +1,5 @@ package space.kscience.visionforge.solid.three -import info.laht.threekt.DoubleSide -import info.laht.threekt.core.Object3D -import info.laht.threekt.geometries.PlaneGeometry -import info.laht.threekt.materials.MeshBasicMaterial -import info.laht.threekt.objects.Mesh -import info.laht.threekt.textures.Texture import kotlinx.browser.document import org.w3c.dom.CanvasRenderingContext2D import org.w3c.dom.CanvasTextBaseline @@ -14,6 +8,12 @@ import org.w3c.dom.MIDDLE import space.kscience.visionforge.solid.SolidLabel import space.kscience.visionforge.solid.SolidMaterial import space.kscience.visionforge.solid.three.ThreeCanvas.Companion.DO_NOT_HIGHLIGHT_TAG +import three.DoubleSide +import three.core.Object3D +import three.geometries.PlaneGeometry +import three.materials.MeshBasicMaterial +import three.objects.Mesh +import three.textures.Texture import kotlin.reflect.KClass /** diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeCompositeFactory.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeCompositeFactory.kt index e4cb84d5..44bcb797 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeCompositeFactory.kt +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeCompositeFactory.kt @@ -1,11 +1,11 @@ package space.kscience.visionforge.solid.three import CSG -import info.laht.threekt.objects.Mesh import space.kscience.dataforge.names.startsWith import space.kscience.visionforge.onPropertyChange import space.kscience.visionforge.solid.Composite import space.kscience.visionforge.solid.CompositeType +import three.objects.Mesh import kotlin.reflect.KClass /** diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeConeFactory.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeConeFactory.kt index 8eed04ae..acb81e1f 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeConeFactory.kt +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeConeFactory.kt @@ -1,9 +1,9 @@ package space.kscience.visionforge.solid.three -import info.laht.threekt.core.BufferGeometry -import info.laht.threekt.geometries.CylinderGeometry import space.kscience.visionforge.solid.ConeSegment import space.kscience.visionforge.solid.detail +import three.core.BufferGeometry +import three.geometries.CylinderGeometry import kotlin.math.PI import kotlin.math.pow diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeConvexFactory.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeConvexFactory.kt index 2ab67219..83115b13 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeConvexFactory.kt +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeConvexFactory.kt @@ -1,7 +1,7 @@ package space.kscience.visionforge.solid.three -import info.laht.threekt.external.geometries.ConvexBufferGeometry import space.kscience.visionforge.solid.Convex +import three.external.geometries.ConvexBufferGeometry public object ThreeConvexFactory : ThreeMeshFactory(Convex::class) { override fun buildGeometry(obj: Convex): ConvexBufferGeometry { diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeFactory.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeFactory.kt index 0f38640c..cf42c139 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeFactory.kt +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeFactory.kt @@ -1,8 +1,5 @@ package space.kscience.visionforge.solid.three -import info.laht.threekt.core.BufferGeometry -import info.laht.threekt.core.Object3D -import info.laht.threekt.math.Euler import space.kscience.dataforge.misc.Type import space.kscience.dataforge.names.Name import space.kscience.dataforge.names.startsWith @@ -11,6 +8,9 @@ import space.kscience.visionforge.solid.* import space.kscience.visionforge.solid.SolidMaterial.Companion.MATERIAL_KEY import space.kscience.visionforge.solid.three.ThreeFactory.Companion.TYPE import space.kscience.visionforge.visible +import three.core.BufferGeometry +import three.core.Object3D +import three.math.Euler import kotlin.reflect.KClass /** diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeGeometryBuilder.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeGeometryBuilder.kt index fc226de6..e75e4847 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeGeometryBuilder.kt +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeGeometryBuilder.kt @@ -1,8 +1,8 @@ package space.kscience.visionforge.solid.three -import info.laht.threekt.core.BufferGeometry -import info.laht.threekt.core.Float32BufferAttribute -import info.laht.threekt.math.Vector3 +import three.core.BufferGeometry +import three.core.Float32BufferAttribute +import three.math.Vector3 import space.kscience.dataforge.meta.Meta import space.kscience.visionforge.solid.GeometryBuilder import space.kscience.visionforge.solid.Point3D diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeJsVision.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeJsVision.kt index 7c709a5c..3829698e 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeJsVision.kt +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeJsVision.kt @@ -1,6 +1,6 @@ package space.kscience.visionforge.solid.three -import info.laht.threekt.core.Object3D +import three.core.Object3D import space.kscience.visionforge.solid.SolidBase /** diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeLabelFactory.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeLabelFactory.kt index c9244ea5..49796fb0 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeLabelFactory.kt +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeLabelFactory.kt @@ -1,9 +1,9 @@ package space.kscience.visionforge.solid.three -import info.laht.threekt.core.Object3D -import info.laht.threekt.geometries.TextBufferGeometry -import info.laht.threekt.objects.Mesh +import three.core.Object3D +import three.geometries.TextBufferGeometry +import three.objects.Mesh import kotlinx.js.jso import space.kscience.dataforge.context.logger import space.kscience.dataforge.context.warn diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeLineFactory.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeLineFactory.kt index 557a375f..adf4ce0d 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeLineFactory.kt +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeLineFactory.kt @@ -1,9 +1,9 @@ package space.kscience.visionforge.solid.three -import info.laht.threekt.core.BufferGeometry -import info.laht.threekt.core.Object3D -import info.laht.threekt.math.Color -import info.laht.threekt.objects.LineSegments +import three.core.BufferGeometry +import three.core.Object3D +import three.math.Color +import three.objects.LineSegments import space.kscience.visionforge.onPropertyChange import space.kscience.visionforge.solid.PolyLine import space.kscience.visionforge.solid.SolidMaterial diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeMaterials.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeMaterials.kt index 3826f11d..abcd5df5 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeMaterials.kt +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeMaterials.kt @@ -1,11 +1,5 @@ package space.kscience.visionforge.solid.three -import info.laht.threekt.materials.LineBasicMaterial -import info.laht.threekt.materials.Material -import info.laht.threekt.materials.MeshBasicMaterial -import info.laht.threekt.materials.MeshStandardMaterial -import info.laht.threekt.math.Color -import info.laht.threekt.objects.Mesh import space.kscience.dataforge.meta.* import space.kscience.dataforge.names.Name import space.kscience.dataforge.names.asName @@ -16,6 +10,12 @@ import space.kscience.visionforge.getStyleNodes import space.kscience.visionforge.solid.ColorAccessor import space.kscience.visionforge.solid.SolidMaterial import space.kscience.visionforge.solid.SolidReference +import three.materials.LineBasicMaterial +import three.materials.Material +import three.materials.MeshBasicMaterial +import three.materials.MeshStandardMaterial +import three.math.Color +import three.objects.Mesh public object ThreeMaterials { @@ -37,18 +37,6 @@ public object ThreeMaterials { cached = true } - public val SELECTED_MATERIAL: LineBasicMaterial = LineBasicMaterial().apply { - color.set(Colors.ivory) - linewidth = 2.0 - cached = true - } - - public val HIGHLIGHT_MATERIAL: LineBasicMaterial = LineBasicMaterial().apply { - color.set(Colors.blue) - linewidth = 2.0 - cached = true - } - private val lineMaterialCache = HashMap() private fun buildLineMaterial(meta: Meta): LineBasicMaterial = LineBasicMaterial().apply { @@ -124,7 +112,7 @@ public fun ColorAccessor.threeColor(): Color? { } } -private var Material.cached: Boolean +internal var Material.cached: Boolean get() = userData["cached"] == true set(value) { userData["cached"] = value diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeMeshFactory.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeMeshFactory.kt index 1a68985f..ef7f5120 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeMeshFactory.kt +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeMeshFactory.kt @@ -1,9 +1,5 @@ package space.kscience.visionforge.solid.three -import info.laht.threekt.core.BufferGeometry -import info.laht.threekt.geometries.EdgesGeometry -import info.laht.threekt.objects.LineSegments -import info.laht.threekt.objects.Mesh import space.kscience.dataforge.meta.boolean import space.kscience.dataforge.names.Name import space.kscience.dataforge.names.asName @@ -18,6 +14,10 @@ import space.kscience.visionforge.solid.layer import space.kscience.visionforge.solid.three.ThreeMeshFactory.Companion.EDGES_ENABLED_KEY import space.kscience.visionforge.solid.three.ThreeMeshFactory.Companion.EDGES_MATERIAL_KEY import space.kscience.visionforge.solid.three.ThreeMeshFactory.Companion.EDGES_OBJECT_NAME +import three.core.BufferGeometry +import three.geometries.EdgesGeometry +import three.objects.LineSegments +import three.objects.Mesh import kotlin.reflect.KClass /** diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeMeshLineFactory.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeMeshLineFactory.kt new file mode 100644 index 00000000..3d9b4c3b --- /dev/null +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeMeshLineFactory.kt @@ -0,0 +1,41 @@ +package space.kscience.visionforge.solid.three + +import space.kscience.visionforge.onPropertyChange +import space.kscience.visionforge.solid.PolyLine +import space.kscience.visionforge.solid.color +import space.kscience.visionforge.solid.string +import three.core.Object3D +import three.math.Color +import three.meshline.MeshLine +import three.meshline.MeshLineMaterial +import three.objects.Mesh +import kotlin.math.ceil +import kotlin.reflect.KClass + +public object ThreeMeshLineFactory : ThreeFactory { + override val type: KClass get() = PolyLine::class + + override fun build(three: ThreePlugin, vision: PolyLine, observe: Boolean): Object3D { + val geometry = MeshLine( + Array((vision.points.size - 1) * 2) { + vision.points[ceil(it / 2.0).toInt()].toVector() + } + ) + + val material = MeshLineMaterial().apply { + thickness = vision.thickness.toFloat() + color = vision.color.string?.let { Color(it) } ?: ThreeMaterials.DEFAULT_LINE_COLOR + } + + return Mesh(geometry, material).apply { + updatePosition(vision) + //layers.enable(obj.layer) + //add listener to object properties + if (observe) { + vision.onPropertyChange(three.context) { propertyName -> + updateProperty(vision, propertyName) + } + } + } + } +} \ No newline at end of file diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreePlugin.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreePlugin.kt index ba30e88b..bae26853 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreePlugin.kt +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreePlugin.kt @@ -1,6 +1,5 @@ package space.kscience.visionforge.solid.three -import info.laht.threekt.core.Object3D import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach import org.w3c.dom.Element @@ -15,9 +14,10 @@ import space.kscience.visionforge.VisionChildren import space.kscience.visionforge.solid.* import space.kscience.visionforge.solid.specifications.Canvas3DOptions import space.kscience.visionforge.visible +import three.core.Object3D import kotlin.collections.set import kotlin.reflect.KClass -import info.laht.threekt.objects.Group as ThreeGroup +import three.objects.Group as ThreeGroup public class ThreePlugin : AbstractPlugin(), ElementVisionRenderer { override val tag: PluginTag get() = Companion.tag @@ -35,7 +35,7 @@ public class ThreePlugin : AbstractPlugin(), ElementVisionRenderer { objectFactories[Convex::class] = ThreeConvexFactory objectFactories[Sphere::class] = ThreeSphereFactory objectFactories[ConeSegment::class] = ThreeConeFactory - objectFactories[PolyLine::class] = ThreeLineFactory + objectFactories[PolyLine::class] = ThreeSmartLineFactory objectFactories[SolidLabel::class] = ThreeCanvasLabelFactory objectFactories[AmbientLightSource::class] = ThreeAmbientLightFactory objectFactories[PointLightSource::class] = ThreePointLightFactory @@ -182,7 +182,7 @@ internal fun Object3D.getOrCreateGroup(name: Name): Object3D { name.isEmpty() -> this name.length == 1 -> { val token = name.tokens.first() - children.find { it.name == token.toString() } ?: info.laht.threekt.objects.Group().also { group -> + children.find { it.name == token.toString() } ?: ThreeGroup().also { group -> group.name = token.toString() this.add(group) } diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreePointLightFactory.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreePointLightFactory.kt index 56df4b8b..fdd2e019 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreePointLightFactory.kt +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreePointLightFactory.kt @@ -1,11 +1,11 @@ package space.kscience.visionforge.solid.three -import info.laht.threekt.lights.PointLight -import info.laht.threekt.math.Color import space.kscience.dataforge.names.asName import space.kscience.visionforge.onPropertyChange import space.kscience.visionforge.solid.LightSource import space.kscience.visionforge.solid.PointLightSource +import three.lights.PointLight +import three.math.Color import kotlin.reflect.KClass public object ThreePointLightFactory : ThreeFactory { diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeReferenceFactory.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeReferenceFactory.kt index b0e1d69c..bde8c456 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeReferenceFactory.kt +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeReferenceFactory.kt @@ -1,7 +1,5 @@ package space.kscience.visionforge.solid.three -import info.laht.threekt.core.Object3D -import info.laht.threekt.objects.Mesh import space.kscience.dataforge.names.Name import space.kscience.dataforge.names.cutFirst import space.kscience.dataforge.names.firstOrNull @@ -9,6 +7,8 @@ import space.kscience.visionforge.onPropertyChange import space.kscience.visionforge.solid.Solid import space.kscience.visionforge.solid.SolidReference import space.kscience.visionforge.solid.SolidReference.Companion.REFERENCE_CHILD_PROPERTY_PREFIX +import three.core.Object3D +import three.objects.Mesh import kotlin.reflect.KClass public object ThreeReferenceFactory : ThreeFactory { diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeSmartLineFactory.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeSmartLineFactory.kt new file mode 100644 index 00000000..2e7329da --- /dev/null +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeSmartLineFactory.kt @@ -0,0 +1,17 @@ +package space.kscience.visionforge.solid.three + +import space.kscience.visionforge.solid.PolyLine +import three.core.Object3D +import kotlin.reflect.KClass + +public object ThreeSmartLineFactory : ThreeFactory { + override val type: KClass get() = PolyLine::class + + override fun build(three: ThreePlugin, vision: PolyLine, observe: Boolean): Object3D { + return if (vision.thickness == 1.0) { + ThreeLineFactory.build(three, vision, observe) + } else { + ThreeMeshLineFactory.build(three, vision, observe) + } + } +} \ No newline at end of file diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeSphereFactory.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeSphereFactory.kt index 9d4926c5..8022a09c 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeSphereFactory.kt +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/ThreeSphereFactory.kt @@ -1,9 +1,9 @@ package space.kscience.visionforge.solid.three -import info.laht.threekt.core.BufferGeometry -import info.laht.threekt.geometries.SphereGeometry import space.kscience.visionforge.solid.Sphere import space.kscience.visionforge.solid.detail +import three.core.BufferGeometry +import three.geometries.SphereGeometry public object ThreeSphereFactory : ThreeMeshFactory(Sphere::class) { override fun buildGeometry(obj: Sphere): BufferGeometry { diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/csg.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/csg.kt index ac2fefc0..940d72c3 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/csg.kt +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/csg.kt @@ -10,10 +10,10 @@ @file:JsModule("three-csg-ts") @file:JsNonModule -import info.laht.threekt.core.BufferGeometry -import info.laht.threekt.math.Matrix4 -import info.laht.threekt.math.Vector3 -import info.laht.threekt.objects.Mesh +import three.core.BufferGeometry +import three.math.Matrix4 +import three.math.Vector3 +import three.objects.Mesh public external class CSG { public fun clone(): CSG diff --git a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/three.kt b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/three.kt index 94262052..9c9d5b2b 100644 --- a/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/three.kt +++ b/visionforge-threejs/src/main/kotlin/space/kscience/visionforge/solid/three/three.kt @@ -1,16 +1,16 @@ package space.kscience.visionforge.solid.three -import info.laht.threekt.core.BufferGeometry -import info.laht.threekt.core.Layers -import info.laht.threekt.core.Object3D -import info.laht.threekt.external.controls.OrbitControls -import info.laht.threekt.materials.Material -import info.laht.threekt.math.Vector3 -import info.laht.threekt.objects.Mesh -import info.laht.threekt.textures.Texture import space.kscience.dataforge.meta.Meta import space.kscience.dataforge.meta.float import space.kscience.dataforge.meta.get +import three.core.BufferGeometry +import three.core.Layers +import three.core.Object3D +import three.external.controls.OrbitControls +import three.materials.Material +import three.math.Vector3 +import three.objects.Mesh +import three.textures.Texture import kotlin.contracts.contract import kotlin.math.PI diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/THREE.kt b/visionforge-threejs/src/main/kotlin/three/THREE.kt similarity index 99% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/THREE.kt rename to visionforge-threejs/src/main/kotlin/three/THREE.kt index 3f8028cb..4dca1f62 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/THREE.kt +++ b/visionforge-threejs/src/main/kotlin/three/THREE.kt @@ -26,7 +26,7 @@ @file:JsNonModule @file:Suppress("NO_EXPLICIT_VISIBILITY_IN_API_MODE_WARNING", "unused") -package info.laht.threekt +package three external val REVISION: String diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/animation/AnimationAction.kt b/visionforge-threejs/src/main/kotlin/three/animation/AnimationAction.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/animation/AnimationAction.kt rename to visionforge-threejs/src/main/kotlin/three/animation/AnimationAction.kt index d0e9b073..185793ff 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/animation/AnimationAction.kt +++ b/visionforge-threejs/src/main/kotlin/three/animation/AnimationAction.kt @@ -2,9 +2,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.animation +package three.animation -import info.laht.threekt.core.Object3D +import three.core.Object3D external class AnimationAction( mixer: AnimationMixer, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/animation/AnimationClip.kt b/visionforge-threejs/src/main/kotlin/three/animation/AnimationClip.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/animation/AnimationClip.kt rename to visionforge-threejs/src/main/kotlin/three/animation/AnimationClip.kt index 262f02dc..dfb1df5a 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/animation/AnimationClip.kt +++ b/visionforge-threejs/src/main/kotlin/three/animation/AnimationClip.kt @@ -1,7 +1,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.animation +package three.animation /** * An AnimationClip is a reusable set of keyframe tracks which represent an animation. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/animation/AnimationMixer.kt b/visionforge-threejs/src/main/kotlin/three/animation/AnimationMixer.kt similarity index 92% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/animation/AnimationMixer.kt rename to visionforge-threejs/src/main/kotlin/three/animation/AnimationMixer.kt index 383f88f7..45932e59 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/animation/AnimationMixer.kt +++ b/visionforge-threejs/src/main/kotlin/three/animation/AnimationMixer.kt @@ -1,9 +1,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.animation +package three.animation -import info.laht.threekt.core.Object3D +import three.core.Object3D /** * The AnimationMixer is a player for animations on a particular object in the scene. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/animation/AnimationUtils.kt b/visionforge-threejs/src/main/kotlin/three/animation/AnimationUtils.kt similarity index 70% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/animation/AnimationUtils.kt rename to visionforge-threejs/src/main/kotlin/three/animation/AnimationUtils.kt index 34a9633b..c0e05b3a 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/animation/AnimationUtils.kt +++ b/visionforge-threejs/src/main/kotlin/three/animation/AnimationUtils.kt @@ -1,7 +1,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.animation +package three.animation external object AnimationUtils { //TODO diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/animation/KeyFrameTrack.kt b/visionforge-threejs/src/main/kotlin/three/animation/KeyFrameTrack.kt similarity index 95% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/animation/KeyFrameTrack.kt rename to visionforge-threejs/src/main/kotlin/three/animation/KeyFrameTrack.kt index 478fd1f6..2f3f3436 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/animation/KeyFrameTrack.kt +++ b/visionforge-threejs/src/main/kotlin/three/animation/KeyFrameTrack.kt @@ -1,7 +1,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.animation +package three.animation import org.khronos.webgl.Float32Array diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/audio/Audio.kt b/visionforge-threejs/src/main/kotlin/three/audio/Audio.kt similarity index 99% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/audio/Audio.kt rename to visionforge-threejs/src/main/kotlin/three/audio/Audio.kt index f6266c41..95918ede 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/audio/Audio.kt +++ b/visionforge-threejs/src/main/kotlin/three/audio/Audio.kt @@ -1,7 +1,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.audio +package three.audio /** * Create a non-positional ( global ) audio object. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/audio/AudioContext.kt b/visionforge-threejs/src/main/kotlin/three/audio/AudioContext.kt similarity index 94% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/audio/AudioContext.kt rename to visionforge-threejs/src/main/kotlin/three/audio/AudioContext.kt index 3bccd0ac..3908a548 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/audio/AudioContext.kt +++ b/visionforge-threejs/src/main/kotlin/three/audio/AudioContext.kt @@ -1,7 +1,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.audio +package three.audio /** * This contains methods for setting up an AudioContext. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/audio/AudioListener.kt b/visionforge-threejs/src/main/kotlin/three/audio/AudioListener.kt similarity index 89% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/audio/AudioListener.kt rename to visionforge-threejs/src/main/kotlin/three/audio/AudioListener.kt index e99b9b13..cbdb06f1 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/audio/AudioListener.kt +++ b/visionforge-threejs/src/main/kotlin/three/audio/AudioListener.kt @@ -1,9 +1,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.audio +package three.audio -import info.laht.threekt.core.Object3D +import three.core.Object3D /** * Create a non-positional ( global ) audio object. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/audio/PositionalAudio.kt b/visionforge-threejs/src/main/kotlin/three/audio/PositionalAudio.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/audio/PositionalAudio.kt rename to visionforge-threejs/src/main/kotlin/three/audio/PositionalAudio.kt index 19c17bea..7c1006f4 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/audio/PositionalAudio.kt +++ b/visionforge-threejs/src/main/kotlin/three/audio/PositionalAudio.kt @@ -1,7 +1,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.audio +package three.audio /** * Create a positional audio object. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/cameras/Camera.kt b/visionforge-threejs/src/main/kotlin/three/cameras/Camera.kt similarity index 94% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/cameras/Camera.kt rename to visionforge-threejs/src/main/kotlin/three/cameras/Camera.kt index 6ab80298..5f1ba54f 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/cameras/Camera.kt +++ b/visionforge-threejs/src/main/kotlin/three/cameras/Camera.kt @@ -25,11 +25,11 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.cameras +package three.cameras -import info.laht.threekt.core.Object3D -import info.laht.threekt.math.Matrix4 -import info.laht.threekt.math.Vector3 +import three.core.Object3D +import three.math.Matrix4 +import three.math.Vector3 external interface View { var enabled: Boolean diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/cameras/OrthographicCamera.kt b/visionforge-threejs/src/main/kotlin/three/cameras/OrthographicCamera.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/cameras/OrthographicCamera.kt rename to visionforge-threejs/src/main/kotlin/three/cameras/OrthographicCamera.kt index 320d71b5..706c8746 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/cameras/OrthographicCamera.kt +++ b/visionforge-threejs/src/main/kotlin/three/cameras/OrthographicCamera.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.cameras +package three.cameras external class OrthographicCamera( varleft: Int, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/cameras/PerspectiveCamera.kt b/visionforge-threejs/src/main/kotlin/three/cameras/PerspectiveCamera.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/cameras/PerspectiveCamera.kt rename to visionforge-threejs/src/main/kotlin/three/cameras/PerspectiveCamera.kt index 4deee300..a5b12de8 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/cameras/PerspectiveCamera.kt +++ b/visionforge-threejs/src/main/kotlin/three/cameras/PerspectiveCamera.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.cameras +package three.cameras external class PerspectiveCamera(fov: Int, aspect: Double, near: Number, far: Number) : Camera { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/core/BufferAttribute.kt b/visionforge-threejs/src/main/kotlin/three/core/BufferAttribute.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/core/BufferAttribute.kt rename to visionforge-threejs/src/main/kotlin/three/core/BufferAttribute.kt index 6a773330..e045b2d6 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/core/BufferAttribute.kt +++ b/visionforge-threejs/src/main/kotlin/three/core/BufferAttribute.kt @@ -25,12 +25,12 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.core +package three.core -import info.laht.threekt.math.Color -import info.laht.threekt.math.Vector2 -import info.laht.threekt.math.Vector3 -import info.laht.threekt.math.Vector4 +import three.math.Color +import three.math.Vector2 +import three.math.Vector3 +import three.math.Vector4 abstract external class BufferAttribute protected constructor( array: dynamic, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/core/BufferGeometry.kt b/visionforge-threejs/src/main/kotlin/three/core/BufferGeometry.kt similarity index 95% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/core/BufferGeometry.kt rename to visionforge-threejs/src/main/kotlin/three/core/BufferGeometry.kt index 251627a7..5038aee7 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/core/BufferGeometry.kt +++ b/visionforge-threejs/src/main/kotlin/three/core/BufferGeometry.kt @@ -25,12 +25,12 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.core +package three.core -import info.laht.threekt.math.Box3 -import info.laht.threekt.math.Matrix4 -import info.laht.threekt.math.Sphere -import info.laht.threekt.math.Vector3 +import three.math.Box3 +import three.math.Matrix4 +import three.math.Sphere +import three.math.Vector3 /** * This class is an efficient alternative to Geometry, because it stores all data, including vertex positions, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/core/Clock.kt b/visionforge-threejs/src/main/kotlin/three/core/Clock.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/core/Clock.kt rename to visionforge-threejs/src/main/kotlin/three/core/Clock.kt index 8cce902c..e5925f56 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/core/Clock.kt +++ b/visionforge-threejs/src/main/kotlin/three/core/Clock.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.core +package three.core /** * Object for keeping track of time. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/core/EventDispatcher.kt b/visionforge-threejs/src/main/kotlin/three/core/EventDispatcher.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/core/EventDispatcher.kt rename to visionforge-threejs/src/main/kotlin/three/core/EventDispatcher.kt index 459da88b..1646775e 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/core/EventDispatcher.kt +++ b/visionforge-threejs/src/main/kotlin/three/core/EventDispatcher.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.core +package three.core external open class EventDispatcher { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/core/Face3.kt b/visionforge-threejs/src/main/kotlin/three/core/Face3.kt similarity index 94% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/core/Face3.kt rename to visionforge-threejs/src/main/kotlin/three/core/Face3.kt index ff48d022..a7ec7f0b 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/core/Face3.kt +++ b/visionforge-threejs/src/main/kotlin/three/core/Face3.kt @@ -25,10 +25,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.core +package three.core -import info.laht.threekt.math.Color -import info.laht.threekt.math.Vector3 +import three.math.Color +import three.math.Vector3 external class Face3 { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/core/InstancedBufferGeometry.kt b/visionforge-threejs/src/main/kotlin/three/core/InstancedBufferGeometry.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/core/InstancedBufferGeometry.kt rename to visionforge-threejs/src/main/kotlin/three/core/InstancedBufferGeometry.kt index 92137432..99c4df70 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/core/InstancedBufferGeometry.kt +++ b/visionforge-threejs/src/main/kotlin/three/core/InstancedBufferGeometry.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.core +package three.core external class InstancedBufferGeometry : BufferGeometry { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/core/Layers.kt b/visionforge-threejs/src/main/kotlin/three/core/Layers.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/core/Layers.kt rename to visionforge-threejs/src/main/kotlin/three/core/Layers.kt index 503878d1..6d29399c 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/core/Layers.kt +++ b/visionforge-threejs/src/main/kotlin/three/core/Layers.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.core +package three.core /** * A Layers object assigns an Object3D to 1 or more of 32 layers numbered 0 to 31 - internally the diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/core/Object3D.kt b/visionforge-threejs/src/main/kotlin/three/core/Object3D.kt similarity index 99% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/core/Object3D.kt rename to visionforge-threejs/src/main/kotlin/three/core/Object3D.kt index e49add5e..86739f76 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/core/Object3D.kt +++ b/visionforge-threejs/src/main/kotlin/three/core/Object3D.kt @@ -26,9 +26,9 @@ @file:JsNonModule -package info.laht.threekt.core +package three.core -import info.laht.threekt.math.* +import three.math.* /** * This is the base class for most objects in three.js and provides a set of properties and methods for manipulating objects in 3D space. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/core/Raycaster.kt b/visionforge-threejs/src/main/kotlin/three/core/Raycaster.kt similarity index 91% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/core/Raycaster.kt rename to visionforge-threejs/src/main/kotlin/three/core/Raycaster.kt index 2e2944af..e03844f6 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/core/Raycaster.kt +++ b/visionforge-threejs/src/main/kotlin/three/core/Raycaster.kt @@ -25,12 +25,12 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.core +package three.core -import info.laht.threekt.cameras.Camera -import info.laht.threekt.math.Ray -import info.laht.threekt.math.Vector2 -import info.laht.threekt.math.Vector3 +import three.cameras.Camera +import three.math.Ray +import three.math.Vector2 +import three.math.Vector3 external interface Params { var Mesh: dynamic diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/core/Uniform.kt b/visionforge-threejs/src/main/kotlin/three/core/Uniform.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/core/Uniform.kt rename to visionforge-threejs/src/main/kotlin/three/core/Uniform.kt index a92cdf2a..a2bef114 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/core/Uniform.kt +++ b/visionforge-threejs/src/main/kotlin/three/core/Uniform.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.core +package three.core external class Uniform { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/Detector.kt b/visionforge-threejs/src/main/kotlin/three/external/Detector.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/Detector.kt rename to visionforge-threejs/src/main/kotlin/three/external/Detector.kt index 716e5d74..3dc1ed28 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/Detector.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/Detector.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.external +package three.external import org.w3c.dom.Element diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/ImprovedNoise.kt b/visionforge-threejs/src/main/kotlin/three/external/ImprovedNoise.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/ImprovedNoise.kt rename to visionforge-threejs/src/main/kotlin/three/external/ImprovedNoise.kt index bc380022..4ee3942d 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/ImprovedNoise.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/ImprovedNoise.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.external +package three.external external object ImprovedNoise { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/SimplexNoise.kt b/visionforge-threejs/src/main/kotlin/three/external/SimplexNoise.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/SimplexNoise.kt rename to visionforge-threejs/src/main/kotlin/three/external/SimplexNoise.kt index f8ab5a82..6856c354 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/SimplexNoise.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/SimplexNoise.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.external +package three.external external object SimplexNoise { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/controls/FlyControls.kt b/visionforge-threejs/src/main/kotlin/three/external/controls/FlyControls.kt similarity index 94% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/controls/FlyControls.kt rename to visionforge-threejs/src/main/kotlin/three/external/controls/FlyControls.kt index 11e25207..77de67e0 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/controls/FlyControls.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/controls/FlyControls.kt @@ -25,10 +25,10 @@ @file:JsModule("three/examples/jsm/controls/FlyControls.js") @file:JsNonModule -package info.laht.threekt.external.controls +package three.external.controls -import info.laht.threekt.core.Object3D import org.w3c.dom.Node +import three.core.Object3D external class FlyControls(`object`: Object3D, domElement: Node = definedExternally) { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/controls/OrbitControls.kt b/visionforge-threejs/src/main/kotlin/three/external/controls/OrbitControls.kt similarity index 95% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/controls/OrbitControls.kt rename to visionforge-threejs/src/main/kotlin/three/external/controls/OrbitControls.kt index db7f2ac9..94223fc4 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/controls/OrbitControls.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/controls/OrbitControls.kt @@ -25,11 +25,11 @@ @file:JsModule("three/examples/jsm/controls/OrbitControls.js") @file:JsNonModule -package info.laht.threekt.external.controls +package three.external.controls -import info.laht.threekt.core.Object3D -import info.laht.threekt.math.Vector3 import org.w3c.dom.Node +import three.core.Object3D +import three.math.Vector3 /** * This set of controls performs orbiting, dollying (zooming), and panning. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/controls/TrackballControls.kt b/visionforge-threejs/src/main/kotlin/three/external/controls/TrackballControls.kt similarity index 90% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/controls/TrackballControls.kt rename to visionforge-threejs/src/main/kotlin/three/external/controls/TrackballControls.kt index b128553e..64998dc2 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/controls/TrackballControls.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/controls/TrackballControls.kt @@ -9,13 +9,13 @@ @file:JsModule("three/examples/jsm/controls/TrackballControls.js") @file:JsNonModule -package info.laht.threekt.external.controls +package three.external.controls -import info.laht.threekt.cameras.Camera -import info.laht.threekt.core.EventDispatcher -import info.laht.threekt.math.Vector3 import org.w3c.dom.HTMLElement import org.w3c.dom.Node +import three.cameras.Camera +import three.core.EventDispatcher +import three.math.Vector3 external interface `T$0` { var left: Number diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/controls/TransformControls.kt b/visionforge-threejs/src/main/kotlin/three/external/controls/TransformControls.kt similarity index 95% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/controls/TransformControls.kt rename to visionforge-threejs/src/main/kotlin/three/external/controls/TransformControls.kt index 0a1c7a43..e03da682 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/controls/TransformControls.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/controls/TransformControls.kt @@ -25,10 +25,10 @@ @file:JsModule("three/examples/jsm/controls/TransformControls.js") @file:JsNonModule -package info.laht.threekt.external.controls +package three.external.controls -import info.laht.threekt.core.Object3D import org.w3c.dom.Node +import three.core.Object3D external class TransformControls(`object`: Object3D, domElement: Node = definedExternally) : Object3D { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/exporters/OBJExporter.kt b/visionforge-threejs/src/main/kotlin/three/external/exporters/OBJExporter.kt similarity index 93% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/exporters/OBJExporter.kt rename to visionforge-threejs/src/main/kotlin/three/external/exporters/OBJExporter.kt index 36eefa9f..843a9f72 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/exporters/OBJExporter.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/exporters/OBJExporter.kt @@ -25,9 +25,9 @@ @file:JsModule("three/examples/jsm/exporters/OBJExporter.js") @file:JsNonModule -package info.laht.threekt.external.exporters +package three.external.exporters -import info.laht.threekt.core.Object3D +import three.core.Object3D external class OBJExporter { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/exporters/STLExporter.kt b/visionforge-threejs/src/main/kotlin/three/external/exporters/STLExporter.kt similarity index 94% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/exporters/STLExporter.kt rename to visionforge-threejs/src/main/kotlin/three/external/exporters/STLExporter.kt index 4c6e3fb1..a89c1179 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/exporters/STLExporter.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/exporters/STLExporter.kt @@ -25,10 +25,10 @@ @file:JsModule("three/examples/jsm/exporters/STLExporter.js") @file:JsNonModule -package info.laht.threekt.external.exporters +package three.external.exporters -import info.laht.threekt.core.Object3D import org.khronos.webgl.DataView +import three.core.Object3D external class STLExporter { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/geometries/ConvexGeometry.kt b/visionforge-threejs/src/main/kotlin/three/external/geometries/ConvexGeometry.kt similarity index 61% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/geometries/ConvexGeometry.kt rename to visionforge-threejs/src/main/kotlin/three/external/geometries/ConvexGeometry.kt index cbc0fbb5..6c981460 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/geometries/ConvexGeometry.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/geometries/ConvexGeometry.kt @@ -1,10 +1,10 @@ @file:JsModule("three/examples/jsm/geometries/ConvexGeometry.js") @file:JsNonModule -package info.laht.threekt.external.geometries +package three.external.geometries -import info.laht.threekt.core.BufferGeometry -import info.laht.threekt.math.Vector3 +import three.core.BufferGeometry +import three.math.Vector3 external class ConvexGeometry(points: Array) : BufferGeometry diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/libs/GUIParams.kt b/visionforge-threejs/src/main/kotlin/three/external/libs/GUIParams.kt similarity index 93% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/libs/GUIParams.kt rename to visionforge-threejs/src/main/kotlin/three/external/libs/GUIParams.kt index 13d08a29..4b48bcc2 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/libs/GUIParams.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/libs/GUIParams.kt @@ -1,4 +1,4 @@ -package info.laht.threekt.external.libs +package three.external.libs /** * @param name The name of this GUI diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/libs/Stats.kt b/visionforge-threejs/src/main/kotlin/three/external/libs/Stats.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/libs/Stats.kt rename to visionforge-threejs/src/main/kotlin/three/external/libs/Stats.kt index a6c2e86f..fd72886e 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/libs/Stats.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/libs/Stats.kt @@ -25,7 +25,7 @@ @file:JsModule("three/examples/jsm/libs/stats.module.js") @file:JsNonModule -package info.laht.threekt.external.libs +package three.external.libs import org.w3c.dom.Node diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/libs/datgui.kt b/visionforge-threejs/src/main/kotlin/three/external/libs/datgui.kt similarity index 99% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/libs/datgui.kt rename to visionforge-threejs/src/main/kotlin/three/external/libs/datgui.kt index c3496ea0..345d0cf5 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/libs/datgui.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/libs/datgui.kt @@ -24,7 +24,7 @@ @file:JsModule("three/examples/jsm/libs/dat.gui.module.js") @file:JsNonModule -package info.laht.threekt.external.libs +package three.external.libs import org.w3c.dom.Element diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/loaders/BabylonLoader.kt b/visionforge-threejs/src/main/kotlin/three/external/loaders/BabylonLoader.kt similarity index 93% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/loaders/BabylonLoader.kt rename to visionforge-threejs/src/main/kotlin/three/external/loaders/BabylonLoader.kt index 2eae2988..437beba6 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/loaders/BabylonLoader.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/loaders/BabylonLoader.kt @@ -25,11 +25,11 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.external.loaders +package three.external.loaders -import info.laht.threekt.core.Object3D -import info.laht.threekt.loaders.LoadingManager import org.w3c.xhr.XMLHttpRequest +import three.core.Object3D +import three.loaders.LoadingManager external class BabylonLoader( manager: LoadingManager = definedExternally diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/loaders/GLTFLoader.kt b/visionforge-threejs/src/main/kotlin/three/external/loaders/GLTFLoader.kt similarity index 89% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/loaders/GLTFLoader.kt rename to visionforge-threejs/src/main/kotlin/three/external/loaders/GLTFLoader.kt index e353372e..40fdd556 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/loaders/GLTFLoader.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/loaders/GLTFLoader.kt @@ -1,14 +1,14 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.external.loaders +package three.external.loaders -import info.laht.threekt.animation.AnimationClip -import info.laht.threekt.cameras.Camera -import info.laht.threekt.loaders.LoadingManager -import info.laht.threekt.scenes.Scene import org.khronos.webgl.ArrayBuffer import org.w3c.xhr.XMLHttpRequest +import three.animation.AnimationClip +import three.cameras.Camera +import three.loaders.LoadingManager +import three.scenes.Scene external interface GLTFOnLoadCallback { val animations: Array diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/loaders/LoaderSupport.kt b/visionforge-threejs/src/main/kotlin/three/external/loaders/LoaderSupport.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/loaders/LoaderSupport.kt rename to visionforge-threejs/src/main/kotlin/three/external/loaders/LoaderSupport.kt index de1bafcd..5636fdc9 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/loaders/LoaderSupport.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/loaders/LoaderSupport.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.external.loaders +package three.external.loaders external object LoaderSupport { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/loaders/MTLLoader.kt b/visionforge-threejs/src/main/kotlin/three/external/loaders/MTLLoader.kt similarity index 92% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/loaders/MTLLoader.kt rename to visionforge-threejs/src/main/kotlin/three/external/loaders/MTLLoader.kt index 9af877f5..1eecd588 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/loaders/MTLLoader.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/loaders/MTLLoader.kt @@ -25,11 +25,11 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.external.loaders +package three.external.loaders -import info.laht.threekt.core.Object3D -import info.laht.threekt.loaders.LoadingManager import org.w3c.xhr.XMLHttpRequest +import three.core.Object3D +import three.loaders.LoadingManager external class MTLLoader( loadingManager: LoadingManager = definedExternally diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/loaders/OBJLoader.kt b/visionforge-threejs/src/main/kotlin/three/external/loaders/OBJLoader.kt similarity index 91% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/loaders/OBJLoader.kt rename to visionforge-threejs/src/main/kotlin/three/external/loaders/OBJLoader.kt index ff4f2150..0bddd83a 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/loaders/OBJLoader.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/loaders/OBJLoader.kt @@ -25,12 +25,12 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.external.loaders +package three.external.loaders -import info.laht.threekt.core.Object3D -import info.laht.threekt.loaders.LoadingManager -import info.laht.threekt.objects.Mesh import org.w3c.xhr.XMLHttpRequest +import three.core.Object3D +import three.loaders.LoadingManager +import three.objects.Mesh /** * A loader for loading a .obj resource. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/loaders/OBJLoader2.kt b/visionforge-threejs/src/main/kotlin/three/external/loaders/OBJLoader2.kt similarity index 94% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/loaders/OBJLoader2.kt rename to visionforge-threejs/src/main/kotlin/three/external/loaders/OBJLoader2.kt index 009e5e81..e12ad3fe 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/loaders/OBJLoader2.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/loaders/OBJLoader2.kt @@ -25,11 +25,11 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.external.loaders +package three.external.loaders -import info.laht.threekt.loaders.LoadingManager -import info.laht.threekt.objects.Mesh import org.w3c.xhr.XMLHttpRequest +import three.loaders.LoadingManager +import three.objects.Mesh external interface Detail { var loaderRootNode: Mesh diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/loaders/STLLoader.kt b/visionforge-threejs/src/main/kotlin/three/external/loaders/STLLoader.kt similarity index 92% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/loaders/STLLoader.kt rename to visionforge-threejs/src/main/kotlin/three/external/loaders/STLLoader.kt index 707fdc0c..5fa253ab 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/loaders/STLLoader.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/loaders/STLLoader.kt @@ -25,11 +25,11 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.external.loaders +package three.external.loaders -import info.laht.threekt.core.BufferGeometry -import info.laht.threekt.core.Object3D import org.w3c.xhr.XMLHttpRequest +import three.core.BufferGeometry +import three.core.Object3D external class STLLoader { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/objects/Sky.kt b/visionforge-threejs/src/main/kotlin/three/external/objects/Sky.kt similarity index 91% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/objects/Sky.kt rename to visionforge-threejs/src/main/kotlin/three/external/objects/Sky.kt index 47ad39ef..c7272138 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/objects/Sky.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/objects/Sky.kt @@ -25,8 +25,8 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.external.objects +package three.external.objects -import info.laht.threekt.objects.Mesh +import three.objects.Mesh external class Sky : Mesh \ No newline at end of file diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/objects/Water.kt b/visionforge-threejs/src/main/kotlin/three/external/objects/Water.kt similarity index 91% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/objects/Water.kt rename to visionforge-threejs/src/main/kotlin/three/external/objects/Water.kt index 9ad3f043..9a886a95 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/objects/Water.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/objects/Water.kt @@ -25,8 +25,8 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.external.objects +package three.external.objects -import info.laht.threekt.objects.Mesh +import three.objects.Mesh external class Water(width: Int, height: Int, options: WaterOptions = definedExternally) : Mesh \ No newline at end of file diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/objects/WaterOptions.kt b/visionforge-threejs/src/main/kotlin/three/external/objects/WaterOptions.kt similarity index 93% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/external/objects/WaterOptions.kt rename to visionforge-threejs/src/main/kotlin/three/external/objects/WaterOptions.kt index 74434846..498f9883 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/external/objects/WaterOptions.kt +++ b/visionforge-threejs/src/main/kotlin/three/external/objects/WaterOptions.kt @@ -22,10 +22,10 @@ * THE SOFTWARE. */ -package info.laht.threekt.external.objects +package three.external.objects -import info.laht.threekt.math.Vector3 -import info.laht.threekt.textures.Texture +import three.math.Vector3 +import three.textures.Texture data class WaterOptions( diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/SceneUtils.kt b/visionforge-threejs/src/main/kotlin/three/extras/SceneUtils.kt similarity index 87% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/SceneUtils.kt rename to visionforge-threejs/src/main/kotlin/three/extras/SceneUtils.kt index fb4338fd..1ad837d0 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/SceneUtils.kt +++ b/visionforge-threejs/src/main/kotlin/three/extras/SceneUtils.kt @@ -1,13 +1,13 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.extras +package three.extras -import info.laht.threekt.core.BufferGeometry -import info.laht.threekt.core.Object3D -import info.laht.threekt.materials.Material -import info.laht.threekt.objects.Group -import info.laht.threekt.scenes.Scene +import three.core.BufferGeometry +import three.core.Object3D +import three.materials.Material +import three.objects.Group +import three.scenes.Scene /** * A class containing useful utility functions for scene manipulation. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/core/Curve.kt b/visionforge-threejs/src/main/kotlin/three/extras/core/Curve.kt similarity index 94% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/core/Curve.kt rename to visionforge-threejs/src/main/kotlin/three/extras/core/Curve.kt index f5a8ced6..4b688b1a 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/core/Curve.kt +++ b/visionforge-threejs/src/main/kotlin/three/extras/core/Curve.kt @@ -1,7 +1,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.extras.core +package three.extras.core external abstract class Curve { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/core/CurvePath.kt b/visionforge-threejs/src/main/kotlin/three/extras/core/CurvePath.kt similarity index 89% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/core/CurvePath.kt rename to visionforge-threejs/src/main/kotlin/three/extras/core/CurvePath.kt index 18ae2165..5a05ab14 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/core/CurvePath.kt +++ b/visionforge-threejs/src/main/kotlin/three/extras/core/CurvePath.kt @@ -1,7 +1,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.extras.core +package three.extras.core open external class CurvePath : Curve { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/core/Path.kt b/visionforge-threejs/src/main/kotlin/three/extras/core/Path.kt similarity index 61% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/core/Path.kt rename to visionforge-threejs/src/main/kotlin/three/extras/core/Path.kt index 7b944a7c..bd78a31d 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/core/Path.kt +++ b/visionforge-threejs/src/main/kotlin/three/extras/core/Path.kt @@ -1,9 +1,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.extras.core +package three.extras.core -import info.laht.threekt.math.Vector2 +import three.math.Vector2 open external class Path : CurvePath { diff --git a/visionforge-threejs/src/main/kotlin/three/extras/core/Shape.kt b/visionforge-threejs/src/main/kotlin/three/extras/core/Shape.kt new file mode 100644 index 00000000..d05486b5 --- /dev/null +++ b/visionforge-threejs/src/main/kotlin/three/extras/core/Shape.kt @@ -0,0 +1,8 @@ +@file:JsModule("three") +@file:JsNonModule + +package three.extras.core + +import three.math.Vector2 + +external class Shape(points: Array) : Path \ No newline at end of file diff --git a/visionforge-threejs/src/main/kotlin/three/extras/core/ShapePath.kt b/visionforge-threejs/src/main/kotlin/three/extras/core/ShapePath.kt new file mode 100644 index 00000000..5ea28758 --- /dev/null +++ b/visionforge-threejs/src/main/kotlin/three/extras/core/ShapePath.kt @@ -0,0 +1,6 @@ +@file:JsModule("three") +@file:JsNonModule + +package three.extras.core + +external class ShapePath \ No newline at end of file diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/ArcCurve.kt b/visionforge-threejs/src/main/kotlin/three/extras/curves/ArcCurve.kt similarity index 91% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/ArcCurve.kt rename to visionforge-threejs/src/main/kotlin/three/extras/curves/ArcCurve.kt index a6f2d172..c3891ff1 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/ArcCurve.kt +++ b/visionforge-threejs/src/main/kotlin/three/extras/curves/ArcCurve.kt @@ -1,7 +1,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.extras.curves +package three.extras.curves external class ArcCurve( aX: Number = definedExternally, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/CatmullRomCurve3.kt b/visionforge-threejs/src/main/kotlin/three/extras/curves/CatmullRomCurve3.kt similarity index 79% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/CatmullRomCurve3.kt rename to visionforge-threejs/src/main/kotlin/three/extras/curves/CatmullRomCurve3.kt index 93a5d931..e968cfb0 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/CatmullRomCurve3.kt +++ b/visionforge-threejs/src/main/kotlin/three/extras/curves/CatmullRomCurve3.kt @@ -1,10 +1,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.extras.curves +package three.extras.curves -import info.laht.threekt.extras.core.Curve -import info.laht.threekt.math.Vector3 +import three.extras.core.Curve +import three.math.Vector3 external class CatmullRomCurve3( diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/EllipseCurve.kt b/visionforge-threejs/src/main/kotlin/three/extras/curves/EllipseCurve.kt similarity index 85% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/EllipseCurve.kt rename to visionforge-threejs/src/main/kotlin/three/extras/curves/EllipseCurve.kt index d3ead4c5..dbcaec3f 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/EllipseCurve.kt +++ b/visionforge-threejs/src/main/kotlin/three/extras/curves/EllipseCurve.kt @@ -1,10 +1,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.extras.curves +package three.extras.curves -import info.laht.threekt.extras.core.Curve -import info.laht.threekt.math.Vector2 +import three.extras.core.Curve +import three.math.Vector2 open external class EllipseCurve( aX: Number = definedExternally, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/LineCurve.kt b/visionforge-threejs/src/main/kotlin/three/extras/curves/LineCurve.kt similarity index 66% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/LineCurve.kt rename to visionforge-threejs/src/main/kotlin/three/extras/curves/LineCurve.kt index ca9dc41b..74c2d239 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/LineCurve.kt +++ b/visionforge-threejs/src/main/kotlin/three/extras/curves/LineCurve.kt @@ -1,10 +1,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.extras.curves +package three.extras.curves -import info.laht.threekt.extras.core.Curve -import info.laht.threekt.math.Vector2 +import three.extras.core.Curve +import three.math.Vector2 external class LineCurve( v1: Vector2 = definedExternally, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/LineCurve3.kt b/visionforge-threejs/src/main/kotlin/three/extras/curves/LineCurve3.kt similarity index 67% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/LineCurve3.kt rename to visionforge-threejs/src/main/kotlin/three/extras/curves/LineCurve3.kt index 90218d60..68f14b72 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/LineCurve3.kt +++ b/visionforge-threejs/src/main/kotlin/three/extras/curves/LineCurve3.kt @@ -1,10 +1,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.extras.curves +package three.extras.curves -import info.laht.threekt.extras.core.Curve -import info.laht.threekt.math.Vector3 +import three.extras.core.Curve +import three.math.Vector3 external class LineCurve3( v1: Vector3 = definedExternally, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/QuadricBezierCurve.kt b/visionforge-threejs/src/main/kotlin/three/extras/curves/QuadricBezierCurve.kt similarity index 74% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/QuadricBezierCurve.kt rename to visionforge-threejs/src/main/kotlin/three/extras/curves/QuadricBezierCurve.kt index aa7b2a95..849b41c0 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/QuadricBezierCurve.kt +++ b/visionforge-threejs/src/main/kotlin/three/extras/curves/QuadricBezierCurve.kt @@ -1,10 +1,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.extras.curves +package three.extras.curves -import info.laht.threekt.extras.core.Curve -import info.laht.threekt.math.Vector2 +import three.extras.core.Curve +import three.math.Vector2 external class QuadricBezierCurve : Curve { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/QuadricBezierCurve3.kt b/visionforge-threejs/src/main/kotlin/three/extras/curves/QuadricBezierCurve3.kt similarity index 74% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/QuadricBezierCurve3.kt rename to visionforge-threejs/src/main/kotlin/three/extras/curves/QuadricBezierCurve3.kt index b4b30426..0da5444f 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/QuadricBezierCurve3.kt +++ b/visionforge-threejs/src/main/kotlin/three/extras/curves/QuadricBezierCurve3.kt @@ -1,10 +1,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.extras.curves +package three.extras.curves -import info.laht.threekt.extras.core.Curve -import info.laht.threekt.math.Vector3 +import three.extras.core.Curve +import three.math.Vector3 external class QuadricBezierCurve3 : Curve { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/SplineCurve.kt b/visionforge-threejs/src/main/kotlin/three/extras/curves/SplineCurve.kt similarity index 67% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/SplineCurve.kt rename to visionforge-threejs/src/main/kotlin/three/extras/curves/SplineCurve.kt index df3fb8cd..357cf50f 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/extras/curves/SplineCurve.kt +++ b/visionforge-threejs/src/main/kotlin/three/extras/curves/SplineCurve.kt @@ -1,10 +1,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.extras.curves +package three.extras.curves -import info.laht.threekt.extras.core.Curve -import info.laht.threekt.math.Vector2 +import three.extras.core.Curve +import three.math.Vector2 external class SplineCurve( points: Array = definedExternally diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/BoxGeometry.kt b/visionforge-threejs/src/main/kotlin/three/geometries/BoxGeometry.kt similarity index 77% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/BoxGeometry.kt rename to visionforge-threejs/src/main/kotlin/three/geometries/BoxGeometry.kt index 8d0e5ec5..d80a96a2 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/BoxGeometry.kt +++ b/visionforge-threejs/src/main/kotlin/three/geometries/BoxGeometry.kt @@ -1,9 +1,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.geometries +package three.geometries -import info.laht.threekt.core.BufferGeometry +import three.core.BufferGeometry external class BoxGeometry( diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/ConeGeometry.kt b/visionforge-threejs/src/main/kotlin/three/geometries/ConeGeometry.kt similarity index 79% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/ConeGeometry.kt rename to visionforge-threejs/src/main/kotlin/three/geometries/ConeGeometry.kt index f98ad2dd..7492d5ec 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/ConeGeometry.kt +++ b/visionforge-threejs/src/main/kotlin/three/geometries/ConeGeometry.kt @@ -1,9 +1,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.geometries +package three.geometries -import info.laht.threekt.core.BufferGeometry +import three.core.BufferGeometry external class ConeGeometry( diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/CylinderGeometry.kt b/visionforge-threejs/src/main/kotlin/three/geometries/CylinderGeometry.kt similarity index 78% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/CylinderGeometry.kt rename to visionforge-threejs/src/main/kotlin/three/geometries/CylinderGeometry.kt index b10e5c11..f2f1160c 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/CylinderGeometry.kt +++ b/visionforge-threejs/src/main/kotlin/three/geometries/CylinderGeometry.kt @@ -1,9 +1,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.geometries +package three.geometries -import info.laht.threekt.core.BufferGeometry +import three.core.BufferGeometry external class CylinderGeometry( radiusTop: Number, diff --git a/visionforge-threejs/src/main/kotlin/three/geometries/EdgesGeometry.kt b/visionforge-threejs/src/main/kotlin/three/geometries/EdgesGeometry.kt new file mode 100644 index 00000000..fe53213e --- /dev/null +++ b/visionforge-threejs/src/main/kotlin/three/geometries/EdgesGeometry.kt @@ -0,0 +1,8 @@ +@file:JsModule("three") +@file:JsNonModule + +package three.geometries + +import three.core.BufferGeometry + +public external class EdgesGeometry(geometry: BufferGeometry, thresholdAngle: Int = definedExternally) : BufferGeometry \ No newline at end of file diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/ExtrudeGeometry.kt b/visionforge-threejs/src/main/kotlin/three/geometries/ExtrudeGeometry.kt similarity index 92% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/ExtrudeGeometry.kt rename to visionforge-threejs/src/main/kotlin/three/geometries/ExtrudeGeometry.kt index 4b30e7af..5c256878 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/ExtrudeGeometry.kt +++ b/visionforge-threejs/src/main/kotlin/three/geometries/ExtrudeGeometry.kt @@ -8,11 +8,11 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.geometries +package three.geometries -import info.laht.threekt.core.BufferGeometry -import info.laht.threekt.extras.core.Shape -import info.laht.threekt.math.Vector2 +import three.core.BufferGeometry +import three.extras.core.Shape +import three.math.Vector2 external interface ExtrudeGeometryOptions { var curveSegments: Number? diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/PlaneGeometry.kt b/visionforge-threejs/src/main/kotlin/three/geometries/PlaneGeometry.kt similarity index 67% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/PlaneGeometry.kt rename to visionforge-threejs/src/main/kotlin/three/geometries/PlaneGeometry.kt index 0b1072ef..aff535a2 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/PlaneGeometry.kt +++ b/visionforge-threejs/src/main/kotlin/three/geometries/PlaneGeometry.kt @@ -1,9 +1,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.geometries +package three.geometries -import info.laht.threekt.core.BufferGeometry +import three.core.BufferGeometry external class PlaneGeometry( diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/SphereGeometry.kt b/visionforge-threejs/src/main/kotlin/three/geometries/SphereGeometry.kt similarity index 78% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/SphereGeometry.kt rename to visionforge-threejs/src/main/kotlin/three/geometries/SphereGeometry.kt index 5b0c9fc6..2b9e5279 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/SphereGeometry.kt +++ b/visionforge-threejs/src/main/kotlin/three/geometries/SphereGeometry.kt @@ -1,9 +1,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.geometries +package three.geometries -import info.laht.threekt.core.BufferGeometry +import three.core.BufferGeometry external class SphereGeometry( radius: Number, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/TextGeometry.kt b/visionforge-threejs/src/main/kotlin/three/geometries/TextGeometry.kt similarity index 96% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/TextGeometry.kt rename to visionforge-threejs/src/main/kotlin/three/geometries/TextGeometry.kt index b8c935f3..aab53955 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/TextGeometry.kt +++ b/visionforge-threejs/src/main/kotlin/three/geometries/TextGeometry.kt @@ -1,7 +1,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.geometries +package three.geometries external interface TextGeometryParameters { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/TorusGeometry.kt b/visionforge-threejs/src/main/kotlin/three/geometries/TorusGeometry.kt similarity index 73% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/TorusGeometry.kt rename to visionforge-threejs/src/main/kotlin/three/geometries/TorusGeometry.kt index 0a53525f..493b7984 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/TorusGeometry.kt +++ b/visionforge-threejs/src/main/kotlin/three/geometries/TorusGeometry.kt @@ -1,9 +1,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.geometries +package three.geometries -import info.laht.threekt.core.BufferGeometry +import three.core.BufferGeometry external class TorusGeometry( diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/TubeGeometry.kt b/visionforge-threejs/src/main/kotlin/three/geometries/TubeGeometry.kt similarity index 72% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/TubeGeometry.kt rename to visionforge-threejs/src/main/kotlin/three/geometries/TubeGeometry.kt index 36afa6ae..e1dc9a75 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/TubeGeometry.kt +++ b/visionforge-threejs/src/main/kotlin/three/geometries/TubeGeometry.kt @@ -1,8 +1,8 @@ -package info.laht.threekt.geometries +package three.geometries -import info.laht.threekt.core.BufferGeometry -import info.laht.threekt.extras.core.Curve -import info.laht.threekt.math.Vector3 +import three.core.BufferGeometry +import three.extras.core.Curve +import three.math.Vector3 /** diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/WireframeGeometry.kt b/visionforge-threejs/src/main/kotlin/three/geometries/WireframeGeometry.kt similarity index 68% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/WireframeGeometry.kt rename to visionforge-threejs/src/main/kotlin/three/geometries/WireframeGeometry.kt index f52c61cc..622ef80d 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/geometries/WireframeGeometry.kt +++ b/visionforge-threejs/src/main/kotlin/three/geometries/WireframeGeometry.kt @@ -1,9 +1,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.geometries +package three.geometries -import info.laht.threekt.core.BufferGeometry +import three.core.BufferGeometry /** * This can be used as a helper object to view a Geometry object as a wireframe. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/helpers/ArrowHelper.kt b/visionforge-threejs/src/main/kotlin/three/helpers/ArrowHelper.kt similarity index 87% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/helpers/ArrowHelper.kt rename to visionforge-threejs/src/main/kotlin/three/helpers/ArrowHelper.kt index ea1764dd..18c0d8de 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/helpers/ArrowHelper.kt +++ b/visionforge-threejs/src/main/kotlin/three/helpers/ArrowHelper.kt @@ -25,13 +25,13 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.helpers +package three.helpers -import info.laht.threekt.core.Object3D -import info.laht.threekt.math.Color -import info.laht.threekt.math.Vector3 -import info.laht.threekt.objects.Line -import info.laht.threekt.objects.Mesh +import three.core.Object3D +import three.math.Color +import three.math.Vector3 +import three.objects.Line +import three.objects.Mesh external class ArrowHelper( dir: Vector3, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/helpers/AxesHelper.kt b/visionforge-threejs/src/main/kotlin/three/helpers/AxesHelper.kt similarity index 92% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/helpers/AxesHelper.kt rename to visionforge-threejs/src/main/kotlin/three/helpers/AxesHelper.kt index d4b515be..5927991f 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/helpers/AxesHelper.kt +++ b/visionforge-threejs/src/main/kotlin/three/helpers/AxesHelper.kt @@ -25,9 +25,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.helpers +package three.helpers -import info.laht.threekt.objects.LineSegments +import three.objects.LineSegments external class AxesHelper( size: Int = definedExternally diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/helpers/Box3Helper.kt b/visionforge-threejs/src/main/kotlin/three/helpers/Box3Helper.kt similarity index 92% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/helpers/Box3Helper.kt rename to visionforge-threejs/src/main/kotlin/three/helpers/Box3Helper.kt index 27aef631..1eefb43b 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/helpers/Box3Helper.kt +++ b/visionforge-threejs/src/main/kotlin/three/helpers/Box3Helper.kt @@ -25,10 +25,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.helpers +package three.helpers -import info.laht.threekt.math.Box3 -import info.laht.threekt.objects.LineSegments +import three.math.Box3 +import three.objects.LineSegments /** * Helper object to visualize a Box3. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/helpers/CameraHelper.kt b/visionforge-threejs/src/main/kotlin/three/helpers/CameraHelper.kt similarity index 91% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/helpers/CameraHelper.kt rename to visionforge-threejs/src/main/kotlin/three/helpers/CameraHelper.kt index 6b199f3f..716f8234 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/helpers/CameraHelper.kt +++ b/visionforge-threejs/src/main/kotlin/three/helpers/CameraHelper.kt @@ -25,10 +25,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.helpers +package three.helpers -import info.laht.threekt.cameras.Camera -import info.laht.threekt.objects.LineSegments +import three.cameras.Camera +import three.objects.LineSegments external class CameraHelper( camera: Camera diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/helpers/GridHelper.kt b/visionforge-threejs/src/main/kotlin/three/helpers/GridHelper.kt similarity index 94% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/helpers/GridHelper.kt rename to visionforge-threejs/src/main/kotlin/three/helpers/GridHelper.kt index 0d987ae5..0c080ead 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/helpers/GridHelper.kt +++ b/visionforge-threejs/src/main/kotlin/three/helpers/GridHelper.kt @@ -25,9 +25,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.helpers +package three.helpers -import info.laht.threekt.objects.LineSegments +import three.objects.LineSegments external class GridHelper( size: Int = definedExternally, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/helpers/HemisphereLightHelper.kt b/visionforge-threejs/src/main/kotlin/three/helpers/HemisphereLightHelper.kt similarity index 91% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/helpers/HemisphereLightHelper.kt rename to visionforge-threejs/src/main/kotlin/three/helpers/HemisphereLightHelper.kt index 4351faa7..23f21837 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/helpers/HemisphereLightHelper.kt +++ b/visionforge-threejs/src/main/kotlin/three/helpers/HemisphereLightHelper.kt @@ -25,11 +25,11 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.helpers +package three.helpers -import info.laht.threekt.core.Object3D -import info.laht.threekt.lights.HemisphereLight -import info.laht.threekt.lights.Light +import three.core.Object3D +import three.lights.HemisphereLight +import three.lights.Light /** * Creates a visual aid consisting of a spherical Mesh for a HemisphereLight. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/helpers/PlaneHelper.kt b/visionforge-threejs/src/main/kotlin/three/helpers/PlaneHelper.kt similarity index 58% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/helpers/PlaneHelper.kt rename to visionforge-threejs/src/main/kotlin/three/helpers/PlaneHelper.kt index dbe6dc8d..338c9593 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/helpers/PlaneHelper.kt +++ b/visionforge-threejs/src/main/kotlin/three/helpers/PlaneHelper.kt @@ -1,10 +1,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.helpers +package three.helpers -import info.laht.threekt.math.Color -import info.laht.threekt.math.Plane -import info.laht.threekt.objects.LineSegments +import three.math.Color +import three.math.Plane +import three.objects.LineSegments /** * Helper object to visualize a [Plane]. diff --git a/visionforge-threejs/src/main/kotlin/three/ktutils.kt b/visionforge-threejs/src/main/kotlin/three/ktutils.kt new file mode 100644 index 00000000..d0735c84 --- /dev/null +++ b/visionforge-threejs/src/main/kotlin/three/ktutils.kt @@ -0,0 +1,9 @@ +@file:Suppress("FunctionName") + +package three + +import three.renderers.WebGLRenderer +import three.renderers.WebGLRendererParams + +fun WebGLRenderer(builder: WebGLRendererParams.() -> Unit): WebGLRenderer = + WebGLRenderer(WebGLRendererParams().apply(builder)) \ No newline at end of file diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/AmbientLight.kt b/visionforge-threejs/src/main/kotlin/three/lights/AmbientLight.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/AmbientLight.kt rename to visionforge-threejs/src/main/kotlin/three/lights/AmbientLight.kt index 0d2cae66..b5ddd88d 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/AmbientLight.kt +++ b/visionforge-threejs/src/main/kotlin/three/lights/AmbientLight.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.lights +package three.lights /** * This light globally illuminates all objects in the scene equally. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/DirectionalLight.kt b/visionforge-threejs/src/main/kotlin/three/lights/DirectionalLight.kt similarity index 94% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/DirectionalLight.kt rename to visionforge-threejs/src/main/kotlin/three/lights/DirectionalLight.kt index f85d3e24..482fd628 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/DirectionalLight.kt +++ b/visionforge-threejs/src/main/kotlin/three/lights/DirectionalLight.kt @@ -25,9 +25,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.lights +package three.lights -import info.laht.threekt.core.Object3D +import three.core.Object3D external class DirectionalLight( color: Int = definedExternally, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/DirectionalLightShadow.kt b/visionforge-threejs/src/main/kotlin/three/lights/DirectionalLightShadow.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/DirectionalLightShadow.kt rename to visionforge-threejs/src/main/kotlin/three/lights/DirectionalLightShadow.kt index e2886e0b..205c46bb 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/DirectionalLightShadow.kt +++ b/visionforge-threejs/src/main/kotlin/three/lights/DirectionalLightShadow.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.lights +package three.lights external class DirectionalLightShadow : LightShadow { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/HemisphereLight.kt b/visionforge-threejs/src/main/kotlin/three/lights/HemisphereLight.kt similarity index 95% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/HemisphereLight.kt rename to visionforge-threejs/src/main/kotlin/three/lights/HemisphereLight.kt index c98fbd5d..bf761479 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/HemisphereLight.kt +++ b/visionforge-threejs/src/main/kotlin/three/lights/HemisphereLight.kt @@ -25,9 +25,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.lights +package three.lights -import info.laht.threekt.math.Color +import three.math.Color /** * A light source positioned directly above the scene, with color fading from the sky color to the ground color. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/Light.kt b/visionforge-threejs/src/main/kotlin/three/lights/Light.kt similarity index 94% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/Light.kt rename to visionforge-threejs/src/main/kotlin/three/lights/Light.kt index 6ffd9a2d..d0c07d15 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/Light.kt +++ b/visionforge-threejs/src/main/kotlin/three/lights/Light.kt @@ -25,10 +25,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.lights +package three.lights -import info.laht.threekt.core.Object3D -import info.laht.threekt.math.Color +import three.core.Object3D +import three.math.Color /** * Abstract base class for lights - all other light types inherit the properties and methods described here. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/LightShadow.kt b/visionforge-threejs/src/main/kotlin/three/lights/LightShadow.kt similarity index 90% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/LightShadow.kt rename to visionforge-threejs/src/main/kotlin/three/lights/LightShadow.kt index ef62b843..b7fc1f12 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/LightShadow.kt +++ b/visionforge-threejs/src/main/kotlin/three/lights/LightShadow.kt @@ -25,11 +25,11 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.lights +package three.lights -import info.laht.threekt.cameras.Camera -import info.laht.threekt.math.Matrix4 -import info.laht.threekt.math.Vector2 +import three.cameras.Camera +import three.math.Matrix4 +import three.math.Vector2 open external class LightShadow(camera: Camera) { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/PointLight.kt b/visionforge-threejs/src/main/kotlin/three/lights/PointLight.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/PointLight.kt rename to visionforge-threejs/src/main/kotlin/three/lights/PointLight.kt index 6a708e58..9ff6627a 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/PointLight.kt +++ b/visionforge-threejs/src/main/kotlin/three/lights/PointLight.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.lights +package three.lights external class PointLight( color: Int = definedExternally, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/SpotLight.kt b/visionforge-threejs/src/main/kotlin/three/lights/SpotLight.kt similarity index 95% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/SpotLight.kt rename to visionforge-threejs/src/main/kotlin/three/lights/SpotLight.kt index 70c14e6a..ebd422f7 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/SpotLight.kt +++ b/visionforge-threejs/src/main/kotlin/three/lights/SpotLight.kt @@ -25,9 +25,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.lights +package three.lights -import info.laht.threekt.core.Object3D +import three.core.Object3D external class SpotLight( color: Int = definedExternally, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/SpotLightShadow.kt b/visionforge-threejs/src/main/kotlin/three/lights/SpotLightShadow.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/SpotLightShadow.kt rename to visionforge-threejs/src/main/kotlin/three/lights/SpotLightShadow.kt index 8d8e052f..14df1315 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/lights/SpotLightShadow.kt +++ b/visionforge-threejs/src/main/kotlin/three/lights/SpotLightShadow.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.lights +package three.lights external class SpotLightShadow : LightShadow { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/Cache.kt b/visionforge-threejs/src/main/kotlin/three/loaders/Cache.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/Cache.kt rename to visionforge-threejs/src/main/kotlin/three/loaders/Cache.kt index 1424d8e7..38278cf1 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/Cache.kt +++ b/visionforge-threejs/src/main/kotlin/three/loaders/Cache.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.loaders +package three.loaders external object Cache { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/CompressedTextureLoader.kt b/visionforge-threejs/src/main/kotlin/three/loaders/CompressedTextureLoader.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/CompressedTextureLoader.kt rename to visionforge-threejs/src/main/kotlin/three/loaders/CompressedTextureLoader.kt index 889c5d18..d827d4a5 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/CompressedTextureLoader.kt +++ b/visionforge-threejs/src/main/kotlin/three/loaders/CompressedTextureLoader.kt @@ -25,10 +25,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.loaders +package three.loaders -import info.laht.threekt.textures.Texture import org.w3c.xhr.XMLHttpRequest +import three.textures.Texture /** * Abstract base class for block based textures loader (dds, pvr, ...). diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/ImageLoader.kt b/visionforge-threejs/src/main/kotlin/three/loaders/ImageLoader.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/ImageLoader.kt rename to visionforge-threejs/src/main/kotlin/three/loaders/ImageLoader.kt index ade47d72..555f268b 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/ImageLoader.kt +++ b/visionforge-threejs/src/main/kotlin/three/loaders/ImageLoader.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.loaders +package three.loaders import org.w3c.dom.Element import org.w3c.xhr.XMLHttpRequest diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/JSONLoader.kt b/visionforge-threejs/src/main/kotlin/three/loaders/JSONLoader.kt similarity index 94% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/JSONLoader.kt rename to visionforge-threejs/src/main/kotlin/three/loaders/JSONLoader.kt index db38edb6..8871b540 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/JSONLoader.kt +++ b/visionforge-threejs/src/main/kotlin/three/loaders/JSONLoader.kt @@ -25,12 +25,12 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.loaders +package three.loaders -import info.laht.threekt.core.BufferGeometry -import info.laht.threekt.core.Object3D -import info.laht.threekt.materials.Material import org.w3c.xhr.XMLHttpRequest +import three.core.BufferGeometry +import three.core.Object3D +import three.materials.Material /** * A loader for loading objects in JSON format. This uses the FileLoader internally for loading files. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/Loader.kt b/visionforge-threejs/src/main/kotlin/three/loaders/Loader.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/Loader.kt rename to visionforge-threejs/src/main/kotlin/three/loaders/Loader.kt index 2d60ee93..d094b6d9 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/Loader.kt +++ b/visionforge-threejs/src/main/kotlin/three/loaders/Loader.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.loaders +package three.loaders /** * Base class for implementing loaders. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/LoadingManager.kt b/visionforge-threejs/src/main/kotlin/three/loaders/LoadingManager.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/LoadingManager.kt rename to visionforge-threejs/src/main/kotlin/three/loaders/LoadingManager.kt index ebf5d2bc..e9180dad 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/LoadingManager.kt +++ b/visionforge-threejs/src/main/kotlin/three/loaders/LoadingManager.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.loaders +package three.loaders external object DefaultLoadingManager : LoadingManager diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/MaterialLoader.kt b/visionforge-threejs/src/main/kotlin/three/loaders/MaterialLoader.kt similarity index 92% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/MaterialLoader.kt rename to visionforge-threejs/src/main/kotlin/three/loaders/MaterialLoader.kt index ef30c71f..f294ffd5 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/MaterialLoader.kt +++ b/visionforge-threejs/src/main/kotlin/three/loaders/MaterialLoader.kt @@ -25,11 +25,11 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.loaders +package three.loaders -import info.laht.threekt.materials.Material -import info.laht.threekt.textures.Texture import org.w3c.xhr.XMLHttpRequest +import three.materials.Material +import three.textures.Texture external class MaterialLoader { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/TextureLoader.kt b/visionforge-threejs/src/main/kotlin/three/loaders/TextureLoader.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/TextureLoader.kt rename to visionforge-threejs/src/main/kotlin/three/loaders/TextureLoader.kt index 5d57ab88..5ddac48b 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/loaders/TextureLoader.kt +++ b/visionforge-threejs/src/main/kotlin/three/loaders/TextureLoader.kt @@ -25,10 +25,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.loaders +package three.loaders -import info.laht.threekt.textures.Texture import org.w3c.xhr.XMLHttpRequest +import three.textures.Texture /** * Class for loading a texture. This uses the ImageLoader internally for loading files. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/LineBasicMaterial.kt b/visionforge-threejs/src/main/kotlin/three/materials/LineBasicMaterial.kt similarity index 95% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/LineBasicMaterial.kt rename to visionforge-threejs/src/main/kotlin/three/materials/LineBasicMaterial.kt index 308e5a52..1445c427 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/LineBasicMaterial.kt +++ b/visionforge-threejs/src/main/kotlin/three/materials/LineBasicMaterial.kt @@ -25,9 +25,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.materials +package three.materials -import info.laht.threekt.math.Color +import three.math.Color open external class LineBasicMaterial : Material { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/LineDashedMaterial.kt b/visionforge-threejs/src/main/kotlin/three/materials/LineDashedMaterial.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/LineDashedMaterial.kt rename to visionforge-threejs/src/main/kotlin/three/materials/LineDashedMaterial.kt index 79ad5ada..aa2a5d6a 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/LineDashedMaterial.kt +++ b/visionforge-threejs/src/main/kotlin/three/materials/LineDashedMaterial.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.materials +package three.materials external class LineDashedMaterial : LineBasicMaterial { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/Material.kt b/visionforge-threejs/src/main/kotlin/three/materials/Material.kt similarity index 99% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/Material.kt rename to visionforge-threejs/src/main/kotlin/three/materials/Material.kt index 9a2b72d0..2edbca90 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/Material.kt +++ b/visionforge-threejs/src/main/kotlin/three/materials/Material.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.materials +package three.materials @JsName("Material") open external class Material { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/MeshBasicMaterial.kt b/visionforge-threejs/src/main/kotlin/three/materials/MeshBasicMaterial.kt similarity index 94% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/MeshBasicMaterial.kt rename to visionforge-threejs/src/main/kotlin/three/materials/MeshBasicMaterial.kt index 96eae5e0..f1ee1f27 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/MeshBasicMaterial.kt +++ b/visionforge-threejs/src/main/kotlin/three/materials/MeshBasicMaterial.kt @@ -25,10 +25,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.materials +package three.materials -import info.laht.threekt.math.Color -import info.laht.threekt.textures.Texture +import three.math.Color +import three.textures.Texture external class MeshBasicMaterial : Material { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/MeshDepthMaterial.kt b/visionforge-threejs/src/main/kotlin/three/materials/MeshDepthMaterial.kt similarity index 95% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/MeshDepthMaterial.kt rename to visionforge-threejs/src/main/kotlin/three/materials/MeshDepthMaterial.kt index 185dce93..584bcab6 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/MeshDepthMaterial.kt +++ b/visionforge-threejs/src/main/kotlin/three/materials/MeshDepthMaterial.kt @@ -25,9 +25,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.materials +package three.materials -import info.laht.threekt.textures.Texture +import three.textures.Texture external class MeshDepthMaterial : Material { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/MeshLambertMaterial.kt b/visionforge-threejs/src/main/kotlin/three/materials/MeshLambertMaterial.kt similarity index 94% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/MeshLambertMaterial.kt rename to visionforge-threejs/src/main/kotlin/three/materials/MeshLambertMaterial.kt index dcd0670a..089c96c1 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/MeshLambertMaterial.kt +++ b/visionforge-threejs/src/main/kotlin/three/materials/MeshLambertMaterial.kt @@ -25,10 +25,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.materials +package three.materials -import info.laht.threekt.math.Color -import info.laht.threekt.textures.Texture +import three.math.Color +import three.textures.Texture external class MeshLambertMaterial : Material { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/MeshNormalMaterial.kt b/visionforge-threejs/src/main/kotlin/three/materials/MeshNormalMaterial.kt similarity index 93% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/MeshNormalMaterial.kt rename to visionforge-threejs/src/main/kotlin/three/materials/MeshNormalMaterial.kt index ea7c0960..5972a702 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/MeshNormalMaterial.kt +++ b/visionforge-threejs/src/main/kotlin/three/materials/MeshNormalMaterial.kt @@ -25,10 +25,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.materials +package three.materials -import info.laht.threekt.math.Vector2 -import info.laht.threekt.textures.Texture +import three.math.Vector2 +import three.textures.Texture external class MeshNormalMaterial : Material { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/MeshPhongMaterial.kt b/visionforge-threejs/src/main/kotlin/three/materials/MeshPhongMaterial.kt similarity index 93% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/MeshPhongMaterial.kt rename to visionforge-threejs/src/main/kotlin/three/materials/MeshPhongMaterial.kt index 693ba8b4..eaabf8ca 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/MeshPhongMaterial.kt +++ b/visionforge-threejs/src/main/kotlin/three/materials/MeshPhongMaterial.kt @@ -25,11 +25,11 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.materials +package three.materials -import info.laht.threekt.math.Color -import info.laht.threekt.math.Vector2 -import info.laht.threekt.textures.Texture +import three.math.Color +import three.math.Vector2 +import three.textures.Texture external class MeshPhongMaterial : Material { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/MeshPhysicalMaterial.kt b/visionforge-threejs/src/main/kotlin/three/materials/MeshPhysicalMaterial.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/MeshPhysicalMaterial.kt rename to visionforge-threejs/src/main/kotlin/three/materials/MeshPhysicalMaterial.kt index 42fef98f..e6674917 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/MeshPhysicalMaterial.kt +++ b/visionforge-threejs/src/main/kotlin/three/materials/MeshPhysicalMaterial.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.materials +package three.materials external class MeshPhysicalMaterial : MeshStandardMaterial { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/MeshStandardMaterial.kt b/visionforge-threejs/src/main/kotlin/three/materials/MeshStandardMaterial.kt similarity index 93% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/MeshStandardMaterial.kt rename to visionforge-threejs/src/main/kotlin/three/materials/MeshStandardMaterial.kt index 19b6901e..137ee095 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/MeshStandardMaterial.kt +++ b/visionforge-threejs/src/main/kotlin/three/materials/MeshStandardMaterial.kt @@ -25,11 +25,11 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.materials +package three.materials -import info.laht.threekt.math.Color -import info.laht.threekt.math.Vector2 -import info.laht.threekt.textures.Texture +import three.math.Color +import three.math.Vector2 +import three.textures.Texture open external class MeshStandardMaterial : Material { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/PointsMaterial.kt b/visionforge-threejs/src/main/kotlin/three/materials/PointsMaterial.kt similarity index 92% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/PointsMaterial.kt rename to visionforge-threejs/src/main/kotlin/three/materials/PointsMaterial.kt index bb9c4bd8..a46fb65e 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/PointsMaterial.kt +++ b/visionforge-threejs/src/main/kotlin/three/materials/PointsMaterial.kt @@ -25,10 +25,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.materials +package three.materials -import info.laht.threekt.math.Color -import info.laht.threekt.textures.Texture +import three.math.Color +import three.textures.Texture external class PointsMaterial : Material { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/RawShaderMaterial.kt b/visionforge-threejs/src/main/kotlin/three/materials/RawShaderMaterial.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/RawShaderMaterial.kt rename to visionforge-threejs/src/main/kotlin/three/materials/RawShaderMaterial.kt index 2a096459..d1f53c16 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/RawShaderMaterial.kt +++ b/visionforge-threejs/src/main/kotlin/three/materials/RawShaderMaterial.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.materials +package three.materials external class RawShaderMaterial : ShaderMaterial { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/ShaderMaterial.kt b/visionforge-threejs/src/main/kotlin/three/materials/ShaderMaterial.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/ShaderMaterial.kt rename to visionforge-threejs/src/main/kotlin/three/materials/ShaderMaterial.kt index 016520eb..3ca841db 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/ShaderMaterial.kt +++ b/visionforge-threejs/src/main/kotlin/three/materials/ShaderMaterial.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.materials +package three.materials open external class ShaderMaterial : Material { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/SpriteMaterial.kt b/visionforge-threejs/src/main/kotlin/three/materials/SpriteMaterial.kt similarity index 92% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/SpriteMaterial.kt rename to visionforge-threejs/src/main/kotlin/three/materials/SpriteMaterial.kt index 32056537..13587157 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/materials/SpriteMaterial.kt +++ b/visionforge-threejs/src/main/kotlin/three/materials/SpriteMaterial.kt @@ -25,10 +25,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.materials +package three.materials -import info.laht.threekt.math.Color -import info.laht.threekt.textures.Texture +import three.math.Color +import three.textures.Texture external class SpriteMaterial : Material { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Box2.kt b/visionforge-threejs/src/main/kotlin/three/math/Box2.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Box2.kt rename to visionforge-threejs/src/main/kotlin/three/math/Box2.kt index c00da8eb..5b446e3c 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Box2.kt +++ b/visionforge-threejs/src/main/kotlin/three/math/Box2.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.math +package three.math external class Box2( min: Vector2 = definedExternally, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Box3.kt b/visionforge-threejs/src/main/kotlin/three/math/Box3.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Box3.kt rename to visionforge-threejs/src/main/kotlin/three/math/Box3.kt index a34622fa..25730ad2 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Box3.kt +++ b/visionforge-threejs/src/main/kotlin/three/math/Box3.kt @@ -25,9 +25,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.math +package three.math -import info.laht.threekt.core.Object3D +import three.core.Object3D /** * Represents a box or cube in 3D space. The main purpose of this is to represent the Minimum Bounding Boxes for objects. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Color.kt b/visionforge-threejs/src/main/kotlin/three/math/Color.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Color.kt rename to visionforge-threejs/src/main/kotlin/three/math/Color.kt index 26a2a760..485d04f1 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Color.kt +++ b/visionforge-threejs/src/main/kotlin/three/math/Color.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.math +package three.math external class Color { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/ColorConstants.kt b/visionforge-threejs/src/main/kotlin/three/math/ColorConstants.kt similarity index 99% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/math/ColorConstants.kt rename to visionforge-threejs/src/main/kotlin/three/math/ColorConstants.kt index 34475bd1..e60aba4a 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/ColorConstants.kt +++ b/visionforge-threejs/src/main/kotlin/three/math/ColorConstants.kt @@ -23,7 +23,7 @@ */ -package info.laht.threekt.math +package three.math object ColorConstants { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Cylindrical.kt b/visionforge-threejs/src/main/kotlin/three/math/Cylindrical.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Cylindrical.kt rename to visionforge-threejs/src/main/kotlin/three/math/Cylindrical.kt index 9e0cd8ba..bee46185 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Cylindrical.kt +++ b/visionforge-threejs/src/main/kotlin/three/math/Cylindrical.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.math +package three.math external class Cylindrical( radius: Number, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Euler.kt b/visionforge-threejs/src/main/kotlin/three/math/Euler.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Euler.kt rename to visionforge-threejs/src/main/kotlin/three/math/Euler.kt index 5b8dc1ce..5cd2f5cf 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Euler.kt +++ b/visionforge-threejs/src/main/kotlin/three/math/Euler.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.math +package three.math external class Euler( diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Frustrum.kt b/visionforge-threejs/src/main/kotlin/three/math/Frustrum.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Frustrum.kt rename to visionforge-threejs/src/main/kotlin/three/math/Frustrum.kt index cce6a0bc..8d6fe374 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Frustrum.kt +++ b/visionforge-threejs/src/main/kotlin/three/math/Frustrum.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.math +package three.math external class Frustrum( p0: Plane = definedExternally, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Line3.kt b/visionforge-threejs/src/main/kotlin/three/math/Line3.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Line3.kt rename to visionforge-threejs/src/main/kotlin/three/math/Line3.kt index 6bb1b4e2..4596edd9 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Line3.kt +++ b/visionforge-threejs/src/main/kotlin/three/math/Line3.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.math +package three.math external class Line3( start: Vector3 = definedExternally, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Math.kt b/visionforge-threejs/src/main/kotlin/three/math/Math.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Math.kt rename to visionforge-threejs/src/main/kotlin/three/math/Math.kt index 9bae9dba..7a340d51 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Math.kt +++ b/visionforge-threejs/src/main/kotlin/three/math/Math.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.math +package three.math external class Math { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Matrix3.kt b/visionforge-threejs/src/main/kotlin/three/math/Matrix3.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Matrix3.kt rename to visionforge-threejs/src/main/kotlin/three/math/Matrix3.kt index 6f31380b..f5ea461a 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Matrix3.kt +++ b/visionforge-threejs/src/main/kotlin/three/math/Matrix3.kt @@ -25,9 +25,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.math +package three.math -import info.laht.threekt.core.BufferAttribute +import three.core.BufferAttribute external class Matrix3 { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Matrix4.kt b/visionforge-threejs/src/main/kotlin/three/math/Matrix4.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Matrix4.kt rename to visionforge-threejs/src/main/kotlin/three/math/Matrix4.kt index 49ed3bfe..20e03eae 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Matrix4.kt +++ b/visionforge-threejs/src/main/kotlin/three/math/Matrix4.kt @@ -25,9 +25,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.math +package three.math -import info.laht.threekt.core.BufferGeometry +import three.core.BufferGeometry /** * A class representing a 4x4 matrix. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Plane.kt b/visionforge-threejs/src/main/kotlin/three/math/Plane.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Plane.kt rename to visionforge-threejs/src/main/kotlin/three/math/Plane.kt index 2848938d..41568fc8 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Plane.kt +++ b/visionforge-threejs/src/main/kotlin/three/math/Plane.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.math +package three.math external class Plane() { constructor(normal: Vector3, constant: Double) diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Quaternion.kt b/visionforge-threejs/src/main/kotlin/three/math/Quaternion.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Quaternion.kt rename to visionforge-threejs/src/main/kotlin/three/math/Quaternion.kt index a3a0af8b..b1916723 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Quaternion.kt +++ b/visionforge-threejs/src/main/kotlin/three/math/Quaternion.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.math +package three.math external class Quaternion( diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Ray.kt b/visionforge-threejs/src/main/kotlin/three/math/Ray.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Ray.kt rename to visionforge-threejs/src/main/kotlin/three/math/Ray.kt index 731a3d2b..707985b9 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Ray.kt +++ b/visionforge-threejs/src/main/kotlin/three/math/Ray.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.math +package three.math external class Ray { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Sphere.kt b/visionforge-threejs/src/main/kotlin/three/math/Sphere.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Sphere.kt rename to visionforge-threejs/src/main/kotlin/three/math/Sphere.kt index cbbc24c4..abea7add 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Sphere.kt +++ b/visionforge-threejs/src/main/kotlin/three/math/Sphere.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.math +package three.math external class Sphere { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Spherical.kt b/visionforge-threejs/src/main/kotlin/three/math/Spherical.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Spherical.kt rename to visionforge-threejs/src/main/kotlin/three/math/Spherical.kt index 187dcd94..1596bd25 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Spherical.kt +++ b/visionforge-threejs/src/main/kotlin/three/math/Spherical.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.math +package three.math external class Spherical { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Triangle.kt b/visionforge-threejs/src/main/kotlin/three/math/Triangle.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Triangle.kt rename to visionforge-threejs/src/main/kotlin/three/math/Triangle.kt index 9dd99c52..890d1f87 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Triangle.kt +++ b/visionforge-threejs/src/main/kotlin/three/math/Triangle.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.math +package three.math external class Triangle( a: Vector3 = definedExternally, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Vector2.kt b/visionforge-threejs/src/main/kotlin/three/math/Vector2.kt similarity index 99% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Vector2.kt rename to visionforge-threejs/src/main/kotlin/three/math/Vector2.kt index 86049df0..c508421a 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Vector2.kt +++ b/visionforge-threejs/src/main/kotlin/three/math/Vector2.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.math +package three.math external class Vector2( x: Number = definedExternally, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Vector3.kt b/visionforge-threejs/src/main/kotlin/three/math/Vector3.kt similarity index 99% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Vector3.kt rename to visionforge-threejs/src/main/kotlin/three/math/Vector3.kt index 85f1c74b..881bc586 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Vector3.kt +++ b/visionforge-threejs/src/main/kotlin/three/math/Vector3.kt @@ -25,9 +25,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.math +package three.math -import info.laht.threekt.cameras.Camera +import three.cameras.Camera /** * Class representing a 3D vector. A 3D vector is an ordered triplet of numbers (labeled x, y, and z), which can be used to represent a number of things, such as: diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Vector4.kt b/visionforge-threejs/src/main/kotlin/three/math/Vector4.kt similarity index 99% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Vector4.kt rename to visionforge-threejs/src/main/kotlin/three/math/Vector4.kt index f017f4d4..5bd672d5 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/Vector4.kt +++ b/visionforge-threejs/src/main/kotlin/three/math/Vector4.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.math +package three.math external class Vector4( x: Number = definedExternally, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/operators.kt b/visionforge-threejs/src/main/kotlin/three/math/operators.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/math/operators.kt rename to visionforge-threejs/src/main/kotlin/three/math/operators.kt index b30baf00..245cc83f 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/math/operators.kt +++ b/visionforge-threejs/src/main/kotlin/three/math/operators.kt @@ -22,7 +22,7 @@ * THE SOFTWARE. */ -package info.laht.threekt.math +package three.math operator fun Vector3.unaryMinus() = this.clone().negate() operator fun Vector3.plusAssign(v: Vector3) = this.let { add(v); Unit } diff --git a/visionforge-threejs/src/main/kotlin/three/meshline/MeshLine.kt b/visionforge-threejs/src/main/kotlin/three/meshline/MeshLine.kt new file mode 100644 index 00000000..21e0ce34 --- /dev/null +++ b/visionforge-threejs/src/main/kotlin/three/meshline/MeshLine.kt @@ -0,0 +1,37 @@ +@file:JsModule("three.meshline") +@file:JsNonModule + +package three.meshline + +import three.core.BufferGeometry +import three.materials.ShaderMaterial +import three.math.Color +import three.math.Vector3 +import three.textures.Texture + +/* + * https://github.com/spite/THREE.MeshLine + */ + +public external class MeshLine : BufferGeometry { + public fun setGeometry(geometry: BufferGeometry) + public fun setPoints(points: Array) +} + +public external class MeshLineMaterial : ShaderMaterial { + @JsName("lineWidth") + public var thickness: Float + public var color: Color + + public var map: Texture? + public var useMap: Boolean + public var alphaMap: Texture? + public var useAlphaMap: Boolean + + public var repeat: dynamic // - THREE.Vector2 to define the texture tiling (applies to map and alphaMap - MIGHT CHANGE IN THE FUTURE) + public var dashArray: dynamic //- the length and space between dashes. (0 - no dash) + public var dashOffset: dynamic // - defines the location where the dash will begin. Ideal to animate the line. + public var dashRatio: dynamic // - defines the ratio between that is visible or not (0 - more visible, 1 - more invisible). + public var resolution: dynamic // - THREE.Vector2 specifying the canvas size (REQUIRED) + public var sizeAttenuation: Int // - makes the line width constant regardless distance (1 unit is 1px on screen) (0 - attenuate, 1 - don't attenuate) +} \ No newline at end of file diff --git a/visionforge-threejs/src/main/kotlin/three/meshline/meshLineExt.kt b/visionforge-threejs/src/main/kotlin/three/meshline/meshLineExt.kt new file mode 100644 index 00000000..a2bfa57a --- /dev/null +++ b/visionforge-threejs/src/main/kotlin/three/meshline/meshLineExt.kt @@ -0,0 +1,8 @@ +package three.meshline + +import three.core.BufferGeometry +import three.math.Vector3 + +public fun MeshLine(geometry: BufferGeometry): MeshLine = MeshLine().apply { setGeometry(geometry) } + +public fun MeshLine(points: Array): MeshLine = MeshLine().apply { setPoints(points) } \ No newline at end of file diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/Group.kt b/visionforge-threejs/src/main/kotlin/three/objects/Group.kt similarity index 94% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/Group.kt rename to visionforge-threejs/src/main/kotlin/three/objects/Group.kt index e5420f29..a280a11f 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/Group.kt +++ b/visionforge-threejs/src/main/kotlin/three/objects/Group.kt @@ -25,9 +25,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.objects +package three.objects -import info.laht.threekt.core.Object3D +import three.core.Object3D external class Group : Object3D diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/LOD.kt b/visionforge-threejs/src/main/kotlin/three/objects/LOD.kt similarity index 88% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/LOD.kt rename to visionforge-threejs/src/main/kotlin/three/objects/LOD.kt index 89e405ac..4eec3195 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/LOD.kt +++ b/visionforge-threejs/src/main/kotlin/three/objects/LOD.kt @@ -25,12 +25,12 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.objects +package three.objects -import info.laht.threekt.cameras.Camera -import info.laht.threekt.core.Intersect -import info.laht.threekt.core.Object3D -import info.laht.threekt.core.Raycaster +import three.cameras.Camera +import three.core.Intersect +import three.core.Object3D +import three.core.Raycaster external class LOD : Object3D { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/Line.kt b/visionforge-threejs/src/main/kotlin/three/objects/Line.kt similarity index 85% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/Line.kt rename to visionforge-threejs/src/main/kotlin/three/objects/Line.kt index e0a217bc..799884f8 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/Line.kt +++ b/visionforge-threejs/src/main/kotlin/three/objects/Line.kt @@ -25,13 +25,13 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.objects +package three.objects -import info.laht.threekt.core.BufferGeometry -import info.laht.threekt.core.Intersect -import info.laht.threekt.core.Object3D -import info.laht.threekt.core.Raycaster -import info.laht.threekt.materials.Material +import three.core.BufferGeometry +import three.core.Intersect +import three.core.Object3D +import three.core.Raycaster +import three.materials.Material open external class Line(geometry: BufferGeometry, material: Material) : Object3D { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/LineLoop.kt b/visionforge-threejs/src/main/kotlin/three/objects/LineLoop.kt similarity index 90% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/LineLoop.kt rename to visionforge-threejs/src/main/kotlin/three/objects/LineLoop.kt index 50aa390e..e3e8cbc3 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/LineLoop.kt +++ b/visionforge-threejs/src/main/kotlin/three/objects/LineLoop.kt @@ -25,9 +25,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.objects +package three.objects -import info.laht.threekt.core.BufferGeometry -import info.laht.threekt.materials.Material +import three.core.BufferGeometry +import three.materials.Material external class LineLoop(geometry: BufferGeometry, material: Material) : Line \ No newline at end of file diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/LineSegments.kt b/visionforge-threejs/src/main/kotlin/three/objects/LineSegments.kt similarity index 89% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/LineSegments.kt rename to visionforge-threejs/src/main/kotlin/three/objects/LineSegments.kt index 03bef34e..2ffd85ee 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/LineSegments.kt +++ b/visionforge-threejs/src/main/kotlin/three/objects/LineSegments.kt @@ -25,11 +25,11 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.objects +package three.objects -import info.laht.threekt.core.BufferGeometry -import info.laht.threekt.core.Object3D -import info.laht.threekt.materials.Material +import three.core.BufferGeometry +import three.core.Object3D +import three.materials.Material open external class LineSegments(geometry: BufferGeometry, material: Material) : Object3D { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/Mesh.kt b/visionforge-threejs/src/main/kotlin/three/objects/Mesh.kt similarity index 86% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/Mesh.kt rename to visionforge-threejs/src/main/kotlin/three/objects/Mesh.kt index fc91e333..867b8000 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/Mesh.kt +++ b/visionforge-threejs/src/main/kotlin/three/objects/Mesh.kt @@ -25,13 +25,13 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.objects +package three.objects -import info.laht.threekt.core.BufferGeometry -import info.laht.threekt.core.Intersect -import info.laht.threekt.core.Object3D -import info.laht.threekt.core.Raycaster -import info.laht.threekt.materials.Material +import three.core.BufferGeometry +import three.core.Intersect +import three.core.Object3D +import three.core.Raycaster +import three.materials.Material open external class Mesh(geometry: BufferGeometry?, material: Material?) : Object3D { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/Points.kt b/visionforge-threejs/src/main/kotlin/three/objects/Points.kt similarity index 87% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/Points.kt rename to visionforge-threejs/src/main/kotlin/three/objects/Points.kt index f296937a..7fede72c 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/Points.kt +++ b/visionforge-threejs/src/main/kotlin/three/objects/Points.kt @@ -25,12 +25,12 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.objects +package three.objects -import info.laht.threekt.core.Intersect -import info.laht.threekt.core.Object3D -import info.laht.threekt.core.Raycaster -import info.laht.threekt.materials.Material +import three.core.Intersect +import three.core.Object3D +import three.core.Raycaster +import three.materials.Material external class Points : Object3D { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/Sprite.kt b/visionforge-threejs/src/main/kotlin/three/objects/Sprite.kt similarity index 87% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/Sprite.kt rename to visionforge-threejs/src/main/kotlin/three/objects/Sprite.kt index 60e2d0de..c9e06bac 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/objects/Sprite.kt +++ b/visionforge-threejs/src/main/kotlin/three/objects/Sprite.kt @@ -25,12 +25,12 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.objects +package three.objects -import info.laht.threekt.core.Intersect -import info.laht.threekt.core.Object3D -import info.laht.threekt.core.Raycaster -import info.laht.threekt.materials.Material +import three.core.Intersect +import three.core.Object3D +import three.core.Raycaster +import three.materials.Material external class Sprite(material: Material = definedExternally) : Object3D { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/WebGL2Renderer.kt b/visionforge-threejs/src/main/kotlin/three/renderers/WebGL2Renderer.kt similarity index 93% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/WebGL2Renderer.kt rename to visionforge-threejs/src/main/kotlin/three/renderers/WebGL2Renderer.kt index 1c5208ad..7ca6120f 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/WebGL2Renderer.kt +++ b/visionforge-threejs/src/main/kotlin/three/renderers/WebGL2Renderer.kt @@ -25,10 +25,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.renderers +package three.renderers -import info.laht.threekt.cameras.Camera -import info.laht.threekt.scenes.Scene +import three.cameras.Camera +import three.scenes.Scene external class WebGL2Renderer { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/WebGL2RendererParams.kt b/visionforge-threejs/src/main/kotlin/three/renderers/WebGL2RendererParams.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/WebGL2RendererParams.kt rename to visionforge-threejs/src/main/kotlin/three/renderers/WebGL2RendererParams.kt index a2ef9eaf..8379d142 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/WebGL2RendererParams.kt +++ b/visionforge-threejs/src/main/kotlin/three/renderers/WebGL2RendererParams.kt @@ -22,7 +22,7 @@ * THE SOFTWARE. */ -package info.laht.threekt.renderers +package three.renderers import org.w3c.dom.Node diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/WebGLRenderTarget.kt b/visionforge-threejs/src/main/kotlin/three/renderers/WebGLRenderTarget.kt similarity index 93% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/WebGLRenderTarget.kt rename to visionforge-threejs/src/main/kotlin/three/renderers/WebGLRenderTarget.kt index 08c44a36..2cbd272b 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/WebGLRenderTarget.kt +++ b/visionforge-threejs/src/main/kotlin/three/renderers/WebGLRenderTarget.kt @@ -25,10 +25,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.renderers +package three.renderers -import info.laht.threekt.math.Vector4 -import info.laht.threekt.textures.Texture +import three.math.Vector4 +import three.textures.Texture external class WebGLRenderTarget { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/WebGLRenderTargetOptions.kt b/visionforge-threejs/src/main/kotlin/three/renderers/WebGLRenderTargetOptions.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/WebGLRenderTargetOptions.kt rename to visionforge-threejs/src/main/kotlin/three/renderers/WebGLRenderTargetOptions.kt index 4ba8b941..145431ce 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/WebGLRenderTargetOptions.kt +++ b/visionforge-threejs/src/main/kotlin/three/renderers/WebGLRenderTargetOptions.kt @@ -22,7 +22,7 @@ * THE SOFTWARE. */ -package info.laht.threekt.renderers +package three.renderers data class WebGLRenderTargetOptions( val wrapS: Int? = undefined, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/WebGLRenderer.kt b/visionforge-threejs/src/main/kotlin/three/renderers/WebGLRenderer.kt similarity index 96% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/WebGLRenderer.kt rename to visionforge-threejs/src/main/kotlin/three/renderers/WebGLRenderer.kt index aa95f1ba..45fc212e 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/WebGLRenderer.kt +++ b/visionforge-threejs/src/main/kotlin/three/renderers/WebGLRenderer.kt @@ -25,12 +25,12 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.renderers +package three.renderers -import info.laht.threekt.cameras.Camera -import info.laht.threekt.math.Plane -import info.laht.threekt.scenes.Scene import org.w3c.dom.Node +import three.cameras.Camera +import three.math.Plane +import three.scenes.Scene external class WebGLRenderer(params: WebGLRendererParams = definedExternally) { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/WebGLRendererParams.kt b/visionforge-threejs/src/main/kotlin/three/renderers/WebGLRendererParams.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/WebGLRendererParams.kt rename to visionforge-threejs/src/main/kotlin/three/renderers/WebGLRendererParams.kt index e6800673..6b979e8f 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/WebGLRendererParams.kt +++ b/visionforge-threejs/src/main/kotlin/three/renderers/WebGLRendererParams.kt @@ -22,7 +22,7 @@ * THE SOFTWARE. */ -package info.laht.threekt.renderers +package three.renderers import org.w3c.dom.Node diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/shaders/ShaderChunk.kt b/visionforge-threejs/src/main/kotlin/three/renderers/shaders/ShaderChunk.kt similarity index 99% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/shaders/ShaderChunk.kt rename to visionforge-threejs/src/main/kotlin/three/renderers/shaders/ShaderChunk.kt index f70c7137..ccf4d37f 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/shaders/ShaderChunk.kt +++ b/visionforge-threejs/src/main/kotlin/three/renderers/shaders/ShaderChunk.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.renderers.shaders +package three.renderers.shaders external object ShaderChunk { val alphamap_fragment: String diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/shaders/ShaderLib.kt b/visionforge-threejs/src/main/kotlin/three/renderers/shaders/ShaderLib.kt similarity index 96% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/shaders/ShaderLib.kt rename to visionforge-threejs/src/main/kotlin/three/renderers/shaders/ShaderLib.kt index f168f740..67ed1215 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/shaders/ShaderLib.kt +++ b/visionforge-threejs/src/main/kotlin/three/renderers/shaders/ShaderLib.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.renderers.shaders +package three.renderers.shaders external object ShaderLib { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/shaders/UniformsUtil.kt b/visionforge-threejs/src/main/kotlin/three/renderers/shaders/UniformsUtil.kt similarity index 94% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/shaders/UniformsUtil.kt rename to visionforge-threejs/src/main/kotlin/three/renderers/shaders/UniformsUtil.kt index fb68d712..3d68f177 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/renderers/shaders/UniformsUtil.kt +++ b/visionforge-threejs/src/main/kotlin/three/renderers/shaders/UniformsUtil.kt @@ -25,9 +25,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.renderers.shaders +package three.renderers.shaders -import info.laht.threekt.core.Uniform +import three.core.Uniform external object UniformsUtil { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/scenes/Fog.kt b/visionforge-threejs/src/main/kotlin/three/scenes/Fog.kt similarity index 95% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/scenes/Fog.kt rename to visionforge-threejs/src/main/kotlin/three/scenes/Fog.kt index c5682f36..87b67fb0 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/scenes/Fog.kt +++ b/visionforge-threejs/src/main/kotlin/three/scenes/Fog.kt @@ -25,9 +25,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.scenes +package three.scenes -import info.laht.threekt.math.Color +import three.math.Color external class Fog { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/scenes/FogExp2.kt b/visionforge-threejs/src/main/kotlin/three/scenes/FogExp2.kt similarity index 95% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/scenes/FogExp2.kt rename to visionforge-threejs/src/main/kotlin/three/scenes/FogExp2.kt index 017fd34b..fed2c580 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/scenes/FogExp2.kt +++ b/visionforge-threejs/src/main/kotlin/three/scenes/FogExp2.kt @@ -25,9 +25,9 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.scenes +package three.scenes -import info.laht.threekt.math.Color +import three.math.Color external class FogExp2 { diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/scenes/Scene.kt b/visionforge-threejs/src/main/kotlin/three/scenes/Scene.kt similarity index 95% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/scenes/Scene.kt rename to visionforge-threejs/src/main/kotlin/three/scenes/Scene.kt index 16e5e3cd..41fc011c 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/scenes/Scene.kt +++ b/visionforge-threejs/src/main/kotlin/three/scenes/Scene.kt @@ -25,10 +25,10 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.scenes +package three.scenes -import info.laht.threekt.core.Object3D -import info.laht.threekt.materials.Material +import three.core.Object3D +import three.materials.Material /** * Scenes allow you to set up what and where is to be rendered by three.js. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/textures/CompressedTexture.kt b/visionforge-threejs/src/main/kotlin/three/textures/CompressedTexture.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/textures/CompressedTexture.kt rename to visionforge-threejs/src/main/kotlin/three/textures/CompressedTexture.kt index 1d25e61d..10b72f45 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/textures/CompressedTexture.kt +++ b/visionforge-threejs/src/main/kotlin/three/textures/CompressedTexture.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.textures +package three.textures /** * Creates a texture based on data in compressed form, for example from a DDS file. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/textures/CubeTexture.kt b/visionforge-threejs/src/main/kotlin/three/textures/CubeTexture.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/textures/CubeTexture.kt rename to visionforge-threejs/src/main/kotlin/three/textures/CubeTexture.kt index b5eb6e89..b386f264 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/textures/CubeTexture.kt +++ b/visionforge-threejs/src/main/kotlin/three/textures/CubeTexture.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.textures +package three.textures import org.w3c.dom.Element diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/textures/DepthTexture.kt b/visionforge-threejs/src/main/kotlin/three/textures/DepthTexture.kt similarity index 97% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/textures/DepthTexture.kt rename to visionforge-threejs/src/main/kotlin/three/textures/DepthTexture.kt index 0ce9a308..eabc7d9c 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/textures/DepthTexture.kt +++ b/visionforge-threejs/src/main/kotlin/three/textures/DepthTexture.kt @@ -25,7 +25,7 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.textures +package three.textures external class DepthTexture( width: Int, diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/textures/Texture.kt b/visionforge-threejs/src/main/kotlin/three/textures/Texture.kt similarity index 98% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/textures/Texture.kt rename to visionforge-threejs/src/main/kotlin/three/textures/Texture.kt index b936c2f5..853ae54e 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/textures/Texture.kt +++ b/visionforge-threejs/src/main/kotlin/three/textures/Texture.kt @@ -25,11 +25,11 @@ @file:JsModule("three") @file:JsNonModule -package info.laht.threekt.textures +package three.textures -import info.laht.threekt.math.Matrix3 -import info.laht.threekt.math.Vector2 import org.w3c.dom.Element +import three.math.Matrix3 +import three.math.Vector2 /** * Create a texture to apply to a surface or as a reflection or refraction map. diff --git a/visionforge-threejs/src/main/kotlin/info/laht/threekt/utils/BufferGeometryUtils.kt b/visionforge-threejs/src/main/kotlin/three/utils/BufferGeometryUtils.kt similarity index 87% rename from visionforge-threejs/src/main/kotlin/info/laht/threekt/utils/BufferGeometryUtils.kt rename to visionforge-threejs/src/main/kotlin/three/utils/BufferGeometryUtils.kt index dd15b514..9c52f8be 100644 --- a/visionforge-threejs/src/main/kotlin/info/laht/threekt/utils/BufferGeometryUtils.kt +++ b/visionforge-threejs/src/main/kotlin/three/utils/BufferGeometryUtils.kt @@ -1,8 +1,8 @@ @file:JsModule("three/examples/jsm/utils/BufferGeometryUtils") @file:JsNonModule -package info.laht.threekt.utils +package three.utils -import info.laht.threekt.core.BufferGeometry +import three.core.BufferGeometry public external object BufferGeometryUtils {