Wednesday, July 18, 2018

URLs for Opening MKI3D with Loaded Input Data


The new version ( v0.20 ) of MKI3D PWA can be used to display your mki3d designs in the browser.



You can create links on your pages that can open the MKI3D editor with loaded content.
The link consists of the address of the application  'https://mki1967.github.io/mki3d/mki3d_www/mki3d.html'  with a  parameter 'input' in its query string, which is an URL of the mki3d data file.

Here are some examples of links to the stages of mki3dgame directly on the GitHub:





If the 'input' parameter is releative URL, the MKI3D tries to append the URL base of its 'document.referrer'. ('document.referrer' is the page that contains the opening link.)
You can also specify the parameter 'base' that overrides the URL base of  'document.referrer'.

The following page contains examples of the use cases:

https://mki1967.github.io/mki3d/docs/examples/mki3d-data/test-url.html


(Note that you may need to close and reload MKI3D on-line twice or more  to have the progressive app updated to the new version.)

Wednesday, July 11, 2018

Setting Canvas Dimensions in MKI3D

Update to MKI3D Progressive Web App :


I have just added manual setting of the canvas dimensions on Inputs Page ('QI'):


(You should soon have it on Inputs Page of your copy of the pwa.)

Together with the display mode ('D') and saving of the image from the browser it can be used e.g. for designing of nice square pictures of icons:



The 'RESET DEFAULT' button resets the default canvas dimensions for the current window size.

Thursday, June 28, 2018

electro-snail-stage


New stage has been added to mki3dgame.
Version 1.13 for Linux is available as:

It has been also included in MKI_SG Progressive Web App

Thursday, February 8, 2018

Exporting to PLY

I have noticed that many versions of Blender do not have importing of COLLADA format.

In MKI3D I have implemented exporting to  PLY - Polygon File Format,
which is supported in more versions of Blender.


Thursday, February 1, 2018

Mki3dgame on Flathub

 mki3dgame on Flathub


Mki3dgame is now available as a Flatpak pakage on Flathub.

If you have flatpak installed on your Linux, then io.github.mki1967.mki3dgame can be installed on your system with the command:

flatpak install --from https://flathub.org/repo/appstream/io.github.mki1967.mki3dgame.flatpakref

or it can be installed locally in your user account:

flatpak --user install --from https://flathub.org/repo/appstream/io.github.mki1967.mki3dgame.flatpakref


(On Linux Mint, Flathub is now integrated into the software manager.)

After installing,  you will probably find the icon on the desktop menu for starting the programs (should be in the games section).
You can also run it from the command line:

flatpak run io.github.mki1967.mki3dgame


Thanks to Flathub people for creating org.freedesktop.Sdk.Extension.golang and to  developers who helped me in  preparing the metadata for the flatpak-builder.


Thursday, November 2, 2017

mki3dgame-snap

Mki3dgame is  available also as a snap for Ubuntu and (probably) some other distributions that support snaps.
You can install it with the snap command:

$ sudo snap install mki3dgame-snap 


and then run the game with:

$ mki3dgame-snap


(Note that there are also AppImages appended to the releases  and the source code repository contains bash scripts:  make-AppImage.bash and make-snap.bash for making  AppImages and Snaps.)

Saturday, October 14, 2017

Tutorial Post 20: Using IndexedDB.

Mki3d can now (since version 0.11) store your designs in IndexedDB.
IndexedDB is an internal local database managed by the related browser.
The 'IndexedDB Menu' in mki3d can be invoked by a key sequence 'QB'.


On this menu you can:

  • press the key 'A' to store the current design in the database, or
  • press the key 'I' to start 'Inspecting IDB' sub-menu for inspecting the database.
Thus, to store your design, you only have to press the key sequence 'QBA'.
The entry is stored with the following attributes: its name and creation date.
You do not need to change the name, since the database can contain many entries with the same name. It is convenient for storing many intermediate versions of your design, or if you do not want to waste your time for inventing the name or deciding where to save the data in the  file system.
(Remember that you always can set the current name on the 'Inputs Page'.)


When you inspect the database the entries are sorted by the date and you can preview the stored designs as they where visible on the screen when they where stored.
You start inspecting from the last stored one.



You can cycle through the sequence of entries backward or forward by pressig 'P' or 'N' or arrow keys.
If the database contains too many entries, you can filter them: Press 'F' to invoke the 'IDB Filters' sub-menu.


Here you can set the bounds (or single bound) of dates' range and a sub-string that the filtered entries must contain in their name.
Press 'Enter' key  to confirm or 'Esc' to cancel, and return to 'Inspecting IDB'.

While inspecting the database  you can also merge,  load, or remove the entry. Each of these actions requires confirmation:



You have to press precisely the 'Y' key to confirm. Pressing any other key cancels the action.

The last option on 'Inspecting IDB' sub-menu is 'V' that hides the menu and cursor to show you the  the preview in full display.

The IndexedDB can be convenient for rapid storing and previewing of your  designs. However, I would recommend that you still save copies of your more precious designs outside the browser: Use 'QFS' key sequence to invoke saving in the files, or by copying text from text areas.
The persistence of your data in IndexedDB may depend on the policy of the browser's producer.





Thursday, September 14, 2017

Changing Current Name on Inputs Page

