add some docs
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* in modern browsers and inspired by the idea behind prezi.com.
|
||||
*
|
||||
*
|
||||
* Copyright 2011-2012 Bartek Szopka (@bartaz), 2016-2023 Henrik Ingo (@henrikingo), 2024 Janis Hutz
|
||||
* Copyright 2011-2012 Bartek Szopka (@bartaz), 2016-2024 Henrik Ingo (@henrikingo), 2024 Janis Hutz
|
||||
* and 70+ other contributors
|
||||
*
|
||||
* Released under the MIT License.
|
||||
@@ -21,10 +21,50 @@
|
||||
// Welcome to the impress.js source code
|
||||
// You are one of those who would like to know how impress.js works?
|
||||
// Let us show you!
|
||||
// NOTE that compared to previous versions of impress, this code is documented in a more technical fashion.
|
||||
|
||||
function () {
|
||||
"use strict";
|
||||
// Important note on the file structure of impress.js, as it has changed with V3
|
||||
// This file contains all the interface definitions and uses various components from the ./lib directory,
|
||||
// as well as loading impress plugins from the ./plugins directory. A fully built impress.js version
|
||||
// has all of these files combined into a single file, as to enable a simple include.
|
||||
|
||||
window.impress = () => {
|
||||
'use strict';
|
||||
|
||||
// this function is used to initialize impress. It calls various private functions that initialize
|
||||
// various components
|
||||
var init = () => {
|
||||
console.log( 'impress-init' );
|
||||
console.log( 'init' );
|
||||
};
|
||||
};
|
||||
|
||||
// This function can be used to add new elements to the impress 3D-API
|
||||
|
||||
/**
|
||||
* Use this function to create a new element on the virtual canvas of impress.js
|
||||
* It is used for example by the "presentation" plugin, which parses the presentation
|
||||
* and initializes impress itself. You can also use this function to edit a previously
|
||||
* generated element. This allows for example the Overview plugin to work as it does.
|
||||
*
|
||||
* Returns true if successful at positioning this element, false, if failed
|
||||
* @param {string} DOMElementID
|
||||
* @param {object} coordinates
|
||||
* @param {object} rotation
|
||||
* @return {boolean}
|
||||
*/
|
||||
var addElement = ( DOMElementID, coordinates, rotation ) => {
|
||||
console.log( 'element added' );
|
||||
return true;
|
||||
};
|
||||
|
||||
/**
|
||||
* Description
|
||||
* @param {any} DOMElementID
|
||||
* @return {any}
|
||||
*/
|
||||
var removeElement = ( DOMElementID ) => {
|
||||
};
|
||||
|
||||
return {
|
||||
init
|
||||
};
|
||||
};
|
||||
@@ -13,19 +13,15 @@
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<link rel="stylesheet" href="style.css">
|
||||
</head>
|
||||
<body class="impress-not-supported">
|
||||
<div class="fallback-message">
|
||||
<p>Your browser <b>doesn't support the features required</b> by impress.js, so you are presented with a simplified version of this presentation.</p>
|
||||
<p>For the best experience please use the latest <b>Chrome</b>, <b>Safari</b> or <b>Firefox</b> browser.</p>
|
||||
</div>
|
||||
<div id="impress" data-width="1920" data-height="1080">
|
||||
<div id="title" class="step">
|
||||
<h1>Test</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="./impress.js"></script><script>impress().init()</script>
|
||||
<script src="./impress.js"></script>
|
||||
<script>impress().init()</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user