Latest 1.0.0
Homepage https://github.com/byvapps/Bv3dPreview
License MIT
Platforms ios 9.0
Frameworks SceneKit, ModelIO
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

iOS 9.0 or higher.

Installation

Bv3dPreview is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'Bv3dPreview'

Or you can drag the Bv3dPreview.swift directly into your project and import the library whenever you need it.

Usage

1.- From storyboard
Drag an UIView and asign his class to Bv3dPreview.
On the controller connect an @IBOutlet to the UIView you have created.
Finally, use configure the obj model and the textures(optional)

2.- From code

guard let objUrl = Bundle.main.url(forResource: "Fighter", withExtension: "obj") else {
return }
let model3DViewer = Bv3dPreview(from: objUrl, textures: [
.baseColor:"Fighter_Diffuse_25.jpg",
.specular:"Fighter_Specular_25.jpg",
.emission:"Fighter_Illumination_25.jpg"])
codeBv3dPreview.frame = CGRect(x: 0, y: 0, width: view.frame.size.width, height: view.frame.size.height)
view.addSubview(model3DViewer)

Author

koldo92, [email protected]

License

Bv3dPreview is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "Bv3dPreview",
    "version": "1.0.0",
    "summary": "3D model viewer in Swift",
    "description": "A lightweight library for displaying 3D Models in iOS.",
    "homepage": "https://github.com/byvapps/Bv3dPreview",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "koldo92": "[email protected]"
    },
    "source": {
        "git": "https://github.com/byvapps/Bv3dPreview.git",
        "tag": "1.0.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "Bv3dPreview/Classes/**/*",
    "frameworks": [
        "SceneKit",
        "ModelIO"
    ],
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This