feature: add circuitjs
@@ -0,0 +1,427 @@
|
||||
var $wnd = $wnd || window.parent;
|
||||
var __gwtModuleFunction = $wnd.circuitjs1;
|
||||
var $sendStats = __gwtModuleFunction.__sendStats;
|
||||
$sendStats('moduleStartup', 'moduleEvalStart');
|
||||
var $gwt_version = "2.8.2";
|
||||
var $strongName = '';
|
||||
var $gwt = {};
|
||||
var $doc = $wnd.document;
|
||||
var $moduleName, $moduleBase;
|
||||
function __gwtStartLoadingFragment(frag) {
|
||||
var fragFile = 'deferredjs/' + $strongName + '/' + frag + '.cache.js';
|
||||
return __gwtModuleFunction.__startLoadingFragment(fragFile);
|
||||
}
|
||||
function __gwtInstallCode(code) {return __gwtModuleFunction.__installRunAsyncCode(code);}
|
||||
function __gwt_isKnownPropertyValue(propName, propValue) {
|
||||
return __gwtModuleFunction.__gwt_isKnownPropertyValue(propName, propValue);
|
||||
}
|
||||
function __gwt_getMetaProperty(name) {
|
||||
return __gwtModuleFunction.__gwt_getMetaProperty(name);
|
||||
}
|
||||
var $stats = $wnd.__gwtStatsEvent ? function(a) {
|
||||
return $wnd.__gwtStatsEvent && $wnd.__gwtStatsEvent(a);
|
||||
} : null;
|
||||
var $sessionId = $wnd.__gwtStatsSessionId ? $wnd.__gwtStatsSessionId : null;
|
||||
/******************************************************************************
|
||||
* Variables used by the Plugin
|
||||
*****************************************************************************/
|
||||
var $entry;
|
||||
var $hostedHtmlVersion="2.1";
|
||||
|
||||
var $errFn;
|
||||
var $moduleName;
|
||||
var $moduleBase;
|
||||
var __gwt_getProperty;
|
||||
|
||||
/******************************************************************************
|
||||
* WRITE ME - what does this invokes stuff do??? Probably related to invoking
|
||||
* calls...
|
||||
*****************************************************************************/
|
||||
var __gwt_javaInvokes = [];
|
||||
|
||||
// Wrapper to call JS methods, which we need both to be able to supply a
|
||||
// different this for method lookup and to get the exception back
|
||||
function __gwt_jsInvoke(thisObj, methodName) {
|
||||
try {
|
||||
var args = Array.prototype.slice.call(arguments, 2);
|
||||
return [0, window[methodName].apply(thisObj, args)];
|
||||
} catch (e) {
|
||||
return [1, e];
|
||||
}
|
||||
}
|
||||
|
||||
function __gwt_makeJavaInvoke(argCount) {
|
||||
return __gwt_javaInvokes[argCount] || __gwt_doMakeJavaInvoke(argCount);
|
||||
}
|
||||
|
||||
function __gwt_doMakeJavaInvoke(argCount) {
|
||||
// IE6 won't eval() anonymous functions except as r-values
|
||||
var argList = "";
|
||||
for (var i = 0; i < argCount; i++) {
|
||||
argList += ",p" + i;
|
||||
}
|
||||
var argListNoComma = argList.substring(1);
|
||||
|
||||
return eval(
|
||||
"__gwt_javaInvokes[" + argCount + "] =\n" +
|
||||
" function(thisObj, dispId" + argList + ") {\n" +
|
||||
" var result = __static(dispId, thisObj" + argList + ");\n" +
|
||||
" if (result[0]) {\n" +
|
||||
" throw result[1];\n" +
|
||||
" } else {\n" +
|
||||
" return result[1];\n" +
|
||||
" }\n" +
|
||||
" }\n"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Functions used to create tear-offs of Java methods. Each function corresponds
|
||||
* to exactly one dispId, and also embeds the argument count. We get the "this"
|
||||
* value from the context in which the function is being executed.
|
||||
* Function-object identity is preserved by caching in a sparse array.
|
||||
*****************************************************************************/
|
||||
var __gwt_tearOffs = [];
|
||||
var __gwt_tearOffGenerators = [];
|
||||
function __gwt_makeTearOff(proxy, dispId, argCount) {
|
||||
return __gwt_tearOffs[dispId] || __gwt_doMakeTearOff(dispId, argCount);
|
||||
}
|
||||
|
||||
function __gwt_doMakeTearOff(dispId, argCount) {
|
||||
return __gwt_tearOffs[dispId] =
|
||||
(__gwt_tearOffGenerators[argCount] || __gwt_doMakeTearOffGenerator(argCount))(dispId);
|
||||
}
|
||||
|
||||
function __gwt_doMakeTearOffGenerator(argCount) {
|
||||
// IE6 won't eval() anonymous functions except as r-values
|
||||
var argList = "";
|
||||
for (var i = 0; i < argCount; i++) {
|
||||
argList += ",p" + i;
|
||||
}
|
||||
var argListNoComma = argList.substring(1);
|
||||
|
||||
return eval(
|
||||
"__gwt_tearOffGenerators[" + argCount + "] =\n" +
|
||||
" function(dispId) {\n" +
|
||||
" return function(" + argListNoComma + ") {\n" +
|
||||
" var result = __static(dispId, this" + argList + ");\n" +
|
||||
" if (result[0]) {\n" +
|
||||
" throw result[1];\n" +
|
||||
" } else {\n" +
|
||||
" return result[1];\n" +
|
||||
" }\n" +
|
||||
" }\n" +
|
||||
" }\n"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*Code to give visual feedback when something goes wrong in Dev Mode
|
||||
*****************************************************************************/
|
||||
function __gwt_disconnected() {
|
||||
// Prevent double-invocation.
|
||||
window.__gwt_disconnected = new Function();
|
||||
// Do it in a timeout so we can be sure we have a clean stack.
|
||||
window.setTimeout(__gwt_disconnected_impl, 1);
|
||||
}
|
||||
|
||||
function __gwt_disconnected_impl() {
|
||||
__gwt_displayGlassMessage('GWT Code Server Disconnected',
|
||||
'Most likely, you closed GWT Development Mode. Or, you might have lost '
|
||||
+ 'network connectivity. To fix this, try restarting GWT Development Mode and '
|
||||
+ 'refresh this page.');
|
||||
}
|
||||
|
||||
// Keep track of z-index to allow layering of multiple glass messages
|
||||
var __gwt_glassMessageZIndex = 2147483647;
|
||||
|
||||
// Note this method is also used by ModuleSpace.java
|
||||
function __gwt_displayGlassMessage(summary, details) {
|
||||
var topWin = window.top;
|
||||
var topDoc = topWin.document;
|
||||
var outer = topDoc.createElement("div");
|
||||
// Do not insert whitespace or outer.firstChild will get a text node.
|
||||
outer.innerHTML =
|
||||
'<div style="position:absolute;z-index:' + __gwt_glassMessageZIndex-- +
|
||||
';left:50px;top:50px;width:600px;color:#FFF;font-family:verdana;text-align:left;">' +
|
||||
'<div style="font-size:30px;font-weight:bold;">' + summary + '</div>' +
|
||||
'<div style="font-size:15px;">' + details + '</div>' +
|
||||
'</div>' +
|
||||
'<div style="position:absolute;z-index:' + __gwt_glassMessageZIndex-- +
|
||||
';left:0px;top:0px;right:0px;bottom:0px;filter:alpha(opacity=60);opacity:0.6;background-color:#000;"></div>'
|
||||
;
|
||||
topDoc.body.appendChild(outer);
|
||||
var glass = outer.firstChild;
|
||||
var glassStyle = glass.style;
|
||||
|
||||
// Scroll to the top and remove scrollbars.
|
||||
topWin.scrollTo(0, 0);
|
||||
if (topDoc.compatMode == "BackCompat") {
|
||||
topDoc.body.style["overflow"] = "hidden";
|
||||
} else {
|
||||
topDoc.documentElement.style["overflow"] = "hidden";
|
||||
}
|
||||
|
||||
// Steal focus.
|
||||
glass.focus();
|
||||
|
||||
if ((navigator.userAgent.indexOf("MSIE") >= 0) && (topDoc.compatMode == "BackCompat")) {
|
||||
// IE quirks mode doesn't support right/bottom, but does support this.
|
||||
glassStyle.width = "125%";
|
||||
glassStyle.height = "100%";
|
||||
} else if (navigator.userAgent.indexOf("MSIE 6") >= 0) {
|
||||
// IE6 doesn't have a real standards mode, so we have to use hacks.
|
||||
glassStyle.width = "125%"; // Get past scroll bar area.
|
||||
// Nasty CSS; onresize would be better but the outer window won't let us add a listener IE.
|
||||
glassStyle.setExpression("height", "document.documentElement.clientHeight");
|
||||
}
|
||||
|
||||
$doc.title = summary + " [" + $doc.title + "]";
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Other functions called by the Plugin
|
||||
*****************************************************************************/
|
||||
function __gwt_makeResult(isException, result) {
|
||||
return [isException, result];
|
||||
}
|
||||
|
||||
//should be prefixed with "__gwt_"
|
||||
function fireOnModuleLoadStart(className) {
|
||||
$sendStats("moduleStartup", "onModuleLoadStart");
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Helper functions for the Development Mode startup code. Listed alphabetically
|
||||
*****************************************************************************/
|
||||
function doBrowserSpecificFixes() {
|
||||
var ua = navigator.userAgent.toLowerCase();
|
||||
if (ua.indexOf("gecko") != -1) {
|
||||
// install eval wrapper on FF to avoid EvalError problem
|
||||
var __eval = window.eval;
|
||||
window.eval = function(s) {
|
||||
return __eval(s);
|
||||
}
|
||||
}
|
||||
if (ua.indexOf("chrome") != -1) {
|
||||
// work around __gwt_ObjectId appearing in JS objects
|
||||
var hop = window.Object.prototype.hasOwnProperty;
|
||||
window.Object.prototype.hasOwnProperty = function(prop) {
|
||||
return prop != "__gwt_ObjectId" && hop.call(this, prop);
|
||||
};
|
||||
var hop2 = window.Object.prototype.propertyIsEnumerable;
|
||||
window.Object.prototype.propertyIsEnumerable = function(prop) {
|
||||
return prop != "__gwt_ObjectId" && hop2.call(this, prop);
|
||||
};
|
||||
// do the same in the main window if it is different from our window
|
||||
if ($wnd != window) {
|
||||
var hop3 = $wnd.Object.prototype.hasOwnProperty;
|
||||
$wnd.Object.prototype.hasOwnProperty = function(prop) {
|
||||
return prop != "__gwt_ObjectId" && hop3.call(this, prop);
|
||||
};
|
||||
var hop4 = $wnd.Object.prototype.propertyIsEnumerable;
|
||||
$wnd.Object.prototype.propertyIsEnumerable = function(prop) {
|
||||
return prop != "__gwt_ObjectId" && hop4.call(this, prop);
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function embedPlugin() {
|
||||
var embed = document.createElement('embed');
|
||||
embed.id = 'pluginEmbed';
|
||||
embed.type = 'application/x-gwt-hosted-mode';
|
||||
embed.width = '10';
|
||||
embed.height = '20';
|
||||
|
||||
var obj = document.createElement('object');
|
||||
obj.id = 'pluginObject';
|
||||
obj.classid = 'clsid:1D6156B6-002B-49E7-B5CA-C138FB843B4E';
|
||||
|
||||
document.body.appendChild(embed);
|
||||
document.body.appendChild(obj);
|
||||
}
|
||||
|
||||
function findPluginObject() {
|
||||
try {
|
||||
return document.getElementById('pluginObject');
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function findPluginEmbed() {
|
||||
try {
|
||||
return document.getElementById('pluginEmbed')
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function findPluginXPCOM() {
|
||||
try {
|
||||
return __gwt_HostedModePlugin;
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
function getCodeServer() {
|
||||
var server = "localhost:9997";
|
||||
var query = $wnd.location.search;
|
||||
var idx = query.indexOf("gwt.codesvr=");
|
||||
if (idx >= 0) {
|
||||
idx += 12; // "gwt.codesvr=".length == 12
|
||||
} else {
|
||||
idx = query.indexOf("gwt.codesvr.circuitjs1=");
|
||||
idx += (13 + "circuitjs1".length); //
|
||||
}
|
||||
if (idx >= 0) {
|
||||
var amp = query.indexOf("&", idx);
|
||||
if (amp >= 0) {
|
||||
server = query.substring(idx, amp);
|
||||
} else {
|
||||
server = query.substring(idx);
|
||||
}
|
||||
// According to RFC 3986, some of this component's characters (e.g., ':')
|
||||
// are reserved and *may* be escaped.
|
||||
return decodeURIComponent(server);
|
||||
}
|
||||
}
|
||||
|
||||
function generateSessionId() {
|
||||
var ASCII_EXCLAMATION = 33;
|
||||
var ASCII_TILDE = 126;
|
||||
var chars = [];
|
||||
for (var i = 0; i < 16; ++i) {
|
||||
chars.push(Math.floor(ASCII_EXCLAMATION
|
||||
+ Math.random() * (ASCII_TILDE - ASCII_EXCLAMATION + 1)));
|
||||
}
|
||||
return String.fromCharCode.apply(null, chars);
|
||||
}
|
||||
|
||||
function loadIframe(url) {
|
||||
var topDoc = window.top.document;
|
||||
|
||||
// create an iframe
|
||||
var iframeDiv = topDoc.createElement("div");
|
||||
iframeDiv.innerHTML = "<iframe scrolling=no frameborder=0 src='" + url + "'>";
|
||||
var iframe = iframeDiv.firstChild;
|
||||
|
||||
// mess with the iframe style a little
|
||||
var iframeStyle = iframe.style;
|
||||
iframeStyle.position = "absolute";
|
||||
iframeStyle.borderWidth = "0";
|
||||
iframeStyle.left = "0";
|
||||
iframeStyle.top = "0";
|
||||
iframeStyle.width = "100%";
|
||||
iframeStyle.backgroundColor = "#ffffff";
|
||||
iframeStyle.zIndex = "1";
|
||||
iframeStyle.height = "100%";
|
||||
|
||||
// update the top window's document's body's style
|
||||
var hostBodyStyle = window.top.document.body.style;
|
||||
hostBodyStyle.margin = "0";
|
||||
hostBodyStyle.height = iframeStyle.height;
|
||||
hostBodyStyle.overflow = "hidden";
|
||||
|
||||
// insert the iframe
|
||||
topDoc.body.insertBefore(iframe, topDoc.body.firstChild);
|
||||
}
|
||||
|
||||
function pluginConnectionError(codeServer) {
|
||||
__gwt_displayGlassMessage(
|
||||
"Plugin failed to connect to Development Mode server at " + simpleEscape(codeServer),
|
||||
"Follow the troubleshooting instructions at "
|
||||
+ "<a href='http://code.google.com/p/google-web-toolkit/wiki/TroubleshootingOOPHM'>"
|
||||
+ "http://code.google.com/p/google-web-toolkit/wiki/TroubleshootingOOPHM</a>");
|
||||
if ($errFn) {
|
||||
$errFn($moduleName);
|
||||
}
|
||||
}
|
||||
|
||||
function simpleEscape(originalString) {
|
||||
return originalString.replace(/&/g,"&")
|
||||
.replace(/</g,"<")
|
||||
.replace(/>/g,">")
|
||||
.replace(/\'/g, "'")
|
||||
.replace(/\"/g,""");
|
||||
}
|
||||
|
||||
function tryConnectingToPlugin(sessionId, url) {
|
||||
// Note that the order is important
|
||||
var pluginFinders = [findPluginXPCOM, findPluginObject, findPluginEmbed];
|
||||
var codeServer = getCodeServer();
|
||||
var plugin = null;
|
||||
for (var i = 0; i < pluginFinders.length; ++i) {
|
||||
try {
|
||||
var maybePlugin = pluginFinders[i]();
|
||||
if (maybePlugin != null && maybePlugin.init(window)) {
|
||||
plugin = maybePlugin;
|
||||
break;
|
||||
}
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
|
||||
if (plugin == null) {
|
||||
// Plugin initialization failed. Show the missing-plugin page.
|
||||
return null;
|
||||
}
|
||||
if (!plugin.connect(url, sessionId, codeServer, $moduleName,
|
||||
$hostedHtmlVersion)) {
|
||||
// Connection failed. Show the error alert and troubleshooting page.
|
||||
pluginConnectionError(codeServer);
|
||||
}
|
||||
|
||||
return plugin;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Development Mode startup code
|
||||
*****************************************************************************/
|
||||
function gwtOnLoad(errFn, moduleName, moduleBase, softPermutationId, computePropValue) {
|
||||
$errFn = errFn;
|
||||
$moduleName = moduleName;
|
||||
$moduleBase = moduleBase;
|
||||
__gwt_getProperty = computePropValue;
|
||||
|
||||
doBrowserSpecificFixes();
|
||||
|
||||
if (!findPluginXPCOM()) {
|
||||
embedPlugin();
|
||||
}
|
||||
|
||||
var topWin = window.top;
|
||||
if (!topWin.__gwt_SessionID) {
|
||||
topWin.__gwt_SessionID = generateSessionId();
|
||||
}
|
||||
|
||||
var plugin = tryConnectingToPlugin(topWin.__gwt_SessionID, topWin.location.href);
|
||||
if (plugin == null) {
|
||||
loadIframe("http://www.gwtproject.org/missing-plugin/");
|
||||
} else {
|
||||
// take over the onunload function, wrapping any existing call if it exists
|
||||
var oldUnload = window.onunload;
|
||||
window.onunload = function() {
|
||||
// run wrapped unload first in case it is running gwt code
|
||||
!!oldUnload && oldUnload();
|
||||
try {
|
||||
// wrap in try/catch since plugins are not required to supply this
|
||||
plugin.disconnect();
|
||||
} catch (e) {
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
$sendStats('moduleStartup', 'moduleEvalEnd');
|
||||
gwtOnLoad(__gwtModuleFunction.__errFn, __gwtModuleFunction.__moduleName, __gwtModuleFunction.__moduleBase, __gwtModuleFunction.__softPermutationId,__gwtModuleFunction.__computePropValue);
|
||||
$sendStats('moduleStartup', 'end');
|
||||
$gwt && $gwt.permProps && __gwtModuleFunction.__moduleStartupDone($gwt.permProps);
|
||||
//# sourceURL=circuitjs1-0.js
|
||||
|
||||
@@ -0,0 +1,457 @@
|
||||
function circuitjs1(){
|
||||
var $wnd_0 = window;
|
||||
var $doc_0 = document;
|
||||
sendStats('bootstrap', 'begin');
|
||||
function isHostedMode(){
|
||||
var query = $wnd_0.location.search;
|
||||
return query.indexOf('gwt.codesvr.circuitjs1=') != -1 || query.indexOf('gwt.codesvr=') != -1;
|
||||
}
|
||||
|
||||
function sendStats(evtGroupString, typeString){
|
||||
if ($wnd_0.__gwtStatsEvent) {
|
||||
$wnd_0.__gwtStatsEvent({moduleName:'circuitjs1', sessionId:$wnd_0.__gwtStatsSessionId, subSystem:'startup', evtGroup:evtGroupString, millis:(new Date).getTime(), type:typeString});
|
||||
}
|
||||
}
|
||||
|
||||
circuitjs1.__sendStats = sendStats;
|
||||
circuitjs1.__moduleName = 'circuitjs1';
|
||||
circuitjs1.__errFn = null;
|
||||
circuitjs1.__moduleBase = 'DUMMY';
|
||||
circuitjs1.__softPermutationId = 0;
|
||||
circuitjs1.__computePropValue = null;
|
||||
circuitjs1.__getPropMap = null;
|
||||
circuitjs1.__installRunAsyncCode = function(){
|
||||
}
|
||||
;
|
||||
circuitjs1.__gwtStartLoadingFragment = function(){
|
||||
return null;
|
||||
}
|
||||
;
|
||||
circuitjs1.__gwt_isKnownPropertyValue = function(){
|
||||
return false;
|
||||
}
|
||||
;
|
||||
circuitjs1.__gwt_getMetaProperty = function(){
|
||||
return null;
|
||||
}
|
||||
;
|
||||
var __propertyErrorFunction = null;
|
||||
var activeModules = $wnd_0.__gwt_activeModules = $wnd_0.__gwt_activeModules || {};
|
||||
activeModules['circuitjs1'] = {moduleName:'circuitjs1'};
|
||||
circuitjs1.__moduleStartupDone = function(permProps){
|
||||
var oldBindings = activeModules['circuitjs1'].bindings;
|
||||
activeModules['circuitjs1'].bindings = function(){
|
||||
var props = oldBindings?oldBindings():{};
|
||||
var embeddedProps = permProps[circuitjs1.__softPermutationId];
|
||||
for (var i = 0; i < embeddedProps.length; i++) {
|
||||
var pair = embeddedProps[i];
|
||||
props[pair[0]] = pair[1];
|
||||
}
|
||||
return props;
|
||||
}
|
||||
;
|
||||
}
|
||||
;
|
||||
var frameDoc;
|
||||
function getInstallLocationDoc(){
|
||||
setupInstallLocation();
|
||||
return frameDoc;
|
||||
}
|
||||
|
||||
function setupInstallLocation(){
|
||||
if (frameDoc) {
|
||||
return;
|
||||
}
|
||||
var scriptFrame = $doc_0.createElement('iframe');
|
||||
scriptFrame.id = 'circuitjs1';
|
||||
scriptFrame.style.cssText = 'position:absolute; width:0; height:0; border:none; left: -1000px;' + ' top: -1000px;';
|
||||
scriptFrame.tabIndex = -1;
|
||||
$doc_0.body.appendChild(scriptFrame);
|
||||
frameDoc = scriptFrame.contentWindow.document;
|
||||
frameDoc.open();
|
||||
var doctype = document.compatMode == 'CSS1Compat'?'<!doctype html>':'';
|
||||
frameDoc.write(doctype + '<html><head><\/head><body><\/body><\/html>');
|
||||
frameDoc.close();
|
||||
}
|
||||
|
||||
function installScript(filename){
|
||||
function setupWaitForBodyLoad(callback){
|
||||
function isBodyLoaded(){
|
||||
if (typeof $doc_0.readyState == 'undefined') {
|
||||
return typeof $doc_0.body != 'undefined' && $doc_0.body != null;
|
||||
}
|
||||
return /loaded|complete/.test($doc_0.readyState);
|
||||
}
|
||||
|
||||
var bodyDone = isBodyLoaded();
|
||||
if (bodyDone) {
|
||||
callback();
|
||||
return;
|
||||
}
|
||||
function checkBodyDone(){
|
||||
if (!bodyDone) {
|
||||
if (!isBodyLoaded()) {
|
||||
return;
|
||||
}
|
||||
bodyDone = true;
|
||||
callback();
|
||||
if ($doc_0.removeEventListener) {
|
||||
$doc_0.removeEventListener('readystatechange', checkBodyDone, false);
|
||||
}
|
||||
if (onBodyDoneTimerId) {
|
||||
clearInterval(onBodyDoneTimerId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($doc_0.addEventListener) {
|
||||
$doc_0.addEventListener('readystatechange', checkBodyDone, false);
|
||||
}
|
||||
var onBodyDoneTimerId = setInterval(function(){
|
||||
checkBodyDone();
|
||||
}
|
||||
, 10);
|
||||
}
|
||||
|
||||
function installCode(code_0){
|
||||
var doc = getInstallLocationDoc();
|
||||
var docbody = doc.body;
|
||||
var script = doc.createElement('script');
|
||||
script.language = 'javascript';
|
||||
script.src = code_0;
|
||||
if (circuitjs1.__errFn) {
|
||||
script.onerror = function(){
|
||||
circuitjs1.__errFn('circuitjs1', new Error('Failed to load ' + code_0));
|
||||
}
|
||||
;
|
||||
}
|
||||
docbody.appendChild(script);
|
||||
sendStats('moduleStartup', 'scriptTagAdded');
|
||||
}
|
||||
|
||||
sendStats('moduleStartup', 'moduleRequested');
|
||||
setupWaitForBodyLoad(function(){
|
||||
installCode(filename);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
circuitjs1.__startLoadingFragment = function(fragmentFile){
|
||||
return computeUrlForResource(fragmentFile);
|
||||
}
|
||||
;
|
||||
circuitjs1.__installRunAsyncCode = function(code_0){
|
||||
var doc = getInstallLocationDoc();
|
||||
var docbody = doc.body;
|
||||
var script = doc.createElement('script');
|
||||
script.language = 'javascript';
|
||||
script.text = code_0;
|
||||
docbody.appendChild(script);
|
||||
}
|
||||
;
|
||||
function processMetas(){
|
||||
var metaProps = {};
|
||||
var propertyErrorFunc;
|
||||
var onLoadErrorFunc;
|
||||
var metas = $doc_0.getElementsByTagName('meta');
|
||||
for (var i = 0, n = metas.length; i < n; ++i) {
|
||||
var meta = metas[i], name_1 = meta.getAttribute('name'), content_0;
|
||||
if (name_1) {
|
||||
name_1 = name_1.replace('circuitjs1::', '');
|
||||
if (name_1.indexOf('::') >= 0) {
|
||||
continue;
|
||||
}
|
||||
if (name_1 == 'gwt:property') {
|
||||
content_0 = meta.getAttribute('content');
|
||||
if (content_0) {
|
||||
var value_1, eq = content_0.indexOf('=');
|
||||
if (eq >= 0) {
|
||||
name_1 = content_0.substring(0, eq);
|
||||
value_1 = content_0.substring(eq + 1);
|
||||
}
|
||||
else {
|
||||
name_1 = content_0;
|
||||
value_1 = '';
|
||||
}
|
||||
metaProps[name_1] = value_1;
|
||||
}
|
||||
}
|
||||
else if (name_1 == 'gwt:onPropertyErrorFn') {
|
||||
content_0 = meta.getAttribute('content');
|
||||
if (content_0) {
|
||||
try {
|
||||
propertyErrorFunc = eval(content_0);
|
||||
}
|
||||
catch (e) {
|
||||
alert('Bad handler "' + content_0 + '" for "gwt:onPropertyErrorFn"');
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (name_1 == 'gwt:onLoadErrorFn') {
|
||||
content_0 = meta.getAttribute('content');
|
||||
if (content_0) {
|
||||
try {
|
||||
onLoadErrorFunc = eval(content_0);
|
||||
}
|
||||
catch (e) {
|
||||
alert('Bad handler "' + content_0 + '" for "gwt:onLoadErrorFn"');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
__gwt_getMetaProperty = function(name_0){
|
||||
var value_0 = metaProps[name_0];
|
||||
return value_0 == null?null:value_0;
|
||||
}
|
||||
;
|
||||
__propertyErrorFunction = propertyErrorFunc;
|
||||
circuitjs1.__errFn = onLoadErrorFunc;
|
||||
}
|
||||
|
||||
function computeScriptBase(){
|
||||
function getDirectoryOfFile(path){
|
||||
var hashIndex = path.lastIndexOf('#');
|
||||
if (hashIndex == -1) {
|
||||
hashIndex = path.length;
|
||||
}
|
||||
var queryIndex = path.indexOf('?');
|
||||
if (queryIndex == -1) {
|
||||
queryIndex = path.length;
|
||||
}
|
||||
var slashIndex = path.lastIndexOf('/', Math.min(queryIndex, hashIndex));
|
||||
return slashIndex >= 0?path.substring(0, slashIndex + 1):'';
|
||||
}
|
||||
|
||||
function ensureAbsoluteUrl(url_0){
|
||||
if (url_0.match(/^\w+:\/\//)) {
|
||||
}
|
||||
else {
|
||||
var img = $doc_0.createElement('img');
|
||||
img.src = url_0 + 'clear.cache.gif';
|
||||
url_0 = getDirectoryOfFile(img.src);
|
||||
}
|
||||
return url_0;
|
||||
}
|
||||
|
||||
function tryMetaTag(){
|
||||
var metaVal = __gwt_getMetaProperty('baseUrl');
|
||||
if (metaVal != null) {
|
||||
return metaVal;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
function tryNocacheJsTag(){
|
||||
var scriptTags = $doc_0.getElementsByTagName('script');
|
||||
for (var i = 0; i < scriptTags.length; ++i) {
|
||||
if (scriptTags[i].src.indexOf('circuitjs1.nocache.js') != -1) {
|
||||
return getDirectoryOfFile(scriptTags[i].src);
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
function tryBaseTag(){
|
||||
var baseElements = $doc_0.getElementsByTagName('base');
|
||||
if (baseElements.length > 0) {
|
||||
return baseElements[baseElements.length - 1].href;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
function isLocationOk(){
|
||||
var loc = $doc_0.location;
|
||||
return loc.href == loc.protocol + '//' + loc.host + loc.pathname + loc.search + loc.hash;
|
||||
}
|
||||
|
||||
var tempBase = tryMetaTag();
|
||||
if (tempBase == '') {
|
||||
tempBase = tryNocacheJsTag();
|
||||
}
|
||||
if (tempBase == '') {
|
||||
tempBase = tryBaseTag();
|
||||
}
|
||||
if (tempBase == '' && isLocationOk()) {
|
||||
tempBase = getDirectoryOfFile($doc_0.location.href);
|
||||
}
|
||||
tempBase = ensureAbsoluteUrl(tempBase);
|
||||
return tempBase;
|
||||
}
|
||||
|
||||
function computeUrlForResource(resource){
|
||||
if (resource.match(/^\//)) {
|
||||
return resource;
|
||||
}
|
||||
if (resource.match(/^[a-zA-Z]+:\/\//)) {
|
||||
return resource;
|
||||
}
|
||||
return circuitjs1.__moduleBase + resource;
|
||||
}
|
||||
|
||||
function getCompiledCodeFilename(){
|
||||
var answers = [];
|
||||
var softPermutationId = 0;
|
||||
function unflattenKeylistIntoAnswers(propValArray, value_0){
|
||||
var answer = answers;
|
||||
for (var i = 0, n = propValArray.length - 1; i < n; ++i) {
|
||||
answer = answer[propValArray[i]] || (answer[propValArray[i]] = []);
|
||||
}
|
||||
answer[propValArray[n]] = value_0;
|
||||
}
|
||||
|
||||
var values = [];
|
||||
var providers = [];
|
||||
function computePropValue(propName){
|
||||
var value_0 = providers[propName](), allowedValuesMap = values[propName];
|
||||
if (value_0 in allowedValuesMap) {
|
||||
return value_0;
|
||||
}
|
||||
var allowedValuesList = [];
|
||||
for (var k in allowedValuesMap) {
|
||||
allowedValuesList[allowedValuesMap[k]] = k;
|
||||
}
|
||||
if (__propertyErrorFunction) {
|
||||
__propertyErrorFunction(propName, allowedValuesList, value_0);
|
||||
}
|
||||
throw null;
|
||||
}
|
||||
|
||||
providers['user.agent'] = function(){
|
||||
var ua = navigator.userAgent.toLowerCase();
|
||||
var docMode = $doc_0.documentMode;
|
||||
if (function(){
|
||||
return ua.indexOf('webkit') != -1;
|
||||
}
|
||||
())
|
||||
return 'safari';
|
||||
if (function(){
|
||||
return ua.indexOf('msie') != -1 && (docMode >= 10 && docMode < 11);
|
||||
}
|
||||
())
|
||||
return 'ie10';
|
||||
if (function(){
|
||||
return ua.indexOf('msie') != -1 && (docMode >= 9 && docMode < 11);
|
||||
}
|
||||
())
|
||||
return 'ie9';
|
||||
if (function(){
|
||||
return ua.indexOf('msie') != -1 && (docMode >= 8 && docMode < 11);
|
||||
}
|
||||
())
|
||||
return 'ie8';
|
||||
if (function(){
|
||||
return ua.indexOf('gecko') != -1 || docMode >= 11;
|
||||
}
|
||||
())
|
||||
return 'gecko1_8';
|
||||
return '';
|
||||
}
|
||||
;
|
||||
values['user.agent'] = {'gecko1_8':0, 'ie10':1, 'ie8':2, 'ie9':3, 'safari':4};
|
||||
__gwt_isKnownPropertyValue = function(propName, propValue){
|
||||
return propValue in values[propName];
|
||||
}
|
||||
;
|
||||
circuitjs1.__getPropMap = function(){
|
||||
var result = {};
|
||||
for (var key in values) {
|
||||
if (values.hasOwnProperty(key)) {
|
||||
result[key] = computePropValue(key);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
;
|
||||
circuitjs1.__computePropValue = computePropValue;
|
||||
$wnd_0.__gwt_activeModules['circuitjs1'].bindings = circuitjs1.__getPropMap;
|
||||
sendStats('bootstrap', 'selectingPermutation');
|
||||
if (isHostedMode()) {
|
||||
return computeUrlForResource('circuitjs1.devmode.js');
|
||||
}
|
||||
var strongName;
|
||||
try {
|
||||
unflattenKeylistIntoAnswers(['ie8'], '51DA24461737C50588189FA6B0A94F38');
|
||||
unflattenKeylistIntoAnswers(['safari'], '6E2C3288080E47155F0CB57AC9BEE7D4');
|
||||
unflattenKeylistIntoAnswers(['gecko1_8'], 'BC742D0F75A0DDA72202A7CE15FFB7F2');
|
||||
unflattenKeylistIntoAnswers(['ie9'], 'D0183F5867CEFCD814BA38DEE299D197');
|
||||
unflattenKeylistIntoAnswers(['ie10'], 'D4B0A4D2B21470577B4DC7B4A8A76F45');
|
||||
strongName = answers[computePropValue('user.agent')];
|
||||
var idx = strongName.indexOf(':');
|
||||
if (idx != -1) {
|
||||
softPermutationId = parseInt(strongName.substring(idx + 1), 10);
|
||||
strongName = strongName.substring(0, idx);
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
}
|
||||
circuitjs1.__softPermutationId = softPermutationId;
|
||||
return computeUrlForResource(strongName + '.cache.js');
|
||||
}
|
||||
|
||||
function loadExternalStylesheets(){
|
||||
if (!$wnd_0.__gwt_stylesLoaded) {
|
||||
$wnd_0.__gwt_stylesLoaded = {};
|
||||
}
|
||||
function installOneStylesheet(stylesheetUrl){
|
||||
if (!__gwt_stylesLoaded[stylesheetUrl]) {
|
||||
var l = $doc_0.createElement('link');
|
||||
l.setAttribute('rel', 'stylesheet');
|
||||
l.setAttribute('href', computeUrlForResource(stylesheetUrl));
|
||||
$doc_0.getElementsByTagName('head')[0].appendChild(l);
|
||||
__gwt_stylesLoaded[stylesheetUrl] = true;
|
||||
}
|
||||
}
|
||||
|
||||
sendStats('loadExternalRefs', 'begin');
|
||||
installOneStylesheet('gwt/clean/clean.css');
|
||||
installOneStylesheet('style.css');
|
||||
sendStats('loadExternalRefs', 'end');
|
||||
}
|
||||
|
||||
processMetas();
|
||||
circuitjs1.__moduleBase = computeScriptBase();
|
||||
activeModules['circuitjs1'].moduleBase = circuitjs1.__moduleBase;
|
||||
var filename_0 = getCompiledCodeFilename();
|
||||
if ($wnd_0) {
|
||||
var devModePermitted = !!($wnd_0.location.protocol == 'http:' || $wnd_0.location.protocol == 'file:');
|
||||
$wnd_0.__gwt_activeModules['circuitjs1'].canRedirect = devModePermitted;
|
||||
function supportsSessionStorage(){
|
||||
var key = '_gwt_dummy_';
|
||||
try {
|
||||
$wnd_0.sessionStorage.setItem(key, key);
|
||||
$wnd_0.sessionStorage.removeItem(key);
|
||||
return true;
|
||||
}
|
||||
catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (devModePermitted && supportsSessionStorage()) {
|
||||
var devModeKey = '__gwtDevModeHook:circuitjs1';
|
||||
var devModeUrl = $wnd_0.sessionStorage[devModeKey];
|
||||
if (!/^http:\/\/(localhost|127\.0\.0\.1)(:\d+)?\/.*$/.test(devModeUrl)) {
|
||||
if (devModeUrl && (window.console && console.log)) {
|
||||
console.log('Ignoring non-whitelisted Dev Mode URL: ' + devModeUrl);
|
||||
}
|
||||
devModeUrl = '';
|
||||
}
|
||||
if (devModeUrl && !$wnd_0[devModeKey]) {
|
||||
$wnd_0[devModeKey] = true;
|
||||
$wnd_0[devModeKey + ':moduleBase'] = computeScriptBase();
|
||||
var devModeScript = $doc_0.createElement('script');
|
||||
devModeScript.src = devModeUrl;
|
||||
var head = $doc_0.getElementsByTagName('head')[0];
|
||||
head.insertBefore(devModeScript, head.firstElementChild || head.children[0]);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
loadExternalStylesheets();
|
||||
sendStats('bootstrap', 'end');
|
||||
installScript(filename_0);
|
||||
return true;
|
||||
}
|
||||
|
||||
circuitjs1.succeeded = circuitjs1();
|
||||
|
After Width: | Height: | Size: 43 B |
@@ -0,0 +1,16 @@
|
||||
51DA24461737C50588189FA6B0A94F38.cache.js
|
||||
user.agent ie8
|
||||
|
||||
6E2C3288080E47155F0CB57AC9BEE7D4.cache.js
|
||||
user.agent safari
|
||||
|
||||
BC742D0F75A0DDA72202A7CE15FFB7F2.cache.js
|
||||
user.agent gecko1_8
|
||||
|
||||
D0183F5867CEFCD814BA38DEE299D197.cache.js
|
||||
user.agent ie9
|
||||
|
||||
D4B0A4D2B21470577B4DC7B4A8A76F45.cache.js
|
||||
user.agent ie10
|
||||
|
||||
Devmode:devmode.js
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 222 B |
|
After Width: | Height: | Size: 231 B |
|
After Width: | Height: | Size: 298 B |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
@@ -0,0 +1,482 @@
|
||||
### setuplist.txt first line must be a comment
|
||||
+Basics
|
||||
ohms.txt Ohm's Law
|
||||
resistors.txt Resistors
|
||||
cap.txt Capacitor
|
||||
induct.txt Inductor
|
||||
>lrc.txt LRC Circuit
|
||||
voltdivide.txt Voltage Divider
|
||||
pot.txt Potentiometer
|
||||
potdivide.txt Potentiometer Divider
|
||||
thevenin.txt Thevenin's Theorem
|
||||
norton.txt Norton's Theorem
|
||||
-
|
||||
+A/C Circuits
|
||||
capac.txt Capacitor
|
||||
inductac.txt Inductor
|
||||
capmultcaps.txt Caps of Various Capacitances
|
||||
capmultfreq.txt Caps w/ Various Frequencies
|
||||
indmultind.txt Inductors of Various Inductances
|
||||
indmultfreq.txt Inductors w/ Various Frequencies
|
||||
impedance.txt Impedances of Same Magnitude
|
||||
res-series.txt Series Resonance
|
||||
res-par.txt Parallel Resonance
|
||||
-
|
||||
+Passive Filters
|
||||
filt-hipass.txt High-Pass Filter (RC)
|
||||
filt-lopass.txt Low-Pass Filter (RC)
|
||||
filt-hipass-l.txt High-Pass Filter (RL)
|
||||
filt-lopass-l.txt Low-Pass Filter (RL)
|
||||
bandpass.txt Band-pass Filter
|
||||
bandnoise.txt Band-pass w/ Noise
|
||||
notch.txt Notch Filter
|
||||
twint.txt Twin-T Filter
|
||||
crossover.txt Crossover
|
||||
butter10lo.txt Butterworth Low-Pass (10 pole)
|
||||
butter10hi.txt Butterworth High-Pass (10 pole)
|
||||
butter10loaud.txt Butterworth Low-Pass w/ Noise
|
||||
butter10hiaud.txt Butterworth High-Pass w/ Noise
|
||||
butterbandstop.txt Butterworth Band-Stop
|
||||
besselbutter.txt Bessel vs Butterworth
|
||||
ringing.txt Band-pass with Ringing
|
||||
comb.txt Comb Filter
|
||||
-
|
||||
+Other Passive Circuits
|
||||
+Series/Parallel
|
||||
indseries.txt Inductors in Series
|
||||
indpar.txt Inductors in Parallel
|
||||
capseries.txt Caps in Series
|
||||
cappar.txt Caps in Parallel
|
||||
-
|
||||
+Transformers
|
||||
transformer.txt Transformer
|
||||
transformerdc.txt Transformer w/ DC
|
||||
transformerup.txt Step-Up Transformer
|
||||
transformerdown.txt Step-Down Transformer
|
||||
longdist.txt Long-Distance Power Transmission
|
||||
+Saturable Core
|
||||
satcore-inductor.txt Saturable vs Linear Inductor (DC)
|
||||
satcore-comparison.txt Low vs High Drive (AC Saturation)
|
||||
satcore-transformer.txt Transformer with Saturable Core
|
||||
-
|
||||
-
|
||||
+Relays
|
||||
relay.txt Relay
|
||||
relayand.txt Relay AND
|
||||
relayor.txt Relay OR
|
||||
relayxor.txt Relay XOR
|
||||
relaymux.txt Relay Mux
|
||||
relayff.txt Relay Flip-Flop
|
||||
relaytff.txt Relay Toggle Flip-Flop
|
||||
relayosc.txt Relay Oscillator
|
||||
relayctr.txt Relay Counter
|
||||
-
|
||||
3way.txt 3-Way Light Switches
|
||||
4way.txt 3- and 4-Way Light Switches
|
||||
diff.txt Differentiator
|
||||
wheatstone.txt Wheatstone Bridge
|
||||
lrc-critical.txt Critically Damped LRC
|
||||
currentsrcelm.txt Current Source
|
||||
inductkick.txt Inductive Kickback
|
||||
inductkick-snub.txt Blocking Inductive Kickback
|
||||
powerfactor1.txt Power Factor
|
||||
powerfactor2.txt Power Factor Correction
|
||||
grid.txt Resistor Grid
|
||||
grid2.txt Resistor Grid 2
|
||||
cube.txt Resistor Cube
|
||||
+Coupled LC's
|
||||
coupled1.txt LC Modes (2)
|
||||
coupled2.txt Weak Coupling
|
||||
coupled3.txt LC Modes (3)
|
||||
ladder.txt LC Ladder
|
||||
-
|
||||
phaseseq.txt Phase-Sequence Network
|
||||
3phasewye.txt 3-Phase Wye-Wye Balanced Load
|
||||
-
|
||||
+Diodes
|
||||
diodevar.txt Diode
|
||||
diodecurve.txt Diode I/V Curve
|
||||
rectify.txt Half-Wave Rectifier
|
||||
fullrect.txt Full-Wave Rectifier
|
||||
fullrectf.txt Full-Wave Rectifier w/ Filter
|
||||
diodelimit.txt Diode Limiter
|
||||
+Zener Diodes
|
||||
zeneriv.txt I/V Curve
|
||||
zenerref.txt Voltage Reference
|
||||
zenerreffollow.txt Voltage Reference w/ Follower
|
||||
-
|
||||
dcrestoration.txt DC Restoration
|
||||
inductkick-block.txt Blocking Inductive Kickback
|
||||
spikegen.txt Spike Generator
|
||||
+Voltage Multipliers
|
||||
voltdouble.txt Voltage Doubler
|
||||
voltdouble2.txt Voltage Doubler 2
|
||||
volttriple.txt Voltage Tripler
|
||||
voltquad.txt Voltage Quadrupler
|
||||
-
|
||||
amdetect.txt AM Detector
|
||||
diodeclip.txt Waveform Clipper
|
||||
sinediode.txt Triangle-to-Sine Converter
|
||||
ringmod.txt Ring Modulator
|
||||
-
|
||||
+Op-Amps
|
||||
opamp.txt Op-Amp
|
||||
opampfeedback.txt Op-Amp Feedback
|
||||
+Amplifiers
|
||||
amp-invert.txt Inverting Amplifier
|
||||
amp-noninvert.txt Noninverting Amplifier
|
||||
amp-follower.txt Follower
|
||||
amp-diff.txt Differential Amplifier
|
||||
amp-sum.txt Summing Amplifier
|
||||
logconvert.txt Log Amplifier
|
||||
classd.txt Class-D Amplifier
|
||||
-
|
||||
+Oscillators
|
||||
relaxosc.txt Relaxation Oscillator
|
||||
phaseshiftosc.txt Phase-Shift Oscillator
|
||||
triangle.txt Triangle Wave Generator
|
||||
sine.txt Sine Wave Generator
|
||||
sawtooth.txt Sawtooth Wave Generator
|
||||
vco.txt Voltage-Controlled Oscillator
|
||||
trianglevco.txt Triangle VCO
|
||||
-
|
||||
amp-rect.txt Half-Wave Rectifier (inverting)
|
||||
amp-fullrect.txt Full-Wave Rectifier
|
||||
peak-detect.txt Peak Detector
|
||||
amp-integ.txt Integrator
|
||||
amp-dfdx.txt Differentiator (inverting)
|
||||
amp-schmitt.txt Schmitt Trigger
|
||||
nic-r.txt Negative Impedance Converter
|
||||
gyrator.txt Gyrator
|
||||
capmult.txt Capacitance Multiplier
|
||||
howland.txt Howland Current Source
|
||||
itov.txt I-to-V Converter
|
||||
delta-pwm.txt Delta PWM Encoder
|
||||
opamp-regulator.txt Voltage Regulator
|
||||
opint.txt 741 Internals
|
||||
opint-invert-amp.txt 741 (inverting amplifier)
|
||||
opint-slew.txt 741 Slew Rate
|
||||
opint-current.txt 741 Current Limits
|
||||
+Chaotic Circuits
|
||||
rossler.txt Rossler
|
||||
vilnius.txt Vilnius
|
||||
chua.txt Chua
|
||||
chaos1.txt Chaos 1
|
||||
chaos2.txt Chaos 2
|
||||
jerk.txt Jerk
|
||||
-
|
||||
-
|
||||
+Transistors
|
||||
npn.txt NPN Transistor
|
||||
pnp.txt PNP Transistor
|
||||
transswitch.txt Switch
|
||||
follower.txt Emitter Follower
|
||||
+Multivibrators
|
||||
multivib-a.txt Astable Multivib
|
||||
multivib-bi.txt Bistable Multivib (Flip-Flop)
|
||||
multivib-mono.txt Monostable Multivib (One-Shot)
|
||||
-
|
||||
ceamp.txt Common-Emitter Amplifier
|
||||
phasesplit.txt Unity-Gain Phase Splitter
|
||||
schmitt.txt Schmitt Trigger
|
||||
currentsrc.txt Current Source
|
||||
currentsrcramp.txt Current Source Ramp
|
||||
mirror.txt Current Mirror
|
||||
darlington.txt Darlington Pair
|
||||
+Differential Amplifiers
|
||||
trans-diffamp.txt Differential Input
|
||||
trans-diffamp-common.txt Common-Mode Input
|
||||
trans-diffamp-cursrc.txt Common-Mode w/Current Source
|
||||
-
|
||||
+Push-Pull Follower
|
||||
pushpullxover.txt Simple, with distortion
|
||||
pushpull.txt Improved
|
||||
-
|
||||
+Oscillators
|
||||
colpitts.txt Colpitts Oscillator
|
||||
hartley.txt Hartley Oscillator
|
||||
eclosc.txt Emitter-Coupled LC Oscillator
|
||||
crystalosc2.txt Crystal Oscillator
|
||||
-
|
||||
gilbertcell.txt Gilbert Cell Multiplier
|
||||
rmsconverter.txt True RMS Converter
|
||||
joule-thief.txt Joule Thief
|
||||
transrectifier.txt Full-Wave Rectifier
|
||||
early.txt Early Effect
|
||||
-
|
||||
+MOSFETs
|
||||
nmosfet.txt n-MOSFET
|
||||
pmosfet.txt p-MOSFET
|
||||
mosswitch.txt Switch
|
||||
mosfollower.txt Source Follower
|
||||
moscurrentsrc.txt Current Source
|
||||
moscurrentramp.txt Current Ramp
|
||||
mosmirror.txt Current Mirror
|
||||
mosfetamp.txt Common-Source Amplifier
|
||||
cmosinverter.txt CMOS Inverter
|
||||
cmosinvertercap.txt CMOS Inverter (w/capacitance)
|
||||
cmosinverterslow.txt CMOS Inverter (slow transition)
|
||||
cmostransgate.txt CMOS Transmission Gate
|
||||
mux.txt CMOS Multiplexer
|
||||
samplenhold.txt Sample-and-Hold
|
||||
delayrc.txt Delayed Buffer
|
||||
leadingedge.txt Leading-Edge Detector
|
||||
switchfilter.txt Switchable Filter
|
||||
voltinvert.txt Voltage Inverter
|
||||
invertamp.txt Inverter Amplifier
|
||||
inv-osc.txt Inverter Oscillator
|
||||
crystalosc.txt CMOS Crystal Oscillator
|
||||
-
|
||||
+555 Timer Chip
|
||||
555square.txt Square Wave Generator
|
||||
555int.txt Internals
|
||||
555saw.txt Sawtooth Oscillator
|
||||
555lowduty.txt Low-duty-cycle Oscillator
|
||||
555monostable.txt Monostable Multivibrator
|
||||
555pulsemod.txt Pulse Width Modulator
|
||||
555sequencer.txt Pulse Sequencer
|
||||
555schmitt.txt Schmitt Trigger (inverting)
|
||||
555missing.txt Missing Pulse Detector
|
||||
555dutycycle.txt Adjustable Duty Cycle Oscillator
|
||||
-
|
||||
+Active Filters
|
||||
filt-vcvs-lopass.txt VCVS Low-Pass Filter
|
||||
filt-vcvs-hipass.txt VCVS High-Pass Filter
|
||||
switchedcap.txt Switched-Capacitor Filter
|
||||
allpass1.txt Allpass
|
||||
allpass2.txt Allpass w/ Square
|
||||
actbutterlo.txt Butterworth Low-Pass
|
||||
actbutterhi.txt Butterworth High-Pass
|
||||
actbutterband.txt Butterworth Band-Pass
|
||||
-
|
||||
+Logic Families
|
||||
+RTL
|
||||
rtlinverter.txt RTL Inverter
|
||||
rtlnor.txt RTL NOR
|
||||
rtlnand.txt RTL NAND
|
||||
-
|
||||
+DTL
|
||||
dtlinverter.txt DTL Inverter
|
||||
dtlnand.txt DTL NAND
|
||||
dtlnor.txt DTL NOR
|
||||
-
|
||||
+TTL
|
||||
ttlinverter.txt TTL Inverter
|
||||
ttlnand.txt TTL NAND
|
||||
ttlnor.txt TTL NOR
|
||||
fanout.txt Fan-Out
|
||||
-
|
||||
+NMOS
|
||||
nmosinverter.txt NMOS Inverter
|
||||
nmosinverter2.txt Inverter with only MOSFETs
|
||||
nmosinverter3.txt Depletion-load NMOS Inverter
|
||||
nmosnand.txt NMOS NAND
|
||||
-
|
||||
+CMOS
|
||||
cmosinverter.txt CMOS Inverter
|
||||
cmosnand.txt CMOS NAND
|
||||
cmosnor.txt CMOS NOR
|
||||
cmosxor.txt CMOS XOR
|
||||
cmosff.txt CMOS Flip-Flop
|
||||
cmosmsff.txt CMOS Master-Slave Flip-Flop
|
||||
-
|
||||
+ECL
|
||||
eclnor.txt ECL NOR/OR
|
||||
-
|
||||
+Ternary
|
||||
3-cgand.txt CGAND
|
||||
3-cgor.txt CGOR
|
||||
3-invert.txt Complement (F210)
|
||||
3-f211.txt F211
|
||||
3-f220.txt F220
|
||||
3-f221.txt F221
|
||||
-
|
||||
-
|
||||
+Combinational Logic
|
||||
xor.txt Exclusive OR
|
||||
halfadd.txt Half Adder
|
||||
fulladd.txt Full Adder
|
||||
decoder.txt 1-of-4 Decoder
|
||||
priencoder.txt Priority Encoder
|
||||
mux3state.txt 2-to-1 Mux
|
||||
majority.txt Majority Logic
|
||||
digcompare.txt 2-Bit Comparator
|
||||
7segdecoder.txt 7-Segment LED Decoder
|
||||
brentkung.txt Brent-Kung Adder
|
||||
alu74181.txt 74181 ALU
|
||||
-
|
||||
+Sequential Logic
|
||||
+Flip-Flops
|
||||
nandff.txt SR Flip-Flop
|
||||
clockedsrff.txt Clocked SR Flip-Flop
|
||||
masterslaveff.txt Master-Slave Flip-Flop
|
||||
edgedff.txt Edge-Triggered D Flip-Flop
|
||||
jkff.txt JK Flip-Flop
|
||||
-
|
||||
+Counters
|
||||
counter.txt 4-Bit Ripple Counter
|
||||
counter8.txt 8-Bit Ripple Counter
|
||||
synccounter.txt Synchronous Counter
|
||||
updownctr.txt Up/Down Counter
|
||||
deccounter.txt Decimal Counter
|
||||
graycode.txt Gray Code Counter
|
||||
johnsonctr.txt Johnson Counter
|
||||
ringcascade.txt Cascading Ring Counters
|
||||
-
|
||||
+Shift Registers
|
||||
sipo-sr.txt Serial-In Parallel-Out
|
||||
piso-sr.txt Parallel-In Serial-Out
|
||||
unishiftreg.txt Universal
|
||||
-
|
||||
divideby2.txt Divide-by-2
|
||||
divideby3.txt Divide-by-3
|
||||
ledflasher.txt LED Flasher
|
||||
traffic.txt Traffic Light
|
||||
sram.txt Static RAM
|
||||
dram.txt Dynamic RAM
|
||||
+TD4 CPU
|
||||
td4.txt TD4 LED Strobe
|
||||
td4-ctr.txt TD4 Counter
|
||||
td4-ctr-dn.txt TD4 Down Counter
|
||||
td4-ctr-up-dn.txt TD4 Up-Down Counter
|
||||
td4-add2.txt TD4 Add 2
|
||||
-
|
||||
-
|
||||
+Analog/Digital
|
||||
flashadc.txt Flash ADC
|
||||
deltasigma.txt Delta-Sigma ADC
|
||||
hfadc.txt Half-Flash (Subranging) ADC
|
||||
dac.txt Binary-Weighted DAC
|
||||
r2rladder.txt R-2R Ladder DAC
|
||||
swtreedac.txt Switch-Tree DAC
|
||||
digsine.txt Digital Sine Wave
|
||||
qam-256.txt QAM-256 Modulator/Demodulator
|
||||
-
|
||||
+Power Converters
|
||||
conv-boost.txt Boost Converter
|
||||
conv-buck.txt Buck Converter
|
||||
conv-buckboost.txt Buck-Boost Converter
|
||||
conv-cuk.txt Ćuk Converter
|
||||
conv-sepic.txt SEPIC Converter
|
||||
-
|
||||
+Phase-Locked Loops
|
||||
xorphasedet.txt XOR Phase Detector
|
||||
pll.txt Type I PLL
|
||||
phasecomp.txt Phase Comparator (Type II)
|
||||
phasecompint.txt Phase Comparator Internals
|
||||
pll2.txt Type II PLL
|
||||
pll2a.txt Type II PLL (fast)
|
||||
freqdouble.txt Frequency Doubler
|
||||
-
|
||||
+Transmission Lines
|
||||
tl.txt Simple TL
|
||||
tlstand.txt Standing Wave
|
||||
tlterm.txt Termination
|
||||
tlmismatch.txt Mismatched lines (Pulse)
|
||||
tlmis1.txt Mismatched lines (Standing Wave)
|
||||
tlmatch1.txt Impedance Matching (L-Section)
|
||||
tlmatch2.txt Impedance Matching (Shunt Stub)
|
||||
tlfreq.txt Stub Frequency Response
|
||||
tllopass.txt Low-Pass Filter
|
||||
tllight.txt Light Switch
|
||||
-
|
||||
+Controlled Sources
|
||||
cs-resistor.txt VCCS Resistor
|
||||
cs-varyresistor.txt VCCS Varying Resistor
|
||||
cs-opamp.txt VCVS Op-Amp
|
||||
cs-opamprail.txt VCVS Op-Amp With Rails
|
||||
cs-multiplier.txt VCVS Multiplier
|
||||
cs-fullrectifier.txt VCVS Full Rectifier
|
||||
cs-ramp.txt VCVS Voltage Ramp
|
||||
cs-currentadder.txt Current Adder
|
||||
cs-integrator.txt VCVS Integrator
|
||||
cs-diff.txt VCVS Differentiator
|
||||
cs-varinduct.txt CCVS Variable Inductor
|
||||
cs-varicap.txt VCCS Variable Capacitor
|
||||
-
|
||||
+Subcircuits
|
||||
fullrect-sc.txt Full Rectifier
|
||||
adder4-sc.txt Full Adder (nested)
|
||||
-
|
||||
+Misc Devices
|
||||
+JFETs
|
||||
jfetcurrentsrc.txt JFET Current Source
|
||||
jfetfollower.txt JFET Follower
|
||||
jfetfollower-nooff.txt JFET Follower w/zero offset
|
||||
jfetamp.txt Common-Source Amplifier
|
||||
volume.txt Volume Control
|
||||
lambda-diode.txt Lambda Diode
|
||||
lambda-diode-osc.txt Lambda Diode Oscillator
|
||||
-
|
||||
+Tunnel Diodes
|
||||
tdiode.txt I/V Curve
|
||||
tdosc.txt LC Oscillator
|
||||
tdrelax.txt Relaxation Oscillator
|
||||
-
|
||||
+Memristors
|
||||
mr.txt Memristor
|
||||
mr-sine.txt Sine Wave
|
||||
mr-square.txt Square Wave
|
||||
mr-triangle.txt Triangle Wave
|
||||
mr-sine2.txt Hard-Switching 1
|
||||
mr-sine3.txt Hard-Switching 2
|
||||
mr-crossbar.txt Crossbar Memory
|
||||
-
|
||||
+Triodes
|
||||
triode.txt Triode
|
||||
triodeamp.txt Amplifier
|
||||
-
|
||||
+Silicon-Controlled Rectifiers
|
||||
scr.txt SCR
|
||||
scractrig.txt AC Trigger
|
||||
-
|
||||
+Current Conveyor
|
||||
cc2.txt CCII+
|
||||
cc2n.txt CCII-
|
||||
ccinductor.txt Inductor Simulator
|
||||
cc2imp.txt CCII+ Implementation
|
||||
cc2impn.txt CCII- Implementation
|
||||
cciamp.txt Current Amplifier
|
||||
ccvccs.txt VCCS
|
||||
ccdiff.txt Current Differentiator
|
||||
ccint.txt Current Integrator
|
||||
ccitov.txt Current-Controlled Voltage Source
|
||||
-
|
||||
+Spark Gap
|
||||
spark-sawtooth.txt Sawtooth Generator
|
||||
tesla.txt Tesla Coil
|
||||
spark-marx.txt Marx Generator
|
||||
-
|
||||
+Operational Transconductance Amplifier (OTA)
|
||||
ota-vca.txt OTA Voltage Controlled Amplifier (VCA)
|
||||
ota-vcf-single.txt OTA Single Stage VCF (low pass)
|
||||
ota-ringmod.txt OTA Ring Modulator
|
||||
ota-gain.txt LM137000 Gain Oddity
|
||||
-
|
||||
+Light Bulb
|
||||
lightbulb.txt Light Bulb
|
||||
wienbridge.txt Wien Bridge Oscillator
|
||||
-
|
||||
+Varactor
|
||||
varactor.txt Varactor
|
||||
varactorvco.txt VCO
|
||||
-
|
||||
+Norton Amplifier
|
||||
norton-invert.txt Norton Inverting Amplifier
|
||||
norton-noninvert.txt Norton Noninverting Amplifier
|
||||
norton-saw.txt Norton Sawtooth Oscillator
|
||||
-
|
||||
ledarray.txt LED Array
|
||||
triacdimmer.txt DIAC/TRIAC Dimmer
|
||||
ujtosc.txt Unijunction Oscillator
|
||||
3motor.txt 3-Phase Motor
|
||||
latchingrelay.txt Latching Relay
|
||||
gyratorelm.txt Gyrator
|
||||
-
|
||||
+2-D Scope
|
||||
lissa.txt Lissajous Figures
|
||||
plot2d-checker.txt Checkerboard
|
||||
plot2d-color.txt Color Checkerboard
|
||||
plot2d-smile.txt Smiley
|
||||
-
|
||||
blank.txt Blank Circuit
|
||||
@@ -0,0 +1,127 @@
|
||||
@charset "UTF-8";
|
||||
|
||||
/*Hide all mobile elements when in desktop usage*/
|
||||
.trigger, .toptrigger, .triggerLabel, toptriggerlabel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 600px) {
|
||||
.triggerLabel {
|
||||
display: initial;
|
||||
border-radius: 10px 0px 0px 10px;
|
||||
background: white;
|
||||
width: 20px;
|
||||
height: 50px;
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
transition: right 1s;
|
||||
}
|
||||
.triggerLabel:before {
|
||||
content: "‖";
|
||||
font-size: 32px;
|
||||
padding-left: 3px;
|
||||
position: absolute;
|
||||
padding-top: 5px;
|
||||
}
|
||||
.toptriggerlabel {
|
||||
z-index: 1;
|
||||
top: 5px;
|
||||
right: 5px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
}
|
||||
.toptriggerlabel:before {
|
||||
content: "☰";
|
||||
font-size: 16px;
|
||||
padding-left: 2px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/*Trick to hide the menu when the user taps out of the menu*/
|
||||
.toptrigger:checked {
|
||||
display: block;
|
||||
opacity: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 2;
|
||||
position: absolute;
|
||||
}
|
||||
.trigger:checked+.triggerLabel {
|
||||
right: 128px;
|
||||
}
|
||||
|
||||
/* selects the top panel */
|
||||
.gwt-MenuBar-horizontal>table {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* shows the top menu when the user taps the menu icon */
|
||||
.toptrigger:checked+label+div>div>table {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
/* selects the side panel */
|
||||
.trigger+.triggerLabel+div {
|
||||
width: 0 !important;
|
||||
background: white;
|
||||
z-index: 1;
|
||||
transition: width 1s;
|
||||
}
|
||||
.trigger:checked+.triggerLabel+div {
|
||||
width: 128px !important;
|
||||
}
|
||||
|
||||
/* selects the top menu */
|
||||
.gwt-MenuBar-horizontal>table {
|
||||
height: auto;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
top: 30px;
|
||||
background: white;
|
||||
z-index: 2;
|
||||
}
|
||||
.gwt-MenuBar-horizontal * {
|
||||
display: block;
|
||||
}
|
||||
.gwt-MenuBarPopup {
|
||||
z-index: 2;
|
||||
width: 100%;
|
||||
left: 0 !important;
|
||||
}
|
||||
.gwt-MenuBarPopup>div {
|
||||
overflow: scroll;
|
||||
z-index: 2;
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
position: fixed;
|
||||
top: 30px;
|
||||
/* trick to prevent sub menus from opening in the same touch */
|
||||
transition:all 0.1s;
|
||||
}
|
||||
.gwt-MenuBarPopup>div>table {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.menuPopupMiddleCenterInner>div>table {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
}
|
||||
.menuPopupTopLeft, .menuPopupTopCenter, .menuPopupTopRight,
|
||||
.menuPopupMiddleLeft, .menuPopupMiddleRight, .menuPopupMiddleCenter,
|
||||
.menuPopupBottomLeft, .menuPopupBottomCenter, .menuPopupBottomRight {
|
||||
background: white !important;
|
||||
}
|
||||
|
||||
/* selects the div containing the canvas */
|
||||
.trigger+.triggerLabel+div+div {
|
||||
width: 100% !important;
|
||||
}
|
||||
/* added extra div for toolbar */
|
||||
.trigger+.triggerLabel+div+div+div {
|
||||
width: 100% !important;
|
||||
}
|
||||
}
|
||||