doc.js; clean up index
This commit is contained in:
@@ -1,3 +1,66 @@
|
||||
Prosperon is built in a code-first fashion. Games in it are written with javascript, mostly up to, but not including, ES6. The nicest way to use it is to heavily abuse inherited properties and closures.
|
||||
Prosperon is an opinionated Javascript-based runtime for making games, quickly. It is NOT web compatible, and doesn't intend to be. It uses a hefty dosing of ideas from the Misty language, to make an easy and intuitive way to make virtual worlds.
|
||||
|
||||
It provides a very high level way of rendering, which it translates to a variety of backends.
|
||||
With Javascript's C-like syntax, it makes it easy to make classic style games like Pacman or Fantasy Zone, without diving into Unity, Godot or Unreal Engine.
|
||||
|
||||
# Gradual performance
|
||||
Prosperon makes it easy to make something quickly, and if it runs well, you're golden! But if it's slow, there are a plethora of options to make it faster. Plus, with native C plugins, there is nothing that can't be figured out.
|
||||
|
||||
# API
|
||||
~~prosperon master
|
||||
Here are the modules that can be included via 'use'.
|
||||
|
||||
// global syntax level things
|
||||
|
||||
|
||||
// core
|
||||
prosperon
|
||||
input
|
||||
json
|
||||
layout
|
||||
resources
|
||||
sound
|
||||
std
|
||||
time
|
||||
search
|
||||
color
|
||||
tween
|
||||
util
|
||||
io
|
||||
os
|
||||
|
||||
// rendering
|
||||
draw2d
|
||||
render
|
||||
graphics
|
||||
|
||||
// game components
|
||||
emitter
|
||||
sprite
|
||||
transform
|
||||
|
||||
// math
|
||||
pmath
|
||||
vector
|
||||
geometry
|
||||
|
||||
|
||||
~~prosperon dev
|
||||
convert
|
||||
debug
|
||||
diff
|
||||
nogame
|
||||
parseq
|
||||
path
|
||||
physics
|
||||
gizmos
|
||||
log
|
||||
stats
|
||||
stdprofile
|
||||
stdtest
|
||||
test
|
||||
textedit
|
||||
editor
|
||||
yaml
|
||||
spline
|
||||
profile
|
||||
sim
|
||||
@@ -252,5 +252,7 @@ debug.break_var = function(obj,vars)
|
||||
});
|
||||
}
|
||||
|
||||
debug.doc = Symbol()
|
||||
|
||||
return debug
|
||||
|
||||
|
||||
3
scripts/doc.js
Normal file
3
scripts/doc.js
Normal file
@@ -0,0 +1,3 @@
|
||||
var ret = {}
|
||||
ret.sym = Symbol()
|
||||
return ret
|
||||
@@ -497,5 +497,6 @@ var search = use('search')
|
||||
|
||||
actor[UNDERLINGS] = new Set()
|
||||
|
||||
|
||||
globalThis.mixin("color");
|
||||
globalThis.mixin("std")
|
||||
|
||||
@@ -3,9 +3,13 @@ var tween = use('tween')
|
||||
var io = use('io')
|
||||
var res = use('resources')
|
||||
|
||||
var doc = use('doc')
|
||||
|
||||
soloud.init();
|
||||
|
||||
var audio = {};
|
||||
audio[doc.sym] = `Audio docs.`
|
||||
|
||||
var pcms = {};
|
||||
|
||||
audio.pcm = function pcm(file)
|
||||
@@ -23,6 +27,7 @@ audio.play = function play(file) {
|
||||
if (!pcm) return;
|
||||
return soloud.play(pcm);
|
||||
};
|
||||
audio.play[doc.sym] = `Given a file path, plays a sound. Returns a sound object.`
|
||||
|
||||
audio.cry = function cry(file) {
|
||||
var voice = audio.play(file);
|
||||
@@ -32,6 +37,8 @@ audio.cry = function cry(file) {
|
||||
voice = undefined;
|
||||
}
|
||||
};
|
||||
audio.cry[doc.sym] =
|
||||
`Given a file path, plays a sound. Invoke the returned object to stop it.`
|
||||
|
||||
var song;
|
||||
|
||||
@@ -65,5 +72,6 @@ audio.music = function music(file, fade = 0.5) {
|
||||
song = temp;
|
||||
song.loop = true;
|
||||
};
|
||||
audio.music[doc.sym] = `Play the given music file, with an optional cross fade. The song will loop. When this is invoked again, the previous music is replaced.`
|
||||
|
||||
return audio;
|
||||
|
||||
Reference in New Issue
Block a user