'CURRENT NAME'  input field has been added on Inputs Page to set the name to be used in  the name of saved file.

Wednesday, August 30, 2017

MKI3D as Progressive Web App.

MKI3D RAPID MODELER  has its on-line version  transformed into Progressive Web App.
After you first open the HTML page, the app is cached by the browser.
You can either bookmark or (in Chrome) add the page to your desktop.
Then the application can be used off-line.
Note that the application still needs  a physical keyboard. (It is a keyboard-driven editor after all ;-)

Screen-shot of icon on the desktop (CLICK TO OPEN PWA APP).

Thursday, August 17, 2017

MKI_SG as Progressive Web App.

The MKI Searching Game (MKI_SG) has stages made with mki3d.
I have transformed its on-line version  to  Progressive Web App. 
Thus, it can be safely installed on mobile device from the browser and played off-line.
Click here for  MKI_SG as PWA

Friday, August 11, 2017

Exporting of the Red-Blue Stereoscopic Views to Interactive HTML Pages.

Now you can export to HTML pages in the  red-blue stereoscopic mode. The resulting page contains stereoscopic interactive presentation that can be watched with standard red-blue glasses:

CLICK HERE TO SEE EXAMPLE

Note that, to make your own exports, you also need the recent version ( >= 4) of the script: mki3d_view.js 

Sunday, August 6, 2017

Tutorial Post 18: Exporting as interactive HTML pages.

You can export your data to HTML page with interactive presentation of your  3D design in browsers with WebGL enabled. (Most of the modern browsers on modern devices have WebGL enabled.) You can rotate the object by mouse dragging and perform some other actions.

CLICK HERE TO SEE EXPORTED EXAMPLE.




On the File Menu (invoked with key sequence: 'QF') you may notice the following fragment:



Notice the 'NOTE ON EXPORTING'.  The exported HTML pages contain the data, but they also need a script  mki3d_view.js to be placed in the same folder. (Any folder with a collection of exported pages needs to contain one copy of this script.)

If you press the 'E' key  on the file menu,  then mki3d starts exporting.
Exporting is similar to ordinary saving:
  • If you are using mki3d as a Chrome application, then you are presented with file chooser for saving the exported page.
  • If you are using mki3d in a browser, then you are presented with with a Text Save Page where the text of the exported page is placed in OUTPUT TEXT AREA, but you can also save the file with file chooser by using artificial DOWNLOAD LINK TO SAVE DATA:







The script mki3d_view.js has been updated recently to handle touch events,  so the exported designs can be interactively viewed also on the mobile devices.
Exporting of the stereoscopic views is not implemented yet. (It is a 'future work' ;-)
In the current version (since 2017.08.11)  you can also export in the red-blue stereoscopic mode.



Friday, August 4, 2017

Tutorial Post 17: Constructing regular icosahedron.


In the tutorial post about folding, we constructed  regular tetrahedron. That was easy: we aligned two equilateral triangles to the sides of another one and folded them to obtain all the needed endpoints.

Now we show how to construct regular icosahedron.


Create two copies of equilateral triangles (as it was made in the folding post) and one outline of regular pentagon. Select the enpoints of the pentagon and set constructive points for scaling the pentagon so that its side will become as long as the side of the triangles.


Invoke scaling with the key sequence  'QMS1'.


Prepare for alignment of the first triangle to the side of pentagon with a three-points transformation. The constructive points may be set as on the following figure:


Invoke the three-points transformation (key sequence 'QMT').


The same way, align the second triangle to the adjacent side of the pentagon:


Now we have to prepare the folding. Fortunately, each triangle is in a distinct set, so we can use the 'N' key to select the set and key sequence 'QSS' to select (and then also bookmark) the traingle.
The constructive points for folding should be set as follows:


After folding ('QMF') you should have something like that:


I have also set light ('QDL') to have different shades on the triangles.

Using cursor jumping, insert the remaining sides of the pentagonal pyramid:



Now we could safely remove the segments, which are the outline of the pentagon, but we will leave them to make the placement of pryramids more visible in the remaining stages.

Now select everything ('QSX'). Extract the selected vertices to a single set ('QSE') and make three copies of the pyramids:


We still need one more triangle. We could have  made one more copy at the begining, but  we are adding it now:




We have to align two of  the pyramids with the triangle using three-points transformations:


Prepare for folding of the aligned pyramids:



After folding you get something like that:




We have to append the last pyramid to our construction. Prepare for three-points transformation:


And execute the transformation. The pyramid has been placed as on the view below:


The construction is almost ready. Remainig triangles can be inserted by cursor jumping to the existing endpoints:


To make the construction balanced we can select all endpoints ('QSX') and remove all segments, which are the outlines of the pentagons ('QD4').
Then

  • Move the cursor to the centroid of the selected endpoins (which is now the center of the icosahedron) with key sequence 'QMJC'.
  • Set the constructive point 'A' ('QPSA')
  • Using INPUTS PAGE ('QI') set cursor's X,Y,Z coordinates to zeroes.
  • Set the constructive point 'B' ('QPSB')
  • Move the (still selected) endpoints by the vector 'AB' (key sequence 'QMM0')
Now we have icosahedron with the center in (0,0,0).


https://mki1967.github.io/mki3d/docs/examples/html_viewer/tutorial-icosahedron.html
Click to see exported to html