Running a patch offline

184 views
Skip to first unread message

tekcor

unread,
Dec 27, 2011, 2:53:05 PM12/27/11
to VVVV.js
Dear vvvv ethusiasts,
The latest attempt to run vvvv.js offline (i don't have a server) gave
me some understanding about javascript and i am sure that it should
work the way i set up the project folder. But it doesn't.

Project folder: Patch + html file + vvvv_js folder (from v0.1.2alpha)
Code:

<html>
<head>
<title>VVVV.js project 1</title>
<link rel="stylesheet" type="text/css" href="vvvv_js/vvvviewer/
vvvv.css"/>
<script language="JavaScript" src="vvvv_js/lib/jquery/
jquery-1.4.2.min.js"></script>
<script language="JavaScript" src="vvvv_js/vvvv.js"></script>
<script language="JavaScript">
var patch;
var mainloop;
$(document).ready(function() {

initVVVV('vvvv_js','full');

patch = new VVVV.Core.Patch("example02.v4p", function() {
mainloop = new VVVV.Core.MainLoop(this);

});

$('#start_button').click(function() {
mainloop.start();
$(this).attr('disabled', true);
$('#stop_button').attr('disabled',null);
});

$('#stop_button').click(function() {
mainloop.stop();
$(this).attr('disabled', true);
$('#start_button').attr('disabled',null);
});

$('#show_button').click(function() {
var vvvviewer = new VVVV.VVVViewer(patch, '#viewer_pane');
$(this).attr('disabled', true);
});

});
</script>
</head>

<body>

<input type="button" id="start_button" value="Resume"
disabled="disabled"/>
<input type="button" id="stop_button" value="Pause"/>
<input type="button" id="show_button" value="Show Patch"/>

<br/>

<canvas id="renderer" width="500" height="500"></canvas>

<div id="viewer_pane"></div>

</body>
</html>

I checked if the paths are working by linking to them and they work.

In firefox the buttons work and the vvvviewer works.
But only a black canvas apears.
tried it with different examples and my own very basic patches.

In chrome nothing works at all. buttons apear but do not work and not
even a canvas is drawn.

I also tried to force webGL on both browsers.

Of course i am wondering what the problem is now :)

Thx.



zauner

unread,
Dec 28, 2011, 3:33:25 PM12/28/11
to VVVV.js
Hi!

do you run the page through a local webserver (like http://localhost/...
) or by using your local filesystem path (like file://C:/projects/...
) ?

If the latter, this would be the problem, because Javascript can't
access resources from the local filesystem (for security reasons). You
would need to run a webserver on your machine. I'm using XAMPP, it's
set up in a few seconds.

However, in any case: hit Ctrl + Shift + J in Chrome to launch the
javascript console, where you can see javascript errors and some debug
output. This will make it way easier. :)

tekcor

unread,
Dec 30, 2011, 7:50:22 PM12/30/11
to VVVV.js
Thank you :)

it works now and thats nice. still some problems with webGl but canvas
works good so far.
ill specifie the problems next (happy new) year.

cheers
dave.


On 28 Dez., 21:33, zauner <matthias.zau...@gmx.net> wrote:
> Hi!
>
> do you run the page through a local webserver (likehttp://localhost/...

zauner

unread,
Dec 31, 2011, 6:08:21 AM12/31/11
to VVVV.js
ok cool, so it was the webserver/local-filesystem thing?

as for the WebGL stuff: in 0.1.2-alpha that was more like a prove-of-
concept implementation. There have been made so many changes in the
current development branch, that I suggest using this from github:
https://github.com/zauner/vvvv.js/tree/webgl_plus_realtime_patching .
Many of the bugs you met in 0.1.2 should be gone there. You'll find
many new ones there, though :)
Reply all
Reply to author
Forward
Message has been deleted
0 new messages