Closed gabrielflorit closed 12 years ago
I was looking at javacscript import and export statements, but that doesn't look like quite the right thing:
http://w3resource.com/javascript/statements/import.php
Here's the craftyjs library:
http://heanet.dl.sourceforge.net/project/learningprocess/crafty-min.js
which would usually be pulled in by a statement like this:
<script type="text/javascript" src="assets/crafty-min.js"></script>
or something.
I guess the immediate question for me is how are you pulling in the d3 library? I see you have some js libraries pulled in at the bottom of the page:
what would be cool would be having a separate "library" tab like you now have a separate tab for "css" and in that library tab you could just put a list of js libraries that should also be pulled into the page ...?
CHEERS> SAM
Loading external libraries is easy - see this: http://livecoding.gabrielflor.it/3098870
Also reproduced here:
var url = 'http://cdn.craftycomponents.com/crafty-release.js';
// only retrieve above script once
$.ajaxSetup({
cache: true
});
$.getScript(url, function(a, b, c) {
// your game code here
});
very cool!
can I share that with the crafty folks, or is that new interface still under wraps?
Many thanks in advance CHEERS> SAM
On 7/12/12 4:30 PM, Gabriel Florit wrote:
Loading external libraries is easy - see this: http://livecoding.gabrielflor.it/3098870
Also reproduced here:
var url = 'http://cdn.craftycomponents.com/crafty-release.js'; // only retrieve above script once $.ajaxSetup({ cache: true }); $.getScript(url, function(a, b, c) { // your game code here });
Reply to this email directly or view it on GitHub: https://github.com/gabrielflorit/livecoding/issues/21#issuecomment-6938373
Sam's Technical Blog http://linklens.blogspot.com
Definitely - livecoding is now public. Share away!
from tansaku: