[Plugin] Object 3d [Alpha 0.3]

0 favourites
From the Asset Store
Is a system for building scorecards and achievements online for use in games Using this system, you can create a scorebo
  • Hi,

    after some playing with the javascript-library JSC3D for loading obj-files, I've created a little plugin to use it within C2.

    Update: Please update the plugin - version <font color="red">0.3</font>

    Updates in version 0.3:

    -) Hopefully fixed the WebGL bug.

    -) Changed actions: values for loading time and scaling/rotation- can get set - depending on the complexity of the object.

    Sidenote: The object in the demo is very small - scale it do 100 (- realsize is scalefactor 1 -) to see it.

    <font size="1">Woohoo - works even now on my old android 1.5 device (5 FPS) ( - the canvas is on the wrong position but for now it's ok <img src="smileys/smiley2.gif" border="0" align="middle"> ). </font>

    Demo + Plugin version 0.3

    _________

    Update in version 0.2: Objects are now on their own canvases in C2 - seems it worked only with WebGL disabled.

    Demo + Plugin version 0.2

    (The button "reload" and the first loading doesn't work in the webdemo. It works locally - perhaps i've given to less loading/rendering time. Maybe the other buttons work fine in the webdemo.)

    _________

    The plugin "Object 3d" can load and render an obj-file into the canvas of Construct2 and can do some simple transformations (rotate, move, scale) with that object. The plugin doesn't work with the "Preview".

    Actions 0.1:

    <img src="http://dl.dropbox.com/u/31151399/Construct2/Plugins/joe7_loadObj3d/actions.png" border="0">

    Properties 0.1:

    <img src="http://dl.dropbox.com/u/31151399/Construct2/Plugins/joe7_loadObj3d/properties.png" border="0">

    Demo 0.1

    Plugin 0.1

    How to load a obj-file:

    specify the path at the properties:

    <img src="http://dl.dropbox.com/u/31151399/Construct2/Plugins/joe7_loadObj3d/pathObj.png" border="0">

    my obj-file is located next to my capx in a folder "obj":

    <img src="http://dl.dropbox.com/u/31151399/Construct2/Plugins/joe7_loadObj3d/pathObj2.png" border="0">

    After exporting you should get a file c2Jsc3d.js - this is for the loading - please don't delete it.

    <img src="http://dl.dropbox.com/u/31151399/Construct2/Plugins/joe7_loadObj3d/path3.png" border="0">

    How you can create obj-Files: Blender, Wings3D, Art of Illusion,..

    Notes:

    1) Version 0.1 can load and render only one obj-file.

    2) The plugin is in alpha at the moment. However it works sometimes.

    DEVELOPMENT: >=0.2: The rendering is done in an offscreen-canvas because I suppose the c2-runtime doesn't like a direct rendering-repaint-thread. The "estimated time" is the time that this rendering/repainting thread should take until it gets killed. If anybody knows a better way - let me know.

    All suggestions are welcome, <img src="smileys/smiley2.gif" border="0" align="middle">

    Joe7

  • It might work in "Preview" if you could put these two dependency files in to one file.

    Reference: two files in dependency

  • i cant display any 3d model (?) where i must copy js. libraries?

  • rexrainbow: Thanks. I've made an update. However the preview don't work because a local obj-file get loaded. I don't know if or how i can get the path for C2 and/or the preview.

    delgado: Delete these both old-libraries and update the plugin. The needed library should become created now next to the index.html.

  • i only see a white background with some buttons in firefox and chrome on your demo website... the load button does nothing either?

  • wow, that's awesome, people are gonna love this

  • white background and few buttons here too...plz explain better how to use it,ty

  • ok, open the demo page and click on the Button "Load". After that perhaps you see a 3D-object and you can rotate,move and scale it with the buttons (values from the textfields). If it works be happy - if not have a smile - its only alpha this time. <img src="smileys/smiley17.gif" border="0" align="middle" />

  • Will you make it so we can make the preloaded more attractive? Add a expression to get the total amount loaded, then we could set the width of our pre designed preloaded to that value ;). Also will collisions be possible? That way we could make 3D games :o

  • where i can get the:

    c2jsc3d.js

    c2runtime.js

    ?

  • i had a smile :)))

  • <img src="smileys/smiley1.gif" border="0" align="middle" /> Demo wont work!

    MIST!

  • Demo worked for me. <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • upload a print screen i want to see how it looks like :)

  • delgado Hear ya go <img src="smileys/smiley4.gif" border="0" align="middle">- http://dl.dropbox.com/u/51270524/Proof%3BD.JPG

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)