Giter Club home page Giter Club logo

php-fbx's Introduction

PHP FBX extension

Usage

$fbx = new FBX($path_to_binary_fbx_in, $path_to_fbx_out);

Note: you must supply the fully qualified paths for both parameters. The FBX will be exported depending on the extension of the second parameter. If the extension is ".fbx", the binary FBX will be converted to ascii. Other valid options are .dae, .obj and .dxf (see FBX SDK documentation for more info).

Compatibility (Linux + Windows)

  • php 5.6.4 and higher
  • php 7.1, 7.2
  • php 8.1, 8.2

Build instructions (Linux)

  • Download the Autodesk FBX SDK: https://www.autodesk.com/developer-network/platform-technologies/fbx-sdk-2020-3-1
  • Copy libfbxsdk.dylib to /usr/local/lib
  • Copy the include/ directory somwehere convenient e.g. /Users/myusername/fbxsdk/include
  • Install php-dev packages for your php version: apt-get install php8.2-dev
  • Clone this repo, cd into it
  • phpize
  • ./configure --with-fbx=/Users/myusername/fbxsdk (pass in the directory one up from where you copied the /include dir earlier)
  • make
  • The extension should now appear in the modules/ directory.

Installation (Linux)

Build instructions (Windows)

  • git clone https://github.com/Microsoft/php-sdk-binary-tools
  • Open "Developer Command Prompt for VS2019"
  • All commands listed below must be run using the VS2019 command prompt you just opened:
  • cd into the directory you just cloned, and run phpsdk-vs16-x64.bat
  • phpsdk_buildtree phpdev
  • Download source code of the PHP version you're building for: https://windows.php.net/download/
  • Extract the source code under <php-sdk-binary-tools>/phpdev/vs16/x64/php-8.2.4-src (replace php version with whatever version you downloaded)
  • Download and install the Autodesk FBX SDK: https://www.autodesk.com/developer-network/platform-technologies/fbx-sdk-2020-3-1
  • Copy the Autodesk FBX SDK include/ and lib/ directories into <php-sdk-binary-tools>/phpdev/vs16/x64/fbxsdk
  • Clone this repo into <php-sdk-binary-tools>/phpdev/vs16/x64/php-8.2.4-src/ext/fbx
  • cd <php-sdk-binary-tools>/phpdev/vs16/x64/php-8.2.4-src
  • buildconf
  • configure --with-fbx="<php-sdk-binary-tools>/phpdev/vs16/x64/fbxsdk,shared"
  • nmake

Installation (Windows)

php-fbx's People

Contributors

stijnvdb88 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.