BlueBear I/O

BlueBear I/O (PHP,AWS,Wordpres,Swift…..)

[swift4] How to put dae file which downloaded from Internet, on scenekit

time 2017/10/29

[swift4] How to put dae file which downloaded from Internet, on scenekit

How to put dae file which downloaded from Internet, on scenekit, is below

sponsored link

Convert dae file by xcode command

Need to convert dae file by xcode before put into scenekit.

so before uploading to your server, You have to convert dae file by below command on console.

Open console, move to dae file folder, convert your folder which dae file located

 

Once complete to convert, make sure that “./optimized” which pointed on command are created.

and in this folder, converted dae file should be created.

 

Reference :

Dynamically load Collada files in SceneKit at runtime

BTW, on above reference site, described to create “product1.scnassets” folder.

but no need specifically “product1.scnassets” folder.

Can convert any name folder. no need “scnassets” name on your folder.

 

Then, can’t download .dae file directly. you should compress dae file to zip file.

after download zip file, un-zip zip file to dae file

[swift4] How to install SSZipArchive for un-zip file downloaded

 

 

Put dae file on scenekit

how to put dae file on scenekit is below.

“filepath” is URL which dae file located on device.

 

Need to add “file://” on top of filepath.

Or

Or

sponsored link

コメント

down

コメントする






sponsored link