Outerra forum

Anteworld - Outerra Game => Modding: Importer, Tools & Utilities => JavaScript development => Topic started by: SteelRat on April 26, 2015, 02:06:32 pm

Title: Interfaces
Post by: SteelRat on April 26, 2015, 02:06:32 pm
Hi cameni!

I can code access interfaces?

$got
$view
$eview
$sandbox
$app
Title: Re: Interfaces
Post by: cameni on April 26, 2015, 04:03:16 pm
These interfaces (or rather interface access variables) are specific to their tools/windows, and most of them are already obsolete and will be eventually removed.
Title: Re: Interfaces
Post by: SteelRat on April 26, 2015, 04:29:26 pm
These interfaces (or rather interface access variables) are specific to their tools/windows, and most of them are already obsolete and will be eventually removed.

I understand that I was not too sure.
Then issue I have at the moment is the ability to create roads without GUI, via JS ?
Title: Re: Interfaces
Post by: cameni on April 27, 2015, 01:21:45 am
You can't. Roads need to have their elevations resolved, and it's not possible to to do that while running a script that would place the roads arbitrarily anywhere in the world. It can be done only in the editor or in importer, which impose certain constraints on what the script may do.
Title: Re: Interfaces
Post by: SteelRat on April 27, 2015, 03:56:39 am
You can't. Roads need to have their elevations resolved, and it's not possible to to do that while running a script that would place the roads arbitrarily anywhere in the world. It can be done only in the editor or in importer, which impose certain constraints on what the script may do.
Ok. Thank.
Title: Re: Interfaces
Post by: SteelRat on May 02, 2015, 04:27:38 pm
Hi cameni!

This is not done
Or
It's not for me
Or
I am doing something wrong
?

Code: [Select]
<!--
window.open("../ptm/ui/docInterface.html")
-->

<!DOCTYPE html>
<html>
<head>
    <title>Doc interface</title>
    <link type="text/css" rel="stylesheet" href="../../www/css/outerra-theme.css">
    <script type="text/javascript" src="../../www/lib/ot.js"></script>
    <script type="text/javascript">
        outerra({
            requires: [
                '../../www/lib/component/desktopwindow.js',
'../../www/lib/component/doc-interface/doc-interface.js'
            ],

            body: function (ot, script) {
                var win = new ot.components.DesktopWindow('win', {

    title:'Doc interface',

                    populateBody: function (body) {
                        body.add(new ot.components.ext.DocInterface('DocInterface'));
                    }
                });
                win.render();
            }
        });
    </script>
</head>
<body class="window-body full-size"></body>
</html>

Code: [Select]
ERROR: 23:09:27,781 - "Cannot read property 'comments' of null"
WARNING: (c4e) [0502/230927:ERROR:web.js(1376)] Uncaught TypeError: Cannot read property 'comments' of null
Title: Re: Interfaces
Post by: cameni on May 03, 2015, 02:04:45 am
Just some files from the upcoming scenery editor that leaked, not ready.
Title: Re: Interfaces
Post by: SteelRat on May 03, 2015, 10:45:43 am
Just some files from the upcoming scenery editor that leaked, not ready.

Ок. Thank.